From 80a2b6afa3a20d501b37818f3325c454edeeadeb Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Tue, 16 Jul 2024 15:33:14 -0400 Subject: [PATCH] chore: rebuild assets --- assets/js/app.js | 8 +- priv/static/assets/app.css | 2355 +---------- priv/static/assets/app.js | 6713 +------------------------------ priv/static/assets/app.js.gz | Bin 35966 -> 36538 bytes priv/static/cache_manifest.json | 4 +- 5 files changed, 18 insertions(+), 9062 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index cfbaeab..a2445cd 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -23,7 +23,9 @@ Hooks.JsonEditor = { try { JSON.parse(json); target.value = json; - target.dispatchEvent(new Event("change", { bubbles: true })); + target.dispatchEvent( + new Event("change", { bubbles: true, target: this.el.name }), + ); } catch (_e) {} }, onChange: () => { @@ -32,7 +34,9 @@ Hooks.JsonEditor = { json = hook.editor.get(); target.value = JSON.stringify(json); - target.dispatchEvent(new Event("change", { bubbles: true })); + target.dispatchEvent( + new Event("change", { bubbles: true, target: this.el.name }), + ); } catch (_e) {} }, onModeChange: (newMode) => { diff --git a/priv/static/assets/app.css b/priv/static/assets/app.css index 9464b91..eb8c3d2 100644 --- a/priv/static/assets/app.css +++ b/priv/static/assets/app.css @@ -1,2354 +1 @@ -/* -! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com -*/ - -/* -1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) -2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) -*/ - -*, -::before, -::after { - box-sizing: border-box; - /* 1 */ - border-width: 0; - /* 2 */ - border-style: solid; - /* 2 */ - border-color: #e5e7eb; - /* 2 */ -} - -::before, -::after { - --tw-content: ''; -} - -/* -1. Use a consistent sensible line-height in all browsers. -2. Prevent adjustments of font size after orientation changes in iOS. -3. Use a more readable tab size. -4. Use the user's configured `sans` font-family by default. -5. Use the user's configured `sans` font-feature-settings by default. -6. Use the user's configured `sans` font-variation-settings by default. -*/ - -html { - line-height: 1.5; - /* 1 */ - -webkit-text-size-adjust: 100%; - /* 2 */ - -moz-tab-size: 4; - /* 3 */ - -o-tab-size: 4; - tab-size: 4; - /* 3 */ - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - /* 4 */ - font-feature-settings: normal; - /* 5 */ - font-variation-settings: normal; - /* 6 */ -} - -/* -1. Remove the margin in all browsers. -2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. -*/ - -body { - margin: 0; - /* 1 */ - line-height: inherit; - /* 2 */ -} - -/* -1. Add the correct height in Firefox. -2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) -3. Ensure horizontal rules are visible by default. -*/ - -hr { - height: 0; - /* 1 */ - color: inherit; - /* 2 */ - border-top-width: 1px; - /* 3 */ -} - -/* -Add the correct text decoration in Chrome, Edge, and Safari. -*/ - -abbr:where([title]) { - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; -} - -/* -Remove the default font size and weight for headings. -*/ - -h1, -h2, -h3, -h4, -h5, -h6 { - font-size: inherit; - font-weight: inherit; -} - -/* -Reset links to optimize for opt-in styling instead of opt-out. -*/ - -a { - color: inherit; - text-decoration: inherit; -} - -/* -Add the correct font weight in Edge and Safari. -*/ - -b, -strong { - font-weight: bolder; -} - -/* -1. Use the user's configured `mono` font family by default. -2. Correct the odd `em` font sizing in all browsers. -*/ - -code, -kbd, -samp, -pre { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; - /* 1 */ - font-size: 1em; - /* 2 */ -} - -/* -Add the correct font size in all browsers. -*/ - -small { - font-size: 80%; -} - -/* -Prevent `sub` and `sup` elements from affecting the line height in all browsers. -*/ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* -1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) -2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) -3. Remove gaps between table borders by default. -*/ - -table { - text-indent: 0; - /* 1 */ - border-color: inherit; - /* 2 */ - border-collapse: collapse; - /* 3 */ -} - -/* -1. Change the font styles in all browsers. -2. Remove the margin in Firefox and Safari. -3. Remove default padding in all browsers. -*/ - -button, -input, -optgroup, -select, -textarea { - font-family: inherit; - /* 1 */ - font-size: 100%; - /* 1 */ - font-weight: inherit; - /* 1 */ - line-height: inherit; - /* 1 */ - color: inherit; - /* 1 */ - margin: 0; - /* 2 */ - padding: 0; - /* 3 */ -} - -/* -Remove the inheritance of text transform in Edge and Firefox. -*/ - -button, -select { - text-transform: none; -} - -/* -1. Correct the inability to style clickable types in iOS and Safari. -2. Remove default button styles. -*/ - -button, -[type='button'], -[type='reset'], -[type='submit'] { - -webkit-appearance: button; - /* 1 */ - background-color: transparent; - /* 2 */ - background-image: none; - /* 2 */ -} - -/* -Use the modern Firefox focus style for all focusable elements. -*/ - -:-moz-focusring { - outline: auto; -} - -/* -Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) -*/ - -:-moz-ui-invalid { - box-shadow: none; -} - -/* -Add the correct vertical alignment in Chrome and Firefox. -*/ - -progress { - vertical-align: baseline; -} - -/* -Correct the cursor style of increment and decrement buttons in Safari. -*/ - -::-webkit-inner-spin-button, -::-webkit-outer-spin-button { - height: auto; -} - -/* -1. Correct the odd appearance in Chrome and Safari. -2. Correct the outline style in Safari. -*/ - -[type='search'] { - -webkit-appearance: textfield; - /* 1 */ - outline-offset: -2px; - /* 2 */ -} - -/* -Remove the inner padding in Chrome and Safari on macOS. -*/ - -::-webkit-search-decoration { - -webkit-appearance: none; -} - -/* -1. Correct the inability to style clickable types in iOS and Safari. -2. Change font properties to `inherit` in Safari. -*/ - -::-webkit-file-upload-button { - -webkit-appearance: button; - /* 1 */ - font: inherit; - /* 2 */ -} - -/* -Add the correct display in Chrome and Safari. -*/ - -summary { - display: list-item; -} - -/* -Removes the default spacing and border for appropriate elements. -*/ - -blockquote, -dl, -dd, -h1, -h2, -h3, -h4, -h5, -h6, -hr, -figure, -p, -pre { - margin: 0; -} - -fieldset { - margin: 0; - padding: 0; -} - -legend { - padding: 0; -} - -ol, -ul, -menu { - list-style: none; - margin: 0; - padding: 0; -} - -/* -Prevent resizing textareas horizontally by default. -*/ - -textarea { - resize: vertical; -} - -/* -1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) -2. Set the default placeholder color to the user's configured gray 400 color. -*/ - -input::-moz-placeholder, textarea::-moz-placeholder { - opacity: 1; - /* 1 */ - color: #9ca3af; - /* 2 */ -} - -input::placeholder, -textarea::placeholder { - opacity: 1; - /* 1 */ - color: #9ca3af; - /* 2 */ -} - -/* -Set the default cursor for buttons. -*/ - -button, -[role="button"] { - cursor: pointer; -} - -/* -Make sure disabled buttons don't get the pointer cursor. -*/ - -:disabled { - cursor: default; -} - -/* -1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) -2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) - This can trigger a poorly considered lint error in some tools but is included by design. -*/ - -img, -svg, -video, -canvas, -audio, -iframe, -embed, -object { - display: block; - /* 1 */ - vertical-align: middle; - /* 2 */ -} - -/* -Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) -*/ - -img, -video { - max-width: 100%; - height: auto; -} - -/* Make elements with the HTML hidden attribute stay hidden by default */ - -[hidden] { - display: none; -} - -[type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background-color: #fff; - border-color: #6b7280; - border-width: 1px; - border-radius: 0px; - padding-top: 0.5rem; - padding-right: 0.75rem; - padding-bottom: 0.5rem; - padding-left: 0.75rem; - font-size: 1rem; - line-height: 1.5rem; - --tw-shadow: 0 0 #0000; -} - -[type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus { - outline: 2px solid transparent; - outline-offset: 2px; - --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: #2563eb; - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); - border-color: #2563eb; -} - -input::-moz-placeholder, textarea::-moz-placeholder { - color: #6b7280; - opacity: 1; -} - -input::placeholder,textarea::placeholder { - color: #6b7280; - opacity: 1; -} - -::-webkit-datetime-edit-fields-wrapper { - padding: 0; -} - -::-webkit-date-and-time-value { - min-height: 1.5em; -} - -::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field { - padding-top: 0; - padding-bottom: 0; -} - -select { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); - background-position: right 0.5rem center; - background-repeat: no-repeat; - background-size: 1.5em 1.5em; - padding-right: 2.5rem; - -webkit-print-color-adjust: exact; - print-color-adjust: exact; -} - -[multiple] { - background-image: initial; - background-position: initial; - background-repeat: unset; - background-size: initial; - padding-right: 0.75rem; - -webkit-print-color-adjust: unset; - print-color-adjust: unset; -} - -[type='checkbox'],[type='radio'] { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - padding: 0; - -webkit-print-color-adjust: exact; - print-color-adjust: exact; - display: inline-block; - vertical-align: middle; - background-origin: border-box; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - flex-shrink: 0; - height: 1rem; - width: 1rem; - color: #2563eb; - background-color: #fff; - border-color: #6b7280; - border-width: 1px; - --tw-shadow: 0 0 #0000; -} - -[type='checkbox'] { - border-radius: 0px; -} - -[type='radio'] { - border-radius: 100%; -} - -[type='checkbox']:focus,[type='radio']:focus { - outline: 2px solid transparent; - outline-offset: 2px; - --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); - --tw-ring-offset-width: 2px; - --tw-ring-offset-color: #fff; - --tw-ring-color: #2563eb; - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); -} - -[type='checkbox']:checked,[type='radio']:checked { - border-color: transparent; - background-color: currentColor; - background-size: 100% 100%; - background-position: center; - background-repeat: no-repeat; -} - -[type='checkbox']:checked { - background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); -} - -[type='radio']:checked { - background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); -} - -[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus { - border-color: transparent; - background-color: currentColor; -} - -[type='checkbox']:indeterminate { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e"); - border-color: transparent; - background-color: currentColor; - background-size: 100% 100%; - background-position: center; - background-repeat: no-repeat; -} - -[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus { - border-color: transparent; - background-color: currentColor; -} - -[type='file'] { - background: unset; - border-color: inherit; - border-width: 0; - border-radius: 0; - padding: 0; - font-size: unset; - line-height: inherit; -} - -[type='file']:focus { - outline: 1px solid ButtonText; - outline: 1px auto -webkit-focus-ring-color; -} - -*, ::before, ::after { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} - -::backdrop { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} - -.container { - width: 100%; -} - -@media (min-width: 640px) { - .container { - max-width: 640px; - } -} - -@media (min-width: 768px) { - .container { - max-width: 768px; - } -} - -@media (min-width: 1024px) { - .container { - max-width: 1024px; - } -} - -@media (min-width: 1280px) { - .container { - max-width: 1280px; - } -} - -@media (min-width: 1536px) { - .container { - max-width: 1536px; - } -} - -.hero-arrow-left-solid { - --hero-arrow-left-solid: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-arrow-left-solid); - mask: var(--hero-arrow-left-solid); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-arrow-path { - --hero-arrow-path: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-arrow-path); - mask: var(--hero-arrow-path); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-check { - --hero-check: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-check); - mask: var(--hero-check); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-exclamation-circle-mini { - --hero-exclamation-circle-mini: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-exclamation-circle-mini); - mask: var(--hero-exclamation-circle-mini); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-eye-slash-solid { - --hero-eye-slash-solid: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-eye-slash-solid); - mask: var(--hero-eye-slash-solid); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-eye-solid { - --hero-eye-solid: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-eye-solid); - mask: var(--hero-eye-solid); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-information-circle-mini { - --hero-information-circle-mini: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-information-circle-mini); - mask: var(--hero-information-circle-mini); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-information-circle-solid { - --hero-information-circle-solid: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-information-circle-solid); - mask: var(--hero-information-circle-solid); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-key { - --hero-key: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-key); - mask: var(--hero-key); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-key-solid { - --hero-key-solid: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-key-solid); - mask: var(--hero-key-solid); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-magnifying-glass-circle { - --hero-magnifying-glass-circle: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-magnifying-glass-circle); - mask: var(--hero-magnifying-glass-circle); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-minus { - --hero-minus: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-minus); - mask: var(--hero-minus); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-pencil-solid { - --hero-pencil-solid: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-pencil-solid); - mask: var(--hero-pencil-solid); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-plus { - --hero-plus: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-plus); - mask: var(--hero-plus); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-x-circle-solid { - --hero-x-circle-solid: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-x-circle-solid); - mask: var(--hero-x-circle-solid); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-x-mark { - --hero-x-mark: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-x-mark); - mask: var(--hero-x-mark); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.hero-x-mark-solid { - --hero-x-mark-solid: url('data:image/svg+xml;utf8,'); - -webkit-mask: var(--hero-x-mark-solid); - mask: var(--hero-x-mark-solid); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - background-color: currentColor; - vertical-align: middle; - display: inline-block; - width: 1.25rem; - height: 1.25rem; -} - -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} - -.static { - position: static; -} - -.fixed { - position: fixed; -} - -.absolute { - position: absolute; -} - -.relative { - position: relative; -} - -.inset-0 { - inset: 0px; -} - -.-inset-y-px { - top: -1px; - bottom: -1px; -} - -.-left-4 { - left: -1rem; -} - -.-right-4 { - right: -1rem; -} - -.left-0 { - left: 0px; -} - -.right-0 { - right: 0px; -} - -.right-1 { - right: 0.25rem; -} - -.right-2 { - right: 0.5rem; -} - -.right-5 { - right: 1.25rem; -} - -.top-1 { - top: 0.25rem; -} - -.top-2 { - top: 0.5rem; -} - -.top-6 { - top: 1.5rem; -} - -.z-0 { - z-index: 0; -} - -.z-10 { - z-index: 10; -} - -.z-50 { - z-index: 50; -} - -.col-span-2 { - grid-column: span 2 / span 2; -} - -.col-span-3 { - grid-column: span 3 / span 3; -} - -.col-span-6 { - grid-column: span 6 / span 6; -} - -.col-span-full { - grid-column: 1 / -1; -} - -.float-right { - float: right; -} - -.-m-3 { - margin: -0.75rem; -} - -.m-2 { - margin: 0.5rem; -} - -.m-5 { - margin: 1.25rem; -} - -.-my-4 { - margin-top: -1rem; - margin-bottom: -1rem; -} - -.mx-12 { - margin-left: 3rem; - margin-right: 3rem; -} - -.mx-24 { - margin-left: 6rem; - margin-right: 6rem; -} - -.mx-auto { - margin-left: auto; - margin-right: auto; -} - -.my-4 { - margin-top: 1rem; - margin-bottom: 1rem; -} - -.-mr-1 { - margin-right: -0.25rem; -} - -.-mr-2 { - margin-right: -0.5rem; -} - -.mb-10 { - margin-bottom: 2.5rem; -} - -.mb-2 { - margin-bottom: 0.5rem; -} - -.mb-4 { - margin-bottom: 1rem; -} - -.ml-1 { - margin-left: 0.25rem; -} - -.ml-10 { - margin-left: 2.5rem; -} - -.ml-12 { - margin-left: 3rem; -} - -.ml-2 { - margin-left: 0.5rem; -} - -.ml-3 { - margin-left: 0.75rem; -} - -.ml-4 { - margin-left: 1rem; -} - -.mr-1 { - margin-right: 0.25rem; -} - -.mr-4 { - margin-right: 1rem; -} - -.mr-5 { - margin-right: 1.25rem; -} - -.mt-0 { - margin-top: 0px; -} - -.mt-0\.5 { - margin-top: 0.125rem; -} - -.mt-1 { - margin-top: 0.25rem; -} - -.mt-10 { - margin-top: 2.5rem; -} - -.mt-11 { - margin-top: 2.75rem; -} - -.mt-14 { - margin-top: 3.5rem; -} - -.mt-16 { - margin-top: 4rem; -} - -.mt-2 { - margin-top: 0.5rem; -} - -.mt-3 { - margin-top: 0.75rem; -} - -.mt-4 { - margin-top: 1rem; -} - -.mt-5 { - margin-top: 1.25rem; -} - -.block { - display: block; -} - -.flex { - display: flex; -} - -.inline-flex { - display: inline-flex; -} - -.table { - display: table; -} - -.grid { - display: grid; -} - -.hidden { - display: none; -} - -.h-16 { - height: 4rem; -} - -.h-3 { - height: 0.75rem; -} - -.h-4 { - height: 1rem; -} - -.h-5 { - height: 1.25rem; -} - -.h-6 { - height: 1.5rem; -} - -.h-full { - height: 100%; -} - -.h-max { - height: -moz-max-content; - height: max-content; -} - -.h-screen { - height: 100vh; -} - -.min-h-\[6rem\] { - min-height: 6rem; -} - -.min-h-full { - min-height: 100%; -} - -.min-h-screen { - min-height: 100vh; -} - -.w-1\/4 { - width: 25%; -} - -.w-14 { - width: 3.5rem; -} - -.w-3 { - width: 0.75rem; -} - -.w-4 { - width: 1rem; -} - -.w-5 { - width: 1.25rem; -} - -.w-5\/6 { - width: 83.333333%; -} - -.w-56 { - width: 14rem; -} - -.w-6 { - width: 1.5rem; -} - -.w-80 { - width: 20rem; -} - -.w-\[40rem\] { - width: 40rem; -} - -.w-full { - width: 100%; -} - -.max-w-3xl { - max-width: 48rem; -} - -.max-w-none { - max-width: none; -} - -.max-w-sm { - max-width: 24rem; -} - -.flex-1 { - flex: 1 1 0%; -} - -.flex-none { - flex: none; -} - -.flex-shrink-0 { - flex-shrink: 0; -} - -.table-auto { - table-layout: auto; -} - -.origin-top-right { - transform-origin: top right; -} - -.-translate-y-3 { - --tw-translate-y: -0.75rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.translate-y-0 { - --tw-translate-y: 0px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.translate-y-4 { - --tw-translate-y: 1rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.transform { - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -@keyframes spin { - to { - transform: rotate(360deg); - } -} - -.animate-spin { - animation: spin 1s linear infinite; -} - -.cursor-pointer { - cursor: pointer; -} - -.resize-y { - resize: vertical; -} - -.grid-cols-1 { - grid-template-columns: repeat(1, minmax(0, 1fr)); -} - -.grid-cols-6 { - grid-template-columns: repeat(6, minmax(0, 1fr)); -} - -.items-center { - align-items: center; -} - -.justify-center { - justify-content: center; -} - -.justify-between { - justify-content: space-between; -} - -.justify-items-center { - justify-items: center; -} - -.gap-1 { - gap: 0.25rem; -} - -.gap-1\.5 { - gap: 0.375rem; -} - -.gap-3 { - gap: 0.75rem; -} - -.gap-4 { - gap: 1rem; -} - -.gap-6 { - gap: 1.5rem; -} - -.-space-x-px > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(-1px * var(--tw-space-x-reverse)); - margin-left: calc(-1px * calc(1 - var(--tw-space-x-reverse))); -} - -.space-x-1 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(0.25rem * var(--tw-space-x-reverse)); - margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse))); -} - -.space-y-8 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(2rem * var(--tw-space-y-reverse)); -} - -.divide-y > :not([hidden]) ~ :not([hidden]) { - --tw-divide-y-reverse: 0; - border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse))); - border-bottom-width: calc(1px * var(--tw-divide-y-reverse)); -} - -.divide-gray-100 > :not([hidden]) ~ :not([hidden]) { - --tw-divide-opacity: 1; - border-color: rgb(243 244 246 / var(--tw-divide-opacity)); -} - -.divide-zinc-100 > :not([hidden]) ~ :not([hidden]) { - --tw-divide-opacity: 1; - border-color: rgb(244 244 245 / var(--tw-divide-opacity)); -} - -.overflow-auto { - overflow: auto; -} - -.overflow-hidden { - overflow: hidden; -} - -.overflow-scroll { - overflow: scroll; -} - -.overflow-y-auto { - overflow-y: auto; -} - -.whitespace-nowrap { - white-space: nowrap; -} - -.rounded { - border-radius: 0.25rem; -} - -.rounded-2xl { - border-radius: 1rem; -} - -.rounded-lg { - border-radius: 0.5rem; -} - -.rounded-md { - border-radius: 0.375rem; -} - -.rounded-l-md { - border-top-left-radius: 0.375rem; - border-bottom-left-radius: 0.375rem; -} - -.rounded-r-md { - border-top-right-radius: 0.375rem; - border-bottom-right-radius: 0.375rem; -} - -.rounded-t { - border-top-left-radius: 0.25rem; - border-top-right-radius: 0.25rem; -} - -.rounded-t-lg { - border-top-left-radius: 0.5rem; - border-top-right-radius: 0.5rem; -} - -.border { - border-width: 1px; -} - -.border-b-2 { - border-bottom-width: 2px; -} - -.border-t { - border-top-width: 1px; -} - -.border-gray-200 { - --tw-border-opacity: 1; - border-color: rgb(229 231 235 / var(--tw-border-opacity)); -} - -.border-gray-300 { - --tw-border-opacity: 1; - border-color: rgb(209 213 219 / var(--tw-border-opacity)); -} - -.border-gray-600 { - --tw-border-opacity: 1; - border-color: rgb(75 85 99 / var(--tw-border-opacity)); -} - -.border-rose-400 { - --tw-border-opacity: 1; - border-color: rgb(251 113 133 / var(--tw-border-opacity)); -} - -.border-transparent { - border-color: transparent; -} - -.border-zinc-200 { - --tw-border-opacity: 1; - border-color: rgb(228 228 231 / var(--tw-border-opacity)); -} - -.border-zinc-300 { - --tw-border-opacity: 1; - border-color: rgb(212 212 216 / var(--tw-border-opacity)); -} - -.bg-emerald-50 { - --tw-bg-opacity: 1; - background-color: rgb(236 253 245 / var(--tw-bg-opacity)); -} - -.bg-gray-200 { - --tw-bg-opacity: 1; - background-color: rgb(229 231 235 / var(--tw-bg-opacity)); -} - -.bg-gray-300 { - --tw-bg-opacity: 1; - background-color: rgb(209 213 219 / var(--tw-bg-opacity)); -} - -.bg-gray-600 { - --tw-bg-opacity: 1; - background-color: rgb(75 85 99 / var(--tw-bg-opacity)); -} - -.bg-gray-700 { - --tw-bg-opacity: 1; - background-color: rgb(55 65 81 / var(--tw-bg-opacity)); -} - -.bg-gray-800 { - --tw-bg-opacity: 1; - background-color: rgb(31 41 55 / var(--tw-bg-opacity)); -} - -.bg-indigo-600 { - --tw-bg-opacity: 1; - background-color: rgb(79 70 229 / var(--tw-bg-opacity)); -} - -.bg-rose-50 { - --tw-bg-opacity: 1; - background-color: rgb(255 241 242 / var(--tw-bg-opacity)); -} - -.bg-white { - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity)); -} - -.bg-zinc-50\/90 { - background-color: rgb(250 250 250 / 0.9); -} - -.bg-zinc-900 { - --tw-bg-opacity: 1; - background-color: rgb(24 24 27 / var(--tw-bg-opacity)); -} - -.fill-cyan-900 { - fill: #164e63; -} - -.fill-rose-900 { - fill: #881337; -} - -.p-0 { - padding: 0px; -} - -.p-14 { - padding: 3.5rem; -} - -.p-2 { - padding: 0.5rem; -} - -.p-3 { - padding: 0.75rem; -} - -.p-4 { - padding: 1rem; -} - -.px-2 { - padding-left: 0.5rem; - padding-right: 0.5rem; -} - -.px-3 { - padding-left: 0.75rem; - padding-right: 0.75rem; -} - -.px-4 { - padding-left: 1rem; - padding-right: 1rem; -} - -.py-1 { - padding-top: 0.25rem; - padding-bottom: 0.25rem; -} - -.py-2 { - padding-top: 0.5rem; - padding-bottom: 0.5rem; -} - -.py-3 { - padding-top: 0.75rem; - padding-bottom: 0.75rem; -} - -.py-4 { - padding-top: 1rem; - padding-bottom: 1rem; -} - -.py-5 { - padding-top: 1.25rem; - padding-bottom: 1.25rem; -} - -.py-8 { - padding-top: 2rem; - padding-bottom: 2rem; -} - -.pb-20 { - padding-bottom: 5rem; -} - -.pb-3 { - padding-bottom: 0.75rem; -} - -.pb-4 { - padding-bottom: 1rem; -} - -.pl-2 { - padding-left: 0.5rem; -} - -.pl-4 { - padding-left: 1rem; -} - -.pr-2 { - padding-right: 0.5rem; -} - -.pr-4 { - padding-right: 1rem; -} - -.pr-6 { - padding-right: 1.5rem; -} - -.pt-2 { - padding-top: 0.5rem; -} - -.pt-4 { - padding-top: 1rem; -} - -.text-left { - text-align: left; -} - -.text-right { - text-align: right; -} - -.text-3xl { - font-size: 1.875rem; - line-height: 2.25rem; -} - -.text-base { - font-size: 1rem; - line-height: 1.5rem; -} - -.text-lg { - font-size: 1.125rem; - line-height: 1.75rem; -} - -.text-sm { - font-size: 0.875rem; - line-height: 1.25rem; -} - -.text-xs { - font-size: 0.75rem; - line-height: 1rem; -} - -.font-medium { - font-weight: 500; -} - -.font-normal { - font-weight: 400; -} - -.font-semibold { - font-weight: 600; -} - -.capitalize { - text-transform: capitalize; -} - -.italic { - font-style: italic; -} - -.leading-5 { - line-height: 1.25rem; -} - -.leading-6 { - line-height: 1.5rem; -} - -.leading-8 { - line-height: 2rem; -} - -.text-black { - --tw-text-opacity: 1; - color: rgb(0 0 0 / var(--tw-text-opacity)); -} - -.text-emerald-800 { - --tw-text-opacity: 1; - color: rgb(6 95 70 / var(--tw-text-opacity)); -} - -.text-gray-300 { - --tw-text-opacity: 1; - color: rgb(209 213 219 / var(--tw-text-opacity)); -} - -.text-gray-400 { - --tw-text-opacity: 1; - color: rgb(156 163 175 / var(--tw-text-opacity)); -} - -.text-gray-500 { - --tw-text-opacity: 1; - color: rgb(107 114 128 / var(--tw-text-opacity)); -} - -.text-gray-600 { - --tw-text-opacity: 1; - color: rgb(75 85 99 / var(--tw-text-opacity)); -} - -.text-gray-700 { - --tw-text-opacity: 1; - color: rgb(55 65 81 / var(--tw-text-opacity)); -} - -.text-gray-900 { - --tw-text-opacity: 1; - color: rgb(17 24 39 / var(--tw-text-opacity)); -} - -.text-red-500 { - --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); -} - -.text-rose-600 { - --tw-text-opacity: 1; - color: rgb(225 29 72 / var(--tw-text-opacity)); -} - -.text-rose-900 { - --tw-text-opacity: 1; - color: rgb(136 19 55 / var(--tw-text-opacity)); -} - -.text-white { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); -} - -.text-zinc-500 { - --tw-text-opacity: 1; - color: rgb(113 113 122 / var(--tw-text-opacity)); -} - -.text-zinc-600 { - --tw-text-opacity: 1; - color: rgb(82 82 91 / var(--tw-text-opacity)); -} - -.text-zinc-700 { - --tw-text-opacity: 1; - color: rgb(63 63 70 / var(--tw-text-opacity)); -} - -.text-zinc-800 { - --tw-text-opacity: 1; - color: rgb(39 39 42 / var(--tw-text-opacity)); -} - -.text-zinc-900 { - --tw-text-opacity: 1; - color: rgb(24 24 27 / var(--tw-text-opacity)); -} - -.opacity-0 { - opacity: 0; -} - -.opacity-100 { - opacity: 1; -} - -.opacity-20 { - opacity: 0.2; -} - -.opacity-40 { - opacity: 0.4; -} - -.shadow-lg { - --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.shadow-md { - --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.shadow-sm { - --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); - --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.shadow-zinc-700\/10 { - --tw-shadow-color: rgb(63 63 70 / 0.1); - --tw-shadow: var(--tw-shadow-colored); -} - -.outline { - outline-style: solid; -} - -.ring-1 { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); -} - -.ring-black { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity)); -} - -.ring-emerald-500 { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(16 185 129 / var(--tw-ring-opacity)); -} - -.ring-rose-500 { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(244 63 94 / var(--tw-ring-opacity)); -} - -.ring-zinc-700\/10 { - --tw-ring-color: rgb(63 63 70 / 0.1); -} - -.ring-opacity-5 { - --tw-ring-opacity: 0.05; -} - -.filter { - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); -} - -.transition { - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - -.transition-all { - transition-property: all; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - -.transition-opacity { - transition-property: opacity; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - -.duration-150 { - transition-duration: 150ms; -} - -.duration-200 { - transition-duration: 200ms; -} - -.duration-300 { - transition-duration: 300ms; -} - -.ease-in { - transition-timing-function: cubic-bezier(0.4, 0, 1, 1); -} - -.ease-out { - transition-timing-function: cubic-bezier(0, 0, 0.2, 1); -} - -.hover\:cursor-pointer:hover { - cursor: pointer; -} - -.hover\:bg-gray-100:hover { - --tw-bg-opacity: 1; - background-color: rgb(243 244 246 / var(--tw-bg-opacity)); -} - -.hover\:bg-gray-200:hover { - --tw-bg-opacity: 1; - background-color: rgb(229 231 235 / var(--tw-bg-opacity)); -} - -.hover\:bg-gray-300:hover { - --tw-bg-opacity: 1; - background-color: rgb(209 213 219 / var(--tw-bg-opacity)); -} - -.hover\:bg-gray-400:hover { - --tw-bg-opacity: 1; - background-color: rgb(156 163 175 / var(--tw-bg-opacity)); -} - -.hover\:bg-gray-50:hover { - --tw-bg-opacity: 1; - background-color: rgb(249 250 251 / var(--tw-bg-opacity)); -} - -.hover\:bg-gray-700:hover { - --tw-bg-opacity: 1; - background-color: rgb(55 65 81 / var(--tw-bg-opacity)); -} - -.hover\:bg-gray-900:hover { - --tw-bg-opacity: 1; - background-color: rgb(17 24 39 / var(--tw-bg-opacity)); -} - -.hover\:bg-indigo-700:hover { - --tw-bg-opacity: 1; - background-color: rgb(67 56 202 / var(--tw-bg-opacity)); -} - -.hover\:bg-zinc-50:hover { - --tw-bg-opacity: 1; - background-color: rgb(250 250 250 / var(--tw-bg-opacity)); -} - -.hover\:bg-zinc-700:hover { - --tw-bg-opacity: 1; - background-color: rgb(63 63 70 / var(--tw-bg-opacity)); -} - -.hover\:text-blue-400:hover { - --tw-text-opacity: 1; - color: rgb(96 165 250 / var(--tw-text-opacity)); -} - -.hover\:text-gray-500:hover { - --tw-text-opacity: 1; - color: rgb(107 114 128 / var(--tw-text-opacity)); -} - -.hover\:text-gray-900:hover { - --tw-text-opacity: 1; - color: rgb(17 24 39 / var(--tw-text-opacity)); -} - -.hover\:text-white:hover { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); -} - -.hover\:text-zinc-700:hover { - --tw-text-opacity: 1; - color: rgb(63 63 70 / var(--tw-text-opacity)); -} - -.hover\:underline:hover { - text-decoration-line: underline; -} - -.hover\:opacity-40:hover { - opacity: 0.4; -} - -.focus\:border-indigo-500:focus { - --tw-border-opacity: 1; - border-color: rgb(99 102 241 / var(--tw-border-opacity)); -} - -.focus\:border-rose-400:focus { - --tw-border-opacity: 1; - border-color: rgb(251 113 133 / var(--tw-border-opacity)); -} - -.focus\:border-zinc-400:focus { - --tw-border-opacity: 1; - border-color: rgb(161 161 170 / var(--tw-border-opacity)); -} - -.focus\:bg-gray-700:focus { - --tw-bg-opacity: 1; - background-color: rgb(55 65 81 / var(--tw-bg-opacity)); -} - -.focus\:text-white:focus { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); -} - -.focus\:outline-none:focus { - outline: 2px solid transparent; - outline-offset: 2px; -} - -.focus\:ring-0:focus { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); -} - -.focus\:ring-2:focus { - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); -} - -.focus\:ring-indigo-500:focus { - --tw-ring-opacity: 1; - --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity)); -} - -.focus\:ring-offset-2:focus { - --tw-ring-offset-width: 2px; -} - -.focus\:ring-offset-gray-100:focus { - --tw-ring-offset-color: #f3f4f6; -} - -.active\:text-white\/80:active { - color: rgb(255 255 255 / 0.8); -} - -.group:hover .group-hover\:bg-zinc-50 { - --tw-bg-opacity: 1; - background-color: rgb(250 250 250 / var(--tw-bg-opacity)); -} - -.group:hover .group-hover\:opacity-70 { - opacity: 0.7; -} - -.phx-no-feedback.phx-no-feedback\:hidden { - display: none; -} - -.phx-no-feedback.phx-no-feedback\:border-zinc-300 { - --tw-border-opacity: 1; - border-color: rgb(212 212 216 / var(--tw-border-opacity)); -} - -.phx-no-feedback.phx-no-feedback\:focus\:border-zinc-400:focus { - --tw-border-opacity: 1; - border-color: rgb(161 161 170 / var(--tw-border-opacity)); -} - -.phx-no-feedback .phx-no-feedback\:hidden { - display: none; -} - -.phx-no-feedback .phx-no-feedback\:border-zinc-300 { - --tw-border-opacity: 1; - border-color: rgb(212 212 216 / var(--tw-border-opacity)); -} - -.phx-no-feedback .phx-no-feedback\:focus\:border-zinc-400:focus { - --tw-border-opacity: 1; - border-color: rgb(161 161 170 / var(--tw-border-opacity)); -} - -.phx-submit-loading.phx-submit-loading\:opacity-75 { - opacity: 0.75; -} - -.phx-submit-loading .phx-submit-loading\:opacity-75 { - opacity: 0.75; -} - -@media (min-width: 640px) { - .sm\:col-span-2 { - grid-column: span 2 / span 2; - } - - .sm\:col-span-3 { - grid-column: span 3 / span 3; - } - - .sm\:col-span-full { - grid-column: 1 / -1; - } - - .sm\:mt-0 { - margin-top: 0px; - } - - .sm\:block { - display: block; - } - - .sm\:flex { - display: flex; - } - - .sm\:hidden { - display: none; - } - - .sm\:w-96 { - width: 24rem; - } - - .sm\:w-full { - width: 100%; - } - - .sm\:flex-1 { - flex: 1 1 0%; - } - - .sm\:translate-y-0 { - --tw-translate-y: 0px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - - .sm\:scale-100 { - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - - .sm\:scale-95 { - --tw-scale-x: .95; - --tw-scale-y: .95; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - - .sm\:items-center { - align-items: center; - } - - .sm\:justify-between { - justify-content: space-between; - } - - .sm\:gap-8 { - gap: 2rem; - } - - .sm\:overflow-visible { - overflow: visible; - } - - .sm\:rounded-md { - border-radius: 0.375rem; - } - - .sm\:rounded-l-xl { - border-top-left-radius: 0.75rem; - border-bottom-left-radius: 0.75rem; - } - - .sm\:rounded-r-xl { - border-top-right-radius: 0.75rem; - border-bottom-right-radius: 0.75rem; - } - - .sm\:p-6 { - padding: 1.5rem; - } - - .sm\:px-0 { - padding-left: 0px; - padding-right: 0px; - } - - .sm\:px-3 { - padding-left: 0.75rem; - padding-right: 0.75rem; - } - - .sm\:px-6 { - padding-left: 1.5rem; - padding-right: 1.5rem; - } - - .sm\:text-sm { - font-size: 0.875rem; - line-height: 1.25rem; - } - - .sm\:leading-6 { - line-height: 1.5rem; - } -} - -@media (min-width: 768px) { - .md\:col-span-2 { - grid-column: span 2 / span 2; - } - - .md\:mx-16 { - margin-left: 4rem; - margin-right: 4rem; - } - - .md\:mx-4 { - margin-left: 1rem; - margin-right: 1rem; - } - - .md\:mt-0 { - margin-top: 0px; - } - - .md\:mt-10 { - margin-top: 2.5rem; - } - - .md\:block { - display: block; - } - - .md\:grid { - display: grid; - } - - .md\:hidden { - display: none; - } - - .md\:grid-cols-3 { - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - - .md\:gap-6 { - gap: 1.5rem; - } - - .md\:pt-10 { - padding-top: 2.5rem; - } -} - -@media (min-width: 1024px) { - .lg\:px-8 { - padding-left: 2rem; - padding-right: 2rem; - } - - .lg\:py-8 { - padding-top: 2rem; - padding-bottom: 2rem; - } -} - +/*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],select,textarea{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000;outline-offset:2px}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple]{background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000;outline-offset:2px}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=checkbox]:indeterminate,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.hero-arrow-left-solid{--hero-arrow-left-solid:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-arrow-left-solid);mask:var(--hero-arrow-left-solid);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-arrow-left-solid,.hero-arrow-path{background-color:currentColor;display:inline-block;height:1.25rem;vertical-align:middle;width:1.25rem}.hero-arrow-path{--hero-arrow-path:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-arrow-path);mask:var(--hero-arrow-path);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-check{--hero-check:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-check);mask:var(--hero-check);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-check,.hero-exclamation-circle-mini{background-color:currentColor;display:inline-block;height:1.25rem;vertical-align:middle;width:1.25rem}.hero-exclamation-circle-mini{--hero-exclamation-circle-mini:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-exclamation-circle-mini);mask:var(--hero-exclamation-circle-mini);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-eye-slash-solid{--hero-eye-slash-solid:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-eye-slash-solid);mask:var(--hero-eye-slash-solid);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-eye-slash-solid,.hero-eye-solid{background-color:currentColor;display:inline-block;height:1.25rem;vertical-align:middle;width:1.25rem}.hero-eye-solid{--hero-eye-solid:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-eye-solid);mask:var(--hero-eye-solid);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-information-circle-mini{--hero-information-circle-mini:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-information-circle-mini);mask:var(--hero-information-circle-mini);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-information-circle-mini,.hero-information-circle-solid{background-color:currentColor;display:inline-block;height:1.25rem;vertical-align:middle;width:1.25rem}.hero-information-circle-solid{--hero-information-circle-solid:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-information-circle-solid);mask:var(--hero-information-circle-solid);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-key{--hero-key:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-key);mask:var(--hero-key);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-key,.hero-key-solid{background-color:currentColor;display:inline-block;height:1.25rem;vertical-align:middle;width:1.25rem}.hero-key-solid{--hero-key-solid:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-key-solid);mask:var(--hero-key-solid);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-magnifying-glass-circle{--hero-magnifying-glass-circle:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-magnifying-glass-circle);mask:var(--hero-magnifying-glass-circle);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-magnifying-glass-circle,.hero-minus{background-color:currentColor;display:inline-block;height:1.25rem;vertical-align:middle;width:1.25rem}.hero-minus{--hero-minus:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-minus);mask:var(--hero-minus);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-pencil-solid{--hero-pencil-solid:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-pencil-solid);mask:var(--hero-pencil-solid);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-pencil-solid,.hero-plus{background-color:currentColor;display:inline-block;height:1.25rem;vertical-align:middle;width:1.25rem}.hero-plus{--hero-plus:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-plus);mask:var(--hero-plus);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-x-circle-solid{--hero-x-circle-solid:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-x-circle-solid);mask:var(--hero-x-circle-solid);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-x-circle-solid,.hero-x-mark{background-color:currentColor;display:inline-block;height:1.25rem;vertical-align:middle;width:1.25rem}.hero-x-mark{--hero-x-mark:url('data:image/svg+xml;utf8,');-webkit-mask:var(--hero-x-mark);mask:var(--hero-x-mark);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.hero-x-mark-solid{--hero-x-mark-solid:url('data:image/svg+xml;utf8,');background-color:currentColor;display:inline-block;height:1.25rem;-webkit-mask:var(--hero-x-mark-solid);mask:var(--hero-x-mark-solid);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:middle;width:1.25rem}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-inset-y-px{bottom:-1px;top:-1px}.-left-4{left:-1rem}.-right-4{right:-1rem}.left-0{left:0}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-5{right:1.25rem}.top-1{top:.25rem}.top-2{top:.5rem}.top-6{top:1.5rem}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-6{grid-column:span 6/span 6}.col-span-full{grid-column:1/-1}.float-right{float:right}.-m-3{margin:-.75rem}.m-2{margin:.5rem}.m-5{margin:1.25rem}.-my-4{margin-bottom:-1rem;margin-top:-1rem}.mx-12{margin-left:3rem;margin-right:3rem}.mx-24{margin-left:6rem;margin-right:6rem}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-bottom:1rem;margin-top:1rem}.-mr-1{margin-right:-.25rem}.-mr-2{margin-right:-.5rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-10{margin-left:2.5rem}.ml-12{margin-left:3rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-1{margin-right:.25rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-11{margin-top:2.75rem}.mt-14{margin-top:3.5rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-16{height:4rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-full{height:100%}.h-max{height:-moz-max-content;height:max-content}.h-screen{height:100vh}.min-h-\[6rem\]{min-height:6rem}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-1\/4{width:25%}.w-14{width:3.5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-5\/6{width:83.333333%}.w-56{width:14rem}.w-6{width:1.5rem}.w-80{width:20rem}.w-\[40rem\]{width:40rem}.w-full{width:100%}.max-w-3xl{max-width:48rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.table-auto{table-layout:auto}.origin-top-right{transform-origin:top right}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.translate-y-4{--tw-translate-y:1rem}.transform,.translate-y-4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.-space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(-1px*(1 - var(--tw-space-x-reverse)));margin-right:calc(-1px*var(--tw-space-x-reverse))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(2rem*var(--tw-space-y-reverse));margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(243 244 246/var(--tw-divide-opacity))}.divide-zinc-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(244 244 245/var(--tw-divide-opacity))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-y-auto{overflow-y:auto}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-b-2{border-bottom-width:2px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.border-rose-400{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity))}.border-transparent{border-color:#0000}.border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity))}.border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity))}.bg-emerald-50{--tw-bg-opacity:1;background-color:rgb(236 253 245/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.bg-rose-50{--tw-bg-opacity:1;background-color:rgb(255 241 242/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-zinc-50\/90{background-color:#fafafae6}.bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity))}.fill-cyan-900{fill:#164e63}.fill-rose-900{fill:#881337}.p-0{padding:0}.p-14{padding:3.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-right{text-align:right}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-8{line-height:2rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-emerald-800{--tw-text-opacity:1;color:rgb(6 95 70/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-rose-600{--tw-text-opacity:1;color:rgb(225 29 72/var(--tw-text-opacity))}.text-rose-900{--tw-text-opacity:1;color:rgb(136 19 55/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity))}.text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity))}.text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-zinc-700\/10{--tw-shadow-color:#3f3f461a;--tw-shadow:var(--tw-shadow-colored)}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-emerald-500{--tw-ring-opacity:1;--tw-ring-color:rgb(16 185 129/var(--tw-ring-opacity))}.ring-rose-500{--tw-ring-opacity:1;--tw-ring-color:rgb(244 63 94/var(--tw-ring-opacity))}.ring-zinc-700\/10{--tw-ring-color:#3f3f461a}.ring-opacity-5{--tw-ring-opacity:0.05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-opacity{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.hover\:bg-gray-400:hover{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity))}.hover\:bg-zinc-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.hover\:bg-zinc-700:hover{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity))}.hover\:text-blue-400:hover{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:text-zinc-700:hover{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-40:hover{opacity:.4}.focus\:border-indigo-500:focus{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.focus\:border-rose-400:focus{--tw-border-opacity:1;border-color:rgb(251 113 133/var(--tw-border-opacity))}.focus\:border-zinc-400:focus{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity))}.focus\:bg-gray-700:focus{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.focus\:text-white:focus{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-0:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-indigo-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\:ring-offset-gray-100:focus{--tw-ring-offset-color:#f3f4f6}.active\:text-white\/80:active{color:#fffc}.group:hover .group-hover\:bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.group:hover .group-hover\:opacity-70{opacity:.7}.phx-no-feedback.phx-no-feedback\:hidden{display:none}.phx-no-feedback.phx-no-feedback\:border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity))}.phx-no-feedback.phx-no-feedback\:focus\:border-zinc-400:focus{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity))}.phx-no-feedback .phx-no-feedback\:hidden{display:none}.phx-no-feedback .phx-no-feedback\:border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity))}.phx-no-feedback .phx-no-feedback\:focus\:border-zinc-400:focus{--tw-border-opacity:1;border-color:rgb(161 161 170/var(--tw-border-opacity))}.phx-submit-loading .phx-submit-loading\:opacity-75,.phx-submit-loading.phx-submit-loading\:opacity-75{opacity:.75}@media (min-width:640px){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-span-3{grid-column:span 3/span 3}.sm\:col-span-full{grid-column:1/-1}.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-96{width:24rem}.sm\:w-full{width:100%}.sm\:flex-1{flex:1 1 0%}.sm\:translate-y-0{--tw-translate-y:0px}.sm\:scale-100,.sm\:translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-100{--tw-scale-x:1;--tw-scale-y:1}.sm\:scale-95{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-8{gap:2rem}.sm\:overflow-visible{overflow:visible}.sm\:rounded-md{border-radius:.375rem}.sm\:rounded-l-xl{border-bottom-left-radius:.75rem;border-top-left-radius:.75rem}.sm\:rounded-r-xl{border-bottom-right-radius:.75rem;border-top-right-radius:.75rem}.sm\:p-6{padding:1.5rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:leading-6{line-height:1.5rem}}@media (min-width:768px){.md\:col-span-2{grid-column:span 2/span 2}.md\:mx-16{margin-left:4rem;margin-right:4rem}.md\:mx-4{margin-left:1rem;margin-right:1rem}.md\:mt-0{margin-top:0}.md\:mt-10{margin-top:2.5rem}.md\:block{display:block}.md\:grid{display:grid}.md\:hidden{display:none}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:gap-6{gap:1.5rem}.md\:pt-10{padding-top:2.5rem}}@media (min-width:1024px){.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-8{padding-bottom:2rem;padding-top:2rem}} \ No newline at end of file diff --git a/priv/static/assets/app.js b/priv/static/assets/app.js index 729cdfe..3cb9fa2 100644 --- a/priv/static/assets/app.js +++ b/priv/static/assets/app.js @@ -1,6714 +1,19 @@ -(() => { - var __create = Object.create; - var __defProp = Object.defineProperty; - var __defProps = Object.defineProperties; - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; - var __getOwnPropDescs = Object.getOwnPropertyDescriptors; - var __getOwnPropNames = Object.getOwnPropertyNames; - var __getOwnPropSymbols = Object.getOwnPropertySymbols; - var __getProtoOf = Object.getPrototypeOf; - var __hasOwnProp = Object.prototype.hasOwnProperty; - var __propIsEnum = Object.prototype.propertyIsEnumerable; - var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; - var __spreadValues = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(b)) { - if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - } - return a; - }; - var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); - var __objRest = (source, exclude) => { - var target = {}; - for (var prop in source) - if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) - target[prop] = source[prop]; - if (source != null && __getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(source)) { - if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) - target[prop] = source[prop]; - } - return target; - }; - var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; - }; - var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; - }; - var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod - )); +(()=>{var bi=Object.create;var it=Object.defineProperty,yi=Object.defineProperties,wi=Object.getOwnPropertyDescriptor,Ai=Object.getOwnPropertyDescriptors,ki=Object.getOwnPropertyNames,Le=Object.getOwnPropertySymbols,Si=Object.getPrototypeOf,st=Object.prototype.hasOwnProperty,Tt=Object.prototype.propertyIsEnumerable;var Ct=(e,t,i)=>t in e?it(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,U=(e,t)=>{for(var i in t||(t={}))st.call(t,i)&&Ct(e,i,t[i]);if(Le)for(var i of Le(t))Tt.call(t,i)&&Ct(e,i,t[i]);return e},_t=(e,t)=>yi(e,Ai(t));var Rt=(e,t)=>{var i={};for(var s in e)st.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(e!=null&&Le)for(var s of Le(e))t.indexOf(s)<0&&Tt.call(e,s)&&(i[s]=e[s]);return i};var Ei=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ci=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ki(t))!st.call(e,n)&&n!==i&&it(e,n,{get:()=>t[n],enumerable:!(s=wi(t,n))||s.enumerable});return e};var Ti=(e,t,i)=>(i=e!=null?bi(Si(e)):{},Ci(t||!e||!e.__esModule?it(i,"default",{value:e,enumerable:!0}):i,e));var Lt=Ei((It,Fe)=>{(function(e,t){"use strict";(function(){for(var f=0,m=["ms","moz","webkit","o"],v=0;vp.show(),f)}else n=!0,o!==null&&e.cancelAnimationFrame(o),i||g(),i.style.opacity=1,i.style.display="block",p.progress(0),h.autoRun&&function m(){r=e.requestAnimationFrame(m),p.progress("+"+.05*Math.pow(1-Math.sqrt(s),2))}()},progress:function(f){return typeof f=="undefined"||(typeof f=="string"&&(f=(f.indexOf("+")>=0||f.indexOf("-")>=0?s:0)+parseFloat(f)),s=f>1?1:f,c()),s},hide:function(){clearTimeout(a),a=null,n&&(n=!1,r!=null&&(e.cancelAnimationFrame(r),r=null),function f(){if(p.progress("+.1")>=1&&(i.style.opacity-=.05,i.style.opacity<=.05)){i.style.display="none",o=null;return}o=e.requestAnimationFrame(f)}())}};typeof Fe=="object"&&typeof Fe.exports=="object"?Fe.exports=p:typeof define=="function"&&define.amd?define(function(){return p}):this.topbar=p}).call(It,window,document)});(function(){var e=t();function t(){if(typeof window.CustomEvent=="function")return window.CustomEvent;function n(r,o){o=o||{bubbles:!1,cancelable:!1,detail:void 0};var a=document.createEvent("CustomEvent");return a.initCustomEvent(r,o.bubbles,o.cancelable,o.detail),a}return n.prototype=window.Event.prototype,n}function i(n,r){var o=document.createElement("input");return o.type="hidden",o.name=n,o.value=r,o}function s(n,r){var o=n.getAttribute("data-to"),a=i("_method",n.getAttribute("data-method")),l=i("_csrf_token",n.getAttribute("data-csrf")),h=document.createElement("form"),c=document.createElement("input"),g=n.getAttribute("target");h.method=n.getAttribute("data-method")==="get"?"get":"post",h.action=o,h.style.display="none",g?h.target=g:r&&(h.target="_blank"),h.appendChild(l),h.appendChild(a),document.body.appendChild(h),c.type="submit",h.appendChild(c),c.click()}window.addEventListener("click",function(n){var r=n.target;if(!n.defaultPrevented)for(;r&&r.getAttribute;){var o=new e("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!r.dispatchEvent(o))return n.preventDefault(),n.stopImmediatePropagation(),!1;if(r.getAttribute("data-method")&&r.getAttribute("data-to"))return s(r,n.metaKey||n.shiftKey),n.preventDefault(),!1;r=r.parentNode}},!1),window.addEventListener("phoenix.link.click",function(n){var r=n.target.getAttribute("data-confirm");r&&!window.confirm(r)&&n.preventDefault()},!1)})();var we=e=>typeof e=="function"?e:function(){return e},_i=typeof self!="undefined"?self:null,ye=typeof window!="undefined"?window:null,le=_i||ye||le,Ri="2.0.0",j={connecting:0,open:1,closing:2,closed:3},Pi=1e4,xi=1e3,F={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},W={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},nt={longpoll:"longpoll",websocket:"websocket"},Ii={complete:4},Oe=class{constructor(e,t,i,s){this.channel=e,this.event=t,this.payload=i||function(){return{}},this.receivedResp=null,this.timeout=s,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:e,response:t,_ref:i}){this.recHooks.filter(s=>s.status===e).forEach(s=>s.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},Pt=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Li=class{constructor(e,t,i){this.state=F.closed,this.topic=e,this.params=we(t||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Oe(this,W.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Pt(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=F.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=F.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=F.closed,this.socket.remove(this)}),this.onError(s=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,s),this.isJoining()&&this.joinPush.reset(),this.state=F.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new Oe(this,W.leave,we({}),this.timeout).send(),this.state=F.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(W.reply,(s,n)=>{this.trigger(this.replyEventName(n),s)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(e){this.on(W.close,e)}onError(e){return this.on(W.error,t=>e(t))}on(e,t){let i=this.bindingRef++;return this.bindings.push({event:e,ref:i,callback:t}),i}off(e,t){this.bindings=this.bindings.filter(i=>!(i.event===e&&(typeof t=="undefined"||t===i.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,i=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let s=new Oe(this,e,function(){return t},i);return this.canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=F.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(W.close,"leave")},i=new Oe(this,W.leave,we({}),e);return i.receive("ok",()=>t()).receive("timeout",()=>t()),i.send(),this.canPush()||i.trigger("ok",{}),i}onMessage(e,t,i){return t}isMember(e,t,i,s){return this.topic!==e?!1:s&&s!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:i,joinRef:s}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=F.joining,this.joinPush.resend(e))}trigger(e,t,i,s){let n=this.onMessage(e,t,i,s);if(t&&!n)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let r=this.bindings.filter(o=>o.event===e);for(let o=0;o{let a=this.parseJSON(e.responseText);o&&o(a)},r&&(e.ontimeout=r),e.onprogress=()=>{},e.send(s),e}static xhrRequest(e,t,i,s,n,r,o,a){return e.open(t,i,!0),e.timeout=r,e.setRequestHeader("Content-Type",s),e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(e.readyState===Ii.complete&&a){let l=this.parseJSON(e.responseText);a(l)}},o&&(e.ontimeout=o),e.send(n),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch(t){return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let i=[];for(var s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;let n=t?`${t}[${s}]`:s,r=e[s];typeof r=="object"?i.push(this.serialize(r,n)):i.push(encodeURIComponent(n)+"="+encodeURIComponent(r))}return i.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let i=e.match(/\?/)?"&":"?";return`${e}${i}${this.serialize(t)}`}},Oi=e=>{let t="",i=new Uint8Array(e),s=i.byteLength;for(let n=0;nthis.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+nt.websocket),"$1/"+nt.longpoll)}endpointURL(){return He.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,i){this.close(e,t,i),this.readyState=j.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===j.open||this.readyState===j.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:i,messages:s}=e;this.token=i}else t=0;switch(t){case 200:s.forEach(n=>{setTimeout(()=>this.onmessage({data:n}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=j.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${t}`)}})}send(e){typeof e!="string"&&(e=Oi(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",e.join(` +`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,i){for(let n of this.reqs)n.abort();this.readyState=j.closed;let s=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:i});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent!="undefined"?this.onclose(new CloseEvent("close",s)):this.onclose(s)}ajax(e,t,i,s,n){let r,o=()=>{this.reqs.delete(r),s()};r=He.request(e,this.endpointURL(),t,i,this.timeout,o,a=>{this.reqs.delete(r),this.isActive()&&n(a)}),this.reqs.add(r)}};var De={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let i=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(i))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[i,s,n,r,o]=JSON.parse(e);return t({join_ref:i,ref:s,topic:n,event:r,payload:o})}},binaryEncode(e){let{join_ref:t,ref:i,event:s,topic:n,payload:r}=e,o=this.META_LENGTH+t.length+i.length+n.length+s.length,a=new ArrayBuffer(this.HEADER_LENGTH+o),l=new DataView(a),h=0;l.setUint8(h++,this.KINDS.push),l.setUint8(h++,t.length),l.setUint8(h++,i.length),l.setUint8(h++,n.length),l.setUint8(h++,s.length),Array.from(t,g=>l.setUint8(h++,g.charCodeAt(0))),Array.from(i,g=>l.setUint8(h++,g.charCodeAt(0))),Array.from(n,g=>l.setUint8(h++,g.charCodeAt(0))),Array.from(s,g=>l.setUint8(h++,g.charCodeAt(0)));var c=new Uint8Array(a.byteLength+r.byteLength);return c.set(new Uint8Array(a),0),c.set(new Uint8Array(r),a.byteLength),c.buffer},binaryDecode(e){let t=new DataView(e),i=t.getUint8(0),s=new TextDecoder;switch(i){case this.KINDS.push:return this.decodePush(e,t,s);case this.KINDS.reply:return this.decodeReply(e,t,s);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,s)}},decodePush(e,t,i){let s=t.getUint8(1),n=t.getUint8(2),r=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=i.decode(e.slice(o,o+s));o=o+s;let l=i.decode(e.slice(o,o+n));o=o+n;let h=i.decode(e.slice(o,o+r));o=o+r;let c=e.slice(o,e.byteLength);return{join_ref:a,ref:null,topic:l,event:h,payload:c}},decodeReply(e,t,i){let s=t.getUint8(1),n=t.getUint8(2),r=t.getUint8(3),o=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=i.decode(e.slice(a,a+s));a=a+s;let h=i.decode(e.slice(a,a+n));a=a+n;let c=i.decode(e.slice(a,a+r));a=a+r;let g=i.decode(e.slice(a,a+o));a=a+o;let p=e.slice(a,e.byteLength),f={status:g,response:p};return{join_ref:l,ref:h,topic:c,event:W.reply,payload:f}},decodeBroadcast(e,t,i){let s=t.getUint8(1),n=t.getUint8(2),r=this.HEADER_LENGTH+2,o=i.decode(e.slice(r,r+s));r=r+s;let a=i.decode(e.slice(r,r+n));r=r+n;let l=e.slice(r,e.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},xt=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=t.timeout||Pi,this.transport=t.transport||le.WebSocket||be,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||le&&le.sessionStorage,this.establishedConnections=0,this.defaultEncoder=De.encode.bind(De),this.defaultDecoder=De.decode.bind(De),this.closeWasClean=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.transport!==be?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;ye&&ye.addEventListener&&(ye.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),i=this.connectClock)}),ye.addEventListener("pageshow",s=>{i===this.connectClock&&(i=null,this.connect())})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.rejoinAfterMs=s=>t.rejoinAfterMs?t.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>t.reconnectAfterMs?t.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(s,n,r)=>{console.log(`${s}: ${n}`,r)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=we(t.params||{}),this.endPoint=`${e}/${nt.websocket}`,this.vsn=t.vsn||Ri,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Pt(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return be}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=He.appendParams(He.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,i){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(e,t,i)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=we(e)),!this.conn&&(this.longPollFallbackMs&&this.transport!==be?this.connectWithFallback(be,this.longPollFallbackMs):this.transportConnect())}log(e,t,i){this.logger&&this.logger(e,t,i)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),i=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let s=this.onMessage(n=>{n.ref===t&&(this.off([s]),e(Date.now()-i))});return!0}transportConnect(){this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let i=!1,s=!0,n,r,o=a=>{this.log("transport",`falling back to ${e.name}...`,a),this.off([n,r]),s=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${e.name}`))return o("memorized");this.fallbackTimer=setTimeout(o,t),r=this.onError(a=>{this.log("transport","error",a),s&&!i&&(clearTimeout(this.fallbackTimer),o(a))}),this.onOpen(()=>{if(i=!0,!s)return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${e.name}`,"true"),this.log("transport",`established ${e.name} fallback`);clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(o,t),this.ping(a=>{this.log("transport","connected to primary after",a),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`${this.transport.name} connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,e])=>e())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),xi,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,i){if(!this.conn)return e&&e();this.waitForBufferDone(()=>{this.conn&&(t?this.conn.close(t,i||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t=1){if(t===5||!this.conn||!this.conn.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(e,t+1)},150*t)}waitForSocketClosed(e,t=1){if(t===5||!this.conn||this.conn.readyState===j.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(e,t+1)},150*t)}onConnClose(e){let t=e&&e.code;this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&t!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,i])=>i(e))}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,i=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,s])=>{s(e,t,i)}),(t===this.transport||i>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(W.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case j.connecting:return"connecting";case j.open:return"open";case j.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([i])=>e.indexOf(i)===-1)}channel(e,t={}){let i=new Li(e,t,this);return this.channels.push(i),i}push(e){if(this.hasLogger()){let{topic:t,event:i,payload:s,ref:n,join_ref:r}=e;this.log("push",`${t} ${i} (${r}, ${n})`,s)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:i,event:s,payload:n,ref:r,join_ref:o}=t;r&&r===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${n.status||""} ${i} ${s} ${r&&"("+r+")"||""}`,n);for(let a=0;ai.topic===e&&(i.isJoined()||i.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};var Qe=Ti(Lt());var ri="consecutive-reloads",Di=10,Hi=5e3,Fi=1e4,Ni=3e4,oi=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading","phx-hook-loading"],K="data-phx-component",rt="data-phx-link",Mi="track-static",$i="data-phx-link-state",N="data-phx-ref",te="data-phx-ref-src",ai="track-uploads",G="data-phx-upload-ref",yt="data-phx-preflighted-refs",Ui="data-phx-done-refs",Ot="drop-target",pt="data-phx-active-refs",Xe="phx:live-file:updated",li="data-phx-skip",hi="data-phx-id",Dt="data-phx-prune",Ht="page-loading",Ft="phx-connected",Ae="phx-loading",Ne="phx-no-feedback",Me="phx-error",Nt="phx-client-error",ot="phx-server-error",he="data-phx-parent-id",wt="data-phx-main",de="data-phx-root-id",mt="viewport-top",gt="viewport-bottom",ji="trigger-action",ze="feedback-for",Ke="feedback-group",vt="phx-has-focused",Bi=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],di=["checkbox","radio"],Ge="phx-has-submitted",Y="data-phx-session",ve=`[${Y}]`,Mt="data-phx-sticky",me="data-phx-static",at="data-phx-readonly",fe="data-phx-disabled",bt="disable-with",$e="data-phx-disable-with-restore",ke="hook",Ji="debounce",Vi="throttle",Ye="update",lt="stream",ht="data-phx-stream",qi="key",B="phxPrivate",$t="auto-recover",Ue="phx:live-socket:debug",dt="phx:live-socket:profiling",ct="phx:live-socket:latency-sim",Xi="progress",Ut="mounted",Wi=1,zi=200,Ki="phx-",Gi=3e4,Se="debounce-trigger",Ee="throttled",jt="debounce-prev-key",Yi={debounce:300,throttle:300},je="d",J="s",ut="r",L="c",Bt="e",Jt="r",Vt="t",Qi="p",qt="stream",Zi=class{constructor(e,t,i){this.liveSocket=i,this.entry=e,this.offset=0,this.chunkSize=t,this.chunkTimer=null,this.errored=!1,this.uploadChannel=i.channel(`lvu:${e.ref}`,{token:e.metadata()})}error(e){this.errored||(this.uploadChannel.leave(),this.errored=!0,clearTimeout(this.chunkTimer),this.entry.error(e))}upload(){this.uploadChannel.onError(e=>this.error(e)),this.uploadChannel.join().receive("ok",e=>this.readNextChunk()).receive("error",e=>this.error(e))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let e=new window.FileReader,t=this.entry.file.slice(this.offset,this.chunkSize+this.offset);e.onload=i=>{if(i.target.error===null)this.offset+=i.target.result.byteLength,this.pushChunk(i.target.result);else return M("Read error: "+i.target.error)},e.readAsArrayBuffer(t)}pushChunk(e){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",e).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:t})=>this.error(t))}},M=(e,t)=>console.error&&console.error(e,t),z=e=>{let t=typeof e;return t==="number"||t==="string"&&/^(0|[1-9]\d*)$/.test(e)};function es(){let e=new Set,t=document.querySelectorAll("*[id]");for(let i=0,s=t.length;i{e.liveSocket.isDebugEnabled()&&console.log(`${e.id} ${t}: ${i} - `,s)},Ce=e=>typeof e=="function"?e:function(){return e},We=e=>JSON.parse(JSON.stringify(e)),Pe=(e,t,i)=>{do{if(e.matches(`[${t}]`)&&!e.disabled)return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1&&!(i&&i.isSameNode(e)||e.matches(ve)));return null},pe=e=>e!==null&&typeof e=="object"&&!(e instanceof Array),is=(e,t)=>JSON.stringify(e)===JSON.stringify(t),Xt=e=>{for(let t in e)return!1;return!0},ie=(e,t)=>e&&t(e),ss=function(e,t,i,s){e.forEach(n=>{new Zi(n,i.config.chunk_size,s).upload()})},ci={canPushState(){return typeof history.pushState!="undefined"},dropLocal(e,t,i){return e.removeItem(this.localKey(t,i))},updateLocal(e,t,i,s,n){let r=this.getLocal(e,t,i),o=this.localKey(t,i),a=r===null?s:n(r);return e.setItem(o,JSON.stringify(a)),a},getLocal(e,t,i){return JSON.parse(e.getItem(this.localKey(t,i)))},updateCurrentState(e){this.canPushState()&&history.replaceState(e(history.state||{}),"",window.location.href)},pushState(e,t,i){if(this.canPushState()){if(i!==window.location.href){if(t.type=="redirect"&&t.scroll){let n=history.state||{};n.scroll=t.scroll,history.replaceState(n,"",window.location.href)}delete t.scroll,history[e+"State"](t,"",i||null);let s=this.getHashTargetEl(window.location.hash);s?s.scrollIntoView():t.type==="redirect"&&window.scroll(0,0)}}else this.redirect(i)},setCookie(e,t){document.cookie=`${e}=${t}`},getCookie(e){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${e}s*=s*([^;]*).*$)|^.*$`),"$1")},redirect(e,t){t&&ci.setCookie("__phoenix_flash__",t+"; max-age=60000; path=/"),window.location=e},localKey(e,t){return`${e}-${t}`},getHashTargetEl(e){let t=e.toString().substring(1);if(t!=="")return document.getElementById(t)||document.querySelector(`a[name="${t}"]`)}},V=ci,ns={focusMain(){let e=document.querySelector("main h1, main, h1");if(e){let t=e.tabIndex;e.tabIndex=-1,e.focus(),e.tabIndex=t}},anyOf(e,t){return t.find(i=>e instanceof i)},isFocusable(e,t){return e instanceof HTMLAnchorElement&&e.rel!=="ignore"||e instanceof HTMLAreaElement&&e.href!==void 0||!e.disabled&&this.anyOf(e,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||e instanceof HTMLIFrameElement||e.tabIndex>0||!t&&e.getAttribute("tabindex")!==null&&e.getAttribute("aria-hidden")!=="true"},attemptFocus(e,t){if(this.isFocusable(e,t))try{e.focus()}catch(i){}return!!document.activeElement&&document.activeElement.isSameNode(e)},focusFirstInteractive(e){let t=e.firstElementChild;for(;t;){if(this.attemptFocus(t,!0)||this.focusFirstInteractive(t,!0))return!0;t=t.nextElementSibling}},focusFirst(e){let t=e.firstElementChild;for(;t;){if(this.attemptFocus(t)||this.focusFirst(t))return!0;t=t.nextElementSibling}},focusLast(e){let t=e.lastElementChild;for(;t;){if(this.attemptFocus(t)||this.focusLast(t))return!0;t=t.previousElementSibling}}},ge=ns,Wt=[],zt=200,rs={exec(e,t,i,s,n){let[r,o]=n||[null,{callback:n&&n.callback}];(t.charAt(0)==="["?JSON.parse(t):[[r,o]]).forEach(([l,h])=>{l===r&&o.data&&(h.data=Object.assign(h.data||{},o.data),h.callback=h.callback||o.callback),this.filterToEls(s,h).forEach(c=>{this[`exec_${l}`](e,t,i,s,c,h)})})},isVisible(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length>0)},isInViewport(e){let t=e.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth;return t.right>0&&t.bottom>0&&t.left{let h=l.getAttribute(r);if(!h)throw new Error(`expected ${r} to contain JS command on "${o}"`);i.liveSocket.execJS(l,h,e)})},exec_dispatch(e,t,i,s,n,{to:r,event:o,detail:a,bubbles:l}){a=a||{},a.dispatcher=s,d.dispatchEvent(n,o,{detail:a,bubbles:l})},exec_push(e,t,i,s,n,r){let{event:o,data:a,target:l,page_loading:h,loading:c,value:g,dispatcher:p,callback:f}=r,m={loading:c,value:g,target:l,page_loading:!!h},v=e==="change"&&p?p:s,C=l||v.getAttribute(i.binding("target"))||v;i.withinTargets(C,(P,R)=>{if(P.isConnected())if(e==="change"){let{newCid:x,_target:I}=r;I=I||(d.isFormInput(s)?s.name:void 0),I&&(m._target=I),P.pushInput(s,R,x,o||t,m,f)}else if(e==="submit"){let{submitter:x}=r;P.submitForm(s,R,o||t,x,m,f)}else P.pushEvent(e,s,R,o||t,a,m,f)})},exec_navigate(e,t,i,s,n,{href:r,replace:o}){i.liveSocket.historyRedirect(r,o?"replace":"push")},exec_patch(e,t,i,s,n,{href:r,replace:o}){i.liveSocket.pushHistoryPatch(r,o?"replace":"push",s)},exec_focus(e,t,i,s,n){window.requestAnimationFrame(()=>ge.attemptFocus(n))},exec_focus_first(e,t,i,s,n){window.requestAnimationFrame(()=>ge.focusFirstInteractive(n)||ge.focusFirst(n))},exec_push_focus(e,t,i,s,n){window.requestAnimationFrame(()=>Wt.push(n||s))},exec_pop_focus(e,t,i,s,n){window.requestAnimationFrame(()=>{let r=Wt.pop();r&&r.focus()})},exec_add_class(e,t,i,s,n,{names:r,transition:o,time:a}){this.addOrRemoveClasses(n,r,[],o,a,i)},exec_remove_class(e,t,i,s,n,{names:r,transition:o,time:a}){this.addOrRemoveClasses(n,[],r,o,a,i)},exec_toggle_class(e,t,i,s,n,{to:r,names:o,transition:a,time:l}){this.toggleClasses(n,o,a,l,i)},exec_toggle_attr(e,t,i,s,n,{attr:[r,o,a]}){n.hasAttribute(r)?a!==void 0?n.getAttribute(r)===o?this.setOrRemoveAttrs(n,[[r,a]],[]):this.setOrRemoveAttrs(n,[[r,o]],[]):this.setOrRemoveAttrs(n,[],[r]):this.setOrRemoveAttrs(n,[[r,o]],[])},exec_transition(e,t,i,s,n,{time:r,transition:o}){this.addOrRemoveClasses(n,[],[],o,r,i)},exec_toggle(e,t,i,s,n,{display:r,ins:o,outs:a,time:l}){this.toggle(e,i,n,r,o,a,l)},exec_show(e,t,i,s,n,{display:r,transition:o,time:a}){this.show(e,i,n,r,o,a)},exec_hide(e,t,i,s,n,{display:r,transition:o,time:a}){this.hide(e,i,n,r,o,a)},exec_set_attr(e,t,i,s,n,{attr:[r,o]}){this.setOrRemoveAttrs(n,[[r,o]],[])},exec_remove_attr(e,t,i,s,n,{attr:r}){this.setOrRemoveAttrs(n,[],[r])},show(e,t,i,s,n,r){this.isVisible(i)||this.toggle(e,t,i,s,n,null,r)},hide(e,t,i,s,n,r){this.isVisible(i)&&this.toggle(e,t,i,s,null,n,r)},toggle(e,t,i,s,n,r,o){o=o||zt;let[a,l,h]=n||[[],[],[]],[c,g,p]=r||[[],[],[]];if(a.length>0||c.length>0)if(this.isVisible(i)){let f=()=>{this.addOrRemoveClasses(i,g,a.concat(l).concat(h)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,c,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,p,g))})};i.dispatchEvent(new Event("phx:hide-start")),t.transition(o,f,()=>{this.addOrRemoveClasses(i,[],c.concat(p)),d.putSticky(i,"toggle",m=>m.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))})}else{if(e==="remove")return;let f=()=>{this.addOrRemoveClasses(i,l,c.concat(g).concat(p));let m=s||this.defaultDisplay(i);d.putSticky(i,"toggle",v=>v.style.display=m),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,h,l))})};i.dispatchEvent(new Event("phx:show-start")),t.transition(o,f,()=>{this.addOrRemoveClasses(i,[],a.concat(h)),i.dispatchEvent(new Event("phx:show-end"))})}else this.isVisible(i)?window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:hide-start")),d.putSticky(i,"toggle",f=>f.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:show-start"));let f=s||this.defaultDisplay(i);d.putSticky(i,"toggle",m=>m.style.display=f),i.dispatchEvent(new Event("phx:show-end"))})},toggleClasses(e,t,i,s,n){window.requestAnimationFrame(()=>{let[r,o]=d.getSticky(e,"classes",[[],[]]),a=t.filter(h=>r.indexOf(h)<0&&!e.classList.contains(h)),l=t.filter(h=>o.indexOf(h)<0&&e.classList.contains(h));this.addOrRemoveClasses(e,a,l,i,s,n)})},addOrRemoveClasses(e,t,i,s,n,r){n=n||zt;let[o,a,l]=s||[[],[],[]];if(o.length>0){let h=()=>{this.addOrRemoveClasses(e,a,[].concat(o).concat(l)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(e,o,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(e,l,a))})},c=()=>this.addOrRemoveClasses(e,t.concat(l),i.concat(o).concat(a));return r.transition(n,h,c)}window.requestAnimationFrame(()=>{let[h,c]=d.getSticky(e,"classes",[[],[]]),g=t.filter(v=>h.indexOf(v)<0&&!e.classList.contains(v)),p=i.filter(v=>c.indexOf(v)<0&&e.classList.contains(v)),f=h.filter(v=>i.indexOf(v)<0).concat(g),m=c.filter(v=>t.indexOf(v)<0).concat(p);d.putSticky(e,"classes",v=>(v.classList.remove(...m),v.classList.add(...f),[f,m]))})},setOrRemoveAttrs(e,t,i){let[s,n]=d.getSticky(e,"attrs",[[],[]]),r=t.map(([l,h])=>l).concat(i),o=s.filter(([l,h])=>!r.includes(l)).concat(t),a=n.filter(l=>!r.includes(l)).concat(i);d.putSticky(e,"attrs",l=>(a.forEach(h=>l.removeAttribute(h)),o.forEach(([h,c])=>l.setAttribute(h,c)),[o,a]))},hasAllClasses(e,t){return t.every(i=>e.classList.contains(i))},isToggledOut(e,t){return!this.isVisible(e)||this.hasAllClasses(e,t)},filterToEls(e,{to:t}){return t?d.all(document,t):[e]},defaultDisplay(e){return{tr:"table-row",td:"table-cell"}[e.tagName.toLowerCase()]||"block"}},O=rs,$={byId(e){return document.getElementById(e)||M(`no id found for ${e}`)},removeClass(e,t){e.classList.remove(t),e.classList.length===0&&e.removeAttribute("class")},all(e,t,i){if(!e)return[];let s=Array.from(e.querySelectorAll(t));return i?s.forEach(i):s},childNodeLength(e){let t=document.createElement("template");return t.innerHTML=e,t.content.childElementCount},isUploadInput(e){return e.type==="file"&&e.getAttribute(G)!==null},isAutoUpload(e){return e.hasAttribute("data-phx-auto-upload")},findUploadInputs(e){let t=e.id,i=this.all(document,`input[type="file"][${G}][form="${t}"]`);return this.all(e,`input[type="file"][${G}]`).concat(i)},findComponentNodeList(e,t){return this.filterWithinSameLiveView(this.all(e,`[${K}="${t}"]`),e)},isPhxDestroyed(e){return!!(e.id&&$.private(e,"destroyed"))},wantsNewTab(e){let t=e.ctrlKey||e.shiftKey||e.metaKey||e.button&&e.button===1,i=e.target instanceof HTMLAnchorElement&&e.target.hasAttribute("download"),s=e.target.hasAttribute("target")&&e.target.getAttribute("target").toLowerCase()==="_blank",n=e.target.hasAttribute("target")&&!e.target.getAttribute("target").startsWith("_");return t||s||i||n},isUnloadableFormSubmit(e){return e.target&&e.target.getAttribute("method")==="dialog"||e.submitter&&e.submitter.getAttribute("formmethod")==="dialog"?!1:!e.defaultPrevented&&!this.wantsNewTab(e)},isNewPageClick(e,t){let i=e.target instanceof HTMLAnchorElement?e.target.getAttribute("href"):null,s;if(e.defaultPrevented||i===null||this.wantsNewTab(e)||i.startsWith("mailto:")||i.startsWith("tel:")||e.target.isContentEditable)return!1;try{s=new URL(i)}catch(n){try{s=new URL(i,t)}catch(r){return!0}}return s.host===t.host&&s.protocol===t.protocol&&s.pathname===t.pathname&&s.search===t.search?s.hash===""&&!s.href.endsWith("#"):s.protocol.startsWith("http")},markPhxChildDestroyed(e){this.isPhxChild(e)&&e.setAttribute(Y,""),this.putPrivate(e,"destroyed",!0)},findPhxChildrenInFragment(e,t){let i=document.createElement("template");return i.innerHTML=e,this.findPhxChildren(i.content,t)},isIgnored(e,t){return(e.getAttribute(t)||e.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(e,t,i){return e.getAttribute&&i.indexOf(e.getAttribute(t))>=0},findPhxSticky(e){return this.all(e,`[${Mt}]`)},findPhxChildren(e,t){return this.all(e,`${ve}[${he}="${t}"]`)},findExistingParentCIDs(e,t){let i=new Set,s=new Set;return t.forEach(n=>{this.filterWithinSameLiveView(this.all(e,`[${K}="${n}"]`),e).forEach(r=>{i.add(n),this.all(r,`[${K}]`).map(o=>parseInt(o.getAttribute(K))).forEach(o=>s.add(o))})}),s.forEach(n=>i.delete(n)),i},filterWithinSameLiveView(e,t){return t.querySelector(ve)?e.filter(i=>this.withinSameLiveView(i,t)):e},withinSameLiveView(e,t){for(;e=e.parentNode;){if(e.isSameNode(t))return!0;if(e.getAttribute(Y)!==null)return!1}},private(e,t){return e[B]&&e[B][t]},deletePrivate(e,t){e[B]&&delete e[B][t]},putPrivate(e,t,i){e[B]||(e[B]={}),e[B][t]=i},updatePrivate(e,t,i,s){let n=this.private(e,t);n===void 0?this.putPrivate(e,t,s(i)):this.putPrivate(e,t,s(n))},copyPrivates(e,t){t[B]&&(e[B]=t[B])},putTitle(e){let t=document.querySelector("title");if(t){let{prefix:i,suffix:s}=t.dataset;document.title=`${i||""}${e}${s||""}`}else document.title=e},debounce(e,t,i,s,n,r,o,a){let l=e.getAttribute(i),h=e.getAttribute(n);l===""&&(l=s),h===""&&(h=r);let c=l||h;switch(c){case null:return a();case"blur":this.once(e,"debounce-blur")&&e.addEventListener("blur",()=>{o()&&a()});return;default:let g=parseInt(c),p=()=>h?this.deletePrivate(e,Ee):a(),f=this.incCycle(e,Se,p);if(isNaN(g))return M(`invalid throttle/debounce value: ${c}`);if(h){let v=!1;if(t.type==="keydown"){let C=this.private(e,jt);this.putPrivate(e,jt,t.key),v=C!==t.key}if(!v&&this.private(e,Ee))return!1;{a();let C=setTimeout(()=>{o()&&this.triggerCycle(e,Se)},g);this.putPrivate(e,Ee,C)}}else setTimeout(()=>{o()&&this.triggerCycle(e,Se,f)},g);let m=e.form;m&&this.once(m,"bind-debounce")&&m.addEventListener("submit",()=>{Array.from(new FormData(m).entries(),([v])=>{let C=m.querySelector(`[name="${v}"]`);this.incCycle(C,Se),this.deletePrivate(C,Ee)})}),this.once(e,"bind-debounce")&&e.addEventListener("blur",()=>{clearTimeout(this.private(e,Ee)),this.triggerCycle(e,Se)})}},triggerCycle(e,t,i){let[s,n]=this.private(e,t);i||(i=s),i===s&&(this.incCycle(e,t),n())},once(e,t){return this.private(e,t)===!0?!1:(this.putPrivate(e,t,!0),!0)},incCycle(e,t,i=function(){}){let[s]=this.private(e,t)||[0,i];return s++,this.putPrivate(e,t,[s,i]),s},maybeAddPrivateHooks(e,t,i){e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute(i))&&e.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},isFeedbackContainer(e,t){return e.hasAttribute&&e.hasAttribute(t)},maybeHideFeedback(e,t,i,s){let n={};t.forEach(r=>{if(!e.contains(r))return;let o=r.getAttribute(i);if(!o){O.addOrRemoveClasses(r,[],[Ne]);return}if(n[o]===!0){this.hideFeedback(r);return}n[o]=this.shouldHideFeedback(e,o,s),n[o]===!0&&this.hideFeedback(r)})},hideFeedback(e){O.addOrRemoveClasses(e,[Ne],[])},shouldHideFeedback(e,t,i){let s=`[name="${t}"], + [name="${t}[]"], + [${i}="${t}"]`,n=!1;return $.all(e,s,r=>{(this.private(r,vt)||this.private(r,Ge))&&(n=!0)}),!n},feedbackSelector(e,t,i){let s=`[${t}="${e.name}"], + [${t}="${e.name.replace(/\[\]$/,"")}"]`;return e.getAttribute(i)&&(s+=`,[${t}="${e.getAttribute(i)}"]`),s},resetForm(e,t,i){Array.from(e.elements).forEach(s=>{let n=this.feedbackSelector(s,t,i);this.deletePrivate(s,vt),this.deletePrivate(s,Ge),this.all(document,n,r=>{O.addOrRemoveClasses(r,[Ne],[])})})},showError(e,t,i){if(e.name){let s=this.feedbackSelector(e,t,i);this.all(document,s,n=>{O.addOrRemoveClasses(n,[],[Ne])})}},isPhxChild(e){return e.getAttribute&&e.getAttribute(he)},isPhxSticky(e){return e.getAttribute&&e.getAttribute(Mt)!==null},isChildOfAny(e,t){return!!t.find(i=>i.contains(e))},firstPhxChild(e){return this.isPhxChild(e)?e:this.all(e,`[${he}]`)[0]},dispatchEvent(e,t,i={}){let s=!0;e.nodeName==="INPUT"&&e.type==="file"&&t==="click"&&(s=!1);let o={bubbles:i.bubbles===void 0?s:!!i.bubbles,cancelable:!0,detail:i.detail||{}},a=t==="click"?new MouseEvent("click",o):new CustomEvent(t,o);e.dispatchEvent(a)},cloneNode(e,t){if(typeof t=="undefined")return e.cloneNode(!0);{let i=e.cloneNode(!1);return i.innerHTML=t,i}},mergeAttrs(e,t,i={}){let s=new Set(i.exclude||[]),n=i.isIgnored,r=t.attributes;for(let a=r.length-1;a>=0;a--){let l=r[a].name;if(s.has(l))l==="value"&&e.value===t.value&&e.setAttribute("value",t.getAttribute(l));else{let h=t.getAttribute(l);e.getAttribute(l)!==h&&(!n||n&&l.startsWith("data-"))&&e.setAttribute(l,h)}}let o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;n?l.startsWith("data-")&&!t.hasAttribute(l)&&![N,te].includes(l)&&e.removeAttribute(l):t.hasAttribute(l)||e.removeAttribute(l)}},mergeFocusedInput(e,t){e instanceof HTMLSelectElement||$.mergeAttrs(e,t,{exclude:["value"]}),t.readOnly?e.setAttribute("readonly",!0):e.removeAttribute("readonly")},hasSelectionRange(e){return e.setSelectionRange&&(e.type==="text"||e.type==="textarea")},restoreFocus(e,t,i){if(e instanceof HTMLSelectElement&&e.focus(),!$.isTextualInput(e))return;e.matches(":focus")||e.focus(),this.hasSelectionRange(e)&&e.setSelectionRange(t,i)},isFormInput(e){return/^(?:input|select|textarea)$/i.test(e.tagName)&&e.type!=="button"},syncAttrsToProps(e){e instanceof HTMLInputElement&&di.indexOf(e.type.toLocaleLowerCase())>=0&&(e.checked=e.getAttribute("checked")!==null)},isTextualInput(e){return Bi.indexOf(e.type)>=0},isNowTriggerFormExternal(e,t){return e.getAttribute&&e.getAttribute(t)!==null},syncPendingRef(e,t,i){let s=e.getAttribute(N);if(s===null)return!0;let n=e.getAttribute(te);return $.isFormInput(e)||e.getAttribute(i)!==null?($.isUploadInput(e)&&$.mergeAttrs(e,t,{isIgnored:!0}),$.putPrivate(e,N,t),!1):(oi.forEach(r=>{e.classList.contains(r)&&t.classList.add(r)}),t.setAttribute(N,s),t.setAttribute(te,n),!0)},cleanChildNodes(e,t){if($.isPhxUpdate(e,t,["append","prepend"])){let i=[];e.childNodes.forEach(s=>{s.id||(!(s.nodeType===Node.TEXT_NODE&&s.nodeValue.trim()==="")&&s.nodeType!==Node.COMMENT_NODE&&M(`only HTML element tags with an id are allowed inside containers with phx-update. - // vendor/topbar.js - var require_topbar = __commonJS({ - "vendor/topbar.js"(exports, module) { - (function(window2, document2) { - "use strict"; - (function() { - var lastTime = 0; - var vendors = ["ms", "moz", "webkit", "o"]; - for (var x = 0; x < vendors.length && !window2.requestAnimationFrame; ++x) { - window2.requestAnimationFrame = window2[vendors[x] + "RequestAnimationFrame"]; - window2.cancelAnimationFrame = window2[vendors[x] + "CancelAnimationFrame"] || window2[vendors[x] + "CancelRequestAnimationFrame"]; - } - if (!window2.requestAnimationFrame) - window2.requestAnimationFrame = function(callback, element) { - var currTime = (/* @__PURE__ */ new Date()).getTime(); - var timeToCall = Math.max(0, 16 - (currTime - lastTime)); - var id = window2.setTimeout(function() { - callback(currTime + timeToCall); - }, timeToCall); - lastTime = currTime + timeToCall; - return id; - }; - if (!window2.cancelAnimationFrame) - window2.cancelAnimationFrame = function(id) { - clearTimeout(id); - }; - })(); - var canvas, currentProgress, showing, progressTimerId = null, fadeTimerId = null, delayTimerId = null, addEvent = function(elem, type, handler) { - if (elem.addEventListener) - elem.addEventListener(type, handler, false); - else if (elem.attachEvent) - elem.attachEvent("on" + type, handler); - else - elem["on" + type] = handler; - }, options = { - autoRun: true, - barThickness: 3, - barColors: { - 0: "rgba(26, 188, 156, .9)", - ".25": "rgba(52, 152, 219, .9)", - ".50": "rgba(241, 196, 15, .9)", - ".75": "rgba(230, 126, 34, .9)", - "1.0": "rgba(211, 84, 0, .9)" - }, - shadowBlur: 10, - shadowColor: "rgba(0, 0, 0, .6)", - className: null - }, repaint = function() { - canvas.width = window2.innerWidth; - canvas.height = options.barThickness * 5; - var ctx = canvas.getContext("2d"); - ctx.shadowBlur = options.shadowBlur; - ctx.shadowColor = options.shadowColor; - var lineGradient = ctx.createLinearGradient(0, 0, canvas.width, 0); - for (var stop in options.barColors) - lineGradient.addColorStop(stop, options.barColors[stop]); - ctx.lineWidth = options.barThickness; - ctx.beginPath(); - ctx.moveTo(0, options.barThickness / 2); - ctx.lineTo( - Math.ceil(currentProgress * canvas.width), - options.barThickness / 2 - ); - ctx.strokeStyle = lineGradient; - ctx.stroke(); - }, createCanvas = function() { - canvas = document2.createElement("canvas"); - var style = canvas.style; - style.position = "fixed"; - style.top = style.left = style.right = style.margin = style.padding = 0; - style.zIndex = 100001; - style.display = "none"; - if (options.className) - canvas.classList.add(options.className); - document2.body.appendChild(canvas); - addEvent(window2, "resize", repaint); - }, topbar2 = { - config: function(opts) { - for (var key in opts) - if (options.hasOwnProperty(key)) - options[key] = opts[key]; - }, - show: function(delay) { - if (showing) - return; - if (delay) { - if (delayTimerId) - return; - delayTimerId = setTimeout(() => topbar2.show(), delay); - } else { - showing = true; - if (fadeTimerId !== null) - window2.cancelAnimationFrame(fadeTimerId); - if (!canvas) - createCanvas(); - canvas.style.opacity = 1; - canvas.style.display = "block"; - topbar2.progress(0); - if (options.autoRun) { - (function loop() { - progressTimerId = window2.requestAnimationFrame(loop); - topbar2.progress( - "+" + 0.05 * Math.pow(1 - Math.sqrt(currentProgress), 2) - ); - })(); - } - } - }, - progress: function(to) { - if (typeof to === "undefined") - return currentProgress; - if (typeof to === "string") { - to = (to.indexOf("+") >= 0 || to.indexOf("-") >= 0 ? currentProgress : 0) + parseFloat(to); - } - currentProgress = to > 1 ? 1 : to; - repaint(); - return currentProgress; - }, - hide: function() { - clearTimeout(delayTimerId); - delayTimerId = null; - if (!showing) - return; - showing = false; - if (progressTimerId != null) { - window2.cancelAnimationFrame(progressTimerId); - progressTimerId = null; - } - (function loop() { - if (topbar2.progress("+.1") >= 1) { - canvas.style.opacity -= 0.05; - if (canvas.style.opacity <= 0.05) { - canvas.style.display = "none"; - fadeTimerId = null; - return; - } - } - fadeTimerId = window2.requestAnimationFrame(loop); - })(); - } - }; - if (typeof module === "object" && typeof module.exports === "object") { - module.exports = topbar2; - } else if (typeof define === "function" && define.amd) { - define(function() { - return topbar2; - }); - } else { - this.topbar = topbar2; - } - }).call(exports, window, document); - } - }); +removing illegal node: "${(s.outerHTML||s.nodeValue).trim()}" - // ../deps/phoenix_html/priv/static/phoenix_html.js - (function() { - var PolyfillEvent = eventConstructor(); - function eventConstructor() { - if (typeof window.CustomEvent === "function") - return window.CustomEvent; - function CustomEvent2(event, params2) { - params2 = params2 || { bubbles: false, cancelable: false, detail: void 0 }; - var evt = document.createEvent("CustomEvent"); - evt.initCustomEvent(event, params2.bubbles, params2.cancelable, params2.detail); - return evt; - } - CustomEvent2.prototype = window.Event.prototype; - return CustomEvent2; - } - function buildHiddenInput(name, value) { - var input = document.createElement("input"); - input.type = "hidden"; - input.name = name; - input.value = value; - return input; - } - function handleClick(element, targetModifierKey) { - var to = element.getAttribute("data-to"), method = buildHiddenInput("_method", element.getAttribute("data-method")), csrf = buildHiddenInput("_csrf_token", element.getAttribute("data-csrf")), form = document.createElement("form"), submit = document.createElement("input"), target = element.getAttribute("target"); - form.method = element.getAttribute("data-method") === "get" ? "get" : "post"; - form.action = to; - form.style.display = "none"; - if (target) - form.target = target; - else if (targetModifierKey) - form.target = "_blank"; - form.appendChild(csrf); - form.appendChild(method); - document.body.appendChild(form); - submit.type = "submit"; - form.appendChild(submit); - submit.click(); - } - window.addEventListener("click", function(e) { - var element = e.target; - if (e.defaultPrevented) - return; - while (element && element.getAttribute) { - var phoenixLinkEvent = new PolyfillEvent("phoenix.link.click", { - "bubbles": true, - "cancelable": true - }); - if (!element.dispatchEvent(phoenixLinkEvent)) { - e.preventDefault(); - e.stopImmediatePropagation(); - return false; - } - if (element.getAttribute("data-method") && element.getAttribute("data-to")) { - handleClick(element, e.metaKey || e.shiftKey); - e.preventDefault(); - return false; - } else { - element = element.parentNode; - } - } - }, false); - window.addEventListener("phoenix.link.click", function(e) { - var message = e.target.getAttribute("data-confirm"); - if (message && !window.confirm(message)) { - e.preventDefault(); - } - }, false); - })(); - - // ../deps/phoenix/priv/static/phoenix.mjs - var closure = (value) => { - if (typeof value === "function") { - return value; - } else { - let closure22 = function() { - return value; - }; - return closure22; - } - }; - var globalSelf = typeof self !== "undefined" ? self : null; - var phxWindow = typeof window !== "undefined" ? window : null; - var global = globalSelf || phxWindow || global; - var DEFAULT_VSN = "2.0.0"; - var SOCKET_STATES = { connecting: 0, open: 1, closing: 2, closed: 3 }; - var DEFAULT_TIMEOUT = 1e4; - var WS_CLOSE_NORMAL = 1e3; - var CHANNEL_STATES = { - closed: "closed", - errored: "errored", - joined: "joined", - joining: "joining", - leaving: "leaving" - }; - var CHANNEL_EVENTS = { - close: "phx_close", - error: "phx_error", - join: "phx_join", - reply: "phx_reply", - leave: "phx_leave" - }; - var TRANSPORTS = { - longpoll: "longpoll", - websocket: "websocket" - }; - var XHR_STATES = { - complete: 4 - }; - var Push = class { - constructor(channel, event, payload, timeout) { - this.channel = channel; - this.event = event; - this.payload = payload || function() { - return {}; - }; - this.receivedResp = null; - this.timeout = timeout; - this.timeoutTimer = null; - this.recHooks = []; - this.sent = false; - } - /** - * - * @param {number} timeout - */ - resend(timeout) { - this.timeout = timeout; - this.reset(); - this.send(); - } - /** - * - */ - send() { - if (this.hasReceived("timeout")) { - return; - } - this.startTimeout(); - this.sent = true; - this.channel.socket.push({ - topic: this.channel.topic, - event: this.event, - payload: this.payload(), - ref: this.ref, - join_ref: this.channel.joinRef() - }); - } - /** - * - * @param {*} status - * @param {*} callback - */ - receive(status, callback) { - if (this.hasReceived(status)) { - callback(this.receivedResp.response); - } - this.recHooks.push({ status, callback }); - return this; - } - /** - * @private - */ - reset() { - this.cancelRefEvent(); - this.ref = null; - this.refEvent = null; - this.receivedResp = null; - this.sent = false; - } - /** - * @private - */ - matchReceive({ status, response, _ref }) { - this.recHooks.filter((h) => h.status === status).forEach((h) => h.callback(response)); - } - /** - * @private - */ - cancelRefEvent() { - if (!this.refEvent) { - return; - } - this.channel.off(this.refEvent); - } - /** - * @private - */ - cancelTimeout() { - clearTimeout(this.timeoutTimer); - this.timeoutTimer = null; - } - /** - * @private - */ - startTimeout() { - if (this.timeoutTimer) { - this.cancelTimeout(); - } - this.ref = this.channel.socket.makeRef(); - this.refEvent = this.channel.replyEventName(this.ref); - this.channel.on(this.refEvent, (payload) => { - this.cancelRefEvent(); - this.cancelTimeout(); - this.receivedResp = payload; - this.matchReceive(payload); - }); - this.timeoutTimer = setTimeout(() => { - this.trigger("timeout", {}); - }, this.timeout); - } - /** - * @private - */ - hasReceived(status) { - return this.receivedResp && this.receivedResp.status === status; - } - /** - * @private - */ - trigger(status, response) { - this.channel.trigger(this.refEvent, { status, response }); - } - }; - var Timer = class { - constructor(callback, timerCalc) { - this.callback = callback; - this.timerCalc = timerCalc; - this.timer = null; - this.tries = 0; - } - reset() { - this.tries = 0; - clearTimeout(this.timer); - } - /** - * Cancels any previous scheduleTimeout and schedules callback - */ - scheduleTimeout() { - clearTimeout(this.timer); - this.timer = setTimeout(() => { - this.tries = this.tries + 1; - this.callback(); - }, this.timerCalc(this.tries + 1)); - } - }; - var Channel = class { - constructor(topic, params2, socket) { - this.state = CHANNEL_STATES.closed; - this.topic = topic; - this.params = closure(params2 || {}); - this.socket = socket; - this.bindings = []; - this.bindingRef = 0; - this.timeout = this.socket.timeout; - this.joinedOnce = false; - this.joinPush = new Push(this, CHANNEL_EVENTS.join, this.params, this.timeout); - this.pushBuffer = []; - this.stateChangeRefs = []; - this.rejoinTimer = new Timer(() => { - if (this.socket.isConnected()) { - this.rejoin(); - } - }, this.socket.rejoinAfterMs); - this.stateChangeRefs.push(this.socket.onError(() => this.rejoinTimer.reset())); - this.stateChangeRefs.push( - this.socket.onOpen(() => { - this.rejoinTimer.reset(); - if (this.isErrored()) { - this.rejoin(); - } - }) - ); - this.joinPush.receive("ok", () => { - this.state = CHANNEL_STATES.joined; - this.rejoinTimer.reset(); - this.pushBuffer.forEach((pushEvent) => pushEvent.send()); - this.pushBuffer = []; - }); - this.joinPush.receive("error", () => { - this.state = CHANNEL_STATES.errored; - if (this.socket.isConnected()) { - this.rejoinTimer.scheduleTimeout(); - } - }); - this.onClose(() => { - this.rejoinTimer.reset(); - if (this.socket.hasLogger()) - this.socket.log("channel", `close ${this.topic} ${this.joinRef()}`); - this.state = CHANNEL_STATES.closed; - this.socket.remove(this); - }); - this.onError((reason) => { - if (this.socket.hasLogger()) - this.socket.log("channel", `error ${this.topic}`, reason); - if (this.isJoining()) { - this.joinPush.reset(); - } - this.state = CHANNEL_STATES.errored; - if (this.socket.isConnected()) { - this.rejoinTimer.scheduleTimeout(); - } - }); - this.joinPush.receive("timeout", () => { - if (this.socket.hasLogger()) - this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout); - let leavePush = new Push(this, CHANNEL_EVENTS.leave, closure({}), this.timeout); - leavePush.send(); - this.state = CHANNEL_STATES.errored; - this.joinPush.reset(); - if (this.socket.isConnected()) { - this.rejoinTimer.scheduleTimeout(); - } - }); - this.on(CHANNEL_EVENTS.reply, (payload, ref) => { - this.trigger(this.replyEventName(ref), payload); - }); - } - /** - * Join the channel - * @param {integer} timeout - * @returns {Push} - */ - join(timeout = this.timeout) { - if (this.joinedOnce) { - throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance"); - } else { - this.timeout = timeout; - this.joinedOnce = true; - this.rejoin(); - return this.joinPush; - } - } - /** - * Hook into channel close - * @param {Function} callback - */ - onClose(callback) { - this.on(CHANNEL_EVENTS.close, callback); - } - /** - * Hook into channel errors - * @param {Function} callback - */ - onError(callback) { - return this.on(CHANNEL_EVENTS.error, (reason) => callback(reason)); - } - /** - * Subscribes on channel events - * - * Subscription returns a ref counter, which can be used later to - * unsubscribe the exact event listener - * - * @example - * const ref1 = channel.on("event", do_stuff) - * const ref2 = channel.on("event", do_other_stuff) - * channel.off("event", ref1) - * // Since unsubscription, do_stuff won't fire, - * // while do_other_stuff will keep firing on the "event" - * - * @param {string} event - * @param {Function} callback - * @returns {integer} ref - */ - on(event, callback) { - let ref = this.bindingRef++; - this.bindings.push({ event, ref, callback }); - return ref; - } - /** - * Unsubscribes off of channel events - * - * Use the ref returned from a channel.on() to unsubscribe one - * handler, or pass nothing for the ref to unsubscribe all - * handlers for the given event. - * - * @example - * // Unsubscribe the do_stuff handler - * const ref1 = channel.on("event", do_stuff) - * channel.off("event", ref1) - * - * // Unsubscribe all handlers from event - * channel.off("event") - * - * @param {string} event - * @param {integer} ref - */ - off(event, ref) { - this.bindings = this.bindings.filter((bind) => { - return !(bind.event === event && (typeof ref === "undefined" || ref === bind.ref)); - }); - } - /** - * @private - */ - canPush() { - return this.socket.isConnected() && this.isJoined(); - } - /** - * Sends a message `event` to phoenix with the payload `payload`. - * Phoenix receives this in the `handle_in(event, payload, socket)` - * function. if phoenix replies or it times out (default 10000ms), - * then optionally the reply can be received. - * - * @example - * channel.push("event") - * .receive("ok", payload => console.log("phoenix replied:", payload)) - * .receive("error", err => console.log("phoenix errored", err)) - * .receive("timeout", () => console.log("timed out pushing")) - * @param {string} event - * @param {Object} payload - * @param {number} [timeout] - * @returns {Push} - */ - push(event, payload, timeout = this.timeout) { - payload = payload || {}; - if (!this.joinedOnce) { - throw new Error(`tried to push '${event}' to '${this.topic}' before joining. Use channel.join() before pushing events`); - } - let pushEvent = new Push(this, event, function() { - return payload; - }, timeout); - if (this.canPush()) { - pushEvent.send(); - } else { - pushEvent.startTimeout(); - this.pushBuffer.push(pushEvent); - } - return pushEvent; - } - /** Leaves the channel - * - * Unsubscribes from server events, and - * instructs channel to terminate on server - * - * Triggers onClose() hooks - * - * To receive leave acknowledgements, use the `receive` - * hook to bind to the server ack, ie: - * - * @example - * channel.leave().receive("ok", () => alert("left!") ) - * - * @param {integer} timeout - * @returns {Push} - */ - leave(timeout = this.timeout) { - this.rejoinTimer.reset(); - this.joinPush.cancelTimeout(); - this.state = CHANNEL_STATES.leaving; - let onClose = () => { - if (this.socket.hasLogger()) - this.socket.log("channel", `leave ${this.topic}`); - this.trigger(CHANNEL_EVENTS.close, "leave"); - }; - let leavePush = new Push(this, CHANNEL_EVENTS.leave, closure({}), timeout); - leavePush.receive("ok", () => onClose()).receive("timeout", () => onClose()); - leavePush.send(); - if (!this.canPush()) { - leavePush.trigger("ok", {}); - } - return leavePush; - } - /** - * Overridable message hook - * - * Receives all events for specialized message handling - * before dispatching to the channel callbacks. - * - * Must return the payload, modified or unmodified - * @param {string} event - * @param {Object} payload - * @param {integer} ref - * @returns {Object} - */ - onMessage(_event, payload, _ref) { - return payload; - } - /** - * @private - */ - isMember(topic, event, payload, joinRef) { - if (this.topic !== topic) { - return false; - } - if (joinRef && joinRef !== this.joinRef()) { - if (this.socket.hasLogger()) - this.socket.log("channel", "dropping outdated message", { topic, event, payload, joinRef }); - return false; - } else { - return true; - } - } - /** - * @private - */ - joinRef() { - return this.joinPush.ref; - } - /** - * @private - */ - rejoin(timeout = this.timeout) { - if (this.isLeaving()) { - return; - } - this.socket.leaveOpenTopic(this.topic); - this.state = CHANNEL_STATES.joining; - this.joinPush.resend(timeout); - } - /** - * @private - */ - trigger(event, payload, ref, joinRef) { - let handledPayload = this.onMessage(event, payload, ref, joinRef); - if (payload && !handledPayload) { - throw new Error("channel onMessage callbacks must return the payload, modified or unmodified"); - } - let eventBindings = this.bindings.filter((bind) => bind.event === event); - for (let i = 0; i < eventBindings.length; i++) { - let bind = eventBindings[i]; - bind.callback(handledPayload, ref, joinRef || this.joinRef()); - } - } - /** - * @private - */ - replyEventName(ref) { - return `chan_reply_${ref}`; - } - /** - * @private - */ - isClosed() { - return this.state === CHANNEL_STATES.closed; - } - /** - * @private - */ - isErrored() { - return this.state === CHANNEL_STATES.errored; - } - /** - * @private - */ - isJoined() { - return this.state === CHANNEL_STATES.joined; - } - /** - * @private - */ - isJoining() { - return this.state === CHANNEL_STATES.joining; - } - /** - * @private - */ - isLeaving() { - return this.state === CHANNEL_STATES.leaving; - } - }; - var Ajax = class { - static request(method, endPoint, accept, body, timeout, ontimeout, callback) { - if (global.XDomainRequest) { - let req = new global.XDomainRequest(); - return this.xdomainRequest(req, method, endPoint, body, timeout, ontimeout, callback); - } else { - let req = new global.XMLHttpRequest(); - return this.xhrRequest(req, method, endPoint, accept, body, timeout, ontimeout, callback); - } - } - static xdomainRequest(req, method, endPoint, body, timeout, ontimeout, callback) { - req.timeout = timeout; - req.open(method, endPoint); - req.onload = () => { - let response = this.parseJSON(req.responseText); - callback && callback(response); - }; - if (ontimeout) { - req.ontimeout = ontimeout; - } - req.onprogress = () => { - }; - req.send(body); - return req; - } - static xhrRequest(req, method, endPoint, accept, body, timeout, ontimeout, callback) { - req.open(method, endPoint, true); - req.timeout = timeout; - req.setRequestHeader("Content-Type", accept); - req.onerror = () => callback && callback(null); - req.onreadystatechange = () => { - if (req.readyState === XHR_STATES.complete && callback) { - let response = this.parseJSON(req.responseText); - callback(response); - } - }; - if (ontimeout) { - req.ontimeout = ontimeout; - } - req.send(body); - return req; - } - static parseJSON(resp) { - if (!resp || resp === "") { - return null; - } - try { - return JSON.parse(resp); - } catch (e) { - console && console.log("failed to parse JSON response", resp); - return null; - } - } - static serialize(obj, parentKey) { - let queryStr = []; - for (var key in obj) { - if (!Object.prototype.hasOwnProperty.call(obj, key)) { - continue; - } - let paramKey = parentKey ? `${parentKey}[${key}]` : key; - let paramVal = obj[key]; - if (typeof paramVal === "object") { - queryStr.push(this.serialize(paramVal, paramKey)); - } else { - queryStr.push(encodeURIComponent(paramKey) + "=" + encodeURIComponent(paramVal)); - } - } - return queryStr.join("&"); - } - static appendParams(url, params2) { - if (Object.keys(params2).length === 0) { - return url; - } - let prefix = url.match(/\?/) ? "&" : "?"; - return `${url}${prefix}${this.serialize(params2)}`; - } - }; - var arrayBufferToBase64 = (buffer) => { - let binary = ""; - let bytes = new Uint8Array(buffer); - let len = bytes.byteLength; - for (let i = 0; i < len; i++) { - binary += String.fromCharCode(bytes[i]); - } - return btoa(binary); - }; - var LongPoll = class { - constructor(endPoint) { - this.endPoint = null; - this.token = null; - this.skipHeartbeat = true; - this.reqs = /* @__PURE__ */ new Set(); - this.awaitingBatchAck = false; - this.currentBatch = null; - this.currentBatchTimer = null; - this.batchBuffer = []; - this.onopen = function() { - }; - this.onerror = function() { - }; - this.onmessage = function() { - }; - this.onclose = function() { - }; - this.pollEndpoint = this.normalizeEndpoint(endPoint); - this.readyState = SOCKET_STATES.connecting; - setTimeout(() => this.poll(), 0); - } - normalizeEndpoint(endPoint) { - return endPoint.replace("ws://", "http://").replace("wss://", "https://").replace(new RegExp("(.*)/" + TRANSPORTS.websocket), "$1/" + TRANSPORTS.longpoll); - } - endpointURL() { - return Ajax.appendParams(this.pollEndpoint, { token: this.token }); - } - closeAndRetry(code, reason, wasClean) { - this.close(code, reason, wasClean); - this.readyState = SOCKET_STATES.connecting; - } - ontimeout() { - this.onerror("timeout"); - this.closeAndRetry(1005, "timeout", false); - } - isActive() { - return this.readyState === SOCKET_STATES.open || this.readyState === SOCKET_STATES.connecting; - } - poll() { - this.ajax("GET", "application/json", null, () => this.ontimeout(), (resp) => { - if (resp) { - var { status, token, messages } = resp; - this.token = token; - } else { - status = 0; - } - switch (status) { - case 200: - messages.forEach((msg) => { - setTimeout(() => this.onmessage({ data: msg }), 0); - }); - this.poll(); - break; - case 204: - this.poll(); - break; - case 410: - this.readyState = SOCKET_STATES.open; - this.onopen({}); - this.poll(); - break; - case 403: - this.onerror(403); - this.close(1008, "forbidden", false); - break; - case 0: - case 500: - this.onerror(500); - this.closeAndRetry(1011, "internal server error", 500); - break; - default: - throw new Error(`unhandled poll status ${status}`); - } - }); - } - // we collect all pushes within the current event loop by - // setTimeout 0, which optimizes back-to-back procedural - // pushes against an empty buffer - send(body) { - if (typeof body !== "string") { - body = arrayBufferToBase64(body); - } - if (this.currentBatch) { - this.currentBatch.push(body); - } else if (this.awaitingBatchAck) { - this.batchBuffer.push(body); - } else { - this.currentBatch = [body]; - this.currentBatchTimer = setTimeout(() => { - this.batchSend(this.currentBatch); - this.currentBatch = null; - }, 0); - } - } - batchSend(messages) { - this.awaitingBatchAck = true; - this.ajax("POST", "application/x-ndjson", messages.join("\n"), () => this.onerror("timeout"), (resp) => { - this.awaitingBatchAck = false; - if (!resp || resp.status !== 200) { - this.onerror(resp && resp.status); - this.closeAndRetry(1011, "internal server error", false); - } else if (this.batchBuffer.length > 0) { - this.batchSend(this.batchBuffer); - this.batchBuffer = []; - } - }); - } - close(code, reason, wasClean) { - for (let req of this.reqs) { - req.abort(); - } - this.readyState = SOCKET_STATES.closed; - let opts = Object.assign({ code: 1e3, reason: void 0, wasClean: true }, { code, reason, wasClean }); - this.batchBuffer = []; - clearTimeout(this.currentBatchTimer); - this.currentBatchTimer = null; - if (typeof CloseEvent !== "undefined") { - this.onclose(new CloseEvent("close", opts)); - } else { - this.onclose(opts); - } - } - ajax(method, contentType, body, onCallerTimeout, callback) { - let req; - let ontimeout = () => { - this.reqs.delete(req); - onCallerTimeout(); - }; - req = Ajax.request(method, this.endpointURL(), contentType, body, this.timeout, ontimeout, (resp) => { - this.reqs.delete(req); - if (this.isActive()) { - callback(resp); - } - }); - this.reqs.add(req); - } - }; - var serializer_default = { - HEADER_LENGTH: 1, - META_LENGTH: 4, - KINDS: { push: 0, reply: 1, broadcast: 2 }, - encode(msg, callback) { - if (msg.payload.constructor === ArrayBuffer) { - return callback(this.binaryEncode(msg)); - } else { - let payload = [msg.join_ref, msg.ref, msg.topic, msg.event, msg.payload]; - return callback(JSON.stringify(payload)); - } - }, - decode(rawPayload, callback) { - if (rawPayload.constructor === ArrayBuffer) { - return callback(this.binaryDecode(rawPayload)); - } else { - let [join_ref, ref, topic, event, payload] = JSON.parse(rawPayload); - return callback({ join_ref, ref, topic, event, payload }); - } - }, - // private - binaryEncode(message) { - let { join_ref, ref, event, topic, payload } = message; - let metaLength = this.META_LENGTH + join_ref.length + ref.length + topic.length + event.length; - let header = new ArrayBuffer(this.HEADER_LENGTH + metaLength); - let view = new DataView(header); - let offset = 0; - view.setUint8(offset++, this.KINDS.push); - view.setUint8(offset++, join_ref.length); - view.setUint8(offset++, ref.length); - view.setUint8(offset++, topic.length); - view.setUint8(offset++, event.length); - Array.from(join_ref, (char) => view.setUint8(offset++, char.charCodeAt(0))); - Array.from(ref, (char) => view.setUint8(offset++, char.charCodeAt(0))); - Array.from(topic, (char) => view.setUint8(offset++, char.charCodeAt(0))); - Array.from(event, (char) => view.setUint8(offset++, char.charCodeAt(0))); - var combined = new Uint8Array(header.byteLength + payload.byteLength); - combined.set(new Uint8Array(header), 0); - combined.set(new Uint8Array(payload), header.byteLength); - return combined.buffer; - }, - binaryDecode(buffer) { - let view = new DataView(buffer); - let kind = view.getUint8(0); - let decoder = new TextDecoder(); - switch (kind) { - case this.KINDS.push: - return this.decodePush(buffer, view, decoder); - case this.KINDS.reply: - return this.decodeReply(buffer, view, decoder); - case this.KINDS.broadcast: - return this.decodeBroadcast(buffer, view, decoder); - } - }, - decodePush(buffer, view, decoder) { - let joinRefSize = view.getUint8(1); - let topicSize = view.getUint8(2); - let eventSize = view.getUint8(3); - let offset = this.HEADER_LENGTH + this.META_LENGTH - 1; - let joinRef = decoder.decode(buffer.slice(offset, offset + joinRefSize)); - offset = offset + joinRefSize; - let topic = decoder.decode(buffer.slice(offset, offset + topicSize)); - offset = offset + topicSize; - let event = decoder.decode(buffer.slice(offset, offset + eventSize)); - offset = offset + eventSize; - let data = buffer.slice(offset, buffer.byteLength); - return { join_ref: joinRef, ref: null, topic, event, payload: data }; - }, - decodeReply(buffer, view, decoder) { - let joinRefSize = view.getUint8(1); - let refSize = view.getUint8(2); - let topicSize = view.getUint8(3); - let eventSize = view.getUint8(4); - let offset = this.HEADER_LENGTH + this.META_LENGTH; - let joinRef = decoder.decode(buffer.slice(offset, offset + joinRefSize)); - offset = offset + joinRefSize; - let ref = decoder.decode(buffer.slice(offset, offset + refSize)); - offset = offset + refSize; - let topic = decoder.decode(buffer.slice(offset, offset + topicSize)); - offset = offset + topicSize; - let event = decoder.decode(buffer.slice(offset, offset + eventSize)); - offset = offset + eventSize; - let data = buffer.slice(offset, buffer.byteLength); - let payload = { status: event, response: data }; - return { join_ref: joinRef, ref, topic, event: CHANNEL_EVENTS.reply, payload }; - }, - decodeBroadcast(buffer, view, decoder) { - let topicSize = view.getUint8(1); - let eventSize = view.getUint8(2); - let offset = this.HEADER_LENGTH + 2; - let topic = decoder.decode(buffer.slice(offset, offset + topicSize)); - offset = offset + topicSize; - let event = decoder.decode(buffer.slice(offset, offset + eventSize)); - offset = offset + eventSize; - let data = buffer.slice(offset, buffer.byteLength); - return { join_ref: null, ref: null, topic, event, payload: data }; - } - }; - var Socket = class { - constructor(endPoint, opts = {}) { - this.stateChangeCallbacks = { open: [], close: [], error: [], message: [] }; - this.channels = []; - this.sendBuffer = []; - this.ref = 0; - this.timeout = opts.timeout || DEFAULT_TIMEOUT; - this.transport = opts.transport || global.WebSocket || LongPoll; - this.primaryPassedHealthCheck = false; - this.longPollFallbackMs = opts.longPollFallbackMs; - this.fallbackTimer = null; - this.sessionStore = opts.sessionStorage || global && global.sessionStorage; - this.establishedConnections = 0; - this.defaultEncoder = serializer_default.encode.bind(serializer_default); - this.defaultDecoder = serializer_default.decode.bind(serializer_default); - this.closeWasClean = false; - this.binaryType = opts.binaryType || "arraybuffer"; - this.connectClock = 1; - if (this.transport !== LongPoll) { - this.encode = opts.encode || this.defaultEncoder; - this.decode = opts.decode || this.defaultDecoder; - } else { - this.encode = this.defaultEncoder; - this.decode = this.defaultDecoder; - } - let awaitingConnectionOnPageShow = null; - if (phxWindow && phxWindow.addEventListener) { - phxWindow.addEventListener("pagehide", (_e) => { - if (this.conn) { - this.disconnect(); - awaitingConnectionOnPageShow = this.connectClock; - } - }); - phxWindow.addEventListener("pageshow", (_e) => { - if (awaitingConnectionOnPageShow === this.connectClock) { - awaitingConnectionOnPageShow = null; - this.connect(); - } - }); - } - this.heartbeatIntervalMs = opts.heartbeatIntervalMs || 3e4; - this.rejoinAfterMs = (tries) => { - if (opts.rejoinAfterMs) { - return opts.rejoinAfterMs(tries); - } else { - return [1e3, 2e3, 5e3][tries - 1] || 1e4; - } - }; - this.reconnectAfterMs = (tries) => { - if (opts.reconnectAfterMs) { - return opts.reconnectAfterMs(tries); - } else { - return [10, 50, 100, 150, 200, 250, 500, 1e3, 2e3][tries - 1] || 5e3; - } - }; - this.logger = opts.logger || null; - if (!this.logger && opts.debug) { - this.logger = (kind, msg, data) => { - console.log(`${kind}: ${msg}`, data); - }; - } - this.longpollerTimeout = opts.longpollerTimeout || 2e4; - this.params = closure(opts.params || {}); - this.endPoint = `${endPoint}/${TRANSPORTS.websocket}`; - this.vsn = opts.vsn || DEFAULT_VSN; - this.heartbeatTimeoutTimer = null; - this.heartbeatTimer = null; - this.pendingHeartbeatRef = null; - this.reconnectTimer = new Timer(() => { - this.teardown(() => this.connect()); - }, this.reconnectAfterMs); - } - /** - * Returns the LongPoll transport reference - */ - getLongPollTransport() { - return LongPoll; - } - /** - * Disconnects and replaces the active transport - * - * @param {Function} newTransport - The new transport class to instantiate - * - */ - replaceTransport(newTransport) { - this.connectClock++; - this.closeWasClean = true; - clearTimeout(this.fallbackTimer); - this.reconnectTimer.reset(); - if (this.conn) { - this.conn.close(); - this.conn = null; - } - this.transport = newTransport; - } - /** - * Returns the socket protocol - * - * @returns {string} - */ - protocol() { - return location.protocol.match(/^https/) ? "wss" : "ws"; - } - /** - * The fully qualified socket url - * - * @returns {string} - */ - endPointURL() { - let uri = Ajax.appendParams( - Ajax.appendParams(this.endPoint, this.params()), - { vsn: this.vsn } - ); - if (uri.charAt(0) !== "/") { - return uri; - } - if (uri.charAt(1) === "/") { - return `${this.protocol()}:${uri}`; - } - return `${this.protocol()}://${location.host}${uri}`; - } - /** - * Disconnects the socket - * - * See https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes for valid status codes. - * - * @param {Function} callback - Optional callback which is called after socket is disconnected. - * @param {integer} code - A status code for disconnection (Optional). - * @param {string} reason - A textual description of the reason to disconnect. (Optional) - */ - disconnect(callback, code, reason) { - this.connectClock++; - this.closeWasClean = true; - clearTimeout(this.fallbackTimer); - this.reconnectTimer.reset(); - this.teardown(callback, code, reason); - } - /** - * - * @param {Object} params - The params to send when connecting, for example `{user_id: userToken}` - * - * Passing params to connect is deprecated; pass them in the Socket constructor instead: - * `new Socket("/socket", {params: {user_id: userToken}})`. - */ - connect(params2) { - if (params2) { - console && console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"); - this.params = closure(params2); - } - if (this.conn) { - return; - } - if (this.longPollFallbackMs && this.transport !== LongPoll) { - this.connectWithFallback(LongPoll, this.longPollFallbackMs); - } else { - this.transportConnect(); - } - } - /** - * Logs the message. Override `this.logger` for specialized logging. noops by default - * @param {string} kind - * @param {string} msg - * @param {Object} data - */ - log(kind, msg, data) { - this.logger && this.logger(kind, msg, data); - } - /** - * Returns true if a logger has been set on this socket. - */ - hasLogger() { - return this.logger !== null; - } - /** - * Registers callbacks for connection open events - * - * @example socket.onOpen(function(){ console.info("the socket was opened") }) - * - * @param {Function} callback - */ - onOpen(callback) { - let ref = this.makeRef(); - this.stateChangeCallbacks.open.push([ref, callback]); - return ref; - } - /** - * Registers callbacks for connection close events - * @param {Function} callback - */ - onClose(callback) { - let ref = this.makeRef(); - this.stateChangeCallbacks.close.push([ref, callback]); - return ref; - } - /** - * Registers callbacks for connection error events - * - * @example socket.onError(function(error){ alert("An error occurred") }) - * - * @param {Function} callback - */ - onError(callback) { - let ref = this.makeRef(); - this.stateChangeCallbacks.error.push([ref, callback]); - return ref; - } - /** - * Registers callbacks for connection message events - * @param {Function} callback - */ - onMessage(callback) { - let ref = this.makeRef(); - this.stateChangeCallbacks.message.push([ref, callback]); - return ref; - } - /** - * Pings the server and invokes the callback with the RTT in milliseconds - * @param {Function} callback - * - * Returns true if the ping was pushed or false if unable to be pushed. - */ - ping(callback) { - if (!this.isConnected()) { - return false; - } - let ref = this.makeRef(); - let startTime = Date.now(); - this.push({ topic: "phoenix", event: "heartbeat", payload: {}, ref }); - let onMsgRef = this.onMessage((msg) => { - if (msg.ref === ref) { - this.off([onMsgRef]); - callback(Date.now() - startTime); - } - }); - return true; - } - /** - * @private - */ - transportConnect() { - this.connectClock++; - this.closeWasClean = false; - this.conn = new this.transport(this.endPointURL()); - this.conn.binaryType = this.binaryType; - this.conn.timeout = this.longpollerTimeout; - this.conn.onopen = () => this.onConnOpen(); - this.conn.onerror = (error) => this.onConnError(error); - this.conn.onmessage = (event) => this.onConnMessage(event); - this.conn.onclose = (event) => this.onConnClose(event); - } - getSession(key) { - return this.sessionStore && this.sessionStore.getItem(key); - } - storeSession(key, val) { - this.sessionStore && this.sessionStore.setItem(key, val); - } - connectWithFallback(fallbackTransport, fallbackThreshold = 2500) { - clearTimeout(this.fallbackTimer); - let established = false; - let primaryTransport = true; - let openRef, errorRef; - let fallback = (reason) => { - this.log("transport", `falling back to ${fallbackTransport.name}...`, reason); - this.off([openRef, errorRef]); - primaryTransport = false; - this.replaceTransport(fallbackTransport); - this.transportConnect(); - }; - if (this.getSession(`phx:fallback:${fallbackTransport.name}`)) { - return fallback("memorized"); - } - this.fallbackTimer = setTimeout(fallback, fallbackThreshold); - errorRef = this.onError((reason) => { - this.log("transport", "error", reason); - if (primaryTransport && !established) { - clearTimeout(this.fallbackTimer); - fallback(reason); - } - }); - this.onOpen(() => { - established = true; - if (!primaryTransport) { - if (!this.primaryPassedHealthCheck) { - this.storeSession(`phx:fallback:${fallbackTransport.name}`, "true"); - } - return this.log("transport", `established ${fallbackTransport.name} fallback`); - } - clearTimeout(this.fallbackTimer); - this.fallbackTimer = setTimeout(fallback, fallbackThreshold); - this.ping((rtt) => { - this.log("transport", "connected to primary after", rtt); - this.primaryPassedHealthCheck = true; - clearTimeout(this.fallbackTimer); - }); - }); - this.transportConnect(); - } - clearHeartbeats() { - clearTimeout(this.heartbeatTimer); - clearTimeout(this.heartbeatTimeoutTimer); - } - onConnOpen() { - if (this.hasLogger()) - this.log("transport", `${this.transport.name} connected to ${this.endPointURL()}`); - this.closeWasClean = false; - this.establishedConnections++; - this.flushSendBuffer(); - this.reconnectTimer.reset(); - this.resetHeartbeat(); - this.stateChangeCallbacks.open.forEach(([, callback]) => callback()); - } - /** - * @private - */ - heartbeatTimeout() { - if (this.pendingHeartbeatRef) { - this.pendingHeartbeatRef = null; - if (this.hasLogger()) { - this.log("transport", "heartbeat timeout. Attempting to re-establish connection"); - } - this.triggerChanError(); - this.closeWasClean = false; - this.teardown(() => this.reconnectTimer.scheduleTimeout(), WS_CLOSE_NORMAL, "heartbeat timeout"); - } - } - resetHeartbeat() { - if (this.conn && this.conn.skipHeartbeat) { - return; - } - this.pendingHeartbeatRef = null; - this.clearHeartbeats(); - this.heartbeatTimer = setTimeout(() => this.sendHeartbeat(), this.heartbeatIntervalMs); - } - teardown(callback, code, reason) { - if (!this.conn) { - return callback && callback(); - } - this.waitForBufferDone(() => { - if (this.conn) { - if (code) { - this.conn.close(code, reason || ""); - } else { - this.conn.close(); - } - } - this.waitForSocketClosed(() => { - if (this.conn) { - this.conn.onopen = function() { - }; - this.conn.onerror = function() { - }; - this.conn.onmessage = function() { - }; - this.conn.onclose = function() { - }; - this.conn = null; - } - callback && callback(); - }); - }); - } - waitForBufferDone(callback, tries = 1) { - if (tries === 5 || !this.conn || !this.conn.bufferedAmount) { - callback(); - return; - } - setTimeout(() => { - this.waitForBufferDone(callback, tries + 1); - }, 150 * tries); - } - waitForSocketClosed(callback, tries = 1) { - if (tries === 5 || !this.conn || this.conn.readyState === SOCKET_STATES.closed) { - callback(); - return; - } - setTimeout(() => { - this.waitForSocketClosed(callback, tries + 1); - }, 150 * tries); - } - onConnClose(event) { - let closeCode = event && event.code; - if (this.hasLogger()) - this.log("transport", "close", event); - this.triggerChanError(); - this.clearHeartbeats(); - if (!this.closeWasClean && closeCode !== 1e3) { - this.reconnectTimer.scheduleTimeout(); - } - this.stateChangeCallbacks.close.forEach(([, callback]) => callback(event)); - } - /** - * @private - */ - onConnError(error) { - if (this.hasLogger()) - this.log("transport", error); - let transportBefore = this.transport; - let establishedBefore = this.establishedConnections; - this.stateChangeCallbacks.error.forEach(([, callback]) => { - callback(error, transportBefore, establishedBefore); - }); - if (transportBefore === this.transport || establishedBefore > 0) { - this.triggerChanError(); - } - } - /** - * @private - */ - triggerChanError() { - this.channels.forEach((channel) => { - if (!(channel.isErrored() || channel.isLeaving() || channel.isClosed())) { - channel.trigger(CHANNEL_EVENTS.error); - } - }); - } - /** - * @returns {string} - */ - connectionState() { - switch (this.conn && this.conn.readyState) { - case SOCKET_STATES.connecting: - return "connecting"; - case SOCKET_STATES.open: - return "open"; - case SOCKET_STATES.closing: - return "closing"; - default: - return "closed"; - } - } - /** - * @returns {boolean} - */ - isConnected() { - return this.connectionState() === "open"; - } - /** - * @private - * - * @param {Channel} - */ - remove(channel) { - this.off(channel.stateChangeRefs); - this.channels = this.channels.filter((c) => c !== channel); - } - /** - * Removes `onOpen`, `onClose`, `onError,` and `onMessage` registrations. - * - * @param {refs} - list of refs returned by calls to - * `onOpen`, `onClose`, `onError,` and `onMessage` - */ - off(refs) { - for (let key in this.stateChangeCallbacks) { - this.stateChangeCallbacks[key] = this.stateChangeCallbacks[key].filter(([ref]) => { - return refs.indexOf(ref) === -1; - }); - } - } - /** - * Initiates a new channel for the given topic - * - * @param {string} topic - * @param {Object} chanParams - Parameters for the channel - * @returns {Channel} - */ - channel(topic, chanParams = {}) { - let chan = new Channel(topic, chanParams, this); - this.channels.push(chan); - return chan; - } - /** - * @param {Object} data - */ - push(data) { - if (this.hasLogger()) { - let { topic, event, payload, ref, join_ref } = data; - this.log("push", `${topic} ${event} (${join_ref}, ${ref})`, payload); - } - if (this.isConnected()) { - this.encode(data, (result) => this.conn.send(result)); - } else { - this.sendBuffer.push(() => this.encode(data, (result) => this.conn.send(result))); - } - } - /** - * Return the next message ref, accounting for overflows - * @returns {string} - */ - makeRef() { - let newRef = this.ref + 1; - if (newRef === this.ref) { - this.ref = 0; - } else { - this.ref = newRef; - } - return this.ref.toString(); - } - sendHeartbeat() { - if (this.pendingHeartbeatRef && !this.isConnected()) { - return; - } - this.pendingHeartbeatRef = this.makeRef(); - this.push({ topic: "phoenix", event: "heartbeat", payload: {}, ref: this.pendingHeartbeatRef }); - this.heartbeatTimeoutTimer = setTimeout(() => this.heartbeatTimeout(), this.heartbeatIntervalMs); - } - flushSendBuffer() { - if (this.isConnected() && this.sendBuffer.length > 0) { - this.sendBuffer.forEach((callback) => callback()); - this.sendBuffer = []; - } - } - onConnMessage(rawMessage) { - this.decode(rawMessage.data, (msg) => { - let { topic, event, payload, ref, join_ref } = msg; - if (ref && ref === this.pendingHeartbeatRef) { - this.clearHeartbeats(); - this.pendingHeartbeatRef = null; - this.heartbeatTimer = setTimeout(() => this.sendHeartbeat(), this.heartbeatIntervalMs); - } - if (this.hasLogger()) - this.log("receive", `${payload.status || ""} ${topic} ${event} ${ref && "(" + ref + ")" || ""}`, payload); - for (let i = 0; i < this.channels.length; i++) { - const channel = this.channels[i]; - if (!channel.isMember(topic, event, payload, join_ref)) { - continue; - } - channel.trigger(event, payload, ref, join_ref); - } - for (let i = 0; i < this.stateChangeCallbacks.message.length; i++) { - let [, callback] = this.stateChangeCallbacks.message[i]; - callback(msg); - } - }); - } - leaveOpenTopic(topic) { - let dupChannel = this.channels.find((c) => c.topic === topic && (c.isJoined() || c.isJoining())); - if (dupChannel) { - if (this.hasLogger()) - this.log("transport", `leaving duplicate topic "${topic}"`); - dupChannel.leave(); - } - } - }; - - // js/app.js - var import_topbar = __toESM(require_topbar()); - - // ../deps/phoenix_live_view/priv/static/phoenix_live_view.esm.js - var CONSECUTIVE_RELOADS = "consecutive-reloads"; - var MAX_RELOADS = 10; - var RELOAD_JITTER_MIN = 5e3; - var RELOAD_JITTER_MAX = 1e4; - var FAILSAFE_JITTER = 3e4; - var PHX_EVENT_CLASSES = [ - "phx-click-loading", - "phx-change-loading", - "phx-submit-loading", - "phx-keydown-loading", - "phx-keyup-loading", - "phx-blur-loading", - "phx-focus-loading", - "phx-hook-loading" - ]; - var PHX_COMPONENT = "data-phx-component"; - var PHX_LIVE_LINK = "data-phx-link"; - var PHX_TRACK_STATIC = "track-static"; - var PHX_LINK_STATE = "data-phx-link-state"; - var PHX_REF = "data-phx-ref"; - var PHX_REF_SRC = "data-phx-ref-src"; - var PHX_TRACK_UPLOADS = "track-uploads"; - var PHX_UPLOAD_REF = "data-phx-upload-ref"; - var PHX_PREFLIGHTED_REFS = "data-phx-preflighted-refs"; - var PHX_DONE_REFS = "data-phx-done-refs"; - var PHX_DROP_TARGET = "drop-target"; - var PHX_ACTIVE_ENTRY_REFS = "data-phx-active-refs"; - var PHX_LIVE_FILE_UPDATED = "phx:live-file:updated"; - var PHX_SKIP = "data-phx-skip"; - var PHX_MAGIC_ID = "data-phx-id"; - var PHX_PRUNE = "data-phx-prune"; - var PHX_PAGE_LOADING = "page-loading"; - var PHX_CONNECTED_CLASS = "phx-connected"; - var PHX_LOADING_CLASS = "phx-loading"; - var PHX_NO_FEEDBACK_CLASS = "phx-no-feedback"; - var PHX_ERROR_CLASS = "phx-error"; - var PHX_CLIENT_ERROR_CLASS = "phx-client-error"; - var PHX_SERVER_ERROR_CLASS = "phx-server-error"; - var PHX_PARENT_ID = "data-phx-parent-id"; - var PHX_MAIN = "data-phx-main"; - var PHX_ROOT_ID = "data-phx-root-id"; - var PHX_VIEWPORT_TOP = "viewport-top"; - var PHX_VIEWPORT_BOTTOM = "viewport-bottom"; - var PHX_TRIGGER_ACTION = "trigger-action"; - var PHX_FEEDBACK_FOR = "feedback-for"; - var PHX_FEEDBACK_GROUP = "feedback-group"; - var PHX_HAS_FOCUSED = "phx-has-focused"; - var FOCUSABLE_INPUTS = ["text", "textarea", "number", "email", "password", "search", "tel", "url", "date", "time", "datetime-local", "color", "range"]; - var CHECKABLE_INPUTS = ["checkbox", "radio"]; - var PHX_HAS_SUBMITTED = "phx-has-submitted"; - var PHX_SESSION = "data-phx-session"; - var PHX_VIEW_SELECTOR = `[${PHX_SESSION}]`; - var PHX_STICKY = "data-phx-sticky"; - var PHX_STATIC = "data-phx-static"; - var PHX_READONLY = "data-phx-readonly"; - var PHX_DISABLED = "data-phx-disabled"; - var PHX_DISABLE_WITH = "disable-with"; - var PHX_DISABLE_WITH_RESTORE = "data-phx-disable-with-restore"; - var PHX_HOOK = "hook"; - var PHX_DEBOUNCE = "debounce"; - var PHX_THROTTLE = "throttle"; - var PHX_UPDATE = "update"; - var PHX_STREAM = "stream"; - var PHX_STREAM_REF = "data-phx-stream"; - var PHX_KEY = "key"; - var PHX_PRIVATE = "phxPrivate"; - var PHX_AUTO_RECOVER = "auto-recover"; - var PHX_LV_DEBUG = "phx:live-socket:debug"; - var PHX_LV_PROFILE = "phx:live-socket:profiling"; - var PHX_LV_LATENCY_SIM = "phx:live-socket:latency-sim"; - var PHX_PROGRESS = "progress"; - var PHX_MOUNTED = "mounted"; - var LOADER_TIMEOUT = 1; - var BEFORE_UNLOAD_LOADER_TIMEOUT = 200; - var BINDING_PREFIX = "phx-"; - var PUSH_TIMEOUT = 3e4; - var DEBOUNCE_TRIGGER = "debounce-trigger"; - var THROTTLED = "throttled"; - var DEBOUNCE_PREV_KEY = "debounce-prev-key"; - var DEFAULTS = { - debounce: 300, - throttle: 300 - }; - var DYNAMICS = "d"; - var STATIC = "s"; - var ROOT = "r"; - var COMPONENTS = "c"; - var EVENTS = "e"; - var REPLY = "r"; - var TITLE = "t"; - var TEMPLATES = "p"; - var STREAM = "stream"; - var EntryUploader = class { - constructor(entry, chunkSize, liveSocket2) { - this.liveSocket = liveSocket2; - this.entry = entry; - this.offset = 0; - this.chunkSize = chunkSize; - this.chunkTimer = null; - this.errored = false; - this.uploadChannel = liveSocket2.channel(`lvu:${entry.ref}`, { token: entry.metadata() }); - } - error(reason) { - if (this.errored) { - return; - } - this.uploadChannel.leave(); - this.errored = true; - clearTimeout(this.chunkTimer); - this.entry.error(reason); - } - upload() { - this.uploadChannel.onError((reason) => this.error(reason)); - this.uploadChannel.join().receive("ok", (_data) => this.readNextChunk()).receive("error", (reason) => this.error(reason)); - } - isDone() { - return this.offset >= this.entry.file.size; - } - readNextChunk() { - let reader = new window.FileReader(); - let blob = this.entry.file.slice(this.offset, this.chunkSize + this.offset); - reader.onload = (e) => { - if (e.target.error === null) { - this.offset += e.target.result.byteLength; - this.pushChunk(e.target.result); - } else { - return logError("Read error: " + e.target.error); - } - }; - reader.readAsArrayBuffer(blob); - } - pushChunk(chunk) { - if (!this.uploadChannel.isJoined()) { - return; - } - this.uploadChannel.push("chunk", chunk).receive("ok", () => { - this.entry.progress(this.offset / this.entry.file.size * 100); - if (!this.isDone()) { - this.chunkTimer = setTimeout(() => this.readNextChunk(), this.liveSocket.getLatencySim() || 0); - } - }).receive("error", ({ reason }) => this.error(reason)); - } - }; - var logError = (msg, obj) => console.error && console.error(msg, obj); - var isCid = (cid) => { - let type = typeof cid; - return type === "number" || type === "string" && /^(0|[1-9]\d*)$/.test(cid); - }; - function detectDuplicateIds() { - let ids = /* @__PURE__ */ new Set(); - let elems = document.querySelectorAll("*[id]"); - for (let i = 0, len = elems.length; i < len; i++) { - if (ids.has(elems[i].id)) { - console.error(`Multiple IDs detected: ${elems[i].id}. Ensure unique element ids.`); - } else { - ids.add(elems[i].id); - } - } - } - var debug = (view, kind, msg, obj) => { - if (view.liveSocket.isDebugEnabled()) { - console.log(`${view.id} ${kind}: ${msg} - `, obj); - } - }; - var closure2 = (val) => typeof val === "function" ? val : function() { - return val; - }; - var clone = (obj) => { - return JSON.parse(JSON.stringify(obj)); - }; - var closestPhxBinding = (el, binding, borderEl) => { - do { - if (el.matches(`[${binding}]`) && !el.disabled) { - return el; - } - el = el.parentElement || el.parentNode; - } while (el !== null && el.nodeType === 1 && !(borderEl && borderEl.isSameNode(el) || el.matches(PHX_VIEW_SELECTOR))); - return null; - }; - var isObject = (obj) => { - return obj !== null && typeof obj === "object" && !(obj instanceof Array); - }; - var isEqualObj = (obj1, obj2) => JSON.stringify(obj1) === JSON.stringify(obj2); - var isEmpty = (obj) => { - for (let x in obj) { - return false; - } - return true; - }; - var maybe = (el, callback) => el && callback(el); - var channelUploader = function(entries, onError, resp, liveSocket2) { - entries.forEach((entry) => { - let entryUploader = new EntryUploader(entry, resp.config.chunk_size, liveSocket2); - entryUploader.upload(); - }); - }; - var Browser = { - canPushState() { - return typeof history.pushState !== "undefined"; - }, - dropLocal(localStorage, namespace, subkey) { - return localStorage.removeItem(this.localKey(namespace, subkey)); - }, - updateLocal(localStorage, namespace, subkey, initial, func) { - let current = this.getLocal(localStorage, namespace, subkey); - let key = this.localKey(namespace, subkey); - let newVal = current === null ? initial : func(current); - localStorage.setItem(key, JSON.stringify(newVal)); - return newVal; - }, - getLocal(localStorage, namespace, subkey) { - return JSON.parse(localStorage.getItem(this.localKey(namespace, subkey))); - }, - updateCurrentState(callback) { - if (!this.canPushState()) { - return; - } - history.replaceState(callback(history.state || {}), "", window.location.href); - }, - pushState(kind, meta, to) { - if (this.canPushState()) { - if (to !== window.location.href) { - if (meta.type == "redirect" && meta.scroll) { - let currentState = history.state || {}; - currentState.scroll = meta.scroll; - history.replaceState(currentState, "", window.location.href); - } - delete meta.scroll; - history[kind + "State"](meta, "", to || null); - let hashEl = this.getHashTargetEl(window.location.hash); - if (hashEl) { - hashEl.scrollIntoView(); - } else if (meta.type === "redirect") { - window.scroll(0, 0); - } - } - } else { - this.redirect(to); - } - }, - setCookie(name, value) { - document.cookie = `${name}=${value}`; - }, - getCookie(name) { - return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${name}s*=s*([^;]*).*$)|^.*$`), "$1"); - }, - redirect(toURL, flash) { - if (flash) { - Browser.setCookie("__phoenix_flash__", flash + "; max-age=60000; path=/"); - } - window.location = toURL; - }, - localKey(namespace, subkey) { - return `${namespace}-${subkey}`; - }, - getHashTargetEl(maybeHash) { - let hash = maybeHash.toString().substring(1); - if (hash === "") { - return; - } - return document.getElementById(hash) || document.querySelector(`a[name="${hash}"]`); - } - }; - var browser_default = Browser; - var ARIA = { - focusMain() { - let target = document.querySelector("main h1, main, h1"); - if (target) { - let origTabIndex = target.tabIndex; - target.tabIndex = -1; - target.focus(); - target.tabIndex = origTabIndex; - } - }, - anyOf(instance, classes) { - return classes.find((name) => instance instanceof name); - }, - isFocusable(el, interactiveOnly) { - return el instanceof HTMLAnchorElement && el.rel !== "ignore" || el instanceof HTMLAreaElement && el.href !== void 0 || !el.disabled && this.anyOf(el, [HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement, HTMLButtonElement]) || el instanceof HTMLIFrameElement || (el.tabIndex > 0 || !interactiveOnly && el.getAttribute("tabindex") !== null && el.getAttribute("aria-hidden") !== "true"); - }, - attemptFocus(el, interactiveOnly) { - if (this.isFocusable(el, interactiveOnly)) { - try { - el.focus(); - } catch (e) { - } - } - return !!document.activeElement && document.activeElement.isSameNode(el); - }, - focusFirstInteractive(el) { - let child = el.firstElementChild; - while (child) { - if (this.attemptFocus(child, true) || this.focusFirstInteractive(child, true)) { - return true; - } - child = child.nextElementSibling; - } - }, - focusFirst(el) { - let child = el.firstElementChild; - while (child) { - if (this.attemptFocus(child) || this.focusFirst(child)) { - return true; - } - child = child.nextElementSibling; - } - }, - focusLast(el) { - let child = el.lastElementChild; - while (child) { - if (this.attemptFocus(child) || this.focusLast(child)) { - return true; - } - child = child.previousElementSibling; - } - } - }; - var aria_default = ARIA; - var focusStack = []; - var default_transition_time = 200; - var JS = { - exec(eventType, phxEvent, view, sourceEl, defaults) { - let [defaultKind, defaultArgs] = defaults || [null, { callback: defaults && defaults.callback }]; - let commands = phxEvent.charAt(0) === "[" ? JSON.parse(phxEvent) : [[defaultKind, defaultArgs]]; - commands.forEach(([kind, args]) => { - if (kind === defaultKind && defaultArgs.data) { - args.data = Object.assign(args.data || {}, defaultArgs.data); - args.callback = args.callback || defaultArgs.callback; - } - this.filterToEls(sourceEl, args).forEach((el) => { - this[`exec_${kind}`](eventType, phxEvent, view, sourceEl, el, args); - }); - }); - }, - isVisible(el) { - return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length > 0); - }, - isInViewport(el) { - const rect = el.getBoundingClientRect(); - const windowHeight = window.innerHeight || document.documentElement.clientHeight; - const windowWidth = window.innerWidth || document.documentElement.clientWidth; - return rect.right > 0 && rect.bottom > 0 && rect.left < windowWidth && rect.top < windowHeight; - }, - exec_exec(eventType, phxEvent, view, sourceEl, el, { attr, to }) { - let nodes = to ? dom_default.all(document, to) : [sourceEl]; - nodes.forEach((node) => { - let encodedJS = node.getAttribute(attr); - if (!encodedJS) { - throw new Error(`expected ${attr} to contain JS command on "${to}"`); - } - view.liveSocket.execJS(node, encodedJS, eventType); - }); - }, - exec_dispatch(eventType, phxEvent, view, sourceEl, el, { to, event, detail, bubbles }) { - detail = detail || {}; - detail.dispatcher = sourceEl; - dom_default.dispatchEvent(el, event, { detail, bubbles }); - }, - exec_push(eventType, phxEvent, view, sourceEl, el, args) { - let { event, data, target, page_loading, loading, value, dispatcher, callback } = args; - let pushOpts = { loading, value, target, page_loading: !!page_loading }; - let targetSrc = eventType === "change" && dispatcher ? dispatcher : sourceEl; - let phxTarget = target || targetSrc.getAttribute(view.binding("target")) || targetSrc; - view.withinTargets(phxTarget, (targetView, targetCtx) => { - if (!targetView.isConnected()) { - return; - } - if (eventType === "change") { - let { newCid, _target } = args; - _target = _target || (dom_default.isFormInput(sourceEl) ? sourceEl.name : void 0); - if (_target) { - pushOpts._target = _target; - } - targetView.pushInput(sourceEl, targetCtx, newCid, event || phxEvent, pushOpts, callback); - } else if (eventType === "submit") { - let { submitter } = args; - targetView.submitForm(sourceEl, targetCtx, event || phxEvent, submitter, pushOpts, callback); - } else { - targetView.pushEvent(eventType, sourceEl, targetCtx, event || phxEvent, data, pushOpts, callback); - } - }); - }, - exec_navigate(eventType, phxEvent, view, sourceEl, el, { href, replace }) { - view.liveSocket.historyRedirect(href, replace ? "replace" : "push"); - }, - exec_patch(eventType, phxEvent, view, sourceEl, el, { href, replace }) { - view.liveSocket.pushHistoryPatch(href, replace ? "replace" : "push", sourceEl); - }, - exec_focus(eventType, phxEvent, view, sourceEl, el) { - window.requestAnimationFrame(() => aria_default.attemptFocus(el)); - }, - exec_focus_first(eventType, phxEvent, view, sourceEl, el) { - window.requestAnimationFrame(() => aria_default.focusFirstInteractive(el) || aria_default.focusFirst(el)); - }, - exec_push_focus(eventType, phxEvent, view, sourceEl, el) { - window.requestAnimationFrame(() => focusStack.push(el || sourceEl)); - }, - exec_pop_focus(eventType, phxEvent, view, sourceEl, el) { - window.requestAnimationFrame(() => { - const el2 = focusStack.pop(); - if (el2) { - el2.focus(); - } - }); - }, - exec_add_class(eventType, phxEvent, view, sourceEl, el, { names, transition, time }) { - this.addOrRemoveClasses(el, names, [], transition, time, view); - }, - exec_remove_class(eventType, phxEvent, view, sourceEl, el, { names, transition, time }) { - this.addOrRemoveClasses(el, [], names, transition, time, view); - }, - exec_toggle_class(eventType, phxEvent, view, sourceEl, el, { to, names, transition, time }) { - this.toggleClasses(el, names, transition, time, view); - }, - exec_toggle_attr(eventType, phxEvent, view, sourceEl, el, { attr: [attr, val1, val2] }) { - if (el.hasAttribute(attr)) { - if (val2 !== void 0) { - if (el.getAttribute(attr) === val1) { - this.setOrRemoveAttrs(el, [[attr, val2]], []); - } else { - this.setOrRemoveAttrs(el, [[attr, val1]], []); - } - } else { - this.setOrRemoveAttrs(el, [], [attr]); - } - } else { - this.setOrRemoveAttrs(el, [[attr, val1]], []); - } - }, - exec_transition(eventType, phxEvent, view, sourceEl, el, { time, transition }) { - this.addOrRemoveClasses(el, [], [], transition, time, view); - }, - exec_toggle(eventType, phxEvent, view, sourceEl, el, { display, ins, outs, time }) { - this.toggle(eventType, view, el, display, ins, outs, time); - }, - exec_show(eventType, phxEvent, view, sourceEl, el, { display, transition, time }) { - this.show(eventType, view, el, display, transition, time); - }, - exec_hide(eventType, phxEvent, view, sourceEl, el, { display, transition, time }) { - this.hide(eventType, view, el, display, transition, time); - }, - exec_set_attr(eventType, phxEvent, view, sourceEl, el, { attr: [attr, val] }) { - this.setOrRemoveAttrs(el, [[attr, val]], []); - }, - exec_remove_attr(eventType, phxEvent, view, sourceEl, el, { attr }) { - this.setOrRemoveAttrs(el, [], [attr]); - }, - show(eventType, view, el, display, transition, time) { - if (!this.isVisible(el)) { - this.toggle(eventType, view, el, display, transition, null, time); - } - }, - hide(eventType, view, el, display, transition, time) { - if (this.isVisible(el)) { - this.toggle(eventType, view, el, display, null, transition, time); - } - }, - toggle(eventType, view, el, display, ins, outs, time) { - time = time || default_transition_time; - let [inClasses, inStartClasses, inEndClasses] = ins || [[], [], []]; - let [outClasses, outStartClasses, outEndClasses] = outs || [[], [], []]; - if (inClasses.length > 0 || outClasses.length > 0) { - if (this.isVisible(el)) { - let onStart = () => { - this.addOrRemoveClasses(el, outStartClasses, inClasses.concat(inStartClasses).concat(inEndClasses)); - window.requestAnimationFrame(() => { - this.addOrRemoveClasses(el, outClasses, []); - window.requestAnimationFrame(() => this.addOrRemoveClasses(el, outEndClasses, outStartClasses)); - }); - }; - el.dispatchEvent(new Event("phx:hide-start")); - view.transition(time, onStart, () => { - this.addOrRemoveClasses(el, [], outClasses.concat(outEndClasses)); - dom_default.putSticky(el, "toggle", (currentEl) => currentEl.style.display = "none"); - el.dispatchEvent(new Event("phx:hide-end")); - }); - } else { - if (eventType === "remove") { - return; - } - let onStart = () => { - this.addOrRemoveClasses(el, inStartClasses, outClasses.concat(outStartClasses).concat(outEndClasses)); - let stickyDisplay = display || this.defaultDisplay(el); - dom_default.putSticky(el, "toggle", (currentEl) => currentEl.style.display = stickyDisplay); - window.requestAnimationFrame(() => { - this.addOrRemoveClasses(el, inClasses, []); - window.requestAnimationFrame(() => this.addOrRemoveClasses(el, inEndClasses, inStartClasses)); - }); - }; - el.dispatchEvent(new Event("phx:show-start")); - view.transition(time, onStart, () => { - this.addOrRemoveClasses(el, [], inClasses.concat(inEndClasses)); - el.dispatchEvent(new Event("phx:show-end")); - }); - } - } else { - if (this.isVisible(el)) { - window.requestAnimationFrame(() => { - el.dispatchEvent(new Event("phx:hide-start")); - dom_default.putSticky(el, "toggle", (currentEl) => currentEl.style.display = "none"); - el.dispatchEvent(new Event("phx:hide-end")); - }); - } else { - window.requestAnimationFrame(() => { - el.dispatchEvent(new Event("phx:show-start")); - let stickyDisplay = display || this.defaultDisplay(el); - dom_default.putSticky(el, "toggle", (currentEl) => currentEl.style.display = stickyDisplay); - el.dispatchEvent(new Event("phx:show-end")); - }); - } - } - }, - toggleClasses(el, classes, transition, time, view) { - window.requestAnimationFrame(() => { - let [prevAdds, prevRemoves] = dom_default.getSticky(el, "classes", [[], []]); - let newAdds = classes.filter((name) => prevAdds.indexOf(name) < 0 && !el.classList.contains(name)); - let newRemoves = classes.filter((name) => prevRemoves.indexOf(name) < 0 && el.classList.contains(name)); - this.addOrRemoveClasses(el, newAdds, newRemoves, transition, time, view); - }); - }, - addOrRemoveClasses(el, adds, removes, transition, time, view) { - time = time || default_transition_time; - let [transitionRun, transitionStart, transitionEnd] = transition || [[], [], []]; - if (transitionRun.length > 0) { - let onStart = () => { - this.addOrRemoveClasses(el, transitionStart, [].concat(transitionRun).concat(transitionEnd)); - window.requestAnimationFrame(() => { - this.addOrRemoveClasses(el, transitionRun, []); - window.requestAnimationFrame(() => this.addOrRemoveClasses(el, transitionEnd, transitionStart)); - }); - }; - let onDone = () => this.addOrRemoveClasses(el, adds.concat(transitionEnd), removes.concat(transitionRun).concat(transitionStart)); - return view.transition(time, onStart, onDone); - } - window.requestAnimationFrame(() => { - let [prevAdds, prevRemoves] = dom_default.getSticky(el, "classes", [[], []]); - let keepAdds = adds.filter((name) => prevAdds.indexOf(name) < 0 && !el.classList.contains(name)); - let keepRemoves = removes.filter((name) => prevRemoves.indexOf(name) < 0 && el.classList.contains(name)); - let newAdds = prevAdds.filter((name) => removes.indexOf(name) < 0).concat(keepAdds); - let newRemoves = prevRemoves.filter((name) => adds.indexOf(name) < 0).concat(keepRemoves); - dom_default.putSticky(el, "classes", (currentEl) => { - currentEl.classList.remove(...newRemoves); - currentEl.classList.add(...newAdds); - return [newAdds, newRemoves]; - }); - }); - }, - setOrRemoveAttrs(el, sets, removes) { - let [prevSets, prevRemoves] = dom_default.getSticky(el, "attrs", [[], []]); - let alteredAttrs = sets.map(([attr, _val]) => attr).concat(removes); - let newSets = prevSets.filter(([attr, _val]) => !alteredAttrs.includes(attr)).concat(sets); - let newRemoves = prevRemoves.filter((attr) => !alteredAttrs.includes(attr)).concat(removes); - dom_default.putSticky(el, "attrs", (currentEl) => { - newRemoves.forEach((attr) => currentEl.removeAttribute(attr)); - newSets.forEach(([attr, val]) => currentEl.setAttribute(attr, val)); - return [newSets, newRemoves]; - }); - }, - hasAllClasses(el, classes) { - return classes.every((name) => el.classList.contains(name)); - }, - isToggledOut(el, outClasses) { - return !this.isVisible(el) || this.hasAllClasses(el, outClasses); - }, - filterToEls(sourceEl, { to }) { - return to ? dom_default.all(document, to) : [sourceEl]; - }, - defaultDisplay(el) { - return { tr: "table-row", td: "table-cell" }[el.tagName.toLowerCase()] || "block"; - } - }; - var js_default = JS; - var DOM = { - byId(id) { - return document.getElementById(id) || logError(`no id found for ${id}`); - }, - removeClass(el, className) { - el.classList.remove(className); - if (el.classList.length === 0) { - el.removeAttribute("class"); - } - }, - all(node, query, callback) { - if (!node) { - return []; - } - let array = Array.from(node.querySelectorAll(query)); - return callback ? array.forEach(callback) : array; - }, - childNodeLength(html) { - let template = document.createElement("template"); - template.innerHTML = html; - return template.content.childElementCount; - }, - isUploadInput(el) { - return el.type === "file" && el.getAttribute(PHX_UPLOAD_REF) !== null; - }, - isAutoUpload(inputEl) { - return inputEl.hasAttribute("data-phx-auto-upload"); - }, - findUploadInputs(node) { - const formId = node.id; - const inputsOutsideForm = this.all(document, `input[type="file"][${PHX_UPLOAD_REF}][form="${formId}"]`); - return this.all(node, `input[type="file"][${PHX_UPLOAD_REF}]`).concat(inputsOutsideForm); - }, - findComponentNodeList(node, cid) { - return this.filterWithinSameLiveView(this.all(node, `[${PHX_COMPONENT}="${cid}"]`), node); - }, - isPhxDestroyed(node) { - return node.id && DOM.private(node, "destroyed") ? true : false; - }, - wantsNewTab(e) { - let wantsNewTab = e.ctrlKey || e.shiftKey || e.metaKey || e.button && e.button === 1; - let isDownload = e.target instanceof HTMLAnchorElement && e.target.hasAttribute("download"); - let isTargetBlank = e.target.hasAttribute("target") && e.target.getAttribute("target").toLowerCase() === "_blank"; - let isTargetNamedTab = e.target.hasAttribute("target") && !e.target.getAttribute("target").startsWith("_"); - return wantsNewTab || isTargetBlank || isDownload || isTargetNamedTab; - }, - isUnloadableFormSubmit(e) { - let isDialogSubmit = e.target && e.target.getAttribute("method") === "dialog" || e.submitter && e.submitter.getAttribute("formmethod") === "dialog"; - if (isDialogSubmit) { - return false; - } else { - return !e.defaultPrevented && !this.wantsNewTab(e); - } - }, - isNewPageClick(e, currentLocation) { - let href = e.target instanceof HTMLAnchorElement ? e.target.getAttribute("href") : null; - let url; - if (e.defaultPrevented || href === null || this.wantsNewTab(e)) { - return false; - } - if (href.startsWith("mailto:") || href.startsWith("tel:")) { - return false; - } - if (e.target.isContentEditable) { - return false; - } - try { - url = new URL(href); - } catch (e2) { - try { - url = new URL(href, currentLocation); - } catch (e3) { - return true; - } - } - if (url.host === currentLocation.host && url.protocol === currentLocation.protocol) { - if (url.pathname === currentLocation.pathname && url.search === currentLocation.search) { - return url.hash === "" && !url.href.endsWith("#"); - } - } - return url.protocol.startsWith("http"); - }, - markPhxChildDestroyed(el) { - if (this.isPhxChild(el)) { - el.setAttribute(PHX_SESSION, ""); - } - this.putPrivate(el, "destroyed", true); - }, - findPhxChildrenInFragment(html, parentId) { - let template = document.createElement("template"); - template.innerHTML = html; - return this.findPhxChildren(template.content, parentId); - }, - isIgnored(el, phxUpdate) { - return (el.getAttribute(phxUpdate) || el.getAttribute("data-phx-update")) === "ignore"; - }, - isPhxUpdate(el, phxUpdate, updateTypes) { - return el.getAttribute && updateTypes.indexOf(el.getAttribute(phxUpdate)) >= 0; - }, - findPhxSticky(el) { - return this.all(el, `[${PHX_STICKY}]`); - }, - findPhxChildren(el, parentId) { - return this.all(el, `${PHX_VIEW_SELECTOR}[${PHX_PARENT_ID}="${parentId}"]`); - }, - findExistingParentCIDs(node, cids) { - let parentCids = /* @__PURE__ */ new Set(); - let childrenCids = /* @__PURE__ */ new Set(); - cids.forEach((cid) => { - this.filterWithinSameLiveView(this.all(node, `[${PHX_COMPONENT}="${cid}"]`), node).forEach((parent) => { - parentCids.add(cid); - this.all(parent, `[${PHX_COMPONENT}]`).map((el) => parseInt(el.getAttribute(PHX_COMPONENT))).forEach((childCID) => childrenCids.add(childCID)); - }); - }); - childrenCids.forEach((childCid) => parentCids.delete(childCid)); - return parentCids; - }, - filterWithinSameLiveView(nodes, parent) { - if (parent.querySelector(PHX_VIEW_SELECTOR)) { - return nodes.filter((el) => this.withinSameLiveView(el, parent)); - } else { - return nodes; - } - }, - withinSameLiveView(node, parent) { - while (node = node.parentNode) { - if (node.isSameNode(parent)) { - return true; - } - if (node.getAttribute(PHX_SESSION) !== null) { - return false; - } - } - }, - private(el, key) { - return el[PHX_PRIVATE] && el[PHX_PRIVATE][key]; - }, - deletePrivate(el, key) { - el[PHX_PRIVATE] && delete el[PHX_PRIVATE][key]; - }, - putPrivate(el, key, value) { - if (!el[PHX_PRIVATE]) { - el[PHX_PRIVATE] = {}; - } - el[PHX_PRIVATE][key] = value; - }, - updatePrivate(el, key, defaultVal, updateFunc) { - let existing = this.private(el, key); - if (existing === void 0) { - this.putPrivate(el, key, updateFunc(defaultVal)); - } else { - this.putPrivate(el, key, updateFunc(existing)); - } - }, - copyPrivates(target, source) { - if (source[PHX_PRIVATE]) { - target[PHX_PRIVATE] = source[PHX_PRIVATE]; - } - }, - putTitle(str) { - let titleEl = document.querySelector("title"); - if (titleEl) { - let { prefix, suffix } = titleEl.dataset; - document.title = `${prefix || ""}${str}${suffix || ""}`; - } else { - document.title = str; - } - }, - debounce(el, event, phxDebounce, defaultDebounce, phxThrottle, defaultThrottle, asyncFilter, callback) { - let debounce = el.getAttribute(phxDebounce); - let throttle = el.getAttribute(phxThrottle); - if (debounce === "") { - debounce = defaultDebounce; - } - if (throttle === "") { - throttle = defaultThrottle; - } - let value = debounce || throttle; - switch (value) { - case null: - return callback(); - case "blur": - if (this.once(el, "debounce-blur")) { - el.addEventListener("blur", () => { - if (asyncFilter()) { - callback(); - } - }); - } - return; - default: - let timeout = parseInt(value); - let trigger = () => throttle ? this.deletePrivate(el, THROTTLED) : callback(); - let currentCycle = this.incCycle(el, DEBOUNCE_TRIGGER, trigger); - if (isNaN(timeout)) { - return logError(`invalid throttle/debounce value: ${value}`); - } - if (throttle) { - let newKeyDown = false; - if (event.type === "keydown") { - let prevKey = this.private(el, DEBOUNCE_PREV_KEY); - this.putPrivate(el, DEBOUNCE_PREV_KEY, event.key); - newKeyDown = prevKey !== event.key; - } - if (!newKeyDown && this.private(el, THROTTLED)) { - return false; - } else { - callback(); - const t = setTimeout(() => { - if (asyncFilter()) { - this.triggerCycle(el, DEBOUNCE_TRIGGER); - } - }, timeout); - this.putPrivate(el, THROTTLED, t); - } - } else { - setTimeout(() => { - if (asyncFilter()) { - this.triggerCycle(el, DEBOUNCE_TRIGGER, currentCycle); - } - }, timeout); - } - let form = el.form; - if (form && this.once(form, "bind-debounce")) { - form.addEventListener("submit", () => { - Array.from(new FormData(form).entries(), ([name]) => { - let input = form.querySelector(`[name="${name}"]`); - this.incCycle(input, DEBOUNCE_TRIGGER); - this.deletePrivate(input, THROTTLED); - }); - }); - } - if (this.once(el, "bind-debounce")) { - el.addEventListener("blur", () => { - clearTimeout(this.private(el, THROTTLED)); - this.triggerCycle(el, DEBOUNCE_TRIGGER); - }); - } - } - }, - triggerCycle(el, key, currentCycle) { - let [cycle, trigger] = this.private(el, key); - if (!currentCycle) { - currentCycle = cycle; - } - if (currentCycle === cycle) { - this.incCycle(el, key); - trigger(); - } - }, - once(el, key) { - if (this.private(el, key) === true) { - return false; - } - this.putPrivate(el, key, true); - return true; - }, - incCycle(el, key, trigger = function() { - }) { - let [currentCycle] = this.private(el, key) || [0, trigger]; - currentCycle++; - this.putPrivate(el, key, [currentCycle, trigger]); - return currentCycle; - }, - maybeAddPrivateHooks(el, phxViewportTop, phxViewportBottom) { - if (el.hasAttribute && (el.hasAttribute(phxViewportTop) || el.hasAttribute(phxViewportBottom))) { - el.setAttribute("data-phx-hook", "Phoenix.InfiniteScroll"); - } - }, - isFeedbackContainer(el, phxFeedbackFor) { - return el.hasAttribute && el.hasAttribute(phxFeedbackFor); - }, - maybeHideFeedback(container, feedbackContainers, phxFeedbackFor, phxFeedbackGroup) { - const feedbackResults = {}; - feedbackContainers.forEach((el) => { - if (!container.contains(el)) - return; - const feedback = el.getAttribute(phxFeedbackFor); - if (!feedback) { - js_default.addOrRemoveClasses(el, [], [PHX_NO_FEEDBACK_CLASS]); - return; - } - if (feedbackResults[feedback] === true) { - this.hideFeedback(el); - return; - } - feedbackResults[feedback] = this.shouldHideFeedback(container, feedback, phxFeedbackGroup); - if (feedbackResults[feedback] === true) { - this.hideFeedback(el); - } - }); - }, - hideFeedback(container) { - js_default.addOrRemoveClasses(container, [PHX_NO_FEEDBACK_CLASS], []); - }, - shouldHideFeedback(container, nameOrGroup, phxFeedbackGroup) { - const query = `[name="${nameOrGroup}"], - [name="${nameOrGroup}[]"], - [${phxFeedbackGroup}="${nameOrGroup}"]`; - let focused = false; - DOM.all(container, query, (input) => { - if (this.private(input, PHX_HAS_FOCUSED) || this.private(input, PHX_HAS_SUBMITTED)) { - focused = true; - } - }); - return !focused; - }, - feedbackSelector(input, phxFeedbackFor, phxFeedbackGroup) { - let query = `[${phxFeedbackFor}="${input.name}"], - [${phxFeedbackFor}="${input.name.replace(/\[\]$/, "")}"]`; - if (input.getAttribute(phxFeedbackGroup)) { - query += `,[${phxFeedbackFor}="${input.getAttribute(phxFeedbackGroup)}"]`; - } - return query; - }, - resetForm(form, phxFeedbackFor, phxFeedbackGroup) { - Array.from(form.elements).forEach((input) => { - let query = this.feedbackSelector(input, phxFeedbackFor, phxFeedbackGroup); - this.deletePrivate(input, PHX_HAS_FOCUSED); - this.deletePrivate(input, PHX_HAS_SUBMITTED); - this.all(document, query, (feedbackEl) => { - js_default.addOrRemoveClasses(feedbackEl, [PHX_NO_FEEDBACK_CLASS], []); - }); - }); - }, - showError(inputEl, phxFeedbackFor, phxFeedbackGroup) { - if (inputEl.name) { - let query = this.feedbackSelector(inputEl, phxFeedbackFor, phxFeedbackGroup); - this.all(document, query, (el) => { - js_default.addOrRemoveClasses(el, [], [PHX_NO_FEEDBACK_CLASS]); - }); - } - }, - isPhxChild(node) { - return node.getAttribute && node.getAttribute(PHX_PARENT_ID); - }, - isPhxSticky(node) { - return node.getAttribute && node.getAttribute(PHX_STICKY) !== null; - }, - isChildOfAny(el, parents) { - return !!parents.find((parent) => parent.contains(el)); - }, - firstPhxChild(el) { - return this.isPhxChild(el) ? el : this.all(el, `[${PHX_PARENT_ID}]`)[0]; - }, - dispatchEvent(target, name, opts = {}) { - let defaultBubble = true; - let isUploadTarget = target.nodeName === "INPUT" && target.type === "file"; - if (isUploadTarget && name === "click") { - defaultBubble = false; - } - let bubbles = opts.bubbles === void 0 ? defaultBubble : !!opts.bubbles; - let eventOpts = { bubbles, cancelable: true, detail: opts.detail || {} }; - let event = name === "click" ? new MouseEvent("click", eventOpts) : new CustomEvent(name, eventOpts); - target.dispatchEvent(event); - }, - cloneNode(node, html) { - if (typeof html === "undefined") { - return node.cloneNode(true); - } else { - let cloned = node.cloneNode(false); - cloned.innerHTML = html; - return cloned; - } - }, - mergeAttrs(target, source, opts = {}) { - let exclude = new Set(opts.exclude || []); - let isIgnored = opts.isIgnored; - let sourceAttrs = source.attributes; - for (let i = sourceAttrs.length - 1; i >= 0; i--) { - let name = sourceAttrs[i].name; - if (!exclude.has(name)) { - const sourceValue = source.getAttribute(name); - if (target.getAttribute(name) !== sourceValue && (!isIgnored || isIgnored && name.startsWith("data-"))) { - target.setAttribute(name, sourceValue); - } - } else { - if (name === "value" && target.value === source.value) { - target.setAttribute("value", source.getAttribute(name)); - } - } - } - let targetAttrs = target.attributes; - for (let i = targetAttrs.length - 1; i >= 0; i--) { - let name = targetAttrs[i].name; - if (isIgnored) { - if (name.startsWith("data-") && !source.hasAttribute(name) && ![PHX_REF, PHX_REF_SRC].includes(name)) { - target.removeAttribute(name); - } - } else { - if (!source.hasAttribute(name)) { - target.removeAttribute(name); - } - } - } - }, - mergeFocusedInput(target, source) { - if (!(target instanceof HTMLSelectElement)) { - DOM.mergeAttrs(target, source, { exclude: ["value"] }); - } - if (source.readOnly) { - target.setAttribute("readonly", true); - } else { - target.removeAttribute("readonly"); - } - }, - hasSelectionRange(el) { - return el.setSelectionRange && (el.type === "text" || el.type === "textarea"); - }, - restoreFocus(focused, selectionStart, selectionEnd) { - if (focused instanceof HTMLSelectElement) { - focused.focus(); - } - if (!DOM.isTextualInput(focused)) { - return; - } - let wasFocused = focused.matches(":focus"); - if (!wasFocused) { - focused.focus(); - } - if (this.hasSelectionRange(focused)) { - focused.setSelectionRange(selectionStart, selectionEnd); - } - }, - isFormInput(el) { - return /^(?:input|select|textarea)$/i.test(el.tagName) && el.type !== "button"; - }, - syncAttrsToProps(el) { - if (el instanceof HTMLInputElement && CHECKABLE_INPUTS.indexOf(el.type.toLocaleLowerCase()) >= 0) { - el.checked = el.getAttribute("checked") !== null; - } - }, - isTextualInput(el) { - return FOCUSABLE_INPUTS.indexOf(el.type) >= 0; - }, - isNowTriggerFormExternal(el, phxTriggerExternal) { - return el.getAttribute && el.getAttribute(phxTriggerExternal) !== null; - }, - syncPendingRef(fromEl, toEl, disableWith) { - let ref = fromEl.getAttribute(PHX_REF); - if (ref === null) { - return true; - } - let refSrc = fromEl.getAttribute(PHX_REF_SRC); - if (DOM.isUploadInput(fromEl)) { - DOM.mergeAttrs(fromEl, toEl, { isIgnored: true }); - } - DOM.putPrivate(fromEl, PHX_REF, toEl); - return false; - }, - cleanChildNodes(container, phxUpdate) { - if (DOM.isPhxUpdate(container, phxUpdate, ["append", "prepend"])) { - let toRemove = []; - container.childNodes.forEach((childNode) => { - if (!childNode.id) { - let isEmptyTextNode = childNode.nodeType === Node.TEXT_NODE && childNode.nodeValue.trim() === ""; - if (!isEmptyTextNode && childNode.nodeType !== Node.COMMENT_NODE) { - logError(`only HTML element tags with an id are allowed inside containers with phx-update. - -removing illegal node: "${(childNode.outerHTML || childNode.nodeValue).trim()}" - -`); - } - toRemove.push(childNode); - } - }); - toRemove.forEach((childNode) => childNode.remove()); - } - }, - replaceRootContainer(container, tagName, attrs) { - let retainedAttrs = /* @__PURE__ */ new Set(["id", PHX_SESSION, PHX_STATIC, PHX_MAIN, PHX_ROOT_ID]); - if (container.tagName.toLowerCase() === tagName.toLowerCase()) { - Array.from(container.attributes).filter((attr) => !retainedAttrs.has(attr.name.toLowerCase())).forEach((attr) => container.removeAttribute(attr.name)); - Object.keys(attrs).filter((name) => !retainedAttrs.has(name.toLowerCase())).forEach((attr) => container.setAttribute(attr, attrs[attr])); - return container; - } else { - let newContainer = document.createElement(tagName); - Object.keys(attrs).forEach((attr) => newContainer.setAttribute(attr, attrs[attr])); - retainedAttrs.forEach((attr) => newContainer.setAttribute(attr, container.getAttribute(attr))); - newContainer.innerHTML = container.innerHTML; - container.replaceWith(newContainer); - return newContainer; - } - }, - getSticky(el, name, defaultVal) { - let op = (DOM.private(el, "sticky") || []).find(([existingName]) => name === existingName); - if (op) { - let [_name, _op, stashedResult] = op; - return stashedResult; - } else { - return typeof defaultVal === "function" ? defaultVal() : defaultVal; - } - }, - deleteSticky(el, name) { - this.updatePrivate(el, "sticky", [], (ops) => { - return ops.filter(([existingName, _]) => existingName !== name); - }); - }, - putSticky(el, name, op) { - let stashedResult = op(el); - this.updatePrivate(el, "sticky", [], (ops) => { - let existingIndex = ops.findIndex(([existingName]) => name === existingName); - if (existingIndex >= 0) { - ops[existingIndex] = [name, op, stashedResult]; - } else { - ops.push([name, op, stashedResult]); - } - return ops; - }); - }, - applyStickyOperations(el) { - let ops = DOM.private(el, "sticky"); - if (!ops) { - return; - } - ops.forEach(([name, op, _stashed]) => this.putSticky(el, name, op)); - } - }; - var dom_default = DOM; - var UploadEntry = class { - static isActive(fileEl, file) { - let isNew = file._phxRef === void 0; - let activeRefs = fileEl.getAttribute(PHX_ACTIVE_ENTRY_REFS).split(","); - let isActive = activeRefs.indexOf(LiveUploader.genFileRef(file)) >= 0; - return file.size > 0 && (isNew || isActive); - } - static isPreflighted(fileEl, file) { - let preflightedRefs = fileEl.getAttribute(PHX_PREFLIGHTED_REFS).split(","); - let isPreflighted = preflightedRefs.indexOf(LiveUploader.genFileRef(file)) >= 0; - return isPreflighted && this.isActive(fileEl, file); - } - static isPreflightInProgress(file) { - return file._preflightInProgress === true; - } - static markPreflightInProgress(file) { - file._preflightInProgress = true; - } - constructor(fileEl, file, view, autoUpload) { - this.ref = LiveUploader.genFileRef(file); - this.fileEl = fileEl; - this.file = file; - this.view = view; - this.meta = null; - this._isCancelled = false; - this._isDone = false; - this._progress = 0; - this._lastProgressSent = -1; - this._onDone = function() { - }; - this._onElUpdated = this.onElUpdated.bind(this); - this.fileEl.addEventListener(PHX_LIVE_FILE_UPDATED, this._onElUpdated); - this.autoUpload = autoUpload; - } - metadata() { - return this.meta; - } - progress(progress) { - this._progress = Math.floor(progress); - if (this._progress > this._lastProgressSent) { - if (this._progress >= 100) { - this._progress = 100; - this._lastProgressSent = 100; - this._isDone = true; - this.view.pushFileProgress(this.fileEl, this.ref, 100, () => { - LiveUploader.untrackFile(this.fileEl, this.file); - this._onDone(); - }); - } else { - this._lastProgressSent = this._progress; - this.view.pushFileProgress(this.fileEl, this.ref, this._progress); - } - } - } - isCancelled() { - return this._isCancelled; - } - cancel() { - this.file._preflightInProgress = false; - this._isCancelled = true; - this._isDone = true; - this._onDone(); - } - isDone() { - return this._isDone; - } - error(reason = "failed") { - this.fileEl.removeEventListener(PHX_LIVE_FILE_UPDATED, this._onElUpdated); - this.view.pushFileProgress(this.fileEl, this.ref, { error: reason }); - if (!this.isAutoUpload()) { - LiveUploader.clearFiles(this.fileEl); - } - } - isAutoUpload() { - return this.autoUpload; - } - onDone(callback) { - this._onDone = () => { - this.fileEl.removeEventListener(PHX_LIVE_FILE_UPDATED, this._onElUpdated); - callback(); - }; - } - onElUpdated() { - let activeRefs = this.fileEl.getAttribute(PHX_ACTIVE_ENTRY_REFS).split(","); - if (activeRefs.indexOf(this.ref) === -1) { - LiveUploader.untrackFile(this.fileEl, this.file); - this.cancel(); - } - } - toPreflightPayload() { - return { - last_modified: this.file.lastModified, - name: this.file.name, - relative_path: this.file.webkitRelativePath, - size: this.file.size, - type: this.file.type, - ref: this.ref, - meta: typeof this.file.meta === "function" ? this.file.meta() : void 0 - }; - } - uploader(uploaders) { - if (this.meta.uploader) { - let callback = uploaders[this.meta.uploader] || logError(`no uploader configured for ${this.meta.uploader}`); - return { name: this.meta.uploader, callback }; - } else { - return { name: "channel", callback: channelUploader }; - } - } - zipPostFlight(resp) { - this.meta = resp.entries[this.ref]; - if (!this.meta) { - logError(`no preflight upload response returned with ref ${this.ref}`, { input: this.fileEl, response: resp }); - } - } - }; - var liveUploaderFileRef = 0; - var LiveUploader = class { - static genFileRef(file) { - let ref = file._phxRef; - if (ref !== void 0) { - return ref; - } else { - file._phxRef = (liveUploaderFileRef++).toString(); - return file._phxRef; - } - } - static getEntryDataURL(inputEl, ref, callback) { - let file = this.activeFiles(inputEl).find((file2) => this.genFileRef(file2) === ref); - callback(URL.createObjectURL(file)); - } - static hasUploadsInProgress(formEl) { - let active = 0; - dom_default.findUploadInputs(formEl).forEach((input) => { - if (input.getAttribute(PHX_PREFLIGHTED_REFS) !== input.getAttribute(PHX_DONE_REFS)) { - active++; - } - }); - return active > 0; - } - static serializeUploads(inputEl) { - let files = this.activeFiles(inputEl); - let fileData = {}; - files.forEach((file) => { - let entry = { path: inputEl.name }; - let uploadRef = inputEl.getAttribute(PHX_UPLOAD_REF); - fileData[uploadRef] = fileData[uploadRef] || []; - entry.ref = this.genFileRef(file); - entry.last_modified = file.lastModified; - entry.name = file.name || entry.ref; - entry.relative_path = file.webkitRelativePath; - entry.type = file.type; - entry.size = file.size; - if (typeof file.meta === "function") { - entry.meta = file.meta(); - } - fileData[uploadRef].push(entry); - }); - return fileData; - } - static clearFiles(inputEl) { - inputEl.value = null; - inputEl.removeAttribute(PHX_UPLOAD_REF); - dom_default.putPrivate(inputEl, "files", []); - } - static untrackFile(inputEl, file) { - dom_default.putPrivate(inputEl, "files", dom_default.private(inputEl, "files").filter((f) => !Object.is(f, file))); - } - static trackFiles(inputEl, files, dataTransfer) { - if (inputEl.getAttribute("multiple") !== null) { - let newFiles = files.filter((file) => !this.activeFiles(inputEl).find((f) => Object.is(f, file))); - dom_default.updatePrivate(inputEl, "files", [], (existing) => existing.concat(newFiles)); - inputEl.value = null; - } else { - if (dataTransfer && dataTransfer.files.length > 0) { - inputEl.files = dataTransfer.files; - } - dom_default.putPrivate(inputEl, "files", files); - } - } - static activeFileInputs(formEl) { - let fileInputs = dom_default.findUploadInputs(formEl); - return Array.from(fileInputs).filter((el) => el.files && this.activeFiles(el).length > 0); - } - static activeFiles(input) { - return (dom_default.private(input, "files") || []).filter((f) => UploadEntry.isActive(input, f)); - } - static inputsAwaitingPreflight(formEl) { - let fileInputs = dom_default.findUploadInputs(formEl); - return Array.from(fileInputs).filter((input) => this.filesAwaitingPreflight(input).length > 0); - } - static filesAwaitingPreflight(input) { - return this.activeFiles(input).filter((f) => !UploadEntry.isPreflighted(input, f) && !UploadEntry.isPreflightInProgress(f)); - } - static markPreflightInProgress(entries) { - entries.forEach((entry) => UploadEntry.markPreflightInProgress(entry.file)); - } - constructor(inputEl, view, onComplete) { - this.autoUpload = dom_default.isAutoUpload(inputEl); - this.view = view; - this.onComplete = onComplete; - this._entries = Array.from(LiveUploader.filesAwaitingPreflight(inputEl) || []).map((file) => new UploadEntry(inputEl, file, view, this.autoUpload)); - LiveUploader.markPreflightInProgress(this._entries); - this.numEntriesInProgress = this._entries.length; - } - isAutoUpload() { - return this.autoUpload; - } - entries() { - return this._entries; - } - initAdapterUpload(resp, onError, liveSocket2) { - this._entries = this._entries.map((entry) => { - if (entry.isCancelled()) { - this.numEntriesInProgress--; - if (this.numEntriesInProgress === 0) { - this.onComplete(); - } - } else { - entry.zipPostFlight(resp); - entry.onDone(() => { - this.numEntriesInProgress--; - if (this.numEntriesInProgress === 0) { - this.onComplete(); - } - }); - } - return entry; - }); - let groupedEntries = this._entries.reduce((acc, entry) => { - if (!entry.meta) { - return acc; - } - let { name, callback } = entry.uploader(liveSocket2.uploaders); - acc[name] = acc[name] || { callback, entries: [] }; - acc[name].entries.push(entry); - return acc; - }, {}); - for (let name in groupedEntries) { - let { callback, entries } = groupedEntries[name]; - callback(entries, onError, resp, liveSocket2); - } - } - }; - var Hooks = { - LiveFileUpload: { - activeRefs() { - return this.el.getAttribute(PHX_ACTIVE_ENTRY_REFS); - }, - preflightedRefs() { - return this.el.getAttribute(PHX_PREFLIGHTED_REFS); - }, - mounted() { - this.preflightedWas = this.preflightedRefs(); - }, - updated() { - let newPreflights = this.preflightedRefs(); - if (this.preflightedWas !== newPreflights) { - this.preflightedWas = newPreflights; - if (newPreflights === "") { - this.__view.cancelSubmit(this.el.form); - } - } - if (this.activeRefs() === "") { - this.el.value = null; - } - this.el.dispatchEvent(new CustomEvent(PHX_LIVE_FILE_UPDATED)); - } - }, - LiveImgPreview: { - mounted() { - this.ref = this.el.getAttribute("data-phx-entry-ref"); - this.inputEl = document.getElementById(this.el.getAttribute(PHX_UPLOAD_REF)); - LiveUploader.getEntryDataURL(this.inputEl, this.ref, (url) => { - this.url = url; - this.el.src = url; - }); - }, - destroyed() { - URL.revokeObjectURL(this.url); - } - }, - FocusWrap: { - mounted() { - this.focusStart = this.el.firstElementChild; - this.focusEnd = this.el.lastElementChild; - this.focusStart.addEventListener("focus", () => aria_default.focusLast(this.el)); - this.focusEnd.addEventListener("focus", () => aria_default.focusFirst(this.el)); - this.el.addEventListener("phx:show-end", () => this.el.focus()); - if (window.getComputedStyle(this.el).display !== "none") { - aria_default.focusFirst(this.el); - } - } - } - }; - var findScrollContainer = (el) => { - if (["HTML", "BODY"].indexOf(el.nodeName.toUpperCase()) >= 0) - return null; - if (["scroll", "auto"].indexOf(getComputedStyle(el).overflowY) >= 0) - return el; - return findScrollContainer(el.parentElement); - }; - var scrollTop = (scrollContainer) => { - if (scrollContainer) { - return scrollContainer.scrollTop; - } else { - return document.documentElement.scrollTop || document.body.scrollTop; - } - }; - var bottom = (scrollContainer) => { - if (scrollContainer) { - return scrollContainer.getBoundingClientRect().bottom; - } else { - return window.innerHeight || document.documentElement.clientHeight; - } - }; - var top = (scrollContainer) => { - if (scrollContainer) { - return scrollContainer.getBoundingClientRect().top; - } else { - return 0; - } - }; - var isAtViewportTop = (el, scrollContainer) => { - let rect = el.getBoundingClientRect(); - return rect.top >= top(scrollContainer) && rect.left >= 0 && rect.top <= bottom(scrollContainer); - }; - var isAtViewportBottom = (el, scrollContainer) => { - let rect = el.getBoundingClientRect(); - return rect.right >= top(scrollContainer) && rect.left >= 0 && rect.bottom <= bottom(scrollContainer); - }; - var isWithinViewport = (el, scrollContainer) => { - let rect = el.getBoundingClientRect(); - return rect.top >= top(scrollContainer) && rect.left >= 0 && rect.top <= bottom(scrollContainer); - }; - Hooks.InfiniteScroll = { - mounted() { - this.scrollContainer = findScrollContainer(this.el); - let scrollBefore = scrollTop(this.scrollContainer); - let topOverran = false; - let throttleInterval = 500; - let pendingOp = null; - let onTopOverrun = this.throttle(throttleInterval, (topEvent, firstChild) => { - pendingOp = () => true; - this.liveSocket.execJSHookPush(this.el, topEvent, { id: firstChild.id, _overran: true }, () => { - pendingOp = null; - }); - }); - let onFirstChildAtTop = this.throttle(throttleInterval, (topEvent, firstChild) => { - pendingOp = () => firstChild.scrollIntoView({ block: "start" }); - this.liveSocket.execJSHookPush(this.el, topEvent, { id: firstChild.id }, () => { - pendingOp = null; - window.requestAnimationFrame(() => { - if (!isWithinViewport(firstChild, this.scrollContainer)) { - firstChild.scrollIntoView({ block: "start" }); - } - }); - }); - }); - let onLastChildAtBottom = this.throttle(throttleInterval, (bottomEvent, lastChild) => { - pendingOp = () => lastChild.scrollIntoView({ block: "end" }); - this.liveSocket.execJSHookPush(this.el, bottomEvent, { id: lastChild.id }, () => { - pendingOp = null; - window.requestAnimationFrame(() => { - if (!isWithinViewport(lastChild, this.scrollContainer)) { - lastChild.scrollIntoView({ block: "end" }); - } - }); - }); - }); - this.onScroll = (_e) => { - let scrollNow = scrollTop(this.scrollContainer); - if (pendingOp) { - scrollBefore = scrollNow; - return pendingOp(); - } - let rect = this.el.getBoundingClientRect(); - let topEvent = this.el.getAttribute(this.liveSocket.binding("viewport-top")); - let bottomEvent = this.el.getAttribute(this.liveSocket.binding("viewport-bottom")); - let lastChild = this.el.lastElementChild; - let firstChild = this.el.firstElementChild; - let isScrollingUp = scrollNow < scrollBefore; - let isScrollingDown = scrollNow > scrollBefore; - if (isScrollingUp && topEvent && !topOverran && rect.top >= 0) { - topOverran = true; - onTopOverrun(topEvent, firstChild); - } else if (isScrollingDown && topOverran && rect.top <= 0) { - topOverran = false; - } - if (topEvent && isScrollingUp && isAtViewportTop(firstChild, this.scrollContainer)) { - onFirstChildAtTop(topEvent, firstChild); - } else if (bottomEvent && isScrollingDown && isAtViewportBottom(lastChild, this.scrollContainer)) { - onLastChildAtBottom(bottomEvent, lastChild); - } - scrollBefore = scrollNow; - }; - if (this.scrollContainer) { - this.scrollContainer.addEventListener("scroll", this.onScroll); - } else { - window.addEventListener("scroll", this.onScroll); - } - }, - destroyed() { - if (this.scrollContainer) { - this.scrollContainer.removeEventListener("scroll", this.onScroll); - } else { - window.removeEventListener("scroll", this.onScroll); - } - }, - throttle(interval, callback) { - let lastCallAt = 0; - let timer; - return (...args) => { - let now = Date.now(); - let remainingTime = interval - (now - lastCallAt); - if (remainingTime <= 0 || remainingTime > interval) { - if (timer) { - clearTimeout(timer); - timer = null; - } - lastCallAt = now; - callback(...args); - } else if (!timer) { - timer = setTimeout(() => { - lastCallAt = Date.now(); - timer = null; - callback(...args); - }, remainingTime); - } - }; - } - }; - var hooks_default = Hooks; - var DOMPostMorphRestorer = class { - constructor(containerBefore, containerAfter, updateType) { - let idsBefore = /* @__PURE__ */ new Set(); - let idsAfter = new Set([...containerAfter.children].map((child) => child.id)); - let elementsToModify = []; - Array.from(containerBefore.children).forEach((child) => { - if (child.id) { - idsBefore.add(child.id); - if (idsAfter.has(child.id)) { - let previousElementId = child.previousElementSibling && child.previousElementSibling.id; - elementsToModify.push({ elementId: child.id, previousElementId }); - } - } - }); - this.containerId = containerAfter.id; - this.updateType = updateType; - this.elementsToModify = elementsToModify; - this.elementIdsToAdd = [...idsAfter].filter((id) => !idsBefore.has(id)); - } - perform() { - let container = dom_default.byId(this.containerId); - this.elementsToModify.forEach((elementToModify) => { - if (elementToModify.previousElementId) { - maybe(document.getElementById(elementToModify.previousElementId), (previousElem) => { - maybe(document.getElementById(elementToModify.elementId), (elem) => { - let isInRightPlace = elem.previousElementSibling && elem.previousElementSibling.id == previousElem.id; - if (!isInRightPlace) { - previousElem.insertAdjacentElement("afterend", elem); - } - }); - }); - } else { - maybe(document.getElementById(elementToModify.elementId), (elem) => { - let isInRightPlace = elem.previousElementSibling == null; - if (!isInRightPlace) { - container.insertAdjacentElement("afterbegin", elem); - } - }); - } - }); - if (this.updateType == "prepend") { - this.elementIdsToAdd.reverse().forEach((elemId) => { - maybe(document.getElementById(elemId), (elem) => container.insertAdjacentElement("afterbegin", elem)); - }); - } - } - }; - var DOCUMENT_FRAGMENT_NODE = 11; - function morphAttrs(fromNode, toNode) { - var toNodeAttrs = toNode.attributes; - var attr; - var attrName; - var attrNamespaceURI; - var attrValue; - var fromValue; - if (toNode.nodeType === DOCUMENT_FRAGMENT_NODE || fromNode.nodeType === DOCUMENT_FRAGMENT_NODE) { - return; - } - for (var i = toNodeAttrs.length - 1; i >= 0; i--) { - attr = toNodeAttrs[i]; - attrName = attr.name; - attrNamespaceURI = attr.namespaceURI; - attrValue = attr.value; - if (attrNamespaceURI) { - attrName = attr.localName || attrName; - fromValue = fromNode.getAttributeNS(attrNamespaceURI, attrName); - if (fromValue !== attrValue) { - if (attr.prefix === "xmlns") { - attrName = attr.name; - } - fromNode.setAttributeNS(attrNamespaceURI, attrName, attrValue); - } - } else { - fromValue = fromNode.getAttribute(attrName); - if (fromValue !== attrValue) { - fromNode.setAttribute(attrName, attrValue); - } - } - } - var fromNodeAttrs = fromNode.attributes; - for (var d = fromNodeAttrs.length - 1; d >= 0; d--) { - attr = fromNodeAttrs[d]; - attrName = attr.name; - attrNamespaceURI = attr.namespaceURI; - if (attrNamespaceURI) { - attrName = attr.localName || attrName; - if (!toNode.hasAttributeNS(attrNamespaceURI, attrName)) { - fromNode.removeAttributeNS(attrNamespaceURI, attrName); - } - } else { - if (!toNode.hasAttribute(attrName)) { - fromNode.removeAttribute(attrName); - } - } - } - } - var range; - var NS_XHTML = "http://www.w3.org/1999/xhtml"; - var doc = typeof document === "undefined" ? void 0 : document; - var HAS_TEMPLATE_SUPPORT = !!doc && "content" in doc.createElement("template"); - var HAS_RANGE_SUPPORT = !!doc && doc.createRange && "createContextualFragment" in doc.createRange(); - function createFragmentFromTemplate(str) { - var template = doc.createElement("template"); - template.innerHTML = str; - return template.content.childNodes[0]; - } - function createFragmentFromRange(str) { - if (!range) { - range = doc.createRange(); - range.selectNode(doc.body); - } - var fragment = range.createContextualFragment(str); - return fragment.childNodes[0]; - } - function createFragmentFromWrap(str) { - var fragment = doc.createElement("body"); - fragment.innerHTML = str; - return fragment.childNodes[0]; - } - function toElement(str) { - str = str.trim(); - if (HAS_TEMPLATE_SUPPORT) { - return createFragmentFromTemplate(str); - } else if (HAS_RANGE_SUPPORT) { - return createFragmentFromRange(str); - } - return createFragmentFromWrap(str); - } - function compareNodeNames(fromEl, toEl) { - var fromNodeName = fromEl.nodeName; - var toNodeName = toEl.nodeName; - var fromCodeStart, toCodeStart; - if (fromNodeName === toNodeName) { - return true; - } - fromCodeStart = fromNodeName.charCodeAt(0); - toCodeStart = toNodeName.charCodeAt(0); - if (fromCodeStart <= 90 && toCodeStart >= 97) { - return fromNodeName === toNodeName.toUpperCase(); - } else if (toCodeStart <= 90 && fromCodeStart >= 97) { - return toNodeName === fromNodeName.toUpperCase(); - } else { - return false; - } - } - function createElementNS(name, namespaceURI) { - return !namespaceURI || namespaceURI === NS_XHTML ? doc.createElement(name) : doc.createElementNS(namespaceURI, name); - } - function moveChildren(fromEl, toEl) { - var curChild = fromEl.firstChild; - while (curChild) { - var nextChild = curChild.nextSibling; - toEl.appendChild(curChild); - curChild = nextChild; - } - return toEl; - } - function syncBooleanAttrProp(fromEl, toEl, name) { - if (fromEl[name] !== toEl[name]) { - fromEl[name] = toEl[name]; - if (fromEl[name]) { - fromEl.setAttribute(name, ""); - } else { - fromEl.removeAttribute(name); - } - } - } - var specialElHandlers = { - OPTION: function(fromEl, toEl) { - var parentNode = fromEl.parentNode; - if (parentNode) { - var parentName = parentNode.nodeName.toUpperCase(); - if (parentName === "OPTGROUP") { - parentNode = parentNode.parentNode; - parentName = parentNode && parentNode.nodeName.toUpperCase(); - } - if (parentName === "SELECT" && !parentNode.hasAttribute("multiple")) { - if (fromEl.hasAttribute("selected") && !toEl.selected) { - fromEl.setAttribute("selected", "selected"); - fromEl.removeAttribute("selected"); - } - parentNode.selectedIndex = -1; - } - } - syncBooleanAttrProp(fromEl, toEl, "selected"); - }, - INPUT: function(fromEl, toEl) { - syncBooleanAttrProp(fromEl, toEl, "checked"); - syncBooleanAttrProp(fromEl, toEl, "disabled"); - if (fromEl.value !== toEl.value) { - fromEl.value = toEl.value; - } - if (!toEl.hasAttribute("value")) { - fromEl.removeAttribute("value"); - } - }, - TEXTAREA: function(fromEl, toEl) { - var newValue = toEl.value; - if (fromEl.value !== newValue) { - fromEl.value = newValue; - } - var firstChild = fromEl.firstChild; - if (firstChild) { - var oldValue = firstChild.nodeValue; - if (oldValue == newValue || !newValue && oldValue == fromEl.placeholder) { - return; - } - firstChild.nodeValue = newValue; - } - }, - SELECT: function(fromEl, toEl) { - if (!toEl.hasAttribute("multiple")) { - var selectedIndex = -1; - var i = 0; - var curChild = fromEl.firstChild; - var optgroup; - var nodeName; - while (curChild) { - nodeName = curChild.nodeName && curChild.nodeName.toUpperCase(); - if (nodeName === "OPTGROUP") { - optgroup = curChild; - curChild = optgroup.firstChild; - } else { - if (nodeName === "OPTION") { - if (curChild.hasAttribute("selected")) { - selectedIndex = i; - break; - } - i++; - } - curChild = curChild.nextSibling; - if (!curChild && optgroup) { - curChild = optgroup.nextSibling; - optgroup = null; - } - } - } - fromEl.selectedIndex = selectedIndex; - } - } - }; - var ELEMENT_NODE = 1; - var DOCUMENT_FRAGMENT_NODE$1 = 11; - var TEXT_NODE = 3; - var COMMENT_NODE = 8; - function noop() { - } - function defaultGetNodeKey(node) { - if (node) { - return node.getAttribute && node.getAttribute("id") || node.id; - } - } - function morphdomFactory(morphAttrs2) { - return function morphdom2(fromNode, toNode, options) { - if (!options) { - options = {}; - } - if (typeof toNode === "string") { - if (fromNode.nodeName === "#document" || fromNode.nodeName === "HTML" || fromNode.nodeName === "BODY") { - var toNodeHtml = toNode; - toNode = doc.createElement("html"); - toNode.innerHTML = toNodeHtml; - } else { - toNode = toElement(toNode); - } - } else if (toNode.nodeType === DOCUMENT_FRAGMENT_NODE$1) { - toNode = toNode.firstElementChild; - } - var getNodeKey = options.getNodeKey || defaultGetNodeKey; - var onBeforeNodeAdded = options.onBeforeNodeAdded || noop; - var onNodeAdded = options.onNodeAdded || noop; - var onBeforeElUpdated = options.onBeforeElUpdated || noop; - var onElUpdated = options.onElUpdated || noop; - var onBeforeNodeDiscarded = options.onBeforeNodeDiscarded || noop; - var onNodeDiscarded = options.onNodeDiscarded || noop; - var onBeforeElChildrenUpdated = options.onBeforeElChildrenUpdated || noop; - var skipFromChildren = options.skipFromChildren || noop; - var addChild = options.addChild || function(parent, child) { - return parent.appendChild(child); - }; - var childrenOnly = options.childrenOnly === true; - var fromNodesLookup = /* @__PURE__ */ Object.create(null); - var keyedRemovalList = []; - function addKeyedRemoval(key) { - keyedRemovalList.push(key); - } - function walkDiscardedChildNodes(node, skipKeyedNodes) { - if (node.nodeType === ELEMENT_NODE) { - var curChild = node.firstChild; - while (curChild) { - var key = void 0; - if (skipKeyedNodes && (key = getNodeKey(curChild))) { - addKeyedRemoval(key); - } else { - onNodeDiscarded(curChild); - if (curChild.firstChild) { - walkDiscardedChildNodes(curChild, skipKeyedNodes); - } - } - curChild = curChild.nextSibling; - } - } - } - function removeNode(node, parentNode, skipKeyedNodes) { - if (onBeforeNodeDiscarded(node) === false) { - return; - } - if (parentNode) { - parentNode.removeChild(node); - } - onNodeDiscarded(node); - walkDiscardedChildNodes(node, skipKeyedNodes); - } - function indexTree(node) { - if (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE$1) { - var curChild = node.firstChild; - while (curChild) { - var key = getNodeKey(curChild); - if (key) { - fromNodesLookup[key] = curChild; - } - indexTree(curChild); - curChild = curChild.nextSibling; - } - } - } - indexTree(fromNode); - function handleNodeAdded(el) { - onNodeAdded(el); - var curChild = el.firstChild; - while (curChild) { - var nextSibling = curChild.nextSibling; - var key = getNodeKey(curChild); - if (key) { - var unmatchedFromEl = fromNodesLookup[key]; - if (unmatchedFromEl && compareNodeNames(curChild, unmatchedFromEl)) { - curChild.parentNode.replaceChild(unmatchedFromEl, curChild); - morphEl(unmatchedFromEl, curChild); - } else { - handleNodeAdded(curChild); - } - } else { - handleNodeAdded(curChild); - } - curChild = nextSibling; - } - } - function cleanupFromEl(fromEl, curFromNodeChild, curFromNodeKey) { - while (curFromNodeChild) { - var fromNextSibling = curFromNodeChild.nextSibling; - if (curFromNodeKey = getNodeKey(curFromNodeChild)) { - addKeyedRemoval(curFromNodeKey); - } else { - removeNode(curFromNodeChild, fromEl, true); - } - curFromNodeChild = fromNextSibling; - } - } - function morphEl(fromEl, toEl, childrenOnly2) { - var toElKey = getNodeKey(toEl); - if (toElKey) { - delete fromNodesLookup[toElKey]; - } - if (!childrenOnly2) { - if (onBeforeElUpdated(fromEl, toEl) === false) { - return; - } - morphAttrs2(fromEl, toEl); - onElUpdated(fromEl); - if (onBeforeElChildrenUpdated(fromEl, toEl) === false) { - return; - } - } - if (fromEl.nodeName !== "TEXTAREA") { - morphChildren(fromEl, toEl); - } else { - specialElHandlers.TEXTAREA(fromEl, toEl); - } - } - function morphChildren(fromEl, toEl) { - var skipFrom = skipFromChildren(fromEl, toEl); - var curToNodeChild = toEl.firstChild; - var curFromNodeChild = fromEl.firstChild; - var curToNodeKey; - var curFromNodeKey; - var fromNextSibling; - var toNextSibling; - var matchingFromEl; - outer: - while (curToNodeChild) { - toNextSibling = curToNodeChild.nextSibling; - curToNodeKey = getNodeKey(curToNodeChild); - while (!skipFrom && curFromNodeChild) { - fromNextSibling = curFromNodeChild.nextSibling; - if (curToNodeChild.isSameNode && curToNodeChild.isSameNode(curFromNodeChild)) { - curToNodeChild = toNextSibling; - curFromNodeChild = fromNextSibling; - continue outer; - } - curFromNodeKey = getNodeKey(curFromNodeChild); - var curFromNodeType = curFromNodeChild.nodeType; - var isCompatible = void 0; - if (curFromNodeType === curToNodeChild.nodeType) { - if (curFromNodeType === ELEMENT_NODE) { - if (curToNodeKey) { - if (curToNodeKey !== curFromNodeKey) { - if (matchingFromEl = fromNodesLookup[curToNodeKey]) { - if (fromNextSibling === matchingFromEl) { - isCompatible = false; - } else { - fromEl.insertBefore(matchingFromEl, curFromNodeChild); - if (curFromNodeKey) { - addKeyedRemoval(curFromNodeKey); - } else { - removeNode(curFromNodeChild, fromEl, true); - } - curFromNodeChild = matchingFromEl; - curFromNodeKey = getNodeKey(curFromNodeChild); - } - } else { - isCompatible = false; - } - } - } else if (curFromNodeKey) { - isCompatible = false; - } - isCompatible = isCompatible !== false && compareNodeNames(curFromNodeChild, curToNodeChild); - if (isCompatible) { - morphEl(curFromNodeChild, curToNodeChild); - } - } else if (curFromNodeType === TEXT_NODE || curFromNodeType == COMMENT_NODE) { - isCompatible = true; - if (curFromNodeChild.nodeValue !== curToNodeChild.nodeValue) { - curFromNodeChild.nodeValue = curToNodeChild.nodeValue; - } - } - } - if (isCompatible) { - curToNodeChild = toNextSibling; - curFromNodeChild = fromNextSibling; - continue outer; - } - if (curFromNodeKey) { - addKeyedRemoval(curFromNodeKey); - } else { - removeNode(curFromNodeChild, fromEl, true); - } - curFromNodeChild = fromNextSibling; - } - if (curToNodeKey && (matchingFromEl = fromNodesLookup[curToNodeKey]) && compareNodeNames(matchingFromEl, curToNodeChild)) { - if (!skipFrom) { - addChild(fromEl, matchingFromEl); - } - morphEl(matchingFromEl, curToNodeChild); - } else { - var onBeforeNodeAddedResult = onBeforeNodeAdded(curToNodeChild); - if (onBeforeNodeAddedResult !== false) { - if (onBeforeNodeAddedResult) { - curToNodeChild = onBeforeNodeAddedResult; - } - if (curToNodeChild.actualize) { - curToNodeChild = curToNodeChild.actualize(fromEl.ownerDocument || doc); - } - addChild(fromEl, curToNodeChild); - handleNodeAdded(curToNodeChild); - } - } - curToNodeChild = toNextSibling; - curFromNodeChild = fromNextSibling; - } - cleanupFromEl(fromEl, curFromNodeChild, curFromNodeKey); - var specialElHandler = specialElHandlers[fromEl.nodeName]; - if (specialElHandler) { - specialElHandler(fromEl, toEl); - } - } - var morphedNode = fromNode; - var morphedNodeType = morphedNode.nodeType; - var toNodeType = toNode.nodeType; - if (!childrenOnly) { - if (morphedNodeType === ELEMENT_NODE) { - if (toNodeType === ELEMENT_NODE) { - if (!compareNodeNames(fromNode, toNode)) { - onNodeDiscarded(fromNode); - morphedNode = moveChildren(fromNode, createElementNS(toNode.nodeName, toNode.namespaceURI)); - } - } else { - morphedNode = toNode; - } - } else if (morphedNodeType === TEXT_NODE || morphedNodeType === COMMENT_NODE) { - if (toNodeType === morphedNodeType) { - if (morphedNode.nodeValue !== toNode.nodeValue) { - morphedNode.nodeValue = toNode.nodeValue; - } - return morphedNode; - } else { - morphedNode = toNode; - } - } - } - if (morphedNode === toNode) { - onNodeDiscarded(fromNode); - } else { - if (toNode.isSameNode && toNode.isSameNode(morphedNode)) { - return; - } - morphEl(morphedNode, toNode, childrenOnly); - if (keyedRemovalList) { - for (var i = 0, len = keyedRemovalList.length; i < len; i++) { - var elToRemove = fromNodesLookup[keyedRemovalList[i]]; - if (elToRemove) { - removeNode(elToRemove, elToRemove.parentNode, false); - } - } - } - } - if (!childrenOnly && morphedNode !== fromNode && fromNode.parentNode) { - if (morphedNode.actualize) { - morphedNode = morphedNode.actualize(fromNode.ownerDocument || doc); - } - fromNode.parentNode.replaceChild(morphedNode, fromNode); - } - return morphedNode; - }; - } - var morphdom = morphdomFactory(morphAttrs); - var morphdom_esm_default = morphdom; - var DOMPatch = class { - static patchEl(fromEl, toEl, activeElement) { - morphdom_esm_default(fromEl, toEl, { - childrenOnly: false, - onBeforeElUpdated: (fromEl2, toEl2) => { - if (activeElement && activeElement.isSameNode(fromEl2) && dom_default.isFormInput(fromEl2)) { - dom_default.mergeFocusedInput(fromEl2, toEl2); - return false; - } - } - }); - } - constructor(view, container, id, html, streams, targetCID) { - this.view = view; - this.liveSocket = view.liveSocket; - this.container = container; - this.id = id; - this.rootID = view.root.id; - this.html = html; - this.streams = streams; - this.streamInserts = {}; - this.streamComponentRestore = {}; - this.targetCID = targetCID; - this.cidPatch = isCid(this.targetCID); - this.pendingRemoves = []; - this.phxRemove = this.liveSocket.binding("remove"); - this.callbacks = { - beforeadded: [], - beforeupdated: [], - beforephxChildAdded: [], - afteradded: [], - afterupdated: [], - afterdiscarded: [], - afterphxChildAdded: [], - aftertransitionsDiscarded: [] - }; - } - before(kind, callback) { - this.callbacks[`before${kind}`].push(callback); - } - after(kind, callback) { - this.callbacks[`after${kind}`].push(callback); - } - trackBefore(kind, ...args) { - this.callbacks[`before${kind}`].forEach((callback) => callback(...args)); - } - trackAfter(kind, ...args) { - this.callbacks[`after${kind}`].forEach((callback) => callback(...args)); - } - markPrunableContentForRemoval() { - let phxUpdate = this.liveSocket.binding(PHX_UPDATE); - dom_default.all(this.container, `[${phxUpdate}=append] > *, [${phxUpdate}=prepend] > *`, (el) => { - el.setAttribute(PHX_PRUNE, ""); - }); - } - perform(isJoinPatch) { - let { view, liveSocket: liveSocket2, container, html } = this; - let targetContainer = this.isCIDPatch() ? this.targetCIDContainer(html) : container; - if (this.isCIDPatch() && !targetContainer) { - return; - } - let focused = liveSocket2.getActiveElement(); - let { selectionStart, selectionEnd } = focused && dom_default.hasSelectionRange(focused) ? focused : {}; - let phxUpdate = liveSocket2.binding(PHX_UPDATE); - let phxFeedbackFor = liveSocket2.binding(PHX_FEEDBACK_FOR); - let phxFeedbackGroup = liveSocket2.binding(PHX_FEEDBACK_GROUP); - let disableWith = liveSocket2.binding(PHX_DISABLE_WITH); - let phxViewportTop = liveSocket2.binding(PHX_VIEWPORT_TOP); - let phxViewportBottom = liveSocket2.binding(PHX_VIEWPORT_BOTTOM); - let phxTriggerExternal = liveSocket2.binding(PHX_TRIGGER_ACTION); - let added = []; - let feedbackContainers = []; - let updates = []; - let appendPrependUpdates = []; - let externalFormTriggered = null; - function morph(targetContainer2, source, withChildren = false) { - morphdom_esm_default(targetContainer2, source, { - childrenOnly: targetContainer2.getAttribute(PHX_COMPONENT) === null && !withChildren, - getNodeKey: (node) => { - if (dom_default.isPhxDestroyed(node)) { - return null; - } - if (isJoinPatch) { - return node.id; - } - return node.id || node.getAttribute && node.getAttribute(PHX_MAGIC_ID); - }, - skipFromChildren: (from) => { - return from.getAttribute(phxUpdate) === PHX_STREAM; - }, - addChild: (parent, child) => { - let { ref, streamAt } = this.getStreamInsert(child); - if (ref === void 0) { - return parent.appendChild(child); - } - this.setStreamRef(child, ref); - if (streamAt === 0) { - parent.insertAdjacentElement("afterbegin", child); - } else if (streamAt === -1) { - parent.appendChild(child); - } else if (streamAt > 0) { - let sibling = Array.from(parent.children)[streamAt]; - parent.insertBefore(child, sibling); - } - }, - onBeforeNodeAdded: (el) => { - dom_default.maybeAddPrivateHooks(el, phxViewportTop, phxViewportBottom); - this.trackBefore("added", el); - let morphedEl = el; - if (!isJoinPatch && this.streamComponentRestore[el.id]) { - morphedEl = this.streamComponentRestore[el.id]; - delete this.streamComponentRestore[el.id]; - morph.call(this, morphedEl, el, true); - } - return morphedEl; - }, - onNodeAdded: (el) => { - if (el.getAttribute) { - this.maybeReOrderStream(el, true); - } - if (dom_default.isFeedbackContainer(el, phxFeedbackFor)) - feedbackContainers.push(el); - if (el instanceof HTMLImageElement && el.srcset) { - el.srcset = el.srcset; - } else if (el instanceof HTMLVideoElement && el.autoplay) { - el.play(); - } - if (dom_default.isNowTriggerFormExternal(el, phxTriggerExternal)) { - externalFormTriggered = el; - } - if (dom_default.isPhxChild(el) && view.ownsElement(el) || dom_default.isPhxSticky(el) && view.ownsElement(el.parentNode)) { - this.trackAfter("phxChildAdded", el); - } - added.push(el); - }, - onNodeDiscarded: (el) => this.onNodeDiscarded(el), - onBeforeNodeDiscarded: (el) => { - if (el.getAttribute && el.getAttribute(PHX_PRUNE) !== null) { - return true; - } - if (el.parentElement !== null && el.id && dom_default.isPhxUpdate(el.parentElement, phxUpdate, [PHX_STREAM, "append", "prepend"])) { - return false; - } - if (this.maybePendingRemove(el)) { - return false; - } - if (this.skipCIDSibling(el)) { - return false; - } - return true; - }, - onElUpdated: (el) => { - if (dom_default.isNowTriggerFormExternal(el, phxTriggerExternal)) { - externalFormTriggered = el; - } - updates.push(el); - this.maybeReOrderStream(el, false); - }, - onBeforeElUpdated: (fromEl, toEl) => { - dom_default.maybeAddPrivateHooks(toEl, phxViewportTop, phxViewportBottom); - if (dom_default.isFeedbackContainer(fromEl, phxFeedbackFor) || dom_default.isFeedbackContainer(toEl, phxFeedbackFor)) { - feedbackContainers.push(fromEl); - feedbackContainers.push(toEl); - } - dom_default.cleanChildNodes(toEl, phxUpdate); - if (this.skipCIDSibling(toEl)) { - this.maybeReOrderStream(fromEl); - return false; - } - if (dom_default.isPhxSticky(fromEl)) { - return false; - } - if (dom_default.isIgnored(fromEl, phxUpdate) || fromEl.form && fromEl.form.isSameNode(externalFormTriggered)) { - this.trackBefore("updated", fromEl, toEl); - dom_default.mergeAttrs(fromEl, toEl, { isIgnored: dom_default.isIgnored(fromEl, phxUpdate) }); - updates.push(fromEl); - dom_default.applyStickyOperations(fromEl); - return false; - } - if (fromEl.type === "number" && (fromEl.validity && fromEl.validity.badInput)) { - return false; - } - if (!dom_default.syncPendingRef(fromEl, toEl, disableWith)) { - if (dom_default.isUploadInput(fromEl)) { - this.trackBefore("updated", fromEl, toEl); - updates.push(fromEl); - } - dom_default.applyStickyOperations(fromEl); - return false; - } - if (dom_default.isPhxChild(toEl)) { - let prevSession = fromEl.getAttribute(PHX_SESSION); - dom_default.mergeAttrs(fromEl, toEl, { exclude: [PHX_STATIC] }); - if (prevSession !== "") { - fromEl.setAttribute(PHX_SESSION, prevSession); - } - fromEl.setAttribute(PHX_ROOT_ID, this.rootID); - dom_default.applyStickyOperations(fromEl); - return false; - } - dom_default.copyPrivates(toEl, fromEl); - let isFocusedFormEl = focused && fromEl.isSameNode(focused) && dom_default.isFormInput(fromEl); - let focusedSelectChanged = isFocusedFormEl && this.isChangedSelect(fromEl, toEl); - if (isFocusedFormEl && fromEl.type !== "hidden" && !focusedSelectChanged) { - this.trackBefore("updated", fromEl, toEl); - dom_default.mergeFocusedInput(fromEl, toEl); - dom_default.syncAttrsToProps(fromEl); - updates.push(fromEl); - dom_default.applyStickyOperations(fromEl); - return false; - } else { - if (focusedSelectChanged) { - fromEl.blur(); - } - if (dom_default.isPhxUpdate(toEl, phxUpdate, ["append", "prepend"])) { - appendPrependUpdates.push(new DOMPostMorphRestorer(fromEl, toEl, toEl.getAttribute(phxUpdate))); - } - dom_default.syncAttrsToProps(toEl); - dom_default.applyStickyOperations(toEl); - this.trackBefore("updated", fromEl, toEl); - return true; - } - } - }); - } - this.trackBefore("added", container); - this.trackBefore("updated", container, container); - liveSocket2.time("morphdom", () => { - this.streams.forEach(([ref, inserts, deleteIds, reset]) => { - inserts.forEach(([key, streamAt, limit]) => { - this.streamInserts[key] = { ref, streamAt, limit, reset }; - }); - if (reset !== void 0) { - dom_default.all(container, `[${PHX_STREAM_REF}="${ref}"]`, (child) => { - this.removeStreamChildElement(child); - }); - } - deleteIds.forEach((id) => { - let child = container.querySelector(`[id="${id}"]`); - if (child) { - this.removeStreamChildElement(child); - } - }); - }); - if (isJoinPatch) { - dom_default.all(this.container, `[${phxUpdate}=${PHX_STREAM}]`, (el) => { - this.liveSocket.owner(el, (view2) => { - if (view2 === this.view) { - Array.from(el.children).forEach((child) => { - this.removeStreamChildElement(child); - }); - } - }); - }); - } - morph.call(this, targetContainer, html); - }); - if (liveSocket2.isDebugEnabled()) { - detectDuplicateIds(); - Array.from(document.querySelectorAll("input[name=id]")).forEach((node) => { - if (node.form) { - console.error('Detected an input with name="id" inside a form! This will cause problems when patching the DOM.\n', node); - } - }); - } - if (appendPrependUpdates.length > 0) { - liveSocket2.time("post-morph append/prepend restoration", () => { - appendPrependUpdates.forEach((update) => update.perform()); - }); - } - dom_default.maybeHideFeedback(targetContainer, feedbackContainers, phxFeedbackFor, phxFeedbackGroup); - liveSocket2.silenceEvents(() => dom_default.restoreFocus(focused, selectionStart, selectionEnd)); - dom_default.dispatchEvent(document, "phx:update"); - added.forEach((el) => this.trackAfter("added", el)); - updates.forEach((el) => this.trackAfter("updated", el)); - this.transitionPendingRemoves(); - if (externalFormTriggered) { - liveSocket2.unload(); - Object.getPrototypeOf(externalFormTriggered).submit.call(externalFormTriggered); - } - return true; - } - onNodeDiscarded(el) { - if (dom_default.isPhxChild(el) || dom_default.isPhxSticky(el)) { - this.liveSocket.destroyViewByEl(el); - } - this.trackAfter("discarded", el); - } - maybePendingRemove(node) { - if (node.getAttribute && node.getAttribute(this.phxRemove) !== null) { - this.pendingRemoves.push(node); - return true; - } else { - return false; - } - } - removeStreamChildElement(child) { - if (this.streamInserts[child.id]) { - this.streamComponentRestore[child.id] = child; - child.remove(); - } else { - if (!this.maybePendingRemove(child)) { - child.remove(); - this.onNodeDiscarded(child); - } - } - } - getStreamInsert(el) { - let insert = el.id ? this.streamInserts[el.id] : {}; - return insert || {}; - } - setStreamRef(el, ref) { - dom_default.putSticky(el, PHX_STREAM_REF, (el2) => el2.setAttribute(PHX_STREAM_REF, ref)); - } - maybeReOrderStream(el, isNew) { - let { ref, streamAt, reset } = this.getStreamInsert(el); - if (streamAt === void 0) { - return; - } - this.setStreamRef(el, ref); - if (!reset && !isNew) { - return; - } - if (!el.parentElement) { - return; - } - if (streamAt === 0) { - el.parentElement.insertBefore(el, el.parentElement.firstElementChild); - } else if (streamAt > 0) { - let children = Array.from(el.parentElement.children); - let oldIndex = children.indexOf(el); - if (streamAt >= children.length - 1) { - el.parentElement.appendChild(el); - } else { - let sibling = children[streamAt]; - if (oldIndex > streamAt) { - el.parentElement.insertBefore(el, sibling); - } else { - el.parentElement.insertBefore(el, sibling.nextElementSibling); - } - } - } - this.maybeLimitStream(el); - } - maybeLimitStream(el) { - let { limit } = this.getStreamInsert(el); - let children = limit !== null && Array.from(el.parentElement.children); - if (limit && limit < 0 && children.length > limit * -1) { - children.slice(0, children.length + limit).forEach((child) => this.removeStreamChildElement(child)); - } else if (limit && limit >= 0 && children.length > limit) { - children.slice(limit).forEach((child) => this.removeStreamChildElement(child)); - } - } - transitionPendingRemoves() { - let { pendingRemoves, liveSocket: liveSocket2 } = this; - if (pendingRemoves.length > 0) { - liveSocket2.transitionRemoves(pendingRemoves); - liveSocket2.requestDOMUpdate(() => { - pendingRemoves.forEach((el) => { - let child = dom_default.firstPhxChild(el); - if (child) { - liveSocket2.destroyViewByEl(child); - } - el.remove(); - }); - this.trackAfter("transitionsDiscarded", pendingRemoves); - }); - } - } - isChangedSelect(fromEl, toEl) { - if (!(fromEl instanceof HTMLSelectElement) || fromEl.multiple) { - return false; - } - if (fromEl.options.length !== toEl.options.length) { - return true; - } - let fromSelected = fromEl.selectedOptions[0]; - let toSelected = toEl.selectedOptions[0]; - if (fromSelected && fromSelected.hasAttribute("selected")) { - toSelected.setAttribute("selected", fromSelected.getAttribute("selected")); - } - return !fromEl.isEqualNode(toEl); - } - isCIDPatch() { - return this.cidPatch; - } - skipCIDSibling(el) { - return el.nodeType === Node.ELEMENT_NODE && el.hasAttribute(PHX_SKIP); - } - targetCIDContainer(html) { - if (!this.isCIDPatch()) { - return; - } - let [first, ...rest] = dom_default.findComponentNodeList(this.container, this.targetCID); - if (rest.length === 0 && dom_default.childNodeLength(html) === 1) { - return first; - } else { - return first && first.parentNode; - } - } - indexOf(parent, child) { - return Array.from(parent.children).indexOf(child); - } - }; - var VOID_TAGS = /* @__PURE__ */ new Set([ - "area", - "base", - "br", - "col", - "command", - "embed", - "hr", - "img", - "input", - "keygen", - "link", - "meta", - "param", - "source", - "track", - "wbr" - ]); - var quoteChars = /* @__PURE__ */ new Set(["'", '"']); - var modifyRoot = (html, attrs, clearInnerHTML) => { - let i = 0; - let insideComment = false; - let beforeTag, afterTag, tag, tagNameEndsAt, id, newHTML; - let lookahead = html.match(/^(\s*(?:\s*)*)<([^\s\/>]+)/); - if (lookahead === null) { - throw new Error(`malformed html ${html}`); - } - i = lookahead[0].length; - beforeTag = lookahead[1]; - tag = lookahead[2]; - tagNameEndsAt = i; - for (i; i < html.length; i++) { - if (html.charAt(i) === ">") { - break; - } - if (html.charAt(i) === "=") { - let isId = html.slice(i - 3, i) === " id"; - i++; - let char = html.charAt(i); - if (quoteChars.has(char)) { - let attrStartsAt = i; - i++; - for (i; i < html.length; i++) { - if (html.charAt(i) === char) { - break; - } - } - if (isId) { - id = html.slice(attrStartsAt + 1, i); - break; - } - } - } - } - let closeAt = html.length - 1; - insideComment = false; - while (closeAt >= beforeTag.length + tag.length) { - let char = html.charAt(closeAt); - if (insideComment) { - if (char === "-" && html.slice(closeAt - 3, closeAt) === "" && html.slice(closeAt - 2, closeAt) === "--") { - insideComment = true; - closeAt -= 3; - } else if (char === ">") { - break; - } else { - closeAt -= 1; - } - } - afterTag = html.slice(closeAt + 1, html.length); - let attrsStr = Object.keys(attrs).map((attr) => attrs[attr] === true ? attr : `${attr}="${attrs[attr]}"`).join(" "); - if (clearInnerHTML) { - let idAttrStr = id ? ` id="${id}"` : ""; - if (VOID_TAGS.has(tag)) { - newHTML = `<${tag}${idAttrStr}${attrsStr === "" ? "" : " "}${attrsStr}/>`; - } else { - newHTML = `<${tag}${idAttrStr}${attrsStr === "" ? "" : " "}${attrsStr}>`; - } - } else { - let rest = html.slice(tagNameEndsAt, closeAt + 1); - newHTML = `<${tag}${attrsStr === "" ? "" : " "}${attrsStr}${rest}`; - } - return [newHTML, beforeTag, afterTag]; - }; - var Rendered = class { - static extract(diff) { - let { [REPLY]: reply, [EVENTS]: events, [TITLE]: title } = diff; - delete diff[REPLY]; - delete diff[EVENTS]; - delete diff[TITLE]; - return { diff, title, reply: reply || null, events: events || [] }; - } - constructor(viewId, rendered) { - this.viewId = viewId; - this.rendered = {}; - this.magicId = 0; - this.mergeDiff(rendered); - } - parentViewId() { - return this.viewId; - } - toString(onlyCids) { - let [str, streams] = this.recursiveToString(this.rendered, this.rendered[COMPONENTS], onlyCids, true, {}); - return [str, streams]; - } - recursiveToString(rendered, components = rendered[COMPONENTS], onlyCids, changeTracking, rootAttrs) { - onlyCids = onlyCids ? new Set(onlyCids) : null; - let output = { buffer: "", components, onlyCids, streams: /* @__PURE__ */ new Set() }; - this.toOutputBuffer(rendered, null, output, changeTracking, rootAttrs); - return [output.buffer, output.streams]; - } - componentCIDs(diff) { - return Object.keys(diff[COMPONENTS] || {}).map((i) => parseInt(i)); - } - isComponentOnlyDiff(diff) { - if (!diff[COMPONENTS]) { - return false; - } - return Object.keys(diff).length === 1; - } - getComponent(diff, cid) { - return diff[COMPONENTS][cid]; - } - resetRender(cid) { - if (this.rendered[COMPONENTS][cid]) { - this.rendered[COMPONENTS][cid].reset = true; - } - } - mergeDiff(diff) { - let newc = diff[COMPONENTS]; - let cache = {}; - delete diff[COMPONENTS]; - this.rendered = this.mutableMerge(this.rendered, diff); - this.rendered[COMPONENTS] = this.rendered[COMPONENTS] || {}; - if (newc) { - let oldc = this.rendered[COMPONENTS]; - for (let cid in newc) { - newc[cid] = this.cachedFindComponent(cid, newc[cid], oldc, newc, cache); - } - for (let cid in newc) { - oldc[cid] = newc[cid]; - } - diff[COMPONENTS] = newc; - } - } - cachedFindComponent(cid, cdiff, oldc, newc, cache) { - if (cache[cid]) { - return cache[cid]; - } else { - let ndiff, stat, scid = cdiff[STATIC]; - if (isCid(scid)) { - let tdiff; - if (scid > 0) { - tdiff = this.cachedFindComponent(scid, newc[scid], oldc, newc, cache); - } else { - tdiff = oldc[-scid]; - } - stat = tdiff[STATIC]; - ndiff = this.cloneMerge(tdiff, cdiff, true); - ndiff[STATIC] = stat; - } else { - ndiff = cdiff[STATIC] !== void 0 || oldc[cid] === void 0 ? cdiff : this.cloneMerge(oldc[cid], cdiff, false); - } - cache[cid] = ndiff; - return ndiff; - } - } - mutableMerge(target, source) { - if (source[STATIC] !== void 0) { - return source; - } else { - this.doMutableMerge(target, source); - return target; - } - } - doMutableMerge(target, source) { - for (let key in source) { - let val = source[key]; - let targetVal = target[key]; - let isObjVal = isObject(val); - if (isObjVal && val[STATIC] === void 0 && isObject(targetVal)) { - this.doMutableMerge(targetVal, val); - } else { - target[key] = val; - } - } - if (target[ROOT]) { - target.newRender = true; - } - } - cloneMerge(target, source, pruneMagicId) { - let merged = __spreadValues(__spreadValues({}, target), source); - for (let key in merged) { - let val = source[key]; - let targetVal = target[key]; - if (isObject(val) && val[STATIC] === void 0 && isObject(targetVal)) { - merged[key] = this.cloneMerge(targetVal, val, pruneMagicId); - } else if (val === void 0 && isObject(targetVal)) { - merged[key] = this.cloneMerge(targetVal, {}, pruneMagicId); - } - } - if (pruneMagicId) { - delete merged.magicId; - delete merged.newRender; - } else if (target[ROOT]) { - merged.newRender = true; - } - return merged; - } - componentToString(cid) { - let [str, streams] = this.recursiveCIDToString(this.rendered[COMPONENTS], cid, null); - let [strippedHTML, _before, _after] = modifyRoot(str, {}); - return [strippedHTML, streams]; - } - pruneCIDs(cids) { - cids.forEach((cid) => delete this.rendered[COMPONENTS][cid]); - } - get() { - return this.rendered; - } - isNewFingerprint(diff = {}) { - return !!diff[STATIC]; - } - templateStatic(part, templates) { - if (typeof part === "number") { - return templates[part]; - } else { - return part; - } - } - nextMagicID() { - this.magicId++; - return `m${this.magicId}-${this.parentViewId()}`; - } - toOutputBuffer(rendered, templates, output, changeTracking, rootAttrs = {}) { - if (rendered[DYNAMICS]) { - return this.comprehensionToBuffer(rendered, templates, output); - } - let { [STATIC]: statics } = rendered; - statics = this.templateStatic(statics, templates); - let isRoot = rendered[ROOT]; - let prevBuffer = output.buffer; - if (isRoot) { - output.buffer = ""; - } - if (changeTracking && isRoot && !rendered.magicId) { - rendered.newRender = true; - rendered.magicId = this.nextMagicID(); - } - output.buffer += statics[0]; - for (let i = 1; i < statics.length; i++) { - this.dynamicToBuffer(rendered[i - 1], templates, output, changeTracking); - output.buffer += statics[i]; - } - if (isRoot) { - let skip = false; - let attrs; - if (changeTracking || rendered.magicId) { - skip = changeTracking && !rendered.newRender; - attrs = __spreadValues({ [PHX_MAGIC_ID]: rendered.magicId }, rootAttrs); - } else { - attrs = rootAttrs; - } - if (skip) { - attrs[PHX_SKIP] = true; - } - let [newRoot, commentBefore, commentAfter] = modifyRoot(output.buffer, attrs, skip); - rendered.newRender = false; - output.buffer = prevBuffer + commentBefore + newRoot + commentAfter; - } - } - comprehensionToBuffer(rendered, templates, output) { - let { [DYNAMICS]: dynamics, [STATIC]: statics, [STREAM]: stream } = rendered; - let [_ref, _inserts, deleteIds, reset] = stream || [null, {}, [], null]; - statics = this.templateStatic(statics, templates); - let compTemplates = templates || rendered[TEMPLATES]; - for (let d = 0; d < dynamics.length; d++) { - let dynamic = dynamics[d]; - output.buffer += statics[0]; - for (let i = 1; i < statics.length; i++) { - let changeTracking = false; - this.dynamicToBuffer(dynamic[i - 1], compTemplates, output, changeTracking); - output.buffer += statics[i]; - } - } - if (stream !== void 0 && (rendered[DYNAMICS].length > 0 || deleteIds.length > 0 || reset)) { - delete rendered[STREAM]; - rendered[DYNAMICS] = []; - output.streams.add(stream); - } - } - dynamicToBuffer(rendered, templates, output, changeTracking) { - if (typeof rendered === "number") { - let [str, streams] = this.recursiveCIDToString(output.components, rendered, output.onlyCids); - output.buffer += str; - output.streams = /* @__PURE__ */ new Set([...output.streams, ...streams]); - } else if (isObject(rendered)) { - this.toOutputBuffer(rendered, templates, output, changeTracking, {}); - } else { - output.buffer += rendered; - } - } - recursiveCIDToString(components, cid, onlyCids) { - let component = components[cid] || logError(`no component for CID ${cid}`, components); - let attrs = { [PHX_COMPONENT]: cid }; - let skip = onlyCids && !onlyCids.has(cid); - component.newRender = !skip; - component.magicId = `c${cid}-${this.parentViewId()}`; - let changeTracking = !component.reset; - let [html, streams] = this.recursiveToString(component, components, onlyCids, changeTracking, attrs); - delete component.reset; - return [html, streams]; - } - }; - var viewHookID = 1; - var ViewHook = class { - static makeID() { - return viewHookID++; - } - static elementID(el) { - return el.phxHookId; - } - constructor(view, el, callbacks) { - this.__view = view; - this.liveSocket = view.liveSocket; - this.__callbacks = callbacks; - this.__listeners = /* @__PURE__ */ new Set(); - this.__isDisconnected = false; - this.el = el; - this.el.phxHookId = this.constructor.makeID(); - for (let key in this.__callbacks) { - this[key] = this.__callbacks[key]; - } - } - __mounted() { - this.mounted && this.mounted(); - } - __updated() { - this.updated && this.updated(); - } - __beforeUpdate() { - this.beforeUpdate && this.beforeUpdate(); - } - __destroyed() { - this.destroyed && this.destroyed(); - } - __reconnected() { - if (this.__isDisconnected) { - this.__isDisconnected = false; - this.reconnected && this.reconnected(); - } - } - __disconnected() { - this.__isDisconnected = true; - this.disconnected && this.disconnected(); - } - pushEvent(event, payload = {}, onReply = function() { - }) { - return this.__view.pushHookEvent(this.el, null, event, payload, onReply); - } - pushEventTo(phxTarget, event, payload = {}, onReply = function() { - }) { - return this.__view.withinTargets(phxTarget, (view, targetCtx) => { - return view.pushHookEvent(this.el, targetCtx, event, payload, onReply); - }); - } - handleEvent(event, callback) { - let callbackRef = (customEvent, bypass) => bypass ? event : callback(customEvent.detail); - window.addEventListener(`phx:${event}`, callbackRef); - this.__listeners.add(callbackRef); - return callbackRef; - } - removeHandleEvent(callbackRef) { - let event = callbackRef(null, true); - window.removeEventListener(`phx:${event}`, callbackRef); - this.__listeners.delete(callbackRef); - } - upload(name, files) { - return this.__view.dispatchUploads(null, name, files); - } - uploadTo(phxTarget, name, files) { - return this.__view.withinTargets(phxTarget, (view, targetCtx) => { - view.dispatchUploads(targetCtx, name, files); - }); - } - __cleanup__() { - this.__listeners.forEach((callbackRef) => this.removeHandleEvent(callbackRef)); - } - }; - var serializeForm = (form, metadata, onlyNames = []) => { - const _a = metadata, { submitter } = _a, meta = __objRest(_a, ["submitter"]); - let injectedElement; - if (submitter && submitter.name) { - const input = document.createElement("input"); - input.type = "hidden"; - const formId = submitter.getAttribute("form"); - if (formId) { - input.setAttribute("form", formId); - } - input.name = submitter.name; - input.value = submitter.value; - submitter.parentElement.insertBefore(input, submitter); - injectedElement = input; - } - const formData = new FormData(form); - const toRemove = []; - formData.forEach((val, key, _index) => { - if (val instanceof File) { - toRemove.push(key); - } - }); - toRemove.forEach((key) => formData.delete(key)); - const params2 = new URLSearchParams(); - for (let [key, val] of formData.entries()) { - if (onlyNames.length === 0 || onlyNames.indexOf(key) >= 0) { - params2.append(key, val); - } - } - if (submitter && injectedElement) { - submitter.parentElement.removeChild(injectedElement); - } - for (let metaKey in meta) { - params2.append(metaKey, meta[metaKey]); - } - return params2.toString(); - }; - var View = class { - constructor(el, liveSocket2, parentView, flash, liveReferer) { - this.isDead = false; - this.liveSocket = liveSocket2; - this.flash = flash; - this.parent = parentView; - this.root = parentView ? parentView.root : this; - this.el = el; - this.id = this.el.id; - this.ref = 0; - this.childJoins = 0; - this.loaderTimer = null; - this.pendingDiffs = []; - this.pendingForms = /* @__PURE__ */ new Set(); - this.redirect = false; - this.href = null; - this.joinCount = this.parent ? this.parent.joinCount - 1 : 0; - this.joinPending = true; - this.destroyed = false; - this.joinCallback = function(onDone) { - onDone && onDone(); - }; - this.stopCallback = function() { - }; - this.pendingJoinOps = this.parent ? null : []; - this.viewHooks = {}; - this.formSubmits = []; - this.children = this.parent ? null : {}; - this.root.children[this.id] = {}; - this.formsForRecovery = {}; - this.channel = this.liveSocket.channel(`lv:${this.id}`, () => { - let url = this.href && this.expandURL(this.href); - return { - redirect: this.redirect ? url : void 0, - url: this.redirect ? void 0 : url || void 0, - params: this.connectParams(liveReferer), - session: this.getSession(), - static: this.getStatic(), - flash: this.flash - }; - }); - } - setHref(href) { - this.href = href; - } - setRedirect(href) { - this.redirect = true; - this.href = href; - } - isMain() { - return this.el.hasAttribute(PHX_MAIN); - } - connectParams(liveReferer) { - let params2 = this.liveSocket.params(this.el); - let manifest = dom_default.all(document, `[${this.binding(PHX_TRACK_STATIC)}]`).map((node) => node.src || node.href).filter((url) => typeof url === "string"); - if (manifest.length > 0) { - params2["_track_static"] = manifest; - } - params2["_mounts"] = this.joinCount; - params2["_live_referer"] = liveReferer; - return params2; - } - isConnected() { - return this.channel.canPush(); - } - getSession() { - return this.el.getAttribute(PHX_SESSION); - } - getStatic() { - let val = this.el.getAttribute(PHX_STATIC); - return val === "" ? null : val; - } - destroy(callback = function() { - }) { - this.destroyAllChildren(); - this.destroyed = true; - delete this.root.children[this.id]; - if (this.parent) { - delete this.root.children[this.parent.id][this.id]; - } - clearTimeout(this.loaderTimer); - let onFinished = () => { - callback(); - for (let id in this.viewHooks) { - this.destroyHook(this.viewHooks[id]); - } - }; - dom_default.markPhxChildDestroyed(this.el); - this.log("destroyed", () => ["the child has been removed from the parent"]); - this.channel.leave().receive("ok", onFinished).receive("error", onFinished).receive("timeout", onFinished); - } - setContainerClasses(...classes) { - this.el.classList.remove(PHX_CONNECTED_CLASS, PHX_LOADING_CLASS, PHX_ERROR_CLASS, PHX_CLIENT_ERROR_CLASS, PHX_SERVER_ERROR_CLASS); - this.el.classList.add(...classes); - } - showLoader(timeout) { - clearTimeout(this.loaderTimer); - if (timeout) { - this.loaderTimer = setTimeout(() => this.showLoader(), timeout); - } else { - for (let id in this.viewHooks) { - this.viewHooks[id].__disconnected(); - } - this.setContainerClasses(PHX_LOADING_CLASS); - } - } - execAll(binding) { - dom_default.all(this.el, `[${binding}]`, (el) => this.liveSocket.execJS(el, el.getAttribute(binding))); - } - hideLoader() { - clearTimeout(this.loaderTimer); - this.setContainerClasses(PHX_CONNECTED_CLASS); - this.execAll(this.binding("connected")); - } - triggerReconnected() { - for (let id in this.viewHooks) { - this.viewHooks[id].__reconnected(); - } - } - log(kind, msgCallback) { - this.liveSocket.log(this, kind, msgCallback); - } - transition(time, onStart, onDone = function() { - }) { - this.liveSocket.transition(time, onStart, onDone); - } - withinTargets(phxTarget, callback, dom = document, viewEl) { - if (phxTarget instanceof HTMLElement || phxTarget instanceof SVGElement) { - return this.liveSocket.owner(phxTarget, (view) => callback(view, phxTarget)); - } - if (isCid(phxTarget)) { - let targets = dom_default.findComponentNodeList(viewEl || this.el, phxTarget); - if (targets.length === 0) { - logError(`no component found matching phx-target of ${phxTarget}`); - } else { - callback(this, parseInt(phxTarget)); - } - } else { - let targets = Array.from(dom.querySelectorAll(phxTarget)); - if (targets.length === 0) { - logError(`nothing found matching the phx-target selector "${phxTarget}"`); - } - targets.forEach((target) => this.liveSocket.owner(target, (view) => callback(view, target))); - } - } - applyDiff(type, rawDiff, callback) { - this.log(type, () => ["", clone(rawDiff)]); - let { diff, reply, events, title } = Rendered.extract(rawDiff); - callback({ diff, reply, events }); - if (typeof title === "string") { - window.requestAnimationFrame(() => dom_default.putTitle(title)); - } - } - onJoin(resp) { - let { rendered, container, liveview_version } = resp; - if (container) { - let [tag, attrs] = container; - this.el = dom_default.replaceRootContainer(this.el, tag, attrs); - } - this.childJoins = 0; - this.joinPending = true; - this.flash = null; - if (this.root === this) { - this.formsForRecovery = this.getFormsForRecovery(); - } - if (liveview_version !== this.liveSocket.version()) { - console.error(`LiveView asset version mismatch. JavaScript version ${this.liveSocket.version()} vs. server ${liveview_version}. To avoid issues, please ensure that your assets use the same version as the server.`); - } - browser_default.dropLocal(this.liveSocket.localStorage, window.location.pathname, CONSECUTIVE_RELOADS); - this.applyDiff("mount", rendered, ({ diff, events }) => { - this.rendered = new Rendered(this.id, diff); - let [html, streams] = this.renderContainer(null, "join"); - this.dropPendingRefs(); - this.joinCount++; - this.maybeRecoverForms(html, () => { - this.onJoinComplete(resp, html, streams, events); - }); - }); - } - dropPendingRefs() { - dom_default.all(document, `[${PHX_REF_SRC}="${this.id}"][${PHX_REF}]`, (el) => { - el.removeAttribute(PHX_REF); - el.removeAttribute(PHX_REF_SRC); - }); - } - onJoinComplete({ live_patch }, html, streams, events) { - if (this.joinCount > 1 || this.parent && !this.parent.isJoinPending()) { - return this.applyJoinPatch(live_patch, html, streams, events); - } - let newChildren = dom_default.findPhxChildrenInFragment(html, this.id).filter((toEl) => { - let fromEl = toEl.id && this.el.querySelector(`[id="${toEl.id}"]`); - let phxStatic = fromEl && fromEl.getAttribute(PHX_STATIC); - if (phxStatic) { - toEl.setAttribute(PHX_STATIC, phxStatic); - } - if (fromEl) { - fromEl.setAttribute(PHX_ROOT_ID, this.root.id); - } - return this.joinChild(toEl); - }); - if (newChildren.length === 0) { - if (this.parent) { - this.root.pendingJoinOps.push([this, () => this.applyJoinPatch(live_patch, html, streams, events)]); - this.parent.ackJoin(this); - } else { - this.onAllChildJoinsComplete(); - this.applyJoinPatch(live_patch, html, streams, events); - } - } else { - this.root.pendingJoinOps.push([this, () => this.applyJoinPatch(live_patch, html, streams, events)]); - } - } - attachTrueDocEl() { - this.el = dom_default.byId(this.id); - this.el.setAttribute(PHX_ROOT_ID, this.root.id); - } - execNewMounted() { - let phxViewportTop = this.binding(PHX_VIEWPORT_TOP); - let phxViewportBottom = this.binding(PHX_VIEWPORT_BOTTOM); - dom_default.all(this.el, `[${phxViewportTop}], [${phxViewportBottom}]`, (hookEl) => { - if (this.ownsElement(hookEl)) { - dom_default.maybeAddPrivateHooks(hookEl, phxViewportTop, phxViewportBottom); - this.maybeAddNewHook(hookEl); - } - }); - dom_default.all(this.el, `[${this.binding(PHX_HOOK)}], [data-phx-${PHX_HOOK}]`, (hookEl) => { - if (this.ownsElement(hookEl)) { - this.maybeAddNewHook(hookEl); - } - }); - dom_default.all(this.el, `[${this.binding(PHX_MOUNTED)}]`, (el) => { - if (this.ownsElement(el)) { - this.maybeMounted(el); - } - }); - } - applyJoinPatch(live_patch, html, streams, events) { - this.attachTrueDocEl(); - let patch = new DOMPatch(this, this.el, this.id, html, streams, null); - patch.markPrunableContentForRemoval(); - this.performPatch(patch, false, true); - this.joinNewChildren(); - this.execNewMounted(); - this.joinPending = false; - this.liveSocket.dispatchEvents(events); - this.applyPendingUpdates(); - if (live_patch) { - let { kind, to } = live_patch; - this.liveSocket.historyPatch(to, kind); - } - this.hideLoader(); - if (this.joinCount > 1) { - this.triggerReconnected(); - } - this.stopCallback(); - } - triggerBeforeUpdateHook(fromEl, toEl) { - this.liveSocket.triggerDOM("onBeforeElUpdated", [fromEl, toEl]); - let hook = this.getHook(fromEl); - let isIgnored = hook && dom_default.isIgnored(fromEl, this.binding(PHX_UPDATE)); - if (hook && !fromEl.isEqualNode(toEl) && !(isIgnored && isEqualObj(fromEl.dataset, toEl.dataset))) { - hook.__beforeUpdate(); - return hook; - } - } - maybeMounted(el) { - let phxMounted = el.getAttribute(this.binding(PHX_MOUNTED)); - let hasBeenInvoked = phxMounted && dom_default.private(el, "mounted"); - if (phxMounted && !hasBeenInvoked) { - this.liveSocket.execJS(el, phxMounted); - dom_default.putPrivate(el, "mounted", true); - } - } - maybeAddNewHook(el, force) { - let newHook = this.addHook(el); - if (newHook) { - newHook.__mounted(); - } - } - performPatch(patch, pruneCids, isJoinPatch = false) { - let removedEls = []; - let phxChildrenAdded = false; - let updatedHookIds = /* @__PURE__ */ new Set(); - patch.after("added", (el) => { - this.liveSocket.triggerDOM("onNodeAdded", [el]); - let phxViewportTop = this.binding(PHX_VIEWPORT_TOP); - let phxViewportBottom = this.binding(PHX_VIEWPORT_BOTTOM); - dom_default.maybeAddPrivateHooks(el, phxViewportTop, phxViewportBottom); - this.maybeAddNewHook(el); - if (el.getAttribute) { - this.maybeMounted(el); - } - }); - patch.after("phxChildAdded", (el) => { - if (dom_default.isPhxSticky(el)) { - this.liveSocket.joinRootViews(); - } else { - phxChildrenAdded = true; - } - }); - patch.before("updated", (fromEl, toEl) => { - let hook = this.triggerBeforeUpdateHook(fromEl, toEl); - if (hook) { - updatedHookIds.add(fromEl.id); - } - }); - patch.after("updated", (el) => { - if (updatedHookIds.has(el.id)) { - this.getHook(el).__updated(); - } - }); - patch.after("discarded", (el) => { - if (el.nodeType === Node.ELEMENT_NODE) { - removedEls.push(el); - } - }); - patch.after("transitionsDiscarded", (els) => this.afterElementsRemoved(els, pruneCids)); - patch.perform(isJoinPatch); - this.afterElementsRemoved(removedEls, pruneCids); - return phxChildrenAdded; - } - afterElementsRemoved(elements, pruneCids) { - let destroyedCIDs = []; - elements.forEach((parent) => { - let components = dom_default.all(parent, `[${PHX_COMPONENT}]`); - let hooks = dom_default.all(parent, `[${this.binding(PHX_HOOK)}]`); - components.concat(parent).forEach((el) => { - let cid = this.componentID(el); - if (isCid(cid) && destroyedCIDs.indexOf(cid) === -1) { - destroyedCIDs.push(cid); - } - }); - hooks.concat(parent).forEach((hookEl) => { - let hook = this.getHook(hookEl); - hook && this.destroyHook(hook); - }); - }); - if (pruneCids) { - this.maybePushComponentsDestroyed(destroyedCIDs); - } - } - joinNewChildren() { - dom_default.findPhxChildren(this.el, this.id).forEach((el) => this.joinChild(el)); - } - maybeRecoverForms(html, callback) { - const phxChange = this.binding("change"); - const oldForms = this.root.formsForRecovery; - let template = document.createElement("template"); - template.innerHTML = html; - const rootEl = template.content.firstElementChild; - rootEl.id = this.id; - rootEl.setAttribute(PHX_ROOT_ID, this.root.id); - rootEl.setAttribute(PHX_SESSION, this.getSession()); - rootEl.setAttribute(PHX_STATIC, this.getStatic()); - rootEl.setAttribute(PHX_PARENT_ID, this.parent ? this.parent.id : null); - const formsToRecover = dom_default.all(template.content, "form").filter((newForm) => newForm.id && oldForms[newForm.id]).filter((newForm) => !this.pendingForms.has(newForm.id)).filter((newForm) => oldForms[newForm.id].getAttribute(phxChange) === newForm.getAttribute(phxChange)).map((newForm) => { - return [oldForms[newForm.id], newForm]; - }); - if (formsToRecover.length === 0) { - return callback(); - } - formsToRecover.forEach(([oldForm, newForm], i) => { - this.pendingForms.add(newForm.id); - this.pushFormRecovery(oldForm, newForm, template.content, () => { - this.pendingForms.delete(newForm.id); - if (i === formsToRecover.length - 1) { - callback(); - } - }); - }); - } - getChildById(id) { - return this.root.children[this.id][id]; - } - getDescendentByEl(el) { - if (el.id === this.id) { - return this; - } else { - return this.children[el.getAttribute(PHX_PARENT_ID)][el.id]; - } - } - destroyDescendent(id) { - for (let parentId in this.root.children) { - for (let childId in this.root.children[parentId]) { - if (childId === id) { - return this.root.children[parentId][childId].destroy(); - } - } - } - } - joinChild(el) { - let child = this.getChildById(el.id); - if (!child) { - let view = new View(el, this.liveSocket, this); - this.root.children[this.id][view.id] = view; - view.join(); - this.childJoins++; - return true; - } - } - isJoinPending() { - return this.joinPending; - } - ackJoin(_child) { - this.childJoins--; - if (this.childJoins === 0) { - if (this.parent) { - this.parent.ackJoin(this); - } else { - this.onAllChildJoinsComplete(); - } - } - } - onAllChildJoinsComplete() { - this.pendingForms.clear(); - this.formsForRecovery = {}; - this.joinCallback(() => { - this.pendingJoinOps.forEach(([view, op]) => { - if (!view.isDestroyed()) { - op(); - } - }); - this.pendingJoinOps = []; - }); - } - update(diff, events) { - if (this.isJoinPending() || this.liveSocket.hasPendingLink() && this.root.isMain()) { - return this.pendingDiffs.push({ diff, events }); - } - this.rendered.mergeDiff(diff); - let phxChildrenAdded = false; - if (this.rendered.isComponentOnlyDiff(diff)) { - this.liveSocket.time("component patch complete", () => { - let parentCids = dom_default.findExistingParentCIDs(this.el, this.rendered.componentCIDs(diff)); - parentCids.forEach((parentCID) => { - if (this.componentPatch(this.rendered.getComponent(diff, parentCID), parentCID)) { - phxChildrenAdded = true; - } - }); - }); - } else if (!isEmpty(diff)) { - this.liveSocket.time("full patch complete", () => { - let [html, streams] = this.renderContainer(diff, "update"); - let patch = new DOMPatch(this, this.el, this.id, html, streams, null); - phxChildrenAdded = this.performPatch(patch, true); - }); - } - this.liveSocket.dispatchEvents(events); - if (phxChildrenAdded) { - this.joinNewChildren(); - } - } - renderContainer(diff, kind) { - return this.liveSocket.time(`toString diff (${kind})`, () => { - let tag = this.el.tagName; - let cids = diff ? this.rendered.componentCIDs(diff) : null; - let [html, streams] = this.rendered.toString(cids); - return [`<${tag}>${html}`, streams]; - }); - } - componentPatch(diff, cid) { - if (isEmpty(diff)) - return false; - let [html, streams] = this.rendered.componentToString(cid); - let patch = new DOMPatch(this, this.el, this.id, html, streams, cid); - let childrenAdded = this.performPatch(patch, true); - return childrenAdded; - } - getHook(el) { - return this.viewHooks[ViewHook.elementID(el)]; - } - addHook(el) { - if (ViewHook.elementID(el) || !el.getAttribute) { - return; - } - let hookName = el.getAttribute(`data-phx-${PHX_HOOK}`) || el.getAttribute(this.binding(PHX_HOOK)); - if (hookName && !this.ownsElement(el)) { - return; - } - let callbacks = this.liveSocket.getHookCallbacks(hookName); - if (callbacks) { - if (!el.id) { - logError(`no DOM ID for hook "${hookName}". Hooks require a unique ID on each element.`, el); - } - let hook = new ViewHook(this, el, callbacks); - this.viewHooks[ViewHook.elementID(hook.el)] = hook; - return hook; - } else if (hookName !== null) { - logError(`unknown hook found for "${hookName}"`, el); - } - } - destroyHook(hook) { - hook.__destroyed(); - hook.__cleanup__(); - delete this.viewHooks[ViewHook.elementID(hook.el)]; - } - applyPendingUpdates() { - this.pendingDiffs.forEach(({ diff, events }) => this.update(diff, events)); - this.pendingDiffs = []; - this.eachChild((child) => child.applyPendingUpdates()); - } - eachChild(callback) { - let children = this.root.children[this.id] || {}; - for (let id in children) { - callback(this.getChildById(id)); - } - } - onChannel(event, cb) { - this.liveSocket.onChannel(this.channel, event, (resp) => { - if (this.isJoinPending()) { - this.root.pendingJoinOps.push([this, () => cb(resp)]); - } else { - this.liveSocket.requestDOMUpdate(() => cb(resp)); - } - }); - } - bindChannel() { - this.liveSocket.onChannel(this.channel, "diff", (rawDiff) => { - this.liveSocket.requestDOMUpdate(() => { - this.applyDiff("update", rawDiff, ({ diff, events }) => this.update(diff, events)); - }); - }); - this.onChannel("redirect", ({ to, flash }) => this.onRedirect({ to, flash })); - this.onChannel("live_patch", (redir) => this.onLivePatch(redir)); - this.onChannel("live_redirect", (redir) => this.onLiveRedirect(redir)); - this.channel.onError((reason) => this.onError(reason)); - this.channel.onClose((reason) => this.onClose(reason)); - } - destroyAllChildren() { - this.eachChild((child) => child.destroy()); - } - onLiveRedirect(redir) { - let { to, kind, flash } = redir; - let url = this.expandURL(to); - this.liveSocket.historyRedirect(url, kind, flash); - } - onLivePatch(redir) { - let { to, kind } = redir; - this.href = this.expandURL(to); - this.liveSocket.historyPatch(to, kind); - } - expandURL(to) { - return to.startsWith("/") ? `${window.location.protocol}//${window.location.host}${to}` : to; - } - onRedirect({ to, flash }) { - this.liveSocket.redirect(to, flash); - } - isDestroyed() { - return this.destroyed; - } - joinDead() { - this.isDead = true; - } - join(callback) { - this.showLoader(this.liveSocket.loaderTimeout); - this.bindChannel(); - if (this.isMain()) { - this.stopCallback = this.liveSocket.withPageLoading({ to: this.href, kind: "initial" }); - } - this.joinCallback = (onDone) => { - onDone = onDone || function() { - }; - callback ? callback(this.joinCount, onDone) : onDone(); - }; - this.liveSocket.wrapPush(this, { timeout: false }, () => { - return this.channel.join().receive("ok", (data) => { - if (!this.isDestroyed()) { - this.liveSocket.requestDOMUpdate(() => this.onJoin(data)); - } - }).receive("error", (resp) => !this.isDestroyed() && this.onJoinError(resp)).receive("timeout", () => !this.isDestroyed() && this.onJoinError({ reason: "timeout" })); - }); - } - onJoinError(resp) { - if (resp.reason === "reload") { - this.log("error", () => [`failed mount with ${resp.status}. Falling back to page request`, resp]); - if (this.isMain()) { - this.onRedirect({ to: this.href }); - } - return; - } else if (resp.reason === "unauthorized" || resp.reason === "stale") { - this.log("error", () => ["unauthorized live_redirect. Falling back to page request", resp]); - if (this.isMain()) { - this.onRedirect({ to: this.href }); - } - return; - } - if (resp.redirect || resp.live_redirect) { - this.joinPending = false; - this.channel.leave(); - } - if (resp.redirect) { - return this.onRedirect(resp.redirect); - } - if (resp.live_redirect) { - return this.onLiveRedirect(resp.live_redirect); - } - this.displayError([PHX_LOADING_CLASS, PHX_ERROR_CLASS, PHX_SERVER_ERROR_CLASS]); - this.log("error", () => ["unable to join", resp]); - if (this.liveSocket.isConnected()) { - this.liveSocket.reloadWithJitter(this); - } - } - onClose(reason) { - if (this.isDestroyed()) { - return; - } - if (this.liveSocket.hasPendingLink() && reason !== "leave") { - return this.liveSocket.reloadWithJitter(this); - } - this.destroyAllChildren(); - this.liveSocket.dropActiveElement(this); - if (document.activeElement) { - document.activeElement.blur(); - } - if (this.liveSocket.isUnloaded()) { - this.showLoader(BEFORE_UNLOAD_LOADER_TIMEOUT); - } - } - onError(reason) { - this.onClose(reason); - if (this.liveSocket.isConnected()) { - this.log("error", () => ["view crashed", reason]); - } - if (!this.liveSocket.isUnloaded()) { - if (this.liveSocket.isConnected()) { - this.displayError([PHX_LOADING_CLASS, PHX_ERROR_CLASS, PHX_SERVER_ERROR_CLASS]); - } else { - this.displayError([PHX_LOADING_CLASS, PHX_ERROR_CLASS, PHX_CLIENT_ERROR_CLASS]); - } - } - } - displayError(classes) { - if (this.isMain()) { - dom_default.dispatchEvent(window, "phx:page-loading-start", { detail: { to: this.href, kind: "error" } }); - } - this.showLoader(); - this.setContainerClasses(...classes); - this.execAll(this.binding("disconnected")); - } - pushWithReply(refGenerator, event, payload, onReply = function() { - }) { - if (!this.isConnected()) { - return; - } - let [ref, [el], opts] = refGenerator ? refGenerator() : [null, [], {}]; - let onLoadingDone = function() { - }; - if (opts.page_loading || el && el.getAttribute(this.binding(PHX_PAGE_LOADING)) !== null) { - onLoadingDone = this.liveSocket.withPageLoading({ kind: "element", target: el }); - } - if (typeof payload.cid !== "number") { - delete payload.cid; - } - return this.liveSocket.wrapPush(this, { timeout: true }, () => { - return this.channel.push(event, payload, PUSH_TIMEOUT).receive("ok", (resp) => { - let finish = (hookReply) => { - if (resp.redirect) { - this.onRedirect(resp.redirect); - } - if (resp.live_patch) { - this.onLivePatch(resp.live_patch); - } - if (resp.live_redirect) { - this.onLiveRedirect(resp.live_redirect); - } - onLoadingDone(); - onReply(resp, hookReply); - }; - if (resp.diff) { - this.liveSocket.requestDOMUpdate(() => { - this.applyDiff("update", resp.diff, ({ diff, reply, events }) => { - if (ref !== null) { - this.undoRefs(ref); - } - this.update(diff, events); - finish(reply); - }); - }); - } else { - if (ref !== null) { - this.undoRefs(ref); - } - finish(null); - } - }); - }); - } - undoRefs(ref, onlyEls) { - onlyEls = onlyEls ? new Set(onlyEls) : null; - if (!this.isConnected()) { - return; - } - dom_default.all(document, `[${PHX_REF_SRC}="${this.id}"][${PHX_REF}="${ref}"]`, (el) => { - if (onlyEls && !onlyEls.has(el)) { - return; - } - el.dispatchEvent(new CustomEvent("phx:unlock", { bubbles: true, cancelable: false })); - let disabledVal = el.getAttribute(PHX_DISABLED); - let readOnlyVal = el.getAttribute(PHX_READONLY); - el.removeAttribute(PHX_REF); - el.removeAttribute(PHX_REF_SRC); - if (readOnlyVal !== null) { - el.readOnly = readOnlyVal === "true" ? true : false; - el.removeAttribute(PHX_READONLY); - } - if (disabledVal !== null) { - el.disabled = disabledVal === "true" ? true : false; - el.removeAttribute(PHX_DISABLED); - } - PHX_EVENT_CLASSES.forEach((className) => dom_default.removeClass(el, className)); - let disableRestore = el.getAttribute(PHX_DISABLE_WITH_RESTORE); - if (disableRestore !== null) { - el.innerText = disableRestore; - el.removeAttribute(PHX_DISABLE_WITH_RESTORE); - } - let toEl = dom_default.private(el, PHX_REF); - if (toEl) { - let hook = this.triggerBeforeUpdateHook(el, toEl); - DOMPatch.patchEl(el, toEl, this.liveSocket.getActiveElement()); - if (hook) { - hook.__updated(); - } - dom_default.deletePrivate(el, PHX_REF); - } - }); - } - putRef(elements, event, opts = {}) { - let newRef = this.ref++; - let disableWith = this.binding(PHX_DISABLE_WITH); - if (opts.loading) { - elements = elements.concat(dom_default.all(document, opts.loading)); - } - for (let el of elements) { - el.setAttribute(PHX_REF, newRef); - el.setAttribute(PHX_REF_SRC, this.el.id); - if (opts.submitter && !(el === opts.submitter || el === opts.form)) { - continue; - } - el.classList.add(`phx-${event}-loading`); - el.dispatchEvent(new CustomEvent(`phx:${event}-loading`, { bubbles: true, cancelable: false })); - let disableText = el.getAttribute(disableWith); - if (disableText !== null) { - if (!el.getAttribute(PHX_DISABLE_WITH_RESTORE)) { - el.setAttribute(PHX_DISABLE_WITH_RESTORE, el.innerText); - } - if (disableText !== "") { - el.innerText = disableText; - } - el.setAttribute(PHX_DISABLED, el.getAttribute(PHX_DISABLED) || el.disabled); - el.setAttribute("disabled", ""); - } - } - return [newRef, elements, opts]; - } - componentID(el) { - let cid = el.getAttribute && el.getAttribute(PHX_COMPONENT); - return cid ? parseInt(cid) : null; - } - targetComponentID(target, targetCtx, opts = {}) { - if (isCid(targetCtx)) { - return targetCtx; - } - let cidOrSelector = opts.target || target.getAttribute(this.binding("target")); - if (isCid(cidOrSelector)) { - return parseInt(cidOrSelector); - } else if (targetCtx && (cidOrSelector !== null || opts.target)) { - return this.closestComponentID(targetCtx); - } else { - return null; - } - } - closestComponentID(targetCtx) { - if (isCid(targetCtx)) { - return targetCtx; - } else if (targetCtx) { - return maybe(targetCtx.closest(`[${PHX_COMPONENT}]`), (el) => this.ownsElement(el) && this.componentID(el)); - } else { - return null; - } - } - pushHookEvent(el, targetCtx, event, payload, onReply) { - if (!this.isConnected()) { - this.log("hook", () => ["unable to push hook event. LiveView not connected", event, payload]); - return false; - } - let [ref, els, opts] = this.putRef([el], "hook"); - this.pushWithReply(() => [ref, els, opts], "event", { - type: "hook", - event, - value: payload, - cid: this.closestComponentID(targetCtx) - }, (resp, reply) => onReply(reply, ref)); - return ref; - } - extractMeta(el, meta, value) { - let prefix = this.binding("value-"); - for (let i = 0; i < el.attributes.length; i++) { - if (!meta) { - meta = {}; - } - let name = el.attributes[i].name; - if (name.startsWith(prefix)) { - meta[name.replace(prefix, "")] = el.getAttribute(name); - } - } - if (el.value !== void 0 && !(el instanceof HTMLFormElement)) { - if (!meta) { - meta = {}; - } - meta.value = el.value; - if (el.tagName === "INPUT" && CHECKABLE_INPUTS.indexOf(el.type) >= 0 && !el.checked) { - delete meta.value; - } - } - if (value) { - if (!meta) { - meta = {}; - } - for (let key in value) { - meta[key] = value[key]; - } - } - return meta; - } - pushEvent(type, el, targetCtx, phxEvent, meta, opts = {}, onReply) { - this.pushWithReply(() => this.putRef([el], type, opts), "event", { - type, - event: phxEvent, - value: this.extractMeta(el, meta, opts.value), - cid: this.targetComponentID(el, targetCtx, opts) - }, (resp, reply) => onReply && onReply(reply)); - } - pushFileProgress(fileEl, entryRef, progress, onReply = function() { - }) { - this.liveSocket.withinOwners(fileEl.form, (view, targetCtx) => { - view.pushWithReply(null, "progress", { - event: fileEl.getAttribute(view.binding(PHX_PROGRESS)), - ref: fileEl.getAttribute(PHX_UPLOAD_REF), - entry_ref: entryRef, - progress, - cid: view.targetComponentID(fileEl.form, targetCtx) - }, onReply); - }); - } - pushInput(inputEl, targetCtx, forceCid, phxEvent, opts, callback) { - let uploads; - let cid = isCid(forceCid) ? forceCid : this.targetComponentID(inputEl.form, targetCtx, opts); - let refGenerator = () => this.putRef([inputEl, inputEl.form], "change", opts); - let formData; - let meta = this.extractMeta(inputEl.form); - if (inputEl instanceof HTMLButtonElement) { - meta.submitter = inputEl; - } - if (inputEl.getAttribute(this.binding("change"))) { - formData = serializeForm(inputEl.form, __spreadValues({ _target: opts._target }, meta), [inputEl.name]); - } else { - formData = serializeForm(inputEl.form, __spreadValues({ _target: opts._target }, meta)); - } - if (dom_default.isUploadInput(inputEl) && inputEl.files && inputEl.files.length > 0) { - LiveUploader.trackFiles(inputEl, Array.from(inputEl.files)); - } - uploads = LiveUploader.serializeUploads(inputEl); - let event = { - type: "form", - event: phxEvent, - value: formData, - uploads, - cid - }; - this.pushWithReply(refGenerator, "event", event, (resp) => { - dom_default.showError(inputEl, this.liveSocket.binding(PHX_FEEDBACK_FOR), this.liveSocket.binding(PHX_FEEDBACK_GROUP)); - if (dom_default.isUploadInput(inputEl) && dom_default.isAutoUpload(inputEl)) { - if (LiveUploader.filesAwaitingPreflight(inputEl).length > 0) { - let [ref, _els] = refGenerator(); - this.undoRefs(ref, [inputEl.form]); - this.uploadFiles(inputEl.form, targetCtx, ref, cid, (_uploads) => { - callback && callback(resp); - this.triggerAwaitingSubmit(inputEl.form); - this.undoRefs(ref); - }); - } - } else { - callback && callback(resp); - } - }); - } - triggerAwaitingSubmit(formEl) { - let awaitingSubmit = this.getScheduledSubmit(formEl); - if (awaitingSubmit) { - let [_el, _ref, _opts, callback] = awaitingSubmit; - this.cancelSubmit(formEl); - callback(); - } - } - getScheduledSubmit(formEl) { - return this.formSubmits.find(([el, _ref, _opts, _callback]) => el.isSameNode(formEl)); - } - scheduleSubmit(formEl, ref, opts, callback) { - if (this.getScheduledSubmit(formEl)) { - return true; - } - this.formSubmits.push([formEl, ref, opts, callback]); - } - cancelSubmit(formEl) { - this.formSubmits = this.formSubmits.filter(([el, ref, _callback]) => { - if (el.isSameNode(formEl)) { - this.undoRefs(ref); - return false; - } else { - return true; - } - }); - } - disableForm(formEl, opts = {}) { - let filterIgnored = (el) => { - let userIgnored = closestPhxBinding(el, `${this.binding(PHX_UPDATE)}=ignore`, el.form); - return !(userIgnored || closestPhxBinding(el, "data-phx-update=ignore", el.form)); - }; - let filterDisables = (el) => { - return el.hasAttribute(this.binding(PHX_DISABLE_WITH)); - }; - let filterButton = (el) => el.tagName == "BUTTON"; - let filterInput = (el) => ["INPUT", "TEXTAREA", "SELECT"].includes(el.tagName); - let formElements = Array.from(formEl.elements); - let disables = formElements.filter(filterDisables); - let buttons = formElements.filter(filterButton).filter(filterIgnored); - let inputs = formElements.filter(filterInput).filter(filterIgnored); - buttons.forEach((button) => { - button.setAttribute(PHX_DISABLED, button.disabled); - button.disabled = true; - }); - inputs.forEach((input) => { - input.setAttribute(PHX_READONLY, input.readOnly); - input.readOnly = true; - if (input.files) { - input.setAttribute(PHX_DISABLED, input.disabled); - input.disabled = true; - } - }); - formEl.setAttribute(this.binding(PHX_PAGE_LOADING), ""); - return this.putRef([formEl].concat(disables).concat(buttons).concat(inputs), "submit", opts); - } - pushFormSubmit(formEl, targetCtx, phxEvent, submitter, opts, onReply) { - let refGenerator = () => this.disableForm(formEl, __spreadProps(__spreadValues({}, opts), { form: formEl, submitter })); - let cid = this.targetComponentID(formEl, targetCtx); - if (LiveUploader.hasUploadsInProgress(formEl)) { - let [ref, _els] = refGenerator(); - let push = () => this.pushFormSubmit(formEl, targetCtx, phxEvent, submitter, opts, onReply); - return this.scheduleSubmit(formEl, ref, opts, push); - } else if (LiveUploader.inputsAwaitingPreflight(formEl).length > 0) { - let [ref, els] = refGenerator(); - let proxyRefGen = () => [ref, els, opts]; - this.uploadFiles(formEl, targetCtx, ref, cid, (uploads) => { - if (LiveUploader.inputsAwaitingPreflight(formEl).length > 0) { - return this.undoRefs(ref); - } - let meta = this.extractMeta(formEl); - let formData = serializeForm(formEl, __spreadValues({ submitter }, meta)); - this.pushWithReply(proxyRefGen, "event", { - type: "form", - event: phxEvent, - value: formData, - cid - }, onReply); - }); - } else if (!(formEl.hasAttribute(PHX_REF) && formEl.classList.contains("phx-submit-loading"))) { - let meta = this.extractMeta(formEl); - let formData = serializeForm(formEl, __spreadValues({ submitter }, meta)); - this.pushWithReply(refGenerator, "event", { - type: "form", - event: phxEvent, - value: formData, - cid - }, onReply); - } - } - uploadFiles(formEl, targetCtx, ref, cid, onComplete) { - let joinCountAtUpload = this.joinCount; - let inputEls = LiveUploader.activeFileInputs(formEl); - let numFileInputsInProgress = inputEls.length; - inputEls.forEach((inputEl) => { - let uploader = new LiveUploader(inputEl, this, () => { - numFileInputsInProgress--; - if (numFileInputsInProgress === 0) { - onComplete(); - } - }); - let entries = uploader.entries().map((entry) => entry.toPreflightPayload()); - if (entries.length === 0) { - numFileInputsInProgress--; - return; - } - let payload = { - ref: inputEl.getAttribute(PHX_UPLOAD_REF), - entries, - cid: this.targetComponentID(inputEl.form, targetCtx) - }; - this.log("upload", () => ["sending preflight request", payload]); - this.pushWithReply(null, "allow_upload", payload, (resp) => { - this.log("upload", () => ["got preflight response", resp]); - uploader.entries().forEach((entry) => { - if (resp.entries && !resp.entries[entry.ref]) { - this.handleFailedEntryPreflight(entry.ref, "failed preflight", uploader); - } - }); - if (resp.error || Object.keys(resp.entries).length === 0) { - this.undoRefs(ref); - let errors = resp.error || []; - errors.map(([entry_ref, reason]) => { - this.handleFailedEntryPreflight(entry_ref, reason, uploader); - }); - } else { - let onError = (callback) => { - this.channel.onError(() => { - if (this.joinCount === joinCountAtUpload) { - callback(); - } - }); - }; - uploader.initAdapterUpload(resp, onError, this.liveSocket); - } - }); - }); - } - handleFailedEntryPreflight(uploadRef, reason, uploader) { - if (uploader.isAutoUpload()) { - let entry = uploader.entries().find((entry2) => entry2.ref === uploadRef.toString()); - if (entry) { - entry.cancel(); - } - } else { - uploader.entries().map((entry) => entry.cancel()); - } - this.log("upload", () => [`error for entry ${uploadRef}`, reason]); - } - dispatchUploads(targetCtx, name, filesOrBlobs) { - let targetElement = this.targetCtxElement(targetCtx) || this.el; - let inputs = dom_default.findUploadInputs(targetElement).filter((el) => el.name === name); - if (inputs.length === 0) { - logError(`no live file inputs found matching the name "${name}"`); - } else if (inputs.length > 1) { - logError(`duplicate live file inputs found matching the name "${name}"`); - } else { - dom_default.dispatchEvent(inputs[0], PHX_TRACK_UPLOADS, { detail: { files: filesOrBlobs } }); - } - } - targetCtxElement(targetCtx) { - if (isCid(targetCtx)) { - let [target] = dom_default.findComponentNodeList(this.el, targetCtx); - return target; - } else if (targetCtx) { - return targetCtx; - } else { - return null; - } - } - pushFormRecovery(oldForm, newForm, templateDom, callback) { - const phxChange = this.binding("change"); - const phxTarget = newForm.getAttribute(this.binding("target")) || newForm; - const phxEvent = newForm.getAttribute(this.binding(PHX_AUTO_RECOVER)) || newForm.getAttribute(this.binding("change")); - const inputs = Array.from(oldForm.elements).filter((el) => dom_default.isFormInput(el) && el.name && !el.hasAttribute(phxChange)); - if (inputs.length === 0) { - return; - } - inputs.forEach((input2) => input2.hasAttribute(PHX_UPLOAD_REF) && LiveUploader.clearFiles(input2)); - let input = inputs.find((el) => el.type !== "hidden") || inputs[0]; - let pending = 0; - this.withinTargets(phxTarget, (targetView, targetCtx) => { - const cid = this.targetComponentID(newForm, targetCtx); - pending++; - targetView.pushInput(input, targetCtx, cid, phxEvent, { _target: input.name }, () => { - pending--; - if (pending === 0) { - callback(); - } - }); - }, templateDom, templateDom); - } - pushLinkPatch(href, targetEl, callback) { - let linkRef = this.liveSocket.setPendingLink(href); - let refGen = targetEl ? () => this.putRef([targetEl], "click") : null; - let fallback = () => this.liveSocket.redirect(window.location.href); - let url = href.startsWith("/") ? `${location.protocol}//${location.host}${href}` : href; - let push = this.pushWithReply(refGen, "live_patch", { url }, (resp) => { - this.liveSocket.requestDOMUpdate(() => { - if (resp.link_redirect) { - this.liveSocket.replaceMain(href, null, callback, linkRef); - } else { - if (this.liveSocket.commitPendingLink(linkRef)) { - this.href = href; - } - this.applyPendingUpdates(); - callback && callback(linkRef); - } - }); - }); - if (push) { - push.receive("timeout", fallback); - } else { - fallback(); - } - } - getFormsForRecovery() { - if (this.joinCount === 0) { - return {}; - } - let phxChange = this.binding("change"); - return dom_default.all(this.el, `form[${phxChange}]`).filter((form) => form.id).filter((form) => form.elements.length > 0).filter((form) => form.getAttribute(this.binding(PHX_AUTO_RECOVER)) !== "ignore").map((form) => form.cloneNode(true)).reduce((acc, form) => { - acc[form.id] = form; - return acc; - }, {}); - } - maybePushComponentsDestroyed(destroyedCIDs) { - let willDestroyCIDs = destroyedCIDs.filter((cid) => { - return dom_default.findComponentNodeList(this.el, cid).length === 0; - }); - if (willDestroyCIDs.length > 0) { - willDestroyCIDs.forEach((cid) => this.rendered.resetRender(cid)); - this.pushWithReply(null, "cids_will_destroy", { cids: willDestroyCIDs }, () => { - this.liveSocket.requestDOMUpdate(() => { - let completelyDestroyCIDs = willDestroyCIDs.filter((cid) => { - return dom_default.findComponentNodeList(this.el, cid).length === 0; - }); - if (completelyDestroyCIDs.length > 0) { - this.pushWithReply(null, "cids_destroyed", { cids: completelyDestroyCIDs }, (resp) => { - this.rendered.pruneCIDs(resp.cids); - }); - } - }); - }); - } - } - ownsElement(el) { - let parentViewEl = el.closest(PHX_VIEW_SELECTOR); - return el.getAttribute(PHX_PARENT_ID) === this.id || parentViewEl && parentViewEl.id === this.id || !parentViewEl && this.isDead; - } - submitForm(form, targetCtx, phxEvent, submitter, opts = {}) { - dom_default.putPrivate(form, PHX_HAS_SUBMITTED, true); - const phxFeedbackFor = this.liveSocket.binding(PHX_FEEDBACK_FOR); - const phxFeedbackGroup = this.liveSocket.binding(PHX_FEEDBACK_GROUP); - const inputs = Array.from(form.elements); - inputs.forEach((input) => dom_default.putPrivate(input, PHX_HAS_SUBMITTED, true)); - this.liveSocket.blurActiveElement(this); - this.pushFormSubmit(form, targetCtx, phxEvent, submitter, opts, () => { - inputs.forEach((input) => dom_default.showError(input, phxFeedbackFor, phxFeedbackGroup)); - this.liveSocket.restorePreviouslyActiveFocus(); - }); - } - binding(kind) { - return this.liveSocket.binding(kind); - } - }; - var LiveSocket = class { - constructor(url, phxSocket, opts = {}) { - this.unloaded = false; - if (!phxSocket || phxSocket.constructor.name === "Object") { - throw new Error(` +`),i.push(s))}),i.forEach(s=>s.remove())}},replaceRootContainer(e,t,i){let s=new Set(["id",Y,me,wt,de]);if(e.tagName.toLowerCase()===t.toLowerCase())return Array.from(e.attributes).filter(n=>!s.has(n.name.toLowerCase())).forEach(n=>e.removeAttribute(n.name)),Object.keys(i).filter(n=>!s.has(n.toLowerCase())).forEach(n=>e.setAttribute(n,i[n])),e;{let n=document.createElement(t);return Object.keys(i).forEach(r=>n.setAttribute(r,i[r])),s.forEach(r=>n.setAttribute(r,e.getAttribute(r))),n.innerHTML=e.innerHTML,e.replaceWith(n),n}},getSticky(e,t,i){let s=($.private(e,"sticky")||[]).find(([n])=>t===n);if(s){let[n,r,o]=s;return o}else return typeof i=="function"?i():i},deleteSticky(e,t){this.updatePrivate(e,"sticky",[],i=>i.filter(([s,n])=>s!==t))},putSticky(e,t,i){let s=i(e);this.updatePrivate(e,"sticky",[],n=>{let r=n.findIndex(([o])=>t===o);return r>=0?n[r]=[t,i,s]:n.push([t,i,s]),n})},applyStickyOperations(e){let t=$.private(e,"sticky");t&&t.forEach(([i,s,n])=>this.putSticky(e,i,s))}},d=$,Te=class{static isActive(e,t){let i=t._phxRef===void 0,n=e.getAttribute(pt).split(",").indexOf(_.genFileRef(t))>=0;return t.size>0&&(i||n)}static isPreflighted(e,t){return e.getAttribute(yt).split(",").indexOf(_.genFileRef(t))>=0&&this.isActive(e,t)}static isPreflightInProgress(e){return e._preflightInProgress===!0}static markPreflightInProgress(e){e._preflightInProgress=!0}constructor(e,t,i,s){this.ref=_.genFileRef(t),this.fileEl=e,this.file=t,this.view=i,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(Xe,this._onElUpdated),this.autoUpload=s}metadata(){return this.meta}progress(e){this._progress=Math.floor(e),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{_.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}isCancelled(){return this._isCancelled}cancel(){this.file._preflightInProgress=!1,this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(e="failed"){this.fileEl.removeEventListener(Xe,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:e}),this.isAutoUpload()||_.clearFiles(this.fileEl)}isAutoUpload(){return this.autoUpload}onDone(e){this._onDone=()=>{this.fileEl.removeEventListener(Xe,this._onElUpdated),e()}}onElUpdated(){this.fileEl.getAttribute(pt).split(",").indexOf(this.ref)===-1&&(_.untrackFile(this.fileEl,this.file),this.cancel())}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref,meta:typeof this.file.meta=="function"?this.file.meta():void 0}}uploader(e){if(this.meta.uploader){let t=e[this.meta.uploader]||M(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:t}}else return{name:"channel",callback:ss}}zipPostFlight(e){this.meta=e.entries[this.ref],this.meta||M(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:e})}},os=0,_=class{static genFileRef(e){let t=e._phxRef;return t!==void 0?t:(e._phxRef=(os++).toString(),e._phxRef)}static getEntryDataURL(e,t,i){let s=this.activeFiles(e).find(n=>this.genFileRef(n)===t);i(URL.createObjectURL(s))}static hasUploadsInProgress(e){let t=0;return d.findUploadInputs(e).forEach(i=>{i.getAttribute(yt)!==i.getAttribute(Ui)&&t++}),t>0}static serializeUploads(e){let t=this.activeFiles(e),i={};return t.forEach(s=>{let n={path:e.name},r=e.getAttribute(G);i[r]=i[r]||[],n.ref=this.genFileRef(s),n.last_modified=s.lastModified,n.name=s.name||n.ref,n.relative_path=s.webkitRelativePath,n.type=s.type,n.size=s.size,typeof s.meta=="function"&&(n.meta=s.meta()),i[r].push(n)}),i}static clearFiles(e){e.value=null,e.removeAttribute(G),d.putPrivate(e,"files",[])}static untrackFile(e,t){d.putPrivate(e,"files",d.private(e,"files").filter(i=>!Object.is(i,t)))}static trackFiles(e,t,i){if(e.getAttribute("multiple")!==null){let s=t.filter(n=>!this.activeFiles(e).find(r=>Object.is(r,n)));d.updatePrivate(e,"files",[],n=>n.concat(s)),e.value=null}else i&&i.files.length>0&&(e.files=i.files),d.putPrivate(e,"files",t)}static activeFileInputs(e){let t=d.findUploadInputs(e);return Array.from(t).filter(i=>i.files&&this.activeFiles(i).length>0)}static activeFiles(e){return(d.private(e,"files")||[]).filter(t=>Te.isActive(e,t))}static inputsAwaitingPreflight(e){let t=d.findUploadInputs(e);return Array.from(t).filter(i=>this.filesAwaitingPreflight(i).length>0)}static filesAwaitingPreflight(e){return this.activeFiles(e).filter(t=>!Te.isPreflighted(e,t)&&!Te.isPreflightInProgress(t))}static markPreflightInProgress(e){e.forEach(t=>Te.markPreflightInProgress(t.file))}constructor(e,t,i){this.autoUpload=d.isAutoUpload(e),this.view=t,this.onComplete=i,this._entries=Array.from(_.filesAwaitingPreflight(e)||[]).map(s=>new Te(e,s,t,this.autoUpload)),_.markPreflightInProgress(this._entries),this.numEntriesInProgress=this._entries.length}isAutoUpload(){return this.autoUpload}entries(){return this._entries}initAdapterUpload(e,t,i){this._entries=this._entries.map(n=>(n.isCancelled()?(this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()):(n.zipPostFlight(e),n.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()})),n));let s=this._entries.reduce((n,r)=>{if(!r.meta)return n;let{name:o,callback:a}=r.uploader(i.uploaders);return n[o]=n[o]||{callback:a,entries:[]},n[o].entries.push(r),n},{});for(let n in s){let{callback:r,entries:o}=s[n];r(o,t,e,i)}}},ui={LiveFileUpload:{activeRefs(){return this.el.getAttribute(pt)},preflightedRefs(){return this.el.getAttribute(yt)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let e=this.preflightedRefs();this.preflightedWas!==e&&(this.preflightedWas=e,e===""&&this.__view.cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(Xe))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(G)),_.getEntryDataURL(this.inputEl,this.ref,e=>{this.url=e,this.el.src=e})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",()=>ge.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>ge.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&ge.focusFirst(this.el)}}},fi=e=>["HTML","BODY"].indexOf(e.nodeName.toUpperCase())>=0?null:["scroll","auto"].indexOf(getComputedStyle(e).overflowY)>=0?e:fi(e.parentElement),Kt=e=>e?e.scrollTop:document.documentElement.scrollTop||document.body.scrollTop,At=e=>e?e.getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight,kt=e=>e?e.getBoundingClientRect().top:0,as=(e,t)=>{let i=e.getBoundingClientRect();return i.top>=kt(t)&&i.left>=0&&i.top<=At(t)},ls=(e,t)=>{let i=e.getBoundingClientRect();return i.right>=kt(t)&&i.left>=0&&i.bottom<=At(t)},Gt=(e,t)=>{let i=e.getBoundingClientRect();return i.top>=kt(t)&&i.left>=0&&i.top<=At(t)};ui.InfiniteScroll={mounted(){this.scrollContainer=fi(this.el);let e=Kt(this.scrollContainer),t=!1,i=500,s=null,n=this.throttle(i,(a,l)=>{s=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{s=null})}),r=this.throttle(i,(a,l)=>{s=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{s=null,window.requestAnimationFrame(()=>{Gt(l,this.scrollContainer)||l.scrollIntoView({block:"start"})})})}),o=this.throttle(i,(a,l)=>{s=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{s=null,window.requestAnimationFrame(()=>{Gt(l,this.scrollContainer)||l.scrollIntoView({block:"end"})})})});this.onScroll=a=>{let l=Kt(this.scrollContainer);if(s)return e=l,s();let h=this.el.getBoundingClientRect(),c=this.el.getAttribute(this.liveSocket.binding("viewport-top")),g=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),p=this.el.lastElementChild,f=this.el.firstElementChild,m=le;m&&c&&!t&&h.top>=0?(t=!0,n(c,f)):v&&t&&h.top<=0&&(t=!1),c&&m&&as(f,this.scrollContainer)?r(c,f):g&&v&&ls(p,this.scrollContainer)&&o(g,p),e=l},this.scrollContainer?this.scrollContainer.addEventListener("scroll",this.onScroll):window.addEventListener("scroll",this.onScroll)},destroyed(){this.scrollContainer?this.scrollContainer.removeEventListener("scroll",this.onScroll):window.removeEventListener("scroll",this.onScroll)},throttle(e,t){let i=0,s;return(...n)=>{let r=Date.now(),o=e-(r-i);o<=0||o>e?(s&&(clearTimeout(s),s=null),i=r,t(...n)):s||(s=setTimeout(()=>{i=Date.now(),s=null,t(...n)},o))}}};var hs=ui,ds=class{constructor(e,t,i){let s=new Set,n=new Set([...t.children].map(o=>o.id)),r=[];Array.from(e.children).forEach(o=>{if(o.id&&(s.add(o.id),n.has(o.id))){let a=o.previousElementSibling&&o.previousElementSibling.id;r.push({elementId:o.id,previousElementId:a})}}),this.containerId=t.id,this.updateType=i,this.elementsToModify=r,this.elementIdsToAdd=[...n].filter(o=>!s.has(o))}perform(){let e=d.byId(this.containerId);this.elementsToModify.forEach(t=>{t.previousElementId?ie(document.getElementById(t.previousElementId),i=>{ie(document.getElementById(t.elementId),s=>{s.previousElementSibling&&s.previousElementSibling.id==i.id||i.insertAdjacentElement("afterend",s)})}):ie(document.getElementById(t.elementId),i=>{i.previousElementSibling==null||e.insertAdjacentElement("afterbegin",i)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(t=>{ie(document.getElementById(t),i=>e.insertAdjacentElement("afterbegin",i))})}},Yt=11;function cs(e,t){var i=t.attributes,s,n,r,o,a;if(!(t.nodeType===Yt||e.nodeType===Yt)){for(var l=i.length-1;l>=0;l--)s=i[l],n=s.name,r=s.namespaceURI,o=s.value,r?(n=s.localName||n,a=e.getAttributeNS(r,n),a!==o&&(s.prefix==="xmlns"&&(n=s.name),e.setAttributeNS(r,n,o))):(a=e.getAttribute(n),a!==o&&e.setAttribute(n,o));for(var h=e.attributes,c=h.length-1;c>=0;c--)s=h[c],n=s.name,r=s.namespaceURI,r?(n=s.localName||n,t.hasAttributeNS(r,n)||e.removeAttributeNS(r,n)):t.hasAttribute(n)||e.removeAttribute(n)}}var Be,us="http://www.w3.org/1999/xhtml",H=typeof document=="undefined"?void 0:document,fs=!!H&&"content"in H.createElement("template"),ps=!!H&&H.createRange&&"createContextualFragment"in H.createRange();function ms(e){var t=H.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function gs(e){Be||(Be=H.createRange(),Be.selectNode(H.body));var t=Be.createContextualFragment(e);return t.childNodes[0]}function vs(e){var t=H.createElement("body");return t.innerHTML=e,t.childNodes[0]}function bs(e){return e=e.trim(),fs?ms(e):ps?gs(e):vs(e)}function Je(e,t){var i=e.nodeName,s=t.nodeName,n,r;return i===s?!0:(n=i.charCodeAt(0),r=s.charCodeAt(0),n<=90&&r>=97?i===s.toUpperCase():r<=90&&n>=97?s===i.toUpperCase():!1)}function ys(e,t){return!t||t===us?H.createElement(e):H.createElementNS(t,e)}function ws(e,t){for(var i=e.firstChild;i;){var s=i.nextSibling;t.appendChild(i),i=s}return t}function ft(e,t,i){e[i]!==t[i]&&(e[i]=t[i],e[i]?e.setAttribute(i,""):e.removeAttribute(i))}var Qt={OPTION:function(e,t){var i=e.parentNode;if(i){var s=i.nodeName.toUpperCase();s==="OPTGROUP"&&(i=i.parentNode,s=i&&i.nodeName.toUpperCase()),s==="SELECT"&&!i.hasAttribute("multiple")&&(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),i.selectedIndex=-1)}ft(e,t,"selected")},INPUT:function(e,t){ft(e,t,"checked"),ft(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var i=t.value;e.value!==i&&(e.value=i);var s=e.firstChild;if(s){var n=s.nodeValue;if(n==i||!i&&n==e.placeholder)return;s.nodeValue=i}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var i=-1,s=0,n=e.firstChild,r,o;n;)if(o=n.nodeName&&n.nodeName.toUpperCase(),o==="OPTGROUP")r=n,n=r.firstChild;else{if(o==="OPTION"){if(n.hasAttribute("selected")){i=s;break}s++}n=n.nextSibling,!n&&r&&(n=r.nextSibling,r=null)}e.selectedIndex=i}}},_e=1,Zt=11,ei=3,ti=8;function ee(){}function As(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function ks(e){return function(i,s,n){if(n||(n={}),typeof s=="string")if(i.nodeName==="#document"||i.nodeName==="HTML"||i.nodeName==="BODY"){var r=s;s=H.createElement("html"),s.innerHTML=r}else s=bs(s);else s.nodeType===Zt&&(s=s.firstElementChild);var o=n.getNodeKey||As,a=n.onBeforeNodeAdded||ee,l=n.onNodeAdded||ee,h=n.onBeforeElUpdated||ee,c=n.onElUpdated||ee,g=n.onBeforeNodeDiscarded||ee,p=n.onNodeDiscarded||ee,f=n.onBeforeElChildrenUpdated||ee,m=n.skipFromChildren||ee,v=n.addChild||function(w,b){return w.appendChild(b)},C=n.childrenOnly===!0,P=Object.create(null),R=[];function x(w){R.push(w)}function I(w,b){if(w.nodeType===_e)for(var E=w.firstChild;E;){var A=void 0;b&&(A=o(E))?x(A):(p(E),E.firstChild&&I(E,b)),E=E.nextSibling}}function re(w,b,E){g(w)!==!1&&(b&&b.removeChild(w),p(w),I(w,E))}function T(w){if(w.nodeType===_e||w.nodeType===Zt)for(var b=w.firstChild;b;){var E=o(b);E&&(P[E]=b),T(b),b=b.nextSibling}}T(i);function q(w){l(w);for(var b=w.firstChild;b;){var E=b.nextSibling,A=o(b);if(A){var S=P[A];S&&Je(b,S)?(b.parentNode.replaceChild(S,b),u(S,b)):q(b)}else q(b);b=E}}function oe(w,b,E){for(;b;){var A=b.nextSibling;(E=o(b))?x(E):re(b,w,!0),b=A}}function u(w,b,E){var A=o(b);A&&delete P[A],!(!E&&(h(w,b)===!1||(e(w,b),c(w),f(w,b)===!1)))&&(w.nodeName!=="TEXTAREA"?y(w,b):Qt.TEXTAREA(w,b))}function y(w,b){var E=m(w,b),A=b.firstChild,S=w.firstChild,ce,X,ue,xe,Q;e:for(;A;){for(xe=A.nextSibling,ce=o(A);!E&&S;){if(ue=S.nextSibling,A.isSameNode&&A.isSameNode(S)){A=xe,S=ue;continue e}X=o(S);var Ie=S.nodeType,Z=void 0;if(Ie===A.nodeType&&(Ie===_e?(ce?ce!==X&&((Q=P[ce])?ue===Q?Z=!1:(w.insertBefore(Q,S),X?x(X):re(S,w,!0),S=Q,X=o(S)):Z=!1):X&&(Z=!1),Z=Z!==!1&&Je(S,A),Z&&u(S,A)):(Ie===ei||Ie==ti)&&(Z=!0,S.nodeValue!==A.nodeValue&&(S.nodeValue=A.nodeValue))),Z){A=xe,S=ue;continue e}X?x(X):re(S,w,!0),S=ue}if(ce&&(Q=P[ce])&&Je(Q,A))E||v(w,Q),u(Q,A);else{var tt=a(A);tt!==!1&&(tt&&(A=tt),A.actualize&&(A=A.actualize(w.ownerDocument||H)),v(w,A),q(A))}A=xe,S=ue}oe(w,S,X);var Et=Qt[w.nodeName];Et&&Et(w,b)}var k=i,D=k.nodeType,ae=s.nodeType;if(!C){if(D===_e)ae===_e?Je(i,s)||(p(i),k=ws(i,ys(s.nodeName,s.namespaceURI))):k=s;else if(D===ei||D===ti){if(ae===D)return k.nodeValue!==s.nodeValue&&(k.nodeValue=s.nodeValue),k;k=s}}if(k===s)p(i);else{if(s.isSameNode&&s.isSameNode(k))return;if(u(k,s,C),R)for(var Ze=0,vi=R.length;Ze{if(i&&i.isSameNode(s)&&d.isFormInput(s))return d.mergeFocusedInput(s,n),!1}})}constructor(e,t,i,s,n,r){this.view=e,this.liveSocket=e.liveSocket,this.container=t,this.id=i,this.rootID=e.root.id,this.html=s,this.streams=n,this.streamInserts={},this.streamComponentRestore={},this.targetCID=r,this.cidPatch=z(this.targetCID),this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(e,t){this.callbacks[`before${e}`].push(t)}after(e,t){this.callbacks[`after${e}`].push(t)}trackBefore(e,...t){this.callbacks[`before${e}`].forEach(i=>i(...t))}trackAfter(e,...t){this.callbacks[`after${e}`].forEach(i=>i(...t))}markPrunableContentForRemoval(){let e=this.liveSocket.binding(Ye);d.all(this.container,`[${e}=append] > *, [${e}=prepend] > *`,t=>{t.setAttribute(Dt,"")})}perform(e){let{view:t,liveSocket:i,container:s,html:n}=this,r=this.isCIDPatch()?this.targetCIDContainer(n):s;if(this.isCIDPatch()&&!r)return;let o=i.getActiveElement(),{selectionStart:a,selectionEnd:l}=o&&d.hasSelectionRange(o)?o:{},h=i.binding(Ye),c=i.binding(ze),g=i.binding(Ke),p=i.binding(bt),f=i.binding(mt),m=i.binding(gt),v=i.binding(ji),C=[],P=[],R=[],x=[],I=null;function re(T,q,oe=!1){ii(T,q,{childrenOnly:T.getAttribute(K)===null&&!oe,getNodeKey:u=>d.isPhxDestroyed(u)?null:e?u.id:u.id||u.getAttribute&&u.getAttribute(hi),skipFromChildren:u=>u.getAttribute(h)===lt,addChild:(u,y)=>{let{ref:k,streamAt:D}=this.getStreamInsert(y);if(k===void 0)return u.appendChild(y);if(this.setStreamRef(y,k),D===0)u.insertAdjacentElement("afterbegin",y);else if(D===-1)u.appendChild(y);else if(D>0){let ae=Array.from(u.children)[D];u.insertBefore(y,ae)}},onBeforeNodeAdded:u=>{d.maybeAddPrivateHooks(u,f,m),this.trackBefore("added",u);let y=u;return!e&&this.streamComponentRestore[u.id]&&(y=this.streamComponentRestore[u.id],delete this.streamComponentRestore[u.id],re.call(this,y,u,!0)),y},onNodeAdded:u=>{u.getAttribute&&this.maybeReOrderStream(u,!0),d.isFeedbackContainer(u,c)&&P.push(u),u instanceof HTMLImageElement&&u.srcset?u.srcset=u.srcset:u instanceof HTMLVideoElement&&u.autoplay&&u.play(),d.isNowTriggerFormExternal(u,v)&&(I=u),(d.isPhxChild(u)&&t.ownsElement(u)||d.isPhxSticky(u)&&t.ownsElement(u.parentNode))&&this.trackAfter("phxChildAdded",u),C.push(u)},onNodeDiscarded:u=>this.onNodeDiscarded(u),onBeforeNodeDiscarded:u=>u.getAttribute&&u.getAttribute(Dt)!==null?!0:!(u.parentElement!==null&&u.id&&d.isPhxUpdate(u.parentElement,h,[lt,"append","prepend"])||this.maybePendingRemove(u)||this.skipCIDSibling(u)),onElUpdated:u=>{d.isNowTriggerFormExternal(u,v)&&(I=u),R.push(u),this.maybeReOrderStream(u,!1)},onBeforeElUpdated:(u,y)=>{if(d.maybeAddPrivateHooks(y,f,m),(d.isFeedbackContainer(u,c)||d.isFeedbackContainer(y,c))&&(P.push(u),P.push(y)),d.cleanChildNodes(y,h),this.skipCIDSibling(y))return this.maybeReOrderStream(u),!1;if(d.isPhxSticky(u))return!1;if(d.isIgnored(u,h)||u.form&&u.form.isSameNode(I))return this.trackBefore("updated",u,y),d.mergeAttrs(u,y,{isIgnored:d.isIgnored(u,h)}),R.push(u),d.applyStickyOperations(u),!1;if(u.type==="number"&&u.validity&&u.validity.badInput)return!1;if(!d.syncPendingRef(u,y,p))return d.isUploadInput(u)&&(this.trackBefore("updated",u,y),R.push(u)),d.applyStickyOperations(u),!1;if(d.isPhxChild(y)){let ae=u.getAttribute(Y);return d.mergeAttrs(u,y,{exclude:[me]}),ae!==""&&u.setAttribute(Y,ae),u.setAttribute(de,this.rootID),d.applyStickyOperations(u),!1}d.copyPrivates(y,u);let k=o&&u.isSameNode(o)&&d.isFormInput(u),D=k&&this.isChangedSelect(u,y);return k&&u.type!=="hidden"&&!D?(this.trackBefore("updated",u,y),d.mergeFocusedInput(u,y),d.syncAttrsToProps(u),R.push(u),d.applyStickyOperations(u),!1):(D&&u.blur(),d.isPhxUpdate(y,h,["append","prepend"])&&x.push(new ds(u,y,y.getAttribute(h))),d.syncAttrsToProps(y),d.applyStickyOperations(y),this.trackBefore("updated",u,y),!0)}})}return this.trackBefore("added",s),this.trackBefore("updated",s,s),i.time("morphdom",()=>{this.streams.forEach(([T,q,oe,u])=>{q.forEach(([y,k,D])=>{this.streamInserts[y]={ref:T,streamAt:k,limit:D,reset:u}}),u!==void 0&&d.all(s,`[${ht}="${T}"]`,y=>{this.removeStreamChildElement(y)}),oe.forEach(y=>{let k=s.querySelector(`[id="${y}"]`);k&&this.removeStreamChildElement(k)})}),e&&d.all(this.container,`[${h}=${lt}]`,T=>{this.liveSocket.owner(T,q=>{q===this.view&&Array.from(T.children).forEach(oe=>{this.removeStreamChildElement(oe)})})}),re.call(this,r,n)}),i.isDebugEnabled()&&(es(),Array.from(document.querySelectorAll("input[name=id]")).forEach(T=>{T.form&&console.error(`Detected an input with name="id" inside a form! This will cause problems when patching the DOM. +`,T)})),x.length>0&&i.time("post-morph append/prepend restoration",()=>{x.forEach(T=>T.perform())}),d.maybeHideFeedback(r,P,c,g),i.silenceEvents(()=>d.restoreFocus(o,a,l)),d.dispatchEvent(document,"phx:update"),C.forEach(T=>this.trackAfter("added",T)),R.forEach(T=>this.trackAfter("updated",T)),this.transitionPendingRemoves(),I&&(i.unload(),Object.getPrototypeOf(I).submit.call(I)),!0}onNodeDiscarded(e){(d.isPhxChild(e)||d.isPhxSticky(e))&&this.liveSocket.destroyViewByEl(e),this.trackAfter("discarded",e)}maybePendingRemove(e){return e.getAttribute&&e.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(e),!0):!1}removeStreamChildElement(e){this.streamInserts[e.id]?(this.streamComponentRestore[e.id]=e,e.remove()):this.maybePendingRemove(e)||(e.remove(),this.onNodeDiscarded(e))}getStreamInsert(e){return(e.id?this.streamInserts[e.id]:{})||{}}setStreamRef(e,t){d.putSticky(e,ht,i=>i.setAttribute(ht,t))}maybeReOrderStream(e,t){let{ref:i,streamAt:s,reset:n}=this.getStreamInsert(e);if(s!==void 0&&(this.setStreamRef(e,i),!(!n&&!t)&&e.parentElement)){if(s===0)e.parentElement.insertBefore(e,e.parentElement.firstElementChild);else if(s>0){let r=Array.from(e.parentElement.children),o=r.indexOf(e);if(s>=r.length-1)e.parentElement.appendChild(e);else{let a=r[s];o>s?e.parentElement.insertBefore(e,a):e.parentElement.insertBefore(e,a.nextElementSibling)}}this.maybeLimitStream(e)}}maybeLimitStream(e){let{limit:t}=this.getStreamInsert(e),i=t!==null&&Array.from(e.parentElement.children);t&&t<0&&i.length>t*-1?i.slice(0,i.length+t).forEach(s=>this.removeStreamChildElement(s)):t&&t>=0&&i.length>t&&i.slice(t).forEach(s=>this.removeStreamChildElement(s))}transitionPendingRemoves(){let{pendingRemoves:e,liveSocket:t}=this;e.length>0&&(t.transitionRemoves(e),t.requestDOMUpdate(()=>{e.forEach(i=>{let s=d.firstPhxChild(i);s&&t.destroyViewByEl(s),i.remove()}),this.trackAfter("transitionsDiscarded",e)}))}isChangedSelect(e,t){if(!(e instanceof HTMLSelectElement)||e.multiple)return!1;if(e.options.length!==t.options.length)return!0;let i=e.selectedOptions[0],s=t.selectedOptions[0];return i&&i.hasAttribute("selected")&&s.setAttribute("selected",i.getAttribute("selected")),!e.isEqualNode(t)}isCIDPatch(){return this.cidPatch}skipCIDSibling(e){return e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute(li)}targetCIDContainer(e){if(!this.isCIDPatch())return;let[t,...i]=d.findComponentNodeList(this.container,this.targetCID);return i.length===0&&d.childNodeLength(e)===1?t:t&&t.parentNode}indexOf(e,t){return Array.from(e.children).indexOf(t)}},Es=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Cs=new Set(["'",'"']),si=(e,t,i)=>{let s=0,n=!1,r,o,a,l,h,c,g=e.match(/^(\s*(?:\s*)*)<([^\s\/>]+)/);if(g===null)throw new Error(`malformed html ${e}`);for(s=g[0].length,r=g[1],a=g[2],l=s,s;s";s++)if(e.charAt(s)==="="){let m=e.slice(s-3,s)===" id";s++;let v=e.charAt(s);if(Cs.has(v)){let C=s;for(s++,s;s=r.length+a.length;){let m=e.charAt(p);if(n)m==="-"&&e.slice(p-3,p)===""&&e.slice(p-2,p)==="--")n=!0,p-=3;else{if(m===">")break;p-=1}}o=e.slice(p+1,e.length);let f=Object.keys(t).map(m=>t[m]===!0?m:`${m}="${t[m]}"`).join(" ");if(i){let m=h?` id="${h}"`:"";Es.has(a)?c=`<${a}${m}${f===""?"":" "}${f}/>`:c=`<${a}${m}${f===""?"":" "}${f}>`}else{let m=e.slice(l,p+1);c=`<${a}${f===""?"":" "}${f}${m}`}return[c,r,o]},ni=class{static extract(e){let{[Jt]:t,[Bt]:i,[Vt]:s}=e;return delete e[Jt],delete e[Bt],delete e[Vt],{diff:e,title:s,reply:t||null,events:i||[]}}constructor(e,t){this.viewId=e,this.rendered={},this.magicId=0,this.mergeDiff(t)}parentViewId(){return this.viewId}toString(e){let[t,i]=this.recursiveToString(this.rendered,this.rendered[L],e,!0,{});return[t,i]}recursiveToString(e,t=e[L],i,s,n){i=i?new Set(i):null;let r={buffer:"",components:t,onlyCids:i,streams:new Set};return this.toOutputBuffer(e,null,r,s,n),[r.buffer,r.streams]}componentCIDs(e){return Object.keys(e[L]||{}).map(t=>parseInt(t))}isComponentOnlyDiff(e){return e[L]?Object.keys(e).length===1:!1}getComponent(e,t){return e[L][t]}resetRender(e){this.rendered[L][e]&&(this.rendered[L][e].reset=!0)}mergeDiff(e){let t=e[L],i={};if(delete e[L],this.rendered=this.mutableMerge(this.rendered,e),this.rendered[L]=this.rendered[L]||{},t){let s=this.rendered[L];for(let n in t)t[n]=this.cachedFindComponent(n,t[n],s,t,i);for(let n in t)s[n]=t[n];e[L]=t}}cachedFindComponent(e,t,i,s,n){if(n[e])return n[e];{let r,o,a=t[J];if(z(a)){let l;a>0?l=this.cachedFindComponent(a,s[a],i,s,n):l=i[-a],o=l[J],r=this.cloneMerge(l,t,!0),r[J]=o}else r=t[J]!==void 0||i[e]===void 0?t:this.cloneMerge(i[e],t,!1);return n[e]=r,r}}mutableMerge(e,t){return t[J]!==void 0?t:(this.doMutableMerge(e,t),e)}doMutableMerge(e,t){for(let i in t){let s=t[i],n=e[i];pe(s)&&s[J]===void 0&&pe(n)?this.doMutableMerge(n,s):e[i]=s}e[ut]&&(e.newRender=!0)}cloneMerge(e,t,i){let s=U(U({},e),t);for(let n in s){let r=t[n],o=e[n];pe(r)&&r[J]===void 0&&pe(o)?s[n]=this.cloneMerge(o,r,i):r===void 0&&pe(o)&&(s[n]=this.cloneMerge(o,{},i))}return i?(delete s.magicId,delete s.newRender):e[ut]&&(s.newRender=!0),s}componentToString(e){let[t,i]=this.recursiveCIDToString(this.rendered[L],e,null),[s,n,r]=si(t,{});return[s,i]}pruneCIDs(e){e.forEach(t=>delete this.rendered[L][t])}get(){return this.rendered}isNewFingerprint(e={}){return!!e[J]}templateStatic(e,t){return typeof e=="number"?t[e]:e}nextMagicID(){return this.magicId++,`m${this.magicId}-${this.parentViewId()}`}toOutputBuffer(e,t,i,s,n={}){if(e[je])return this.comprehensionToBuffer(e,t,i);let{[J]:r}=e;r=this.templateStatic(r,t);let o=e[ut],a=i.buffer;o&&(i.buffer=""),s&&o&&!e.magicId&&(e.newRender=!0,e.magicId=this.nextMagicID()),i.buffer+=r[0];for(let l=1;l0||l.length>0||h)&&(delete e[qt],e[je]=[],i.streams.add(r))}dynamicToBuffer(e,t,i,s){if(typeof e=="number"){let[n,r]=this.recursiveCIDToString(i.components,e,i.onlyCids);i.buffer+=n,i.streams=new Set([...i.streams,...r])}else pe(e)?this.toOutputBuffer(e,t,i,s,{}):i.buffer+=e}recursiveCIDToString(e,t,i){let s=e[t]||M(`no component for CID ${t}`,e),n={[K]:t},r=i&&!i.has(t);s.newRender=!r,s.magicId=`c${t}-${this.parentViewId()}`;let o=!s.reset,[a,l]=this.recursiveToString(s,e,i,o,n);return delete s.reset,[a,l]}},Ts=1,Re=class{static makeID(){return Ts++}static elementID(e){return e.phxHookId}constructor(e,t,i){this.__view=e,this.liveSocket=e.liveSocket,this.__callbacks=i,this.__listeners=new Set,this.__isDisconnected=!1,this.el=t,this.el.phxHookId=this.constructor.makeID();for(let s in this.__callbacks)this[s]=this.__callbacks[s]}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed()}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}pushEvent(e,t={},i=function(){}){return this.__view.pushHookEvent(this.el,null,e,t,i)}pushEventTo(e,t,i={},s=function(){}){return this.__view.withinTargets(e,(n,r)=>n.pushHookEvent(this.el,r,t,i,s))}handleEvent(e,t){let i=(s,n)=>n?e:t(s.detail);return window.addEventListener(`phx:${e}`,i),this.__listeners.add(i),i}removeHandleEvent(e){let t=e(null,!0);window.removeEventListener(`phx:${t}`,e),this.__listeners.delete(e)}upload(e,t){return this.__view.dispatchUploads(null,e,t)}uploadTo(e,t,i){return this.__view.withinTargets(e,(s,n)=>{s.dispatchUploads(n,t,i)})}__cleanup__(){this.__listeners.forEach(e=>this.removeHandleEvent(e))}},qe=(e,t,i=[])=>{let h=t,{submitter:s}=h,n=Rt(h,["submitter"]),r;if(s&&s.name){let c=document.createElement("input");c.type="hidden";let g=s.getAttribute("form");g&&c.setAttribute("form",g),c.name=s.name,c.value=s.value,s.parentElement.insertBefore(c,s),r=c}let o=new FormData(e),a=[];o.forEach((c,g,p)=>{c instanceof File&&a.push(g)}),a.forEach(c=>o.delete(c));let l=new URLSearchParams;for(let[c,g]of o.entries())(i.length===0||i.indexOf(c)>=0)&&l.append(c,g);s&&r&&s.parentElement.removeChild(r);for(let c in n)l.append(c,n[c]);return l.toString()},pi=class{constructor(e,t,i,s,n){this.isDead=!1,this.liveSocket=t,this.flash=s,this.parent=i,this.root=i?i.root:this,this.el=e,this.id=this.el.id,this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pendingForms=new Set,this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(r){r&&r()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.formsForRecovery={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>{let r=this.href&&this.expandURL(this.href);return{redirect:this.redirect?r:void 0,url:this.redirect?void 0:r||void 0,params:this.connectParams(n),session:this.getSession(),static:this.getStatic(),flash:this.flash}})}setHref(e){this.href=e}setRedirect(e){this.redirect=!0,this.href=e}isMain(){return this.el.hasAttribute(wt)}connectParams(e){let t=this.liveSocket.params(this.el),i=d.all(document,`[${this.binding(Mi)}]`).map(s=>s.src||s.href).filter(s=>typeof s=="string");return i.length>0&&(t._track_static=i),t._mounts=this.joinCount,t._live_referer=e,t}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(Y)}getStatic(){let e=this.el.getAttribute(me);return e===""?null:e}destroy(e=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let t=()=>{e();for(let i in this.viewHooks)this.destroyHook(this.viewHooks[i])};d.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",t).receive("error",t).receive("timeout",t)}setContainerClasses(...e){this.el.classList.remove(Ft,Ae,Me,Nt,ot),this.el.classList.add(...e)}showLoader(e){if(clearTimeout(this.loaderTimer),e)this.loaderTimer=setTimeout(()=>this.showLoader(),e);else{for(let t in this.viewHooks)this.viewHooks[t].__disconnected();this.setContainerClasses(Ae)}}execAll(e){d.all(this.el,`[${e}]`,t=>this.liveSocket.execJS(t,t.getAttribute(e)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(Ft),this.execAll(this.binding("connected"))}triggerReconnected(){for(let e in this.viewHooks)this.viewHooks[e].__reconnected()}log(e,t){this.liveSocket.log(this,e,t)}transition(e,t,i=function(){}){this.liveSocket.transition(e,t,i)}withinTargets(e,t,i=document,s){if(e instanceof HTMLElement||e instanceof SVGElement)return this.liveSocket.owner(e,n=>t(n,e));if(z(e))d.findComponentNodeList(s||this.el,e).length===0?M(`no component found matching phx-target of ${e}`):t(this,parseInt(e));else{let n=Array.from(i.querySelectorAll(e));n.length===0&&M(`nothing found matching the phx-target selector "${e}"`),n.forEach(r=>this.liveSocket.owner(r,o=>t(o,r)))}}applyDiff(e,t,i){this.log(e,()=>["",We(t)]);let{diff:s,reply:n,events:r,title:o}=ni.extract(t);i({diff:s,reply:n,events:r}),typeof o=="string"&&window.requestAnimationFrame(()=>d.putTitle(o))}onJoin(e){let{rendered:t,container:i,liveview_version:s}=e;if(i){let[n,r]=i;this.el=d.replaceRootContainer(this.el,n,r)}this.childJoins=0,this.joinPending=!0,this.flash=null,this.root===this&&(this.formsForRecovery=this.getFormsForRecovery()),s!==this.liveSocket.version()&&console.error(`LiveView asset version mismatch. JavaScript version ${this.liveSocket.version()} vs. server ${s}. To avoid issues, please ensure that your assets use the same version as the server.`),V.dropLocal(this.liveSocket.localStorage,window.location.pathname,ri),this.applyDiff("mount",t,({diff:n,events:r})=>{this.rendered=new ni(this.id,n);let[o,a]=this.renderContainer(null,"join");this.dropPendingRefs(),this.joinCount++,this.maybeRecoverForms(o,()=>{this.onJoinComplete(e,o,a,r)})})}dropPendingRefs(){d.all(document,`[${te}="${this.id}"][${N}]`,e=>{e.removeAttribute(N),e.removeAttribute(te)})}onJoinComplete({live_patch:e},t,i,s){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(e,t,i,s);d.findPhxChildrenInFragment(t,this.id).filter(r=>{let o=r.id&&this.el.querySelector(`[id="${r.id}"]`),a=o&&o.getAttribute(me);return a&&r.setAttribute(me,a),o&&o.setAttribute(de,this.root.id),this.joinChild(r)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,t,i,s)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(e,t,i,s)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,t,i,s)])}attachTrueDocEl(){this.el=d.byId(this.id),this.el.setAttribute(de,this.root.id)}execNewMounted(){let e=this.binding(mt),t=this.binding(gt);d.all(this.el,`[${e}], [${t}]`,i=>{this.ownsElement(i)&&(d.maybeAddPrivateHooks(i,e,t),this.maybeAddNewHook(i))}),d.all(this.el,`[${this.binding(ke)}], [data-phx-${ke}]`,i=>{this.ownsElement(i)&&this.maybeAddNewHook(i)}),d.all(this.el,`[${this.binding(Ut)}]`,i=>{this.ownsElement(i)&&this.maybeMounted(i)})}applyJoinPatch(e,t,i,s){this.attachTrueDocEl();let n=new Ve(this,this.el,this.id,t,i,null);if(n.markPrunableContentForRemoval(),this.performPatch(n,!1,!0),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(s),this.applyPendingUpdates(),e){let{kind:r,to:o}=e;this.liveSocket.historyPatch(o,r)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(e,t){this.liveSocket.triggerDOM("onBeforeElUpdated",[e,t]);let i=this.getHook(e),s=i&&d.isIgnored(e,this.binding(Ye));if(i&&!e.isEqualNode(t)&&!(s&&is(e.dataset,t.dataset)))return i.__beforeUpdate(),i}maybeMounted(e){let t=e.getAttribute(this.binding(Ut)),i=t&&d.private(e,"mounted");t&&!i&&(this.liveSocket.execJS(e,t),d.putPrivate(e,"mounted",!0))}maybeAddNewHook(e,t){let i=this.addHook(e);i&&i.__mounted()}performPatch(e,t,i=!1){let s=[],n=!1,r=new Set;return e.after("added",o=>{this.liveSocket.triggerDOM("onNodeAdded",[o]);let a=this.binding(mt),l=this.binding(gt);d.maybeAddPrivateHooks(o,a,l),this.maybeAddNewHook(o),o.getAttribute&&this.maybeMounted(o)}),e.after("phxChildAdded",o=>{d.isPhxSticky(o)?this.liveSocket.joinRootViews():n=!0}),e.before("updated",(o,a)=>{this.triggerBeforeUpdateHook(o,a)&&r.add(o.id)}),e.after("updated",o=>{r.has(o.id)&&this.getHook(o).__updated()}),e.after("discarded",o=>{o.nodeType===Node.ELEMENT_NODE&&s.push(o)}),e.after("transitionsDiscarded",o=>this.afterElementsRemoved(o,t)),e.perform(i),this.afterElementsRemoved(s,t),n}afterElementsRemoved(e,t){let i=[];e.forEach(s=>{let n=d.all(s,`[${K}]`),r=d.all(s,`[${this.binding(ke)}]`);n.concat(s).forEach(o=>{let a=this.componentID(o);z(a)&&i.indexOf(a)===-1&&i.push(a)}),r.concat(s).forEach(o=>{let a=this.getHook(o);a&&this.destroyHook(a)})}),t&&this.maybePushComponentsDestroyed(i)}joinNewChildren(){d.findPhxChildren(this.el,this.id).forEach(e=>this.joinChild(e))}maybeRecoverForms(e,t){let i=this.binding("change"),s=this.root.formsForRecovery,n=document.createElement("template");n.innerHTML=e;let r=n.content.firstElementChild;r.id=this.id,r.setAttribute(de,this.root.id),r.setAttribute(Y,this.getSession()),r.setAttribute(me,this.getStatic()),r.setAttribute(he,this.parent?this.parent.id:null);let o=d.all(n.content,"form").filter(a=>a.id&&s[a.id]).filter(a=>!this.pendingForms.has(a.id)).filter(a=>s[a.id].getAttribute(i)===a.getAttribute(i)).map(a=>[s[a.id],a]);if(o.length===0)return t();o.forEach(([a,l],h)=>{this.pendingForms.add(l.id),this.pushFormRecovery(a,l,n.content,()=>{this.pendingForms.delete(l.id),h===o.length-1&&t()})})}getChildById(e){return this.root.children[this.id][e]}getDescendentByEl(e){return e.id===this.id?this:this.children[e.getAttribute(he)][e.id]}destroyDescendent(e){for(let t in this.root.children)for(let i in this.root.children[t])if(i===e)return this.root.children[t][i].destroy()}joinChild(e){if(!this.getChildById(e.id)){let i=new pi(e,this.liveSocket,this);return this.root.children[this.id][i.id]=i,i.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(e){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.pendingForms.clear(),this.formsForRecovery={},this.joinCallback(()=>{this.pendingJoinOps.forEach(([e,t])=>{e.isDestroyed()||t()}),this.pendingJoinOps=[]})}update(e,t){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:e,events:t});this.rendered.mergeDiff(e);let i=!1;this.rendered.isComponentOnlyDiff(e)?this.liveSocket.time("component patch complete",()=>{d.findExistingParentCIDs(this.el,this.rendered.componentCIDs(e)).forEach(n=>{this.componentPatch(this.rendered.getComponent(e,n),n)&&(i=!0)})}):Xt(e)||this.liveSocket.time("full patch complete",()=>{let[s,n]=this.renderContainer(e,"update"),r=new Ve(this,this.el,this.id,s,n,null);i=this.performPatch(r,!0)}),this.liveSocket.dispatchEvents(t),i&&this.joinNewChildren()}renderContainer(e,t){return this.liveSocket.time(`toString diff (${t})`,()=>{let i=this.el.tagName,s=e?this.rendered.componentCIDs(e):null,[n,r]=this.rendered.toString(s);return[`<${i}>${n}`,r]})}componentPatch(e,t){if(Xt(e))return!1;let[i,s]=this.rendered.componentToString(t),n=new Ve(this,this.el,this.id,i,s,t);return this.performPatch(n,!0)}getHook(e){return this.viewHooks[Re.elementID(e)]}addHook(e){if(Re.elementID(e)||!e.getAttribute)return;let t=e.getAttribute(`data-phx-${ke}`)||e.getAttribute(this.binding(ke));if(t&&!this.ownsElement(e))return;let i=this.liveSocket.getHookCallbacks(t);if(i){e.id||M(`no DOM ID for hook "${t}". Hooks require a unique ID on each element.`,e);let s=new Re(this,e,i);return this.viewHooks[Re.elementID(s.el)]=s,s}else t!==null&&M(`unknown hook found for "${t}"`,e)}destroyHook(e){e.__destroyed(),e.__cleanup__(),delete this.viewHooks[Re.elementID(e.el)]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:e,events:t})=>this.update(e,t)),this.pendingDiffs=[],this.eachChild(e=>e.applyPendingUpdates())}eachChild(e){let t=this.root.children[this.id]||{};for(let i in t)e(this.getChildById(i))}onChannel(e,t){this.liveSocket.onChannel(this.channel,e,i=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>t(i)]):this.liveSocket.requestDOMUpdate(()=>t(i))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",e=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",e,({diff:t,events:i})=>this.update(t,i))})}),this.onChannel("redirect",({to:e,flash:t})=>this.onRedirect({to:e,flash:t})),this.onChannel("live_patch",e=>this.onLivePatch(e)),this.onChannel("live_redirect",e=>this.onLiveRedirect(e)),this.channel.onError(e=>this.onError(e)),this.channel.onClose(e=>this.onClose(e))}destroyAllChildren(){this.eachChild(e=>e.destroy())}onLiveRedirect(e){let{to:t,kind:i,flash:s}=e,n=this.expandURL(t);this.liveSocket.historyRedirect(n,i,s)}onLivePatch(e){let{to:t,kind:i}=e;this.href=this.expandURL(t),this.liveSocket.historyPatch(t,i)}expandURL(e){return e.startsWith("/")?`${window.location.protocol}//${window.location.host}${e}`:e}onRedirect({to:e,flash:t}){this.liveSocket.redirect(e,t)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}join(e){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=t=>{t=t||function(){},e?e(this.joinCount,t):t()},this.liveSocket.wrapPush(this,{timeout:!1},()=>this.channel.join().receive("ok",t=>{this.isDestroyed()||this.liveSocket.requestDOMUpdate(()=>this.onJoin(t))}).receive("error",t=>!this.isDestroyed()&&this.onJoinError(t)).receive("timeout",()=>!this.isDestroyed()&&this.onJoinError({reason:"timeout"})))}onJoinError(e){if(e.reason==="reload"){this.log("error",()=>[`failed mount with ${e.status}. Falling back to page request`,e]),this.isMain()&&this.onRedirect({to:this.href});return}else if(e.reason==="unauthorized"||e.reason==="stale"){this.log("error",()=>["unauthorized live_redirect. Falling back to page request",e]),this.isMain()&&this.onRedirect({to:this.href});return}if((e.redirect||e.live_redirect)&&(this.joinPending=!1,this.channel.leave()),e.redirect)return this.onRedirect(e.redirect);if(e.live_redirect)return this.onLiveRedirect(e.live_redirect);this.displayError([Ae,Me,ot]),this.log("error",()=>["unable to join",e]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this)}onClose(e){if(!this.isDestroyed()){if(this.liveSocket.hasPendingLink()&&e!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(zi)}}onError(e){this.onClose(e),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",e]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([Ae,Me,ot]):this.displayError([Ae,Me,Nt]))}displayError(e){this.isMain()&&d.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(...e),this.execAll(this.binding("disconnected"))}pushWithReply(e,t,i,s=function(){}){if(!this.isConnected())return;let[n,[r],o]=e?e():[null,[],{}],a=function(){};return(o.page_loading||r&&r.getAttribute(this.binding(Ht))!==null)&&(a=this.liveSocket.withPageLoading({kind:"element",target:r})),typeof i.cid!="number"&&delete i.cid,this.liveSocket.wrapPush(this,{timeout:!0},()=>this.channel.push(t,i,Gi).receive("ok",l=>{let h=c=>{l.redirect&&this.onRedirect(l.redirect),l.live_patch&&this.onLivePatch(l.live_patch),l.live_redirect&&this.onLiveRedirect(l.live_redirect),a(),s(l,c)};l.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",l.diff,({diff:c,reply:g,events:p})=>{n!==null&&this.undoRefs(n),this.update(c,p),h(g)})}):(n!==null&&this.undoRefs(n),h(null))}))}undoRefs(e,t){t=t?new Set(t):null,this.isConnected()&&d.all(document,`[${te}="${this.id}"][${N}="${e}"]`,i=>{if(t&&!t.has(i))return;i.dispatchEvent(new CustomEvent("phx:unlock",{bubbles:!0,cancelable:!1}));let s=i.getAttribute(fe),n=i.getAttribute(at);i.removeAttribute(N),i.removeAttribute(te),n!==null&&(i.readOnly=n==="true",i.removeAttribute(at)),s!==null&&(i.disabled=s==="true",i.removeAttribute(fe)),oi.forEach(a=>d.removeClass(i,a));let r=i.getAttribute($e);r!==null&&(i.innerText=r,i.removeAttribute($e));let o=d.private(i,N);if(o){let a=this.triggerBeforeUpdateHook(i,o);Ve.patchEl(i,o,this.liveSocket.getActiveElement()),a&&a.__updated(),d.deletePrivate(i,N)}})}putRef(e,t,i={}){let s=this.ref++,n=this.binding(bt);i.loading&&(e=e.concat(d.all(document,i.loading)));for(let r of e){if(r.setAttribute(N,s),r.setAttribute(te,this.el.id),i.submitter&&!(r===i.submitter||r===i.form))continue;r.classList.add(`phx-${t}-loading`),r.dispatchEvent(new CustomEvent(`phx:${t}-loading`,{bubbles:!0,cancelable:!1}));let o=r.getAttribute(n);o!==null&&(r.getAttribute($e)||r.setAttribute($e,r.innerText),o!==""&&(r.innerText=o),r.setAttribute(fe,r.getAttribute(fe)||r.disabled),r.setAttribute("disabled",""))}return[s,e,i]}componentID(e){let t=e.getAttribute&&e.getAttribute(K);return t?parseInt(t):null}targetComponentID(e,t,i={}){if(z(t))return t;let s=i.target||e.getAttribute(this.binding("target"));return z(s)?parseInt(s):t&&(s!==null||i.target)?this.closestComponentID(t):null}closestComponentID(e){return z(e)?e:e?ie(e.closest(`[${K}]`),t=>this.ownsElement(t)&&this.componentID(t)):null}pushHookEvent(e,t,i,s,n){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",i,s]),!1;let[r,o,a]=this.putRef([e],"hook");return this.pushWithReply(()=>[r,o,a],"event",{type:"hook",event:i,value:s,cid:this.closestComponentID(t)},(l,h)=>n(h,r)),r}extractMeta(e,t,i){let s=this.binding("value-");for(let n=0;n=0&&!e.checked&&delete t.value),i){t||(t={});for(let n in i)t[n]=i[n]}return t}pushEvent(e,t,i,s,n,r={},o){this.pushWithReply(()=>this.putRef([t],e,r),"event",{type:e,event:s,value:this.extractMeta(t,n,r.value),cid:this.targetComponentID(t,i,r)},(a,l)=>o&&o(l))}pushFileProgress(e,t,i,s=function(){}){this.liveSocket.withinOwners(e.form,(n,r)=>{n.pushWithReply(null,"progress",{event:e.getAttribute(n.binding(Xi)),ref:e.getAttribute(G),entry_ref:t,progress:i,cid:n.targetComponentID(e.form,r)},s)})}pushInput(e,t,i,s,n,r){let o,a=z(i)?i:this.targetComponentID(e.form,t,n),l=()=>this.putRef([e,e.form],"change",n),h,c=this.extractMeta(e.form);e instanceof HTMLButtonElement&&(c.submitter=e),e.getAttribute(this.binding("change"))?h=qe(e.form,U({_target:n._target},c),[e.name]):h=qe(e.form,U({_target:n._target},c)),d.isUploadInput(e)&&e.files&&e.files.length>0&&_.trackFiles(e,Array.from(e.files)),o=_.serializeUploads(e);let g={type:"form",event:s,value:h,uploads:o,cid:a};this.pushWithReply(l,"event",g,p=>{if(d.showError(e,this.liveSocket.binding(ze),this.liveSocket.binding(Ke)),d.isUploadInput(e)&&d.isAutoUpload(e)){if(_.filesAwaitingPreflight(e).length>0){let[f,m]=l();this.undoRefs(f,[e.form]),this.uploadFiles(e.form,t,f,a,v=>{r&&r(p),this.triggerAwaitingSubmit(e.form),this.undoRefs(f)})}}else r&&r(p)})}triggerAwaitingSubmit(e){let t=this.getScheduledSubmit(e);if(t){let[i,s,n,r]=t;this.cancelSubmit(e),r()}}getScheduledSubmit(e){return this.formSubmits.find(([t,i,s,n])=>t.isSameNode(e))}scheduleSubmit(e,t,i,s){if(this.getScheduledSubmit(e))return!0;this.formSubmits.push([e,t,i,s])}cancelSubmit(e){this.formSubmits=this.formSubmits.filter(([t,i,s])=>t.isSameNode(e)?(this.undoRefs(i),!1):!0)}disableForm(e,t={}){let i=c=>!(Pe(c,`${this.binding(Ye)}=ignore`,c.form)||Pe(c,"data-phx-update=ignore",c.form)),s=c=>c.hasAttribute(this.binding(bt)),n=c=>c.tagName=="BUTTON",r=c=>["INPUT","TEXTAREA","SELECT"].includes(c.tagName),o=Array.from(e.elements),a=o.filter(s),l=o.filter(n).filter(i),h=o.filter(r).filter(i);return l.forEach(c=>{c.setAttribute(fe,c.disabled),c.disabled=!0}),h.forEach(c=>{c.setAttribute(at,c.readOnly),c.readOnly=!0,c.files&&(c.setAttribute(fe,c.disabled),c.disabled=!0)}),e.setAttribute(this.binding(Ht),""),this.putRef([e].concat(a).concat(l).concat(h),"submit",t)}pushFormSubmit(e,t,i,s,n,r){let o=()=>this.disableForm(e,_t(U({},n),{form:e,submitter:s})),a=this.targetComponentID(e,t);if(_.hasUploadsInProgress(e)){let[l,h]=o(),c=()=>this.pushFormSubmit(e,t,i,s,n,r);return this.scheduleSubmit(e,l,n,c)}else if(_.inputsAwaitingPreflight(e).length>0){let[l,h]=o(),c=()=>[l,h,n];this.uploadFiles(e,t,l,a,g=>{if(_.inputsAwaitingPreflight(e).length>0)return this.undoRefs(l);let p=this.extractMeta(e),f=qe(e,U({submitter:s},p));this.pushWithReply(c,"event",{type:"form",event:i,value:f,cid:a},r)})}else if(!(e.hasAttribute(N)&&e.classList.contains("phx-submit-loading"))){let l=this.extractMeta(e),h=qe(e,U({submitter:s},l));this.pushWithReply(o,"event",{type:"form",event:i,value:h,cid:a},r)}}uploadFiles(e,t,i,s,n){let r=this.joinCount,o=_.activeFileInputs(e),a=o.length;o.forEach(l=>{let h=new _(l,this,()=>{a--,a===0&&n()}),c=h.entries().map(p=>p.toPreflightPayload());if(c.length===0){a--;return}let g={ref:l.getAttribute(G),entries:c,cid:this.targetComponentID(l.form,t)};this.log("upload",()=>["sending preflight request",g]),this.pushWithReply(null,"allow_upload",g,p=>{if(this.log("upload",()=>["got preflight response",p]),h.entries().forEach(f=>{p.entries&&!p.entries[f.ref]&&this.handleFailedEntryPreflight(f.ref,"failed preflight",h)}),p.error||Object.keys(p.entries).length===0)this.undoRefs(i),(p.error||[]).map(([m,v])=>{this.handleFailedEntryPreflight(m,v,h)});else{let f=m=>{this.channel.onError(()=>{this.joinCount===r&&m()})};h.initAdapterUpload(p,f,this.liveSocket)}})})}handleFailedEntryPreflight(e,t,i){if(i.isAutoUpload()){let s=i.entries().find(n=>n.ref===e.toString());s&&s.cancel()}else i.entries().map(s=>s.cancel());this.log("upload",()=>[`error for entry ${e}`,t])}dispatchUploads(e,t,i){let s=this.targetCtxElement(e)||this.el,n=d.findUploadInputs(s).filter(r=>r.name===t);n.length===0?M(`no live file inputs found matching the name "${t}"`):n.length>1?M(`duplicate live file inputs found matching the name "${t}"`):d.dispatchEvent(n[0],ai,{detail:{files:i}})}targetCtxElement(e){if(z(e)){let[t]=d.findComponentNodeList(this.el,e);return t}else return e||null}pushFormRecovery(e,t,i,s){let n=this.binding("change"),r=t.getAttribute(this.binding("target"))||t,o=t.getAttribute(this.binding($t))||t.getAttribute(this.binding("change")),a=Array.from(e.elements).filter(c=>d.isFormInput(c)&&c.name&&!c.hasAttribute(n));if(a.length===0)return;a.forEach(c=>c.hasAttribute(G)&&_.clearFiles(c));let l=a.find(c=>c.type!=="hidden")||a[0],h=0;this.withinTargets(r,(c,g)=>{let p=this.targetComponentID(t,g);h++,c.pushInput(l,g,p,o,{_target:l.name},()=>{h--,h===0&&s()})},i,i)}pushLinkPatch(e,t,i){let s=this.liveSocket.setPendingLink(e),n=t?()=>this.putRef([t],"click"):null,r=()=>this.liveSocket.redirect(window.location.href),o=e.startsWith("/")?`${location.protocol}//${location.host}${e}`:e,a=this.pushWithReply(n,"live_patch",{url:o},l=>{this.liveSocket.requestDOMUpdate(()=>{l.link_redirect?this.liveSocket.replaceMain(e,null,i,s):(this.liveSocket.commitPendingLink(s)&&(this.href=e),this.applyPendingUpdates(),i&&i(s))})});a?a.receive("timeout",r):r()}getFormsForRecovery(){if(this.joinCount===0)return{};let e=this.binding("change");return d.all(this.el,`form[${e}]`).filter(t=>t.id).filter(t=>t.elements.length>0).filter(t=>t.getAttribute(this.binding($t))!=="ignore").map(t=>t.cloneNode(!0)).reduce((t,i)=>(t[i.id]=i,t),{})}maybePushComponentsDestroyed(e){let t=e.filter(i=>d.findComponentNodeList(this.el,i).length===0);t.length>0&&(t.forEach(i=>this.rendered.resetRender(i)),this.pushWithReply(null,"cids_will_destroy",{cids:t},()=>{this.liveSocket.requestDOMUpdate(()=>{let i=t.filter(s=>d.findComponentNodeList(this.el,s).length===0);i.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:i},s=>{this.rendered.pruneCIDs(s.cids)})})}))}ownsElement(e){let t=e.closest(ve);return e.getAttribute(he)===this.id||t&&t.id===this.id||!t&&this.isDead}submitForm(e,t,i,s,n={}){d.putPrivate(e,Ge,!0);let r=this.liveSocket.binding(ze),o=this.liveSocket.binding(Ke),a=Array.from(e.elements);a.forEach(l=>d.putPrivate(l,Ge,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(e,t,i,s,n,()=>{a.forEach(l=>d.showError(l,r,o)),this.liveSocket.restorePreviouslyActiveFocus()})}binding(e){return this.liveSocket.binding(e)}},mi=class{constructor(e,t,i={}){if(this.unloaded=!1,!t||t.constructor.name==="Object")throw new Error(` a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example: import {Socket} from "phoenix" import {LiveSocket} from "phoenix_live_view" let liveSocket = new LiveSocket("/live", Socket, {...}) - `); - } - this.socket = new phxSocket(url, opts); - this.bindingPrefix = opts.bindingPrefix || BINDING_PREFIX; - this.opts = opts; - this.params = closure2(opts.params || {}); - this.viewLogger = opts.viewLogger; - this.metadataCallbacks = opts.metadata || {}; - this.defaults = Object.assign(clone(DEFAULTS), opts.defaults || {}); - this.activeElement = null; - this.prevActive = null; - this.silenced = false; - this.main = null; - this.outgoingMainEl = null; - this.clickStartedAtTarget = null; - this.linkRef = 1; - this.roots = {}; - this.href = window.location.href; - this.pendingLink = null; - this.currentLocation = clone(window.location); - this.hooks = opts.hooks || {}; - this.uploaders = opts.uploaders || {}; - this.loaderTimeout = opts.loaderTimeout || LOADER_TIMEOUT; - this.reloadWithJitterTimer = null; - this.maxReloads = opts.maxReloads || MAX_RELOADS; - this.reloadJitterMin = opts.reloadJitterMin || RELOAD_JITTER_MIN; - this.reloadJitterMax = opts.reloadJitterMax || RELOAD_JITTER_MAX; - this.failsafeJitter = opts.failsafeJitter || FAILSAFE_JITTER; - this.localStorage = opts.localStorage || window.localStorage; - this.sessionStorage = opts.sessionStorage || window.sessionStorage; - this.boundTopLevelEvents = false; - this.serverCloseRef = null; - this.domCallbacks = Object.assign({ - onPatchStart: closure2(), - onPatchEnd: closure2(), - onNodeAdded: closure2(), - onBeforeElUpdated: closure2() - }, opts.dom || {}); - this.transitions = new TransitionSet(); - window.addEventListener("pagehide", (_e) => { - this.unloaded = true; - }); - this.socket.onOpen(() => { - if (this.isUnloaded()) { - window.location.reload(); - } - }); - } - version() { - return "0.20.15"; - } - isProfileEnabled() { - return this.sessionStorage.getItem(PHX_LV_PROFILE) === "true"; - } - isDebugEnabled() { - return this.sessionStorage.getItem(PHX_LV_DEBUG) === "true"; - } - isDebugDisabled() { - return this.sessionStorage.getItem(PHX_LV_DEBUG) === "false"; - } - enableDebug() { - this.sessionStorage.setItem(PHX_LV_DEBUG, "true"); - } - enableProfiling() { - this.sessionStorage.setItem(PHX_LV_PROFILE, "true"); - } - disableDebug() { - this.sessionStorage.setItem(PHX_LV_DEBUG, "false"); - } - disableProfiling() { - this.sessionStorage.removeItem(PHX_LV_PROFILE); - } - enableLatencySim(upperBoundMs) { - this.enableDebug(); - console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"); - this.sessionStorage.setItem(PHX_LV_LATENCY_SIM, upperBoundMs); - } - disableLatencySim() { - this.sessionStorage.removeItem(PHX_LV_LATENCY_SIM); - } - getLatencySim() { - let str = this.sessionStorage.getItem(PHX_LV_LATENCY_SIM); - return str ? parseInt(str) : null; - } - getSocket() { - return this.socket; - } - connect() { - if (window.location.hostname === "localhost" && !this.isDebugDisabled()) { - this.enableDebug(); - } - let doConnect = () => { - if (this.joinRootViews()) { - this.bindTopLevelEvents(); - this.socket.connect(); - } else if (this.main) { - this.socket.connect(); - } else { - this.bindTopLevelEvents({ dead: true }); - } - this.joinDeadView(); - }; - if (["complete", "loaded", "interactive"].indexOf(document.readyState) >= 0) { - doConnect(); - } else { - document.addEventListener("DOMContentLoaded", () => doConnect()); - } - } - disconnect(callback) { - clearTimeout(this.reloadWithJitterTimer); - if (this.serverCloseRef) { - this.socket.off(this.serverCloseRef); - this.serverCloseRef = null; - } - this.socket.disconnect(callback); - } - replaceTransport(transport) { - clearTimeout(this.reloadWithJitterTimer); - this.socket.replaceTransport(transport); - this.connect(); - } - execJS(el, encodedJS, eventType = null) { - this.owner(el, (view) => js_default.exec(eventType, encodedJS, view, el)); - } - execJSHookPush(el, phxEvent, data, callback) { - this.withinOwners(el, (view) => { - js_default.exec("hook", phxEvent, view, el, ["push", { data, callback }]); - }); - } - unload() { - if (this.unloaded) { - return; - } - if (this.main && this.isConnected()) { - this.log(this.main, "socket", () => ["disconnect for page nav"]); - } - this.unloaded = true; - this.destroyAllViews(); - this.disconnect(); - } - triggerDOM(kind, args) { - this.domCallbacks[kind](...args); - } - time(name, func) { - if (!this.isProfileEnabled() || !console.time) { - return func(); - } - console.time(name); - let result = func(); - console.timeEnd(name); - return result; - } - log(view, kind, msgCallback) { - if (this.viewLogger) { - let [msg, obj] = msgCallback(); - this.viewLogger(view, kind, msg, obj); - } else if (this.isDebugEnabled()) { - let [msg, obj] = msgCallback(); - debug(view, kind, msg, obj); - } - } - requestDOMUpdate(callback) { - this.transitions.after(callback); - } - transition(time, onStart, onDone = function() { - }) { - this.transitions.addTransition(time, onStart, onDone); - } - onChannel(channel, event, cb) { - channel.on(event, (data) => { - let latency = this.getLatencySim(); - if (!latency) { - cb(data); - } else { - setTimeout(() => cb(data), latency); - } - }); - } - wrapPush(view, opts, push) { - let latency = this.getLatencySim(); - let oldJoinCount = view.joinCount; - if (!latency) { - if (this.isConnected() && opts.timeout) { - return push().receive("timeout", () => { - if (view.joinCount === oldJoinCount && !view.isDestroyed()) { - this.reloadWithJitter(view, () => { - this.log(view, "timeout", () => ["received timeout while communicating with server. Falling back to hard refresh for recovery"]); - }); - } - }); - } else { - return push(); - } - } - let fakePush = { - receives: [], - receive(kind, cb) { - this.receives.push([kind, cb]); - } - }; - setTimeout(() => { - if (view.isDestroyed()) { - return; - } - fakePush.receives.reduce((acc, [kind, cb]) => acc.receive(kind, cb), push()); - }, latency); - return fakePush; - } - reloadWithJitter(view, log) { - clearTimeout(this.reloadWithJitterTimer); - this.disconnect(); - let minMs = this.reloadJitterMin; - let maxMs = this.reloadJitterMax; - let afterMs = Math.floor(Math.random() * (maxMs - minMs + 1)) + minMs; - let tries = browser_default.updateLocal(this.localStorage, window.location.pathname, CONSECUTIVE_RELOADS, 0, (count) => count + 1); - if (tries > this.maxReloads) { - afterMs = this.failsafeJitter; - } - this.reloadWithJitterTimer = setTimeout(() => { - if (view.isDestroyed() || view.isConnected()) { - return; - } - view.destroy(); - log ? log() : this.log(view, "join", () => [`encountered ${tries} consecutive reloads`]); - if (tries > this.maxReloads) { - this.log(view, "join", () => [`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]); - } - if (this.hasPendingLink()) { - window.location = this.pendingLink; - } else { - window.location.reload(); - } - }, afterMs); - } - getHookCallbacks(name) { - return name && name.startsWith("Phoenix.") ? hooks_default[name.split(".")[1]] : this.hooks[name]; - } - isUnloaded() { - return this.unloaded; - } - isConnected() { - return this.socket.isConnected(); - } - getBindingPrefix() { - return this.bindingPrefix; - } - binding(kind) { - return `${this.getBindingPrefix()}${kind}`; - } - channel(topic, params2) { - return this.socket.channel(topic, params2); - } - joinDeadView() { - let body = document.body; - if (body && !this.isPhxView(body) && !this.isPhxView(document.firstElementChild)) { - let view = this.newRootView(body); - view.setHref(this.getHref()); - view.joinDead(); - if (!this.main) { - this.main = view; - } - window.requestAnimationFrame(() => view.execNewMounted()); - } - } - joinRootViews() { - let rootsFound = false; - dom_default.all(document, `${PHX_VIEW_SELECTOR}:not([${PHX_PARENT_ID}])`, (rootEl) => { - if (!this.getRootById(rootEl.id)) { - let view = this.newRootView(rootEl); - view.setHref(this.getHref()); - view.join(); - if (rootEl.hasAttribute(PHX_MAIN)) { - this.main = view; - } - } - rootsFound = true; - }); - return rootsFound; - } - redirect(to, flash) { - this.unload(); - browser_default.redirect(to, flash); - } - replaceMain(href, flash, callback = null, linkRef = this.setPendingLink(href)) { - let liveReferer = this.currentLocation.href; - this.outgoingMainEl = this.outgoingMainEl || this.main.el; - let newMainEl = dom_default.cloneNode(this.outgoingMainEl, ""); - this.main.showLoader(this.loaderTimeout); - this.main.destroy(); - this.main = this.newRootView(newMainEl, flash, liveReferer); - this.main.setRedirect(href); - this.transitionRemoves(null, true); - this.main.join((joinCount, onDone) => { - if (joinCount === 1 && this.commitPendingLink(linkRef)) { - this.requestDOMUpdate(() => { - dom_default.findPhxSticky(document).forEach((el) => newMainEl.appendChild(el)); - this.outgoingMainEl.replaceWith(newMainEl); - this.outgoingMainEl = null; - callback && callback(linkRef); - onDone(); - }); - } - }); - } - transitionRemoves(elements, skipSticky) { - let removeAttr = this.binding("remove"); - elements = elements || dom_default.all(document, `[${removeAttr}]`); - if (skipSticky) { - const stickies = dom_default.findPhxSticky(document) || []; - elements = elements.filter((el) => !dom_default.isChildOfAny(el, stickies)); - } - elements.forEach((el) => { - this.execJS(el, el.getAttribute(removeAttr), "remove"); - }); - } - isPhxView(el) { - return el.getAttribute && el.getAttribute(PHX_SESSION) !== null; - } - newRootView(el, flash, liveReferer) { - let view = new View(el, this, null, flash, liveReferer); - this.roots[view.id] = view; - return view; - } - owner(childEl, callback) { - let view = maybe(childEl.closest(PHX_VIEW_SELECTOR), (el) => this.getViewByEl(el)) || this.main; - if (view) { - callback(view); - } - } - withinOwners(childEl, callback) { - this.owner(childEl, (view) => callback(view, childEl)); - } - getViewByEl(el) { - let rootId = el.getAttribute(PHX_ROOT_ID); - return maybe(this.getRootById(rootId), (root) => root.getDescendentByEl(el)); - } - getRootById(id) { - return this.roots[id]; - } - destroyAllViews() { - for (let id in this.roots) { - this.roots[id].destroy(); - delete this.roots[id]; - } - this.main = null; - } - destroyViewByEl(el) { - let root = this.getRootById(el.getAttribute(PHX_ROOT_ID)); - if (root && root.id === el.id) { - root.destroy(); - delete this.roots[root.id]; - } else if (root) { - root.destroyDescendent(el.id); - } - } - setActiveElement(target) { - if (this.activeElement === target) { - return; - } - this.activeElement = target; - let cancel = () => { - if (target === this.activeElement) { - this.activeElement = null; - } - target.removeEventListener("mouseup", this); - target.removeEventListener("touchend", this); - }; - target.addEventListener("mouseup", cancel); - target.addEventListener("touchend", cancel); - } - getActiveElement() { - if (document.activeElement === document.body) { - return this.activeElement || document.activeElement; - } else { - return document.activeElement || document.body; - } - } - dropActiveElement(view) { - if (this.prevActive && view.ownsElement(this.prevActive)) { - this.prevActive = null; - } - } - restorePreviouslyActiveFocus() { - if (this.prevActive && this.prevActive !== document.body) { - this.prevActive.focus(); - } - } - blurActiveElement() { - this.prevActive = this.getActiveElement(); - if (this.prevActive !== document.body) { - this.prevActive.blur(); - } - } - bindTopLevelEvents({ dead } = {}) { - if (this.boundTopLevelEvents) { - return; - } - this.boundTopLevelEvents = true; - this.serverCloseRef = this.socket.onClose((event) => { - if (event && event.code === 1e3 && this.main) { - return this.reloadWithJitter(this.main); - } - }); - document.body.addEventListener("click", function() { - }); - window.addEventListener("pageshow", (e) => { - if (e.persisted) { - this.getSocket().disconnect(); - this.withPageLoading({ to: window.location.href, kind: "redirect" }); - window.location.reload(); - } - }, true); - if (!dead) { - this.bindNav(); - } - this.bindClicks(); - if (!dead) { - this.bindForms(); - } - this.bind({ keyup: "keyup", keydown: "keydown" }, (e, type, view, targetEl, phxEvent, phxTarget) => { - let matchKey = targetEl.getAttribute(this.binding(PHX_KEY)); - let pressedKey = e.key && e.key.toLowerCase(); - if (matchKey && matchKey.toLowerCase() !== pressedKey) { - return; - } - let data = __spreadValues({ key: e.key }, this.eventMeta(type, e, targetEl)); - js_default.exec(type, phxEvent, view, targetEl, ["push", { data }]); - }); - this.bind({ blur: "focusout", focus: "focusin" }, (e, type, view, targetEl, phxEvent, phxTarget) => { - if (!phxTarget) { - let data = __spreadValues({ key: e.key }, this.eventMeta(type, e, targetEl)); - js_default.exec(type, phxEvent, view, targetEl, ["push", { data }]); - } - }); - this.bind({ blur: "blur", focus: "focus" }, (e, type, view, targetEl, phxEvent, phxTarget) => { - if (phxTarget === "window") { - let data = this.eventMeta(type, e, targetEl); - js_default.exec(type, phxEvent, view, targetEl, ["push", { data }]); - } - }); - window.addEventListener("dragover", (e) => e.preventDefault()); - window.addEventListener("drop", (e) => { - e.preventDefault(); - let dropTargetId = maybe(closestPhxBinding(e.target, this.binding(PHX_DROP_TARGET)), (trueTarget) => { - return trueTarget.getAttribute(this.binding(PHX_DROP_TARGET)); - }); - let dropTarget = dropTargetId && document.getElementById(dropTargetId); - let files = Array.from(e.dataTransfer.files || []); - if (!dropTarget || dropTarget.disabled || files.length === 0 || !(dropTarget.files instanceof FileList)) { - return; - } - LiveUploader.trackFiles(dropTarget, files, e.dataTransfer); - dropTarget.dispatchEvent(new Event("input", { bubbles: true })); - }); - this.on(PHX_TRACK_UPLOADS, (e) => { - let uploadTarget = e.target; - if (!dom_default.isUploadInput(uploadTarget)) { - return; - } - let files = Array.from(e.detail.files || []).filter((f) => f instanceof File || f instanceof Blob); - LiveUploader.trackFiles(uploadTarget, files); - uploadTarget.dispatchEvent(new Event("input", { bubbles: true })); - }); - } - eventMeta(eventName, e, targetEl) { - let callback = this.metadataCallbacks[eventName]; - return callback ? callback(e, targetEl) : {}; - } - setPendingLink(href) { - this.linkRef++; - this.pendingLink = href; - return this.linkRef; - } - commitPendingLink(linkRef) { - if (this.linkRef !== linkRef) { - return false; - } else { - this.href = this.pendingLink; - this.pendingLink = null; - return true; - } - } - getHref() { - return this.href; - } - hasPendingLink() { - return !!this.pendingLink; - } - bind(events, callback) { - for (let event in events) { - let browserEventName = events[event]; - this.on(browserEventName, (e) => { - let binding = this.binding(event); - let windowBinding = this.binding(`window-${event}`); - let targetPhxEvent = e.target.getAttribute && e.target.getAttribute(binding); - if (targetPhxEvent) { - this.debounce(e.target, e, browserEventName, () => { - this.withinOwners(e.target, (view) => { - callback(e, event, view, e.target, targetPhxEvent, null); - }); - }); - } else { - dom_default.all(document, `[${windowBinding}]`, (el) => { - let phxEvent = el.getAttribute(windowBinding); - this.debounce(el, e, browserEventName, () => { - this.withinOwners(el, (view) => { - callback(e, event, view, el, phxEvent, "window"); - }); - }); - }); - } - }); - } - } - bindClicks() { - window.addEventListener("mousedown", (e) => this.clickStartedAtTarget = e.target); - this.bindClick("click", "click"); - } - bindClick(eventName, bindingName) { - let click = this.binding(bindingName); - window.addEventListener(eventName, (e) => { - let target = null; - if (e.detail === 0) - this.clickStartedAtTarget = e.target; - let clickStartedAtTarget = this.clickStartedAtTarget || e.target; - target = closestPhxBinding(clickStartedAtTarget, click); - this.dispatchClickAway(e, clickStartedAtTarget); - this.clickStartedAtTarget = null; - let phxEvent = target && target.getAttribute(click); - if (!phxEvent) { - if (dom_default.isNewPageClick(e, window.location)) { - this.unload(); - } - return; - } - if (target.getAttribute("href") === "#") { - e.preventDefault(); - } - if (target.hasAttribute(PHX_REF)) { - return; - } - this.debounce(target, e, "click", () => { - this.withinOwners(target, (view) => { - js_default.exec("click", phxEvent, view, target, ["push", { data: this.eventMeta("click", e, target) }]); - }); - }); - }, false); - } - dispatchClickAway(e, clickStartedAt) { - let phxClickAway = this.binding("click-away"); - dom_default.all(document, `[${phxClickAway}]`, (el) => { - if (!(el.isSameNode(clickStartedAt) || el.contains(clickStartedAt))) { - this.withinOwners(el, (view) => { - let phxEvent = el.getAttribute(phxClickAway); - if (js_default.isVisible(el) && js_default.isInViewport(el)) { - js_default.exec("click", phxEvent, view, el, ["push", { data: this.eventMeta("click", e, e.target) }]); - } - }); - } - }); - } - bindNav() { - if (!browser_default.canPushState()) { - return; - } - if (history.scrollRestoration) { - history.scrollRestoration = "manual"; - } - let scrollTimer = null; - window.addEventListener("scroll", (_e) => { - clearTimeout(scrollTimer); - scrollTimer = setTimeout(() => { - browser_default.updateCurrentState((state) => Object.assign(state, { scroll: window.scrollY })); - }, 100); - }); - window.addEventListener("popstate", (event) => { - if (!this.registerNewLocation(window.location)) { - return; - } - let { type, id, root, scroll } = event.state || {}; - let href = window.location.href; - dom_default.dispatchEvent(window, "phx:navigate", { detail: { href, patch: type === "patch", pop: true } }); - this.requestDOMUpdate(() => { - if (this.main.isConnected() && (type === "patch" && id === this.main.id)) { - this.main.pushLinkPatch(href, null, () => { - this.maybeScroll(scroll); - }); - } else { - this.replaceMain(href, null, () => { - if (root) { - this.replaceRootHistory(); - } - this.maybeScroll(scroll); - }); - } - }); - }, false); - window.addEventListener("click", (e) => { - let target = closestPhxBinding(e.target, PHX_LIVE_LINK); - let type = target && target.getAttribute(PHX_LIVE_LINK); - if (!type || !this.isConnected() || !this.main || dom_default.wantsNewTab(e)) { - return; - } - let href = target.href instanceof SVGAnimatedString ? target.href.baseVal : target.href; - let linkState = target.getAttribute(PHX_LINK_STATE); - e.preventDefault(); - e.stopImmediatePropagation(); - if (this.pendingLink === href) { - return; - } - this.requestDOMUpdate(() => { - if (type === "patch") { - this.pushHistoryPatch(href, linkState, target); - } else if (type === "redirect") { - this.historyRedirect(href, linkState); - } else { - throw new Error(`expected ${PHX_LIVE_LINK} to be "patch" or "redirect", got: ${type}`); - } - let phxClick = target.getAttribute(this.binding("click")); - if (phxClick) { - this.requestDOMUpdate(() => this.execJS(target, phxClick, "click")); - } - }); - }, false); - } - maybeScroll(scroll) { - if (typeof scroll === "number") { - requestAnimationFrame(() => { - window.scrollTo(0, scroll); - }); - } - } - dispatchEvent(event, payload = {}) { - dom_default.dispatchEvent(window, `phx:${event}`, { detail: payload }); - } - dispatchEvents(events) { - events.forEach(([event, payload]) => this.dispatchEvent(event, payload)); - } - withPageLoading(info, callback) { - dom_default.dispatchEvent(window, "phx:page-loading-start", { detail: info }); - let done = () => dom_default.dispatchEvent(window, "phx:page-loading-stop", { detail: info }); - return callback ? callback(done) : done; - } - pushHistoryPatch(href, linkState, targetEl) { - if (!this.isConnected() || !this.main.isMain()) { - return browser_default.redirect(href); - } - this.withPageLoading({ to: href, kind: "patch" }, (done) => { - this.main.pushLinkPatch(href, targetEl, (linkRef) => { - this.historyPatch(href, linkState, linkRef); - done(); - }); - }); - } - historyPatch(href, linkState, linkRef = this.setPendingLink(href)) { - if (!this.commitPendingLink(linkRef)) { - return; - } - browser_default.pushState(linkState, { type: "patch", id: this.main.id }, href); - dom_default.dispatchEvent(window, "phx:navigate", { detail: { patch: true, href, pop: false } }); - this.registerNewLocation(window.location); - } - historyRedirect(href, linkState, flash) { - if (!this.isConnected() || !this.main.isMain()) { - return browser_default.redirect(href, flash); - } - if (/^\/$|^\/[^\/]+.*$/.test(href)) { - let { protocol, host } = window.location; - href = `${protocol}//${host}${href}`; - } - let scroll = window.scrollY; - this.withPageLoading({ to: href, kind: "redirect" }, (done) => { - this.replaceMain(href, flash, (linkRef) => { - if (linkRef === this.linkRef) { - browser_default.pushState(linkState, { type: "redirect", id: this.main.id, scroll }, href); - dom_default.dispatchEvent(window, "phx:navigate", { detail: { href, patch: false, pop: false } }); - this.registerNewLocation(window.location); - } - done(); - }); - }); - } - replaceRootHistory() { - browser_default.pushState("replace", { root: true, type: "patch", id: this.main.id }); - } - registerNewLocation(newLocation) { - let { pathname, search } = this.currentLocation; - if (pathname + search === newLocation.pathname + newLocation.search) { - return false; - } else { - this.currentLocation = clone(newLocation); - return true; - } - } - bindForms() { - let iterations = 0; - let externalFormSubmitted = false; - this.on("submit", (e) => { - let phxSubmit = e.target.getAttribute(this.binding("submit")); - let phxChange = e.target.getAttribute(this.binding("change")); - if (!externalFormSubmitted && phxChange && !phxSubmit) { - externalFormSubmitted = true; - e.preventDefault(); - this.withinOwners(e.target, (view) => { - view.disableForm(e.target); - window.requestAnimationFrame(() => { - if (dom_default.isUnloadableFormSubmit(e)) { - this.unload(); - } - e.target.submit(); - }); - }); - } - }, true); - this.on("submit", (e) => { - let phxEvent = e.target.getAttribute(this.binding("submit")); - if (!phxEvent) { - if (dom_default.isUnloadableFormSubmit(e)) { - this.unload(); - } - return; - } - e.preventDefault(); - e.target.disabled = true; - this.withinOwners(e.target, (view) => { - js_default.exec("submit", phxEvent, view, e.target, ["push", { submitter: e.submitter }]); - }); - }, false); - for (let type of ["change", "input"]) { - this.on(type, (e) => { - let phxChange = this.binding("change"); - let input = e.target; - let inputEvent = input.getAttribute(phxChange); - let formEvent = input.form && input.form.getAttribute(phxChange); - let phxEvent = inputEvent || formEvent; - if (!phxEvent) { - return; - } - if (input.type === "number" && input.validity && input.validity.badInput) { - return; - } - let dispatcher = inputEvent ? input : input.form; - let currentIterations = iterations; - iterations++; - let { at, type: lastType } = dom_default.private(input, "prev-iteration") || {}; - if (at === currentIterations - 1 && type === "change" && lastType === "input") { - return; - } - dom_default.putPrivate(input, "prev-iteration", { at: currentIterations, type }); - this.debounce(input, e, type, () => { - this.withinOwners(dispatcher, (view) => { - dom_default.putPrivate(input, PHX_HAS_FOCUSED, true); - if (!dom_default.isTextualInput(input)) { - this.setActiveElement(input); - } - js_default.exec("change", phxEvent, view, input, ["push", { _target: e.target.name, dispatcher }]); - }); - }); - }, false); - } - this.on("reset", (e) => { - let form = e.target; - dom_default.resetForm(form, this.binding(PHX_FEEDBACK_FOR), this.binding(PHX_FEEDBACK_GROUP)); - let input = Array.from(form.elements).find((el) => el.type === "reset"); - if (input) { - window.requestAnimationFrame(() => { - input.dispatchEvent(new Event("input", { bubbles: true, cancelable: false })); - }); - } - }); - } - debounce(el, event, eventType, callback) { - if (eventType === "blur" || eventType === "focusout") { - return callback(); - } - let phxDebounce = this.binding(PHX_DEBOUNCE); - let phxThrottle = this.binding(PHX_THROTTLE); - let defaultDebounce = this.defaults.debounce.toString(); - let defaultThrottle = this.defaults.throttle.toString(); - this.withinOwners(el, (view) => { - let asyncFilter = () => !view.isDestroyed() && document.body.contains(el); - dom_default.debounce(el, event, phxDebounce, defaultDebounce, phxThrottle, defaultThrottle, asyncFilter, () => { - callback(); - }); - }); - } - silenceEvents(callback) { - this.silenced = true; - callback(); - this.silenced = false; - } - on(event, callback) { - window.addEventListener(event, (e) => { - if (!this.silenced) { - callback(e); - } - }); - } - }; - var TransitionSet = class { - constructor() { - this.transitions = /* @__PURE__ */ new Set(); - this.pendingOps = []; - } - reset() { - this.transitions.forEach((timer) => { - clearTimeout(timer); - this.transitions.delete(timer); - }); - this.flushPendingOps(); - } - after(callback) { - if (this.size() === 0) { - callback(); - } else { - this.pushPendingOp(callback); - } - } - addTransition(time, onStart, onDone) { - onStart(); - let timer = setTimeout(() => { - this.transitions.delete(timer); - onDone(); - this.flushPendingOps(); - }, time); - this.transitions.add(timer); - } - pushPendingOp(op) { - this.pendingOps.push(op); - } - size() { - return this.transitions.size; - } - flushPendingOps() { - if (this.size() > 0) { - return; - } - let op = this.pendingOps.shift(); - if (op) { - op(); - this.flushPendingOps(); - } - } - }; - - // js/app.js - var socketPath = document.querySelector("html").getAttribute("phx-socket") || "/live"; - var csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content"); - var Hooks2 = {}; - var editors = {}; - Hooks2.JsonEditor = { - mounted() { - const inputId = this.el.getAttribute("data-input-id"); - const hook = this; - this.editor = new JSONEditor( - this.el, - { - onChangeText: (json2) => { - const target = document.getElementById(inputId); - try { - JSON.parse(json2); - target.value = json2; - target.dispatchEvent(new Event("change", { bubbles: true })); - } catch (_e) { - } - }, - onChange: () => { - try { - const target = document.getElementById(inputId); - json = hook.editor.get(); - target.value = JSON.stringify(json); - target.dispatchEvent(new Event("change", { bubbles: true })); - } catch (_e) { - } - }, - onModeChange: (newMode) => { - hook.mode = newMode; - }, - modes: ["text", "tree"] - }, - JSON.parse(document.getElementById(inputId).value) - ); - editors[this.el.id] = this.editor; - } - }; - Hooks2.JsonEditorSource = { - updated() { - try { - let editor = editors[this.el.getAttribute("data-editor-id")]; - if (editor.getMode() === "tree") { - editor.update(JSON.parse(this.el.value)); - } else { - if (editor.get() !== JSON.parse(this.el.value)) { - editor.setText(this.el.value); - } else { - } - } - } catch (_e) { - } - } - }; - Hooks2.JsonView = { - updated() { - const json2 = JSON.parse(this.el.getAttribute("data-json")); - this.editor = new JSONEditor( - this.el, - { - mode: "preview" - }, - json2 - ); - }, - mounted() { - const json2 = JSON.parse(this.el.getAttribute("data-json")); - this.editor = new JSONEditor( - this.el, - { - mode: "preview" - }, - json2 - ); - } - }; - var init = (element) => new EasyMDE({ - element, - initialValue: element.getAttribute("value") - }); - Hooks2.MarkdownEditor = { - mounted() { - const id = this.el.getAttribute("data-target-id"); - const el = document.getElementById(id); - const easyMDE = init(el); - easyMDE.codemirror.on("change", () => { - el.value = easyMDE.value(); - el.dispatchEvent(new Event("change", { bubbles: true })); - }); - } - }; - Hooks2.Actor = { - mounted() { - this.handleEvent("set_actor", (payload) => { - document.cookie = "actor_resource=" + payload.resource + ";path=/"; - document.cookie = "actor_primary_key=" + payload.primary_key + ";path=/"; - document.cookie = "actor_action=" + payload.action + ";path=/"; - document.cookie = "actor_domain=" + payload.domain + ";path=/"; - document.cookie = "actor_tenant=" + payload.tenant + ";path=/"; - }); - this.handleEvent("clear_actor", () => { - document.cookie = "actor_resource=;path=/"; - document.cookie = "actor_primary_key=;path=/"; - document.cookie = "actor_action=;path=/"; - document.cookie = "actor_tenant=;path=/"; - document.cookie = "actor_domain=;path=/"; - document.cookie = "actor_authorizing=false;path=/"; - document.cookie = "actor_paused=true;path=/"; - }); - this.handleEvent("toggle_authorizing", (payload) => { - document.cookie = "actor_authorizing=" + payload.authorizing + ";path=/"; - }); - this.handleEvent("toggle_actor_paused", (payload) => { - document.cookie = "actor_paused=" + payload.actor_paused + ";path=/"; - }); - } - }; - Hooks2.Tenant = { - mounted() { - this.handleEvent("set_tenant", (payload) => { - document.cookie = "tenant=" + payload.tenant + ";path=/"; - }); - this.handleEvent("clear_tenant", () => { - document.cookie = "tenant=;path=/"; - }); - } - }; - Hooks2.MaintainAttrs = { - attrs() { - return this.el.getAttribute("data-attrs").split(", "); - }, - beforeUpdate() { - this.prevAttrs = this.attrs().map((name) => [ - name, - this.el.getAttribute(name) - ]); - }, - updated() { - this.prevAttrs.forEach(([name, val]) => this.el.setAttribute(name, val)); - } - }; - function getCookie(name) { - var re = new RegExp(name + "=([^;]+)"); - var value = re.exec(document.cookie); - return value != null ? unescape(value[1]) : null; - } - var params = () => { - return { - _csrf_token: csrfToken, - tenant: getCookie("tenant"), - actor_resource: getCookie("actor_resource"), - actor_primary_key: getCookie("actor_primary_key"), - actor_tenant: getCookie("actor_tenant"), - actor_action: getCookie("actor_action"), - actor_domain: getCookie("actor_domain"), - actor_authorizing: getCookie("actor_authorizing"), - actor_paused: getCookie("actor_paused") - }; - }; - var liveSocket = new LiveSocket(socketPath, Socket, { - params, - hooks: Hooks2, - dom: { - onBeforeElUpdated(from, to) { - if (from._x_dataStack) { - window.Alpine.clone(from, to); - } - } - } - }); - import_topbar.default.config({ barColors: { 0: "#29d" }, shadowColor: "rgba(0, 0, 0, .3)" }); - window.addEventListener("phx:page-loading-start", (_info) => import_topbar.default.show(300)); - window.addEventListener("phx:page-loading-stop", (_info) => import_topbar.default.hide()); - liveSocket.connect(); - liveSocket.enableDebug(); - window.liveSocket = liveSocket; -})(); + `);this.socket=new t(e,i),this.bindingPrefix=i.bindingPrefix||Ki,this.opts=i,this.params=Ce(i.params||{}),this.viewLogger=i.viewLogger,this.metadataCallbacks=i.metadata||{},this.defaults=Object.assign(We(Yi),i.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.outgoingMainEl=null,this.clickStartedAtTarget=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=We(window.location),this.hooks=i.hooks||{},this.uploaders=i.uploaders||{},this.loaderTimeout=i.loaderTimeout||Wi,this.reloadWithJitterTimer=null,this.maxReloads=i.maxReloads||Di,this.reloadJitterMin=i.reloadJitterMin||Hi,this.reloadJitterMax=i.reloadJitterMax||Fi,this.failsafeJitter=i.failsafeJitter||Ni,this.localStorage=i.localStorage||window.localStorage,this.sessionStorage=i.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.serverCloseRef=null,this.domCallbacks=Object.assign({onPatchStart:Ce(),onPatchEnd:Ce(),onNodeAdded:Ce(),onBeforeElUpdated:Ce()},i.dom||{}),this.transitions=new _s,window.addEventListener("pagehide",s=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}version(){return"0.20.17"}isProfileEnabled(){return this.sessionStorage.getItem(dt)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(Ue)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(Ue)==="false"}enableDebug(){this.sessionStorage.setItem(Ue,"true")}enableProfiling(){this.sessionStorage.setItem(dt,"true")}disableDebug(){this.sessionStorage.setItem(Ue,"false")}disableProfiling(){this.sessionStorage.removeItem(dt)}enableLatencySim(e){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(ct,e)}disableLatencySim(){this.sessionStorage.removeItem(ct)}getLatencySim(){let e=this.sessionStorage.getItem(ct);return e?parseInt(e):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let e=()=>{this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?e():document.addEventListener("DOMContentLoaded",()=>e())}disconnect(e){clearTimeout(this.reloadWithJitterTimer),this.serverCloseRef&&(this.socket.off(this.serverCloseRef),this.serverCloseRef=null),this.socket.disconnect(e)}replaceTransport(e){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(e),this.connect()}execJS(e,t,i=null){this.owner(e,s=>O.exec(i,t,s,e))}execJSHookPush(e,t,i,s){this.withinOwners(e,n=>{O.exec("hook",t,n,e,["push",{data:i,callback:s}])})}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(e,t){this.domCallbacks[e](...t)}time(e,t){if(!this.isProfileEnabled()||!console.time)return t();console.time(e);let i=t();return console.timeEnd(e),i}log(e,t,i){if(this.viewLogger){let[s,n]=i();this.viewLogger(e,t,s,n)}else if(this.isDebugEnabled()){let[s,n]=i();ts(e,t,s,n)}}requestDOMUpdate(e){this.transitions.after(e)}transition(e,t,i=function(){}){this.transitions.addTransition(e,t,i)}onChannel(e,t,i){e.on(t,s=>{let n=this.getLatencySim();n?setTimeout(()=>i(s),n):i(s)})}wrapPush(e,t,i){let s=this.getLatencySim(),n=e.joinCount;if(!s)return this.isConnected()&&t.timeout?i().receive("timeout",()=>{e.joinCount===n&&!e.isDestroyed()&&this.reloadWithJitter(e,()=>{this.log(e,"timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}):i();let r={receives:[],receive(o,a){this.receives.push([o,a])}};return setTimeout(()=>{e.isDestroyed()||r.receives.reduce((o,[a,l])=>o.receive(a,l),i())},s),r}reloadWithJitter(e,t){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let i=this.reloadJitterMin,s=this.reloadJitterMax,n=Math.floor(Math.random()*(s-i+1))+i,r=V.updateLocal(this.localStorage,window.location.pathname,ri,0,o=>o+1);r>this.maxReloads&&(n=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{e.isDestroyed()||e.isConnected()||(e.destroy(),t?t():this.log(e,"join",()=>[`encountered ${r} consecutive reloads`]),r>this.maxReloads&&this.log(e,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},n)}getHookCallbacks(e){return e&&e.startsWith("Phoenix.")?hs[e.split(".")[1]]:this.hooks[e]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(e){return`${this.getBindingPrefix()}${e}`}channel(e,t){return this.socket.channel(e,t)}joinDeadView(){let e=document.body;if(e&&!this.isPhxView(e)&&!this.isPhxView(document.firstElementChild)){let t=this.newRootView(e);t.setHref(this.getHref()),t.joinDead(),this.main||(this.main=t),window.requestAnimationFrame(()=>t.execNewMounted())}}joinRootViews(){let e=!1;return d.all(document,`${ve}:not([${he}])`,t=>{if(!this.getRootById(t.id)){let i=this.newRootView(t);i.setHref(this.getHref()),i.join(),t.hasAttribute(wt)&&(this.main=i)}e=!0}),e}redirect(e,t){this.unload(),V.redirect(e,t)}replaceMain(e,t,i=null,s=this.setPendingLink(e)){let n=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let r=d.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(r,t,n),this.main.setRedirect(e),this.transitionRemoves(null,!0),this.main.join((o,a)=>{o===1&&this.commitPendingLink(s)&&this.requestDOMUpdate(()=>{d.findPhxSticky(document).forEach(l=>r.appendChild(l)),this.outgoingMainEl.replaceWith(r),this.outgoingMainEl=null,i&&i(s),a()})})}transitionRemoves(e,t){let i=this.binding("remove");if(e=e||d.all(document,`[${i}]`),t){let s=d.findPhxSticky(document)||[];e=e.filter(n=>!d.isChildOfAny(n,s))}e.forEach(s=>{this.execJS(s,s.getAttribute(i),"remove")})}isPhxView(e){return e.getAttribute&&e.getAttribute(Y)!==null}newRootView(e,t,i){let s=new pi(e,this,null,t,i);return this.roots[s.id]=s,s}owner(e,t){let i=ie(e.closest(ve),s=>this.getViewByEl(s))||this.main;i&&t(i)}withinOwners(e,t){this.owner(e,i=>t(i,e))}getViewByEl(e){let t=e.getAttribute(de);return ie(this.getRootById(t),i=>i.getDescendentByEl(e))}getRootById(e){return this.roots[e]}destroyAllViews(){for(let e in this.roots)this.roots[e].destroy(),delete this.roots[e];this.main=null}destroyViewByEl(e){let t=this.getRootById(e.getAttribute(de));t&&t.id===e.id?(t.destroy(),delete this.roots[t.id]):t&&t.destroyDescendent(e.id)}setActiveElement(e){if(this.activeElement===e)return;this.activeElement=e;let t=()=>{e===this.activeElement&&(this.activeElement=null),e.removeEventListener("mouseup",this),e.removeEventListener("touchend",this)};e.addEventListener("mouseup",t),e.addEventListener("touchend",t)}getActiveElement(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}dropActiveElement(e){this.prevActive&&e.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:e}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.serverCloseRef=this.socket.onClose(t=>{if(t&&t.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",t=>{t.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),e||this.bindNav(),this.bindClicks(),e||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(t,i,s,n,r,o)=>{let a=n.getAttribute(this.binding(qi)),l=t.key&&t.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let h=U({key:t.key},this.eventMeta(i,t,n));O.exec(i,r,s,n,["push",{data:h}])}),this.bind({blur:"focusout",focus:"focusin"},(t,i,s,n,r,o)=>{if(!o){let a=U({key:t.key},this.eventMeta(i,t,n));O.exec(i,r,s,n,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(t,i,s,n,r,o)=>{if(o==="window"){let a=this.eventMeta(i,t,n);O.exec(i,r,s,n,["push",{data:a}])}}),window.addEventListener("dragover",t=>t.preventDefault()),window.addEventListener("drop",t=>{t.preventDefault();let i=ie(Pe(t.target,this.binding(Ot)),r=>r.getAttribute(this.binding(Ot))),s=i&&document.getElementById(i),n=Array.from(t.dataTransfer.files||[]);!s||s.disabled||n.length===0||!(s.files instanceof FileList)||(_.trackFiles(s,n,t.dataTransfer),s.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(ai,t=>{let i=t.target;if(!d.isUploadInput(i))return;let s=Array.from(t.detail.files||[]).filter(n=>n instanceof File||n instanceof Blob);_.trackFiles(i,s),i.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(e,t,i){let s=this.metadataCallbacks[e];return s?s(t,i):{}}setPendingLink(e){return this.linkRef++,this.pendingLink=e,this.linkRef}commitPendingLink(e){return this.linkRef!==e?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(e,t){for(let i in e){let s=e[i];this.on(s,n=>{let r=this.binding(i),o=this.binding(`window-${i}`),a=n.target.getAttribute&&n.target.getAttribute(r);a?this.debounce(n.target,n,s,()=>{this.withinOwners(n.target,l=>{t(n,i,l,n.target,a,null)})}):d.all(document,`[${o}]`,l=>{let h=l.getAttribute(o);this.debounce(l,n,s,()=>{this.withinOwners(l,c=>{t(n,i,c,l,h,"window")})})})})}}bindClicks(){window.addEventListener("mousedown",e=>this.clickStartedAtTarget=e.target),this.bindClick("click","click")}bindClick(e,t){let i=this.binding(t);window.addEventListener(e,s=>{let n=null;s.detail===0&&(this.clickStartedAtTarget=s.target);let r=this.clickStartedAtTarget||s.target;n=Pe(r,i),this.dispatchClickAway(s,r),this.clickStartedAtTarget=null;let o=n&&n.getAttribute(i);if(!o){d.isNewPageClick(s,window.location)&&this.unload();return}n.getAttribute("href")==="#"&&s.preventDefault(),!n.hasAttribute(N)&&this.debounce(n,s,"click",()=>{this.withinOwners(n,a=>{O.exec("click",o,a,n,["push",{data:this.eventMeta("click",s,n)}])})})},!1)}dispatchClickAway(e,t){let i=this.binding("click-away");d.all(document,`[${i}]`,s=>{s.isSameNode(t)||s.contains(t)||this.withinOwners(s,n=>{let r=s.getAttribute(i);O.isVisible(s)&&O.isInViewport(s)&&O.exec("click",r,n,s,["push",{data:this.eventMeta("click",e,e.target)}])})})}bindNav(){if(!V.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let e=null;window.addEventListener("scroll",t=>{clearTimeout(e),e=setTimeout(()=>{V.updateCurrentState(i=>Object.assign(i,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",t=>{if(!this.registerNewLocation(window.location))return;let{type:i,id:s,root:n,scroll:r}=t.state||{},o=window.location.href;d.dispatchEvent(window,"phx:navigate",{detail:{href:o,patch:i==="patch",pop:!0}}),this.requestDOMUpdate(()=>{this.main.isConnected()&&i==="patch"&&s===this.main.id?this.main.pushLinkPatch(o,null,()=>{this.maybeScroll(r)}):this.replaceMain(o,null,()=>{n&&this.replaceRootHistory(),this.maybeScroll(r)})})},!1),window.addEventListener("click",t=>{let i=Pe(t.target,rt),s=i&&i.getAttribute(rt);if(!s||!this.isConnected()||!this.main||d.wantsNewTab(t))return;let n=i.href instanceof SVGAnimatedString?i.href.baseVal:i.href,r=i.getAttribute($i);t.preventDefault(),t.stopImmediatePropagation(),this.pendingLink!==n&&this.requestDOMUpdate(()=>{if(s==="patch")this.pushHistoryPatch(n,r,i);else if(s==="redirect")this.historyRedirect(n,r);else throw new Error(`expected ${rt} to be "patch" or "redirect", got: ${s}`);let o=i.getAttribute(this.binding("click"));o&&this.requestDOMUpdate(()=>this.execJS(i,o,"click"))})},!1)}maybeScroll(e){typeof e=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,e)})}dispatchEvent(e,t={}){d.dispatchEvent(window,`phx:${e}`,{detail:t})}dispatchEvents(e){e.forEach(([t,i])=>this.dispatchEvent(t,i))}withPageLoading(e,t){d.dispatchEvent(window,"phx:page-loading-start",{detail:e});let i=()=>d.dispatchEvent(window,"phx:page-loading-stop",{detail:e});return t?t(i):i}pushHistoryPatch(e,t,i){if(!this.isConnected()||!this.main.isMain())return V.redirect(e);this.withPageLoading({to:e,kind:"patch"},s=>{this.main.pushLinkPatch(e,i,n=>{this.historyPatch(e,t,n),s()})})}historyPatch(e,t,i=this.setPendingLink(e)){this.commitPendingLink(i)&&(V.pushState(t,{type:"patch",id:this.main.id},e),d.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:e,pop:!1}}),this.registerNewLocation(window.location))}historyRedirect(e,t,i){if(!this.isConnected()||!this.main.isMain())return V.redirect(e,i);if(/^\/$|^\/[^\/]+.*$/.test(e)){let{protocol:n,host:r}=window.location;e=`${n}//${r}${e}`}let s=window.scrollY;this.withPageLoading({to:e,kind:"redirect"},n=>{this.replaceMain(e,i,r=>{r===this.linkRef&&(V.pushState(t,{type:"redirect",id:this.main.id,scroll:s},e),d.dispatchEvent(window,"phx:navigate",{detail:{href:e,patch:!1,pop:!1}}),this.registerNewLocation(window.location)),n()})})}replaceRootHistory(){V.pushState("replace",{root:!0,type:"patch",id:this.main.id})}registerNewLocation(e){let{pathname:t,search:i}=this.currentLocation;return t+i===e.pathname+e.search?!1:(this.currentLocation=We(e),!0)}bindForms(){let e=0,t=!1;this.on("submit",i=>{let s=i.target.getAttribute(this.binding("submit")),n=i.target.getAttribute(this.binding("change"));!t&&n&&!s&&(t=!0,i.preventDefault(),this.withinOwners(i.target,r=>{r.disableForm(i.target),window.requestAnimationFrame(()=>{d.isUnloadableFormSubmit(i)&&this.unload(),i.target.submit()})}))},!0),this.on("submit",i=>{let s=i.target.getAttribute(this.binding("submit"));if(!s){d.isUnloadableFormSubmit(i)&&this.unload();return}i.preventDefault(),i.target.disabled=!0,this.withinOwners(i.target,n=>{O.exec("submit",s,n,i.target,["push",{submitter:i.submitter}])})},!1);for(let i of["change","input"])this.on(i,s=>{let n=this.binding("change"),r=s.target,o=r.getAttribute(n),a=r.form&&r.form.getAttribute(n),l=o||a;if(!l||r.type==="number"&&r.validity&&r.validity.badInput)return;let h=o?r:r.form,c=e;e++;let{at:g,type:p}=d.private(r,"prev-iteration")||{};g===c-1&&i==="change"&&p==="input"||(d.putPrivate(r,"prev-iteration",{at:c,type:i}),this.debounce(r,s,i,()=>{this.withinOwners(h,f=>{d.putPrivate(r,vt,!0),d.isTextualInput(r)||this.setActiveElement(r),O.exec("change",l,f,r,["push",{_target:s.target.name,dispatcher:h}])})}))},!1);this.on("reset",i=>{let s=i.target;d.resetForm(s,this.binding(ze),this.binding(Ke));let n=Array.from(s.elements).find(r=>r.type==="reset");n&&window.requestAnimationFrame(()=>{n.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(e,t,i,s){if(i==="blur"||i==="focusout")return s();let n=this.binding(Ji),r=this.binding(Vi),o=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(e,l=>{let h=()=>!l.isDestroyed()&&document.body.contains(e);d.debounce(e,t,n,o,r,a,h,()=>{s()})})}silenceEvents(e){this.silenced=!0,e(),this.silenced=!1}on(e,t){window.addEventListener(e,i=>{this.silenced||t(i)})}},_s=class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(e=>{clearTimeout(e),this.transitions.delete(e)}),this.flushPendingOps()}after(e){this.size()===0?e():this.pushPendingOp(e)}addTransition(e,t,i){t();let s=setTimeout(()=>{this.transitions.delete(s),i(),this.flushPendingOps()},e);this.transitions.add(s)}pushPendingOp(e){this.pendingOps.push(e)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let e=this.pendingOps.shift();e&&(e(),this.flushPendingOps())}};var Rs=document.querySelector("html").getAttribute("phx-socket")||"/live",Ps=document.querySelector("meta[name='csrf-token']").getAttribute("content"),ne={},gi={};ne.JsonEditor={mounted(){let e=this.el.getAttribute("data-input-id"),t=this;this.editor=new JSONEditor(this.el,{onChangeText:i=>{let s=document.getElementById(e);try{JSON.parse(i),s.value=i,s.dispatchEvent(new Event("change",{bubbles:!0,target:this.el.name}))}catch(n){}},onChange:()=>{try{let i=document.getElementById(e);json=t.editor.get(),i.value=JSON.stringify(json),i.dispatchEvent(new Event("change",{bubbles:!0,target:this.el.name}))}catch(i){}},onModeChange:i=>{t.mode=i},modes:["text","tree"]},JSON.parse(document.getElementById(e).value)),gi[this.el.id]=this.editor}};ne.JsonEditorSource={updated(){try{let e=gi[this.el.getAttribute("data-editor-id")];e.getMode()==="tree"?e.update(JSON.parse(this.el.value)):e.get()!==JSON.parse(this.el.value)&&e.setText(this.el.value)}catch(e){}}};ne.JsonView={mounted(){let e=JSON.parse(this.el.getAttribute("data-json"));this.editor=new JSONEditor(this.el,{mode:"preview"},e)}};var xs=e=>new EasyMDE({element:e,initialValue:e.getAttribute("value")});ne.MarkdownEditor={mounted(){let e=this.el.getAttribute("data-target-id"),t=document.getElementById(e),i=xs(t);i.codemirror.on("change",()=>{t.value=i.value(),t.dispatchEvent(new Event("change",{bubbles:!0}))})}};ne.Actor={mounted(){this.handleEvent("set_actor",e=>{document.cookie="actor_resource="+e.resource+";path=/",document.cookie="actor_primary_key="+e.primary_key+";path=/",document.cookie="actor_action="+e.action+";path=/",document.cookie="actor_domain="+e.domain+";path=/",document.cookie="actor_tenant="+e.tenant+";path=/"}),this.handleEvent("clear_actor",()=>{document.cookie="actor_resource=;path=/",document.cookie="actor_primary_key=;path=/",document.cookie="actor_action=;path=/",document.cookie="actor_tenant=;path=/",document.cookie="actor_domain=;path=/",document.cookie="actor_authorizing=false;path=/",document.cookie="actor_paused=true;path=/"}),this.handleEvent("toggle_authorizing",e=>{document.cookie="actor_authorizing="+e.authorizing+";path=/"}),this.handleEvent("toggle_actor_paused",e=>{document.cookie="actor_paused="+e.actor_paused+";path=/"})}};ne.Tenant={mounted(){this.handleEvent("set_tenant",e=>{document.cookie="tenant="+e.tenant+";path=/"}),this.handleEvent("clear_tenant",()=>{document.cookie="tenant=;path=/"})}};ne.MaintainAttrs={attrs(){return this.el.getAttribute("data-attrs").split(", ")},beforeUpdate(){this.prevAttrs=this.attrs().map(e=>[e,this.el.getAttribute(e)])},updated(){this.prevAttrs.forEach(([e,t])=>this.el.setAttribute(e,t))}};function se(e){var t=new RegExp(e+"=([^;]+)"),i=t.exec(document.cookie);return i!=null?unescape(i[1]):null}var Is=()=>({_csrf_token:Ps,tenant:se("tenant"),actor_resource:se("actor_resource"),actor_primary_key:se("actor_primary_key"),actor_tenant:se("actor_tenant"),actor_action:se("actor_action"),actor_domain:se("actor_domain"),actor_authorizing:se("actor_authorizing"),actor_paused:se("actor_paused")}),St=new mi(Rs,xt,{params:Is,hooks:ne,dom:{onBeforeElUpdated(e,t){e._x_dataStack&&window.Alpine.clone(e,t)}}});Qe.default.config({barColors:{0:"#29d"},shadowColor:"rgba(0, 0, 0, .3)"});window.addEventListener("phx:page-loading-start",e=>Qe.default.show(300));window.addEventListener("phx:page-loading-stop",e=>Qe.default.hide());St.connect();St.enableDebug();window.liveSocket=St;})(); /** * @license MIT * topbar 2.0.0, 2023-02-04 diff --git a/priv/static/assets/app.js.gz b/priv/static/assets/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