@lattice-php/lattice 0.30.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action/components/action-form.js +26 -25
- package/dist/action/components/action-form.js.map +1 -1
- package/dist/action/components/action-group.js.map +1 -1
- package/dist/action/components/action-trigger-provider.js.map +1 -1
- package/dist/action/components/action.js.map +1 -1
- package/dist/action/lib/run-action.js +2 -1
- package/dist/action/lib/run-action.js.map +1 -1
- package/dist/appearance/index.js.map +1 -1
- package/dist/chat/components/chat-box.js +4 -2
- package/dist/chat/components/chat-box.js.map +1 -1
- package/dist/chat/components/message-list.js.map +1 -1
- package/dist/chat/components/message.js.map +1 -1
- package/dist/chat/components/prompt-input.js.map +1 -1
- package/dist/chat/hooks/use-chat.js +2 -1
- package/dist/chat/hooks/use-chat.js.map +1 -1
- package/dist/chat/lib/transport.js.map +1 -1
- package/dist/chat/parts/text.js.map +1 -1
- package/dist/chat/parts/tool-call.js.map +1 -1
- package/dist/core/api.js.map +1 -1
- package/dist/core/event-names.d.ts +1 -0
- package/dist/core/event-names.js +1 -0
- package/dist/core/event-names.js.map +1 -1
- package/dist/core/hooks/column-sizing.js.map +1 -1
- package/dist/core/hooks/use-column-resizing.js.map +1 -1
- package/dist/core/materialize.js.map +1 -1
- package/dist/core/registry-context.js.map +1 -1
- package/dist/core/renderer.js +2 -1
- package/dist/core/renderer.js.map +1 -1
- package/dist/core/test-id.js.map +1 -1
- package/dist/core/upload.js.map +1 -1
- package/dist/create-app.js +1 -1
- package/dist/create-app.js.map +1 -1
- package/dist/effects/registry.js +2 -1
- package/dist/effects/registry.js.map +1 -1
- package/dist/form/components/base/field.js.map +1 -1
- package/dist/form/components/base/submit-button.js.map +1 -1
- package/dist/form/components/fields/add-row-menu.js.map +1 -1
- package/dist/form/components/fields/builder.js +2 -1
- package/dist/form/components/fields/builder.js.map +1 -1
- package/dist/form/components/fields/checkbox.js.map +1 -1
- package/dist/form/components/fields/choice.js.map +1 -1
- package/dist/form/components/fields/color-picker-field.js.map +1 -1
- package/dist/form/components/fields/date-input.js.map +1 -1
- package/dist/form/components/fields/date-picker-field.js.map +1 -1
- package/dist/form/components/fields/date-picker-value.js.map +1 -1
- package/dist/form/components/fields/date-picker.js.map +1 -1
- package/dist/form/components/fields/date-time-input.js.map +1 -1
- package/dist/form/components/fields/file-upload.js +3 -2
- package/dist/form/components/fields/file-upload.js.map +1 -1
- package/dist/form/components/fields/number-input.js.map +1 -1
- package/dist/form/components/fields/otp-input.js.map +1 -1
- package/dist/form/components/fields/password-input.js.map +1 -1
- package/dist/form/components/fields/repeater.js +2 -1
- package/dist/form/components/fields/repeater.js.map +1 -1
- package/dist/form/components/fields/rich-editor-field.js +6 -5
- package/dist/form/components/fields/rich-editor-field.js.map +1 -1
- package/dist/form/components/fields/rich-editor.js.map +1 -1
- package/dist/form/components/fields/row-action-menu.js.map +1 -1
- package/dist/form/components/fields/row-actions.js.map +1 -1
- package/dist/form/components/fields/row-item.js.map +1 -1
- package/dist/form/components/fields/row-templates.js.map +1 -1
- package/dist/form/components/fields/select.js.map +1 -1
- package/dist/form/components/fields/simple-field.js.map +1 -1
- package/dist/form/components/fields/table-rows.js.map +1 -1
- package/dist/form/components/fields/text-input.js.map +1 -1
- package/dist/form/components/fields/textarea.js.map +1 -1
- package/dist/form/components/fields/time-input.js.map +1 -1
- package/dist/form/components/fields/time-picker-columns.js.map +1 -1
- package/dist/form/components/fields/time-picker.js +0 -1
- package/dist/form/components/fields/time-picker.js.map +1 -1
- package/dist/form/components/fields/toggle.js.map +1 -1
- package/dist/form/components/fields/use-flip-reorder.js.map +1 -1
- package/dist/form/components/form.js +7 -5
- package/dist/form/components/form.js.map +1 -1
- package/dist/form/components/wizard.js +1 -1
- package/dist/form/components/wizard.js.map +1 -1
- package/dist/form/hooks/resolved-nodes.js.map +1 -1
- package/dist/form/hooks/use-dependent-field.js +2 -1
- package/dist/form/hooks/use-dependent-field.js.map +1 -1
- package/dist/form/hooks/use-form-resolver.js +2 -1
- package/dist/form/hooks/use-form-resolver.js.map +1 -1
- package/dist/form/hooks/values.js +2 -1
- package/dist/form/hooks/values.js.map +1 -1
- package/dist/form/lib/conditions.js +1 -1
- package/dist/form/lib/conditions.js.map +1 -1
- package/dist/form/lib/field-dom-name.js.map +1 -1
- package/dist/form/lib/field-props.js +1 -1
- package/dist/form/lib/field-props.js.map +1 -1
- package/dist/form/lib/form-path.js.map +1 -1
- package/dist/form/lib/form-transport.js.map +1 -1
- package/dist/form/lib/prefill-targets.js.map +1 -1
- package/dist/form/lib/wizard-steps.js.map +1 -1
- package/dist/form/rich-editor/builtins.js.map +1 -1
- package/dist/format/date-time.d.ts +1 -0
- package/dist/format/date-time.js +5 -1
- package/dist/format/date-time.js.map +1 -1
- package/dist/format/number.js.map +1 -1
- package/dist/i18n/config.js.map +1 -1
- package/dist/i18n/date-time-formatter.d.ts +13 -0
- package/dist/i18n/date-time-formatter.js +28 -0
- package/dist/i18n/date-time-formatter.js.map +1 -0
- package/dist/i18n/date-time.js +1 -1
- package/dist/i18n/date-time.js.map +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +2 -0
- package/dist/i18n/instance.js.map +1 -1
- package/dist/i18n/locale.js +1 -1
- package/dist/i18n/locale.js.map +1 -1
- package/dist/i18n/timezone.js.map +1 -1
- package/dist/i18n/translatable.js.map +1 -1
- package/dist/icons/icon-renderer.js.map +1 -1
- package/dist/icons/sprite.js.map +1 -1
- package/dist/layout/components/breadcrumbs.js.map +1 -1
- package/dist/layout/components/callouts.d.ts +2 -1
- package/dist/layout/components/callouts.js +6 -2
- package/dist/layout/components/callouts.js.map +1 -1
- package/dist/layout/components/dropdown.js.map +1 -1
- package/dist/layout/components/menu-item.js.map +1 -1
- package/dist/layout/components/menu.js.map +1 -1
- package/dist/layout/components/popover.js.map +1 -1
- package/dist/layout/components/schema-layout.js.map +1 -1
- package/dist/layout/components/sidebar.js.map +1 -1
- package/dist/lib/color.js +1 -1
- package/dist/lib/color.js.map +1 -1
- package/dist/lib/use-media-query.js.map +1 -1
- package/dist/notifications/components/empty-state.js.map +1 -1
- package/dist/notifications/components/notification-item.js.map +1 -1
- package/dist/notifications/components/notification-list.js.map +1 -1
- package/dist/notifications/components/notifications.js.map +1 -1
- package/dist/notifications/store.js.map +1 -1
- package/dist/page.js.map +1 -1
- package/dist/provider-base.js.map +1 -1
- package/dist/realtime/listeners.js.map +1 -1
- package/dist/remote/components/data-list.js.map +1 -1
- package/dist/table/components/bulk-bar.js.map +1 -1
- package/dist/table/components/cells/badge-cell.js.map +1 -1
- package/dist/table/components/cells/boolean-cell.js.map +1 -1
- package/dist/table/components/cells/icon-cell.js.map +1 -1
- package/dist/table/components/cells/numeric-cell.js.map +1 -1
- package/dist/table/components/cells/stack-cell.js.map +1 -1
- package/dist/table/components/cells/text-cell.js.map +1 -1
- package/dist/table/components/column-filter-control.js.map +1 -1
- package/dist/table/components/column-header.js.map +1 -1
- package/dist/table/components/column-visibility-menu.js +2 -1
- package/dist/table/components/column-visibility-menu.js.map +1 -1
- package/dist/table/components/filter-bar.js +2 -1
- package/dist/table/components/filter-bar.js.map +1 -1
- package/dist/table/components/filter-controls.js +6 -5
- package/dist/table/components/filter-controls.js.map +1 -1
- package/dist/table/components/filter-value-input.js.map +1 -1
- package/dist/table/components/pagination.d.ts +5 -1
- package/dist/table/components/pagination.js +25 -6
- package/dist/table/components/pagination.js.map +1 -1
- package/dist/table/components/sort-bar.js.map +1 -1
- package/dist/table/components/table-cell.js +2 -1
- package/dist/table/components/table-cell.js.map +1 -1
- package/dist/table/components/table-search.js.map +1 -1
- package/dist/table/components/table.js +6 -2
- package/dist/table/components/table.js.map +1 -1
- package/dist/table/hooks/use-column-visibility.js.map +1 -1
- package/dist/table/hooks/use-table-selection.js +2 -1
- package/dist/table/hooks/use-table-selection.js.map +1 -1
- package/dist/table/hooks/use-table.d.ts +2 -0
- package/dist/table/hooks/use-table.js +12 -0
- package/dist/table/hooks/use-table.js.map +1 -1
- package/dist/table/lib/bulk.js.map +1 -1
- package/dist/table/lib/filter-values.js.map +1 -1
- package/dist/table/lib/format.js.map +1 -1
- package/dist/table/lib/payload.d.ts +2 -0
- package/dist/table/lib/payload.js +18 -3
- package/dist/table/lib/payload.js.map +1 -1
- package/dist/table/lib/query.js +2 -1
- package/dist/table/lib/query.js.map +1 -1
- package/dist/toast/callout.d.ts +1 -0
- package/dist/toast/callout.js +9 -1
- package/dist/toast/callout.js.map +1 -1
- package/dist/toast/index.d.ts +1 -1
- package/dist/toast/index.js +2 -2
- package/dist/toast/toaster.js.map +1 -1
- package/dist/types/generated.d.ts +9 -1
- package/dist/ui/affix-group.js.map +1 -1
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/badge.js.map +1 -1
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/chart-view.js.map +1 -1
- package/dist/ui/chart.js.map +1 -1
- package/dist/ui/checkbox.js.map +1 -1
- package/dist/ui/collapsible.js.map +1 -1
- package/dist/ui/color-picker.js.map +1 -1
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/confirm-dialog.js.map +1 -1
- package/dist/ui/copyable-text.js.map +1 -1
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/floating-panel.js.map +1 -1
- package/dist/ui/fragment.js +2 -1
- package/dist/ui/fragment.js.map +1 -1
- package/dist/ui/heading.js.map +1 -1
- package/dist/ui/icon-button.js.map +1 -1
- package/dist/ui/icon.js.map +1 -1
- package/dist/ui/image-preview.js.map +1 -1
- package/dist/ui/info-tooltip.js.map +1 -1
- package/dist/ui/input-error.js.map +1 -1
- package/dist/ui/input-otp.js.map +1 -1
- package/dist/ui/link.js.map +1 -1
- package/dist/ui/modal.js.map +1 -1
- package/dist/ui/password-input.js.map +1 -1
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/section.js +4 -2
- package/dist/ui/section.js.map +1 -1
- package/dist/ui/segmented-control.js.map +1 -1
- package/dist/ui/segmented-pills.js.map +1 -1
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/text.js.map +1 -1
- package/dist/ui/tooltip.js.map +1 -1
- package/dist/vite-typescript-refresh.js.map +1 -1
- package/dist/vite.js.map +1 -1
- package/dist-standalone/chunks/chart-view-ZCTbih8A.js +59 -0
- package/dist-standalone/chunks/date-picker-field-CCnkf4SC.js +1 -0
- package/dist-standalone/chunks/dist-CK9gk4iB.js +1 -0
- package/dist-standalone/chunks/dist-DqlcM-vw.js +2 -0
- package/dist-standalone/chunks/icon-button-DcP25cn4.js +41 -0
- package/dist-standalone/chunks/instance-t58Awajh.js +1 -0
- package/dist-standalone/chunks/jsx-runtime-CN5ucv1d.js +1 -0
- package/dist-standalone/chunks/locale-CgtcxthU.js +1 -0
- package/dist-standalone/chunks/materialize-CWqnSEHR.js +1 -0
- package/dist-standalone/chunks/{notifications-echo-DsfNc4Ge.js → notifications-echo-uU87iJAV.js} +1 -1
- package/dist-standalone/chunks/number-BvVKQqOG.js +1 -0
- package/dist-standalone/chunks/page-props-B4GewgLI.js +1 -0
- package/dist-standalone/chunks/react-SIfiwpqq.js +1 -0
- package/dist-standalone/chunks/rich-editor-field-BtbU5XFS.js +158 -0
- package/dist-standalone/chunks/shared-props-B_wT1GcG.js +1 -0
- package/dist-standalone/chunks/subscriptions-BdHDnVA3.js +1 -0
- package/dist-standalone/chunks/time-picker-DSs9fDWe.js +1 -0
- package/dist-standalone/chunks/timezone-BukvzD0d.js +1 -0
- package/dist-standalone/chunks/translatable-DLw4h3x8.js +1 -0
- package/dist-standalone/chunks/use-effect-dispatcher-CiWYRvsF.js +97 -0
- package/dist-standalone/chunks/{with-selector-BwDoCrJJ.js → with-selector-zFUY-tQj.js} +1 -1
- package/dist-standalone/lattice.css +2 -2
- package/dist-standalone/lattice.js +4 -48
- package/dist-standalone/manifest.json +24 -15
- package/dist-standalone/sprite.svg +1 -1
- package/package.json +6 -6
- package/resources/icons/align-center.svg +1 -1
- package/resources/icons/align-justify.svg +1 -1
- package/resources/icons/align-left.svg +1 -1
- package/resources/icons/align-right.svg +1 -1
- package/resources/icons/arrow-down.svg +1 -1
- package/resources/icons/arrow-up.svg +1 -1
- package/resources/icons/bell.svg +1 -1
- package/resources/icons/bold.svg +1 -1
- package/resources/icons/calendar.svg +5 -5
- package/resources/icons/check.svg +1 -1
- package/resources/icons/chevron-down.svg +1 -1
- package/resources/icons/chevron-left.svg +1 -1
- package/resources/icons/chevron-right.svg +1 -1
- package/resources/icons/chevrons-up-down.svg +1 -1
- package/resources/icons/circle-alert.svg +1 -1
- package/resources/icons/circle-check.svg +1 -1
- package/resources/icons/circle-help.svg +1 -1
- package/resources/icons/circle-x.svg +1 -1
- package/resources/icons/clock.svg +1 -1
- package/resources/icons/code-xml.svg +1 -1
- package/resources/icons/code.svg +1 -1
- package/resources/icons/columns-3.svg +1 -1
- package/resources/icons/copy.svg +1 -1
- package/resources/icons/external-link.svg +1 -1
- package/resources/icons/eye-off.svg +1 -1
- package/resources/icons/eye.svg +1 -1
- package/resources/icons/filter.svg +1 -1
- package/resources/icons/heading-1.svg +1 -1
- package/resources/icons/heading-2.svg +1 -1
- package/resources/icons/heading-3.svg +1 -1
- package/resources/icons/heading.svg +1 -1
- package/resources/icons/highlighter.svg +1 -1
- package/resources/icons/info.svg +1 -1
- package/resources/icons/italic.svg +1 -1
- package/resources/icons/layout-dashboard.svg +1 -1
- package/resources/icons/link.svg +1 -1
- package/resources/icons/list-ordered.svg +1 -1
- package/resources/icons/list.svg +1 -1
- package/resources/icons/loader-2.svg +1 -1
- package/resources/icons/minus.svg +1 -1
- package/resources/icons/more-horizontal.svg +1 -1
- package/resources/icons/panel-left.svg +1 -1
- package/resources/icons/pencil-line.svg +1 -1
- package/resources/icons/pencil.svg +1 -1
- package/resources/icons/plus.svg +1 -1
- package/resources/icons/quote.svg +1 -1
- package/resources/icons/rotate-ccw.svg +1 -1
- package/resources/icons/rows-3.svg +1 -1
- package/resources/icons/search.svg +1 -1
- package/resources/icons/send.svg +1 -1
- package/resources/icons/settings.svg +1 -1
- package/resources/icons/smile.svg +1 -1
- package/resources/icons/strikethrough.svg +1 -1
- package/resources/icons/table.svg +1 -1
- package/resources/icons/trash-2.svg +1 -1
- package/resources/icons/underline.svg +1 -1
- package/resources/icons/x.svg +1 -1
- package/dist-standalone/chunks/chart-view-CpYsLvzR.js +0 -36
- package/dist-standalone/chunks/date-picker-field-lX8N40Ii.js +0 -1
- package/dist-standalone/chunks/dist-PaT1gYi_.js +0 -2
- package/dist-standalone/chunks/jsx-runtime-Drll_-DD.js +0 -1
- package/dist-standalone/chunks/locale-CXqr7LPR.js +0 -1
- package/dist-standalone/chunks/page-props-ClpVjpOc.js +0 -1
- package/dist-standalone/chunks/react-B8IZ02wI.js +0 -1
- package/dist-standalone/chunks/rich-editor-field-C71csVJv.js +0 -154
- package/dist-standalone/chunks/subscriptions-B1STcwPE.js +0 -1
- package/dist-standalone/chunks/use-effect-dispatcher-I8So0l_I.js +0 -97
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-B8IZ02wI.js";import{a as n}from"./locale-CXqr7LPR.js";import{n as r,t as i}from"./jsx-runtime-Drll_-DD.js";import{A as a,C as o,D as s,E as c,I as l,L as u,O as d,T as f,i as p,j as m,k as h,o as g,r as _,w as v,y}from"../lattice.js";var b=(e,t=[])=>({parts:(...n)=>{if(S(t))return b(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>b(e,[...t,...n]),omit:(...n)=>b(e,t.filter(e=>!n.includes(e))),rename:e=>b(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${x(e)}"][data-part="${x(n)}"]`,`& [data-scope="${x(e)}"][data-part="${x(n)}"]`].join(`, `),attrs:{"data-scope":x(e),"data-part":x(n)}}}),{})}),x=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),S=e=>e.length===0,C=b(`date-picker`).parts(`clearTrigger`,`content`,`control`,`input`,`label`,`monthSelect`,`nextTrigger`,`positioner`,`presetTrigger`,`prevTrigger`,`rangeText`,`root`,`table`,`tableBody`,`tableCell`,`tableCellTrigger`,`tableHead`,`tableHeader`,`tableRow`,`trigger`,`view`,`viewControl`,`viewTrigger`,`yearSelect`).build();function w(e,t){return e-t*Math.floor(e/t)}var T=1721426;function E(e,t,n,r){t=ee(e,t);let i=t-1,a=-2;return n<=2?a=0:D(t)&&(a=-1),T-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function D(e){return e%4==0&&(e%100!=0||e%400==0)}function ee(e,t){return e===`BC`?1-t:t}function te(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}var ne={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},re=class{fromJulianDay(e){let t=e,n=t-T,r=Math.floor(n/146097),i=w(n,146097),a=Math.floor(i/36524),o=w(i,36524),s=Math.floor(o/1461),c=w(o,1461),l=Math.floor(c/365),[u,d]=te(r*400+a*100+s*4+l+ +(a!==4&&l!==4)),f=t-E(u,d,1,1),p=2;t<E(u,d,3,1)?p=0:D(d)&&(p=1);let m=Math.floor(((f+p)*12+373)/367);return new kt(u,d,m,t-E(u,d,m,1)+1)}toJulianDay(e){return E(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return ne[D(e.year)?`leapyear`:`standard`][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return D(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return[`BC`,`AD`]}isInverseEra(e){return e.era===`BC`}balanceDate(e){e.year<=0&&(e.era=e.era===`BC`?`AD`:`BC`,e.year=1-e.year)}constructor(){this.identifier=`gregory`}},ie={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function O(e,t){return t=I(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function ae(e,t){return t=I(t,e.calendar),e=A(e),t=A(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function oe(e,t){return t=I(t,e.calendar),e=Ce(e),t=Ce(t),e.era===t.era&&e.year===t.year}function se(e,t){return ue(e.calendar,t.calendar)&&O(e,t)}function ce(e,t){return ue(e.calendar,t.calendar)&&ae(e,t)}function le(e,t){return ue(e.calendar,t.calendar)&&oe(e,t)}function ue(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}function de(e,t){return O(e,me(t))}var k={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function fe(e,t,n){let r=e.calendar.toJulianDay(e),i=n?k[n]:ke(t),a=Math.ceil(r+1-i)%7;return a<0&&(a+=7),a}function pe(e){return P(Date.now(),e)}function me(e){return We(pe(e))}function he(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function ge(e,t){return _e(e)-_e(t)}function _e(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var ve=null,ye=!1;function be(){return ve??=new Intl.DateTimeFormat().resolvedOptions().timeZone,ve}function xe(){return ye}function A(e){return e.subtract({days:e.day-1})}function Se(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function Ce(e){return A(e.subtract({months:e.month-1}))}function we(e){return Se(e.add({months:e.calendar.getMonthsInYear(e)-e.month}))}function j(e,t,n){let r=fe(e,t,n);return e.subtract({days:r})}function Te(e,t,n){return j(e,t,n).add({days:6})}var Ee=new Map,De=new Map;function Oe(e){if(Intl.Locale){let t=Ee.get(e);return t||(t=new Intl.Locale(e).maximize().region,t&&Ee.set(e,t)),t}let t=e.split(`-`)[1];return t===`u`?void 0:t}function ke(e){let t=De.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if(`getWeekInfo`in n&&(t=n.getWeekInfo(),t))return De.set(e,t),t.firstDay}let n=Oe(e);if(e.includes(`-fw-`)){let n=e.split(`-fw-`)[1].split(`-`)[0];t=n===`mon`?{firstDay:1}:n===`tue`?{firstDay:2}:n===`wed`?{firstDay:3}:n===`thu`?{firstDay:4}:n===`fri`?{firstDay:5}:n===`sat`?{firstDay:6}:{firstDay:0}}else t=e.includes(`-ca-iso8601`)?{firstDay:1}:{firstDay:n&&ie[n]||0};De.set(e,t)}return t.firstDay}function Ae(e,t,n){let r=e.calendar.getDaysInMonth(e);return Math.ceil((fe(A(e),t,n)+r)/7)}function je(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function Me(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}var Ne={AF:[4,5],AE:[5,6],BH:[5,6],DZ:[5,6],EG:[5,6],IL:[5,6],IQ:[5,6],IR:[5,5],JO:[5,6],KW:[5,6],LY:[5,6],OM:[5,6],QA:[5,6],SA:[5,6],SD:[5,6],SY:[5,6],YE:[5,6]};function Pe(e,t){let n=e.calendar.toJulianDay(e),r=Math.ceil(n+1)%7;r<0&&(r+=7);let[i,a]=Ne[Oe(t)]||[6,0];return r===i||r===a}function M(e){return e=I(e,new re),Fe(ee(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Fe(e,t,n,r,i,a,o){let s=new Date;return s.setUTCHours(r,i,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function Ie(e,t){if(t===`UTC`)return 0;if(e>0&&t===be()&&!xe())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=Re(e,t);return Fe(n,r,i,a,o,s,0)-Math.floor(e/1e3)*1e3}var Le=new Map;function Re(e,t){let n=Le.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Le.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}var ze=864e5;function Be(e,t){let n=M(e);return Ve(e,t,n-Ie(n-ze,t),n-Ie(n+ze,t))}function Ve(e,t,n,r){return(n===r?[n]:[n,r]).filter(n=>He(e,t,n))}function He(e,t,n){let r=Re(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function N(e,t,n=`compatible`){let r=F(e);if(t===`UTC`)return M(r);if(t===be()&&n===`compatible`&&!xe()){r=I(r,new re);let e=new Date,t=ee(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=M(r),a=Ie(i-ze,t),o=Ie(i+ze,t),s=Ve(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function Ue(e,t,n=`compatible`){return new Date(N(e,t,n))}function P(e,t){let n=Ie(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),c=r.getUTCMinutes(),l=r.getUTCSeconds(),u=r.getUTCMilliseconds();return new jt(i<1?`BC`:`AD`,i<1?-i+1:i,a,o,t,n,s,c,l,u)}function We(e){return new kt(e.calendar,e.era,e.year,e.month,e.day)}function F(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new At(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function I(e,t){if(ue(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,et(r),r}function Ge(e,t,n){return e instanceof jt?e.timeZone===t?e:qe(e,t):P(N(e,t,n),t)}function Ke(e){let t=M(e)-e.offset;return new Date(t)}function qe(e,t){return I(P(M(e)-e.offset,t),e.calendar)}var Je=36e5;function Ye(e,t){let n=e.copy(),r=`hour`in n?ct(n,t):0;Xe(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Ze(n),$e(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,Qe(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){let e=n.calendar.isInverseEra?.(n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let a=n.calendar.getMonthsInYear(n);return n.month>a&&(n.month=a,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Xe(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function Ze(e){for(;e.month<1;)Xe(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Xe(e,1)}function Qe(e){for(;e.day<1;)e.month--,Ze(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Ze(e)}function $e(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function et(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),$e(e)}function tt(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function nt(e,t){return Ye(e,tt(t))}function rt(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),et(n),n}function it(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),ot(n),n}function at(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=st(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=st(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=st(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=st(e.hour,24),t}function ot(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function st(e,t){let n=e%t;return n<0&&(n+=t),n}function ct(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,at(e)}function lt(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=L(a,n,0,t.length-1,r?.round),i.era=t[a],et(i);break}case`year`:i.calendar.isInverseEra?.(i)&&(n=-n),i.year=L(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=L(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=L(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),et(i),i}function ut(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=L(t,n,a,o,r?.round);break}case`minute`:i.minute=L(e.minute,n,0,59,r?.round);break;case`second`:i.second=L(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=L(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function L(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let i=Math.abs(t);e=t>0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function dt(e,t){let n;return n=t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?N(Ye(F(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):M(e)-e.offset,n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5,I(P(n,e.timeZone),e.calendar)}function ft(e,t){return dt(e,tt(t))}function pt(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=F(e),o=I(it(a,{hour:t}),new re),s=[N(o,e.timeZone,`earlier`),N(o,e.timeZone,`later`)].filter(t=>P(t,e.timeZone).day===o.day)[0],c=I(it(a,{hour:i}),new re),l=[N(c,e.timeZone,`earlier`),N(c,e.timeZone,`later`)].filter(t=>P(t,e.timeZone).day===c.day).pop(),u=M(e)-e.offset,d=Math.floor(u/Je),f=u%Je;return u=L(d,n,Math.floor(s/Je),Math.floor(l/Je),r?.round)*Je+f,I(P(u,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return ut(e,t,n,r);case`era`:case`year`:case`month`:case`day`:return I(P(N(lt(F(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error(`Unsupported field `+t)}}function mt(e,t,n){let r=F(e),i=it(rt(r,t),t);return i.compare(r)===0?e:I(P(N(i,e.timeZone,n),e.timeZone),e.calendar)}var ht=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,gt=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,_t=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,vt=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function yt(e){let t=e.match(ht);if(!t)throw vt.test(e)?Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date string: `+e);let n=new kt(R(t[1],0,9999),R(t[2],1,12),1);return n.day=R(t[3],1,n.calendar.getDaysInMonth(n)),n}function bt(e){let t=e.match(gt);if(!t)throw vt.test(e)?Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date time string: `+e);let n=R(t[1],-9999,9999),r=new At(n<1?`BC`:`AD`,n<1?-n+1:n,R(t[2],1,12),1,t[4]?R(t[4],0,23):0,t[5]?R(t[5],0,59):0,t[6]?R(t[6],0,59):0,t[7]?R(t[7],0,1/0)*1e3:0);return r.day=R(t[3],0,r.calendar.getDaysInMonth(r)),r}function xt(e,t){let n=e.match(_t);if(!n)throw Error(`Invalid ISO 8601 date time string: `+e);let r=R(n[1],-9999,9999),i=new jt(r<1?`BC`:`AD`,r<1?-r+1:r,R(n[2],1,12),1,n[11],0,n[4]?R(n[4],0,23):0,n[5]?R(n[5],0,59):0,n[6]?R(n[6],0,59):0,n[7]?R(n[7],0,1/0)*1e3:0);i.day=R(n[3],0,i.calendar.getDaysInMonth(i));let a=F(i),o;if(n[8]){let e=R(n[8],-23,23);if(i.offset=Math.sign(e)*(Math.abs(e)*36e5+R(n[9]??`0`,0,59)*6e4+R(n[10]??`0`,0,59)*1e3),o=M(i)-i.offset,!Be(a,i.timeZone).includes(o))throw Error(`Offset ${Et(i.offset)} is invalid for ${Tt(i)} in ${i.timeZone}`)}else o=N(F(a),i.timeZone,t);return P(o,i.timeZone)}function St(e,t){let n=e.match(vt);if(!n)throw Error(`Invalid ISO 8601 date time string: `+e);let r=R(n[1],-9999,9999),i=new jt(r<1?`BC`:`AD`,r<1?-r+1:r,R(n[2],1,12),1,t,0,n[4]?R(n[4],0,23):0,n[5]?R(n[5],0,59):0,n[6]?R(n[6],0,59):0,n[7]?R(n[7],0,1/0)*1e3:0);return i.day=R(n[3],0,i.calendar.getDaysInMonth(i)),n[8]&&(i.offset=R(n[8],-23,23)*36e5+R(n[9]??`0`,0,59)*6e4),qe(i,t)}function R(e,t,n){let r=Number(e);if(r<t||r>n)throw RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function Ct(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function wt(e){let t=I(e,new re),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function Tt(e){return`${wt(e)}T${Ct(e)}`}function Et(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`;return i!==0&&(a+=`:${String(i).padStart(2,`0`)}`),a}function Dt(e){return`${Tt(e)}${Et(e.offset)}[${e.timeZone}]`}function Ot(e){let t=typeof e[0]==`object`?e.shift():new re,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var kt=class e{constructor(...e){let[t,n,r,i,a]=Ot(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,et(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return Ye(this,e)}subtract(e){return nt(this,e)}set(e){return rt(this,e)}cycle(e,t,n){return lt(this,e,t,n)}toDate(e){return Ue(this,e)}toString(){return wt(this)}compare(e){return he(this,e)}},At=class e{constructor(...e){let[t,n,r,i,a]=Ot(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,et(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ye(this,e)}subtract(e){return nt(this,e)}set(e){return rt(it(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return lt(this,e,t,n);default:return ut(this,e,t,n)}}toDate(e,t){return Ue(this,e,t)}toString(){return Tt(this)}compare(e){let t=he(this,e);return t===0?ge(this,F(e)):t}},jt=class e{constructor(...e){let[t,n,r,i,a]=Ot(e),o=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,et(this)}copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return dt(this,e)}subtract(e){return ft(this,e)}set(e,t){return mt(this,e,t)}cycle(e,t,n){return pt(this,e,t,n)}toDate(){return Ke(this)}toString(){return Dt(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Ge(e,this.timeZone).toDate().getTime()}},Mt=new Map,z=class{constructor(e,t={}){this.formatter=Pt(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return Rt()&&(this.resolvedHourCycle||=zt(e.locale,this.options),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),e.calendar===`ethiopic-amete-alem`&&(e.calendar=`ethioaa`),e}},Nt={true:{ja:`h11`},false:{}};function Pt(e,t={}){if(typeof t.hour12==`boolean`&&It()){t={...t};let n=Nt[String(t.hour12)][e.split(`-`)[0]],r=t.hour12?`h12`:`h23`;t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(Mt.has(n))return Mt.get(n);let r=new Intl.DateTimeFormat(e,t);return Mt.set(n,r),r}var Ft=null;function It(){return Ft??=new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,hour12:!1}).format(new Date(2020,2,3,0))===`24`,Ft}var Lt=null;function Rt(){return Lt??=new Intl.DateTimeFormat(`fr`,{hour:`numeric`,hour12:!1}).resolvedOptions().hourCycle===`h12`,Lt}function zt(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,``),e+=(e.includes(`-u-`)?``:`-u`)+`-nu-latn`;let n=Pt(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>e.type===`hour`).value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>e.type===`hour`).value,10);if(r===0&&i===23)return`h23`;if(r===24&&i===23)return`h24`;if(r===0&&i===11)return`h11`;if(r===12&&i===11)return`h12`;throw Error(`Unexpected hour cycle result`)}function Bt(e,t,n,r,i){let a={};for(let e in t){let n=e,r=t[n];r!=null&&(a[n]=Math.floor(r/2),a[n]>0&&r%2==0&&a[n]--)}return Ut(e,Vt(e,t,n).subtract(a),t,n,r,i)}function Vt(e,t,n,r,i){let a=e;return t.years?a=Ce(e):t.months?a=A(e):t.weeks&&(a=j(e,n)),Ut(e,a,t,n,r,i)}function Ht(e,t,n,r,i){let a={...t};return a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--,Ut(e,Vt(e,t,n).subtract(a),t,n,r,i)}function Ut(e,t,n,r,i,a){return i&&e.compare(i)>=0&&(t=Me(t,Vt(We(i),n,r))),a&&e.compare(a)<=0&&(t=je(t,Ht(We(a),n,r))),t}function B(e,t,n){let r=We(e),i=t?We(t):void 0,a=n?We(n):void 0,o=r;return i&&(o=Me(o,i)),a&&(o=je(o,a)),o.compare(r)===0?e:`hour`in e?e.set({year:o.year,month:o.month,day:o.day}):o}function Wt(e,t,n,r,i,a){switch(t){case`start`:return Vt(e,n,r,i,a);case`end`:return Ht(e,n,r,i,a);default:return Bt(e,n,r,i,a)}}function V(e,t){return e==null||t==null?e===t:!(`hour`in e)&&!(`hour`in t)?O(e,t):F(e).compare(F(t))===0}function Gt(e,t,n,r,i){return e?t?.(e,n)?!0:H(e,r,i):!1}function H(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function Kt(e,t,n){let r=e.subtract({days:1});return O(r,e)||H(r,t,n)}function qt(e,t,n){let r=e.add({days:1});return O(r,e)||H(r,t,n)}function Jt(e){let t={...e};for(let e in t)t[e]=1;return t}function Yt(e,t){let n={...t};return n.days?n.days--:n.days=-1,e.add(n)}function Xt(e){if(!e)return;let t=e.calendar.identifier;return t===`gregory`||t===`iso8601`?e.era===`BC`?`short`:void 0:`short`}function Zt(e,t,n){let r=n??F(me(t));return new z(e,{weekday:`long`,month:`long`,year:`numeric`,day:`numeric`,era:Xt(r),calendar:r.calendar.identifier,timeZone:t})}function Qt(e,t,n){let r=n??me(t);return new z(e,{month:`long`,year:`numeric`,era:Xt(r),calendar:r.calendar.identifier,timeZone:t})}function $t(e,t,n,r,i){let a=n.formatRangeToParts(e.toDate(i),t.toDate(i)),o=-1;for(let e=0;e<a.length;e++){let t=a[e];if(t.source===`shared`&&t.type===`literal`)o=e;else if(t.source===`endRange`)break}let s=``,c=``;for(let e=0;e<a.length;e++)e<o?s+=a[e].value:e>o&&(c+=a[e].value);return r(s,c)}function en(e,t,n,r){if(!e)return``;let i=e,a=t??e,o=Zt(n,r);return O(i,a)?o.format(i.toDate(r)):$t(i,a,o,(e,t)=>`${e} \u2013 ${t}`,r)}var tn=[`sun`,`mon`,`tue`,`wed`,`thu`,`fri`,`sat`];function nn(e){return e==null?void 0:tn[e]}function rn(e,t,n){return j(e,t,nn(n))}function an(e,t,n,r){let i=t.add({weeks:e}),a=[],o=rn(i,n,r);for(;a.length<7;){a.push(o);let e=o.add({days:1});if(O(o,e))break;o=e}return a}function on(e,t,n,r){let i=nn(r),a=n??Ae(e,t,i);return[...Array(a).keys()].map(n=>an(n,e,t,r))}function sn(e,t){let n=new z(e,{weekday:`long`,timeZone:t}),r=new z(e,{weekday:`short`,timeZone:t}),i=new z(e,{weekday:`narrow`,timeZone:t});return e=>{let a=e instanceof Date?e:e.toDate(t);return{value:e,short:r.format(a),long:n.format(a),narrow:i.format(a)}}}function cn(e,t,n,r){let i=rn(e,r,t),a=[...Array(7).keys()],o=sn(r,n);return a.map(e=>o(i.add({days:e})))}function ln(e,t=`long`,n){if(!n||n.calendar.identifier===`gregory`||n.calendar.identifier===`iso8601`){let n=new Date(2021,0,1),r=[];for(let i=0;i<12;i++)r.push(n.toLocaleString(e,{month:t})),n.setMonth(n.getMonth()+1);return r}let r=n.calendar.getMonthsInYear(n),i=new z(e,{month:t,calendar:n.calendar.identifier}),a=[];for(let e=1;e<=r;e++){let t=n.set({month:e});a.push(i.format(t.toDate(`UTC`)))}return a}function un(e,t){let n=j(e,t,`mon`),r=n.year,i=j(n.set({month:1,day:4}),t,`mon`),a=n.calendar.toJulianDay(n),o=i.calendar.toJulianDay(i);if(a>=o)return 1+Math.floor((a-o)/7);let s=j(n.set({year:r-1,month:1,day:4}),t,`mon`),c=s.calendar.toJulianDay(s);return 1+Math.floor((a-c)/7)}function dn(e){let t=[];for(let n=e.from;n<=e.to;n+=1)t.push(n);return t}var fn=1900,pn=2099;function mn(e,t,n){let r=e.calendar;return{from:t?.year??I(new kt(fn,1,1),r).year,to:n?.year??I(new kt(pn,12,31),r).year}}var hn=10;function gn(e){if(e){if(e.length===3)return e.padEnd(4,`0`);if(e.length===2){let t=new Date().getFullYear(),n=Math.floor(t/100)*100+parseInt(e.slice(-2),10);return n>t+hn?(n-100).toString():n.toString()}return e}}function _n(e,t){let n=t?.strict?10:12,r=e-e%10,i=[];for(let e=0;e<n;e+=1){let t=r+e;i.push(t)}return i}function vn(e,t){let n=me(e??be());return t?I(n,t):n}function yn(e,t,n,r){return function(i){let{startDate:a,focusedDate:o}=i,s=Yt(a,e);return H(o,n,r)?{startDate:a,focusedDate:B(o,n,r),endDate:s}:o.compare(a)<0?{startDate:Ht(o,e,t,n,r),focusedDate:B(o,n,r),endDate:s}:o.compare(s)>0?{startDate:Vt(o,e,t,n,r),endDate:s,focusedDate:B(o,n,r)}:{startDate:a,endDate:s,focusedDate:B(o,n,r)}}}function bn(e,t,n,r,i,a){let o=yn(n,r,i,a),s=t.add(n);return o({focusedDate:e.add(n),startDate:Vt(Ut(e,s,n,r,i,a),n,r)})}function xn(e,t,n,r,i,a){let o=yn(n,r,i,a),s=t.subtract(n);return o({focusedDate:e.subtract(n),startDate:Vt(Ut(e,s,n,r,i,a),n,r)})}function Sn(e,t,n,r,i,a,o){let s=yn(r,i,a,o);if(!n&&!r.days)return s({focusedDate:e.add(Jt(r)),startDate:t});if(r.days)return bn(e,t,r,i,a,o);if(r.weeks)return s({focusedDate:e.add({months:1}),startDate:t});if(r.months||r.years)return s({focusedDate:e.add({years:1}),startDate:t})}function Cn(e,t,n,r,i,a,o){let s=yn(r,i,a,o);if(!n&&!r.days)return s({focusedDate:e.subtract(Jt(r)),startDate:t});if(r.days)return xn(e,t,r,i,a,o);if(r.weeks)return s({focusedDate:e.subtract({months:1}),startDate:t});if(r.months||r.years)return s({focusedDate:e.subtract({years:1}),startDate:t})}var wn=(e,t)=>e?/\d/.test(e)||t.includes(e)||e.length!==1:!0,Tn=(e,t)=>e.split(``).filter(e=>wn(e,t)).join(``),En=new Map;function Dn(e){let t=En.get(e);if(t!=null)return t;let n=new Intl.DateTimeFormat(e).formatToParts(new Date).find(e=>e.type===`literal`);return t=n?n.value:`/`,En.set(e,t),t}var On=e=>e!=null&&e.length===4,kn=e=>e!=null&&parseFloat(e)<=12,An=e=>e!=null&&parseFloat(e)<=31;function jn(e,t,n){let{year:r,month:i,day:a}=Nn(Mn(t,n),e)??{};if(r!=null||i!=null||a!=null){let e=new Date;r||=e.getFullYear().toString(),i||=(e.getMonth()+1).toString(),a||=e.getDate().toString()}if(On(r)||(r=gn(r)),On(r)&&kn(i)&&An(a))return new kt(+r,+i,+a);let o=Date.parse(e);if(!isNaN(o)){let e=new Date(o);return new kt(e.getFullYear(),e.getMonth()+1,e.getDate())}}function Mn(e,t){return new z(e,{day:`numeric`,month:`numeric`,year:`numeric`,timeZone:t}).formatToParts(new Date(2e3,11,25)).map(({type:e,value:t})=>e===`literal`?`${t}?`:`((?!=<${e}>)\\d+)?`).join(``)}function Nn(e,t){let n=t.match(e);return e.toString().match(/<(.+?)>/g)?.map(e=>{let t=e.match(/<(.+)>/);return!t||t.length<=0?null:e.match(/<(.+)>/)?.[1]}).reduce((e,t,r)=>(t&&(n&&n.length>r?e[t]=n[r+1]:e[t]=null),e),{})}function Pn(e,t,n){let r=We(pe(n));switch(e){case`thisWeek`:return[j(r,t),Te(r,t)];case`thisMonth`:return[A(r),r];case`thisQuarter`:return[A(r).add({months:-((r.month-1)%3)}),r];case`thisYear`:return[Ce(r),r];case`last3Days`:return[r.add({days:-2}),r];case`last7Days`:return[r.add({days:-6}),r];case`last14Days`:return[r.add({days:-13}),r];case`last30Days`:return[r.add({days:-29}),r];case`last90Days`:return[r.add({days:-89}),r];case`lastMonth`:return[A(r.add({months:-1})),Se(r.add({months:-1}))];case`lastQuarter`:return[A(r.add({months:-((r.month-1)%3)-3})),Se(r.add({months:-((r.month-1)%3)-1}))];case`lastWeek`:return[j(r,t).add({weeks:-1}),Te(r,t).add({weeks:-1})];case`lastYear`:return[Ce(r.add({years:-1})),we(r.add({years:-1}))];default:throw Error(`Invalid date range preset: ${e}`)}}var Fn=Object.defineProperty,In=(e,t,n)=>t in e?Fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ln=(e,t,n)=>In(e,typeof t==`symbol`?t:t+``,n),Rn=()=>void 0,zn=e=>typeof e==`object`&&!!e,U=e=>e?``:void 0,W=e=>e?`true`:void 0,Bn=1,Vn=9,Hn=11,G=e=>zn(e)&&e.nodeType===Bn&&typeof e.nodeName==`string`,Un=e=>zn(e)&&e.nodeType===Vn,Wn=e=>zn(e)&&e===e.window,Gn=e=>G(e)?e.localName||``:`#document`;function Kn(e){return[`html`,`body`,`#document`].includes(Gn(e))}var qn=e=>zn(e)&&e.nodeType!==void 0,Jn=e=>qn(e)&&e.nodeType===Hn&&`host`in e,Yn=e=>G(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Xn(e){return e?tr(e.getRootNode())===e:!1}function Zn(e,t){if(!e||!t||!G(e)||!qn(t))return!1;if(G(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&Jn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Qn(e){return Un(e)?e:Wn(e)?e.document:e?.ownerDocument??document}function $n(e){return Qn(e).documentElement}function er(e){return Jn(e)?er(e.host):Un(e)?e.defaultView??window:G(e)?e.ownerDocument?.defaultView??window:window}function tr(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function nr(e){if(Gn(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Jn(e)&&e.host||$n(e);return Jn(t)?t.host:t}function rr(e){let t;try{if(t=e.getRootNode({composed:!0}),Un(t)||Jn(t))return t}catch{}return e.ownerDocument??document}var ir=new WeakMap;function ar(e){return ir.has(e)||ir.set(e,er(e).getComputedStyle(e)),ir.get(e)}var or=new Set([`menu`,`listbox`,`dialog`,`grid`,`tree`,`region`,`application`]),sr=e=>or.has(e),cr=e=>e.getAttribute(`aria-controls`)?.split(` `)||[];function lr(e,t){let n=new Set,r=rr(e),i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=cr(e);for(let e of a){if(!e||n.has(e))continue;n.add(e);let a=r.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;if(e&&sr(e)&&!n&&(a===t||a.contains(t)||i(a)))return!0}}}return!1};return i(e)}var ur=()=>typeof document<`u`;function dr(){return navigator.userAgentData?.platform??navigator.platform}var fr=e=>ur()&&e.test(dr()),pr=()=>ur()&&!!navigator.maxTouchPoints,mr=()=>fr(/^iPhone/i),hr=()=>fr(/^iPad/i)||_r()&&navigator.maxTouchPoints>1,gr=()=>mr()||hr(),_r=()=>fr(/^Mac/i);function vr(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function yr(e){return vr(e)?.[0]??e.target}function br(e){return Tr(e).isComposing||e.keyCode===229}var xr=e=>e.button===2||_r()&&e.ctrlKey&&e.button===0,Sr={Up:`ArrowUp`,Down:`ArrowDown`,Esc:`Escape`," ":`Space`,",":`Comma`,Left:`ArrowLeft`,Right:`ArrowRight`},Cr={ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`};function wr(e,t={}){let{dir:n=`ltr`,orientation:r=`horizontal`}=t,i=e.key;return i=Sr[i]??i,n===`rtl`&&r===`horizontal`&&i in Cr&&(i=Cr[i]),i}function Tr(e){return e.nativeEvent??e}var Er=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}};function Dr(e,t){let{type:n=`HTMLInputElement`,property:r=`value`}=t,i=er(e)[n].prototype;return Object.getOwnPropertyDescriptor(i,r)??{}}function Or(e){if(e.localName===`input`)return`HTMLInputElement`;if(e.localName===`textarea`)return`HTMLTextAreaElement`;if(e.localName===`select`)return`HTMLSelectElement`}function kr(e,t,n=`value`){if(!e)return;let r=Or(e);r&&Dr(e,{type:r,property:n}).set?.call(e,t),e.setAttribute(n,t)}var Ar=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`;function jr(e){return!G(e)||e.closest(`[inert]`)?!1:e.matches(Ar)&&Yn(e)}var Mr=class e{constructor(){Ln(this,`id`,null),Ln(this,`fn_cleanup`),Ln(this,`cleanup`,()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function K(e){let t=Mr.create();return t.request(e),t.cleanup}function Nr(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}function Pr(e){let t=nr(e);return Kn(t)?Qn(t).body:G(t)&&Lr(t)?t:Pr(t)}var Fr=/auto|scroll|overlay|hidden|clip/,Ir=new Set([`inline`,`contents`]);function Lr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=er(e).getComputedStyle(e);return Fr.test(t+r+n)&&!Ir.has(i)}var Rr=`default`,zr=``,Br=new WeakMap;function Vr(e={}){let{target:t,doc:n}=e,r=n??document,i=r.documentElement;return gr()?(Rr==="default"&&(zr=i.style.webkitUserSelect,i.style.webkitUserSelect=`none`),Rr=`disabled`):t&&(Br.set(t,t.style.userSelect),t.style.userSelect=`none`),()=>Hr({target:t,doc:r})}function Hr(e={}){let{target:t,doc:n}=e,r=(n??document).documentElement;if(gr()){if(Rr!==`disabled`)return;Rr=`restoring`,setTimeout(()=>{Nr(()=>{Rr===`restoring`&&(r.style.webkitUserSelect===`none`&&(r.style.webkitUserSelect=zr||``),zr=``,Rr=`default`)})},300)}else if(t&&Br.has(t)){let e=Br.get(t);t.style.userSelect===`none`&&(t.style.userSelect=e??``),t.getAttribute(`style`)===``&&t.removeAttribute(`style`),Br.delete(t)}}function Ur(e={}){let{defer:t,target:n,...r}=e,i=t?K:e=>e(),a=[];return a.push(i(()=>{let e=typeof n==`function`?n():n;a.push(Vr({...r,target:e}))})),()=>{a.forEach(e=>e?.())}}function Wr(e,t){return Array.from(e?.querySelectorAll(t)??[])}function Gr(e,t){return e?.querySelector(t)??null}function Kr(e,t){if(!e)return Rn;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return qr(n,t)?Rn:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)})}function qr(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function Jr(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(new DOMException(`Promise aborted`,`AbortError`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function Yr(e,t){let{timeout:n,rootNode:r}=t,i=er(r),a=Qn(r),o=new i.AbortController;return Jr(new Promise(t=>{let n=e();if(n){t(n);return}let r=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(r.disconnect(),t(n))});r.observe(a.body,{childList:!0,subtree:!0})}),o,n)}function Xr(e){return e==null?[]:Array.isArray(e)?e:[e]}var Zr=e=>e[e.length-1];function Qr(e,t){return e.reduce((e,n,r)=>(r%t===0?e.push([n]):Zr(e)?.push(n),e),[])}var $r=e=>e?.constructor.name===`Array`,ei=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!ti(e[n],t[n]))return!1;return!0},ti=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if($r(e)&&$r(t))return ei(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;t<r;t++)if(!Reflect.has(e,n[t]))return!1;for(let i=0;i<r;i++){let r=n[i];if(!ti(e[r],t[r]))return!1}return!0},ni=e=>typeof e==`object`&&!!e,ri=e=>typeof e==`string`,ii=e=>typeof e==`function`,ai=e=>e==null,oi=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),si=e=>Object.prototype.toString.call(e),ci=Function.prototype.toString,li=ci.call(Object),ui=e=>{if(!ni(e)||si(e)!=`[object Object]`||pi(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=oi(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&ci.call(n)==li},di=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,fi=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,pi=e=>di(e)||fi(e),mi=e=>e(),hi=()=>{},gi=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})};function _i(e,t,...n){if(e in t){let r=t[e];return ii(r)?r(...n):r}let r=Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw Error.captureStackTrace?.(r,_i),r}var{floor:vi,abs:yi,round:bi,min:xi,max:Si,pow:Ci,sign:wi}=Math,Ti=e=>Number.isNaN(e),Ei=e=>Ti(e)?0:e,Di=(e,t,n)=>{let r=Ei(e);return(t==null||r>=t)&&(n==null||r<=n)},Oi=(e,t,n)=>xi(Si(Ei(e),t),n);function ki(e){if(!ui(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=ki(t))}return n}function Ai(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function ji(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function Mi(e,t){if(e==null)throw Error(t())}function Ni(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function Pi(e){if(!e)return Ni();let{x:t,y:n,width:r,height:i}=e;return Ni(t,n,r,i)}function Fi(e,t){return{contextElement:G(e)?e:e?.contextElement,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?Pi(r):n.getBoundingClientRect()}}}var Ii=e=>({variable:e,reference:`var(${e})`}),q={arrowSize:Ii(`--arrow-size`),arrowSizeHalf:Ii(`--arrow-size-half`),arrowBg:Ii(`--arrow-background`),transformOrigin:Ii(`--transform-origin`),arrowOffset:Ii(`--arrow-offset`)},Li=e=>e===`top`||e===`bottom`?`y`:`x`;function Ri(e,t){return{name:`transformOrigin`,fn(n){let{elements:r,middlewareData:i,placement:a,rects:o,y:s}=n,c=a.split(`-`)[0],l=Li(c),u=i.arrow?.x||0,d=i.arrow?.y||0,f=t?.clientWidth||0,p=t?.clientHeight||0,m=u+f/2,h=d+p/2,g=Math.abs(i.shift?.y||0),_=o.reference.height/2,v=p/2,y=e.offset?.mainAxis??e.gutter,b=typeof y==`number`?y+v:y??v,x=g>b,S={top:`${m}px calc(100% + ${b}px)`,bottom:`${m}px ${-b}px`,left:`calc(100% + ${b}px) ${h}px`,right:`${-b}px ${h}px`}[c],C=`${m}px ${o.reference.y+_-s}px`,w=!!e.overlap&&l===`y`&&x;return r.floating.style.setProperty(q.transformOrigin.variable,w?C:S),{data:{transformOrigin:w?C:S}}}}}var zi={name:`rects`,fn({rects:e}){return{data:e}}},Bi=e=>{if(e)return{name:`shiftArrow`,fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:i}=n.arrow,a=t.split(`-`)[0];return Object.assign(e.style,{left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[a]:`calc(100% + ${q.arrowOffset.reference})`}),{}}}};function Vi(e){let[t,n]=e.split(`-`);return{side:t,align:n,hasAlign:n!=null}}function Hi(e){return e.split(`-`)[0]}var Ui={strategy:`absolute`,placement:`bottom`,listeners:!0,restoreStyles:!1,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Wi(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Gi(e,t){return e!=null&&Math.abs(e-t)<.5}function Ki(e){return typeof e==`function`?e():e===`clipping-ancestors`?`clippingAncestors`:e}function qi(e,t,n){return o({element:e||t.createElement(`div`),padding:n.arrowPadding})}function Ji(e,t){if(!ai(t.offset??t.gutter))return h(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,a=typeof i==`number`?i+r:i??r,{hasAlign:o}=Vi(n),s=o?void 0:t.shift;return ki({crossAxis:t.offset?.crossAxis??s,mainAxis:a,alignmentAxis:t.shift})})}function Yi(e){if(e.flip)return c(()=>{let t=Ki(e.boundary);return{...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}})}function Xi(e){if(!(!e.slide&&!e.overlap))return a(()=>{let t=Ki(e.boundary);return{...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:d()}})}function Zi(e){if(e.sizeMiddleware===!1&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,i;return m(()=>{let a=Ki(e.boundary);return{padding:e.overflowPadding,...a?{boundary:a}:void 0,apply({elements:e,rects:a,availableHeight:o,availableWidth:s}){let c=e.floating,l=Math.round(a.reference.width),u=Math.round(a.reference.height);s=Math.floor(s),o=Math.floor(o),Gi(t,l)||(c.style.setProperty(`--reference-width`,`${l}px`),t=l),Gi(n,u)||(c.style.setProperty(`--reference-height`,`${u}px`),n=u),Gi(r,s)||(c.style.setProperty(`--available-width`,`${s}px`),r=s),Gi(i,o)||(c.style.setProperty(`--available-height`,`${o}px`),i=o)}}})}function Qi(e){if(e.hideWhenDetached)return s(()=>({strategy:`referenceHidden`,boundary:Ki(e.boundary)??`clippingAncestors`}))}function $i(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}var ea=[`transform`,`visibility`,`pointer-events`,`--x`,`--y`,`--z-index`,`--reference-width`,`--reference-height`,`--available-width`,`--available-height`,`--transform-origin`],ta=[`top`,`right`,`bottom`,`left`];function na(e,t){if(!e)return hi;let n=new Map(t.map(t=>[t,e.style.getPropertyValue(t)]));return()=>{n.forEach((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)}),e.style.length===0&&e.removeAttribute(`style`)}}function ra(e){return e==null?null:G(e)?e:typeof e==`object`&&e&&`contextElement`in e&&e.contextElement?e.contextElement:e}function ia(e,t,n={}){let r=()=>(typeof t==`function`?t():t)??null,i=()=>{let t=typeof e==`function`?e():e;return n.getAnchorElement?.()??t},a=()=>{let e=i();return!e&&!n.getAnchorRect?null:Fi(e,n.getAnchorRect)},o=Object.assign({},Ui,n),s=[],c=null,l,u;function d(e){l?.(),u?.(),c=e,l=o.restoreStyles?na(e,ea):void 0;let t=e.querySelector(`[data-part=arrow]`);u=o.restoreStyles?na(t,ta):void 0,s=[Ji(t,o),Yi(o),Xi(o),qi(t,e.ownerDocument,o),Bi(t),Ri({gutter:o.gutter,offset:o.offset,overlap:o.overlap},t),Zi(o),Qi(o),zi]}let{placement:p,strategy:m,onComplete:h,onPositioned:g}=o,_,y,b=!1,x,S,C=hi,w=$i(o.listeners);function T(){if(!o.listeners)return;let e=i(),t=a(),n=r();!t||!n||(ra(e)!==ra(x)||n!==S)&&(C(),x=e,S=n,C=v(t,n,D,w))}async function E(){T();let e=r();if(!e)return;e!==c&&(d(e),b=!1);let t=a();if(!t)return;let n=await f(t,e,{placement:p,middleware:s,strategy:m});h?.(n);let i=er(e),l=Wi(i,n.x),u=Wi(i,n.y);if(Gi(_,l)||(e.style.setProperty(`--x`,`${l}px`),_=l),Gi(y,u)||(e.style.setProperty(`--y`,`${u}px`),y=u),o.hideWhenDetached&&(n.middlewareData.hide?.referenceHidden?(e.style.setProperty(`visibility`,`hidden`),e.style.setProperty(`pointer-events`,`none`)):(e.style.removeProperty(`visibility`),e.style.removeProperty(`pointer-events`))),!b){let t=e.firstElementChild;t&&(e.style.setProperty(`--z-index`,ar(t).zIndex),b=!0)}}async function D(){n.updatePosition?(await n.updatePosition({updatePosition:E,floatingElement:r()}),g?.({placed:!0})):await E()}return D(),()=>{C(),u?.(),l?.(),g?.({placed:!1})}}function aa(e,t,n={}){let{defer:r,...i}=n,a=r?K:e=>e(),o=[];return o.push(a(()=>{o.push(ia(e,t,i))})),()=>{o.forEach(e=>e?.())}}var oa={bottom:`rotate(45deg)`,left:`rotate(135deg)`,top:`rotate(225deg)`,right:`rotate(315deg)`};function sa(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:i=`absolute`}=e;return{arrow:{position:`absolute`,width:q.arrowSize.reference,height:q.arrowSize.reference,[q.arrowSizeHalf.variable]:`calc(${q.arrowSize.reference} / 2)`,[q.arrowOffset.variable]:`calc(${q.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?oa[t.split(`-`)[0]]:void 0,background:q.arrowBg.reference,top:`0`,left:`0`,width:`100%`,height:`100%`,position:`absolute`,zIndex:`inherit`},floating:{position:i,isolation:`isolate`,minWidth:n?void 0:`max-content`,width:n?`var(--reference-width)`:void 0,maxWidth:r?`var(--available-width)`:void 0,maxHeight:r?`var(--available-height)`:void 0,pointerEvents:t?void 0:`none`,top:`0px`,left:`0px`,transform:t?`translate3d(var(--x), var(--y), 0)`:`translate3d(0, -100vh, 0)`,zIndex:`var(--z-index)`}}}var ca=(e,t)=>e.ids?.label?.(t)??`datepicker:${e.id}:label:${t}`,la=e=>e.ids?.root??`datepicker:${e.id}`,ua=(e,t)=>e.ids?.table?.(t)??`datepicker:${e.id}:table:${t}`,da=e=>e.ids?.content??`datepicker:${e.id}:content`,fa=(e,t)=>e.ids?.cellTrigger?.(t)??`datepicker:${e.id}:cell-trigger:${t}`,pa=(e,t)=>e.ids?.prevTrigger?.(t)??`datepicker:${e.id}:prev:${t}`,ma=(e,t)=>e.ids?.nextTrigger?.(t)??`datepicker:${e.id}:next:${t}`,ha=(e,t)=>e.ids?.viewTrigger?.(t)??`datepicker:${e.id}:view:${t}`,ga=e=>e.ids?.clearTrigger??`datepicker:${e.id}:clear`,_a=e=>e.ids?.control??`datepicker:${e.id}:control`,va=(e,t)=>e.ids?.input?.(t)??`datepicker:${e.id}:input:${t}`,ya=e=>e.ids?.trigger??`datepicker:${e.id}:trigger`,ba=e=>e.ids?.positioner??`datepicker:${e.id}:positioner`,xa=e=>e.ids?.monthSelect??`datepicker:${e.id}:month-select`,Sa=e=>e.ids?.yearSelect??`datepicker:${e.id}:year-select`,Ca=(e,t)=>Gr(Ta(e),`[data-part=table-cell-trigger][data-view=${t}][data-focus]:not([data-outside-range])`),wa=e=>e.getById(ya(e)),Ta=e=>e.getById(da(e)),Ea=e=>Wr(ja(e),`[data-part=input]`),Da=e=>e.getById(Sa(e)),Oa=e=>e.getById(xa(e)),ka=e=>e.getById(ga(e)),Aa=e=>e.getById(ba(e)),ja=e=>e.getById(_a(e));function Ma(e,t,n){let r=[],i;return a=>{let o=e(a);return o.length!==r.length||o.some((e,t)=>!ti(r[t],e))?(r=o,i=t(o,a),n?.onChange?.(i),i):i}}var Na=`.`,Pa=`#`,Fa=new WeakMap,Ia=new WeakMap;function La(e){return e.join(Na)}function Ra(e){return e.includes(Na)}function za(e){return e.startsWith(Pa)}function Ba(e){return e.startsWith(Na)}function Va(e){return za(e)?e.slice(Pa.length):e}function Ha(e,t){return e?`${e}${Na}${t}`:t}function Ua(e){let t=new Map,n=new Map,r=(e,i)=>{t.set(e,i);let a=i.id;a&&(n.has(a)&&ji(`[zag-js] Duplicate state id: "${a}"`),n.set(a,e));let o=i.states;if(o){Mi(i.initial,()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`),i.initial in o||ji(`[zag-js] Compound state "${e}" has initial "${String(i.initial)}" which is not a child state`);for(let[t,n]of Object.entries(o))n&&r(Ha(e,t),n)}};for(let[t,n]of Object.entries(e.states))n&&r(t,n);return{index:t,idIndex:n}}function Wa(e){let t=Fa.get(e);if(t)return t;let{index:n,idIndex:r}=Ua(e);return Fa.set(e,n),Ia.set(e,r),n}function Ga(e,t){return Wa(e),Ia.get(e)?.get(t)}function Ka(e){return e?String(e).split(Na).filter(Boolean):[]}function qa(e,t){if(!t)return[];let n=Wa(e),r=Ka(t),i=[],a=[];for(let e of r){a.push(e);let t=La(a),r=n.get(t);if(!r)break;i.push({path:t,state:r})}return i}function Ja(e,t){let n=Wa(e),r=Ka(t);if(!r.length)return t;let i=[];for(let e of r){i.push(e);let r=La(i);if(!n.has(r))return t}let a=La(i),o=n.get(a);for(;o?.initial;){let e=`${a}${Na}${o.initial}`,t=n.get(e);if(!t)break;a=e,o=t}return a}function Ya(e,t){return Wa(e).has(t)}function Xa(e,t,n){let r=String(t);if(za(r)){let t=Va(r),n=Ga(e,t);return Mi(n,()=>`[zag-js] Unknown state id: "${t}"`),Ja(e,n)}if(Ba(r)&&n)return Ja(e,Ha(n,r.slice(1)));if(!Ra(r)&&n){let t=Ka(n);for(let n=t.length-1;n>=1;n--){let i=Ha(t.slice(0,n).join(Na),r);if(Ya(e,i))return Ja(e,i)}if(Ya(e,r))return Ja(e,r)}return Ja(e,r)}function Za(e,t,n){let r=qa(e,t);for(let e=r.length-1;e>=0;e--){let t=r[e]?.state.on?.[n];if(t)return{transitions:t,source:r[e]?.path}}return{transitions:e.on?.[n],source:void 0}}function Qa(e,t,n,r){let i=t?qa(e,t):[],a=qa(e,n),o=0;for(;o<i.length&&o<a.length&&i[o]?.path===a[o]?.path;)o+=1;let s=i.slice(o).reverse(),c=a.slice(o),l=i.at(-1)?.path===a.at(-1)?.path;return r&&l&&(s=i.slice().reverse(),c=a),{exiting:s,entering:c}}function $a(e,t){return e?e===t||e.startsWith(`${t}${Na}`):!1}function eo(e,t,n){return qa(e,t).some(e=>e.state.tags?.includes(n))}function to(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function no(e){return Wa(e),e}var ro=(e=>(e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e))(ro||{}),io=`__init__`;function ao(e){let t=()=>e.getRootNode?.()??document,n=()=>Qn(t()),r=()=>n().defaultView??window,i=()=>tr(t()),a=e=>t().getElementById(e);return{...e,getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:Xn,getById:a}}function oo(e){let[t,n]=e,r;return r=!t||!n||t.compare(n)<=0?e:[n,t],r}function so(e,t){let[n,r]=t;return!n||!r?!1:n.compare(e)<=0&&r.compare(e)>=0}function co(e){return e.slice().filter(e=>e!=null).sort((e,t)=>e.compare(t))}function lo(e){return _i(e,{year:`calendar decade`,month:`calendar year`,day:`calendar month`})}var uo={day:`dd`,month:`mm`,year:`yyyy`};function fo(e){return new z(e).formatToParts(new Date).map(e=>uo[e.type]??e.value).join(``)}var po=e=>!Number.isNaN(e.day)&&!Number.isNaN(e.month)&&!Number.isNaN(e.year),mo={dayCell(e){return e.unavailable?`Not available. ${e.valueText}`:e.firstInRange?`Starting range from ${e.valueText}`:e.lastInRange?`Range ending at ${e.valueText}`:e.selected?`Selected date. ${e.valueText}`:`Choose ${e.valueText}`},trigger(e){return e?`Close calendar`:`Open calendar`},viewTrigger(e){return _i(e,{year:`Switch to month view`,month:`Switch to day view`,day:`Switch to year view`})},presetTrigger(e){let[t=``,n=``]=e;return`select ${t} to ${n}`},prevTrigger(e){return _i(e,{year:`Switch to previous decade`,month:`Switch to previous year`,day:`Switch to previous month`})},nextTrigger(e){return _i(e,{year:`Switch to next decade`,month:`Switch to next year`,day:`Switch to next month`})},placeholder(){return{day:`dd`,month:`mm`,year:`yyyy`}},content:`calendar`,monthSelect:`Select month`,yearSelect:`Select year`,clearTrigger:`Clear selected dates`,weekColumnHeader:`Wk`,weekNumberCell(e){return`Week ${e}`}};function J(e,t){return e?e===`day`?0:e===`month`?1:2:t||0}function ho(e){return e===0?`day`:e===1?`month`:`year`}function go(e,t,n){return ho(Oi(J(e,0),J(t,0),J(n,2)))}function _o(e,t){return J(e,0)>J(t,0)}function vo(e,t){return J(e,0)<J(t,0)}function yo(e,t,n){return go(ho(J(e,0)+1),t,n)}function bo(e,t,n){return go(ho(J(e,0)-1),t,n)}var xo=[`day`,`month`,`year`];function So(e){xo.forEach(t=>e(t))}var Co=Ma(e=>[e.view,e.startValue.toString(),e.endValue.toString(),e.locale],([e],t)=>{let{startValue:n,endValue:r,locale:i,timeZone:a,selectionMode:o}=t;if(e===`year`){let e=_n(n.year,{strict:!0}),t=e.at(0).toString(),r=e.at(-1).toString();return{start:t,end:r,formatted:`${t} - ${r}`}}if(e===`month`){let e=new z(i,{year:`numeric`,timeZone:a,calendar:n.calendar.identifier}),t=e.format(n.toDate(a)),s=e.format(r.toDate(a));return{start:t,end:s,formatted:o===`range`?`${t} - ${s}`:t}}let s=new z(i,{month:`long`,year:`numeric`,timeZone:a,calendar:n.calendar.identifier}),c=s.format(n.toDate(a)),l=s.format(r.toDate(a));return{start:c,end:l,formatted:o===`range`?`${c} - ${l}`:c}});function wo(e,t){let{state:n,context:r,prop:i,send:a,computed:o,scope:s}=e,c=r.get(`startValue`),l=o(`endValue`),u=r.get(`value`),d=r.get(`focusedValue`),f=r.get(`hoveredValue`),p=f?oo([u[0],f]):[],m=!!i(`disabled`),h=!!i(`readOnly`),g=!!i(`invalid`),_=o(`isInteractive`),v=u.length===0,y=i(`min`),b=i(`max`),x=i(`locale`),S=i(`timeZone`),w=i(`startOfWeek`),T=n.matches(`focused`),E=n.matches(`open`),D=i(`selectionMode`)===`range`,ee=i(`selectionMode`)===`multiple`,te=i(`isDateUnavailable`),ne=i(`maxSelectedDates`),re=ee&&ne!=null&&u.length>=ne,ie=r.get(`currentPlacement`),ae=ie?Hi(ie):void 0,oe=sa({...i(`positioning`),placement:ie}),ue=Dn(x),k={...mo,...i(`translations`)};function fe(e=c){return on(e,x,i(`fixedWeeks`)?6:void 0,w)}function pe(e={}){let{format:t}=e;return ln(x,t,d).map((e,t)=>{let n=t+1;return{label:e,value:n,disabled:H(d.set({month:n}),y,b)}})}function me(){return dn(mn(d,y,b)).map(e=>({label:e.toString(),value:e,disabled:!Di(e,y?.year,b?.year)}))}function he(e){return Gt(e,te,x,y,b)}function ge(e){a({type:`FOCUS.SET`,value:(c??vn(S,d.calendar)).set({month:e})})}function _e(e){a({type:`FOCUS.SET`,value:(c??vn(S,d.calendar)).set({year:e})})}function ve(e){let{value:t,disabled:n}=e,r=d.set({year:t}),i=!_n(c.year,{strict:!0}).includes(t),a=Di(t,y?.year,b?.year),o=D&&so(r,u),s=D&&u[0]&&le(r,u[0]),l=D&&u[1]&&le(r,u[1]),f=D&&p.length>0,m=f&&so(r,p),h=f&&p[0]&&le(r,p[0]),g=f&&p[1]&&le(r,p[1]),_={focused:d.year===e.value,selectable:!i&&a,outsideRange:i,selected:!!u.find(e=>e&&e.year===t),valueText:t.toString(),inRange:o||m,firstInRange:!!s,lastInRange:!!l,inHoveredRange:!!m,firstInHoveredRange:!!h,lastInHoveredRange:!!g,value:r,get disabled(){return n||!_.selectable}};return _}function ye(e){let{value:t,disabled:n}=e,r=d.set({month:t}),i=Qt(x,S,d),a=D&&so(r,u),o=D&&u[0]&&ce(r,u[0]),s=D&&u[1]&&ce(r,u[1]),c=D&&p.length>0,l=c&&so(r,p),f=c&&p[0]&&ce(r,p[0]),m=c&&p[1]&&ce(r,p[1]),h={focused:d.month===e.value,selectable:!H(r,y,b),selected:!!u.find(e=>e&&e.month===t&&e.year===d.year),valueText:i.format(r.toDate(S)),inRange:a||l,firstInRange:!!o,lastInRange:!!s,inHoveredRange:!!l,firstInHoveredRange:!!f,lastInHoveredRange:!!m,outsideRange:!1,value:r,get disabled(){return n||!h.selectable}};return h}function be(e){let{value:t,disabled:n,visibleRange:r=o(`visibleRange`)}=e,a=Zt(x,S,d),s=Jt(o(`visibleDuration`)),c=i(`outsideDaySelectable`),l=r.start.add(s).subtract({days:1}),f=H(t,r.start,l),m=D&&so(t,u),h=D&&u[0]&&O(t,u[0]),g=D&&u[1]&&O(t,u[1]),_=D&&p.length>0,v=_&&so(t,p),C=_&&p[0]&&O(t,p[0]),w=_&&p[1]&&O(t,p[1]),T=u.some(e=>e!=null&&O(t,e)),E={invalid:H(t,y,b),disabled:n||!c&&f||H(t,y,b)||re&&!T,selected:T,unavailable:Gt(t,te,x,y,b)&&!n,outsideRange:f,today:de(t,S),weekend:Pe(t,x),value:t,valueText:a.format(t.toDate(S)),get focused(){return d!=null&&O(t,d)&&(!E.outsideRange||c)},get selectable(){return!E.disabled&&!E.unavailable},inRange:m||v,firstInRange:h,lastInRange:g,inHoveredRange:v,firstInHoveredRange:C,lastInHoveredRange:w};return E}function xe(e){let{view:t=`day`,id:n}=e;return[t,n].filter(Boolean).join(` `)}return{focused:T,open:E,disabled:m,invalid:g,readOnly:h,inline:!!i(`inline`),numOfMonths:i(`numOfMonths`),showWeekNumbers:!!i(`showWeekNumbers`),selectionMode:i(`selectionMode`),maxSelectedDates:ne,isMaxSelected:re,view:r.get(`view`),getRangePresetValue(e){return Pn(e,x,S)},getWeekNumber(e){let t=e[0];return t?un(t,x):0},getDaysInWeek(e,t=c){return an(e,t,x,w)},getOffset(e){let t=c.add(e),n=l.add(e),r=Qt(x,S,d);return{visibleRange:{start:t,end:n},weeks:fe(t),visibleRangeText:{start:r.format(t.toDate(S)),end:r.format(n.toDate(S))}}},getMonthWeeks:fe,isUnavailable:he,weeks:fe(),weekDays:cn(c,w,S,x),visibleRangeText:o(`visibleRangeText`),value:u,valueAsDate:u.filter(e=>e!=null).map(e=>e.toDate(S)),valueAsString:o(`valueAsString`),focusedValue:d,focusedValueAsDate:d?.toDate(S),focusedValueAsString:i(`format`)(d,{locale:x,timeZone:S}),visibleRange:o(`visibleRange`),selectToday(){a({type:`VALUE.SET`,value:[B(vn(S,d.calendar),y,b)]})},setValue(e){a({type:`VALUE.SET`,value:e.map(e=>B(e,y,b))})},setTime(e,t=0){let n=Array.from(u),r=n[t];r&&(`hour`in r||(r=F(r)),r=r.set({hour:e.hour??(`hour`in r?r.hour:0),minute:e.minute??(`minute`in r?r.minute:0),second:e.second??(`second`in r?r.second:0),millisecond:e.millisecond??(`millisecond`in r?r.millisecond:0)}),n[t]=B(r,y,b),a({type:`VALUE.SET`,value:n}))},clearValue(e={}){let{focus:t=!0}=e;a({type:`VALUE.CLEAR`,focus:t})},setFocusedValue(e){a({type:`FOCUS.SET`,value:e})},setOpen(e){i(`inline`)||n.matches(`open`)!==e&&a({type:e?`OPEN`:`CLOSE`})},focusMonth:ge,focusYear:_e,getYears:me,getMonths:pe,getYearsGrid(e={}){let{columns:t=1}=e;return Qr(_n(c.year,{strict:!0}).map(e=>({label:e.toString(),value:e,disabled:!Di(e,y?.year,b?.year)})),t)},getDecade(){let e=_n(c.year,{strict:!0});return{start:e.at(0),end:e.at(-1)}},getMonthsGrid(e={}){let{columns:t=1,format:n}=e;return Qr(pe({format:n}),t)},format(e,t={month:`long`,year:`numeric`}){return new z(x,{...t,calendar:e.calendar.identifier}).format(e.toDate(S))},setView(e){a({type:`VIEW.SET`,view:e})},goToNext(){a({type:`GOTO.NEXT`,view:r.get(`view`)})},goToPrev(){a({type:`GOTO.PREV`,view:r.get(`view`)})},getRootProps(){return t.element({...C.root.attrs,dir:i(`dir`),id:la(s),"data-state":E?`open`:`closed`,"data-disabled":U(m),"data-readonly":U(h),"data-empty":U(v)})},getLabelProps(e={}){let{index:n=0}=e;return t.label({...C.label.attrs,id:ca(s,n),dir:i(`dir`),htmlFor:va(s,n),"data-state":E?`open`:`closed`,"data-index":n,"data-disabled":U(m),"data-readonly":U(h)})},getControlProps(){return t.element({...C.control.attrs,dir:i(`dir`),id:_a(s),"data-disabled":U(m),"data-placeholder-shown":U(v)})},getRangeTextProps(){return t.element({...C.rangeText.attrs,dir:i(`dir`)})},getContentProps(){return t.element({...C.content.attrs,hidden:!E,dir:i(`dir`),"data-state":E?`open`:`closed`,"data-placement":ie,"data-side":ae,"data-inline":U(i(`inline`)),id:da(s),tabIndex:-1,role:`application`,"aria-roledescription":`datepicker`,"aria-label":k.content})},getTableProps(e={}){let{view:n=`day`,columns:r=n===`day`?7:4}=e,o=xe(e);return t.element({...C.table.attrs,role:`grid`,"data-columns":r,"aria-roledescription":lo(n),id:ua(s,o),"aria-readonly":W(h),"aria-disabled":W(m),"aria-multiselectable":W(i(`selectionMode`)!==`single`),"data-view":n,dir:i(`dir`),tabIndex:-1,onKeyDown(e){if(e.defaultPrevented)return;let t={Enter(){n===`day`&&he(d)||n===`month`&&!ye({value:d.month}).selectable||n===`year`&&!ve({value:d.year}).selectable||a({type:`TABLE.ENTER`,view:n,columns:r,focus:!0})},ArrowLeft(){a({type:`TABLE.ARROW_LEFT`,view:n,columns:r,focus:!0})},ArrowRight(){a({type:`TABLE.ARROW_RIGHT`,view:n,columns:r,focus:!0})},ArrowUp(){a({type:`TABLE.ARROW_UP`,view:n,columns:r,focus:!0})},ArrowDown(){a({type:`TABLE.ARROW_DOWN`,view:n,columns:r,focus:!0})},PageUp(e){a({type:`TABLE.PAGE_UP`,larger:e.shiftKey,view:n,columns:r,focus:!0})},PageDown(e){a({type:`TABLE.PAGE_DOWN`,larger:e.shiftKey,view:n,columns:r,focus:!0})},Home(){a({type:`TABLE.HOME`,view:n,columns:r,focus:!0})},End(){a({type:`TABLE.END`,view:n,columns:r,focus:!0})}}[wr(e,{dir:i(`dir`)})];t&&(t(e),e.preventDefault(),e.stopPropagation())},onPointerLeave(){a({type:`TABLE.POINTER_LEAVE`})},onPointerDown(){a({type:`TABLE.POINTER_DOWN`,view:n})},onPointerUp(){a({type:`TABLE.POINTER_UP`,view:n})}})},getTableHeadProps(e={}){let{view:n=`day`}=e;return t.element({...C.tableHead.attrs,"aria-hidden":!0,dir:i(`dir`),"data-view":n,"data-disabled":U(m)})},getTableHeaderProps(e={}){let{view:n=`day`}=e;return t.element({...C.tableHeader.attrs,dir:i(`dir`),"data-view":n,"data-disabled":U(m)})},getTableBodyProps(e={}){let{view:n=`day`}=e;return t.element({...C.tableBody.attrs,"data-view":n,"data-disabled":U(m)})},getTableRowProps(e={}){let{view:n=`day`}=e;return t.element({...C.tableRow.attrs,"aria-disabled":W(m),"data-disabled":U(m),"data-view":n})},getWeekNumberHeaderCellProps(e={}){let{view:n=`day`}=e;return t.element({...C.tableCell.attrs,scope:`col`,"aria-label":k.weekColumnHeader,"data-view":n,"data-type":`week-number`,"data-disabled":U(m)})},getWeekNumberCellProps(e){let{weekIndex:n,week:r}=e,i=r[0]?un(r[0],x):0;return t.element({...C.tableCell.attrs,role:`rowheader`,"aria-label":k.weekNumberCell?.(i),"data-view":`day`,"data-week-index":n,"data-type":`week-number`,"data-disabled":U(m)})},getDayTableCellState:be,getDayTableCellProps(e){let{value:n}=e,r=be(e);return t.element({...C.tableCell.attrs,role:`gridcell`,"aria-disabled":W(!r.selectable),"aria-selected":r.selected||r.inRange,"aria-invalid":W(r.invalid),"aria-current":r.today?`date`:void 0,"data-value":n.toString()})},getDayTableCellTriggerProps(e){let{value:n}=e,r=be(e);return t.element({...C.tableCellTrigger.attrs,id:fa(s,n.toString()),role:`button`,dir:i(`dir`),tabIndex:r.focused?0:-1,"aria-label":k.dayCell(r),"aria-disabled":W(!r.selectable),"aria-invalid":W(r.invalid),"data-disabled":U(!r.selectable),"data-selectable":U(r.selectable),"data-selected":U(r.selected),"data-value":n.toString(),"data-view":`day`,"data-today":U(r.today),"data-focus":U(r.focused),"data-unavailable":U(r.unavailable),"data-range-start":U(r.firstInRange),"data-range-end":U(r.lastInRange),"data-in-range":U(r.inRange),"data-outside-range":U(r.outsideRange),"data-weekend":U(r.weekend),"data-in-hover-range":U(r.inHoveredRange),"data-hover-range-start":U(r.firstInHoveredRange),"data-hover-range-end":U(r.lastInHoveredRange),onClick(e){e.defaultPrevented||r.selectable&&a({type:`CELL.CLICK`,cell:`day`,value:n})},onPointerMove:D?e=>{if(e.pointerType===`touch`||!r.selectable)return;let t=!s.isActiveElement(e.currentTarget);f&&se(n,f)||a({type:`CELL.POINTER_MOVE`,cell:`day`,value:n,focus:t,outsideRange:r.outsideRange})}:void 0})},getMonthTableCellState:ye,getMonthTableCellProps(e){let{value:n,columns:r}=e,a=ye(e);return t.element({...C.tableCell.attrs,dir:i(`dir`),colSpan:r,role:`gridcell`,"aria-selected":W(a.selected||a.inRange),"data-selected":U(a.selected),"aria-disabled":W(!a.selectable),"data-value":n})},getMonthTableCellTriggerProps(e){let{value:n}=e,r=ye(e);return t.element({...C.tableCellTrigger.attrs,id:fa(s,n.toString()),role:`button`,dir:i(`dir`),tabIndex:r.focused?0:-1,"aria-label":r.valueText,"aria-disabled":W(!r.selectable),"data-disabled":U(!r.selectable),"data-selectable":U(r.selectable),"data-selected":U(r.selected),"data-value":n,"data-view":`month`,"data-focus":U(r.focused),"data-outside-range":U(r.outsideRange),"data-range-start":U(r.firstInRange),"data-range-end":U(r.lastInRange),"data-in-range":U(r.inRange),"data-in-hover-range":U(r.inHoveredRange),"data-hover-range-start":U(r.firstInHoveredRange),"data-hover-range-end":U(r.lastInHoveredRange),onClick(e){e.defaultPrevented||r.selectable&&a({type:`CELL.CLICK`,cell:`month`,value:n})},onPointerMove:D?e=>{if(e.pointerType===`touch`||!r.selectable)return;let t=!s.isActiveElement(e.currentTarget);f&&r.value&&ce(r.value,f)||a({type:`CELL.POINTER_MOVE`,cell:`month`,value:r.value,focus:t})}:void 0})},getYearTableCellState:ve,getYearTableCellProps(e){let{value:n,columns:r}=e,a=ve(e);return t.element({...C.tableCell.attrs,dir:i(`dir`),colSpan:r,role:`gridcell`,"aria-selected":W(a.selected||a.inRange),"data-selected":U(a.selected),"aria-disabled":W(!a.selectable),"data-value":n})},getYearTableCellTriggerProps(e){let{value:n}=e,r=ve(e);return t.element({...C.tableCellTrigger.attrs,id:fa(s,n.toString()),role:`button`,dir:i(`dir`),tabIndex:r.focused?0:-1,"aria-label":r.valueText,"aria-disabled":W(!r.selectable),"data-disabled":U(!r.selectable),"data-selectable":U(r.selectable),"data-selected":U(r.selected),"data-value":n,"data-view":`year`,"data-focus":U(r.focused),"data-outside-range":U(r.outsideRange),"data-range-start":U(r.firstInRange),"data-range-end":U(r.lastInRange),"data-in-range":U(r.inRange),"data-in-hover-range":U(r.inHoveredRange),"data-hover-range-start":U(r.firstInHoveredRange),"data-hover-range-end":U(r.lastInHoveredRange),onClick(e){e.defaultPrevented||r.selectable&&a({type:`CELL.CLICK`,cell:`year`,value:n})},onPointerMove:D?e=>{if(e.pointerType===`touch`||!r.selectable)return;let t=!s.isActiveElement(e.currentTarget);f&&r.value&&le(r.value,f)||a({type:`CELL.POINTER_MOVE`,cell:`year`,value:r.value,focus:t})}:void 0})},getNextTriggerProps(e={}){let{view:n=`day`}=e,r=m||!o(`isNextVisibleRangeValid`);return t.button({...C.nextTrigger.attrs,dir:i(`dir`),id:ma(s,n),type:`button`,"aria-label":k.nextTrigger(n),disabled:r,"data-disabled":U(r),onClick(e){e.defaultPrevented||a({type:`GOTO.NEXT`,view:n})}})},getPrevTriggerProps(e={}){let{view:n=`day`}=e,r=m||!o(`isPrevVisibleRangeValid`);return t.button({...C.prevTrigger.attrs,dir:i(`dir`),id:pa(s,n),type:`button`,"aria-label":k.prevTrigger(n),disabled:r,"data-disabled":U(r),onClick(e){e.defaultPrevented||a({type:`GOTO.PREV`,view:n})}})},getClearTriggerProps(){return t.button({...C.clearTrigger.attrs,id:ga(s),dir:i(`dir`),type:`button`,"aria-label":k.clearTrigger,hidden:!u.length,onClick(e){e.defaultPrevented||a({type:`VALUE.CLEAR`})}})},getTriggerProps(){return t.button({...C.trigger.attrs,id:ya(s),dir:i(`dir`),type:`button`,"data-placement":ie,"data-side":ae,"aria-label":k.trigger(E),"aria-controls":da(s),"aria-expanded":E,"data-state":E?`open`:`closed`,"data-placeholder-shown":U(v),"aria-haspopup":`grid`,disabled:m,onClick(e){e.defaultPrevented||_&&a({type:`TRIGGER.CLICK`})}})},getViewProps(e={}){let{view:n=`day`}=e;return t.element({...C.view.attrs,"data-view":n,hidden:r.get(`view`)!==n})},getViewTriggerProps(e={}){let{view:n=`day`}=e;return t.button({...C.viewTrigger.attrs,"data-view":n,dir:i(`dir`),id:ha(s,n),type:`button`,disabled:m,"aria-label":k.viewTrigger(n),onClick(e){e.defaultPrevented||_&&a({type:`VIEW.TOGGLE`,src:`viewTrigger`})}})},getViewControlProps(e={}){let{view:n=`day`}=e;return t.element({...C.viewControl.attrs,"data-view":n,dir:i(`dir`)})},getInputProps(e={}){let{index:n=0,fixOnBlur:r=!0}=e;return t.input({...C.input.attrs,id:va(s,n),autoComplete:`off`,autoCorrect:`off`,spellCheck:`false`,dir:i(`dir`),name:i(`name`),"data-index":n,"data-state":E?`open`:`closed`,"data-placeholder-shown":U(v),readOnly:h,disabled:m,required:i(`required`),"aria-invalid":W(g),"data-invalid":U(g),placeholder:i(`placeholder`)||fo(x),defaultValue:o(`valueAsString`)[n],onBeforeInput(e){let{data:t}=Tr(e);wn(t,ue)||e.preventDefault()},onClick(e){e.defaultPrevented||i(`openOnClick`)&&_&&a({type:`OPEN`,src:`input.click`})},onFocus(){a({type:`INPUT.FOCUS`,index:n})},onBlur(e){a({type:`INPUT.BLUR`,value:e.currentTarget.value.trim(),index:n,fixOnBlur:r})},onKeyDown(e){if(e.defaultPrevented||!_)return;let t={Enter(e){br(e)||he(d)||e.currentTarget.value.trim()!==``&&a({type:`INPUT.ENTER`,value:e.currentTarget.value,index:n})}}[e.key];t&&(t(e),e.preventDefault())},onInput(e){let t=e.currentTarget.value;a({type:`INPUT.CHANGE`,value:Tn(t,ue),index:n})}})},getMonthSelectProps(){return t.select({...C.monthSelect.attrs,id:xa(s),"aria-label":k.monthSelect,disabled:m,dir:i(`dir`),defaultValue:c.month,onChange(e){ge(Number(e.currentTarget.value))}})},getYearSelectProps(){return t.select({...C.yearSelect.attrs,id:Sa(s),disabled:m,"aria-label":k.yearSelect,dir:i(`dir`),defaultValue:c.year,onChange(e){_e(Number(e.currentTarget.value))}})},getPositionerProps(){return t.element({id:ba(s),...C.positioner.attrs,dir:i(`dir`),style:oe.floating})},getPresetTriggerProps(e){let n=Array.isArray(e.value)?e.value:Pn(e.value,x,S),r=n.filter(e=>e!=null).map(e=>e.toDate(S).toDateString());return t.button({...C.presetTrigger.attrs,"aria-label":k.presetTrigger(r),type:`button`,onClick(e){e.defaultPrevented||a({type:`PRESET.CLICK`,value:n})}})}}}function To(e){let t={each(t){for(let n=0;n<e.frames?.length;n+=1){let r=e.frames[n];r&&t(r)}},addEventListener(e,n,r){return t.each(t=>{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function Eo(e){let t=e.frameElement==null?null:e.parent;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var Do=`pointerdown.outside`,Oo=`focus.outside`;function ko(e){for(let t of e)if(G(t)&&jr(t))return!0;return!1}var Ao=e=>`clientY`in e;function jo(e,t){if(!Ao(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function Mo(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function No(e,t){if(!t||!Ao(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return Mo({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function Po(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o,followControlledElements:s=!0}=t;if(!e)return;let c=Qn(e),l=er(e),u=To(l),d=Eo(l);function f(t,r){if(!G(r)||!r.isConnected||Zn(e,r)||jo(e,t)||s&&lr(e,r))return!1;let i=c.querySelector(`[aria-controls="${e.id}"]`);return i&&No(t,Pr(i))||No(t,Pr(e))?!1:!n?.(r)}let p=new Set,m=Jn(e?.getRootNode()),h=!1;function g(t){h=!0;let n=()=>{h=!1};c.addEventListener(`pointerup`,n,{once:!0}),l.addEventListener(`pointerup`,n,{once:!0});function r(n){let r=o&&!pr()?K:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=m?c[0]:yr(t);if(!(!e||!f(t,n))){if(i||a){let t=gi(i,a);e.addEventListener(Do,t,{once:!0})}Io(e,Do,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:xr(s),focusable:ko(c),target:n}})}})}t.pointerType===`touch`?(p.forEach(e=>e()),p.add(Er(c,`click`,r,{once:!0})),p.add(d.addEventListener(`click`,r,{once:!0})),p.add(u.addEventListener(`click`,r,{once:!0}))):r()}let _=new Set,v=setTimeout(()=>{_.add(Er(c,`pointerdown`,g,!0)),_.add(d.addEventListener(`pointerdown`,g,!0)),_.add(u.addEventListener(`pointerdown`,g,!0))},0);function y(t){h||(o?K:e=>e())(()=>{let n=t?.composedPath?.()??[t?.target],i=m?n[0]:yr(t);if(!(!e||!f(t,i))){if(r||a){let t=gi(r,a);e.addEventListener(Oo,t,{once:!0})}Io(e,Oo,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:jr(i),target:i}})}})}return pr()||(_.add(Er(c,`focusin`,y,!0)),_.add(d.addEventListener(`focusin`,y,!0)),_.add(u.addEventListener(`focusin`,y,!0))),()=>{clearTimeout(v),p.forEach(e=>e()),_.forEach(e=>e())}}function Fo(e,t){let{defer:n}=t,r=n?K:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(Po(n,t))})),()=>{i.forEach(e=>e?.())}}function Io(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function Lo(e,t){return Er(Qn(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var Ro=`layer:request-dismiss`,Y={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(e=>Zn(e.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>Zn(t,e))},add(e){let t=this.indexOf(e.node);t!==-1&&this.layers.splice(t,1),this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.layers[t].styleTargets?.forEach(e=>{let t=e();t&&Bo(t)}),this.recentlyRemoved.add(e),Nr(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(t=>Y.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{zo(e,t,e.node),e.styleTargets?.forEach(n=>{let r=n();if(!r||r===e.node)return;zo(e,t,r);let{zIndex:i}=ar(e.node);r.style.setProperty(`--z-index`,i)})})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];Ho(e,Ro,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),Vo(e,Ro,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function zo(e,t,n){n.style.setProperty(`--layer-index`,`${t}`),n.removeAttribute(`data-nested`),n.removeAttribute(`data-has-nested`),Y.getParentLayerOfType(e.node,e.type)&&n.setAttribute(`data-nested`,e.type);let r=Y.countNestedLayersOfType(e.node,e.type);r>0&&n.setAttribute(`data-has-nested`,e.type),n.style.setProperty(`--nested-layer-count`,`${r}`)}function Bo(e){e.style.removeProperty(`--layer-index`),e.style.removeProperty(`--nested-layer-count`),e.style.removeProperty(`--z-index`),e.removeAttribute(`data-nested`),e.removeAttribute(`data-has-nested`)}function Vo(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function Ho(e,t,n){e.addEventListener(t,n,{once:!0})}var Uo=new WeakMap,Wo=new WeakMap;function Go(e){return Y.isBelowPointerBlockingLayer(e)?`none`:`auto`}function Ko(e){let t=Go(e);e.style.pointerEvents!==t&&(e.style.pointerEvents=t)}function qo(e){if(Wo.has(e))return;let t=er(e);if(t.MutationObserver===void 0)return;let n=new t.MutationObserver(()=>{Wo.has(e)&&Ko(e)});n.observe(e,{attributes:!0,attributeFilter:[`style`]}),Wo.set(e,n)}function Jo(){Y.layers.forEach(({node:e})=>{Ko(e),qo(e)})}function Yo(e){let t=Wo.get(e);t&&(t.disconnect(),Wo.delete(e)),e.style.pointerEvents=``}function Xo(e,t){let n=Qn(e),r=[];return Y.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(Uo.set(n.body,n.body.style.pointerEvents),queueMicrotask(()=>{let e=n.body;e&&(e.style.pointerEvents=`none`,e.setAttribute(`data-inert`,``))})),t?.forEach(e=>{let[t,n]=Yr(()=>{let t=e();return G(t)?t:null},{timeout:1e3});t.then(e=>r.push(Kr(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{Y.hasPointerBlockingLayer()||(queueMicrotask(()=>{let e=n.body;if(!e)return;let t=Uo.get(e);t!==void 0&&(e.style.pointerEvents=t,Uo.delete(e)),e.removeAttribute(`data-inert`),e.style.length===0&&e.removeAttribute(`style`)}),r.forEach(e=>e()))}}function Zo(e,t){let{warnOnMissingNode:n=!0}=t;if(n&&!e){Ai("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:r,onRequestDismiss:i,pointerBlocking:a,exclude:o,debug:s,type:c=`dialog`,layerStyleTargets:l}=t,u={dismiss:r,node:e,type:c,pointerBlocking:a,requestDismiss:i,styleTargets:l};Y.add(u),Jo();function d(n){let i=yr(n.detail.originalEvent);Y.isBelowPointerBlockingLayer(e)||Y.isInBranch(i)||(t.onPointerDownOutside?.(n),t.onInteractOutside?.(n),!n.defaultPrevented&&(s&&console.log(`onPointerDownOutside:`,n.detail.originalEvent),r?.()))}function f(e){let n=yr(e.detail.originalEvent);Y.isInBranch(n)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),!e.defaultPrevented&&(s&&console.log(`onFocusOutside:`,e.detail.originalEvent),r?.()))}function p(n){Y.isTopMost(e)&&(t.onEscapeKeyDown?.(n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))}function m(n){if(!e)return!1;let r=typeof o==`function`?o():o,i=Array.isArray(r)?r:[r],a=t.persistentElements?.map(e=>e()).filter(G);return a&&i.push(...a),i.some(e=>Zn(e,n))||Y.isInNestedLayer(e,n)}let h=[a?Xo(e,t.persistentElements):void 0,Lo(e,p),Fo(e,{exclude:m,onFocusOutside:f,onPointerDownOutside:d,defer:t.defer})];return()=>{Y.remove(e),Jo(),Yo(e),h.forEach(e=>e?.())}}function Qo(e,t){let{defer:n}=t,r=n?K:e=>e(),i=[];return i.push(r(()=>{let n=ii(e)?e():e;i.push(Zo(n,t))})),()=>{i.forEach(e=>e?.())}}var $o=`__live-region__`,es=`__live-region-debug__`,ts=`position:fixed;inset-inline:0;bottom:0;z-index:2147483647;padding:12px 16px;background:black;color:white;font-size:14px;line-height:20px;text-align:center;pointer-events:none;`;function ns(e={}){let{level:t=`polite`,document:n=document,root:r,delay:i=0,debug:a=!1}=e,o=n.defaultView??window,s=r??n.body;function c(){if(!a)return;let e=n.getElementById(es);return e||(e=n.createElement(`div`),e.id=es,e.dataset.liveAnnouncerDebug=`true`,e.setAttribute(`aria-hidden`,`true`),e.style.cssText=ts,s.appendChild(e),e)}function l(e,r){n.getElementById($o)?.remove(),r??=i;let a=n.createElement(`span`);a.id=$o,a.dataset.liveAnnouncer=`true`;let l=t===`assertive`?`alert`:`status`;a.setAttribute(`aria-live`,t),a.setAttribute(`role`,l),Object.assign(a.style,{border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`}),s.appendChild(a),o.setTimeout(()=>{if(!a.isConnected)return;a.textContent=e;let t=c();t&&(t.textContent=e)},r)}function u(){n.getElementById($o)?.remove(),n.getElementById(es)?.remove()}return{announce:l,destroy:u,toJSON(){return $o}}}var{and:X}=to();function rs(e,t){if(e?.length!==t?.length)return!1;let n=Math.max(e.length,t.length);for(let r=0;r<n;r++)if(!V(e[r],t[r]))return!1;return!0}function is(e,t){return e.map(e=>e==null?``:t(`format`)(e,{locale:t(`locale`),timeZone:t(`timeZone`)}))}var as=no({props({props:e}){let t=e.locale||`en-US`,n=e.timeZone||`UTC`,r=e.selectionMode||`single`,i=e.numOfMonths||1,a;if(e.createCalendar){let n=new Intl.DateTimeFormat(t).resolvedOptions().calendar;n!==`gregory`&&n!==`iso8601`&&(a=e.createCalendar(n))}let o=e=>!a||e.calendar.identifier===a.identifier?e:I(e,a),s=e.defaultValue?co(e.defaultValue).map(t=>B(o(t),e.min,e.max)):void 0,c=e.value?co(e.value).map(t=>B(o(t),e.min,e.max)):void 0,l=e.focusedValue||e.defaultFocusedValue||c?.[0]||s?.[0]||vn(n,a);l=B(o(l),e.min,e.max);let u=`year`;return{locale:t,numOfMonths:i,timeZone:n,selectionMode:r,defaultView:go(e.view||`day`,`day`,u),minView:`day`,maxView:u,outsideDaySelectable:!1,closeOnSelect:!0,format(e,{locale:t,timeZone:n}){return new z(t,{timeZone:n,day:`2-digit`,month:`2-digit`,year:`numeric`,calendar:a?.identifier}).format(e.toDate(n))},parse(e,{locale:t,timeZone:n}){return jn(e,t,n)},...e,focusedValue:e.focusedValue===void 0?void 0:l,defaultFocusedValue:l,value:c,defaultValue:s??[],positioning:{placement:`bottom`,...e.positioning}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)||e(`inline`)?`open`:`idle`},refs(){return{announcer:void 0}},context({prop:e,bindable:t,getContext:n}){return{focusedValue:t(()=>({defaultValue:e(`defaultFocusedValue`),value:e(`focusedValue`),isEqual:V,hash:e=>e.toString(),sync:!0,onChange(t){let r=n(),i=r.get(`view`),a=r.get(`value`),o=is(a,e);e(`onFocusChange`)?.({value:a,valueAsString:o,view:i,focusedValue:t})}})),value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:rs,hash:e=>e.map(e=>e?.toString()??``).join(`,`),onChange(t){let r=n(),i=is(t,e);e(`onValueChange`)?.({value:t,valueAsString:i,view:r.get(`view`)})}})),inputValue:t(()=>({defaultValue:``})),activeIndex:t(()=>({defaultValue:0,sync:!0})),hoveredValue:t(()=>({defaultValue:null,isEqual:V})),view:t(()=>({defaultValue:e(`defaultView`),value:e(`view`),onChange(t){e(`onViewChange`)?.({view:t})}})),startValue:t(()=>({defaultValue:Wt(e(`focusedValue`)||e(`defaultFocusedValue`),`start`,{months:e(`numOfMonths`)},e(`locale`)),isEqual:V,hash:e=>e.toString()})),currentPlacement:t(()=>({defaultValue:void 0})),restoreFocus:t(()=>({defaultValue:!1}))}},computed:{isInteractive:({prop:e})=>!e(`disabled`)&&!e(`readOnly`),visibleDuration:({prop:e})=>({months:e(`numOfMonths`)}),endValue:({context:e,computed:t})=>Yt(e.get(`startValue`),t(`visibleDuration`)),visibleRange:({context:e,computed:t})=>({start:e.get(`startValue`),end:t(`endValue`)}),visibleRangeText:({context:e,prop:t,computed:n})=>Co({view:e.get(`view`),startValue:e.get(`startValue`),endValue:n(`endValue`),locale:t(`locale`),timeZone:t(`timeZone`),selectionMode:t(`selectionMode`)}),isPrevVisibleRangeValid:({context:e,prop:t})=>!Kt(e.get(`startValue`),t(`min`),t(`max`)),isNextVisibleRangeValid:({prop:e,computed:t})=>!qt(t(`endValue`),e(`min`),e(`max`)),valueAsString:({context:e,prop:t})=>is(e.get(`value`),t)},effects:[`setupLiveRegion`],watch({track:e,prop:t,context:n,action:r,computed:i}){e([()=>t(`locale`)],()=>{r([`setStartValue`,`syncInputElement`])}),e([()=>n.hash(`focusedValue`)],()=>{r([`setStartValue`,`focusActiveCellIfNeeded`,`setHoveredValueIfKeyboard`])}),e([()=>n.hash(`startValue`)],()=>{r([`syncMonthSelectElement`,`syncYearSelectElement`,`invokeOnVisibleRangeChange`])}),e([()=>n.get(`inputValue`)],()=>{r([`syncInputValue`])}),e([()=>n.hash(`value`)],()=>{r([`syncInputElement`])}),e([()=>i(`valueAsString`).toString()],()=>{r([`announceValueText`])}),e([()=>n.get(`view`)],()=>{r([`focusActiveCell`])}),e([()=>t(`open`)],()=>{r([`toggleVisibility`])})},on:{"VALUE.SET":{actions:[`setDateValue`,`setFocusedDate`]},"VIEW.SET":{actions:[`setView`]},"FOCUS.SET":{actions:[`setFocusedDate`]},"VALUE.CLEAR":{actions:[`clearDateValue`,`clearFocusedDate`,`setActiveIndexToStart`,`clearHoveredDate`,`focusFirstInputElement`]},"INPUT.CHANGE":[{guard:`isInputValueEmpty`,actions:[`setInputValue`,`clearDateValue`,`clearFocusedDate`]},{actions:[`setInputValue`,`focusParsedDate`]}],"INPUT.ENTER":{actions:[`focusParsedDate`,`selectFocusedDate`]},"INPUT.FOCUS":{actions:[`setActiveIndex`]},"INPUT.BLUR":[{guard:`shouldFixOnBlur`,actions:[`setActiveIndexToStart`,`selectParsedDate`]},{actions:[`setActiveIndexToStart`]}],"PRESET.CLICK":[{guard:`isOpenControlled`,actions:[`setDateValue`,`setFocusedDate`,`invokeOnClose`]},{target:`focused`,actions:[`setDateValue`,`setFocusedDate`,`focusInputElement`]}],"GOTO.NEXT":[{guard:`isYearView`,actions:[`focusNextDecade`,`announceVisibleRange`]},{guard:`isMonthView`,actions:[`focusNextYear`,`announceVisibleRange`]},{actions:[`focusNextPage`]}],"GOTO.PREV":[{guard:`isYearView`,actions:[`focusPreviousDecade`,`announceVisibleRange`]},{guard:`isMonthView`,actions:[`focusPreviousYear`,`announceVisibleRange`]},{actions:[`focusPreviousPage`]}]},states:{idle:{tags:[`closed`],on:{"CONTROLLED.OPEN":{target:`open`,actions:[`focusFirstSelectedDate`,`focusActiveCell`]},"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`focusFirstSelectedDate`,`focusActiveCell`,`invokeOnOpen`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`focusFirstSelectedDate`,`focusActiveCell`,`invokeOnOpen`]}]}},focused:{tags:[`closed`],on:{"CONTROLLED.OPEN":{target:`open`,actions:[`focusFirstSelectedDate`,`focusActiveCell`]},"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`focusFirstSelectedDate`,`focusActiveCell`,`invokeOnOpen`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open`,actions:[`focusFirstSelectedDate`,`focusActiveCell`,`invokeOnOpen`]}]}},open:{tags:[`open`],effects:[`trackDismissableElement`,`trackPositioning`],exit:[`clearHoveredDate`,`resetView`],on:{"CONTROLLED.CLOSE":[{guard:X(`shouldRestoreFocus`,`isInteractOutsideEvent`),target:`focused`,actions:[`focusTriggerElement`]},{guard:`shouldRestoreFocus`,target:`focused`,actions:[`focusInputElement`]},{target:`idle`}],"CELL.CLICK":[{guard:`isAboveMinView`,actions:[`setFocusedValueForView`,`setPreviousView`]},{guard:X(`isRangePicker`,`hasSelectedRange`),actions:[`setActiveIndexToStart`,`resetSelection`,`setActiveIndexToEnd`]},{guard:X(`isRangePicker`,`isSelectingEndDate`,`closeOnSelect`,`isOpenControlled`),actions:[`setFocusedDate`,`setSelectedDate`,`setActiveIndexToStart`,`clearHoveredDate`,`invokeOnClose`,`setRestoreFocus`]},{guard:X(`isRangePicker`,`isSelectingEndDate`,`closeOnSelect`),target:`focused`,actions:[`setFocusedDate`,`setSelectedDate`,`setActiveIndexToStart`,`clearHoveredDate`,`invokeOnClose`,`focusInputElement`]},{guard:X(`isRangePicker`,`isSelectingEndDate`),actions:[`setFocusedDate`,`setSelectedDate`,`setActiveIndexToStart`,`clearHoveredDate`]},{guard:`isRangePicker`,actions:[`setFocusedDate`,`setSelectedDate`,`setActiveIndexToEnd`]},{guard:X(`isMultiPicker`,`canSelectDate`),actions:[`setFocusedDate`,`toggleSelectedDate`]},{guard:`isMultiPicker`,actions:[`setFocusedDate`]},{guard:X(`closeOnSelect`,`isOpenControlled`),actions:[`setFocusedDate`,`setSelectedDate`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`focused`,actions:[`setFocusedDate`,`setSelectedDate`,`invokeOnClose`,`focusInputElement`]},{actions:[`setFocusedDate`,`setSelectedDate`]}],"CELL.POINTER_MOVE":[{guard:X(`isRangePicker`,`isSelectingEndDate`,`isDayPointerMoveOutsideVisibleMonth`),actions:[`setHoveredDate`]},{guard:X(`isRangePicker`,`isSelectingEndDate`),actions:[`setHoveredDate`,`setFocusedDate`]}],"TABLE.POINTER_LEAVE":{guard:`isRangePicker`,actions:[`clearHoveredDate`]},"TABLE.POINTER_DOWN":{actions:[`disableTextSelection`]},"TABLE.POINTER_UP":{actions:[`enableTextSelection`]},"TABLE.ESCAPE":[{guard:`isOpenControlled`,actions:[`focusFirstSelectedDate`,`invokeOnClose`]},{target:`focused`,actions:[`focusFirstSelectedDate`,`invokeOnClose`,`focusTriggerElement`]}],"TABLE.ENTER":[{guard:`isAboveMinView`,actions:[`setPreviousView`]},{guard:X(`isRangePicker`,`hasSelectedRange`),actions:[`setActiveIndexToStart`,`clearDateValue`,`setSelectedDate`,`setActiveIndexToEnd`]},{guard:X(`isRangePicker`,`isSelectingEndDate`,`closeOnSelect`,`isOpenControlled`),actions:[`setSelectedDate`,`setActiveIndexToStart`,`clearHoveredDate`,`invokeOnClose`]},{guard:X(`isRangePicker`,`isSelectingEndDate`,`closeOnSelect`),target:`focused`,actions:[`setSelectedDate`,`setActiveIndexToStart`,`clearHoveredDate`,`invokeOnClose`,`focusInputElement`]},{guard:X(`isRangePicker`,`isSelectingEndDate`),actions:[`setSelectedDate`,`setActiveIndexToStart`,`clearHoveredDate`]},{guard:`isRangePicker`,actions:[`setSelectedDate`,`setActiveIndexToEnd`,`focusNextDay`]},{guard:X(`isMultiPicker`,`canSelectDate`),actions:[`toggleSelectedDate`]},{guard:`isMultiPicker`},{guard:X(`closeOnSelect`,`isOpenControlled`),actions:[`selectFocusedDate`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`focused`,actions:[`selectFocusedDate`,`invokeOnClose`,`focusInputElement`]},{actions:[`selectFocusedDate`]}],"TABLE.ARROW_RIGHT":[{guard:`isMonthView`,actions:[`focusNextMonth`]},{guard:`isYearView`,actions:[`focusNextYear`]},{actions:[`focusNextDay`,`setHoveredDate`]}],"TABLE.ARROW_LEFT":[{guard:`isMonthView`,actions:[`focusPreviousMonth`]},{guard:`isYearView`,actions:[`focusPreviousYear`]},{actions:[`focusPreviousDay`]}],"TABLE.ARROW_UP":[{guard:`isMonthView`,actions:[`focusPreviousMonthColumn`]},{guard:`isYearView`,actions:[`focusPreviousYearColumn`]},{actions:[`focusPreviousWeek`]}],"TABLE.ARROW_DOWN":[{guard:`isMonthView`,actions:[`focusNextMonthColumn`]},{guard:`isYearView`,actions:[`focusNextYearColumn`]},{actions:[`focusNextWeek`]}],"TABLE.PAGE_UP":{actions:[`focusPreviousSection`]},"TABLE.PAGE_DOWN":{actions:[`focusNextSection`]},"TABLE.HOME":[{guard:`isMonthView`,actions:[`focusFirstMonth`]},{guard:`isYearView`,actions:[`focusFirstYear`]},{actions:[`focusSectionStart`]}],"TABLE.END":[{guard:`isMonthView`,actions:[`focusLastMonth`]},{guard:`isYearView`,actions:[`focusLastYear`]},{actions:[`focusSectionEnd`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`focused`,actions:[`invokeOnClose`]}],"VIEW.TOGGLE":{actions:[`setNextView`]},INTERACT_OUTSIDE:[{guard:`isOpenControlled`,actions:[`setActiveIndexToStart`,`invokeOnClose`]},{guard:`shouldRestoreFocus`,target:`focused`,actions:[`setActiveIndexToStart`,`invokeOnClose`,`focusTriggerElement`]},{target:`idle`,actions:[`setActiveIndexToStart`,`invokeOnClose`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`setActiveIndexToStart`,`invokeOnClose`]},{target:`idle`,actions:[`setActiveIndexToStart`,`invokeOnClose`]}]}}},implementations:{guards:{isAboveMinView:({context:e,prop:t})=>_o(e.get(`view`),t(`minView`)),isDayView:({context:e,event:t})=>(t.view||e.get(`view`))===`day`,isMonthView:({context:e,event:t})=>(t.view||e.get(`view`))===`month`,isYearView:({context:e,event:t})=>(t.view||e.get(`view`))===`year`,isRangePicker:({prop:e})=>e(`selectionMode`)===`range`,hasSelectedRange:({context:e})=>e.get(`value`).length===2,isMultiPicker:({prop:e})=>e(`selectionMode`)===`multiple`,canSelectDate:({context:e,prop:t,event:n})=>{let r=t(`maxSelectedDates`);if(r==null)return!0;let i=e.get(`value`),a=n.value??e.get(`focusedValue`);return i.some(e=>V(e,a))?!0:i.length<r},shouldRestoreFocus:({context:e})=>!!e.get(`restoreFocus`),isSelectingEndDate:({context:e})=>e.get(`activeIndex`)===1,closeOnSelect:({prop:e})=>!!e(`closeOnSelect`),isOpenControlled:({prop:e})=>e(`open`)!=null||!!e(`inline`),isInteractOutsideEvent:({event:e})=>e.previousEvent?.type===`INTERACT_OUTSIDE`,isInputValueEmpty:({event:e})=>e.value.trim()===``,shouldFixOnBlur:({event:e})=>!!e.fixOnBlur,isDayPointerMoveOutsideVisibleMonth:({event:e})=>e.cell===`day`&&e.outsideRange===!0},effects:{trackPositioning({context:e,prop:t,scope:n}){return t(`inline`)?void 0:(e.get(`currentPlacement`)||e.set(`currentPlacement`,t(`positioning`).placement),aa(ja(n),()=>Aa(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}}))},setupLiveRegion({scope:e,refs:t}){let n=e.getDoc();return t.set(`announcer`,ns({level:`assertive`,document:n})),()=>t.get(`announcer`)?.destroy?.()},trackDismissableElement({scope:e,send:t,context:n,prop:r}){return r(`inline`)?void 0:Qo(()=>Ta(e),{type:`popover`,defer:!0,layerStyleTargets:[()=>Aa(e)],exclude:[...Ea(e),wa(e),ka(e)],onInteractOutside(e){n.set(`restoreFocus`,!e.detail.focusable)},onDismiss(){t({type:`INTERACT_OUTSIDE`})},onEscapeKeyDown(e){e.preventDefault(),t({type:`TABLE.ESCAPE`,src:`dismissable`})}})}},actions:{setNextView({context:e,prop:t}){let n=yo(e.get(`view`),t(`minView`),t(`maxView`));e.set(`view`,n)},setPreviousView({context:e,prop:t}){let n=bo(e.get(`view`),t(`minView`),t(`maxView`));e.set(`view`,n)},setView({context:e,event:t}){e.set(`view`,t.view)},setRestoreFocus({context:e}){e.set(`restoreFocus`,!0)},announceValueText({context:e,prop:t,refs:n}){let r=e.get(`value`),i=t(`locale`),a=t(`timeZone`),o;if(t(`selectionMode`)===`range`){let[e,t]=r;o=e&&t?en(e,t,i,a):e?en(e,null,i,a):t?en(t,null,i,a):``}else o=r.map(e=>en(e,null,i,a)).filter(Boolean).join(`,`);n.get(`announcer`)?.announce(o,3e3)},announceVisibleRange({computed:e,refs:t}){let{formatted:n}=e(`visibleRangeText`);t.get(`announcer`)?.announce(n)},disableTextSelection({scope:e}){Ur({target:Ta(e),doc:e.getDoc()})},enableTextSelection({scope:e}){Hr({doc:e.getDoc(),target:Ta(e)})},focusFirstSelectedDate(e){let{context:t}=e;t.get(`value`).length&&Z(e,t.get(`value`)[0])},syncInputElement({scope:e,computed:t}){K(()=>{Ea(e).forEach((e,n)=>{kr(e,t(`valueAsString`)[n]||``)})})},setFocusedDate(e){let{event:t}=e;Z(e,Array.isArray(t.value)?t.value[0]:t.value)},setFocusedValueForView(e){let{context:t,event:n}=e;Z(e,t.get(`focusedValue`).set({[t.get(`view`)]:n.value}))},focusNextMonth(e){let{context:t}=e;Z(e,t.get(`focusedValue`).add({months:1}))},focusPreviousMonth(e){let{context:t}=e;Z(e,t.get(`focusedValue`).subtract({months:1}))},setDateValue({context:e,event:t,prop:n}){if(!Array.isArray(t.value))return;let r=t.value.map(e=>B(e,n(`min`),n(`max`)));e.set(`value`,r)},clearDateValue({context:e}){e.set(`value`,[])},setSelectedDate(e){let{context:t,event:n}=e,r=Array.from(t.get(`value`)),i=t.get(`activeIndex`),a=r[i];r[i]=ss(a,os(e,n.value??t.get(`focusedValue`))),t.set(`value`,oo(r))},resetSelection(e){let{context:t,event:n}=e,r=t.get(`value`)[0],i=os(e,n.value??t.get(`focusedValue`));t.set(`value`,[ss(r,i)])},toggleSelectedDate(e){let{context:t,event:n}=e,r=os(e,n.value??t.get(`focusedValue`)),i=t.get(`value`),a=i.findIndex(e=>V(e,r));if(a===-1){let e=[...i,r];t.set(`value`,co(e))}else{let e=Array.from(i);e.splice(a,1),t.set(`value`,co(e))}},setHoveredDate({context:e,event:t}){e.set(`hoveredValue`,t.value)},clearHoveredDate({context:e}){e.set(`hoveredValue`,null)},selectFocusedDate({context:e,computed:t}){let n=Array.from(e.get(`value`)),r=e.get(`activeIndex`),i=n[r];n[r]=ss(i,e.get(`focusedValue`).copy()),e.set(`value`,oo(n));let a=t(`valueAsString`);e.set(`inputValue`,a[r])},focusPreviousDay(e){let{context:t}=e;Z(e,t.get(`focusedValue`).subtract({days:1}))},focusNextDay(e){let{context:t}=e;Z(e,t.get(`focusedValue`).add({days:1}))},focusPreviousWeek(e){let{context:t}=e;Z(e,t.get(`focusedValue`).subtract({weeks:1}))},focusNextWeek(e){let{context:t}=e;Z(e,t.get(`focusedValue`).add({weeks:1}))},focusNextPage(e){let{context:t,computed:n,prop:r}=e;cs(e,bn(t.get(`focusedValue`),t.get(`startValue`),n(`visibleDuration`),r(`locale`),r(`min`),r(`max`)))},focusPreviousPage(e){let{context:t,computed:n,prop:r}=e;cs(e,xn(t.get(`focusedValue`),t.get(`startValue`),n(`visibleDuration`),r(`locale`),r(`min`),r(`max`)))},focusSectionStart(e){let{context:t}=e;Z(e,t.get(`startValue`).copy())},focusSectionEnd(e){let{computed:t}=e;Z(e,t(`endValue`).copy())},focusNextSection(e){let{context:t,event:n,computed:r,prop:i}=e,a=Sn(t.get(`focusedValue`),t.get(`startValue`),n.larger,r(`visibleDuration`),i(`locale`),i(`min`),i(`max`));a&&cs(e,a)},focusPreviousSection(e){let{context:t,event:n,computed:r,prop:i}=e,a=Cn(t.get(`focusedValue`),t.get(`startValue`),n.larger,r(`visibleDuration`),i(`locale`),i(`min`),i(`max`));a&&cs(e,a)},focusNextYear(e){let{context:t}=e;Z(e,t.get(`focusedValue`).add({years:1}))},focusPreviousYear(e){let{context:t}=e;Z(e,t.get(`focusedValue`).subtract({years:1}))},focusNextDecade(e){let{context:t}=e;Z(e,t.get(`focusedValue`).add({years:10}))},focusPreviousDecade(e){let{context:t}=e;Z(e,t.get(`focusedValue`).subtract({years:10}))},clearFocusedDate(e){let{context:t,prop:n}=e,r=t.get(`focusedValue`).calendar;Z(e,vn(n(`timeZone`),r))},focusPreviousMonthColumn(e){let{context:t,event:n}=e;Z(e,t.get(`focusedValue`).subtract({months:n.columns}))},focusNextMonthColumn(e){let{context:t,event:n}=e;Z(e,t.get(`focusedValue`).add({months:n.columns}))},focusPreviousYearColumn(e){let{context:t,event:n}=e;Z(e,t.get(`focusedValue`).subtract({years:n.columns}))},focusNextYearColumn(e){let{context:t,event:n}=e;Z(e,t.get(`focusedValue`).add({years:n.columns}))},focusFirstMonth(e){let{context:t}=e,n=t.get(`focusedValue`),r=n.calendar.getMinimumMonthInYear?.(n)??1;Z(e,n.set({month:r}))},focusLastMonth(e){let{context:t}=e,n=t.get(`focusedValue`),r=n.calendar.getMonthsInYear(n);Z(e,n.set({month:r}))},focusFirstYear(e){let{context:t}=e,n=_n(t.get(`focusedValue`).year);Z(e,t.get(`focusedValue`).set({year:n[0]}))},focusLastYear(e){let{context:t}=e,n=_n(t.get(`focusedValue`).year);Z(e,t.get(`focusedValue`).set({year:n[n.length-1]}))},setActiveIndex({context:e,event:t}){e.set(`activeIndex`,t.index)},setActiveIndexToEnd({context:e}){e.set(`activeIndex`,1)},setActiveIndexToStart({context:e}){e.set(`activeIndex`,0)},focusActiveCell({scope:e,context:t,event:n}){n.src!==`input.click`&&K(()=>{Ca(e,t.get(`view`))?.focus({preventScroll:!0})})},focusActiveCellIfNeeded({scope:e,context:t,event:n}){n.focus&&K(()=>{Ca(e,t.get(`view`))?.focus({preventScroll:!0})})},setHoveredValueIfKeyboard({context:e,event:t,prop:n}){!t.type.startsWith(`TABLE.ARROW`)||n(`selectionMode`)!==`range`||e.get(`activeIndex`)===0||e.set(`hoveredValue`,e.get(`focusedValue`).copy())},focusTriggerElement({scope:e}){K(()=>{wa(e)?.focus({preventScroll:!0})})},focusFirstInputElement({scope:e,event:t}){t.focus!==!1&&K(()=>{let[t]=Ea(e);(t??wa(e))?.focus({preventScroll:!0})})},focusInputElement({scope:e}){K(()=>{let t=Ea(e);if(t.length===0){wa(e)?.focus({preventScroll:!0});return}let n=t.findLastIndex(e=>e.value!==``),r=t[Math.max(n,0)];r?.focus({preventScroll:!0}),r?.setSelectionRange(r.value.length,r.value.length)})},syncMonthSelectElement({scope:e,context:t}){kr(Oa(e),t.get(`startValue`).month.toString())},syncYearSelectElement({scope:e,context:t}){kr(Da(e),t.get(`startValue`).year.toString())},setInputValue({context:e,event:t}){e.get(`activeIndex`)===t.index&&e.set(`inputValue`,t.value)},syncInputValue({scope:e,context:t,event:n}){queueMicrotask(()=>{kr(Ea(e)[n.index??t.get(`activeIndex`)],t.get(`inputValue`))})},focusParsedDate(e){let{event:t,prop:n}=e;if(t.index==null)return;let r=n(`parse`)(t.value,{locale:n(`locale`),timeZone:n(`timeZone`)});!r||!po(r)||Z(e,r)},selectParsedDate({context:e,event:t,prop:n}){if(t.index==null)return;let r=n(`parse`)(t.value,{locale:n(`locale`),timeZone:n(`timeZone`)});if((!r||!po(r))&&t.value&&(r=e.get(`focusedValue`).copy()),!r)return;r=B(r,n(`min`),n(`max`));let i=Array.from(e.get(`value`));i[t.index]=r,e.set(`value`,i);let a=is(i,n);e.set(`inputValue`,a[t.index])},resetView({context:e}){e.set(`view`,e.initial(`view`))},setStartValue({context:e,computed:t,prop:n}){let r=e.get(`focusedValue`);if(!H(r,e.get(`startValue`),t(`endValue`)))return;let i=Wt(r,`start`,{months:n(`numOfMonths`)},n(`locale`));e.set(`startValue`,i)},invokeOnOpen({prop:e,context:t}){e(`inline`)||e(`onOpenChange`)?.({open:!0,value:t.get(`value`)})},invokeOnClose({prop:e,context:t}){e(`inline`)||e(`onOpenChange`)?.({open:!1,value:t.get(`value`)})},invokeOnVisibleRangeChange({prop:e,context:t,computed:n}){e(`onVisibleRangeChange`)?.({view:t.get(`view`),visibleRange:n(`visibleRange`)})},toggleVisibility({event:e,send:t,prop:n}){t({type:n(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:e})}}}}),os=(e,t)=>{let{context:n,prop:r}=e,i=n.get(`view`),a=typeof t==`number`?n.get(`focusedValue`).set({[i]:t}):t;return So(e=>{vo(e,r(`minView`))&&(a=a.set({[e]:+(e===`day`)}))}),a},ss=(e,t)=>{if(!e||!(`hour`in e))return t;let n=`timeZone`in e,r=t;return`hour`in t||(r=n?Ge(F(t),e.timeZone):F(t)),r.set({hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond})};function Z(e,t){let{context:n,prop:r,computed:i}=e;if(!t)return;let a=os(e,t);if(V(n.get(`focusedValue`),a))return;let o=yn(i(`visibleDuration`),r(`locale`),r(`min`),r(`max`))({focusedDate:a,startDate:n.get(`startValue`)});n.set(`startValue`,o.startDate),n.set(`focusedValue`,o.focusedDate)}function cs(e,t){let{context:n}=e;n.set(`startValue`,t.startDate),!V(n.get(`focusedValue`),t.focusedDate)&&n.set(`focusedValue`,t.focusedDate)}function ls(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}var Q=e(t(),1),us=globalThis.document===void 0?Q.useEffect:Q.useLayoutEffect,ds=e(r(),1);function fs(e){let t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r]=(0,Q.useState)(t),[i,a]=(0,Q.useState)(r),o=e().value!==void 0,s=(0,Q.useRef)(i);s.current=o?e().value:i;let c=(0,Q.useRef)(s.current);us(()=>{c.current=s.current},[i,e().value]);let l=t=>{let r=c.current,i=ii(t)?t(r):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:i,prev:r}),o||a(i),n(i,r)||e().onChange?.(i,r)};function u(){return o?e().value:i}return{initial:r,ref:s,get:u,set(t){(e().sync?ds.flushSync:mi)(()=>l(t))},invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}fs.cleanup=e=>{(0,Q.useEffect)(()=>e,[])},fs.ref=e=>{let t=(0,Q.useRef)(e);return{get:()=>t.current,set:e=>{t.current=e}}};function ps(e){let t=(0,Q.useRef)(e);return{get(e){return t.current[e]},set(e,n){t.current[e]=n}}}var ms=(e,t)=>{let n=(0,Q.useRef)(!1),r=(0,Q.useRef)(!1);(0,Q.useEffect)(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e??[]).map(e=>typeof e==`function`?e():e)]),(0,Q.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[])};function hs(e,t={}){let n=(0,Q.useMemo)(()=>{let{id:e,ids:n,getRootNode:r}=t;return ao({id:e,ids:n,getRootNode:r})},[t]),r=(...t)=>{e.debug&&console.log(...t)},i=_s(e.props?.({props:ki(t),scope:n})??t),a=e.context?.({prop:i,bindable:fs,scope:n,flush:vs,getContext(){return s},getComputed(){return b},getRefs(){return m},getEvent(){return f()}}),o=gs(a),s={get(e){return o.current?.[e].ref.current},set(e,t){o.current?.[e].set(t)},initial(e){return o.current?.[e].initial},hash(e){let t=o.current?.[e].get();return o.current?.[e].hash(t)}},c=(0,Q.useRef)(new Map),l=(0,Q.useRef)(null),u=(0,Q.useRef)(null),d=(0,Q.useRef)({type:``}),f=()=>({...d.current,current(){return d.current},previous(){return u.current}}),p=()=>({...x,matches(...e){return e.some(e=>$a(x.ref.current,e))},hasTag(t){return eo(e,x.ref.current,t)}}),m=ps(e.refs?.({prop:i,context:s})??{}),h=()=>({state:p(),context:s,event:f(),prop:i,send:T,action:g,guard:_,track:ms,refs:m,computed:b,flush:vs,scope:n,choose:y}),g=t=>{let n=ii(t)?t(h()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||Ai(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(h())},_=t=>{if(ii(t))return t(h());let n=e.implementations?.guards?.[t];return n||Ai(`[zag-js] No implementation found for guard "${JSON.stringify(t)}"`),n?.(h())},v=t=>{let n=ii(t)?t(h()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||Ai(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(h());t&&i.push(t)}return()=>i.forEach(e=>e?.())},y=e=>Xr(e).find(e=>{let t=!e.guard;return ri(e.guard)?t=!!_(e.guard):ii(e.guard)&&(t=e.guard(h())),t}),b=t=>{Mi(e.computed,()=>`[zag-js] No computed object found on machine`);let r=e.computed[t];return r({context:s,event:f(),prop:i,refs:m,scope:n,computed:b})},x=fs(()=>({defaultValue:Xa(e,e.initialState({prop:i})),onChange(t,n){let{exiting:r,entering:i}=Qa(e,n,t,l.current?.reenter);if(r.forEach(e=>{c.current.get(e.path)?.(),c.current.delete(e.path)}),r.forEach(e=>{g(e.state?.exit)}),g(l.current?.actions),i.forEach(e=>{let t=v(e.state?.effects);if(t){let n=c.current.get(e.path);c.current.set(e.path,n?gi(n,t):t)}}),n===`__init__`){g(e.entry);let t=v(e.effects);if(t){let e=c.current.get(io);c.current.set(io,e?gi(e,t):t)}}i.forEach(e=>{g(e.state?.entry)})}})),S=(0,Q.useRef)(void 0),C=(0,Q.useRef)(ro.NotStarted);us(()=>{queueMicrotask(()=>{let e=C.current===ro.Started;C.current=ro.Started,r(e?`rehydrating...`:`initializing...`);let t=S.current??x.initial;x.invoke(t,e?x.get():io)});let t=c.current;return()=>{let n=w();r(`unmounting...`),S.current=n,C.current=ro.Stopped,t.forEach(e=>e?.()),c.current=new Map,l.current=null,queueMicrotask(()=>{g(e.exit),C.current=ro.Stopped})}},[]);let w=()=>`ref`in x?x.ref.current:x.get(),T=t=>{queueMicrotask(()=>{if(C.current!==ro.Started)return;u.current=d.current,d.current=t;let n=w(),{transitions:i,source:a}=Za(e,n,t.type),o=y(i);if(!o)return;l.current=o;let s=Xa(e,o.target??n,a);r(`transition`,t.type,o.target||n,`(${o.actions})`),s===n?o.reenter?x.invoke(n,n):g(o.actions??[]):(0,ds.flushSync)(()=>x.set(s))})};return e.watch?.(h()),{state:p(),send:T,context:s,prop:i,scope:n,refs:m,computed:b,event:f(),getStatus:()=>C.current}}function gs(e){let t=(0,Q.useRef)(e);return t.current=e,t}function _s(e){let t=gs(e);return function(e){return t.current[e]}}function vs(e){queueMicrotask(()=>{(0,ds.flushSync)(()=>e())})}var ys=ls(e=>e),bs=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?)\s+(.+)$/,xs=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2})?$/,Ss={day:`2-digit`,hour:`2-digit`,hourCycle:`h23`,minute:`2-digit`,month:`2-digit`,year:`numeric`},Cs={day:`2-digit`,month:`2-digit`,year:`numeric`};function ws(e){if(!(typeof e!=`string`||e===``))try{return yt(e.slice(0,10))}catch{return}}function Ts(e,t){if(typeof e!=`string`||e===``)return;let n=bs.exec(e);try{return n?xt(`${Ns(n[1])}[${n[2]}]`):xs.test(e)?Ge(bt(Ns(e)),t):St(e,t)}catch{return}}function Es(e,t){return ws(e)??Ps(e,t)}function Ds(e,t,n){return Ts(e,n)??Fs(e,t,n)}function Os(e){return e?.toString().slice(0,10)??``}function ks(e,t){return e?new z(t,{...Cs,timeZone:`UTC`}).format(e.toDate(`UTC`)):``}function As(e,t){return e?`${Ns((`timeZone`in e?qe(e,t):Ge(e,t)).toString().replace(/\[.+\]$/,``)).slice(0,19)} ${t}`:``}function js(e,t,n){if(!e)return``;let r=`timeZone`in e?qe(e,n):Ge(e,n);return new z(t,{...Ss,timeZone:n}).format(r.toDate())}function Ms(e,t){if(!e)return``;let n=`timeZone`in e?qe(e,t):Ge(e,t);return[String(n.hour).padStart(2,`0`),String(n.minute).padStart(2,`0`),String(n.second).padStart(2,`0`)].join(`:`)}function Ns(e){return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(e)?`${e}:00`:e}function Ps(e,t){let n=Is(e,t,`date`);if(n)try{return yt(`${n.year.padStart(4,`0`)}-${n.month.padStart(2,`0`)}-${n.day.padStart(2,`0`)}`)}catch{return}}function Fs(e,t,n){let r=Is(e,t,`date-time`);if(!(!r||!r.hour||!r.minute))try{return Ge(bt(`${r.year.padStart(4,`0`)}-${r.month.padStart(2,`0`)}-${r.day.padStart(2,`0`)}T${r.hour.padStart(2,`0`)}:${r.minute.padStart(2,`0`)}:00`),n)}catch{return}}function Is(e,t,n){if(typeof e!=`string`||e.trim()===``)return;let r=new z(t,n===`date`?Cs:Ss),i=new Date(Date.UTC(2006,10,22,14,30,0)),a=r.formatToParts(i).map(e=>[`day`,`hour`,`minute`,`month`,`year`].includes(e.type)?`(?<${e.type}>\\d{1,4})`:Ls(e.value).replace(/\s+/g,`\\s*`)).join(``),o=RegExp(`^\\s*${a}\\s*$`).exec(e)?.groups;if(!(!o?.day||!o.month||!o.year))return{day:o.day,hour:o.hour,minute:o.minute,month:o.month,year:o.year}}function Ls(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var $=i();function Rs({mode:e,label:t,name:r,testId:i,value:a,min:o,max:s,step:c,disabled:d,readOnly:f,autoFocus:m=!1,tabIndex:h,timezone:v=`UTC`,onChange:b,onBlur:x}){let S=(0,Q.useId)(),{locale:C}=n(),w=(0,Q.useMemo)(()=>[e===`date`?ws(a):Ts(a,v)].filter(Boolean),[e,v,a]),T=wo(hs(as,{id:S,name:r,value:w.length>0?w:void 0,min:o?ws(o):void 0,max:s?ws(s):void 0,disabled:d,readOnly:f,locale:C,selectionMode:`single`,timeZone:v,closeOnSelect:e===`date`,format(t){return e===`date`?ks(t,C):js(t,C,v)},parse(t){return e===`date`?Es(t,C):Ds(t,C,v)},onValueChange(t){let n=t.value[0];b(e===`date`?Os(n):As(n,v))},onOpenChange(e){e.open||x?.()}}),ys),{name:E,onInput:D,...ee}=T.getInputProps(),te=e===`date`?Os(w[0]):As(w[0],v);return(0,$.jsxs)(`div`,{...T.getRootProps(),className:u(`relative`,T.open&&`z-lt-popover`),children:[(0,$.jsx)(`input`,{type:`hidden`,name:r,value:te,"data-test":`${i}-value`}),(0,$.jsxs)(`div`,{...T.getControlProps(),className:`flex gap-2`,children:[(0,$.jsx)(g,{...ee,"aria-label":t,autoFocus:m,"data-test":i,disabled:d,id:r,onInput:t=>{if(D?.(t),e!==`date`)return;let n=zs(t.currentTarget.value);if(!n)return;let r=ws(n);r&&(t.currentTarget.value=n,T.setValue([r]),t.currentTarget.value=ks(r,C),b(Os(r)))},readOnly:f,tabIndex:h??void 0}),(0,$.jsx)(y,{...T.getTriggerProps(),"aria-label":`Open ${t||r} calendar`,disabled:d||f,size:`icon`,type:`button`,variant:`secondary`,children:(0,$.jsx)(l,{name:`calendar`,className:`size-lt-icon-md`,"aria-hidden":`true`})})]}),T.open?(0,$.jsx)(`div`,{...T.getPositionerProps(),className:`absolute z-lt-popover mt-2 rounded-lt-sm border border-lt-border bg-lt-popover p-3 text-lt-popover-fg shadow-lt-md`,children:(0,$.jsxs)(`div`,{...T.getContentProps(),className:`grid gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(y,{...T.getPrevTriggerProps(),emphasis:`ghost`,size:`icon`,type:`button`,children:(0,$.jsx)(l,{name:`chevron-left`,className:`size-lt-icon-md`,"aria-hidden":`true`})}),(0,$.jsx)(`div`,{...T.getRangeTextProps(),className:`text-sm font-medium text-lt-fg`}),(0,$.jsx)(y,{...T.getNextTriggerProps(),emphasis:`ghost`,size:`icon`,type:`button`,children:(0,$.jsx)(l,{name:`chevron-right`,className:`size-lt-icon-md`,"aria-hidden":`true`})})]}),(0,$.jsxs)(`table`,{...T.getTableProps(),className:`w-full border-collapse text-sm`,children:[(0,$.jsx)(`thead`,{...T.getTableHeadProps(),children:(0,$.jsx)(`tr`,{...T.getTableRowProps(),children:T.weekDays.map(e=>(0,Q.createElement)(`th`,{...T.getTableHeaderProps(),"aria-label":e.long,key:e.value.toString(),className:`size-8 text-center text-xs font-medium text-lt-muted-fg`},e.narrow))})}),(0,$.jsx)(`tbody`,{...T.getTableBodyProps(),children:T.weeks.map((e,t)=>(0,Q.createElement)(`tr`,{...T.getTableRowProps(),key:t},e.map(e=>{let t=T.getDayTableCellState({value:e});return(0,Q.createElement)(`td`,{...T.getDayTableCellProps({value:e}),key:e.toString(),className:`p-0 text-center`},(0,$.jsx)(`button`,{...T.getDayTableCellTriggerProps({value:e}),type:`button`,className:u(`size-8 rounded-lt-sm text-sm text-lt-fg hover:bg-lt-muted`,t.selected&&`bg-lt-primary text-lt-primary-fg`,t.outsideRange&&`text-lt-muted-fg`,t.disabled&&`cursor-not-allowed opacity-40`),children:e.day}))})))})]}),e===`date-time`?(0,$.jsx)(_,{value:p(Ms(w[0],v)),onChange:e=>T.setTime({hour:e.hour,minute:e.minute,second:e.second}),step:c,disabled:d,readOnly:f,testId:`${i}-time`}):null]})}):null]})}function zs(e){let t=e.replace(/\D/g,``);if(t.length===8)return`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}`}export{Rs as DatePickerField};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,t as n}from"./react-B8IZ02wI.js";var r=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.Pusher=r():n.Pusher=r()})(self,()=>(()=>{var e={594(e,t){var n=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(t,"__esModule",{value:!0});var r=256,i=function(){function e(e){e===void 0&&(e=`=`),this._paddingCharacter=e}return e.prototype.encodedLength=function(e){return this._paddingCharacter?(e+2)/3*4|0:(e*8+5)/6|0},e.prototype.encode=function(e){for(var t=``,n=0;n<e.length-2;n+=3){var r=e[n]<<16|e[n+1]<<8|e[n+2];t+=this._encodeByte(r>>>18&63),t+=this._encodeByte(r>>>12&63),t+=this._encodeByte(r>>>6&63),t+=this._encodeByte(r>>>0&63)}var i=e.length-n;if(i>0){var r=e[n]<<16|(i===2?e[n+1]<<8:0);t+=this._encodeByte(r>>>18&63),t+=this._encodeByte(r>>>12&63),i===2?t+=this._encodeByte(r>>>6&63):t+=this._paddingCharacter||``,t+=this._paddingCharacter||``}return t},e.prototype.maxDecodedLength=function(e){return this._paddingCharacter?e/4*3|0:(e*6+7)/8|0},e.prototype.decodedLength=function(e){return this.maxDecodedLength(e.length-this._getPaddingLength(e))},e.prototype.decode=function(e){if(e.length===0)return new Uint8Array;for(var t=this._getPaddingLength(e),n=e.length-t,i=new Uint8Array(this.maxDecodedLength(n)),a=0,o=0,s=0,c=0,l=0,u=0,d=0;o<n-4;o+=4)c=this._decodeChar(e.charCodeAt(o+0)),l=this._decodeChar(e.charCodeAt(o+1)),u=this._decodeChar(e.charCodeAt(o+2)),d=this._decodeChar(e.charCodeAt(o+3)),i[a++]=c<<2|l>>>4,i[a++]=l<<4|u>>>2,i[a++]=u<<6|d,s|=c&r,s|=l&r,s|=u&r,s|=d&r;if(o<n-1&&(c=this._decodeChar(e.charCodeAt(o)),l=this._decodeChar(e.charCodeAt(o+1)),i[a++]=c<<2|l>>>4,s|=c&r,s|=l&r),o<n-2&&(u=this._decodeChar(e.charCodeAt(o+2)),i[a++]=l<<4|u>>>2,s|=u&r),o<n-3&&(d=this._decodeChar(e.charCodeAt(o+3)),i[a++]=u<<6|d,s|=d&r),s!==0)throw Error(`Base64Coder: incorrect characters for decoding`);return i},e.prototype._encodeByte=function(e){var t=e;return t+=65,t+=25-e>>>8&6,t+=51-e>>>8&-75,t+=61-e>>>8&-15,t+=62-e>>>8&3,String.fromCharCode(t)},e.prototype._decodeChar=function(e){var t=r;return t+=(42-e&e-44)>>>8&-r+e-43+62,t+=(46-e&e-48)>>>8&-r+e-47+63,t+=(47-e&e-58)>>>8&-r+e-48+52,t+=(64-e&e-91)>>>8&-r+e-65+0,t+=(96-e&e-123)>>>8&-r+e-97+26,t},e.prototype._getPaddingLength=function(e){var t=0;if(this._paddingCharacter){for(var n=e.length-1;n>=0&&e[n]===this._paddingCharacter;n--)t++;if(e.length<4||t>2)throw Error(`Base64Coder: incorrect padding`)}return t},e}();t.Coder=i;var a=new i;function o(e){return a.encode(e)}t.encode=o;function s(e){return a.decode(e)}t.decode=s;var c=function(e){n(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._encodeByte=function(e){var t=e;return t+=65,t+=25-e>>>8&6,t+=51-e>>>8&-75,t+=61-e>>>8&-13,t+=62-e>>>8&49,String.fromCharCode(t)},t.prototype._decodeChar=function(e){var t=r;return t+=(44-e&e-46)>>>8&-r+e-45+62,t+=(94-e&e-96)>>>8&-r+e-95+63,t+=(47-e&e-58)>>>8&-r+e-48+52,t+=(64-e&e-91)>>>8&-r+e-65+0,t+=(96-e&e-123)>>>8&-r+e-97+26,t},t}(i);t.URLSafeCoder=c;var l=new c;function u(e){return l.encode(e)}t.encodeURLSafe=u;function d(e){return l.decode(e)}t.decodeURLSafe=d,t.encodedLength=function(e){return a.encodedLength(e)},t.maxDecodedLength=function(e){return a.maxDecodedLength(e)},t.decodedLength=function(e){return a.decodedLength(e)}},978(e,t){var n=`utf8: invalid source encoding`;function r(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];if(i&128){var a=void 0;if(i<224){if(r>=e.length)throw Error(n);var o=e[++r];if((o&192)!=128)throw Error(n);i=(i&31)<<6|o&63,a=128}else if(i<240){if(r>=e.length-1)throw Error(n);var o=e[++r],s=e[++r];if((o&192)!=128||(s&192)!=128)throw Error(n);i=(i&15)<<12|(o&63)<<6|s&63,a=2048}else if(i<248){if(r>=e.length-2)throw Error(n);var o=e[++r],s=e[++r],c=e[++r];if((o&192)!=128||(s&192)!=128||(c&192)!=128)throw Error(n);i=(i&15)<<18|(o&63)<<12|(s&63)<<6|c&63,a=65536}else throw Error(n);if(i<a||i>=55296&&i<=57343)throw Error(n);if(i>=65536){if(i>1114111)throw Error(n);i-=65536,t.push(String.fromCharCode(55296|i>>10)),i=56320|i&1023}}t.push(String.fromCharCode(i))}return t.join(``)}t.D4=r},721(e,t,n){e.exports=n(207).default},207(e,t,n){n.d(t,{default:()=>$});class r{constructor(e,t){this.lastId=0,this.prefix=e,this.name=t}create(e){this.lastId++;var t=this.lastId,n=this.prefix+t,r=this.name+`[`+t+`]`,i=!1,a=function(){i||=(e.apply(null,arguments),!0)};return this[t]=a,{number:t,id:n,name:r,callback:a}}remove(e){delete this[e.number]}}var i=new r(`_pusher_script_`,`Pusher.ScriptReceivers`);let a={VERSION:`8.5.0`,PROTOCOL:7,wsPort:80,wssPort:443,wsPath:``,httpHost:`sockjs.pusher.com`,httpPort:80,httpsPort:443,httpPath:`/pusher`,stats_host:`stats.pusher.com`,authEndpoint:`/pusher/auth`,authTransport:`ajax`,activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,userAuthentication:{endpoint:`/pusher/user-auth`,transport:`ajax`},channelAuthorization:{endpoint:`/pusher/auth`,transport:`ajax`},cdn_http:`http://js.pusher.com`,cdn_https:`https://js.pusher.com`,dependency_suffix:``};class o{constructor(e){this.options=e,this.receivers=e.receivers||i,this.loading={}}load(e,t,n){var r=this;if(r.loading[e]&&r.loading[e].length>0)r.loading[e].push(n);else{r.loading[e]=[n];var i=X.createScriptRequest(r.getPath(e,t)),a=r.receivers.create(function(t){if(r.receivers.remove(a),r.loading[e]){var n=r.loading[e];delete r.loading[e];for(var o=function(e){e||i.cleanup()},s=0;s<n.length;s++)n[s](t,o)}});i.send(a)}}getRoot(e){var t,n=X.getDocument().location.protocol;return t=e&&e.useTLS||n===`https:`?this.options.cdn_https:this.options.cdn_http,t.replace(/\/*$/,``)+`/`+this.options.version}getPath(e,t){return this.getRoot(t)+`/`+e+this.options.suffix+`.js`}}var s=new r(`_pusher_dependencies`,`Pusher.DependenciesReceivers`),c=new o({cdn_http:a.cdn_http,cdn_https:a.cdn_https,version:a.VERSION,suffix:a.dependency_suffix,receivers:s});let l={baseUrl:`https://pusher.com`,urls:{authenticationEndpoint:{path:`/docs/channels/server_api/authenticating_users`},authorizationEndpoint:{path:`/docs/channels/server_api/authorizing-users/`},javascriptQuickStart:{path:`/docs/javascript_quick_start`},triggeringClientEvents:{path:`/docs/client_api_guide/client_events#trigger-events`},encryptedChannelSupport:{fullUrl:`https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support`}}},u={buildLogSuffix:function(e){let t=l.urls[e];if(!t)return``;let n;return t.fullUrl?n=t.fullUrl:t.path&&(n=l.baseUrl+t.path),n?`See: ${n}`:``}};var d;(function(e){e.UserAuthentication=`user-authentication`,e.ChannelAuthorization=`channel-authorization`})(d||={});class f extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class p extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class m extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class h extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class g extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class _ extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class v extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class y extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}class b extends Error{constructor(e,t){super(t),this.status=e,Object.setPrototypeOf(this,new.target.prototype)}}let x=function(e,t,n,r,i){let a=X.createXHR();for(var o in a.open(`POST`,n.endpoint,!0),a.setRequestHeader(`Content-Type`,`application/x-www-form-urlencoded`),n.headers)a.setRequestHeader(o,n.headers[o]);if(n.headersProvider!=null){let e=n.headersProvider();for(var o in e)a.setRequestHeader(o,e[o])}return a.onreadystatechange=function(){if(a.readyState===4)if(a.status===200){let e,t=!1;try{e=JSON.parse(a.responseText),t=!0}catch{i(new b(200,`JSON returned from ${r.toString()} endpoint was invalid, yet status code was 200. Data was: ${a.responseText}`),null)}t&&i(null,e)}else{let e=``;switch(r){case d.UserAuthentication:e=u.buildLogSuffix(`authenticationEndpoint`);break;case d.ChannelAuthorization:e=`Clients must be authorized to join private or presence channels. ${u.buildLogSuffix(`authorizationEndpoint`)}`;break}i(new b(a.status,`Unable to retrieve auth string from ${r.toString()} endpoint - received status: ${a.status} from ${n.endpoint}. ${e}`),null)}},a.send(t),a};function S(e){return te(O(e))}for(var C=String.fromCharCode,w=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,T={},E=0,ee=w.length;E<ee;E++)T[w.charAt(E)]=E;var D=function(e){var t=e.charCodeAt(0);return t<128?e:t<2048?C(192|t>>>6)+C(128|t&63):C(224|t>>>12&15)+C(128|t>>>6&63)+C(128|t&63)},O=function(e){return e.replace(/[^\x00-\x7F]/g,D)},k=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[w.charAt(n>>>18),w.charAt(n>>>12&63),t>=2?`=`:w.charAt(n>>>6&63),t>=1?`=`:w.charAt(n&63)].join(``)},te=window.btoa||function(e){return e.replace(/[\s\S]{1,3}/g,k)};class ne{constructor(e,t,n,r){this.clear=t,this.timer=e(()=>{this.timer&&=r(this.timer)},n)}isRunning(){return this.timer!==null}ensureAborted(){this.timer&&=(this.clear(this.timer),null)}}let re=ne;function A(e){window.clearTimeout(e)}function ie(e){window.clearInterval(e)}class j extends re{constructor(e,t){super(setTimeout,A,e,function(e){return t(),null})}}class ae extends re{constructor(e,t){super(setInterval,ie,e,function(e){return t(),e})}}let M={now(){return Date.now?Date.now():new Date().valueOf()},defer(e){return new j(0,e)},method(e,...t){var n=Array.prototype.slice.call(arguments,1);return function(t){return t[e].apply(t,n.concat(arguments))}}};function N(e,...t){for(var n=0;n<t.length;n++){var r=t[n];for(var i in r)r[i]&&r[i].constructor&&r[i].constructor===Object?e[i]=N(e[i]||{},r[i]):e[i]=r[i]}return e}function oe(){for(var e=[`Pusher`],t=0;t<arguments.length;t++)typeof arguments[t]==`string`?e.push(arguments[t]):e.push(I(arguments[t]));return e.join(` : `)}function se(e,t){var n=Array.prototype.indexOf;if(e===null)return-1;if(n&&e.indexOf===n)return e.indexOf(t);for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}function P(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(e[n],n,e)}function ce(e){var t=[];return P(e,function(e,n){t.push(n)}),t}function le(e){var t=[];return P(e,function(e){t.push(e)}),t}function F(e,t,n){for(var r=0;r<e.length;r++)t.call(n||window,e[r],r,e)}function ue(e,t){for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r,e,n));return n}function de(e,t){var n={};return P(e,function(e,r){n[r]=t(e)}),n}function fe(e,t){t||=function(e){return!!e};for(var n=[],r=0;r<e.length;r++)t(e[r],r,e,n)&&n.push(e[r]);return n}function pe(e,t){var n={};return P(e,function(r,i){(t&&t(r,i,e,n)||r)&&(n[i]=r)}),n}function me(e){var t=[];return P(e,function(e,n){t.push([n,e])}),t}function he(e,t){for(var n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1}function ge(e,t){for(var n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0}function _e(e){return de(e,function(e){return typeof e==`object`&&(e=I(e)),encodeURIComponent(S(e.toString()))})}function ve(e){return ue(me(_e(pe(e,function(e){return e!==void 0}))),M.method(`join`,`=`)).join(`&`)}function ye(e){var t=[],n=[];return(function e(r,i){var a,o,s;switch(typeof r){case`object`:if(!r)return null;for(a=0;a<t.length;a+=1)if(t[a]===r)return{$ref:n[a]};if(t.push(r),n.push(i),Object.prototype.toString.apply(r)===`[object Array]`)for(s=[],a=0;a<r.length;a+=1)s[a]=e(r[a],i+`[`+a+`]`);else for(o in s={},r)Object.prototype.hasOwnProperty.call(r,o)&&(s[o]=e(r[o],i+`[`+JSON.stringify(o)+`]`));return s;case`number`:case`string`:case`boolean`:return r}})(e,`$`)}function I(e){try{return JSON.stringify(e)}catch{return JSON.stringify(ye(e))}}class be{constructor(){this.globalLog=e=>{window.console&&window.console.log&&window.console.log(e)}}debug(...e){this.log(this.globalLog,e)}warn(...e){this.log(this.globalLogWarn,e)}error(...e){this.log(this.globalLogError,e)}globalLogWarn(e){window.console&&window.console.warn?window.console.warn(e):this.globalLog(e)}globalLogError(e){window.console&&window.console.error?window.console.error(e):this.globalLogWarn(e)}log(e,...t){var n=oe.apply(this,arguments);$.log?$.log(n):$.logToConsole&&e.bind(this)(n)}}let L=new be,xe=function(e,t,n,r,i){(n.headers!==void 0||n.headersProvider!=null)&&L.warn(`To send headers with the ${r.toString()} request, you must use AJAX, rather than JSONP.`);var a=e.nextAuthCallbackID.toString();e.nextAuthCallbackID++;var o=e.getDocument(),s=o.createElement(`script`);e.auth_callbacks[a]=function(e){i(null,e)};var c=`Pusher.auth_callbacks['`+a+`']`;s.src=n.endpoint+`?callback=`+encodeURIComponent(c)+`&`+t;var l=o.getElementsByTagName(`head`)[0]||o.documentElement;l.insertBefore(s,l.firstChild)};class Se{constructor(e){this.src=e}send(e){var t=this,n=`Error loading `+t.src;t.script=document.createElement(`script`),t.script.id=e.id,t.script.src=t.src,t.script.type=`text/javascript`,t.script.charset=`UTF-8`,t.script.addEventListener?(t.script.onerror=function(){e.callback(n)},t.script.onload=function(){e.callback(null)}):t.script.onreadystatechange=function(){(t.script.readyState===`loaded`||t.script.readyState===`complete`)&&e.callback(null)},t.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(t.errorScript=document.createElement(`script`),t.errorScript.id=e.id+`_error`,t.errorScript.text=e.name+`('`+n+`');`,t.script.async=t.errorScript.async=!1):t.script.async=!0;var r=document.getElementsByTagName(`head`)[0];r.insertBefore(t.script,r.firstChild),t.errorScript&&r.insertBefore(t.errorScript,t.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class Ce{constructor(e,t){this.url=e,this.data=t}send(e){if(!this.request){var t=ve(this.data),n=this.url+`/`+e.number+`?`+t;this.request=X.createScriptRequest(n),this.request.send(e)}}cleanup(){this.request&&this.request.cleanup()}}let we={name:`jsonp`,getAgent:function(e,t){return function(n,r){var a=`http`+(t?`s`:``)+`://`+(e.host||e.options.host)+e.options.path,o=X.createJSONPRequest(a,n),s=X.ScriptReceivers.create(function(t,n){i.remove(s),o.cleanup(),n&&n.host&&(e.host=n.host),r&&r(t,n)});o.send(s)}}};function R(e,t,n){var r=e+(t.useTLS?`s`:``),i=t.useTLS?t.hostTLS:t.hostNonTLS;return r+`://`+i+n}function Te(e,t){return`/app/`+e+(`?protocol=`+a.PROTOCOL+`&client=js&version=`+a.VERSION+(t?`&`+t:``))}var Ee={getInitial:function(e,t){return R(`ws`,t,(t.httpPath||``)+Te(e,`flash=false`))}},De={getInitial:function(e,t){return R(`http`,t,(t.httpPath||`/pusher`)+Te(e))}},Oe={getInitial:function(e,t){return R(`http`,t,t.httpPath||`/pusher`)},getPath:function(e,t){return Te(e)}};class ke{constructor(){this._callbacks={}}get(e){return this._callbacks[Ae(e)]}add(e,t,n){var r=Ae(e);this._callbacks[r]=this._callbacks[r]||[],this._callbacks[r].push({fn:t,context:n})}remove(e,t,n){if(!e&&!t&&!n){this._callbacks={};return}var r=e?[Ae(e)]:ce(this._callbacks);t||n?this.removeCallback(r,t,n):this.removeAllCallbacks(r)}removeCallback(e,t,n){F(e,function(e){this._callbacks[e]=fe(this._callbacks[e]||[],function(e){return t&&t!==e.fn||n&&n!==e.context}),this._callbacks[e].length===0&&delete this._callbacks[e]},this)}removeAllCallbacks(e){F(e,function(e){delete this._callbacks[e]},this)}}function Ae(e){return`_`+e}class z{constructor(e){this.callbacks=new ke,this.global_callbacks=[],this.failThrough=e}bind(e,t,n){return this.callbacks.add(e,t,n),this}bind_global(e){return this.global_callbacks.push(e),this}unbind(e,t,n){return this.callbacks.remove(e,t,n),this}unbind_global(e){return e?(this.global_callbacks=fe(this.global_callbacks||[],t=>t!==e),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(e,t,n){for(var r=0;r<this.global_callbacks.length;r++)this.global_callbacks[r](e,t);var i=this.callbacks.get(e),a=[];if(n?a.push(t,n):t&&a.push(t),i&&i.length>0)for(var r=0;r<i.length;r++)i[r].fn.apply(i[r].context||window,a);else this.failThrough&&this.failThrough(e,t);return this}}class je extends z{constructor(e,t,n,r,i){super(),this.initialize=X.transportConnectionInitializer,this.hooks=e,this.name=t,this.priority=n,this.key=r,this.options=i,this.state=`new`,this.timeline=i.timeline,this.activityTimeout=i.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return!!this.hooks.handlesActivityChecks}supportsPing(){return!!this.hooks.supportsPing}connect(){if(this.socket||this.state!==`initialized`)return!1;var e=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(e,this.options)}catch(e){return M.defer(()=>{this.onError(e),this.changeState(`closed`)}),!1}return this.bindListeners(),L.debug(`Connecting`,{transport:this.name,url:e}),this.changeState(`connecting`),!0}close(){return this.socket?(this.socket.close(),!0):!1}send(e){return this.state===`open`?(M.defer(()=>{this.socket&&this.socket.send(e)}),!0):!1}ping(){this.state===`open`&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState(`open`),this.socket.onopen=void 0}onError(e){this.emit(`error`,{type:`WebSocketError`,error:e}),this.timeline.error(this.buildTimelineMessage({error:e.toString()}))}onClose(e){e?this.changeState(`closed`,{code:e.code,reason:e.reason,wasClean:e.wasClean}):this.changeState(`closed`),this.unbindListeners(),this.socket=void 0}onMessage(e){this.emit(`message`,e)}onActivity(){this.emit(`activity`)}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=e=>{this.onError(e)},this.socket.onclose=e=>{this.onClose(e)},this.socket.onmessage=e=>{this.onMessage(e)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(e,t){this.state=e,this.timeline.info(this.buildTimelineMessage({state:e,params:t})),this.emit(e,t)}buildTimelineMessage(e){return N({cid:this.id},e)}}class B{constructor(e){this.hooks=e}isSupported(e){return this.hooks.isSupported(e)}createConnection(e,t,n,r){return new je(this.hooks,e,t,n,r)}}var Me=new B({urls:Ee,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!X.getWebSocketAPI()},isSupported:function(){return!!X.getWebSocketAPI()},getSocket:function(e){return X.createWebSocket(e)}}),Ne={urls:De,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Pe=N({getSocket:function(e){return X.HTTPFactory.createStreamingSocket(e)}},Ne),Fe=N({getSocket:function(e){return X.HTTPFactory.createPollingSocket(e)}},Ne),Ie={isSupported:function(){return X.isXHRSupported()}};let V={ws:Me,xhr_streaming:new B(N({},Pe,Ie)),xhr_polling:new B(N({},Fe,Ie))};var Le=new B({file:`sockjs`,urls:Oe,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(e,t){return new window.SockJS(e,null,{js_path:c.getPath(`sockjs`,{useTLS:t.useTLS}),ignore_null_origin:t.ignoreNullOrigin})},beforeOpen:function(e,t){e.send(JSON.stringify({path:t}))}}),Re={isSupported:function(e){return X.isXDRSupported(e.useTLS)}},ze=new B(N({},Pe,Re)),Be=new B(N({},Fe,Re));V.xdr_streaming=ze,V.xdr_polling=Be,V.sockjs=Le;let Ve=V;class He extends z{constructor(){super();var e=this;window.addEventListener!==void 0&&(window.addEventListener(`online`,function(){e.emit(`online`)},!1),window.addEventListener(`offline`,function(){e.emit(`offline`)},!1))}isOnline(){return window.navigator.onLine===void 0?!0:window.navigator.onLine}}var Ue=new He;class We{constructor(e,t,n){this.manager=e,this.transport=t,this.minPingDelay=n.minPingDelay,this.maxPingDelay=n.maxPingDelay,this.pingDelay=void 0}createConnection(e,t,n,r){r=N({},r,{activityTimeout:this.pingDelay});var i=this.transport.createConnection(e,t,n,r),a=null,o=function(){i.unbind(`open`,o),i.bind(`closed`,s),a=M.now()},s=e=>{if(i.unbind(`closed`,s),e.code===1002||e.code===1003)this.manager.reportDeath();else if(!e.wasClean&&a){var t=M.now()-a;t<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(t/2,this.minPingDelay))}};return i.bind(`open`,o),i}isSupported(e){return this.manager.isAlive()&&this.transport.isSupported(e)}}let Ge={decodeMessage:function(e){try{var t=JSON.parse(e.data),n=t.data;if(typeof n==`string`)try{n=JSON.parse(t.data)}catch{}var r={event:t.event,channel:t.channel,data:n};return t.user_id&&(r.user_id=t.user_id),r}catch(t){throw{type:`MessageParseError`,error:t,data:e.data}}},encodeMessage:function(e){return JSON.stringify(e)},processHandshake:function(e){var t=Ge.decodeMessage(e);if(t.event===`pusher:connection_established`){if(!t.data.activity_timeout)throw`No activity timeout specified in handshake`;return{action:`connected`,id:t.data.socket_id,activityTimeout:t.data.activity_timeout*1e3}}else if(t.event===`pusher:error`)return{action:this.getCloseAction(t.data),error:this.getCloseError(t.data)};else throw`Invalid handshake`},getCloseAction:function(e){return e.code<4e3?e.code>=1002&&e.code<=1004?`backoff`:null:e.code===4e3?`tls_only`:e.code<4100?`refused`:e.code<4200?`backoff`:e.code<4300?`retry`:`refused`},getCloseError:function(e){return e.code!==1e3&&e.code!==1001?{type:`PusherError`,data:{code:e.code,message:e.reason||e.message}}:null}},H=Ge;class Ke extends z{constructor(e,t){super(),this.id=e,this.transport=t,this.activityTimeout=t.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(e){return this.transport.send(e)}send_event(e,t,n){var r={event:e,data:t};return n&&(r.channel=n),L.debug(`Event sent`,r),this.send(H.encodeMessage(r))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event(`pusher:ping`,{})}close(){this.transport.close()}bindListeners(){var e={message:e=>{var t;try{t=H.decodeMessage(e)}catch(t){this.emit(`error`,{type:`MessageParseError`,error:t,data:e.data})}if(t!==void 0){switch(L.debug(`Event recd`,t),t.event){case`pusher:error`:this.emit(`error`,{type:`PusherError`,data:t.data});break;case`pusher:ping`:this.emit(`ping`);break;case`pusher:pong`:this.emit(`pong`);break}this.emit(`message`,t)}},activity:()=>{this.emit(`activity`)},error:e=>{this.emit(`error`,e)},closed:e=>{t(),e&&e.code&&this.handleCloseEvent(e),this.transport=null,this.emit(`closed`)}},t=()=>{P(e,(e,t)=>{this.transport.unbind(t,e)})};P(e,(e,t)=>{this.transport.bind(t,e)})}handleCloseEvent(e){var t=H.getCloseAction(e),n=H.getCloseError(e);n&&this.emit(`error`,n),t&&this.emit(t,{action:t,error:n})}}class qe{constructor(e,t){this.transport=e,this.callback=t,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=e=>{this.unbindListeners();var t;try{t=H.processHandshake(e)}catch(e){this.finish(`error`,{error:e}),this.transport.close();return}t.action===`connected`?this.finish(`connected`,{connection:new Ke(t.id,this.transport),activityTimeout:t.activityTimeout}):(this.finish(t.action,{error:t.error}),this.transport.close())},this.onClosed=e=>{this.unbindListeners();var t=H.getCloseAction(e)||`backoff`,n=H.getCloseError(e);this.finish(t,{error:n})},this.transport.bind(`message`,this.onMessage),this.transport.bind(`closed`,this.onClosed)}unbindListeners(){this.transport.unbind(`message`,this.onMessage),this.transport.unbind(`closed`,this.onClosed)}finish(e,t){this.callback(N({transport:this.transport,action:e},t))}}class Je{constructor(e,t){this.timeline=e,this.options=t||{}}send(e,t){this.timeline.isEmpty()||this.timeline.send(X.TimelineTransport.getAgent(this,e),t)}}class U extends z{constructor(e,t){super(function(t,n){L.debug(`No callbacks on `+e+` for `+t)}),this.name=e,this.pusher=t,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(e,t){return t(null,{auth:``})}trigger(e,t){if(e.indexOf(`client-`)!==0)throw new f(`Event '`+e+`' does not start with 'client-'`);if(!this.subscribed){var n=u.buildLogSuffix(`triggeringClientEvents`);L.warn(`Client event triggered before channel 'subscription_succeeded' event . ${n}`)}return this.pusher.send_event(e,t,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(e){var t=e.event,n=e.data;t===`pusher_internal:subscription_succeeded`?this.handleSubscriptionSucceededEvent(e):t===`pusher_internal:subscription_count`?this.handleSubscriptionCountEvent(e):t.indexOf(`pusher_internal:`)!==0&&this.emit(t,n,{})}handleSubscriptionSucceededEvent(e){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit(`pusher:subscription_succeeded`,e.data)}handleSubscriptionCountEvent(e){e.data.subscription_count&&(this.subscriptionCount=e.data.subscription_count),this.emit(`pusher:subscription_count`,e.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(e,t)=>{e?(this.subscriptionPending=!1,L.error(e.toString()),this.emit(`pusher:subscription_error`,Object.assign({},{type:`AuthError`,error:e.message},e instanceof b?{status:e.status}:{}))):this.pusher.send_event(`pusher:subscribe`,{auth:t.auth,channel_data:t.channel_data,channel:this.name})}))}unsubscribe(){this.subscribed=!1,this.pusher.send_event(`pusher:unsubscribe`,{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class Ye extends U{authorize(e,t){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:e},t)}}class Xe{constructor(){this.reset()}get(e){return Object.prototype.hasOwnProperty.call(this.members,e)?{id:e,info:this.members[e]}:null}each(e){P(this.members,(t,n)=>{e(this.get(n))})}setMyID(e){this.myID=e}onSubscription(e){this.members=e.presence.hash,this.count=e.presence.count,this.me=this.get(this.myID)}addMember(e){return this.get(e.user_id)===null&&this.count++,this.members[e.user_id]=e.user_info,this.get(e.user_id)}removeMember(e){var t=this.get(e.user_id);return t&&(delete this.members[e.user_id],this.count--),t}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}var Ze=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};class Qe extends Ye{constructor(e,t){super(e,t),this.members=new Xe}authorize(e,t){super.authorize(e,(e,n)=>Ze(this,void 0,void 0,function*(){if(!e)if(n=n,n.channel_data!=null){var r=JSON.parse(n.channel_data);this.members.setMyID(r.user_id)}else if(yield this.pusher.user.signinDonePromise,this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else{let e=u.buildLogSuffix(`authorizationEndpoint`);L.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${e}, or the user should be signed in.`),t(`Invalid auth response`);return}t(e,n)}))}handleEvent(e){var t=e.event;if(t.indexOf(`pusher_internal:`)===0)this.handleInternalEvent(e);else{var n=e.data,r={};e.user_id&&(r.user_id=e.user_id),this.emit(t,n,r)}}handleInternalEvent(e){var t=e.event,n=e.data;switch(t){case`pusher_internal:subscription_succeeded`:this.handleSubscriptionSucceededEvent(e);break;case`pusher_internal:subscription_count`:this.handleSubscriptionCountEvent(e);break;case`pusher_internal:member_added`:var r=this.members.addMember(n);this.emit(`pusher:member_added`,r);break;case`pusher_internal:member_removed`:var i=this.members.removeMember(n);i&&this.emit(`pusher:member_removed`,i);break}}handleSubscriptionSucceededEvent(e){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(e.data),this.emit(`pusher:subscription_succeeded`,this.members))}disconnect(){this.members.reset(),super.disconnect()}}var $e=n(978),et=n(594);class tt extends Ye{constructor(e,t,n){super(e,t),this.key=null,this.nacl=n}authorize(e,t){super.authorize(e,(e,n)=>{if(e){t(e,n);return}let r=n.shared_secret;if(!r){t(Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null);return}this.key=(0,et.decode)(r),delete n.shared_secret,t(null,n)})}trigger(e,t){throw new _(`Client events are not currently supported for encrypted channels`)}handleEvent(e){var t=e.event,n=e.data;if(t.indexOf(`pusher_internal:`)===0||t.indexOf(`pusher:`)===0){super.handleEvent(e);return}this.handleEncryptedEvent(t,n)}handleEncryptedEvent(e,t){if(!this.key){L.debug(`Received encrypted event before key has been retrieved from the authEndpoint`);return}if(!t.ciphertext||!t.nonce){L.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+t);return}let n=(0,et.decode)(t.ciphertext);if(n.length<this.nacl.secretbox.overheadLength){L.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${n.length}`);return}let r=(0,et.decode)(t.nonce);if(r.length<this.nacl.secretbox.nonceLength){L.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${r.length}`);return}let i=this.nacl.secretbox.open(n,r,this.key);if(i===null){L.debug(`Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint...`),this.authorize(this.pusher.connection.socket_id,(t,a)=>{if(t){L.error(`Failed to make a request to the authEndpoint: ${a}. Unable to fetch new key, so dropping encrypted event`);return}if(i=this.nacl.secretbox.open(n,r,this.key),i===null){L.error(`Failed to decrypt event with new key. Dropping encrypted event`);return}this.emit(e,this.getDataToEmit(i))});return}this.emit(e,this.getDataToEmit(i))}getDataToEmit(e){let t=(0,$e.D4)(e);try{return JSON.parse(t)}catch{return t}}}class nt extends z{constructor(e,t){super(),this.state=`initialized`,this.connection=null,this.key=e,this.options=t,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var n=X.getNetwork();n.bind(`online`,()=>{this.timeline.info({netinfo:`online`}),(this.state===`connecting`||this.state===`unavailable`)&&this.retryIn(0)}),n.bind(`offline`,()=>{this.timeline.info({netinfo:`offline`}),this.connection&&this.sendActivityCheck()}),this.updateStrategy()}switchCluster(e){this.key=e,this.updateStrategy(),this.retryIn(0)}connect(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState(`failed`);return}this.updateState(`connecting`),this.startConnecting(),this.setUnavailableTimer()}}send(e){return this.connection?this.connection.send(e):!1}send_event(e,t,n){return this.connection?this.connection.send_event(e,t,n):!1}disconnect(){this.disconnectInternally(),this.updateState(`disconnected`)}isUsingTLS(){return this.usingTLS}startConnecting(){var e=(t,n)=>{t?this.runner=this.strategy.connect(0,e):n.action===`error`?(this.emit(`error`,{type:`HandshakeError`,error:n.error}),this.timeline.error({handshakeError:n.error})):(this.abortConnecting(),this.handshakeCallbacks[n.action](n))};this.runner=this.strategy.connect(0,e)}abortConnecting(){this.runner&&=(this.runner.abort(),null)}disconnectInternally(){this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection&&this.abandonConnection().close()}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(e){this.timeline.info({action:`retry`,delay:e}),e>0&&this.emit(`connecting_in`,Math.round(e/1e3)),this.retryTimer=new j(e||0,()=>{this.disconnectInternally(),this.connect()})}clearRetryTimer(){this.retryTimer&&=(this.retryTimer.ensureAborted(),null)}setUnavailableTimer(){this.unavailableTimer=new j(this.options.unavailableTimeout,()=>{this.updateState(`unavailable`)})}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new j(this.options.pongTimeout,()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)})}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new j(this.activityTimeout,()=>{this.sendActivityCheck()}))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(e){return N({},e,{message:e=>{this.resetActivityCheck(),this.emit(`message`,e)},ping:()=>{this.send_event(`pusher:pong`,{})},activity:()=>{this.resetActivityCheck()},error:e=>{this.emit(`error`,e)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(e){return N({},e,{connected:e=>{this.activityTimeout=Math.min(this.options.activityTimeout,e.activityTimeout,e.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(e.connection),this.socket_id=this.connection.id,this.updateState(`connected`,{socket_id:this.socket_id})}})}buildErrorCallbacks(){let e=e=>t=>{t.error&&this.emit(`error`,{type:`WebSocketError`,error:t.error}),e(t)};return{tls_only:e(()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)}),refused:e(()=>{this.disconnect()}),backoff:e(()=>{this.retryIn(1e3)}),retry:e(()=>{this.retryIn(0)})}}setConnection(e){for(var t in this.connection=e,this.connectionCallbacks)this.connection.bind(t,this.connectionCallbacks[t]);this.resetActivityCheck()}abandonConnection(){if(this.connection){for(var e in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(e,this.connectionCallbacks[e]);var t=this.connection;return this.connection=null,t}}updateState(e,t){var n=this.state;if(this.state=e,n!==e){var r=e;r===`connected`&&(r+=` with new socket ID `+t.socket_id),L.debug(`State changed`,n+` -> `+r),this.timeline.info({state:e,params:t}),this.emit(`state_change`,{previous:n,current:e}),this.emit(e,t)}}shouldRetry(){return this.state===`connecting`||this.state===`connected`}}class rt{constructor(){this.channels={}}add(e,t){return this.channels[e]||(this.channels[e]=it(e,t)),this.channels[e]}all(){return le(this.channels)}find(e){return this.channels[e]}remove(e){var t=this.channels[e];return delete this.channels[e],t}disconnect(){P(this.channels,function(e){e.disconnect()})}}function it(e,t){if(e.indexOf(`private-encrypted-`)===0){if(t.config.nacl)return W.createEncryptedChannel(e,t,t.config.nacl);throw new _(`Tried to subscribe to a private-encrypted- channel but no nacl implementation available. ${u.buildLogSuffix(`encryptedChannelSupport`)}`)}else if(e.indexOf(`private-`)===0)return W.createPrivateChannel(e,t);else if(e.indexOf(`presence-`)===0)return W.createPresenceChannel(e,t);else if(e.indexOf(`#`)===0)throw new p(`Cannot create a channel with name "`+e+`".`);else return W.createChannel(e,t)}let W={createChannels(){return new rt},createConnectionManager(e,t){return new nt(e,t)},createChannel(e,t){return new U(e,t)},createPrivateChannel(e,t){return new Ye(e,t)},createPresenceChannel(e,t){return new Qe(e,t)},createEncryptedChannel(e,t,n){return new tt(e,t,n)},createTimelineSender(e,t){return new Je(e,t)},createHandshake(e,t){return new qe(e,t)},createAssistantToTheTransportManager(e,t,n){return new We(e,t,n)}};class at{constructor(e){this.options=e||{},this.livesLeft=this.options.lives||1/0}getAssistant(e){return W.createAssistantToTheTransportManager(this,e,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){--this.livesLeft}}class G{constructor(e,t){this.strategies=e,this.loop=!!t.loop,this.failFast=!!t.failFast,this.timeout=t.timeout,this.timeoutLimit=t.timeoutLimit}isSupported(){return he(this.strategies,M.method(`isSupported`))}connect(e,t){var n=this.strategies,r=0,i=this.timeout,a=null,o=(s,c)=>{c?t(null,c):(r+=1,this.loop&&(r%=n.length),r<n.length?(i&&(i*=2,this.timeoutLimit&&(i=Math.min(i,this.timeoutLimit))),a=this.tryStrategy(n[r],e,{timeout:i,failFast:this.failFast},o)):t(!0))};return a=this.tryStrategy(n[r],e,{timeout:i,failFast:this.failFast},o),{abort:function(){a.abort()},forceMinPriority:function(t){e=t,a&&a.forceMinPriority(t)}}}tryStrategy(e,t,n,r){var i=null,a=null;return n.timeout>0&&(i=new j(n.timeout,function(){a.abort(),r(!0)})),a=e.connect(t,function(e,t){e&&i&&i.isRunning()&&!n.failFast||(i&&i.ensureAborted(),r(e,t))}),{abort:function(){i&&i.ensureAborted(),a.abort()},forceMinPriority:function(e){a.forceMinPriority(e)}}}}class ot{constructor(e){this.strategies=e}isSupported(){return he(this.strategies,M.method(`isSupported`))}connect(e,t){return st(this.strategies,e,function(e,n){return function(r,i){if(n[e].error=r,r){ct(n)&&t(!0);return}F(n,function(e){e.forceMinPriority(i.transport.priority)}),t(null,i)}})}}function st(e,t,n){var r=ue(e,function(e,r,i,a){return e.connect(t,n(r,a))});return{abort:function(){F(r,lt)},forceMinPriority:function(e){F(r,function(t){t.forceMinPriority(e)})}}}function ct(e){return ge(e,function(e){return!!e.error})}function lt(e){!e.error&&!e.aborted&&(e.abort(),e.aborted=!0)}class ut{constructor(e,t,n){this.strategy=e,this.transports=t,this.ttl=n.ttl||1800*1e3,this.usingTLS=n.useTLS,this.timeline=n.timeline}isSupported(){return this.strategy.isSupported()}connect(e,t){var n=this.usingTLS,r=ft(n),i=r&&r.cacheSkipCount?r.cacheSkipCount:0,a=[this.strategy];if(r&&r.timestamp+this.ttl>=M.now()){var o=this.transports[r.transport];o&&([`ws`,`wss`].includes(r.transport)||i>3?(this.timeline.info({cached:!0,transport:r.transport,latency:r.latency}),a.push(new G([o],{timeout:r.latency*2+1e3,failFast:!0}))):i++)}var s=M.now(),c=a.pop().connect(e,function r(o,l){o?(mt(n),a.length>0?(s=M.now(),c=a.pop().connect(e,r)):t(o)):(pt(n,l.transport.name,M.now()-s,i),t(null,l))});return{abort:function(){c.abort()},forceMinPriority:function(t){e=t,c&&c.forceMinPriority(t)}}}}function dt(e){return`pusherTransport`+(e?`TLS`:`NonTLS`)}function ft(e){var t=X.getLocalStorage();if(t)try{var n=t[dt(e)];if(n)return JSON.parse(n)}catch{mt(e)}return null}function pt(e,t,n,r){var i=X.getLocalStorage();if(i)try{i[dt(e)]=I({timestamp:M.now(),transport:t,latency:n,cacheSkipCount:r})}catch{}}function mt(e){var t=X.getLocalStorage();if(t)try{delete t[dt(e)]}catch{}}class K{constructor(e,{delay:t}){this.strategy=e,this.options={delay:t}}isSupported(){return this.strategy.isSupported()}connect(e,t){var n=this.strategy,r,i=new j(this.options.delay,function(){r=n.connect(e,t)});return{abort:function(){i.ensureAborted(),r&&r.abort()},forceMinPriority:function(t){e=t,r&&r.forceMinPriority(t)}}}}class q{constructor(e,t,n){this.test=e,this.trueBranch=t,this.falseBranch=n}isSupported(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()}connect(e,t){return(this.test()?this.trueBranch:this.falseBranch).connect(e,t)}}class ht{constructor(e){this.strategy=e}isSupported(){return this.strategy.isSupported()}connect(e,t){var n=this.strategy.connect(e,function(e,r){r&&n.abort(),t(e,r)});return n}}function J(e){return function(){return e.isSupported()}}let gt=function(e,t,n){var r={};function i(t,i,a,o,s){var c=n(e,t,i,a,o,s);return r[t]=c,c}var a=Object.assign({},t,{hostNonTLS:e.wsHost+`:`+e.wsPort,hostTLS:e.wsHost+`:`+e.wssPort,httpPath:e.wsPath}),o=Object.assign({},a,{useTLS:!0}),s=Object.assign({},t,{hostNonTLS:e.httpHost+`:`+e.httpPort,hostTLS:e.httpHost+`:`+e.httpsPort,httpPath:e.httpPath}),c={loop:!0,timeout:15e3,timeoutLimit:6e4},l=new at({minPingDelay:1e4,maxPingDelay:e.activityTimeout}),u=new at({lives:2,minPingDelay:1e4,maxPingDelay:e.activityTimeout}),d=i(`ws`,`ws`,3,a,l),f=i(`wss`,`ws`,3,o,l),p=i(`sockjs`,`sockjs`,1,s),m=i(`xhr_streaming`,`xhr_streaming`,1,s,u),h=i(`xdr_streaming`,`xdr_streaming`,1,s,u),g=i(`xhr_polling`,`xhr_polling`,1,s),_=i(`xdr_polling`,`xdr_polling`,1,s),v=new G([d],c),y=new G([f],c),b=new G([p],c),x=new G([new q(J(m),m,h)],c),S=new G([new q(J(g),g,_)],c),C=new G([new q(J(x),new ot([x,new K(S,{delay:4e3})]),S)],c),w=new q(J(C),C,b),T=t.useTLS?new ot([v,new K(w,{delay:2e3})]):new ot([v,new K(y,{delay:2e3}),new K(w,{delay:5e3})]);return new ut(new ht(new q(J(d),T,w)),r,{ttl:18e5,timeline:t.timeline,useTLS:t.useTLS})};function _t(){var e=this;e.timeline.info(e.buildTimelineMessage({transport:e.name+(e.options.useTLS?`s`:``)})),e.hooks.isInitialized()?e.changeState(`initialized`):e.hooks.file?(e.changeState(`initializing`),c.load(e.hooks.file,{useTLS:e.options.useTLS},function(t,n){e.hooks.isInitialized()?(e.changeState(`initialized`),n(!0)):(t&&e.onError(t),e.onClose(),n(!1))})):e.onClose()}let vt={getRequest:function(e){var t=new window.XDomainRequest;return t.ontimeout=function(){e.emit(`error`,new m),e.close()},t.onerror=function(t){e.emit(`error`,t),e.close()},t.onprogress=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText)},t.onload=function(){t.responseText&&t.responseText.length>0&&e.onChunk(200,t.responseText),e.emit(`finished`,200),e.close()},t},abortRequest:function(e){e.ontimeout=e.onerror=e.onprogress=e.onload=null,e.abort()}};class yt extends z{constructor(e,t,n){super(),this.hooks=e,this.method=t,this.url=n}start(e){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},X.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader(`Content-Type`,`application/json`),this.xhr.send(e)}close(){this.unloader&&=(X.removeUnloadListener(this.unloader),null),this.xhr&&=(this.hooks.abortRequest(this.xhr),null)}onChunk(e,t){for(;;){var n=this.advanceBuffer(t);if(n)this.emit(`chunk`,{status:e,data:n});else break}this.isBufferTooLong(t)&&this.emit(`buffer_too_long`)}advanceBuffer(e){var t=e.slice(this.position),n=t.indexOf(`
|
|
2
|
-
`);return n===-1?null:(this.position+=n+1,t.slice(0,n))}isBufferTooLong(e){return this.position===e.length&&e.length>262144}}var bt;(function(e){e[e.CONNECTING=0]=`CONNECTING`,e[e.OPEN=1]=`OPEN`,e[e.CLOSED=3]=`CLOSED`})(bt||={});let Y=bt;var xt=1;class St{constructor(e,t){this.hooks=e,this.session=Dt(1e3)+`/`+Ot(8),this.location=Ct(t),this.readyState=Y.CONNECTING,this.openStream()}send(e){return this.sendRaw(JSON.stringify([e]))}ping(){this.hooks.sendHeartbeat(this)}close(e,t){this.onClose(e,t,!0)}sendRaw(e){if(this.readyState===Y.OPEN)try{return X.createSocketRequest(`POST`,Tt(wt(this.location,this.session))).start(e),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(e,t,n){this.closeStream(),this.readyState=Y.CLOSED,this.onclose&&this.onclose({code:e,reason:t,wasClean:n})}onChunk(e){if(e.status===200){this.readyState===Y.OPEN&&this.onActivity();var t;switch(e.data.slice(0,1)){case`o`:t=JSON.parse(e.data.slice(1)||`{}`),this.onOpen(t);break;case`a`:t=JSON.parse(e.data.slice(1)||`[]`);for(var n=0;n<t.length;n++)this.onEvent(t[n]);break;case`m`:t=JSON.parse(e.data.slice(1)||`null`),this.onEvent(t);break;case`h`:this.hooks.onHeartbeat(this);break;case`c`:t=JSON.parse(e.data.slice(1)||`[]`),this.onClose(t[0],t[1],!0);break}}}onOpen(e){this.readyState===Y.CONNECTING?(e&&e.hostname&&(this.location.base=Et(this.location.base,e.hostname)),this.readyState=Y.OPEN,this.onopen&&this.onopen()):this.onClose(1006,`Server lost session`,!0)}onEvent(e){this.readyState===Y.OPEN&&this.onmessage&&this.onmessage({data:e})}onActivity(){this.onactivity&&this.onactivity()}onError(e){this.onerror&&this.onerror(e)}openStream(){this.stream=X.createSocketRequest(`POST`,Tt(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind(`chunk`,e=>{this.onChunk(e)}),this.stream.bind(`finished`,e=>{this.hooks.onFinished(this,e)}),this.stream.bind(`buffer_too_long`,()=>{this.reconnect()});try{this.stream.start()}catch(e){M.defer(()=>{this.onError(e),this.onClose(1006,`Could not start streaming`,!1)})}}closeStream(){this.stream&&=(this.stream.unbind_all(),this.stream.close(),null)}}function Ct(e){var t=/([^\?]*)\/*(\??.*)/.exec(e);return{base:t[1],queryString:t[2]}}function wt(e,t){return e.base+`/`+t+`/xhr_send`}function Tt(e){return e+(e.indexOf(`?`)===-1?`?`:`&`)+`t=`+ +new Date+`&n=`+ xt++}function Et(e,t){var n=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(e);return n[1]+t+n[3]}function Dt(e){return X.randomInt(e)}function Ot(e){for(var t=[],n=0;n<e;n++)t.push(Dt(32).toString(32));return t.join(``)}let kt=St,At={getReceiveURL:function(e,t){return e.base+`/`+t+`/xhr_streaming`+e.queryString},onHeartbeat:function(e){e.sendRaw(`[]`)},sendHeartbeat:function(e){e.sendRaw(`[]`)},onFinished:function(e,t){e.onClose(1006,`Connection interrupted (`+t+`)`,!1)}},jt={getReceiveURL:function(e,t){return e.base+`/`+t+`/xhr`+e.queryString},onHeartbeat:function(){},sendHeartbeat:function(e){e.sendRaw(`[]`)},onFinished:function(e,t){t===200?e.reconnect():e.onClose(1006,`Connection interrupted (`+t+`)`,!1)}},Mt={getRequest:function(e){var t=new(X.getXHRAPI());return t.onreadystatechange=t.onprogress=function(){switch(t.readyState){case 3:t.responseText&&t.responseText.length>0&&e.onChunk(t.status,t.responseText);break;case 4:t.responseText&&t.responseText.length>0&&e.onChunk(t.status,t.responseText),e.emit(`finished`,t.status),e.close();break}},t},abortRequest:function(e){e.onreadystatechange=null,e.abort()}},Nt={createStreamingSocket(e){return this.createSocket(At,e)},createPollingSocket(e){return this.createSocket(jt,e)},createSocket(e,t){return new kt(e,t)},createXHR(e,t){return this.createRequest(Mt,e,t)},createRequest(e,t,n){return new yt(e,t,n)}};Nt.createXDR=function(e,t){return this.createRequest(vt,e,t)};let X={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:i,DependenciesReceivers:s,getDefaultStrategy:gt,Transports:Ve,transportConnectionInitializer:_t,HTTPFactory:Nt,TimelineTransport:we,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(e){window.Pusher=e;var t=()=>{this.onDocumentBody(e.ready)};window.JSON?t():c.load(`json2`,{},t)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:x,jsonp:xe}},onDocumentBody(e){document.body?e():setTimeout(()=>{this.onDocumentBody(e)},0)},createJSONPRequest(e,t){return new Ce(e,t)},createScriptRequest(e){return new Se(e)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){return new(this.getXHRAPI())},createMicrosoftXHR(){return new ActiveXObject(`Microsoft.XMLHTTP`)},getNetwork(){return Ue},createWebSocket(e){return new(this.getWebSocketAPI())(e)},createSocketRequest(e,t){if(this.isXHRSupported())return this.HTTPFactory.createXHR(e,t);if(this.isXDRSupported(t.indexOf(`https:`)===0))return this.HTTPFactory.createXDR(e,t);throw`Cross-origin HTTP requests are not supported`},isXHRSupported(){var e=this.getXHRAPI();return!!e&&new e().withCredentials!==void 0},isXDRSupported(e){var t=e?`https:`:`http:`,n=this.getProtocol();return!!window.XDomainRequest&&n===t},addUnloadListener(e){window.addEventListener===void 0?window.attachEvent!==void 0&&window.attachEvent(`onunload`,e):window.addEventListener(`unload`,e,!1)},removeUnloadListener(e){window.addEventListener===void 0?window.detachEvent!==void 0&&window.detachEvent(`onunload`,e):window.removeEventListener(`unload`,e,!1)},randomInt(e){return Math.floor(function(){return(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/2**32}()*e)}};var Pt;(function(e){e[e.ERROR=3]=`ERROR`,e[e.INFO=6]=`INFO`,e[e.DEBUG=7]=`DEBUG`})(Pt||={});let Z=Pt;class Ft{constructor(e,t,n){this.key=e,this.session=t,this.events=[],this.options=n||{},this.sent=0,this.uniqueID=0}log(e,t){e<=this.options.level&&(this.events.push(N({},t,{timestamp:M.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(e){this.log(Z.ERROR,e)}info(e){this.log(Z.INFO,e)}debug(e){this.log(Z.DEBUG,e)}isEmpty(){return this.events.length===0}send(e,t){var n=N({session:this.session,bundle:this.sent+1,key:this.key,lib:`js`,version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],e(n,(e,n)=>{e||this.sent++,t&&t(e,n)}),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class It{constructor(e,t,n,r){this.name=e,this.priority=t,this.transport=n,this.options=r||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(e,t){if(!this.isSupported())return Lt(new y,t);if(this.priority<e)return Lt(new h,t);var n=!1,r=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),i=null,a=function(){r.unbind(`initialized`,a),r.connect()},o=function(){i=W.createHandshake(r,function(e){n=!0,l(),t(null,e)})},s=function(e){l(),t(e)},c=function(){l(),t(new g(I(r)))},l=function(){r.unbind(`initialized`,a),r.unbind(`open`,o),r.unbind(`error`,s),r.unbind(`closed`,c)};return r.bind(`initialized`,a),r.bind(`open`,o),r.bind(`error`,s),r.bind(`closed`,c),r.initialize(),{abort:()=>{n||(l(),i?i.close():r.close())},forceMinPriority:e=>{n||this.priority<e&&(i?i.close():r.close())}}}}function Lt(e,t){return M.defer(function(){t(e)}),{abort:function(){},forceMinPriority:function(){}}}let{Transports:Rt}=X;var zt=function(e,t,n,r,i,a){var o=Rt[n];if(!o)throw new v(n);var s=(!e.enabledTransports||se(e.enabledTransports,t)!==-1)&&(!e.disabledTransports||se(e.disabledTransports,t)===-1),c;return s?(i=Object.assign({ignoreNullOrigin:e.ignoreNullOrigin},i),c=new It(t,r,a?a.getAssistant(o):o,i)):c=Bt,c},Bt={isSupported:function(){return!1},connect:function(e,t){var n=M.defer(function(){t(new y)});return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}};function Vt(e){if(e==null)throw`You must pass an options object`;if(e.cluster==null)throw`Options object must provide a cluster`;`disableStats`in e&&L.warn(`The disableStats option is deprecated in favor of enableStats`)}let Ht=(e,t)=>{var n=`socket_id=`+encodeURIComponent(e.socketId);for(var r in t.params)n+=`&`+encodeURIComponent(r)+`=`+encodeURIComponent(t.params[r]);if(t.paramsProvider!=null){let e=t.paramsProvider();for(var r in e)n+=`&`+encodeURIComponent(r)+`=`+encodeURIComponent(e[r])}return n},Ut=e=>{if(X.getAuthorizers()[e.transport]===void 0)throw`'${e.transport}' is not a recognized auth transport`;return(t,n)=>{let r=Ht(t,e);X.getAuthorizers()[e.transport](X,r,e,d.UserAuthentication,n)}},Wt=(e,t)=>{var n=`socket_id=`+encodeURIComponent(e.socketId);for(var r in n+=`&channel_name=`+encodeURIComponent(e.channelName),t.params)n+=`&`+encodeURIComponent(r)+`=`+encodeURIComponent(t.params[r]);if(t.paramsProvider!=null){let e=t.paramsProvider();for(var r in e)n+=`&`+encodeURIComponent(r)+`=`+encodeURIComponent(e[r])}return n},Gt=e=>{if(X.getAuthorizers()[e.transport]===void 0)throw`'${e.transport}' is not a recognized auth transport`;return(t,n)=>{let r=Wt(t,e);X.getAuthorizers()[e.transport](X,r,e,d.ChannelAuthorization,n)}},Kt=(e,t,n)=>{let r={authTransport:t.transport,authEndpoint:t.endpoint,auth:{params:t.params,headers:t.headers}};return(t,i)=>{n(e.channel(t.channelName),r).authorize(t.socketId,i)}};function qt(e,t){let n={activityTimeout:e.activityTimeout||a.activityTimeout,cluster:e.cluster,httpPath:e.httpPath||a.httpPath,httpPort:e.httpPort||a.httpPort,httpsPort:e.httpsPort||a.httpsPort,pongTimeout:e.pongTimeout||a.pongTimeout,statsHost:e.statsHost||a.stats_host,unavailableTimeout:e.unavailableTimeout||a.unavailableTimeout,wsPath:e.wsPath||a.wsPath,wsPort:e.wsPort||a.wsPort,wssPort:e.wssPort||a.wssPort,enableStats:Qt(e),httpHost:Jt(e),useTLS:Zt(e),wsHost:Yt(e),userAuthenticator:en(e),channelAuthorizer:nn(e,t)};return`disabledTransports`in e&&(n.disabledTransports=e.disabledTransports),`enabledTransports`in e&&(n.enabledTransports=e.enabledTransports),`ignoreNullOrigin`in e&&(n.ignoreNullOrigin=e.ignoreNullOrigin),`timelineParams`in e&&(n.timelineParams=e.timelineParams),`nacl`in e&&(n.nacl=e.nacl),n}function Jt(e){return e.httpHost?e.httpHost:e.cluster?`sockjs-${e.cluster}.pusher.com`:a.httpHost}function Yt(e){return e.wsHost?e.wsHost:Xt(e.cluster)}function Xt(e){return`ws-${e}.pusher.com`}function Zt(e){return X.getProtocol()===`https:`?!0:e.forceTLS!==!1}function Qt(e){return`enableStats`in e?e.enableStats:`disableStats`in e?!e.disableStats:!1}let $t=e=>`customHandler`in e&&e.customHandler!=null;function en(e){let t=Object.assign(Object.assign({},a.userAuthentication),e.userAuthentication);return $t(t)?t.customHandler:Ut(t)}function tn(e,t){let n;if(`channelAuthorization`in e)n=Object.assign(Object.assign({},a.channelAuthorization),e.channelAuthorization);else if(n={transport:e.authTransport||a.authTransport,endpoint:e.authEndpoint||a.authEndpoint},`auth`in e&&(`params`in e.auth&&(n.params=e.auth.params),`headers`in e.auth&&(n.headers=e.auth.headers)),`authorizer`in e)return{customHandler:Kt(t,n,e.authorizer)};return n}function nn(e,t){let n=tn(e,t);return $t(n)?n.customHandler:Gt(n)}class rn extends z{constructor(e){super(function(e,t){L.debug(`No callbacks on watchlist events for ${e}`)}),this.pusher=e,this.bindWatchlistInternalEvent()}handleEvent(e){e.data.events.forEach(e=>{this.emit(e.name,e)})}bindWatchlistInternalEvent(){this.pusher.connection.bind(`message`,e=>{e.event===`pusher_internal:watchlist_events`&&this.handleEvent(e)})}}function an(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}let on=an;class sn extends z{constructor(e){super(function(e,t){L.debug(`No callbacks on user for `+e)}),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(e,t)=>{if(e){L.warn(`Error during signin: ${e}`),this._cleanup();return}this.pusher.send_event(`pusher:signin`,{auth:t.auth,user_data:t.user_data})},this.pusher=e,this.pusher.connection.bind(`state_change`,({previous:e,current:t})=>{e!==`connected`&&t===`connected`&&this._signin(),e===`connected`&&t!==`connected`&&(this._cleanup(),this._newSigninPromiseIfNeeded())}),this.watchlist=new rn(e),this.pusher.connection.bind(`message`,e=>{e.event===`pusher:signin_success`&&this._onSigninSuccess(e.data),this.serverToUserChannel&&this.serverToUserChannel.name===e.channel&&this.serverToUserChannel.handleEvent(e)})}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),this.pusher.connection.state===`connected`&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(e){try{this.user_data=JSON.parse(e.user_data)}catch{L.error(`Failed parsing user data after signin: ${e.user_data}`),this._cleanup();return}if(typeof this.user_data.id!=`string`||this.user_data.id===``){L.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){let e=e=>{e.subscriptionPending&&e.subscriptionCancelled?e.reinstateSubscription():!e.subscriptionPending&&this.pusher.connection.state===`connected`&&e.subscribe()};this.serverToUserChannel=new U(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global((e,t)=>{e.indexOf(`pusher_internal:`)===0||e.indexOf(`pusher:`)===0||this.emit(e,t)}),e(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&=(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested||this.signinDonePromise&&!this.signinDonePromise.done)return;let{promise:e,resolve:t,reject:n}=on();e.done=!1;let r=()=>{e.done=!0};e.then(r).catch(r),this.signinDonePromise=e,this._signinDoneResolve=t}}class Q{static ready(){Q.isReady=!0;for(var e=0,t=Q.instances.length;e<t;e++)Q.instances[e].connect()}static getClientFeatures(){return ce(pe({ws:X.Transports.ws},function(e){return e.isSupported({})}))}constructor(e,t){cn(e),Vt(t),this.key=e,this.options=t,this.config=qt(this.options,this),this.channels=W.createChannels(),this.global_emitter=new z,this.sessionID=X.randomInt(1e9),this.timeline=new Ft(this.key,this.sessionID,{cluster:this.config.cluster,features:Q.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:Z.INFO,version:a.VERSION}),this.config.enableStats&&(this.timelineSender=W.createTimelineSender(this.timeline,{host:this.config.statsHost,path:`/timeline/v2/`+X.TimelineTransport.name}));var n=e=>X.getDefaultStrategy(this.config,e,zt);this.connection=W.createConnectionManager(this.key,{getStrategy:n,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind(`connected`,()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())}),this.connection.bind(`message`,e=>{var t=e.event.indexOf(`pusher_internal:`)===0;if(e.channel){var n=this.channel(e.channel);n&&n.handleEvent(e)}t||this.global_emitter.emit(e.event,e.data)}),this.connection.bind(`connecting`,()=>{this.channels.disconnect()}),this.connection.bind(`disconnected`,()=>{this.channels.disconnect()}),this.connection.bind(`error`,e=>{L.warn(e)}),Q.instances.push(this),this.timeline.info({instances:Q.instances.length}),this.user=new sn(this),Q.isReady&&this.connect()}switchCluster(e){let{appKey:t,cluster:n}=e;this.key=t,this.options=Object.assign(Object.assign({},this.options),{cluster:n}),this.config=qt(this.options,this),this.connection.switchCluster(this.key)}channel(e){return this.channels.find(e)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var e=this.connection.isUsingTLS(),t=this.timelineSender;this.timelineSenderTimer=new ae(6e4,function(){t.send(e)})}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&=(this.timelineSenderTimer.ensureAborted(),null)}bind(e,t,n){return this.global_emitter.bind(e,t,n),this}unbind(e,t,n){return this.global_emitter.unbind(e,t,n),this}bind_global(e){return this.global_emitter.bind_global(e),this}unbind_global(e){return this.global_emitter.unbind_global(e),this}unbind_all(e){return this.global_emitter.unbind_all(),this}subscribeAll(){for(var e in this.channels.channels)this.channels.channels.hasOwnProperty(e)&&this.subscribe(e)}subscribe(e){var t=this.channels.add(e,this);return t.subscriptionPending&&t.subscriptionCancelled?t.reinstateSubscription():!t.subscriptionPending&&this.connection.state===`connected`&&t.subscribe(),t}unsubscribe(e){var t=this.channels.find(e);t&&t.subscriptionPending?t.cancelSubscription():(t=this.channels.remove(e),t&&t.subscribed&&t.unsubscribe())}send_event(e,t,n){return this.connection.send_event(e,t,n)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}Q.instances=[],Q.isReady=!1,Q.logToConsole=!1,Q.Runtime=X,Q.ScriptReceivers=X.ScriptReceivers,Q.DependenciesReceivers=X.DependenciesReceivers,Q.auth_callbacks=X.auth_callbacks;let $=Q;function cn(e){if(e==null)throw`You must pass your app key when you instantiate Pusher.`}X.setup(Q)}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}return n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n(721)})())}))(),1),i=e(n(),1),a=class{constructor(){this.notificationCreatedEvent=`.Illuminate\\Notifications\\Events\\BroadcastNotificationCreated`}listenForWhisper(e,t){return this.listen(`.client-`+e,t)}notification(e){return this.listen(this.notificationCreatedEvent,e)}stopListeningForNotification(e){return this.stopListening(this.notificationCreatedEvent,e)}stopListeningForWhisper(e,t){return this.stopListening(`.client-`+e,t)}},o=class{constructor(e){this.namespace=e}format(e){return[`.`,`\\`].includes(e.charAt(0))?e.substring(1):(this.namespace&&(e=this.namespace+`.`+e),e.replace(/\./g,`\\`))}setNamespace(e){this.namespace=e}};function s(e){try{return Reflect.construct(String,[],e),!0}catch{return!1}}var c=class extends a{constructor(e,t,n){super(),this.name=t,this.pusher=e,this.options=n,this.eventFormatter=new o(this.options.namespace),this.subscribe()}subscribe(){this.subscription=this.pusher.subscribe(this.name)}unsubscribe(){this.pusher.unsubscribe(this.name)}listen(e,t){return this.on(this.eventFormatter.format(e),t),this}listenToAll(e){return this.subscription.bind_global((t,n)=>{if(t.startsWith(`pusher:`))return;let r=String(this.options.namespace??``).replace(/\./g,`\\`);e(t.startsWith(r)?t.substring(r.length+1):`.`+t,n)}),this}stopListening(e,t){return t?this.subscription.unbind(this.eventFormatter.format(e),t):this.subscription.unbind(this.eventFormatter.format(e)),this}stopListeningToAll(e){return e?this.subscription.unbind_global(e):this.subscription.unbind_global(),this}subscribed(e){return this.on(`pusher:subscription_succeeded`,()=>{e()}),this}error(e){return this.on(`pusher:subscription_error`,t=>{e(t)}),this}on(e,t){return this.subscription.bind(e,t),this}},l=class extends c{whisper(e,t){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,t),this}},u=class extends c{whisper(e,t){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,t),this}},d=class extends l{here(e){return this.on(`pusher:subscription_succeeded`,t=>{e(Object.keys(t.members).map(e=>t.members[e]))}),this}joining(e){return this.on(`pusher:member_added`,t=>{e(t.info)}),this}whisper(e,t){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,t),this}leaving(e){return this.on(`pusher:member_removed`,t=>{e(t.info)}),this}},f=class extends a{constructor(e,t,n){super(),this.events={},this.listeners={},this.name=t,this.socket=e,this.options=n,this.eventFormatter=new o(this.options.namespace),this.subscribe()}subscribe(){this.socket.emit(`subscribe`,{channel:this.name,auth:this.options.auth||{}})}unsubscribe(){this.unbind(),this.socket.emit(`unsubscribe`,{channel:this.name,auth:this.options.auth||{}})}listen(e,t){return this.on(this.eventFormatter.format(e),t),this}stopListening(e,t){return this.unbindEvent(this.eventFormatter.format(e),t),this}subscribed(e){return this.on(`connect`,t=>{e(t)}),this}error(e){return this}on(e,t){return this.listeners[e]=this.listeners[e]||[],this.events[e]||(this.events[e]=(t,n)=>{this.name===t&&this.listeners[e]&&this.listeners[e].forEach(e=>e(n))},this.socket.on(e,this.events[e])),this.listeners[e].push(t),this}unbind(){Object.keys(this.events).forEach(e=>{this.unbindEvent(e)})}unbindEvent(e,t){this.listeners[e]=this.listeners[e]||[],t&&(this.listeners[e]=this.listeners[e].filter(e=>e!==t)),(!t||this.listeners[e].length===0)&&(this.events[e]&&(this.socket.removeListener(e,this.events[e]),delete this.events[e]),delete this.listeners[e])}},p=class extends f{whisper(e,t){return this.socket.emit(`client event`,{channel:this.name,event:`client-${e}`,data:t}),this}},m=class extends p{here(e){return this.on(`presence:subscribed`,t=>{e(t.map(e=>e.user_info))}),this}joining(e){return this.on(`presence:joining`,t=>e(t.user_info)),this}whisper(e,t){return this.socket.emit(`client event`,{channel:this.name,event:`client-${e}`,data:t}),this}leaving(e){return this.on(`presence:leaving`,t=>e(t.user_info)),this}},h=class extends a{subscribe(){}unsubscribe(){}listen(e,t){return this}listenToAll(e){return this}stopListening(e,t){return this}subscribed(e){return this}error(e){return this}on(e,t){return this}},g=class extends h{whisper(e,t){return this}},_=class extends h{whisper(e,t){return this}},v=class extends g{here(e){return this}joining(e){return this}whisper(e,t){return this}leaving(e){return this}},y=class e{static{this._defaultOptions={auth:{headers:{}},authEndpoint:`/broadcasting/auth`,userAuthentication:{endpoint:`/broadcasting/user-auth`,headers:{}},csrfToken:null,bearerToken:null,host:null,key:null,namespace:`App.Events`}}constructor(e){this.setOptions(e),this.connect()}setOptions(t){this.options={...e._defaultOptions,...t,broadcaster:t.broadcaster};let n=this.csrfToken();n&&(this.options.auth.headers[`X-CSRF-TOKEN`]=n,this.options.userAuthentication.headers[`X-CSRF-TOKEN`]=n),n=this.options.bearerToken,n&&(this.options.auth.headers.Authorization=`Bearer `+n,this.options.userAuthentication.headers.Authorization=`Bearer `+n)}csrfToken(){return typeof window<`u`&&window.Laravel?.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:typeof document<`u`&&typeof document.querySelector==`function`?document.querySelector(`meta[name="csrf-token"]`)?.getAttribute(`content`)??null:null}},b=class extends y{constructor(){super(...arguments),this.channels={}}connect(){if(typeof this.options.client<`u`)this.pusher=this.options.client;else if(this.options.Pusher)this.pusher=new this.options.Pusher(this.options.key,this.options);else if(typeof window<`u`&&typeof window.Pusher<`u`)this.pusher=new window.Pusher(this.options.key,this.options);else throw Error(`Pusher client not found. Should be globally available or passed via options.client`)}signin(){this.pusher.signin()}listen(e,t,n){return this.channel(e).listen(t,n)}channel(e){return this.channels[e]||(this.channels[e]=new c(this.pusher,e,this.options)),this.channels[e]}privateChannel(e){return this.channels[`private-`+e]||(this.channels[`private-`+e]=new l(this.pusher,`private-`+e,this.options)),this.channels[`private-`+e]}encryptedPrivateChannel(e){return this.channels[`private-encrypted-`+e]||(this.channels[`private-encrypted-`+e]=new u(this.pusher,`private-encrypted-`+e,this.options)),this.channels[`private-encrypted-`+e]}presenceChannel(e){return this.channels[`presence-`+e]||(this.channels[`presence-`+e]=new d(this.pusher,`presence-`+e,this.options)),this.channels[`presence-`+e]}leave(e){[e,`private-`+e,`private-encrypted-`+e,`presence-`+e].forEach(e=>{this.leaveChannel(e)})}leaveChannel(e){this.channels[e]&&(this.channels[e].unsubscribe(),delete this.channels[e])}socketId(){return this.pusher.connection.socket_id}connectionStatus(){let e=this.pusher.connection.state;switch(e){case`connected`:case`connecting`:return e;case`failed`:case`unavailable`:return`failed`;default:return`disconnected`}}onConnectionChange(e){let t=()=>{e(this.connectionStatus())},n=[`state_change`,`connected`,`disconnected`];return n.forEach(e=>{this.pusher.connection.bind(e,t)}),()=>{n.forEach(e=>{this.pusher.connection.unbind(e,t)})}}disconnect(){this.pusher.disconnect()}},x=class extends y{constructor(){super(...arguments),this.channels={}}connect(){let e=this.getSocketIO();this.socket=e(this.options.host??void 0,this.options),this.socket.io.on(`reconnect`,()=>{Object.values(this.channels).forEach(e=>{e.subscribe()})})}getSocketIO(){if(typeof this.options.client<`u`)return this.options.client;if(typeof window<`u`&&typeof window.io<`u`)return window.io;throw Error(`Socket.io client not found. Should be globally available or passed via options.client`)}listen(e,t,n){return this.channel(e).listen(t,n)}channel(e){return this.channels[e]||(this.channels[e]=new f(this.socket,e,this.options)),this.channels[e]}privateChannel(e){return this.channels[`private-`+e]||(this.channels[`private-`+e]=new p(this.socket,`private-`+e,this.options)),this.channels[`private-`+e]}presenceChannel(e){return this.channels[`presence-`+e]||(this.channels[`presence-`+e]=new m(this.socket,`presence-`+e,this.options)),this.channels[`presence-`+e]}leave(e){[e,`private-`+e,`presence-`+e].forEach(e=>{this.leaveChannel(e)})}leaveChannel(e){this.channels[e]&&(this.channels[e].unsubscribe(),delete this.channels[e])}socketId(){return this.socket.id}connectionStatus(){return this.socket.connected?`connected`:this.socket.io._reconnecting?`reconnecting`:this.socket.id===void 0?`connecting`:`disconnected`}onConnectionChange(e){let t=()=>{e(this.connectionStatus())},n=[`connect`,`disconnect`,`connect_error`,`reconnect_attempt`,`reconnect`,`reconnect_error`,`reconnect_failed`];return n.forEach(e=>{this.socket.on(e,t)}),()=>{n.forEach(e=>{this.socket.off(e,t)})}}disconnect(){this.socket.disconnect()}},S=class extends y{constructor(){super(...arguments),this.channels={}}connect(){}listen(e,t,n){return new h}channel(e){return new h}privateChannel(e){return new g}encryptedPrivateChannel(e){return new _}presenceChannel(e){return new v}leave(e){}leaveChannel(e){}socketId(){return`fake-socket-id`}connectionStatus(){return`connected`}onConnectionChange(e){return()=>{}}disconnect(){}},C=class{constructor(e){this.options=e,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}channel(e){return this.connector.channel(e)}connect(){if(this.options.broadcaster===`reverb`)this.connector=new b({...this.options,cluster:``});else if(this.options.broadcaster===`pusher`)this.connector=new b(this.options);else if(this.options.broadcaster===`ably`)this.connector=new b({...this.options,cluster:``,broadcaster:`pusher`});else if(this.options.broadcaster===`socket.io`)this.connector=new x(this.options);else if(this.options.broadcaster===`null`)this.connector=new S(this.options);else if(typeof this.options.broadcaster==`function`&&s(this.options.broadcaster))this.connector=new this.options.broadcaster(this.options);else throw Error(`Broadcaster ${typeof this.options.broadcaster} ${String(this.options.broadcaster)} is not supported.`)}disconnect(){this.connector.disconnect()}join(e){return this.connector.presenceChannel(e)}leave(e){this.connector.leave(e)}leaveChannel(e){this.connector.leaveChannel(e)}leaveAllChannels(){for(let e in this.connector.channels)this.leaveChannel(e)}listen(e,t,n){return this.connector.listen(e,t,n)}private(e){return this.connector.privateChannel(e)}encryptedPrivate(e){if(this.connectorSupportsEncryptedPrivateChannels(this.connector))return this.connector.encryptedPrivateChannel(e);throw Error(`Broadcaster ${typeof this.options.broadcaster} ${String(this.options.broadcaster)} does not support encrypted private channels.`)}connectorSupportsEncryptedPrivateChannels(e){return e instanceof b||e instanceof S}socketId(){return this.connector.socketId()}connectionStatus(){return this.connector.connectionStatus()}registerInterceptors(){typeof Vue<`u`&&Vue?.http&&this.registerVueRequestInterceptor(),typeof axios==`function`&&this.registerAxiosRequestInterceptor(),typeof jQuery==`function`&&this.registerjQueryAjaxSetup(),typeof Turbo==`object`&&this.registerTurboRequestInterceptor()}registerVueRequestInterceptor(){Vue.http.interceptors.push((e,t)=>{this.socketId()&&e.headers.set(`X-Socket-ID`,this.socketId()),t()})}registerAxiosRequestInterceptor(){axios.interceptors.request.use(e=>(this.socketId()&&(e.headers[`X-Socket-Id`]=this.socketId()),e))}registerjQueryAjaxSetup(){typeof jQuery.ajax<`u`&&jQuery.ajaxPrefilter((e,t,n)=>{this.socketId()&&n.setRequestHeader(`X-Socket-Id`,this.socketId())})}registerTurboRequestInterceptor(){document.addEventListener(`turbo:before-fetch-request`,e=>{e.detail.fetchOptions.headers[`X-Socket-Id`]=this.socketId()})}},w=null,T=null,E=()=>{if(w)return w;if(!T)throw Error("Echo has not been configured. Please call `configureEcho()`.");return T.Pusher??=r.default,w=new C(T),w},ee=e=>{T={...{reverb:{broadcaster:`reverb`,key:void 0,wsHost:void 0,wsPort:void 0,wssPort:void 0,forceTLS:!0,enabledTransports:[`ws`,`wss`]},pusher:{broadcaster:`pusher`,key:void 0,cluster:void 0,forceTLS:!0,wsHost:void 0,wsPort:void 0,wssPort:void 0,enabledTransports:[`ws`,`wss`]},"socket.io":{broadcaster:`socket.io`,host:void 0},null:{broadcaster:`null`},ably:{broadcaster:`pusher`,key:void 0,wsHost:`realtime-pusher.ably.io`,wsPort:443,disableStats:!0,encrypted:!0}}[e.broadcaster],...e},w&&=null},D=()=>E(),O=e=>Array.isArray(e)?e:[e],k={},te=e=>{let t=D();return e.visibility===`presence`?t.join(e.name):e.visibility===`private`?t.private(e.name):t.channel(e.name)},ne=(e,t)=>{k[e.id]&&(--k[e.id].count,!(k[e.id].count>0)&&(t?D().leave(e.name):D().leaveChannel(e.id),delete k[e.id]))},re=e=>{if(k[e.id])return k[e.id].count+=1,k[e.id].connection;let t=te(e);return k[e.id]={count:1,connection:t},t};function A(e,t=[],n=()=>{},r=[],a=`private`){let o=(0,i.useMemo)(()=>({name:e,id:[`private`,`presence`].includes(a)?`${a}-${e}`:e,visibility:a}),[e,a]),s=(0,i.useCallback)(n,r),c=(0,i.useRef)(!1),l=(0,i.useRef)(null),u=(0,i.useMemo)(()=>O(t),[Array.isArray(t)?JSON.stringify(t):t]),d=(0,i.useCallback)(()=>{!c.current||!l.current||(u.forEach(e=>{l.current.stopListening(e,s)}),c.current=!1)},[u,s]),f=(0,i.useCallback)(()=>{c.current||!l.current||(u.forEach(e=>{l.current.listen(e,s)}),c.current=!0)},[u,s]),p=(0,i.useCallback)((e=!1)=>{d(),ne(o,e)},[d,o]),m=(0,i.useCallback)(()=>{p(!0)},[p]);return(0,i.useEffect)(()=>(l.current=re(o),f(),p),[f,p,o]),(0,i.useMemo)(()=>({leaveChannel:p,leave:m,stopListening:d,listen:f,channel:()=>l.current}),[m,f,d,p])}var ie=(e,t=()=>{},n=[],r=[])=>{let a=A(e,[],t,r,`private`),o=(0,i.useMemo)(()=>O(n).map(e=>e.includes(`.`)?[e,e.replace(/\./g,`\\`)]:[e,e.replace(/\\/g,`.`)]).flat(),[Array.isArray(n)?JSON.stringify(n):n]),s=(0,i.useRef)(!1),c=(0,i.useCallback)(t,r),l=(0,i.useCallback)(e=>{s.current&&(o.length===0||o.includes(e.type))&&c(e)},[c,o]),u=(0,i.useCallback)(()=>{if(s.current)return;let e=a.channel();e&&(e.notification(l),s.current=!0)},[l,a]),d=(0,i.useCallback)(()=>{if(!s.current)return;let e=a.channel();if(!e){s.current=!1;return}e.stopListeningForNotification(l),s.current=!1},[l,a]);return(0,i.useEffect)(()=>(u(),()=>d()),[u,d]),(0,i.useMemo)(()=>({...a,stopListening:d,listen:u}),[a,d,u])},j=(e,t=[],n=()=>{},r=[])=>A(e,t,n,r,`presence`),ae=(e,t=[],n=()=>{},r=[])=>A(e,t,n,r,`public`);export{ee as configureEcho,A as useEcho,ie as useEchoNotification,j as useEchoPresence,ae as useEchoPublic};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./react-B8IZ02wI.js";function n(e){return typeof e==`symbol`||e instanceof Symbol}var r=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function i(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function a(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function o(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function s(e){return r.Buffer!==void 0&&r.Buffer.isBuffer(e)}function c(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function l(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var u=`[object RegExp]`,d=`[object String]`,f=`[object Number]`,p=`[object Boolean]`,m=`[object Arguments]`,h=`[object Symbol]`,g=`[object Date]`,_=`[object Map]`,v=`[object Set]`,y=`[object Array]`,b=`[object Function]`,x=`[object ArrayBuffer]`,S=`[object Object]`,ee=`[object Error]`,C=`[object DataView]`,w=`[object Uint8Array]`,T=`[object Uint8ClampedArray]`,E=`[object Uint16Array]`,D=`[object Uint32Array]`,O=`[object BigUint64Array]`,k=`[object Int8Array]`,A=`[object Int16Array]`,j=`[object Int32Array]`,M=`[object BigInt64Array]`,N=`[object Float32Array]`,P=`[object Float64Array]`;function F(e,t){return I(e,void 0,e,new Map,t)}function I(e,t,n,r=new Map,i=void 0){let c=i?.(e,t,n,r);if(c!==void 0)return c;if(a(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=I(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,I(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(I(a,void 0,n,r,i));return t}if(s(e))return e.subarray();if(o(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=I(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),L(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),L(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,L(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),L(t,e,n,r,i),t}if(typeof e==`object`&&R(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),L(t,e,n,r,i),t}return e}function L(e,t,n=e,r,i){let a=[...Object.keys(t),...c(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=I(t[s],s,n,r,i))}}function R(e){switch(l(e)){case m:case y:case x:case C:case p:case g:case N:case P:case k:case A:case j:case _:case f:case S:case u:case v:case d:case h:case w:case T:case E:case D:return!0;default:return!1}}function z(e){return I(e,void 0,e,new Map,void 0)}function B(e){return e===`__proto__`}function te(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ne(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function re(e){return Number.isSafeInteger(e)&&e>=0}function V(e){return e!=null&&typeof e!=`function`&&re(e.length)}function H(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(H).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function U(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function W(e){if(Array.isArray(e))return e.map(U);if(typeof e==`symbol`)return[e];e=H(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&(t.push(``),r++);r<n;){let s=e[r];a?s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s:o?s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s:s===`[`?(o=!0,i&&=(t.push(i),``)):s===`.`?i&&=(t.push(i),``):i+=s,r++}return i&&t.push(i),t}function G(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function K(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(B(t))return n;let r=e[t];return r===void 0?G(t)?K(e,W(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=U(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return q(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),B(t))return n;let r=e[t];return r===void 0?n:r}}}function q(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||B(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function J(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function Y(e,t){return F(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(l(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),L(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case f:case d:case p:{let t=new e.constructor(e?.valueOf());return L(t,e),t}case m:{let t={};return L(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function ie(e){return Y(e)}function X(e){return typeof e==`object`&&!!e&&l(e)===`[object Arguments]`}var ae=/^(?:0|[1-9]\d*)$/;function Z(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return ae.test(e)}}function oe(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&G(t)&&e?.[t]==null?W(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||X(r))&&Z(t)&&t<r.length))return!1;r=r[t]}return!0}function Q(e){return typeof e==`object`&&!!e}function $(e){return Q(e)&&V(e)}var se=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ce=/^\w*$/;function le(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||n(e)?!0:typeof e==`string`&&(ce.test(e)||!se.test(e))||t!=null&&Object.hasOwn(t,e)}function ue(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:a=!0,maxWait:o}=n,s=[,,];r&&(s[0]=`leading`),a&&(s[1]=`trailing`);let c,l=null,u=i(function(...t){c=e.apply(this,t),l=null},t,{edges:s}),d=function(...t){return o!=null&&(l===null&&(l=Date.now()),Date.now()-l>=o)?(c=e.apply(this,t),l=Date.now(),u.cancel(),u.schedule(),c):(u.apply(this,t),c)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),c),d}var de=e((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),fe=e(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=de()})),pe=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),me=e(((e,t)=>{t.exports=pe()}));export{P as A,d as B,M as C,g as D,C as E,_ as F,T as G,E as H,f as I,s as J,l as K,S as L,A as M,j as N,ee as O,k as P,u as R,y as S,p as T,D as U,h as V,w as W,a as X,o as Y,n as Z,ne as _,$ as a,z as b,Z as c,J as d,K as f,V as g,H as h,le as i,b as j,N as k,X as l,U as m,fe as n,Q as o,W as p,c as q,ue as r,oe as s,me as t,ie as u,te as v,O as w,x,B as y,v as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./react-B8IZ02wI.js";var n=e(t(),1),r={callout:`lattice:callout`,toast:`lattice:toast`,reloadComponent:`lattice:reload-component`,openModal:`lattice:open-modal`,closeModal:`lattice:close-modal`,resetForm:`lattice:reset-form`,toggleSidebar:`lattice:toggle-sidebar`,appearanceChange:`lattice:appearance-change`,localeChange:`lattice:locale-change`,timezoneChange:`lattice:timezone-change`,actionError:`lattice:action-error`},i=`locale`,a=`en`,o=365*24*60*60,s=new Set,c;function l(e){let t=e.trim();return t===``?a:t}function u(){if(typeof window>`u`)return null;try{return localStorage.getItem(i)}catch{return null}}function d(){if(typeof document>`u`)return null;let e=document.cookie.split(`;`).map(e=>e.trim()).find(e=>e.startsWith(`${i}=`));if(!e)return null;try{return decodeURIComponent(e.slice(7))}catch{return null}}function f(){return typeof document>`u`?null:document.documentElement.lang||null}function p(){return l(u()??d()??f()??a)}function m(e){if(typeof document<`u`&&(document.cookie=`${i}=${encodeURIComponent(e)};path=/;max-age=${o};SameSite=Lax`,document.documentElement.lang=e),typeof window<`u`)try{localStorage.setItem(i,e)}catch{return}}function h(){return c??=p(),c}function g(e){return s.add(e),()=>{s.delete(e)}}function _(){s.forEach(e=>e())}function v(e){typeof window>`u`||window.dispatchEvent(new CustomEvent(r.localeChange,{detail:{locale:e}}))}function y(){return h()}function b(){return{"Accept-Language":y()}}function x(e){return g(()=>e(y()))}function S(e){let t=y(),n=l(e);c=n,m(n),n!==t&&(_(),v(n))}function C(){return{locale:(0,n.useSyncExternalStore)(g,h,()=>a),setLocale:S}}export{C as a,x as i,b as n,r as o,S as r,y as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./locale-CXqr7LPR.js";import{B as t,R as n,U as r,V as i,z as a}from"../lattice.js";var o=[];o.forEach,o.slice;var s=[`__proto__`,`constructor`,`prototype`];function c(e){return!(typeof e!=`string`||e.length===0||e.length>128||s.indexOf(e)>-1||e.indexOf(`..`)>-1||e.indexOf(`\\`)>-1||/[?#%\s@]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function l(e){return!(!c(e)||e.indexOf(`/`)>-1)}function u(e){return c(e)}var d={lng:l,ns:u};function f(e){return typeof e==`string`?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e}function p(e){if(typeof e!=`string`||e.length===0)return e;try{let t=new URL(e);return t.username||t.password?(t.username=``,t.password=``,t.toString()):e}catch{return e.replace(/(\/\/)[^/@\s]+@/g,`$1`)}}function m(){return typeof XMLHttpRequest==`function`||typeof XMLHttpRequest==`object`}function h(e){return!!e&&typeof e.then==`function`}function g(e){return h(e)?e:Promise.resolve(e)}var _=/\{\{(.+?)\}\}/g;function v(e,t){let n=!1,r=e.replace(_,(e,r)=>{let i=r.trim();if(s.indexOf(i)>-1)return e;let a=t[i];if(a==null)return e;let o=d[i]||l,c=String(a).split(`+`);for(let t of c)if(!o(t))return n=!0,e;return c.join(`+`)});return n?null:r}var y=typeof globalThis<`u`?globalThis:typeof global<`u`?global:typeof window<`u`?window:void 0,b;typeof fetch==`function`?b=fetch:y&&typeof y.fetch==`function`&&(b=y.fetch);var x=m()&&y?y.XMLHttpRequest:void 0,S=typeof ActiveXObject==`function`&&y?y.ActiveXObject:void 0,C=[`__proto__`,`constructor`,`prototype`],w=(e,t)=>{if(t&&typeof t==`object`){let n=``;for(let e of Object.keys(t))C.indexOf(e)>-1||(n+=`&`+encodeURIComponent(e)+`=`+encodeURIComponent(t[e]));if(!n)return e;e=e+(e.indexOf(`?`)===-1?`?`:`&`)+n.slice(1)}return e},T=(e,t,n,r)=>{let i=e=>{if(!e.ok)return n(e.statusText||`Error`,{status:e.status});e.text().then(t=>{n(null,{status:e.status,data:t})}).catch(n)};if(r){let a=r(e,t);if(a instanceof Promise){a.then(i).catch(n);return}}typeof fetch==`function`?fetch(e,t).then(i).catch(n):b(e,t).then(i).catch(n)},E=(e,t,n,r)=>{e.queryStringParams&&(t=w(t,e.queryStringParams));let i={...typeof e.customHeaders==`function`?e.customHeaders():e.customHeaders};typeof window>`u`&&typeof global<`u`&&global.process!==void 0&&global.process.versions&&global.process.versions.node&&(i[`User-Agent`]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),n&&(i[`Content-Type`]=`application/json`);let a=typeof e.requestOptions==`function`?e.requestOptions(n):e.requestOptions,o={method:n?`POST`:`GET`,body:n?e.stringify(n):void 0,headers:i,...e._omitFetchOptions?{}:a},s=typeof e.alternateFetch==`function`&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{T(t,o,r,s)}catch(n){if(!a||Object.keys(a).length===0||!n.message||n.message.indexOf(`not implemented`)<0)return r(n);try{Object.keys(a).forEach(e=>{delete o[e]}),T(t,o,r,s),e._omitFetchOptions=!0}catch(e){r(e)}}},D=(e,t,n,r)=>{n&&typeof n==`object`&&(n=w(``,n).slice(1)),e.queryStringParams&&(t=w(t,e.queryStringParams));try{let i=x?new x:new S(`MSXML2.XMLHTTP.3.0`);i.open(n?`POST`:`GET`,t,1),e.crossDomain||i.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),i.withCredentials=!!e.withCredentials,n&&i.setRequestHeader(`Content-Type`,`application/x-www-form-urlencoded`),i.overrideMimeType&&i.overrideMimeType(`application/json`);let a=e.customHeaders;if(a=typeof a==`function`?a():a,a)for(let e of Object.keys(a))C.indexOf(e)>-1||i.setRequestHeader(e,a[e]);i.onreadystatechange=()=>{i.readyState>3&&r(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(n)}catch(e){console&&console.log(e)}},O=(e,t,n,r)=>{if(typeof n==`function`&&(r=n,n=void 0),r||=(()=>{}),b&&t.indexOf(`file:`)!==0)return E(e,t,n,r);if(m()||typeof ActiveXObject==`function`)return D(e,t,n,r);r(Error(`No fetch and no xhr implementation found!`))},k=()=>({loadPath:`/locales/{{lng}}/{{ns}}.json`,addPath:`/locales/add/{{lng}}/{{ns}}`,parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,n)=>({[t]:n||``}),parseLoadPayload:(e,t)=>void 0,request:O,reloadInterval:typeof window<`u`?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:`cors`,credentials:`same-origin`,cache:`default`}}),A=class{constructor(e,t={},n={}){this.services=e,this.options=t,this.allOptions=n,this.type=`backend`,this.init(e,t,n)}init(e,t={},n={}){if(this.services=e,this.options={...k(),...this.options||{},...t},this.allOptions=n,this.services&&this.options.reloadInterval){let e=setInterval(()=>this.reload(),this.options.reloadInterval);typeof e==`object`&&typeof e.unref==`function`&&e.unref()}}readMulti(e,t,n){this._readAny(e,e,t,t,n)}read(e,t,n){this._readAny([e],e,[t],t,n)}_readAny(e,t,n,r,i){let a=this.options.loadPath;typeof this.options.loadPath==`function`&&(a=this.options.loadPath(e,n)),a=g(a),a.then(a=>{if(!a)return i(null,{});let o=v(a,{lng:e.join(`+`),ns:n.join(`+`)});if(o==null){let t=e.map(f).join(`, `),r=n.map(f).join(`, `);return i(Error(`i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[`+t+`] namespaces=[`+r+`]`),!1)}this.loadUrl(o,i,t,r)})}loadUrl(e,t,n,r){let i=typeof n==`string`?[n]:n,a=typeof r==`string`?[r]:r,o=this.options.parseLoadPayload(i,a),s=f(p(e));this.options.request(this.options,e,o,(e,i)=>{if(i&&(i.status>=500&&i.status<600||!i.status))return t(`failed loading `+s+`; status code: `+i.status,!0);if(i&&i.status>=400&&i.status<500)return t(`failed loading `+s+`; status code: `+i.status,!1);if(!i&&e&&e.message){let n=e.message.toLowerCase();if([`failed`,`fetch`,`network`,`load`].find(e=>n.indexOf(e)>-1))return t(`failed loading `+s+`: `+f(e.message),!0)}if(e)return t(e,!1);let a,o;try{a=typeof i.data==`string`?this.options.parse(i.data,n,r):i.data}catch{o=`failed parsing `+s+` to json`}if(o)return t(o,!1);t(null,a)})}create(e,t,n,r,i){if(!this.options.addPath)return;typeof e==`string`&&(e=[e]);let a=this.options.parsePayload(t,n,r),o=0,s=[],c=[];e.forEach(n=>{let r=this.options.addPath;typeof this.options.addPath==`function`&&(r=this.options.addPath(n,t));let l=v(r,{lng:n,ns:t});if(l==null){o+=1,i&&o===e.length&&i(s,c);return}this.options.request(this.options,l,a,(t,n)=>{o+=1,s.push(t),c.push(n),o===e.length&&typeof i==`function`&&i(s,c)})})}reload(){let{backendConnector:e,languageUtils:t,logger:n}=this.services,r=e.language;if(r&&r.toLowerCase()===`cimode`)return;let i=[],a=e=>{t.toResolveHierarchy(e).forEach(e=>{i.indexOf(e)<0&&i.push(e)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(e=>a(e)),i.forEach(t=>{this.allOptions.ns.forEach(r=>{e.read(t,r,`read`,null,null,(i,a)=>{i&&n.warn(`loading namespace ${r} for language ${t} failed`,i),!i&&a&&n.log(`loaded namespace ${r} for language ${t}`,a),e.loaded(`${t}|${r}`,i,a)})})})}};A.type=`backend`;var j=`/locales/{{lng}}/{{ns}}.json`,M=`/locales/add/{{lng}}/{{ns}}`;async function N(e,t={}){if(r(e),!e?.enabled){await a(e=>({...e,ns:t.namespaces??e.ns}));return}await P({saveMissing:e.saveMissing,namespaces:t.namespaces}),i(e.preloadLocales)}async function P(n={}){let{namespaces:r,loadPath:i=j,addPath:o=M,saveMissing:s=!1,customHeaders:c}=n,l=()=>({...e(),...c?.()});t.use(A),await a(e=>({...e,ns:r??e.ns,partialBundledLanguages:!0,saveMissing:s,backend:{loadPath:i,addPath:o,customHeaders:l,withCredentials:!0}}))}function F(e,t={}){return N(n(e),t)}export{F as configureI18nFromPageProps};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),d=o(((e,t)=>{t.exports=u()}));export{l as i,o as n,s as r,d as t};
|