mates 0.2.1 → 0.2.3
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/Mutables/atom/atom.d.ts.map +1 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom.d.ts","sourceRoot":"","sources":["../../../lib/Mutables/atom/atom.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"atom.d.ts","sourceRoot":"","sources":["../../../lib/Mutables/atom/atom.ts"],"names":[],"mappings":"AAqBA,KAAK,UAAU,GAAG,MAAM,IAAI,CAAC;AAC7B,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC;AACjC,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;AAEtC,MAAM,MAAM,UAAU,GAAG;IACvB,mGAAmG;IACnG,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC,CAAC;AAcF,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;IACxB,IAAI,CAAC,CAAC;IACN,GAAG,IAAI,CAAC,CAAC;IACT,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACrD,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAClD,WAAW,CAAC,EAAE,EAAE,UAAU,GAAG,MAAM,IAAI,CAAC;IACxC,MAAM,IAAI,MAAM,CAAC;IACjB,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;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A0B,CAAC,EAAE,OAAO,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG;IAC3C,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,KAAK,IAAI,IAAI,CAAC;IACd,MAAM,IAAI,IAAI,CAAC;IACf,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,OAAO,EAAE,CAAC,EACV,OAAO,GAAE,gBAAqB,GAC7B,aAAa,CAAC,CAAC,CAAC,CAwFlB;AA4BD,OAAO,EAAE,UAAU,IAAI,EAAE,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4238,6 +4238,48 @@ declare const scope: <T extends object>(ScopeClass: new () => T) => TScope<T>;
|
|
|
4238
4238
|
*/
|
|
4239
4239
|
declare const getParentScope: <T extends object>(ScopeClass: new () => T) => TScope<T>;
|
|
4240
4240
|
|
|
4241
|
+
/**
|
|
4242
|
+
* Creates a global reactive state container from a plain object.
|
|
4243
|
+
*
|
|
4244
|
+
* Unlike `useState`, `store` is designed to be called at module level (outside
|
|
4245
|
+
* any component) and shared across the application. The returned factory
|
|
4246
|
+
* function can be called inside any component to obtain the shared
|
|
4247
|
+
* `[wrapper, update]` pair.
|
|
4248
|
+
*
|
|
4249
|
+
* - `wrapper` is a read-tracked object (built by `wrapStateFunctions`):
|
|
4250
|
+
* - Reading a data property (e.g. `state.count`) subscribes the current
|
|
4251
|
+
* component / `memo` / `effect` to re-run when the store updates.
|
|
4252
|
+
* - Methods defined on the initial object are automatically wrapped to call
|
|
4253
|
+
* `a.update()` — no manual batching needed.
|
|
4254
|
+
* - Getters are version-cached and recomputed only when `a.update()` is called.
|
|
4255
|
+
* - Direct assignment (`state.count = 5`) is also reactive and equivalent to
|
|
4256
|
+
* `update(s => { s.count = 5; })`.
|
|
4257
|
+
* - `update` is the raw `a.update` handle for external mutations that don't go
|
|
4258
|
+
* through a method.
|
|
4259
|
+
*
|
|
4260
|
+
* @param initialState - A plain object (with optional methods and getters) that
|
|
4261
|
+
* represents the initial state of the store.
|
|
4262
|
+
* @returns A factory function `() => [wrapper, update]` to be called inside
|
|
4263
|
+
* components or reactive contexts.
|
|
4264
|
+
*
|
|
4265
|
+
* @example
|
|
4266
|
+
* // module-level — created once
|
|
4267
|
+
* const counterStore = store({
|
|
4268
|
+
* count: 0,
|
|
4269
|
+
* incr() { this.count++; },
|
|
4270
|
+
* get doubled() { return this.count * 2; },
|
|
4271
|
+
* });
|
|
4272
|
+
*
|
|
4273
|
+
* // inside a component or effect
|
|
4274
|
+
* const [state, update] = counterStore();
|
|
4275
|
+
*
|
|
4276
|
+
* state.count; // 0 — tracked read, component re-renders on change
|
|
4277
|
+
* state.incr(); // calls a.update() automatically
|
|
4278
|
+
* state.doubled; // 0 — version-cached getter
|
|
4279
|
+
* update(() => { state.count = 10; }); // direct external mutation
|
|
4280
|
+
*/
|
|
4281
|
+
declare const store: <T extends Record<string, any>>(initialState: T) => () => (T | ((fn: (draft: T) => void, silently?: boolean) => void))[];
|
|
4282
|
+
|
|
4241
4283
|
type TState<T> = [T, (fn: () => void) => void];
|
|
4242
4284
|
/**
|
|
4243
4285
|
* Creates local component-level reactive state from a plain object.
|
|
@@ -6011,5 +6053,5 @@ declare function getMonths(locale?: string): MonthInfo[];
|
|
|
6011
6053
|
*/
|
|
6012
6054
|
declare function getCalendar(year: number, month: number): MatesDate[][];
|
|
6013
6055
|
|
|
6014
|
-
export { $, Component$1 as ComponentElement, Context, Delete, ErrorTypes, Fetch, FetchClient, Get, MA, NotificationManager, Patch, Post, Put, Router, SyncNotificationManager, ZeroPromise, _, _subToView, action, addStoreBeingRead, animatedIf, animatedRouter, animatedX, range as arrayRange, assertComponentOuterContext, assertNotInRestrictedContext, asyncAction, atom, attr, blurInPreset, blurOutPreset, bouncePreset, buildPath, buildRequestUrl, cacheAtom, createCacheManager as cacheFn, chunk, clamp, classes, cleanupScheduler, clearInterceptors, collapseWidthPreset, componentRunningStatus, computeAutoPlacement, configureCSS, createCacheManager, createManagedTimer, createPollingManager, createReactiveRunner, createTimedAtom, date, debounce, debouncedAtom, deepClone, deepFreeze, deleteAction, deepFreeze as df, dialog, effect, effectScheduler, eleHook, event, expandWidthPreset, fadeInPreset, fadeOutPreset, fetchAction, fetchClient, flipInPreset, flipOutPreset, formAtom, get, getAction, getAllProps, getAllTimezones, getCalendar, getCoords, getCurrentHost, getLocale, getMonths, getParentScope, getParentScope as getScope, getStoresBeingRead, getTimezoneOffset, globalCSS, globalScheduler, globalTheme, groupBy, hashAtom, htmlHook, iAtom, injectMatesAnimations, installDevToolsHooks, interceptAfter, interceptBefore, interceptError, isAction, isApiResponseSuccess, isAsyncAction, isAsyncFunction, isAsyncValue, isAtom, isChannel, isConfirmationEvent, isDefinedAsGetter, isDevToolsInstalled, isEffectRunning, isEmail, isEmpty, isEvent, isFunction, isGetter, isInRestrictedContext, isMax, isMin, isPathMatching, isPattern, isReadTrackingEnabled, isRequired, isSSR, isSetter, isUnit, iterateDeeply, keyframes, lazyLoad, location, lockNavigation, logError, lsAtom, mapAtom, masonryGrid, maxLength, memo, memoTemplate, merge, minLength, navigateTo, navigationLocked, omit, on, onAllMount, onBlur, onCleanup, onClickAway, onConnect, onCopy, onCut, onDOMReady, onDisconnect, onError, on$1 as onEvent, onFileDrop, onFocus, onHidden, onIntersect, onInterval, onKeyDown, onKeyUp, onMount, onNavigate, onOffline, onOnline, onPaint, onParent, onPaste, onReferenceChange, onResize, onScroll, onScrolledIntoView, onSelectionChange, onSocket, onStorageChange, onTimeout, onUpdate, onVisibilityChange, onVisible, onWindow, onWindowCapture, onWindowResize, onWindowScroll, paginatedAsyncAction, paginationAtom, patchAction, pathAtom, pick, placementTransform, popEffect, popup, portal, postAction, pulsePreset, pushEffect, putAction, qsAtom, uuid as randomId, ref, registerCleanup, removeAttr, removeClasses, removeOn, removeStyle, renderSwitch, renderTemplate, renderX, resetComponentState, resolveAsyncValue, restoreTracking, rootCSS, route, safeSVG, safetyCheck, saveAndEnableTracking, scaleInPreset, scaleOutPreset, scope, setAtom, setLocale, setRef, setSSRApiLookup, setSSRMode, setSSRRequest, setTimezone, setTimezoneOffset, setter, shakePreset, iAtom as signal, slideInPreset, slideOutPreset, spinPreset, springInPreset, ssAtom, startTracking, stopTracking, style, stylesheet, superAtom, taskAction, template, themeAtom, throttle, throttledAtom, timer, tip, titleAtom, tooltip, trackAndSubscribe, uniqBy, unlockNavigation, safeSVG as unsafeSVG, unwrapModule, useContext, scope as useScope, useState, useStore, uuid, validateAll, validateReactiveFunction, view, virtualGrid, virtualList, virtualMasonry, on as watch, withHost, withStaggerPreset, ws, x, xTabEvent };
|
|
6056
|
+
export { $, Component$1 as ComponentElement, Context, Delete, ErrorTypes, Fetch, FetchClient, Get, MA, NotificationManager, Patch, Post, Put, Router, SyncNotificationManager, ZeroPromise, _, _subToView, action, addStoreBeingRead, animatedIf, animatedRouter, animatedX, range as arrayRange, assertComponentOuterContext, assertNotInRestrictedContext, asyncAction, atom, attr, blurInPreset, blurOutPreset, bouncePreset, buildPath, buildRequestUrl, cacheAtom, createCacheManager as cacheFn, chunk, clamp, classes, cleanupScheduler, clearInterceptors, collapseWidthPreset, componentRunningStatus, computeAutoPlacement, configureCSS, createCacheManager, createManagedTimer, createPollingManager, createReactiveRunner, createTimedAtom, date, debounce, debouncedAtom, deepClone, deepFreeze, deleteAction, deepFreeze as df, dialog, effect, effectScheduler, eleHook, event, expandWidthPreset, fadeInPreset, fadeOutPreset, fetchAction, fetchClient, flipInPreset, flipOutPreset, formAtom, get, getAction, getAllProps, getAllTimezones, getCalendar, getCoords, getCurrentHost, getLocale, getMonths, getParentScope, getParentScope as getScope, getStoresBeingRead, getTimezoneOffset, globalCSS, globalScheduler, globalTheme, groupBy, hashAtom, htmlHook, iAtom, injectMatesAnimations, installDevToolsHooks, interceptAfter, interceptBefore, interceptError, isAction, isApiResponseSuccess, isAsyncAction, isAsyncFunction, isAsyncValue, isAtom, isChannel, isConfirmationEvent, isDefinedAsGetter, isDevToolsInstalled, isEffectRunning, isEmail, isEmpty, isEvent, isFunction, isGetter, isInRestrictedContext, isMax, isMin, isPathMatching, isPattern, isReadTrackingEnabled, isRequired, isSSR, isSetter, isUnit, iterateDeeply, keyframes, lazyLoad, location, lockNavigation, logError, lsAtom, mapAtom, masonryGrid, maxLength, memo, memoTemplate, merge, minLength, navigateTo, navigationLocked, omit, on, onAllMount, onBlur, onCleanup, onClickAway, onConnect, onCopy, onCut, onDOMReady, onDisconnect, onError, on$1 as onEvent, onFileDrop, onFocus, onHidden, onIntersect, onInterval, onKeyDown, onKeyUp, onMount, onNavigate, onOffline, onOnline, onPaint, onParent, onPaste, onReferenceChange, onResize, onScroll, onScrolledIntoView, onSelectionChange, onSocket, onStorageChange, onTimeout, onUpdate, onVisibilityChange, onVisible, onWindow, onWindowCapture, onWindowResize, onWindowScroll, paginatedAsyncAction, paginationAtom, patchAction, pathAtom, pick, placementTransform, popEffect, popup, portal, postAction, pulsePreset, pushEffect, putAction, qsAtom, uuid as randomId, ref, registerCleanup, removeAttr, removeClasses, removeOn, removeStyle, renderSwitch, renderTemplate, renderX, resetComponentState, resolveAsyncValue, restoreTracking, rootCSS, route, safeSVG, safetyCheck, saveAndEnableTracking, scaleInPreset, scaleOutPreset, scope, setAtom, setLocale, setRef, setSSRApiLookup, setSSRMode, setSSRRequest, setTimezone, setTimezoneOffset, setter, shakePreset, iAtom as signal, slideInPreset, slideOutPreset, spinPreset, springInPreset, ssAtom, startTracking, stopTracking, store, style, stylesheet, superAtom, taskAction, template, themeAtom, throttle, throttledAtom, timer, tip, titleAtom, tooltip, trackAndSubscribe, uniqBy, unlockNavigation, safeSVG as unsafeSVG, unwrapModule, useContext, scope as useScope, useState, useStore, uuid, validateAll, validateReactiveFunction, view, virtualGrid, virtualList, virtualMasonry, on as watch, withHost, withStaggerPreset, ws, x, xTabEvent };
|
|
6015
6057
|
export type { ActionAfterInterceptor, ActionBeforeInterceptor, ActionFn, ActionReturnType, ActionSubscriber, AfterInterceptor, AnimateDirectiveConfig, AnimateKeyframes, AnimateOptions, AnimatedIfConfig, AnimatedRouteConfig, AnimatedRouterOptions, AnimatedXConfig, AnimationHandle, AnimationPreset, AsyncActionAfterInterceptor, AsyncActionBeforeInterceptor, AsyncActionOptions, AsyncActionReturnType, AsyncActionStatus, AtomConfig, AtomType, AttrMap, AttrValue, BeforeInterceptor, C, CSSBlock, CSSKeyframeStops, CSSNestedBlock, CSSRulesInput, CacheAtomType, CacheManager, Cl, ClassEntry, ClassesInput, ClosureComponent, Component, ComponentFn, ComponentType, ConnectCallback, CssVars, DateInput, DateUnit, DateValues, DevToolsHooks, DialogOptions, DisconnectCallback, DollarChain, EleHookLifecycle, EleHookMountFn, ElementTarget, ErrorInterceptor, ErrorType, EventType, FetchActionConfig, FetchBody, FetchRequest, FormAtom, GlobalThemeResult, HostElement, HtmlHookLifecycle, HtmlHookMountFn, HtmlHookRenderFn, IAtomType, InnerFn, IntersectCallback, IntersectOptions, IterateDeeplyCallback, LazyComponent, LazyLoadCallback, LazyLoadOptions, MasonryGridOptions, MasonryItemTemplate, MasonryKeyFn, MatesAnimationClass, MatesCustomEventMap, MatesDate, Measurements, MemoKeys, MemoTemplateFn, MonthInfo, OnEventMap, OnParentMap, OuterFn, PaginatedAsyncActionReturnType, PaginationAtomType, Placement, PollingManager, PopupOptions, PopupPlacement, PortalOptions, Props, PropsType, MatesRef as Ref, RenderFn, ScrolledIntoViewCallback, ScrolledIntoViewOptions, SerializeOptions, Setter, SetterReturnType, SlideDirection, StorageAtomType, StorageValue, StyleMap, StyleValue, Subscribable, SuperAtomOptions, SuperAtomType, SvgConfig, SwitchCase, SwitchEntry, Task, TaskActionType, TaskStatus, TemplateComponent, TemplateFn, ThemeAtomType, ThemeMode, ThemeTokenMap, ThemeValue, ThemesInput, TimerContent, TimezoneEntry, TipContent, TipStyle, TrackingSnapshot, UpdateCallback, ValidateAllResult, ValidatorFn, View, ViewComponent, VirtualGridOptions, VirtualListOptions, VirtualMasonryOptions, WheelDirectionEvent, WindowHookEventName, WindowHookHandler, WsConfig, WsConnection, WsStatus, X, XTabEventType };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,O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,mBAAmB,EACnB,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,QAAQ,EACR,KAAK,EAEL,mBAAmB,EACnB,IAAI,EACJ,IAAI,EAEJ,KAAK,IAAI,UAAU,EAEnB,eAAe,EACf,KAAK,SAAS,EACd,uBAAuB,EACvB,OAAO,EACP,OAAO,IAAI,SAAS,EACpB,MAAM,EACN,IAAI,EACJ,IAAI,IAAI,QAAQ,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,IAAI,EACJ,eAAe,EACf,WAAW,EACX,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -96,7 +96,7 @@ ${s}</pre
|
|
|
96
96
|
>
|
|
97
97
|
</details>`:null}
|
|
98
98
|
</div>
|
|
99
|
-
`;i.__isErrorView__=!0,i.skipDevToolsRender=!0,this.view=i,this.name=e,this._errorState=t}}customElements.get("x-view")||customElements.define("x-view",Re);class Oe extends HTMLElement{constructor(){super(...arguments),this._onRequestContext=t=>{const e=t,n=e.detail?.context.id;n&&null!=this.id&&n===this.id&&(e.stopPropagation(),e.detail.resolve(this._value))}}connectedCallback(){this.addEventListener("request-context",this._onRequestContext)}set context(t){this.id=t.id}disconnectedCallback(){this.removeEventListener("request-context",this._onRequestContext)}set value(t){this._value=t}get value(){return this._value}}function Pe(t){let e=-1===t.indexOf("\0")?t:t.replace(/\0/g,"");const n=function(t){const e=t.indexOf("{"),n=t.indexOf("}");return-1===e&&-1===n?-1:-1===e?n:-1===n?e:Math.min(e,n)}(e);return-1!==n&&(e=e.slice(0,n)),/url\s*\(/i.test(e)&&(e=e.replace(/\burl\s*\(\s*(['"]?)\s*(?:javascript:|vbscript:|data:text\/html[,;])/gi,"url($1")),e}function ze(t){return t.length>0&&/^[a-zA-Z-]+$/.test(t)}customElements.get("x-provider")||customElements.define("x-provider",Oe);let Ie=0;function De(){return`_m${(Ie++).toString(36)}`}const Le=Object.create(null),Ne={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"};function je(t){const e=Le[t];if(void 0!==e)return e;const n=t.startsWith("--")?t:t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);return Le[t]=n,n}function Ue(t,e,n){if(!n)return`.${t} {\n${e}}`;if(n.startsWith("&")){return`.${t}${n.slice(1)} {\n${e}}`}return`${n} {\n .${t} {\n${e.replace(/^ {2}/gm," ")} }\n}`}function Fe(t){return t.startsWith("&")||t.startsWith("@media")?t:Object.prototype.hasOwnProperty.call(Ne,t)?`@media (min-width: ${Ne[t]})`:null}function Ve(t,e,n){const s=Object.create(null);for(const i in t){const r=t[i];let o="",a=null;for(const t in r){const e=r[t];if(null!=e){if("object"==typeof e&&!Array.isArray(e)){const n=Fe(t);if(null===n)throw new Error(`[css-in-js] Unknown nested key "${t}" in block "${i}". Use "&:pseudo", "@media (...)", or a configured breakpoint key.`);let s="";const r=e;for(const t in r){const e=r[t];null!=e&&(ze(t)?s+=` ${je(t)}: ${Pe(String(e))};\n`:console.warn(`[css-in-js] invalid property name skipped: "${t}"`))}s.length>0&&(null===a&&(a=[]),a.push([s,n]));continue}ze(t)?o+=` ${je(t)}: ${Pe(String(e))};\n`:console.warn(`[css-in-js] invalid property name skipped: "${t}"`)}}if(0===o.length&&null===a){s[i]="";continue}const l=n?.literal?i:`${i}${De()}`;if(o.length>0&&e.push(Ue(l,o,"")),null!==a)for(let t=0;t<a.length;t++)e.push(Ue(l,a[t][0],a[t][1]));s[i]=l}return s}function We(t){return Object.freeze(t)}var He,Ye,Be,qe,Xe,Ge,Ze,Ke;function Je(t){if(Qt.templateInProgress)throw new Error(`[css-in-js] ${t}() must be called at module level, not inside a template function.`);if(Qt.viewOuterInProgress)throw new Error(`[css-in-js] ${t}() must be called at module level, not inside a component outer function. Move it outside the component function.`);if(Qt.setupInProgress)throw new Error(`[css-in-js] ${t}() must be called at module level, not inside a setup function.`)}let Qe=0;function tn(t){return`${t}_kf${(Qe++).toString(36)}`}function en(t,e){let n="";for(const t in e){const s=e[t];let i="";for(const t in s){const e=s[t];if(null==e)continue;const n=t.startsWith("--")?t:t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);i+=` ${n}: ${String(e)};\n`}i&&(n+=` ${t} {\n${i} }\n`)}return`@keyframes ${t} {\n${n}}`}class nn{constructor(){He.add(this),Ye.set(this,""),Be.set(this,0),qe.set(this,null),Xe.set(this,[])}keyframes(t,e){const n=tn(t);return this.appendRules(en(n,e)),n}appendRules(t){""!==t&&(se(this,Xe,"f").push(t),se(this,Be,"f")>0&&se(this,He,"m",Ge).call(this))}mount(){var t;ie(this,Be,(t=se(this,Be,"f"),++t),"f"),1===se(this,Be,"f")&&(se(this,He,"m",Ge).call(this),se(this,qe,"f")||se(this,He,"m",Ze).call(this))}unmount(){var t;se(this,Be,"f")<=0||(ie(this,Be,(t=se(this,Be,"f"),--t),"f"),0===se(this,Be,"f")&&se(this,He,"m",Ke).call(this))}get refCount(){return se(this,Be,"f")}get cssText(){return se(this,Ye,"f")}get isMounted(){return se(this,Be,"f")>0}get sheet(){return se(this,qe,"f")}}Ye=new WeakMap,Be=new WeakMap,qe=new WeakMap,Xe=new WeakMap,He=new WeakSet,Ge=function(){if(0===se(this,Xe,"f").length)return;const t=se(this,Xe,"f").join("\n");ie(this,Xe,[],"f"),ie(this,Ye,se(this,Ye,"f")+(se(this,Ye,"f")?"\n":"")+t,"f"),se(this,He,"m",Ze).call(this)},Ze=function(){se(this,qe,"f")||(ie(this,qe,new CSSStyleSheet,"f"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,se(this,qe,"f")]),se(this,qe,"f").replaceSync(se(this,Ye,"f"))},Ke=function(){se(this,qe,"f")&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(t=>t!==se(this,qe,"f")),ie(this,qe,null,"f")),se(this,Ye,"f")&&(se(this,Xe,"f").unshift(se(this,Ye,"f")),ie(this,Ye,"","f"))};let sn=null,rn=!1;function on(){return sn||(sn=new nn),sn}function an(){sn||(sn=new nn),rn||(rn=!0,queueMicrotask(()=>{rn=!1,sn.mount()}))}function ln(t,e){Je("globalCSS"),an();const n=[],s=Ve(t,n,e);return n.length>0&&sn.appendRules(n.join("\n")),We(s)}function cn(t){Je("globalRawCSS"),an(),sn.appendRules(t)}let hn=!1;function un(){hn||(hn=!0,cn('\n[class*="mates-"] {\n --mates-duration : 300ms;\n --mates-easing : ease;\n --mates-distance : 24px;\n animation-duration : var(--mates-duration);\n animation-timing-function : var(--mates-easing);\n animation-fill-mode : both;\n}\n'),cn("\n@keyframes mates-kf-fade-in { from { opacity: 0 } to { opacity: 1 } }\n@keyframes mates-kf-fade-out { from { opacity: 1 } to { opacity: 0 } }\n\n@keyframes mates-kf-slide-in-up {\n from { opacity: 0; transform: translateY(var(--mates-distance)) }\n to { opacity: 1; transform: translateY(0) }\n}\n@keyframes mates-kf-slide-out-up {\n from { opacity: 1; transform: translateY(0) }\n to { opacity: 0; transform: translateY(calc(-1 * var(--mates-distance))) }\n}\n@keyframes mates-kf-slide-in-down {\n from { opacity: 0; transform: translateY(calc(-1 * var(--mates-distance))) }\n to { opacity: 1; transform: translateY(0) }\n}\n@keyframes mates-kf-slide-out-down {\n from { opacity: 1; transform: translateY(0) }\n to { opacity: 0; transform: translateY(var(--mates-distance)) }\n}\n@keyframes mates-kf-slide-in-left {\n from { opacity: 0; transform: translateX(var(--mates-distance)) }\n to { opacity: 1; transform: translateX(0) }\n}\n@keyframes mates-kf-slide-out-left {\n from { opacity: 1; transform: translateX(0) }\n to { opacity: 0; transform: translateX(calc(-1 * var(--mates-distance))) }\n}\n@keyframes mates-kf-slide-in-right {\n from { opacity: 0; transform: translateX(calc(-1 * var(--mates-distance))) }\n to { opacity: 1; transform: translateX(0) }\n}\n@keyframes mates-kf-slide-out-right {\n from { opacity: 1; transform: translateX(0) }\n to { opacity: 0; transform: translateX(var(--mates-distance)) }\n}\n\n@keyframes mates-kf-scale-in {\n from { opacity: 0; transform: scale(0.92) }\n to { opacity: 1; transform: scale(1) }\n}\n@keyframes mates-kf-scale-out {\n from { opacity: 1; transform: scale(1) }\n to { opacity: 0; transform: scale(0.92) }\n}\n\n@keyframes mates-kf-spring-in {\n from { opacity: 0; transform: scale(0.92) }\n to { opacity: 1; transform: scale(1) }\n}\n\n@keyframes mates-kf-flip-in-x {\n from { opacity: 0; transform: rotateX(90deg) }\n to { opacity: 1; transform: rotateX(0deg) }\n}\n@keyframes mates-kf-flip-in-y {\n from { opacity: 0; transform: rotateY(90deg) }\n to { opacity: 1; transform: rotateY(0deg) }\n}\n\n@keyframes mates-kf-blur-in {\n from { opacity: 0; filter: blur(10px) }\n to { opacity: 1; filter: blur(0) }\n}\n@keyframes mates-kf-blur-out {\n from { opacity: 1; filter: blur(0) }\n to { opacity: 0; filter: blur(10px) }\n}\n\n@keyframes mates-kf-shake {\n 0%, 100% { transform: translateX(0) }\n 15% { transform: translateX(calc(-1 * var(--mates-distance))) }\n 30% { transform: translateX(calc( 1 * var(--mates-distance))) }\n 45% { transform: translateX(calc(-0.6 * var(--mates-distance))) }\n 60% { transform: translateX(calc( 0.6 * var(--mates-distance))) }\n 75% { transform: translateX(calc(-0.3 * var(--mates-distance))) }\n 90% { transform: translateX(calc( 0.3 * var(--mates-distance))) }\n}\n\n@keyframes mates-kf-pulse {\n 0%, 100% { transform: scale(1) }\n 50% { transform: scale(1.08) }\n}\n\n@keyframes mates-kf-bounce {\n 0% { transform: translateY(0) }\n 20% { transform: translateY(calc(-0.40 * var(--mates-distance))) }\n 40% { transform: translateY(0) }\n 60% { transform: translateY(calc(-0.20 * var(--mates-distance))) }\n 80% { transform: translateY(0) }\n 90% { transform: translateY(calc(-0.08 * var(--mates-distance))) }\n 100% { transform: translateY(0) }\n}\n\n@keyframes mates-kf-spin {\n from { transform: rotate(0deg) }\n to { transform: rotate(360deg) }\n}\n"),ln({"mates-fade-in":{animationName:"mates-kf-fade-in"},"mates-fade-out":{animationName:"mates-kf-fade-out"},"mates-slide-in-up":{animationName:"mates-kf-slide-in-up"},"mates-slide-out-up":{animationName:"mates-kf-slide-out-up"},"mates-slide-in-down":{animationName:"mates-kf-slide-in-down"},"mates-slide-out-down":{animationName:"mates-kf-slide-out-down"},"mates-slide-in-left":{animationName:"mates-kf-slide-in-left"},"mates-slide-out-left":{animationName:"mates-kf-slide-out-left"},"mates-slide-in-right":{animationName:"mates-kf-slide-in-right"},"mates-slide-out-right":{animationName:"mates-kf-slide-out-right"},"mates-scale-in":{animationName:"mates-kf-scale-in"},"mates-scale-out":{animationName:"mates-kf-scale-out"},"mates-spring-in":{animationName:"mates-kf-spring-in","--mates-easing":"cubic-bezier(0.34, 1.56, 0.64, 1)"},"mates-flip-in-x":{animationName:"mates-kf-flip-in-x"},"mates-flip-in-y":{animationName:"mates-kf-flip-in-y"},"mates-blur-in":{animationName:"mates-kf-blur-in"},"mates-blur-out":{animationName:"mates-kf-blur-out"},"mates-shake":{animationName:"mates-kf-shake","--mates-duration":"500ms","--mates-easing":"ease-in-out"},"mates-pulse":{animationName:"mates-kf-pulse","--mates-duration":"600ms","--mates-easing":"ease-in-out"},"mates-bounce":{animationName:"mates-kf-bounce","--mates-duration":"700ms"},"mates-spin":{animationName:"mates-kf-spin","--mates-easing":"linear"}},{literal:!0}))}function dn(t=300,e="ease"){return{keyframes:[{opacity:0},{opacity:1}],options:{duration:t,easing:e,fill:"both"}}}function fn(t=300,e="ease"){return{keyframes:[{opacity:1},{opacity:0}],options:{duration:t,easing:e,fill:"both"}}}un();const pn={up:"translateY(-100%)",down:"translateY(100%)",left:"translateX(-100%)",right:"translateX(100%)"};function mn(t,e){switch(t){case"up":return`translateY(-${e})`;case"down":return`translateY(${e})`;case"left":return`translateX(-${e})`;case"right":return`translateX(${e})`}}function _n(t){if(null==t||"object"!=typeof t)return t;try{return Object.keys(t).forEach(e=>{"object"!=typeof t[e]||null===t[e]||Object.isFrozen(t[e])||_n(t[e])}),Object.freeze(t)}catch(t){console.error(t)}}function gn(t,e,n){const s=Kt();let i;qt();try{i=t()}finally{Xt();Jt(s).forEach(t=>{"function"==typeof t.__subscribe&&e(t,n)})}return i}function yn(t,e){if(te(t),"AsyncFunction"===e.constructor.name)throw new Error(`${t.toLowerCase()}() does not support async functions.`);if(Yt())throw new Error(`${t.toLowerCase()}() cannot be nested inside an effect() or memo().`)}function vn(t){const{name:e,fn:n,onRun:s,supportsCleanup:i}=t;yn(e,n);const r=new Set;let o,a=!1;const l=()=>{if(i&&o){try{o()}catch(t){console.error("Error in effect cleanup:",t)}o=void 0}},c=()=>{if(a)return;l();const t=new Set(r);r.clear();const e=()=>{a||ge.schedule(c)};let h;try{h=gn(n,t=>{r.add(t.__subscribe(e))},e)}finally{t.forEach(t=>t())}if(a)return r.forEach(t=>t()),void r.clear();i&&"function"==typeof h&&(o=h),s(h)},h=()=>{a||(a=!0,l(),r.forEach(t=>t()),r.clear())};return c(),Ae(n,h),h}let wn=0;function bn(t,e){if("function"==typeof t){let e;return vn({name:"Memo",fn:t,onRun:t=>{e?e.set(()=>t):e=bn(t,{skipRestrictedContextCheck:!0})}}),e}e?.skipRestrictedContextCheck||te("Atom");let n=t;const s=++wn,i=new le;function r(){return Ce(r,!1),Ht()&&Bt(r),n}return r.get=function(){return r()},r.set=function(t,e=!1){var o,a;n="function"==typeof t?t(n):t,r.skipDevToolsLog||(o=String(s),a=n,It.logAtomSet(o,a)),e||i.notify()},r.update=function(t,e=!1){var o;"object"==typeof n&&null!==n&&(t(n),r.skipDevToolsLog||(o=String(s),It.logAtomUpdate(o)),e||i.notify())},r.__subscribe=function(t){return i.subscribe(t)},r.toJSON=function(){return JSON.stringify(n)},Object.defineProperty(r,"name",{value:"atom",writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(r,"val",{get:()=>r(),set:t=>r.set(t),enumerable:!1,configurable:!0}),Object.defineProperty(r,"__version__",{get:()=>i.getVersion(),enumerable:!1}),Object.defineProperty(r,"__isAtom___",{value:!0,writable:!1,enumerable:!1}),Object.defineProperty(r,"__id__",{value:s,writable:!1,enumerable:!1}),r}function xn(t,e){e?.skipRestrictedContextCheck||te("iAtom");const n=bn(Cn(t),{skipRestrictedContextCheck:!0}),s=n.set;n.set=function(t,e=!1){const i="function"==typeof t?t(n.get()):t;s(Cn(i),e)};const i=n;return delete i.update,i.name="iAtom",i}function Sn(t,e={}){e.skipRestrictedContextCheck||te("superAtom"),ve();const n=e.freeze??!1,s=n?Cn(En(t)):t;let i=!1,r="default";const o=bn(n?Cn(t):t,{skipRestrictedContextCheck:!0}),a=o.set;o.set=function(t,e=!1){if(i)return;const s="function"==typeof t?t(o.get()):t;a(n?Cn(s):s,e)};const l=o.update;o.update=function(t,e=!1){if(!i){if(n)throw new Error("update() is not supported when freeze is enabled — use set() with a new value.");l(t,e)}};const c=o;return c.lock=function(t="default"){i=!0,r=t},c.unlock=function(t="default"){if(r!==t)throw new Error("Incorrect passcode. Cannot unlock atom.");i=!1},c.reset=function(){i||o.set(n?Cn(En(s)):s)},c.freeze=function(){_n(o.get())},c.name="superAtom",c}function Cn(t){return"object"==typeof t&&null!==t?_n(t):t}function En(t){try{return structuredClone(t)}catch{return t}}function An(t){const e=new Map,n=[],s=t=>JSON.stringify(t),i=t=>{e.delete(t);const s=n.indexOf(t);s>-1&&n.splice(s,1)};return{getCacheKey:s,removeCacheEntry:i,createCacheMethod:(r,o,a,l)=>async(...c)=>{const h=s(c),u=e.get(h);if(u){const e=Date.now();if(!(void 0!==t?.cacheDuration&&e-u.timestamp>t.cacheDuration)){const t=n.indexOf(h);return t>-1&&n.splice(t,1),n.push(h),r.set(u.result),o.set(null),a.set("success"),u.result}i(h)}const d=await l(this,c);e.set(h,{result:d,timestamp:Date.now()});const f=n.indexOf(h);if(f>-1&&n.splice(f,1),n.push(h),t?.cacheLimit&&n.length>t.cacheLimit){const t=n.shift();t&&e.delete(t)}return d},createClearCacheMethod:()=>(...t)=>{if(0===t.length)e.clear(),n.length=0;else{const e=s(t);i(e)}}}}function Mn(t){let e=null,n=null;const s=()=>{e&&(clearInterval(e),e=null,n=null)};return{createStartPollingMethod:i=>(...r)=>{t?.pollInterval?(s(),n=r,i(...r),e=setInterval(()=>{n&&i(...n)},t.pollInterval)):ne(new Error("pollInterval not specified in asyncAction options"))},createStopPollingMethod:()=>s,stopPolling:s}}function kn(t,e){e?.allowInRestrictedContext||te("Async Action");const n={...{cacheLimit:10,pollInterval:5e3},...e};let s=t;const i=new Set;let r=null,o=null,a=null,l=null;const c=An(n),h=Mn(n),u=bn(null),d=bn(null),f=bn(!1),p=bn("init"),m=t=>{i.forEach(e=>{if(void 0===e.filter||void 0===t||e.filter===t)try{e.fn()}catch(t){ne(t)}})},_=()=>{o?.isActive()&&(o.cancel(),o=null),r&&(r.abort(),r=null),f.set(!1),p.set("init")},g=async(t,e)=>{_(),f.set(!0),p.set("loading"),r=new AbortController;const n=r;try{let i;if(a){i=a((...e)=>s.call(t,...e),...e)}else i=s.call(t,...e);i?.__isZeroPromise__&&(o=i);let c=await i;if(n.signal.aborted||r!==n)throw new Error("Operation was cancelled");return l&&(c=l(c)),u.set(c),d.set(null),p.set("success"),m(!0),c}catch(t){if(n.signal.aborted||r!==n)throw t;const e=t instanceof Error?t:new Error(String(t));throw u.set(null),d.set(e),p.set("error"),m(!1),e}finally{r===n&&(r=null),f.set(!1),o&&!o.isActive()&&(o=null)}},y=async(...t)=>{const e=this;if(pe()){const n=de(!1);if(n?._ssrPromiseQueue){const s=g(e,t).catch(()=>{});return n._ssrPromiseQueue.push(s),s}}return g(e,t)},v=c.createCacheMethod(u,d,p,g),w=c.createClearCacheMethod(),b=h.createStartPollingMethod(y),x=h.createStopPollingMethod(),S=Object.assign(y,{data:u,error:d,isLoading:f,status:p,val:()=>s,set:t=>{s=t},params:{page:1},cancel:_,subscribe:(t,e)=>{te("subscribe");const n={fn:t,filter:e};i.add(n);const s=()=>i.delete(n);return Ae(t,s),s},cache:v,clearCache:w,startPolling:b,stopPolling:x,interceptBefore:t=>{a=t},interceptAfter:t=>{l=t},__isAsyncAction___:!0,__isAction___:!1});return Object.defineProperty(S,"abortController",{get:()=>r,enumerable:!0,configurable:!0}),Ae(S,()=>{i.clear(),h.stopPolling(),_()}),S}const $n=(t,e,n)=>{const s="timeout"===n?setTimeout(()=>t(),e):setInterval(()=>t(),e);return Ae(s,"timeout"===n?()=>clearTimeout(s):()=>clearInterval(s)),s};class Tn{constructor(){this.timeoutId=null,this.pendingArgs=null,this.pendingContext=null}clearPending(){this.pendingArgs=null,this.pendingContext=null}setPending(t,e){this.pendingArgs=t,this.pendingContext=e}clearTimer(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}setTimer(t,e){this.timeoutId=((t,e)=>$n(t,e,"timeout"))(t,e)}executePending(t){return this.pendingArgs&&(this.lastResult=t.apply(this.pendingContext,this.pendingArgs),this.clearPending()),this.lastResult}}function Rn(t,e){return()=>{t.clearTimer(),t.clearPending(),e?.()}}function On(t,e){return()=>{if(t.pendingArgs&&t.timeoutId){t.clearTimer();return t.executePending(e)}return t.lastResult}}function Pn(t,e){const n=new Tn,s=function(...s){return n.setPending(s,this),n.clearTimer(),n.setTimer(()=>{n.lastResult=n.executePending(t),n.timeoutId=null},e),n.lastResult};return s.cancel=Rn(n),s.flush=On(n,t),s}function zn(t,e){const n=new Tn;let s=0;const i=function(...i){const r=Date.now(),o=r-s;return o>=e?(s=r,n.lastResult=t.apply(this,i),n.clearPending(),n.clearTimer()):(n.setPending(i,this),n.timeoutId||n.setTimer(()=>{s=Date.now(),n.lastResult=n.executePending(t),n.timeoutId=null},e-o)),n.lastResult};return i.cancel=Rn(n,()=>{s=0}),i.flush=On(n,t),i}function In(t,e){return"function"!=typeof t.animate?Promise.resolve():("function"==typeof t.getAnimations&&t.getAnimations().forEach(t=>t.cancel()),new Promise(n=>{const s=t.animate(e.keyframes,{duration:300,easing:"ease",fill:"both",...e.options});s.onfinish=()=>n(),s.oncancel=()=>n()}))}async function Dn(t){const{el:e,exit:n,enter:s,swap:i,getEl:r,isStale:o}=t;if(!e)return void i();if(await In(e,n),o?.())return;if(i(),await("function"!=typeof requestAnimationFrame?Promise.resolve():new Promise(t=>requestAnimationFrame(()=>requestAnimationFrame(()=>t())))),o?.())return;const a=r?.()??e;a&&await In(a,s)}function Ln(t){return t.__isEffect__=!0,vn({name:"Effect",fn:t,onRun:()=>{},supportsCleanup:!0})}const Nn=new WeakMap,jn=B(class extends ut{render(t){return C}update(t,[e]){const n=e!==this.Y;return n&&void 0!==this.Y&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),C}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.Y){const e=this.ht??globalThis;let n=Nn.get(e);void 0===n&&(n=new WeakMap,Nn.set(e,n)),void 0!==n.get(this.Y)&&this.Y.call(this.ht,void 0),n.set(this.Y,t),void 0!==t&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return"function"==typeof this.Y?Nn.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function Un(){const t=new ce;let e;const n={get value(){return e},__subscribe:e=>t.subscribe(e),__isMatesRef__:!0,__set:n=>{e!==n&&(e=n,t.trigger(n))}};return n}function Fn(t){if(t&&t.__isMatesRef__){const e=t;return jn(t=>{e.__set(t)})}return jn(t)}const Vn=(t,e={})=>b`<x-view .view=${t} .props=${e}></x-view>`,Wn=Vn,Hn=Vn,Yn=(t,e,n={})=>U(Vn(t,n),e),Bn=Yn,qn=bn(!1),Xn=Sn("undefined"!=typeof window?window.location.pathname:"/");Ln(()=>{qn()?Xn.lock():Xn.unlock()}),"undefined"!=typeof window&&(window.addEventListener("popstate",()=>{const t=window.location.pathname;t!==Xn.get()&&Xn.set(t)}),window.addEventListener("hashchange",()=>{const t=window.location.pathname;t!==Xn.get()&&Xn.set(t)}),window.addEventListener("navigate",()=>{const t=window.location.pathname;t!==Xn.get()&&Xn.set(t)}));const Gn=t=>{const e=Xn.get();if(e===t)return!0;const n=t.split("/").filter(Boolean),s=e.split("/").filter(Boolean);if(n.length!==s.length)return!1;for(let t=0;t<n.length;t++){const e=n[t],i=s[t];if(e.startsWith(":")){if(!i)return!1}else if(e!==i)return!1}return!0},Zn=t=>{const e=Un(),n=()=>t().options,s=t().options.notFound?{path:"*",component:t().options.notFound}:null,i=()=>{const{routes:e}=t(),n=e.find(t=>Gn(t.path));return n??s},r=i(),o=bn(r),a=bn(r);return Ln(()=>{const t=a();if(t===o.get())return;const s=e.value;if(!s)return void o.set(t);const i=n(),r=o.get();Dn({el:s,exit:r?.exit??i.exit??fn(200),enter:t?.enter??i.enter??dn(250),swap:()=>o.set(t),getEl:()=>e.value,isStale:()=>a.get()!==t})}),Ln(()=>{Xn(),function(t){a.get()!==t&&a.set(t)}(i())}),be(()=>{const t=e.value;if(!t)return;const s=o.get(),i=n();In(t,s?.enter??i.enter??dn(250))}),()=>{const t=o();return b`
|
|
99
|
+
`;i.__isErrorView__=!0,i.skipDevToolsRender=!0,this.view=i,this.name=e,this._errorState=t}}customElements.get("x-view")||customElements.define("x-view",Re);class Oe extends HTMLElement{constructor(){super(...arguments),this._onRequestContext=t=>{const e=t,n=e.detail?.context.id;n&&null!=this.id&&n===this.id&&(e.stopPropagation(),e.detail.resolve(this._value))}}connectedCallback(){this.addEventListener("request-context",this._onRequestContext)}set context(t){this.id=t.id}disconnectedCallback(){this.removeEventListener("request-context",this._onRequestContext)}set value(t){this._value=t}get value(){return this._value}}function Pe(t){let e=-1===t.indexOf("\0")?t:t.replace(/\0/g,"");const n=function(t){const e=t.indexOf("{"),n=t.indexOf("}");return-1===e&&-1===n?-1:-1===e?n:-1===n?e:Math.min(e,n)}(e);return-1!==n&&(e=e.slice(0,n)),/url\s*\(/i.test(e)&&(e=e.replace(/\burl\s*\(\s*(['"]?)\s*(?:javascript:|vbscript:|data:text\/html[,;])/gi,"url($1")),e}function ze(t){return t.length>0&&/^[a-zA-Z-]+$/.test(t)}customElements.get("x-provider")||customElements.define("x-provider",Oe);let Ie=0;function De(){return`_m${(Ie++).toString(36)}`}const Le=Object.create(null),Ne={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"};function je(t){const e=Le[t];if(void 0!==e)return e;const n=t.startsWith("--")?t:t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);return Le[t]=n,n}function Ue(t,e,n){if(!n)return`.${t} {\n${e}}`;if(n.startsWith("&")){return`.${t}${n.slice(1)} {\n${e}}`}return`${n} {\n .${t} {\n${e.replace(/^ {2}/gm," ")} }\n}`}function Fe(t){return t.startsWith("&")||t.startsWith("@media")?t:Object.prototype.hasOwnProperty.call(Ne,t)?`@media (min-width: ${Ne[t]})`:null}function Ve(t,e,n){const s=Object.create(null);for(const i in t){const r=t[i];let o="",a=null;for(const t in r){const e=r[t];if(null!=e){if("object"==typeof e&&!Array.isArray(e)){const n=Fe(t);if(null===n)throw new Error(`[css-in-js] Unknown nested key "${t}" in block "${i}". Use "&:pseudo", "@media (...)", or a configured breakpoint key.`);let s="";const r=e;for(const t in r){const e=r[t];null!=e&&(ze(t)?s+=` ${je(t)}: ${Pe(String(e))};\n`:console.warn(`[css-in-js] invalid property name skipped: "${t}"`))}s.length>0&&(null===a&&(a=[]),a.push([s,n]));continue}ze(t)?o+=` ${je(t)}: ${Pe(String(e))};\n`:console.warn(`[css-in-js] invalid property name skipped: "${t}"`)}}if(0===o.length&&null===a){s[i]="";continue}const l=n?.literal?i:`${i}${De()}`;if(o.length>0&&e.push(Ue(l,o,"")),null!==a)for(let t=0;t<a.length;t++)e.push(Ue(l,a[t][0],a[t][1]));s[i]=l}return s}function We(t){return Object.freeze(t)}var He,Ye,Be,qe,Xe,Ge,Ze,Ke;function Je(t){if(Qt.templateInProgress)throw new Error(`[css-in-js] ${t}() must be called at module level, not inside a template function.`);if(Qt.viewOuterInProgress)throw new Error(`[css-in-js] ${t}() must be called at module level, not inside a component outer function. Move it outside the component function.`);if(Qt.setupInProgress)throw new Error(`[css-in-js] ${t}() must be called at module level, not inside a setup function.`)}let Qe=0;function tn(t){return`${t}_kf${(Qe++).toString(36)}`}function en(t,e){let n="";for(const t in e){const s=e[t];let i="";for(const t in s){const e=s[t];if(null==e)continue;const n=t.startsWith("--")?t:t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);i+=` ${n}: ${String(e)};\n`}i&&(n+=` ${t} {\n${i} }\n`)}return`@keyframes ${t} {\n${n}}`}class nn{constructor(){He.add(this),Ye.set(this,""),Be.set(this,0),qe.set(this,null),Xe.set(this,[])}keyframes(t,e){const n=tn(t);return this.appendRules(en(n,e)),n}appendRules(t){""!==t&&(se(this,Xe,"f").push(t),se(this,Be,"f")>0&&se(this,He,"m",Ge).call(this))}mount(){var t;ie(this,Be,(t=se(this,Be,"f"),++t),"f"),1===se(this,Be,"f")&&(se(this,He,"m",Ge).call(this),se(this,qe,"f")||se(this,He,"m",Ze).call(this))}unmount(){var t;se(this,Be,"f")<=0||(ie(this,Be,(t=se(this,Be,"f"),--t),"f"),0===se(this,Be,"f")&&se(this,He,"m",Ke).call(this))}get refCount(){return se(this,Be,"f")}get cssText(){return se(this,Ye,"f")}get isMounted(){return se(this,Be,"f")>0}get sheet(){return se(this,qe,"f")}}Ye=new WeakMap,Be=new WeakMap,qe=new WeakMap,Xe=new WeakMap,He=new WeakSet,Ge=function(){if(0===se(this,Xe,"f").length)return;const t=se(this,Xe,"f").join("\n");ie(this,Xe,[],"f"),ie(this,Ye,se(this,Ye,"f")+(se(this,Ye,"f")?"\n":"")+t,"f"),se(this,He,"m",Ze).call(this)},Ze=function(){se(this,qe,"f")||(ie(this,qe,new CSSStyleSheet,"f"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,se(this,qe,"f")]),se(this,qe,"f").replaceSync(se(this,Ye,"f"))},Ke=function(){se(this,qe,"f")&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(t=>t!==se(this,qe,"f")),ie(this,qe,null,"f")),se(this,Ye,"f")&&(se(this,Xe,"f").unshift(se(this,Ye,"f")),ie(this,Ye,"","f"))};let sn=null,rn=!1;function on(){return sn||(sn=new nn),sn}function an(){sn||(sn=new nn),rn||(rn=!0,queueMicrotask(()=>{rn=!1,sn.mount()}))}function ln(t,e){Je("globalCSS"),an();const n=[],s=Ve(t,n,e);return n.length>0&&sn.appendRules(n.join("\n")),We(s)}function cn(t){Je("globalRawCSS"),an(),sn.appendRules(t)}let hn=!1;function un(){hn||(hn=!0,cn('\n[class*="mates-"] {\n --mates-duration : 300ms;\n --mates-easing : ease;\n --mates-distance : 24px;\n animation-duration : var(--mates-duration);\n animation-timing-function : var(--mates-easing);\n animation-fill-mode : both;\n}\n'),cn("\n@keyframes mates-kf-fade-in { from { opacity: 0 } to { opacity: 1 } }\n@keyframes mates-kf-fade-out { from { opacity: 1 } to { opacity: 0 } }\n\n@keyframes mates-kf-slide-in-up {\n from { opacity: 0; transform: translateY(var(--mates-distance)) }\n to { opacity: 1; transform: translateY(0) }\n}\n@keyframes mates-kf-slide-out-up {\n from { opacity: 1; transform: translateY(0) }\n to { opacity: 0; transform: translateY(calc(-1 * var(--mates-distance))) }\n}\n@keyframes mates-kf-slide-in-down {\n from { opacity: 0; transform: translateY(calc(-1 * var(--mates-distance))) }\n to { opacity: 1; transform: translateY(0) }\n}\n@keyframes mates-kf-slide-out-down {\n from { opacity: 1; transform: translateY(0) }\n to { opacity: 0; transform: translateY(var(--mates-distance)) }\n}\n@keyframes mates-kf-slide-in-left {\n from { opacity: 0; transform: translateX(var(--mates-distance)) }\n to { opacity: 1; transform: translateX(0) }\n}\n@keyframes mates-kf-slide-out-left {\n from { opacity: 1; transform: translateX(0) }\n to { opacity: 0; transform: translateX(calc(-1 * var(--mates-distance))) }\n}\n@keyframes mates-kf-slide-in-right {\n from { opacity: 0; transform: translateX(calc(-1 * var(--mates-distance))) }\n to { opacity: 1; transform: translateX(0) }\n}\n@keyframes mates-kf-slide-out-right {\n from { opacity: 1; transform: translateX(0) }\n to { opacity: 0; transform: translateX(var(--mates-distance)) }\n}\n\n@keyframes mates-kf-scale-in {\n from { opacity: 0; transform: scale(0.92) }\n to { opacity: 1; transform: scale(1) }\n}\n@keyframes mates-kf-scale-out {\n from { opacity: 1; transform: scale(1) }\n to { opacity: 0; transform: scale(0.92) }\n}\n\n@keyframes mates-kf-spring-in {\n from { opacity: 0; transform: scale(0.92) }\n to { opacity: 1; transform: scale(1) }\n}\n\n@keyframes mates-kf-flip-in-x {\n from { opacity: 0; transform: rotateX(90deg) }\n to { opacity: 1; transform: rotateX(0deg) }\n}\n@keyframes mates-kf-flip-in-y {\n from { opacity: 0; transform: rotateY(90deg) }\n to { opacity: 1; transform: rotateY(0deg) }\n}\n\n@keyframes mates-kf-blur-in {\n from { opacity: 0; filter: blur(10px) }\n to { opacity: 1; filter: blur(0) }\n}\n@keyframes mates-kf-blur-out {\n from { opacity: 1; filter: blur(0) }\n to { opacity: 0; filter: blur(10px) }\n}\n\n@keyframes mates-kf-shake {\n 0%, 100% { transform: translateX(0) }\n 15% { transform: translateX(calc(-1 * var(--mates-distance))) }\n 30% { transform: translateX(calc( 1 * var(--mates-distance))) }\n 45% { transform: translateX(calc(-0.6 * var(--mates-distance))) }\n 60% { transform: translateX(calc( 0.6 * var(--mates-distance))) }\n 75% { transform: translateX(calc(-0.3 * var(--mates-distance))) }\n 90% { transform: translateX(calc( 0.3 * var(--mates-distance))) }\n}\n\n@keyframes mates-kf-pulse {\n 0%, 100% { transform: scale(1) }\n 50% { transform: scale(1.08) }\n}\n\n@keyframes mates-kf-bounce {\n 0% { transform: translateY(0) }\n 20% { transform: translateY(calc(-0.40 * var(--mates-distance))) }\n 40% { transform: translateY(0) }\n 60% { transform: translateY(calc(-0.20 * var(--mates-distance))) }\n 80% { transform: translateY(0) }\n 90% { transform: translateY(calc(-0.08 * var(--mates-distance))) }\n 100% { transform: translateY(0) }\n}\n\n@keyframes mates-kf-spin {\n from { transform: rotate(0deg) }\n to { transform: rotate(360deg) }\n}\n"),ln({"mates-fade-in":{animationName:"mates-kf-fade-in"},"mates-fade-out":{animationName:"mates-kf-fade-out"},"mates-slide-in-up":{animationName:"mates-kf-slide-in-up"},"mates-slide-out-up":{animationName:"mates-kf-slide-out-up"},"mates-slide-in-down":{animationName:"mates-kf-slide-in-down"},"mates-slide-out-down":{animationName:"mates-kf-slide-out-down"},"mates-slide-in-left":{animationName:"mates-kf-slide-in-left"},"mates-slide-out-left":{animationName:"mates-kf-slide-out-left"},"mates-slide-in-right":{animationName:"mates-kf-slide-in-right"},"mates-slide-out-right":{animationName:"mates-kf-slide-out-right"},"mates-scale-in":{animationName:"mates-kf-scale-in"},"mates-scale-out":{animationName:"mates-kf-scale-out"},"mates-spring-in":{animationName:"mates-kf-spring-in","--mates-easing":"cubic-bezier(0.34, 1.56, 0.64, 1)"},"mates-flip-in-x":{animationName:"mates-kf-flip-in-x"},"mates-flip-in-y":{animationName:"mates-kf-flip-in-y"},"mates-blur-in":{animationName:"mates-kf-blur-in"},"mates-blur-out":{animationName:"mates-kf-blur-out"},"mates-shake":{animationName:"mates-kf-shake","--mates-duration":"500ms","--mates-easing":"ease-in-out"},"mates-pulse":{animationName:"mates-kf-pulse","--mates-duration":"600ms","--mates-easing":"ease-in-out"},"mates-bounce":{animationName:"mates-kf-bounce","--mates-duration":"700ms"},"mates-spin":{animationName:"mates-kf-spin","--mates-easing":"linear"}},{literal:!0}))}function dn(t=300,e="ease"){return{keyframes:[{opacity:0},{opacity:1}],options:{duration:t,easing:e,fill:"both"}}}function fn(t=300,e="ease"){return{keyframes:[{opacity:1},{opacity:0}],options:{duration:t,easing:e,fill:"both"}}}un();const pn={up:"translateY(-100%)",down:"translateY(100%)",left:"translateX(-100%)",right:"translateX(100%)"};function mn(t,e){switch(t){case"up":return`translateY(-${e})`;case"down":return`translateY(${e})`;case"left":return`translateX(-${e})`;case"right":return`translateX(${e})`}}function _n(t){if(null==t||"object"!=typeof t)return t;try{return Object.keys(t).forEach(e=>{"object"!=typeof t[e]||null===t[e]||Object.isFrozen(t[e])||_n(t[e])}),Object.freeze(t)}catch(t){console.error(t)}}function gn(t,e,n){const s=Kt();let i;qt();try{i=t()}finally{Xt();Jt(s).forEach(t=>{"function"==typeof t.__subscribe&&e(t,n)})}return i}function yn(t,e){if(te(t),"AsyncFunction"===e.constructor.name)throw new Error(`${t.toLowerCase()}() does not support async functions.`);if(Yt())throw new Error(`${t.toLowerCase()}() cannot be nested inside an effect() or memo().`)}function vn(t){const{name:e,fn:n,onRun:s,supportsCleanup:i}=t;yn(e,n);const r=new Set;let o,a=!1;const l=()=>{if(i&&o){try{o()}catch(t){console.error("Error in effect cleanup:",t)}o=void 0}},c=()=>{if(a)return;l();const t=new Set(r);r.clear();const e=()=>{a||ge.schedule(c)};let h;try{h=gn(n,t=>{r.add(t.__subscribe(e))},e)}finally{t.forEach(t=>t())}if(a)return r.forEach(t=>t()),void r.clear();i&&"function"==typeof h&&(o=h),s(h)},h=()=>{a||(a=!0,l(),r.forEach(t=>t()),r.clear())};return c(),Ae(n,h),h}let wn=0;function bn(t,e){if("function"==typeof t){let e;return vn({name:"Memo",fn:t,onRun:t=>{e?(e.unlock("initial"),e.set(()=>t),e.lock("initial")):(e=Sn(t,{skipRestrictedContextCheck:!0}),e.lock("initial"))}}),e}e?.skipRestrictedContextCheck||te("Atom");let n=t;const s=++wn,i=new le;function r(){return Ce(r,!1),Ht()&&Bt(r),n}return r.get=function(){return r()},r.set=function(t,e=!1){var o,a;n="function"==typeof t?t(n):t,r.skipDevToolsLog||(o=String(s),a=n,It.logAtomSet(o,a)),e||i.notify()},r.update=function(t,e=!1){var o;"object"==typeof n&&null!==n&&(t(n),r.skipDevToolsLog||(o=String(s),It.logAtomUpdate(o)),e||i.notify())},r.__subscribe=function(t){return i.subscribe(t)},r.toJSON=function(){return JSON.stringify(n)},Object.defineProperty(r,"name",{value:"atom",writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(r,"val",{get:()=>r(),set:t=>r.set(t),enumerable:!1,configurable:!0}),Object.defineProperty(r,"__version__",{get:()=>i.getVersion(),enumerable:!1}),Object.defineProperty(r,"__isAtom___",{value:!0,writable:!1,enumerable:!1}),Object.defineProperty(r,"__id__",{value:s,writable:!1,enumerable:!1}),r}function xn(t,e){e?.skipRestrictedContextCheck||te("iAtom");const n=bn(Cn(t),{skipRestrictedContextCheck:!0}),s=n.set;n.set=function(t,e=!1){const i="function"==typeof t?t(n.get()):t;s(Cn(i),e)};const i=n;return delete i.update,i.name="iAtom",i}function Sn(t,e={}){e.skipRestrictedContextCheck||te("superAtom"),ve();const n=e.freeze??!1,s=n?Cn(En(t)):t;let i=!1,r="default";const o=bn(n?Cn(t):t,{skipRestrictedContextCheck:!0}),a=o.set;o.set=function(t,e=!1){if(i)return void ne("Cannot mutate a locked atom.","superAtom");const s="function"==typeof t?t(o.get()):t;a(n?Cn(s):s,e)};const l=o.update;o.update=function(t,e=!1){if(i)ne("Cannot mutate a locked atom.","superAtom");else{if(n)throw new Error("update() is not supported when freeze is enabled — use set() with a new value.");l(t,e)}};const c=o;return c.lock=function(t="default"){i=!0,r=t},c.unlock=function(t="default"){if(r!==t)throw new Error("Incorrect passcode. Cannot unlock atom.");i=!1},c.reset=function(){i||o.set(n?Cn(En(s)):s)},c.freeze=function(){_n(o.get())},c.name="superAtom",c}function Cn(t){return"object"==typeof t&&null!==t?_n(t):t}function En(t){try{return structuredClone(t)}catch{return t}}function An(t){const e=new Map,n=[],s=t=>JSON.stringify(t),i=t=>{e.delete(t);const s=n.indexOf(t);s>-1&&n.splice(s,1)};return{getCacheKey:s,removeCacheEntry:i,createCacheMethod:(r,o,a,l)=>async(...c)=>{const h=s(c),u=e.get(h);if(u){const e=Date.now();if(!(void 0!==t?.cacheDuration&&e-u.timestamp>t.cacheDuration)){const t=n.indexOf(h);return t>-1&&n.splice(t,1),n.push(h),r.set(u.result),o.set(null),a.set("success"),u.result}i(h)}const d=await l(this,c);e.set(h,{result:d,timestamp:Date.now()});const f=n.indexOf(h);if(f>-1&&n.splice(f,1),n.push(h),t?.cacheLimit&&n.length>t.cacheLimit){const t=n.shift();t&&e.delete(t)}return d},createClearCacheMethod:()=>(...t)=>{if(0===t.length)e.clear(),n.length=0;else{const e=s(t);i(e)}}}}function Mn(t){let e=null,n=null;const s=()=>{e&&(clearInterval(e),e=null,n=null)};return{createStartPollingMethod:i=>(...r)=>{t?.pollInterval?(s(),n=r,i(...r),e=setInterval(()=>{n&&i(...n)},t.pollInterval)):ne(new Error("pollInterval not specified in asyncAction options"))},createStopPollingMethod:()=>s,stopPolling:s}}function kn(t,e){e?.allowInRestrictedContext||te("Async Action");const n={...{cacheLimit:10,pollInterval:5e3},...e};let s=t;const i=new Set;let r=null,o=null,a=null,l=null;const c=An(n),h=Mn(n),u=bn(null),d=bn(null),f=bn(!1),p=bn("init"),m=t=>{i.forEach(e=>{if(void 0===e.filter||void 0===t||e.filter===t)try{e.fn()}catch(t){ne(t)}})},_=()=>{o?.isActive()&&(o.cancel(),o=null),r&&(r.abort(),r=null),f.set(!1),p.set("init")},g=async(t,e)=>{_(),f.set(!0),p.set("loading"),r=new AbortController;const n=r;try{let i;if(a){i=a((...e)=>s.call(t,...e),...e)}else i=s.call(t,...e);i?.__isZeroPromise__&&(o=i);let c=await i;if(n.signal.aborted||r!==n)throw new Error("Operation was cancelled");return l&&(c=l(c)),u.set(c),d.set(null),p.set("success"),m(!0),c}catch(t){if(n.signal.aborted||r!==n)throw t;const e=t instanceof Error?t:new Error(String(t));throw u.set(null),d.set(e),p.set("error"),m(!1),e}finally{r===n&&(r=null),f.set(!1),o&&!o.isActive()&&(o=null)}},y=async(...t)=>{const e=this;if(pe()){const n=de(!1);if(n?._ssrPromiseQueue){const s=g(e,t).catch(()=>{});return n._ssrPromiseQueue.push(s),s}}return g(e,t)},v=c.createCacheMethod(u,d,p,g),w=c.createClearCacheMethod(),b=h.createStartPollingMethod(y),x=h.createStopPollingMethod(),S=Object.assign(y,{data:u,error:d,isLoading:f,status:p,val:()=>s,set:t=>{s=t},params:{page:1},cancel:_,subscribe:(t,e)=>{te("subscribe");const n={fn:t,filter:e};i.add(n);const s=()=>i.delete(n);return Ae(t,s),s},cache:v,clearCache:w,startPolling:b,stopPolling:x,interceptBefore:t=>{a=t},interceptAfter:t=>{l=t},__isAsyncAction___:!0,__isAction___:!1});return Object.defineProperty(S,"abortController",{get:()=>r,enumerable:!0,configurable:!0}),Ae(S,()=>{i.clear(),h.stopPolling(),_()}),S}const $n=(t,e,n)=>{const s="timeout"===n?setTimeout(()=>t(),e):setInterval(()=>t(),e);return Ae(s,"timeout"===n?()=>clearTimeout(s):()=>clearInterval(s)),s};class Tn{constructor(){this.timeoutId=null,this.pendingArgs=null,this.pendingContext=null}clearPending(){this.pendingArgs=null,this.pendingContext=null}setPending(t,e){this.pendingArgs=t,this.pendingContext=e}clearTimer(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}setTimer(t,e){this.timeoutId=((t,e)=>$n(t,e,"timeout"))(t,e)}executePending(t){return this.pendingArgs&&(this.lastResult=t.apply(this.pendingContext,this.pendingArgs),this.clearPending()),this.lastResult}}function Rn(t,e){return()=>{t.clearTimer(),t.clearPending(),e?.()}}function On(t,e){return()=>{if(t.pendingArgs&&t.timeoutId){t.clearTimer();return t.executePending(e)}return t.lastResult}}function Pn(t,e){const n=new Tn,s=function(...s){return n.setPending(s,this),n.clearTimer(),n.setTimer(()=>{n.lastResult=n.executePending(t),n.timeoutId=null},e),n.lastResult};return s.cancel=Rn(n),s.flush=On(n,t),s}function zn(t,e){const n=new Tn;let s=0;const i=function(...i){const r=Date.now(),o=r-s;return o>=e?(s=r,n.lastResult=t.apply(this,i),n.clearPending(),n.clearTimer()):(n.setPending(i,this),n.timeoutId||n.setTimer(()=>{s=Date.now(),n.lastResult=n.executePending(t),n.timeoutId=null},e-o)),n.lastResult};return i.cancel=Rn(n,()=>{s=0}),i.flush=On(n,t),i}function In(t,e){return"function"!=typeof t.animate?Promise.resolve():("function"==typeof t.getAnimations&&t.getAnimations().forEach(t=>t.cancel()),new Promise(n=>{const s=t.animate(e.keyframes,{duration:300,easing:"ease",fill:"both",...e.options});s.onfinish=()=>n(),s.oncancel=()=>n()}))}async function Dn(t){const{el:e,exit:n,enter:s,swap:i,getEl:r,isStale:o}=t;if(!e)return void i();if(await In(e,n),o?.())return;if(i(),await("function"!=typeof requestAnimationFrame?Promise.resolve():new Promise(t=>requestAnimationFrame(()=>requestAnimationFrame(()=>t())))),o?.())return;const a=r?.()??e;a&&await In(a,s)}function Ln(t){return t.__isEffect__=!0,vn({name:"Effect",fn:t,onRun:()=>{},supportsCleanup:!0})}const Nn=new WeakMap,jn=B(class extends ut{render(t){return C}update(t,[e]){const n=e!==this.Y;return n&&void 0!==this.Y&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=e,this.ht=t.options?.host,this.rt(this.ct=t.element)),C}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.Y){const e=this.ht??globalThis;let n=Nn.get(e);void 0===n&&(n=new WeakMap,Nn.set(e,n)),void 0!==n.get(this.Y)&&this.Y.call(this.ht,void 0),n.set(this.Y,t),void 0!==t&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){return"function"==typeof this.Y?Nn.get(this.ht??globalThis)?.get(this.Y):this.Y?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function Un(){const t=new ce;let e;const n={get value(){return e},__subscribe:e=>t.subscribe(e),__isMatesRef__:!0,__set:n=>{e!==n&&(e=n,t.trigger(n))}};return n}function Fn(t){if(t&&t.__isMatesRef__){const e=t;return jn(t=>{e.__set(t)})}return jn(t)}const Vn=(t,e={})=>b`<x-view .view=${t} .props=${e}></x-view>`,Wn=Vn,Hn=Vn,Yn=(t,e,n={})=>U(Vn(t,n),e),Bn=Yn,qn=bn(!1),Xn=Sn("undefined"!=typeof window?window.location.pathname:"/");Ln(()=>{qn()?Xn.lock():Xn.unlock()}),"undefined"!=typeof window&&(window.addEventListener("popstate",()=>{const t=window.location.pathname;t!==Xn.get()&&Xn.set(t)}),window.addEventListener("hashchange",()=>{const t=window.location.pathname;t!==Xn.get()&&Xn.set(t)}),window.addEventListener("navigate",()=>{const t=window.location.pathname;t!==Xn.get()&&Xn.set(t)}));const Gn=t=>{const e=Xn.get();if(e===t)return!0;const n=t.split("/").filter(Boolean),s=e.split("/").filter(Boolean);if(n.length!==s.length)return!1;for(let t=0;t<n.length;t++){const e=n[t],i=s[t];if(e.startsWith(":")){if(!i)return!1}else if(e!==i)return!1}return!0},Zn=t=>{const e=Un(),n=()=>t().options,s=t().options.notFound?{path:"*",component:t().options.notFound}:null,i=()=>{const{routes:e}=t(),n=e.find(t=>Gn(t.path));return n??s},r=i(),o=bn(r),a=bn(r);return Ln(()=>{const t=a();if(t===o.get())return;const s=e.value;if(!s)return void o.set(t);const i=n(),r=o.get();Dn({el:s,exit:r?.exit??i.exit??fn(200),enter:t?.enter??i.enter??dn(250),swap:()=>o.set(t),getEl:()=>e.value,isStale:()=>a.get()!==t})}),Ln(()=>{Xn(),function(t){a.get()!==t&&a.set(t)}(i())}),be(()=>{const t=e.value;if(!t)return;const s=o.get(),i=n();In(t,s?.enter??i.enter??dn(250))}),()=>{const t=o();return b`
|
|
100
100
|
<div style="position:relative;overflow:hidden">
|
|
101
101
|
<div ${Fn(e)}>
|
|
102
102
|
${t?Vn(t.component,t.props??{}):C}
|
|
@@ -188,17 +188,17 @@ class $i{constructor(t){this._element=null;const e=t??window;this._node=e,t&&(th
|
|
|
188
188
|
* can change height dynamically.
|
|
189
189
|
* - `virtualGrid` and `virtualMasonry` still accept explicit sizes since
|
|
190
190
|
* the grid/masonry layouts need them for position pre-computation.
|
|
191
|
-
*/function ji(t,e,n){return"function"==typeof e?{keyFn:t,template:e,opts:n}:{keyFn:void 0,template:t,opts:e}}const Ui=t=>"function"==typeof t&&!0===t.__isAtom___&&"function"==typeof t.set&&"function"==typeof t.__subscribe,Fi=t=>"function"==typeof t,Vi=t=>"AsyncFunction"===t.constructor.name,Wi=(t,e,n,s)=>{if(Ui(t)){const i=t,r=bn(i(),s),o=n(r.set,e),a=n(r.update,e);return r.set=o,r.update=a,i.__subscribe(()=>{ge.schedule(()=>r.set(i()))}),Ae(r,()=>{o.cancel(),a.cancel()}),r}const i=bn(t,s),r=n(i.set,e),o=n(i.update,e);return i.set=r,i.update=o,Ae(i,()=>{r.cancel(),o.cancel()}),i},Hi="mates";function Yi(t,e){try{null===e?t.removeItem(Hi):t.setItem(Hi,JSON.stringify(e))}catch{}}function Bi(t,e){const n=bn((()=>{try{return function(t){try{const e=t.getItem(Hi);if(e)return JSON.parse(e)}catch{}return null}(t())}catch{return null}})()),s=n.set;n.set=function(e,i=!1){s(e,i);try{Yi(t(),n.get())}catch{}};const i=n.update;return n.update=function(e,s=!1){if(null!==n.get()){i(e,s);try{Yi(t(),n.get())}catch{}}},e(t=>{if(t.key===Hi)if(t.newValue)try{s(JSON.parse(t.newValue))}catch{}else s(null)}),Object.defineProperty(n,"name",{value:"storageAtom",writable:!0,configurable:!0,enumerable:!1}),n}function qi(t){"undefined"!=typeof window&&window.addEventListener("storage",t)}const Xi=Bi(()=>localStorage,t=>qi(e=>{e.storageArea===localStorage&&t(e)})),Gi=Bi(()=>sessionStorage,t=>qi(e=>{e.storageArea===sessionStorage&&t(e)})),Zi=bn("undefined"!=typeof document?document.title:"");Ln(()=>{var t;t=Zi.get(),"undefined"!=typeof document&&(document.title=t)});function Ki(t,e=2){let n=parseFloat(String(t).trim());Number.isFinite(n)||(n=0);const s=10**e;return Math.round(n*s)/s}function Ji(t,e,n){const s=bn(t,n),i=bn([],n);function r(){const t=s.get(),n=e.map(e=>e(t)).filter(t=>null!=t&&""!==t);return i.set(n),n}const o=s.set;s.set=function(t,e=!1){o(t,e),r()};const a=s.update;s.update=function(t,e=!1){a(t,e),r()};const l=s;return Object.defineProperty(l,"__isFormAtom__",{value:!0,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(l,"errors",{get:()=>i.get(),enumerable:!1,configurable:!0}),Object.defineProperty(l,"isValid",{get:()=>0===i.get().length,enumerable:!1,configurable:!0}),l.validate=r,l.toFloat=()=>Ki(s.get()),l.toFloatString=()=>Ki(s.get()).toString(),l.toValidNumber=()=>function(t){const e=Number(t);return Number.isFinite(e)?e:0}(s.get()),Object.defineProperty(l,"name",{value:"formAtom",writable:!0,configurable:!0,enumerable:!1}),l}function Qi(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}function tr(t){return null==t||("string"==typeof t||Array.isArray(t)?0===t.length:t instanceof Map||t instanceof Set?0===t.size:"object"==typeof t&&0===Object.keys(t).length)}function er(t){const e=new Set,n=[Object.prototype,Array.prototype,Function.prototype,String.prototype,Number.prototype,Boolean.prototype,Symbol.prototype,Date.prototype,RegExp.prototype,Map.prototype,Set.prototype,WeakMap.prototype,WeakSet.prototype,Promise.prototype,Error.prototype];let s=t;for(;s&&!n.includes(s);){for(const t of Reflect.ownKeys(s))"constructor"!==t&&e.add(t);s=Object.getPrototypeOf(s)}return Array.from(e)}const nr=t=>{const e=de();if(e&&e.scopes.has(t))throw new Error("Scope already exists for the same class for this component");let n;Qt.viewOuterInProgress=!0;try{n=new t}finally{Qt.viewOuterInProgress=!1}const s=Qt.setupInProgress;try{if((()=>{er(n).forEach(t=>{const e=Object.getOwnPropertyDescriptor(n,t)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),t);if(e&&(e.get||e.set))return;const s=n[t];"function"!=typeof s||s.__version__||(n[t]=s.bind(n))})})(),"function"==typeof n.setup){Vi(n.setup)&&console.warn("Async setup functions are not supported. Please ensure the setup function is synchronous."),Qt.setupInProgress=!0;try{n.setup(e?._propsFn||(()=>({})))}catch(t){console.error(t)}finally{Qt.setupInProgress=s}}e&&e.addScope(t,n),n.__isScope___=!0}catch(t){console.error(t)}finally{Qt.setupInProgress=s}return n},sr=t=>{let e=null;const n=new CustomEvent("request-parent-scope",{bubbles:!0,composed:!0,detail:{ScopeClass:t,resolve:t=>{e=t}}});if(de().dispatchEvent(n),e)return e;throw new Error(`No parent scope found for ${t.name}`)};function ir(t,e){let n=t;for(;n&&n!==Object.prototype;){const t=Object.getOwnPropertyDescriptor(n,e);if(t)return t;n=Object.getPrototypeOf(n)}}function rr(t,e,n,s=!1){document.addEventListener(t,e,{capture:s}),n.addToCleanUps(e,()=>{document.removeEventListener(t,e,{capture:s})})}function or(t,e,n,s){let i;if("wheelUp"===t||"wheelDown"===t){const r="wheelUp"===t,o=e,a=t=>{(r?t.deltaY>=0:t.deltaY<=0)||(i&&i(),i=o(t))};return window.addEventListener("wheel",a,{capture:n,passive:!0}),void s.addToCleanUps(e,()=>{window.removeEventListener("wheel",a,{capture:n}),i&&i()})}const r="scroll"===t||"touchstart"===t||"touchmove"===t,o=e,a=t=>{i&&i(),i=o(t)};window.addEventListener(t,a,{capture:n,passive:r}),s.addToCleanUps(e,()=>{window.removeEventListener(t,a,{capture:n}),i&&i()})}function ar(t,e){pe()||(ve(),or(t,e,!1,de()))}function lr(t,e){pe()||(ve(),or(t,e,!0,de()))}const cr=Vs((t,e,n)=>{const s=document.createElement("div");Object.assign(s.style,{position:"fixed",inset:"0",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0, 0, 0, 0.5)"}),n?.style&&Object.assign(s.style,n.style),n?.onBackdropClick&&s.addEventListener("click",t=>{t.target===s&&n.onBackdropClick()});const i=document.createElement("div");n?.dialogStyle&&Object.assign(i.style,n.dialogStyle),i.addEventListener("click",t=>t.stopPropagation()),U(e,i),s.appendChild(i),document.body.appendChild(s);const r=document.body.style.overflow;return document.body.style.overflow="hidden",{onUpdate(t){U(t,i)},onCleanup(){s.remove(),document.body.style.overflow=r}}});function hr(t,e,n,s,i,r,o){return t.startsWith("top")?s>=n:t.startsWith("bottom")?i>=n:t.startsWith("left")?r>=e:!!t.startsWith("right")&&o>=e}const ur=Ns((t,e,n)=>{const s=t.el;let i=!1,r=e,o=n;const a=document.createElement("div");a.style.cssText="position:fixed;z-index:9999;margin:0;display:none;background:var(--md-color-surface-raised,#fff);box-shadow:var(--md-shadow-dropdown,0 5px 5px -3px rgba(0,0,0,.20),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12));min-width:160px;",o.style&&Object.assign(a.style,o.style),document.body.appendChild(a),U(r,a);const l=()=>{const t=s.getBoundingClientRect();a.style.visibility="hidden",a.style.display="block",o.matchAnchorWidth&&(a.style.width=`${t.width}px`);const e=a.offsetWidth,n=a.offsetHeight,i=function(t,e,n,s,i){const r=window.innerWidth,o=window.innerHeight,a=t.top-s,l=o-t.bottom-s,c=t.left-s,h=r-t.right-s;if("auto"===i){const t=["bottom-start","top-start","right","left"];for(const s of t)if(hr(s,e,n,a,l,c,h))return s;return"bottom-start"}if(hr(i,e,n,a,l,c,h))return i;const u=function(t){return t.startsWith("top")?t.replace("top","bottom"):t.startsWith("bottom")?t.replace("bottom","top"):t.startsWith("left")?t.replace("left","right"):t.startsWith("right")?t.replace("right","left"):t}(i);return hr(u,e,n,a,l,c,h)?u:i}(t,e,n,o.gap??4,o.position??"bottom-start");!function(t,e,n,s,i,r){const o=window.innerWidth,a=window.innerHeight;let l=0,c=0;n.startsWith("bottom")?l=e.bottom+r:n.startsWith("top")?l=e.top-r-i:"right"===n||"left"===n?l=e.top+e.height/2-i/2:n.endsWith("-start")?l=e.top:n.endsWith("-end")&&(l=e.bottom-i),"bottom"===n||"top"===n?c=e.left+e.width/2-s/2:n.endsWith("-start")?c=n.startsWith("right")?e.right+r:n.startsWith("left")?e.left-r-s:e.left:n.endsWith("-end")?c=n.startsWith("right")?e.right+r:n.startsWith("left")?e.left-r-s:e.right-s:n.startsWith("right")?c=e.right+r:n.startsWith("left")&&(c=e.left-r-s),t.style.left=`${Math.max(4,Math.min(c,o-s-4))}px`,t.style.top=`${Math.max(4,Math.min(l,a-i-4))}px`}(a,t,i,e,n,o.gap??4),a.style.visibility=""},c=()=>{i&&l()},h=t=>{const e=t.target;a.contains(e)||s.contains(e)||d()},u=t=>{"Escape"===t.key&&d()},d=()=>{i=!1,a.style.display="none",o.onClose?.(s),document.removeEventListener("click",h,{capture:!0}),document.removeEventListener("keydown",u),window.removeEventListener("scroll",c,{capture:!0}),window.removeEventListener("resize",c)},f=t=>{t.stopPropagation(),i?d():(i=!0,l(),o.onOpen?.(a),document.addEventListener("click",h,{capture:!0}),document.addEventListener("keydown",u),window.addEventListener("scroll",c,{passive:!0,capture:!0}),window.addEventListener("resize",c,{passive:!0}))};return s.addEventListener("click",f),{onUpdate(t,e){r=t,o=e,U(t,a),e.style&&Object.assign(a.style,e.style),i&&l()},onCleanup(){i&&d(),s.removeEventListener("click",f),a.remove()}}});const dr=Vs((t,e,n)=>{const s=document.createElement("div");if(s.style.position="fixed",s.style.zIndex="9999",n?.style&&Object.assign(s.style,n.style),n?.on)for(const[t,e]of Object.entries(n.on))s.addEventListener(t,e);return function(t){return t?"string"==typeof t?document.querySelector(t)??document.body:t:document.body}(n?.target).appendChild(s),U(e,s),{onUpdate(t){U(t,s)},onCleanup(){s.remove()}}});let fr=null,pr=null,mr=null;function _r(){return fr||(fr=document.createElement("div"),fr.id="mates-tip",fr.setAttribute("role","tooltip"),fr.style.cssText="position:fixed;z-index:10000;pointer-events:none;padding:6px 12px;border-radius:4px;font-size:0.8rem;font-family:system-ui,-apple-system,sans-serif;font-weight:500;line-height:1.4;max-width:300px;width:max-content;background:var(--md-sys-color-inverse-surface,#2e3036);color:var(--md-sys-color-inverse-on-surface,#f0f0f8);box-shadow:0 1px 3px rgba(0,0,0,.20),0 2px 6px rgba(0,0,0,.14);letter-spacing:0.01em;white-space:nowrap;display:none;",document.body.appendChild(fr)),fr}const gr=["maxWidth","padding","borderRadius","fontSize","whiteSpace"];function yr(t,e){if(e.maxWidth&&(t.style.maxWidth=e.maxWidth),e.padding&&(t.style.padding=e.padding),e.borderRadius&&(t.style.borderRadius=e.borderRadius),e.fontSize&&(t.style.fontSize=e.fontSize),e.whiteSpace&&(t.style.whiteSpace=e.whiteSpace),e.style)for(const[n,s]of Object.entries(e.style))void 0!==s&&(t.style[n]=s)}function vr(t,e){const n={maxWidth:"300px",padding:"6px 12px",borderRadius:"4px",fontSize:"0.8rem",whiteSpace:"nowrap"};for(const s of gr)void 0!==e[s]&&(t.style[s]=n[s]);if(e.style){for(const n of Object.keys(e.style))t.style[n]="";t.style.background="var(--md-sys-color-inverse-surface,#2e3036)",t.style.color="var(--md-sys-color-inverse-on-surface,#f0f0f8)"}}function wr(t,e){U("string"==typeof e?b`${e}`:e,t)}function br(t,e){const n=t.getBoundingClientRect(),s=e.getBoundingClientRect(),i=s.width,r=s.height,o=window.innerWidth,a=window.innerHeight;let l;n.top-8-r>=0?(l=n.top-8-r,e.style.transformOrigin="bottom center"):(l=n.bottom+8,e.style.transformOrigin="top center");let c=n.left+n.width/2-i/2;c=Math.max(4,Math.min(c,o-i-4)),l=Math.max(4,Math.min(l,a-r-4)),e.style.left=`${c}px`,e.style.top=`${l}px`}const xr=Ns((t,e,n)=>{const s=t.el;let i=e,r=n,o=null;const a=()=>{null!==mr&&(cancelAnimationFrame(mr),mr=null),null!==o&&(clearTimeout(o),o=null);const t=r.delay??150;o=setTimeout(()=>{o=null;const t=_r();wr(t,i),yr(t,r),t.style.visibility="hidden",t.style.opacity="0",t.style.transform="scale(0.94) translateY(3px)",t.style.transition="none",t.style.display="block",br(s,t),requestAnimationFrame(()=>{t.style.transition="opacity 0.14s ease, transform 0.14s cubic-bezier(0.22,1,0.36,1)",t.style.visibility="visible",t.style.opacity="1",t.style.transform="scale(1) translateY(0)",pr=s})},t)},l=()=>{if(null!==o&&(clearTimeout(o),o=null),pr!==s)return;const t=_r();t.style.transition="opacity 0.12s ease, transform 0.12s ease",t.style.opacity="0",t.style.transform="scale(0.94) translateY(3px)",mr=requestAnimationFrame(()=>{mr=requestAnimationFrame(()=>{mr=null,pr===s&&(vr(t,r),t.style.display="none",pr=null)})})};return s.addEventListener("mouseenter",a),s.addEventListener("mouseleave",l),s.addEventListener("focusin",a),s.addEventListener("focusout",l),s.setAttribute("aria-describedby","mates-tip"),{onUpdate(t,e){if(i=t,r=e,pr===s){const n=_r();wr(n,t),yr(n,e),br(s,n)}},onCleanup(){if(null!==o&&(clearTimeout(o),o=null),pr===s){null!==mr&&(cancelAnimationFrame(mr),mr=null);const t=_r();vr(t,r),t.style.display="none",pr=null}s.removeEventListener("mouseenter",a),s.removeEventListener("mouseleave",l),s.removeEventListener("focusin",a),s.removeEventListener("focusout",l)}}});function Sr(t,e={}){return xr(t,e)}const Cr=Sr,Er=1e3,Ar=3e4,Mr=1/0;var kr,$r,Tr,Rr,Or,Pr;function zr(t){return"number"==typeof t?`${t}px`:t}$r=new WeakMap,Tr=new WeakMap,Rr=new WeakMap,Or=new WeakMap,kr=new WeakSet,Pr=function(t){se(this,$r,"f")?.remove(),ie(this,$r,null,"f"),ie(this,Tr,"","f"),ie(this,Rr,"","f"),ie(this,Or,new Set,"f");const e=t.endNode;if(e?.parentNode){const n=t.startNode,s=document.createRange();s.setStartAfter(n),s.setEndBefore(e),s.deleteContents()}};const Ir=B(class extends q{constructor(t){if(super(t),kr.add(this),$r.set(this,null),Tr.set(this,""),Rr.set(this,""),Or.set(this,new Set),t.type!==V)throw new Error("safeSVG() must be used as a child expression, e.g. html`<div>${safeSVG(markup)}</div>`")}update(t,[e,n]){if(console.log("update"),!e.trimStart().startsWith("<svg"))return console.warn("safeSVG: input does not start with <svg — nothing rendered"),se(this,kr,"m",Pr).call(this,t),S;const s=JSON.stringify(n);if(null===se(this,$r,"f")||e!==se(this,Tr,"f")){const n=function(t){const e=document.createElement("template");e.innerHTML=t;const n=e.content.firstElementChild;return n instanceof SVGElement?n:null}(e);if(null===n)return console.warn("safeSVG: failed to parse SVG markup — nothing rendered"),se(this,kr,"m",Pr).call(this,t),S;se(this,$r,"f")?.remove(),ie(this,$r,n,"f"),ie(this,Tr,e,"f"),ie(this,Rr,"","f"),ie(this,Or,new Set,"f");const s=t.endNode;s.parentNode.insertBefore(se(this,$r,"f"),s)}if(s!==se(this,Rr,"f")){const t=function(t,e){const n=new Set,s=(e,s)=>{t.setAttribute(e,s),n.add(e)},i=e.width??e.size,r=e.height??e.size;void 0!==i&&s("width",zr(i)),void 0!==r&&s("height",zr(r)),void 0!==e.fill&&s("fill",e.fill),void 0!==e.stroke&&s("stroke",e.stroke),void 0!==e.strokeWidth&&s("stroke-width",String(e.strokeWidth)),void 0!==e.strokeLinecap&&s("stroke-linecap",e.strokeLinecap),void 0!==e.strokeLinejoin&&s("stroke-linejoin",e.strokeLinejoin),void 0!==e.opacity&&s("opacity",String(e.opacity)),void 0!==e.viewBox&&s("viewBox",e.viewBox),void 0!==e.transform&&s("transform",e.transform);const o=[],a=e.width??e.size,l=e.height??e.size;void 0!==a&&o.push(`width:${zr(a)}`),void 0!==l&&o.push(`height:${zr(l)}`),void 0!==e.color&&o.push(`color:${e.color}`),o.push("display:inline-block"),o.push("vertical-align:middle"),e.style&&o.push(e.style),s("style",o.join(";")),e.class&&s("class",e.class);const c=e.ariaHidden??!0;return e.ariaLabel?(s("aria-label",e.ariaLabel),s("role","img")):c&&s("aria-hidden","true"),n}(se(this,$r,"f"),n);for(const e of se(this,Or,"f"))t.has(e)||se(this,$r,"f").removeAttribute(e);ie(this,Or,t,"f"),ie(this,Rr,s,"f")}return S}render(t,e){return S}});function Dr(t,e={}){return Ir(t,e)}function Lr(){const t=new Uint8Array(16);if("undefined"!=typeof crypto&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let e=0;e<16;e++)t[e]=256*Math.random()|0;t[6]=15&t[6]|64,t[8]=63&t[8]|128;const e=Array.from(t).map(t=>t.toString(16).padStart(2,"0")).join("");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20,32)}`}let Nr=null,jr=null,Ur=null;function Fr(t){Nr=t}function Vr(t){jr=t}function Wr(){return jr}function Hr(){return Nr??-(new Date).getTimezoneOffset()}function Yr(){return Ur??("undefined"!=typeof navigator?navigator.language:null)??"en"}function Br(t,e){const n={};for(const s of new Intl.DateTimeFormat("en",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(new Date(e)))"literal"!==s.type&&(n[s.type]=parseInt(s.value,10));const s=24===n.hour?0:n.hour,i=Date.UTC(n.year,n.month-1,n.day,s,n.minute,n.second);return Math.round((i-e)/6e4)||0}function qr(t,e){try{const n=new Intl.DateTimeFormat("en",{timeZone:t,timeZoneName:"short"}).formatToParts(new Date(e)).find(t=>"timeZoneName"===t.type);return n?n.value:t}catch{return t}}function Xr(t,e){try{const n=new Intl.DateTimeFormat("en",{timeZone:t,timeZoneName:"long"}).formatToParts(new Date(e)).find(t=>"timeZoneName"===t.type);return n?n.value:t}catch{return t}}function Gr(t,e){const n=new Date(t+6e4*e);return{Y:n.getUTCFullYear(),M:n.getUTCMonth()+1,D:n.getUTCDate(),h:n.getUTCHours(),m:n.getUTCMinutes(),s:n.getUTCSeconds(),ms:n.getUTCMilliseconds(),wd:n.getUTCDay()}}const Zr=t=>String(t).padStart(2,"0");function Kr(t,e,n){const s={[n]:e};return jr?s.timeZone=jr:(s.timeZone="UTC",t+=6e4*Hr()),new Intl.DateTimeFormat(Yr(),s).format(new Date(t))}function Jr(t,e){const n=t>=0?"+":"-",s=Math.abs(t);return e?`${n}${Zr(Math.floor(s/60))}:${Zr(s%60)}`:`${n}${Zr(Math.floor(s/60))}${Zr(s%60)}`}function Qr(t){const e=t.replace(/s$/,"");if("millisecond"===e||"m"===e)return"ms";if("minute"===e)return"min";if(!new Set(["year","month","week","day","hour","min","second","ms"]).has(e))throw new RangeError(`Invalid date unit: "${t}"`);return e}function to(){try{const t=new Intl.Locale(Yr()),e=t.weekInfo?.firstDay??t.getWeekInfo?.()?.firstDay;if(void 0!==e)return e%7}catch{}return 0}const eo=/YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|ddd|HH|H|hh|h|mm|ss|SSS|ZZ|Z|A|a/g,no=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function so(t){try{const e=new Date(Date.UTC(2024,0,7+t,12,0,0));return new Intl.DateTimeFormat(Yr(),{weekday:"long",timeZone:"UTC"}).format(e)}catch{return no[t]||""}}function io(t){try{const e=new Date(Date.UTC(2024,t-1,15,12,0,0));return new Intl.DateTimeFormat(Yr(),{month:"long",timeZone:"UTC"}).format(e)}catch{return""}}function ro(t){if(t instanceof Number)return t.valueOf();if("number"==typeof t)return t;if("string"==typeof t)return new Date(t).getTime();if(t instanceof Date)return t.getTime();if("object"==typeof t&&null!==t){const{year:e=1970,month:n=1,day:s=1,hour:i=0,minute:r=0,second:o=0,ms:a=0}=t;return Date.UTC(e,n-1,s,i,r,o,a)-6e4*Hr()}return NaN}function oo(t,e,n){const s=Qr(n);if("hour"===s)return t+36e5*e;if("min"===s)return t+6e4*e;if("second"===s)return t+1e3*e;if("ms"===s)return t+e;const i=Hr(),r=Gr(t,i);let o=r.Y,a=r.M,l=r.D;if("year"===s)o+=e;else if("month"===s){const t=a-1+e;o+=Math.floor(t/12),a=(t%12+12)%12+1,l=Math.min(l,new Date(o,a,0).getDate())}else l+="week"===s?7*e:e;return Date.UTC(o,a-1,l,r.h,r.m,r.s,r.ms)-6e4*i}function ao(t,e){const n=Hr(),s=Gr(t,n),i=Gr(e,n);return s.Y===i.Y&&s.M===i.M&&s.D===i.D}function lo(t){const e=Hr(),n=Gr(t,e);return Date.UTC(n.Y,n.M-1,n.D,0,0,0,0)-6e4*e}function co(t,e){const n=Hr(),s=Gr(t,n),i=s.h%12||12,r=[],o=e.replace(/\[([^\]]*)\]/g,(t,e)=>(r.push(e),`\0${r.length-1}\0`));eo.lastIndex=0;const a=o.replace(eo,e=>{switch(e){case"YYYY":return String(s.Y);case"YY":return String(s.Y).slice(-2);case"MMMM":return Kr(t,"long","month");case"MMM":return Kr(t,"short","month");case"MM":return Zr(s.M);case"M":return String(s.M);case"DD":return Zr(s.D);case"D":return String(s.D);case"dddd":return Kr(t,"long","weekday");case"ddd":return Kr(t,"short","weekday");case"HH":return Zr(s.h);case"H":return String(s.h);case"hh":return Zr(i);case"h":return String(i);case"mm":return Zr(s.m);case"ss":return Zr(s.s);case"SSS":return(t=>String(t).padStart(3,"0"))(s.ms);case"A":return s.h>=12?"PM":"AM";case"a":return s.h>=12?"pm":"am";case"Z":return Jr(n,!0);case"ZZ":return Jr(n,!1);default:return e}});return a.replace(/\0(\d+)\0/g,(t,e)=>r[+e])}const ho=[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60],["second",1]];const uo=Symbol("ts"),fo=Object.create(Number.prototype);function po(t){return function(t){const e=Object.create(fo);return e[uo]=t,e}(void 0===t?Date.now():ro(t))}Object.defineProperties(fo,{valueOf:{value(){return this[uo]},writable:!1,configurable:!1},values:{get(){const t=this[uo],e=Gr(t,Hr());return{year:e.Y,month:e.M,monthName:io(e.M),dayName:so(e.wd),date:e.D,weekStartDayName:so(to()),numberOfDaysOfTheMonth:new Date(e.Y,e.M,0).getDate(),hours:e.h,minutes:e.m,seconds:e.s,milliSeconds:e.ms,timestamp:t,iso:new Date(t).toISOString()}},configurable:!1},toJSON:{value(){const t=this[uo];return Number.isFinite(t)?new Date(t).toISOString():"Invalid Date"},writable:!1,configurable:!1},toString:{value(){const t=this[uo];return Number.isFinite(t)?new Intl.DateTimeFormat(Yr(),{dateStyle:"medium",...Wr()?{timeZone:Wr()}:{timeZone:"UTC"}}).format(new Date(Wr()?t:t+6e4*Hr())):"Invalid Date"},writable:!1,configurable:!1},format:{value(t){return co(this[uo],t)},writable:!1,configurable:!1},formatLongAgo:{value(t){return function(t,e={}){const{numeric:n="auto",style:s="long"}=e,i=((void 0!==e.now?ro(e.now):Date.now())-t)/1e3,r=Math.abs(i),o=i>=0?-1:1,a=new Intl.RelativeTimeFormat(Yr(),{numeric:n,style:s});for(const[t,e]of ho)if(r>=e)return a.format(o*Math.round(r/e),t);return a.format(0,"second")}(this[uo],t)},writable:!1,configurable:!1},add:{value(t,e){return this[uo]=oo(this[uo],t,e),this},writable:!1,configurable:!1},subtract:{value(t,e){return this[uo]=oo(this[uo],-t,e),this},writable:!1,configurable:!1},isBefore:{value(t){return this[uo]<ro(t)},writable:!1,configurable:!1},isAfter:{value(t){return this[uo]>ro(t)},writable:!1,configurable:!1},isFuture:{value(){return this[uo]>Date.now()},writable:!1,configurable:!1},isPresent:{value(){return ao(this[uo],Date.now())},writable:!1,configurable:!1},isToday:{value(){return ao(this[uo],Date.now())},writable:!1,configurable:!1},isYesterday:{value(){const t=oo(lo(Date.now()),-1,"day");return ao(this[uo],t)},writable:!1,configurable:!1},isTomorrow:{value(){const t=oo(lo(Date.now()),1,"day");return ao(this[uo],t)},writable:!1,configurable:!1},getDifference:{value(t,e){return function(t,e,n){const s=Qr(n),i=t-e;if("ms"===s)return i;if("second"===s)return Math.trunc(i/1e3);if("min"===s)return Math.trunc(i/6e4);if("hour"===s)return Math.trunc(i/36e5);const r=Hr(),o=Gr(t,r),a=Gr(e,r);if("day"===s||"week"===s){const n=Math.floor((t+6e4*r)/864e5)-Math.floor((e+6e4*r)/864e5);return"week"===s?Math.trunc(n/7):n}return"month"===s?12*(o.Y-a.Y)+(o.M-a.M):o.Y-a.Y}(this[uo],ro(t),e)},writable:!1,configurable:!1},getAge:{value(t){return function(t,e){const n=Hr(),s=Gr(t,n),i=Gr(e,n);let r=i.Y-s.Y,o=s.M,a=s.D;if(2===o&&29===a){const t=t=>t%4==0&&t%100!=0||t%400==0;t(i.Y)||(o=3,a=1)}return(i.M<o||i.M===o&&i.D<a)&&r--,Math.max(0,r)}(this[uo],void 0!==t?ro(t):Date.now())},writable:!1,configurable:!1}}),exports.$=zs,exports.Context=class{constructor(){this.id=Math.random().toString(36).substring(2,15),this.context=null}},exports.Delete=t=>ws.Delete(fs(t)),exports.ErrorTypes=ds,exports.Fetch=t=>ws.fetch(fs(t)),exports.FetchClient=vs,exports.Get=t=>ws.Get(fs(t)),exports.MA={fadeIn:"mates-fade-in",fadeOut:"mates-fade-out",slideInUp:"mates-slide-in-up",slideOutUp:"mates-slide-out-up",slideInDown:"mates-slide-in-down",slideOutDown:"mates-slide-out-down",slideInLeft:"mates-slide-in-left",slideOutLeft:"mates-slide-out-left",slideInRight:"mates-slide-in-right",slideOutRight:"mates-slide-out-right",scaleIn:"mates-scale-in",scaleOut:"mates-scale-out",springIn:"mates-spring-in",flipInX:"mates-flip-in-x",flipInY:"mates-flip-in-y",blurIn:"mates-blur-in",blurOut:"mates-blur-out",shake:"mates-shake",pulse:"mates-pulse",bounce:"mates-bounce",spin:"mates-spin"},exports.NotificationManager=le,exports.Patch=t=>ws.Patch(fs(t)),exports.Post=t=>ws.Post(fs(t)),exports.Put=t=>ws.Put(fs(t)),exports.Router=(t,e)=>{const n=t.find(t=>Gn(t.path));if(void 0===n)return e?()=>Vn(e):()=>C;const{component:s}=n;return ke(s),()=>Vn(s)},exports.SyncNotificationManager=ce,exports.ZeroPromise=us,exports._=Se,exports._subToView=Ce,exports.action=function(t){te("Action");let e=t;const n=new Set;let s=null,i=null;const r=t=>{n.forEach(e=>{try{e(t)}catch(t){console.error(t)}})};return Object.assign(function(...t){return((t,n)=>{try{let o;return o=s?s((...n)=>e.call(t,...n),...n):e.call(t,...n),i&&(o=i(o)),r(o),o}catch(t){const e=t instanceof Error?t:new Error(String(t));throw r(void 0),e}})(this,t)},{val:()=>e,set:t=>{e=t},__isAction___:!0,__subscribe:t=>(te("subscribe"),n.add(t),()=>n.delete(t)),interceptBefore:t=>{s=t},interceptAfter:t=>{i=t}})},exports.addStoreBeingRead=Bt,exports.animatedIf=Ds,exports.animatedRouter=function(t,e={}){return Vn(Zn,{routes:t,options:e})},exports.animatedX=function(t,e,n){const{show:s,...i}=n;return Ds(s,b`<x-view .view=${t} .props=${e}></x-view>`,C,i)},exports.arrayRange=function(t,e,n){if(void 0===e&&(e=t,t=0),void 0===n&&(n=t<=e?1:-1),0===n)return[];const s=[];if(n>0)for(let i=t;i<e;i+=n)s.push(i);else for(let i=t;i>e;i+=n)s.push(i);return s},exports.assertComponentOuterContext=ee,exports.assertNotInRestrictedContext=te,exports.asyncAction=kn,exports.asyncAppend=_t,exports.asyncReplace=mt,exports.atom=bn,exports.attr=function(t){return js(t)},exports.blurInPreset=function(t=10,e=400,n="ease-out"){return{keyframes:[{filter:`blur(${t}px)`,opacity:0},{filter:"blur(0px)",opacity:1}],options:{duration:e,easing:n,fill:"both"}}},exports.blurOutPreset=function(t=10,e=400,n="ease-in"){return{keyframes:[{filter:"blur(0px)",opacity:1},{filter:`blur(${t}px)`,opacity:0}],options:{duration:e,easing:n,fill:"both"}}},exports.bouncePreset=function(t=600){return{keyframes:[{transform:"translateY(0)",offset:0},{transform:"translateY(-30%)",offset:.3},{transform:"translateY(0)",offset:.5},{transform:"translateY(-15%)",offset:.7},{transform:"translateY(0)",offset:.85},{transform:"translateY(-5%)",offset:.95},{transform:"translateY(0)",offset:1}],options:{duration:t,easing:"ease",fill:"both"}}},exports.buildPath=Kn,exports.buildRequestUrl=ps,exports.cacheAtom=function(t){const e=new Map,n=new Map,s=bn(e,t),i=s.get.bind(s),r=s;return r.add=(t,i,r)=>{if(n.has(t)&&(clearTimeout(n.get(t)),n.delete(t)),s.update(e=>{e.set(t,i)}),void 0!==r&&-1!==r&&r>0){const i=setTimeout(()=>{e.delete(t),n.delete(t),s.update(()=>{})},r);n.set(t,i)}},r.get=t=>(i(),e.get(t)),r.remove=t=>!!e.has(t)&&(n.has(t)&&(clearTimeout(n.get(t)),n.delete(t)),e.delete(t),s.update(()=>{}),!0),r.has=t=>(i(),e.has(t)),r.getAll=()=>(i(),Array.from(e.values())),r.clearAll=()=>{n.forEach(t=>clearTimeout(t)),n.clear(),e.clear(),s.update(()=>{})},Object.defineProperty(r,"size",{get:()=>(i(),e.size),enumerable:!0,configurable:!0}),Object.defineProperty(r,"name",{get:()=>"cacheAtom",enumerable:!0,configurable:!0}),Ae(s,r.clearAll),r},exports.cacheFn=An,exports.chunk=function(t,e){if(e<1)return[];const n=[];for(let s=0;s<t.length;s+=e)n.push(t.slice(s,s+e));return n},exports.clamp=function(t,e,n){return Math.min(Math.max(t,e),n)},exports.classMap=vt,exports.classes=function(t){return Us(t)},exports.cleanupScheduler=_e,exports.clearInterceptors=()=>{_s.clear(),gs.clear(),ys.clear()},exports.collapseWidthPreset=function(t=500,e="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{width:"auto",overflow:"hidden"},{width:"0",overflow:"hidden"}],options:{duration:t,easing:e,fill:"both"}}},exports.componentRunningStatus=Qt,exports.computeAutoPlacement=function(t,e,n,s){const i=window.innerHeight-t.bottom-s,r=t.top-s,o=window.innerWidth-t.right-s,a=t.left-s;return i>=n?"bottom":r>=n?"top":o>=e?"right":a>=e?"left":[["bottom",i],["top",r],["right",o],["left",a]].reduce((t,e)=>e[1]>t[1]?e:t)[0]},exports.configureCSS=function(t){t.breakpoints&&Object.assign(Ne,t.breakpoints)},exports.createCacheManager=An,exports.createManagedTimer=$n,exports.createPollingManager=Mn,exports.createReactiveRunner=vn,exports.createTimedAtom=Wi,exports.date=po,exports.debounce=Pn,exports.debouncedAtom=(t,e,n)=>Wi(t,e,Pn,n),exports.deepClone=function t(e,n=new WeakMap){if("function"==typeof structuredClone)return structuredClone(e);if(null===e||"object"!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(e instanceof Map){const s=new Map;return n.set(e,s),e.forEach((e,i)=>s.set(t(i,n),t(e,n))),s}if(e instanceof Set){const s=new Set;return n.set(e,s),e.forEach(e=>s.add(t(e,n))),s}if(Array.isArray(e)){const s=[];n.set(e,s);for(let i=0;i<e.length;i++)s[i]=t(e[i],n);return s}const s=n.get(e);if(s)return s;const i={};n.set(e,i);for(const s of Object.keys(e))i[s]=t(e[s],n);return i},exports.deepFreeze=_n,exports.deleteAction=t=>ws.deleteAction(t),exports.df=_n,exports.dialog=function(t,e){return cr(t,e)},exports.effect=Ln,exports.effectScheduler=ge,exports.eleHook=Ns,exports.event=t=>{te("event");const e=t||Math.random().toString(36).substring(2,15),n=new ce;return{trigger:t=>{Nt(e,t),n.trigger(t)},__subscribe:t=>n.subscribe(t),name:e,__isEvent___:!0}},exports.expandWidthPreset=function(t=500,e="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{width:"0",overflow:"hidden"},{width:"auto",overflow:"hidden"}],options:{duration:t,easing:e,fill:"both"}}},exports.fadeInPreset=dn,exports.fadeOutPreset=fn,exports.fetchAction=t=>ws.fetchAction(t),exports.fetchClient=ws,exports.flipInPreset=function(t="y",e=500,n="ease-out"){const s="x"===t?"rotateX":"rotateY";return{keyframes:[{transform:`${s}(90deg)`,opacity:0},{transform:`${s}(0deg)`,opacity:1}],options:{duration:e,easing:n,fill:"both"}}},exports.flipOutPreset=function(t="y",e=500,n="ease-in"){const s="x"===t?"rotateX":"rotateY";return{keyframes:[{transform:`${s}(0deg)`,opacity:1},{transform:`${s}(90deg)`,opacity:0}],options:{duration:e,easing:n,fill:"both"}}},exports.formAtom=(t,e=[],n)=>Ji(t,e,n),exports.get=function(t,e,n){const s=e.replace(/\[(\d+)]/g,".$1").split(".");let i=t;for(const t of s){if(null==i)return n;i=i[t]}return void 0===i?n:i},exports.getAction=t=>ws.getAction(t),exports.getAllProps=er,exports.getAllTimezones=function(){let t;try{t=Intl.supportedValuesOf("timeZone")}catch{return[]}const e=Date.now();return t.map(t=>({name:t,longName:Xr(t,e),shortName:qr(t,e),offset:Br(t,e)}))},exports.getCalendar=function(t,e){if(!Number.isInteger(t)||!Number.isInteger(e)||e<1||e>12)throw new RangeError("getCalendar(year, month): month must be integer 1–12");const n=po({year:t,month:e,day:1}),{year:s,month:i,numberOfDaysOfTheMonth:r}=n.values,o=[];for(let t=Gr(n.valueOf(),Hr()).wd;t>0;t--)o.push(po({year:s,month:i,day:1-t}));for(let t=1;t<=r;t++)o.push(po({year:s,month:i,day:t}));const a=o.length%7,l=0===a?0:7-a,c=po({year:s,month:i,day:r});for(let t=0;t<l;t++)c.add(1,"day"),o.push(po(c.valueOf()));const h=[];for(let t=0;t<o.length;t+=7)h.push(o.slice(t,t+7));return h},exports.getCoords=function(t,e,n){switch(e){case"top":case"top-start":return{top:t.top-n,left:t.left};case"top-end":return{top:t.top-n,left:t.right};case"bottom":case"bottom-start":default:return{top:t.bottom+n,left:t.left};case"bottom-end":return{top:t.bottom+n,left:t.right};case"right":case"right-start":return{top:t.top,left:t.right+n};case"right-end":return{top:t.bottom,left:t.right+n};case"left":case"left-start":return{top:t.top,left:t.left-n};case"left-end":return{top:t.bottom,left:t.left-n}}},exports.getCurrentHost=de,exports.getLocale=function(){return Yr()},exports.getMonths=function(t){const e=t??Yr(),n=new Intl.DateTimeFormat(e,{month:"long",timeZone:"UTC"}),s=new Intl.DateTimeFormat(e,{month:"short",timeZone:"UTC"}),i=[];for(let t=1;t<=12;t++){const e=new Date(Date.UTC(2024,t-1,15,12,0,0));i.push({number:t,name:n.format(e),shortName:s.format(e)})}return i},exports.getParentScope=sr,exports.getScope=sr,exports.getStoresBeingRead=function(){return Vt},exports.getTimezoneOffset=function(){return Hr()},exports.globalCSS=ln,exports.globalScheduler=ye,exports.globalTheme=function(t){const e=Object.keys(t);if(0===e.length)throw new Error("[globalTheme] themes object must have at least one entry.");const n=e[0],s=e[1],i=t[n],r=[];r.push(Es(":root",i));for(const n of e)r.push(Es(`[data-theme="${n}"]`,t[n]));void 0!==s&&r.push(function(t){let e="";for(const n in t)e+=` ${Cs(n)}: ${t[n]};\n`;return e?`@media (prefers-color-scheme: dark) {\n :root:not([data-theme]) {\n${e} }\n}`:""}(t[s])),an();const o=on(),a=r.filter(Boolean).join("\n");a&&o.appendRules(a);const l=Object.create(null);for(const t in i)l[t]=Cs(t);return{cssVars:Object.freeze(l),themeAtom:Ss}},exports.groupBy=function(t,e){const n={};for(const s of t){const t=String(e(s));n[t]||(n[t]=[]),n[t].push(s)}return n},exports.guard=bt,exports.hashAtom=Qn,exports.html=b,exports.htmlHook=Vs,exports.iAtom=xn,exports.ifDefined=t=>t??C,exports.injectMatesAnimations=un,exports.installDevToolsHooks=function(t){t.registerComponent&&(It.registerComponent=t.registerComponent),t.unregisterComponent&&(It.unregisterComponent=t.unregisterComponent),t.notifyRender&&(It.notifyRender=t.notifyRender),t.getComponentName&&(It.getComponentName=t.getComponentName),t.logComponentMount&&(It.logComponentMount=t.logComponentMount),t.logComponentRender&&(It.logComponentRender=t.logComponentRender),t.logComponentUnmount&&(It.logComponentUnmount=t.logComponentUnmount),t.logAtomSet&&(It.logAtomSet=t.logAtomSet),t.logAtomUpdate&&(It.logAtomUpdate=t.logAtomUpdate),t.logEventTrigger&&(It.logEventTrigger=t.logEventTrigger),t.logCleanupEventTrigger&&(It.logCleanupEventTrigger=t.logCleanupEventTrigger),t.logFetchRequest&&(It.logFetchRequest=t.logFetchRequest),t.logFetchResponse&&(It.logFetchResponse=t.logFetchResponse),t.logFetchError&&(It.logFetchError=t.logFetchError),t.recordRender&&(It.recordRender=t.recordRender)},exports.interceptAfter=t=>ms(gs,t),exports.interceptBefore=t=>ms(_s,t),exports.interceptError=t=>ms(ys,t),exports.isAction=t=>"function"==typeof t&&!0===t.__isAction___&&"function"==typeof t.__subscribe,exports.isApiResponseSuccess=function(t){return t>=200&&t<300},exports.isAsyncAction=t=>"function"==typeof t&&!0===t.__isAsyncAction___&&"function"==typeof t.subscribe,exports.isAsyncFunction=Vi,exports.isAsyncValue=ke,exports.isAtom=Ui,exports.isChannel=t=>"object"==typeof t&&null!==t&&!0===t.__isChannel___&&"function"==typeof t.join,exports.isConfirmationEvent=t=>"object"==typeof t&&null!==t&&!0===t.__isConfirmationEvent___&&"function"==typeof t.requestConfirmation&&"function"==typeof t.onConfirmRequest,exports.isDefinedAsGetter=function(t,e){let n=Object.getOwnPropertyDescriptor(t,e),s=Object.getPrototypeOf(t);for(;!n&&s&&s!==Object.prototype;)n=Object.getOwnPropertyDescriptor(s,e),s=Object.getPrototypeOf(s);return n?.get&&"function"==typeof n.get?n.get:null},exports.isDevToolsInstalled=Ut,exports.isEffectRunning=Yt,exports.isEmail=t=>(t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))(t)?null:"Invalid email",exports.isEmpty=tr,exports.isEvent=t=>"object"==typeof t&&null!==t&&!0===t.__isEvent___&&"function"==typeof t.__subscribe&&"function"==typeof t.trigger,exports.isFunction=Fi,exports.isGetter=t=>"function"==typeof t&&!0===t.__isSelector___&&"function"==typeof t.areVersionsChanged,exports.isInRestrictedContext=function(){return!Qt.isHookRunning&&(Qt.templateInProgress||Yt())},exports.isMax=t=>e=>((t,e)=>t<=e)(e,t)?null:`Max is ${t}`,exports.isMin=t=>e=>((t,e)=>t>=e)(e,t)?null:`Min is ${t}`,exports.isPathMatching=Gn,exports.isPattern=(t,e="Invalid format")=>n=>((t,e)=>e.test(t))(n,t)?null:e,exports.isReadTrackingEnabled=Ht,exports.isRequired=t=>(t=>"number"==typeof t||"boolean"==typeof t||!tr(t))(t)?null:"Required",exports.isSSR=pe,exports.isSetter=t=>"function"==typeof t&&!0===t.__isSetter___&&"function"==typeof t.__subscribe,exports.isUnit=t=>"object"==typeof t&&null!==t&&!0===t.__isUnit___&&"function"==typeof t.__subscribe&&"function"==typeof t.__reset,exports.iterateDeeply=function t(e,n){if(null==e||"object"!=typeof e)return;const s=Array.isArray(e)?e.map((t,e)=>e):Object.keys(e);for(const i of s){const s=n(i,e[i],e);void 0!==s&&(e[i]=s);const r=e[i];null!==r&&"object"==typeof r&&t(r,n)}},exports.join=
|
|
191
|
+
*/function ji(t,e,n){return"function"==typeof e?{keyFn:t,template:e,opts:n}:{keyFn:void 0,template:t,opts:e}}const Ui=t=>"function"==typeof t&&!0===t.__isAtom___&&"function"==typeof t.set&&"function"==typeof t.__subscribe,Fi=t=>"function"==typeof t,Vi=t=>"AsyncFunction"===t.constructor.name,Wi=(t,e,n,s)=>{if(Ui(t)){const i=t,r=bn(i(),s),o=n(r.set,e),a=n(r.update,e);return r.set=o,r.update=a,i.__subscribe(()=>{ge.schedule(()=>r.set(i()))}),Ae(r,()=>{o.cancel(),a.cancel()}),r}const i=bn(t,s),r=n(i.set,e),o=n(i.update,e);return i.set=r,i.update=o,Ae(i,()=>{r.cancel(),o.cancel()}),i},Hi="mates";function Yi(t,e){try{null===e?t.removeItem(Hi):t.setItem(Hi,JSON.stringify(e))}catch{}}function Bi(t,e){const n=bn((()=>{try{return function(t){try{const e=t.getItem(Hi);if(e)return JSON.parse(e)}catch{}return null}(t())}catch{return null}})()),s=n.set;n.set=function(e,i=!1){s(e,i);try{Yi(t(),n.get())}catch{}};const i=n.update;return n.update=function(e,s=!1){if(null!==n.get()){i(e,s);try{Yi(t(),n.get())}catch{}}},e(t=>{if(t.key===Hi)if(t.newValue)try{s(JSON.parse(t.newValue))}catch{}else s(null)}),Object.defineProperty(n,"name",{value:"storageAtom",writable:!0,configurable:!0,enumerable:!1}),n}function qi(t){"undefined"!=typeof window&&window.addEventListener("storage",t)}const Xi=Bi(()=>localStorage,t=>qi(e=>{e.storageArea===localStorage&&t(e)})),Gi=Bi(()=>sessionStorage,t=>qi(e=>{e.storageArea===sessionStorage&&t(e)})),Zi=bn("undefined"!=typeof document?document.title:"");Ln(()=>{var t;t=Zi.get(),"undefined"!=typeof document&&(document.title=t)});function Ki(t,e=2){let n=parseFloat(String(t).trim());Number.isFinite(n)||(n=0);const s=10**e;return Math.round(n*s)/s}function Ji(t,e,n){const s=bn(t,n),i=bn([],n);function r(){const t=s.get(),n=e.map(e=>e(t)).filter(t=>null!=t&&""!==t);return i.set(n),n}const o=s.set;s.set=function(t,e=!1){o(t,e),r()};const a=s.update;s.update=function(t,e=!1){a(t,e),r()};const l=s;return Object.defineProperty(l,"__isFormAtom__",{value:!0,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(l,"errors",{get:()=>i.get(),enumerable:!1,configurable:!0}),Object.defineProperty(l,"isValid",{get:()=>0===i.get().length,enumerable:!1,configurable:!0}),l.validate=r,l.toFloat=()=>Ki(s.get()),l.toFloatString=()=>Ki(s.get()).toString(),l.toValidNumber=()=>function(t){const e=Number(t);return Number.isFinite(e)?e:0}(s.get()),Object.defineProperty(l,"name",{value:"formAtom",writable:!0,configurable:!0,enumerable:!1}),l}function Qi(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}function tr(t){return null==t||("string"==typeof t||Array.isArray(t)?0===t.length:t instanceof Map||t instanceof Set?0===t.size:"object"==typeof t&&0===Object.keys(t).length)}function er(t){const e=new Set,n=[Object.prototype,Array.prototype,Function.prototype,String.prototype,Number.prototype,Boolean.prototype,Symbol.prototype,Date.prototype,RegExp.prototype,Map.prototype,Set.prototype,WeakMap.prototype,WeakSet.prototype,Promise.prototype,Error.prototype];let s=t;for(;s&&!n.includes(s);){for(const t of Reflect.ownKeys(s))"constructor"!==t&&e.add(t);s=Object.getPrototypeOf(s)}return Array.from(e)}const nr=t=>{const e=de();if(e&&e.scopes.has(t))throw new Error("Scope already exists for the same class for this component");let n;Qt.viewOuterInProgress=!0;try{n=new t}finally{Qt.viewOuterInProgress=!1}const s=Qt.setupInProgress;try{if((()=>{er(n).forEach(t=>{const e=Object.getOwnPropertyDescriptor(n,t)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(n),t);if(e&&(e.get||e.set))return;const s=n[t];"function"!=typeof s||s.__version__||(n[t]=s.bind(n))})})(),"function"==typeof n.setup){Vi(n.setup)&&console.warn("Async setup functions are not supported. Please ensure the setup function is synchronous."),Qt.setupInProgress=!0;try{n.setup(e?._propsFn||(()=>({})))}catch(t){console.error(t)}finally{Qt.setupInProgress=s}}e&&e.addScope(t,n),n.__isScope___=!0}catch(t){console.error(t)}finally{Qt.setupInProgress=s}return n},sr=t=>{let e=null;const n=new CustomEvent("request-parent-scope",{bubbles:!0,composed:!0,detail:{ScopeClass:t,resolve:t=>{e=t}}});if(de().dispatchEvent(n),e)return e;throw new Error(`No parent scope found for ${t.name}`)};function ir(t,e){let n=t;for(;n&&n!==Object.prototype;){const t=Object.getOwnPropertyDescriptor(n,e);if(t)return t;n=Object.getPrototypeOf(n)}}const rr=(t,e,n)=>{const s=er(t);s.forEach(s=>{const i=ir(t,s);if(i?.get){let n,r=-1;const o=i.get;Object.defineProperty(t,s,{get(){const s=e.__version__;return s!==r&&(r=s,n=o.call(t)),n},configurable:!0,enumerable:i.enumerable})}else if(Fi(t[s])){if(Vi(t[s]))throw new Error(`Async functions are not supported inside ${n}`);const i=t[s];t[s]=(...n)=>{e.update(()=>i.apply(t,n))}}});const i=Object.create(t);return s.forEach(n=>{const s=ir(t,n);if(!s)return;const r=!!s.get,o=!r&&Fi(s.value);r||o||Object.defineProperty(i,n,{get:()=>e()[n],set(t){e.update(e=>{e[n]=t})},enumerable:!0,configurable:!0})}),i};function or(t,e,n,s=!1){document.addEventListener(t,e,{capture:s}),n.addToCleanUps(e,()=>{document.removeEventListener(t,e,{capture:s})})}function ar(t,e,n,s){let i;if("wheelUp"===t||"wheelDown"===t){const r="wheelUp"===t,o=e,a=t=>{(r?t.deltaY>=0:t.deltaY<=0)||(i&&i(),i=o(t))};return window.addEventListener("wheel",a,{capture:n,passive:!0}),void s.addToCleanUps(e,()=>{window.removeEventListener("wheel",a,{capture:n}),i&&i()})}const r="scroll"===t||"touchstart"===t||"touchmove"===t,o=e,a=t=>{i&&i(),i=o(t)};window.addEventListener(t,a,{capture:n,passive:r}),s.addToCleanUps(e,()=>{window.removeEventListener(t,a,{capture:n}),i&&i()})}function lr(t,e){pe()||(ve(),ar(t,e,!1,de()))}function cr(t,e){pe()||(ve(),ar(t,e,!0,de()))}const hr=Vs((t,e,n)=>{const s=document.createElement("div");Object.assign(s.style,{position:"fixed",inset:"0",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0, 0, 0, 0.5)"}),n?.style&&Object.assign(s.style,n.style),n?.onBackdropClick&&s.addEventListener("click",t=>{t.target===s&&n.onBackdropClick()});const i=document.createElement("div");n?.dialogStyle&&Object.assign(i.style,n.dialogStyle),i.addEventListener("click",t=>t.stopPropagation()),U(e,i),s.appendChild(i),document.body.appendChild(s);const r=document.body.style.overflow;return document.body.style.overflow="hidden",{onUpdate(t){U(t,i)},onCleanup(){s.remove(),document.body.style.overflow=r}}});function ur(t,e,n,s,i,r,o){return t.startsWith("top")?s>=n:t.startsWith("bottom")?i>=n:t.startsWith("left")?r>=e:!!t.startsWith("right")&&o>=e}const dr=Ns((t,e,n)=>{const s=t.el;let i=!1,r=e,o=n;const a=document.createElement("div");a.style.cssText="position:fixed;z-index:9999;margin:0;display:none;background:var(--md-color-surface-raised,#fff);box-shadow:var(--md-shadow-dropdown,0 5px 5px -3px rgba(0,0,0,.20),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12));min-width:160px;",o.style&&Object.assign(a.style,o.style),document.body.appendChild(a),U(r,a);const l=()=>{const t=s.getBoundingClientRect();a.style.visibility="hidden",a.style.display="block",o.matchAnchorWidth&&(a.style.width=`${t.width}px`);const e=a.offsetWidth,n=a.offsetHeight,i=function(t,e,n,s,i){const r=window.innerWidth,o=window.innerHeight,a=t.top-s,l=o-t.bottom-s,c=t.left-s,h=r-t.right-s;if("auto"===i){const t=["bottom-start","top-start","right","left"];for(const s of t)if(ur(s,e,n,a,l,c,h))return s;return"bottom-start"}if(ur(i,e,n,a,l,c,h))return i;const u=function(t){return t.startsWith("top")?t.replace("top","bottom"):t.startsWith("bottom")?t.replace("bottom","top"):t.startsWith("left")?t.replace("left","right"):t.startsWith("right")?t.replace("right","left"):t}(i);return ur(u,e,n,a,l,c,h)?u:i}(t,e,n,o.gap??4,o.position??"bottom-start");!function(t,e,n,s,i,r){const o=window.innerWidth,a=window.innerHeight;let l=0,c=0;n.startsWith("bottom")?l=e.bottom+r:n.startsWith("top")?l=e.top-r-i:"right"===n||"left"===n?l=e.top+e.height/2-i/2:n.endsWith("-start")?l=e.top:n.endsWith("-end")&&(l=e.bottom-i),"bottom"===n||"top"===n?c=e.left+e.width/2-s/2:n.endsWith("-start")?c=n.startsWith("right")?e.right+r:n.startsWith("left")?e.left-r-s:e.left:n.endsWith("-end")?c=n.startsWith("right")?e.right+r:n.startsWith("left")?e.left-r-s:e.right-s:n.startsWith("right")?c=e.right+r:n.startsWith("left")&&(c=e.left-r-s),t.style.left=`${Math.max(4,Math.min(c,o-s-4))}px`,t.style.top=`${Math.max(4,Math.min(l,a-i-4))}px`}(a,t,i,e,n,o.gap??4),a.style.visibility=""},c=()=>{i&&l()},h=t=>{const e=t.target;a.contains(e)||s.contains(e)||d()},u=t=>{"Escape"===t.key&&d()},d=()=>{i=!1,a.style.display="none",o.onClose?.(s),document.removeEventListener("click",h,{capture:!0}),document.removeEventListener("keydown",u),window.removeEventListener("scroll",c,{capture:!0}),window.removeEventListener("resize",c)},f=t=>{t.stopPropagation(),i?d():(i=!0,l(),o.onOpen?.(a),document.addEventListener("click",h,{capture:!0}),document.addEventListener("keydown",u),window.addEventListener("scroll",c,{passive:!0,capture:!0}),window.addEventListener("resize",c,{passive:!0}))};return s.addEventListener("click",f),{onUpdate(t,e){r=t,o=e,U(t,a),e.style&&Object.assign(a.style,e.style),i&&l()},onCleanup(){i&&d(),s.removeEventListener("click",f),a.remove()}}});const fr=Vs((t,e,n)=>{const s=document.createElement("div");if(s.style.position="fixed",s.style.zIndex="9999",n?.style&&Object.assign(s.style,n.style),n?.on)for(const[t,e]of Object.entries(n.on))s.addEventListener(t,e);return function(t){return t?"string"==typeof t?document.querySelector(t)??document.body:t:document.body}(n?.target).appendChild(s),U(e,s),{onUpdate(t){U(t,s)},onCleanup(){s.remove()}}});let pr=null,mr=null,_r=null;function gr(){return pr||(pr=document.createElement("div"),pr.id="mates-tip",pr.setAttribute("role","tooltip"),pr.style.cssText="position:fixed;z-index:10000;pointer-events:none;padding:6px 12px;border-radius:4px;font-size:0.8rem;font-family:system-ui,-apple-system,sans-serif;font-weight:500;line-height:1.4;max-width:300px;width:max-content;background:var(--md-sys-color-inverse-surface,#2e3036);color:var(--md-sys-color-inverse-on-surface,#f0f0f8);box-shadow:0 1px 3px rgba(0,0,0,.20),0 2px 6px rgba(0,0,0,.14);letter-spacing:0.01em;white-space:nowrap;display:none;",document.body.appendChild(pr)),pr}const yr=["maxWidth","padding","borderRadius","fontSize","whiteSpace"];function vr(t,e){if(e.maxWidth&&(t.style.maxWidth=e.maxWidth),e.padding&&(t.style.padding=e.padding),e.borderRadius&&(t.style.borderRadius=e.borderRadius),e.fontSize&&(t.style.fontSize=e.fontSize),e.whiteSpace&&(t.style.whiteSpace=e.whiteSpace),e.style)for(const[n,s]of Object.entries(e.style))void 0!==s&&(t.style[n]=s)}function wr(t,e){const n={maxWidth:"300px",padding:"6px 12px",borderRadius:"4px",fontSize:"0.8rem",whiteSpace:"nowrap"};for(const s of yr)void 0!==e[s]&&(t.style[s]=n[s]);if(e.style){for(const n of Object.keys(e.style))t.style[n]="";t.style.background="var(--md-sys-color-inverse-surface,#2e3036)",t.style.color="var(--md-sys-color-inverse-on-surface,#f0f0f8)"}}function br(t,e){U("string"==typeof e?b`${e}`:e,t)}function xr(t,e){const n=t.getBoundingClientRect(),s=e.getBoundingClientRect(),i=s.width,r=s.height,o=window.innerWidth,a=window.innerHeight;let l;n.top-8-r>=0?(l=n.top-8-r,e.style.transformOrigin="bottom center"):(l=n.bottom+8,e.style.transformOrigin="top center");let c=n.left+n.width/2-i/2;c=Math.max(4,Math.min(c,o-i-4)),l=Math.max(4,Math.min(l,a-r-4)),e.style.left=`${c}px`,e.style.top=`${l}px`}const Sr=Ns((t,e,n)=>{const s=t.el;let i=e,r=n,o=null;const a=()=>{null!==_r&&(cancelAnimationFrame(_r),_r=null),null!==o&&(clearTimeout(o),o=null);const t=r.delay??150;o=setTimeout(()=>{o=null;const t=gr();br(t,i),vr(t,r),t.style.visibility="hidden",t.style.opacity="0",t.style.transform="scale(0.94) translateY(3px)",t.style.transition="none",t.style.display="block",xr(s,t),requestAnimationFrame(()=>{t.style.transition="opacity 0.14s ease, transform 0.14s cubic-bezier(0.22,1,0.36,1)",t.style.visibility="visible",t.style.opacity="1",t.style.transform="scale(1) translateY(0)",mr=s})},t)},l=()=>{if(null!==o&&(clearTimeout(o),o=null),mr!==s)return;const t=gr();t.style.transition="opacity 0.12s ease, transform 0.12s ease",t.style.opacity="0",t.style.transform="scale(0.94) translateY(3px)",_r=requestAnimationFrame(()=>{_r=requestAnimationFrame(()=>{_r=null,mr===s&&(wr(t,r),t.style.display="none",mr=null)})})};return s.addEventListener("mouseenter",a),s.addEventListener("mouseleave",l),s.addEventListener("focusin",a),s.addEventListener("focusout",l),s.setAttribute("aria-describedby","mates-tip"),{onUpdate(t,e){if(i=t,r=e,mr===s){const n=gr();br(n,t),vr(n,e),xr(s,n)}},onCleanup(){if(null!==o&&(clearTimeout(o),o=null),mr===s){null!==_r&&(cancelAnimationFrame(_r),_r=null);const t=gr();wr(t,r),t.style.display="none",mr=null}s.removeEventListener("mouseenter",a),s.removeEventListener("mouseleave",l),s.removeEventListener("focusin",a),s.removeEventListener("focusout",l)}}});function Cr(t,e={}){return Sr(t,e)}const Er=Cr,Ar=1e3,Mr=3e4,kr=1/0;var $r,Tr,Rr,Or,Pr,zr;function Ir(t){return"number"==typeof t?`${t}px`:t}Tr=new WeakMap,Rr=new WeakMap,Or=new WeakMap,Pr=new WeakMap,$r=new WeakSet,zr=function(t){se(this,Tr,"f")?.remove(),ie(this,Tr,null,"f"),ie(this,Rr,"","f"),ie(this,Or,"","f"),ie(this,Pr,new Set,"f");const e=t.endNode;if(e?.parentNode){const n=t.startNode,s=document.createRange();s.setStartAfter(n),s.setEndBefore(e),s.deleteContents()}};const Dr=B(class extends q{constructor(t){if(super(t),$r.add(this),Tr.set(this,null),Rr.set(this,""),Or.set(this,""),Pr.set(this,new Set),t.type!==V)throw new Error("safeSVG() must be used as a child expression, e.g. html`<div>${safeSVG(markup)}</div>`")}update(t,[e,n]){if(console.log("update"),!e.trimStart().startsWith("<svg"))return console.warn("safeSVG: input does not start with <svg — nothing rendered"),se(this,$r,"m",zr).call(this,t),S;const s=JSON.stringify(n);if(null===se(this,Tr,"f")||e!==se(this,Rr,"f")){const n=function(t){const e=document.createElement("template");e.innerHTML=t;const n=e.content.firstElementChild;return n instanceof SVGElement?n:null}(e);if(null===n)return console.warn("safeSVG: failed to parse SVG markup — nothing rendered"),se(this,$r,"m",zr).call(this,t),S;se(this,Tr,"f")?.remove(),ie(this,Tr,n,"f"),ie(this,Rr,e,"f"),ie(this,Or,"","f"),ie(this,Pr,new Set,"f");const s=t.endNode;s.parentNode.insertBefore(se(this,Tr,"f"),s)}if(s!==se(this,Or,"f")){const t=function(t,e){const n=new Set,s=(e,s)=>{t.setAttribute(e,s),n.add(e)},i=e.width??e.size,r=e.height??e.size;void 0!==i&&s("width",Ir(i)),void 0!==r&&s("height",Ir(r)),void 0!==e.fill&&s("fill",e.fill),void 0!==e.stroke&&s("stroke",e.stroke),void 0!==e.strokeWidth&&s("stroke-width",String(e.strokeWidth)),void 0!==e.strokeLinecap&&s("stroke-linecap",e.strokeLinecap),void 0!==e.strokeLinejoin&&s("stroke-linejoin",e.strokeLinejoin),void 0!==e.opacity&&s("opacity",String(e.opacity)),void 0!==e.viewBox&&s("viewBox",e.viewBox),void 0!==e.transform&&s("transform",e.transform);const o=[],a=e.width??e.size,l=e.height??e.size;void 0!==a&&o.push(`width:${Ir(a)}`),void 0!==l&&o.push(`height:${Ir(l)}`),void 0!==e.color&&o.push(`color:${e.color}`),o.push("display:inline-block"),o.push("vertical-align:middle"),e.style&&o.push(e.style),s("style",o.join(";")),e.class&&s("class",e.class);const c=e.ariaHidden??!0;return e.ariaLabel?(s("aria-label",e.ariaLabel),s("role","img")):c&&s("aria-hidden","true"),n}(se(this,Tr,"f"),n);for(const e of se(this,Pr,"f"))t.has(e)||se(this,Tr,"f").removeAttribute(e);ie(this,Pr,t,"f"),ie(this,Or,s,"f")}return S}render(t,e){return S}});function Lr(t,e={}){return Dr(t,e)}function Nr(){const t=new Uint8Array(16);if("undefined"!=typeof crypto&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let e=0;e<16;e++)t[e]=256*Math.random()|0;t[6]=15&t[6]|64,t[8]=63&t[8]|128;const e=Array.from(t).map(t=>t.toString(16).padStart(2,"0")).join("");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20,32)}`}let jr=null,Ur=null,Fr=null;function Vr(t){jr=t}function Wr(t){Ur=t}function Hr(){return Ur}function Yr(){return jr??-(new Date).getTimezoneOffset()}function Br(){return Fr??("undefined"!=typeof navigator?navigator.language:null)??"en"}function qr(t,e){const n={};for(const s of new Intl.DateTimeFormat("en",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(new Date(e)))"literal"!==s.type&&(n[s.type]=parseInt(s.value,10));const s=24===n.hour?0:n.hour,i=Date.UTC(n.year,n.month-1,n.day,s,n.minute,n.second);return Math.round((i-e)/6e4)||0}function Xr(t,e){try{const n=new Intl.DateTimeFormat("en",{timeZone:t,timeZoneName:"short"}).formatToParts(new Date(e)).find(t=>"timeZoneName"===t.type);return n?n.value:t}catch{return t}}function Gr(t,e){try{const n=new Intl.DateTimeFormat("en",{timeZone:t,timeZoneName:"long"}).formatToParts(new Date(e)).find(t=>"timeZoneName"===t.type);return n?n.value:t}catch{return t}}function Zr(t,e){const n=new Date(t+6e4*e);return{Y:n.getUTCFullYear(),M:n.getUTCMonth()+1,D:n.getUTCDate(),h:n.getUTCHours(),m:n.getUTCMinutes(),s:n.getUTCSeconds(),ms:n.getUTCMilliseconds(),wd:n.getUTCDay()}}const Kr=t=>String(t).padStart(2,"0");function Jr(t,e,n){const s={[n]:e};return Ur?s.timeZone=Ur:(s.timeZone="UTC",t+=6e4*Yr()),new Intl.DateTimeFormat(Br(),s).format(new Date(t))}function Qr(t,e){const n=t>=0?"+":"-",s=Math.abs(t);return e?`${n}${Kr(Math.floor(s/60))}:${Kr(s%60)}`:`${n}${Kr(Math.floor(s/60))}${Kr(s%60)}`}function to(t){const e=t.replace(/s$/,"");if("millisecond"===e||"m"===e)return"ms";if("minute"===e)return"min";if(!new Set(["year","month","week","day","hour","min","second","ms"]).has(e))throw new RangeError(`Invalid date unit: "${t}"`);return e}function eo(){try{const t=new Intl.Locale(Br()),e=t.weekInfo?.firstDay??t.getWeekInfo?.()?.firstDay;if(void 0!==e)return e%7}catch{}return 0}const no=/YYYY|YY|MMMM|MMM|MM|M|DD|D|dddd|ddd|HH|H|hh|h|mm|ss|SSS|ZZ|Z|A|a/g,so=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function io(t){try{const e=new Date(Date.UTC(2024,0,7+t,12,0,0));return new Intl.DateTimeFormat(Br(),{weekday:"long",timeZone:"UTC"}).format(e)}catch{return so[t]||""}}function ro(t){try{const e=new Date(Date.UTC(2024,t-1,15,12,0,0));return new Intl.DateTimeFormat(Br(),{month:"long",timeZone:"UTC"}).format(e)}catch{return""}}function oo(t){if(t instanceof Number)return t.valueOf();if("number"==typeof t)return t;if("string"==typeof t)return new Date(t).getTime();if(t instanceof Date)return t.getTime();if("object"==typeof t&&null!==t){const{year:e=1970,month:n=1,day:s=1,hour:i=0,minute:r=0,second:o=0,ms:a=0}=t;return Date.UTC(e,n-1,s,i,r,o,a)-6e4*Yr()}return NaN}function ao(t,e,n){const s=to(n);if("hour"===s)return t+36e5*e;if("min"===s)return t+6e4*e;if("second"===s)return t+1e3*e;if("ms"===s)return t+e;const i=Yr(),r=Zr(t,i);let o=r.Y,a=r.M,l=r.D;if("year"===s)o+=e;else if("month"===s){const t=a-1+e;o+=Math.floor(t/12),a=(t%12+12)%12+1,l=Math.min(l,new Date(o,a,0).getDate())}else l+="week"===s?7*e:e;return Date.UTC(o,a-1,l,r.h,r.m,r.s,r.ms)-6e4*i}function lo(t,e){const n=Yr(),s=Zr(t,n),i=Zr(e,n);return s.Y===i.Y&&s.M===i.M&&s.D===i.D}function co(t){const e=Yr(),n=Zr(t,e);return Date.UTC(n.Y,n.M-1,n.D,0,0,0,0)-6e4*e}function ho(t,e){const n=Yr(),s=Zr(t,n),i=s.h%12||12,r=[],o=e.replace(/\[([^\]]*)\]/g,(t,e)=>(r.push(e),`\0${r.length-1}\0`));no.lastIndex=0;const a=o.replace(no,e=>{switch(e){case"YYYY":return String(s.Y);case"YY":return String(s.Y).slice(-2);case"MMMM":return Jr(t,"long","month");case"MMM":return Jr(t,"short","month");case"MM":return Kr(s.M);case"M":return String(s.M);case"DD":return Kr(s.D);case"D":return String(s.D);case"dddd":return Jr(t,"long","weekday");case"ddd":return Jr(t,"short","weekday");case"HH":return Kr(s.h);case"H":return String(s.h);case"hh":return Kr(i);case"h":return String(i);case"mm":return Kr(s.m);case"ss":return Kr(s.s);case"SSS":return(t=>String(t).padStart(3,"0"))(s.ms);case"A":return s.h>=12?"PM":"AM";case"a":return s.h>=12?"pm":"am";case"Z":return Qr(n,!0);case"ZZ":return Qr(n,!1);default:return e}});return a.replace(/\0(\d+)\0/g,(t,e)=>r[+e])}const uo=[["year",31536e3],["month",2592e3],["week",604800],["day",86400],["hour",3600],["minute",60],["second",1]];const fo=Symbol("ts"),po=Object.create(Number.prototype);function mo(t){return function(t){const e=Object.create(po);return e[fo]=t,e}(void 0===t?Date.now():oo(t))}Object.defineProperties(po,{valueOf:{value(){return this[fo]},writable:!1,configurable:!1},values:{get(){const t=this[fo],e=Zr(t,Yr());return{year:e.Y,month:e.M,monthName:ro(e.M),dayName:io(e.wd),date:e.D,weekStartDayName:io(eo()),numberOfDaysOfTheMonth:new Date(e.Y,e.M,0).getDate(),hours:e.h,minutes:e.m,seconds:e.s,milliSeconds:e.ms,timestamp:t,iso:new Date(t).toISOString()}},configurable:!1},toJSON:{value(){const t=this[fo];return Number.isFinite(t)?new Date(t).toISOString():"Invalid Date"},writable:!1,configurable:!1},toString:{value(){const t=this[fo];return Number.isFinite(t)?new Intl.DateTimeFormat(Br(),{dateStyle:"medium",...Hr()?{timeZone:Hr()}:{timeZone:"UTC"}}).format(new Date(Hr()?t:t+6e4*Yr())):"Invalid Date"},writable:!1,configurable:!1},format:{value(t){return ho(this[fo],t)},writable:!1,configurable:!1},formatLongAgo:{value(t){return function(t,e={}){const{numeric:n="auto",style:s="long"}=e,i=((void 0!==e.now?oo(e.now):Date.now())-t)/1e3,r=Math.abs(i),o=i>=0?-1:1,a=new Intl.RelativeTimeFormat(Br(),{numeric:n,style:s});for(const[t,e]of uo)if(r>=e)return a.format(o*Math.round(r/e),t);return a.format(0,"second")}(this[fo],t)},writable:!1,configurable:!1},add:{value(t,e){return this[fo]=ao(this[fo],t,e),this},writable:!1,configurable:!1},subtract:{value(t,e){return this[fo]=ao(this[fo],-t,e),this},writable:!1,configurable:!1},isBefore:{value(t){return this[fo]<oo(t)},writable:!1,configurable:!1},isAfter:{value(t){return this[fo]>oo(t)},writable:!1,configurable:!1},isFuture:{value(){return this[fo]>Date.now()},writable:!1,configurable:!1},isPresent:{value(){return lo(this[fo],Date.now())},writable:!1,configurable:!1},isToday:{value(){return lo(this[fo],Date.now())},writable:!1,configurable:!1},isYesterday:{value(){const t=ao(co(Date.now()),-1,"day");return lo(this[fo],t)},writable:!1,configurable:!1},isTomorrow:{value(){const t=ao(co(Date.now()),1,"day");return lo(this[fo],t)},writable:!1,configurable:!1},getDifference:{value(t,e){return function(t,e,n){const s=to(n),i=t-e;if("ms"===s)return i;if("second"===s)return Math.trunc(i/1e3);if("min"===s)return Math.trunc(i/6e4);if("hour"===s)return Math.trunc(i/36e5);const r=Yr(),o=Zr(t,r),a=Zr(e,r);if("day"===s||"week"===s){const n=Math.floor((t+6e4*r)/864e5)-Math.floor((e+6e4*r)/864e5);return"week"===s?Math.trunc(n/7):n}return"month"===s?12*(o.Y-a.Y)+(o.M-a.M):o.Y-a.Y}(this[fo],oo(t),e)},writable:!1,configurable:!1},getAge:{value(t){return function(t,e){const n=Yr(),s=Zr(t,n),i=Zr(e,n);let r=i.Y-s.Y,o=s.M,a=s.D;if(2===o&&29===a){const t=t=>t%4==0&&t%100!=0||t%400==0;t(i.Y)||(o=3,a=1)}return(i.M<o||i.M===o&&i.D<a)&&r--,Math.max(0,r)}(this[fo],void 0!==t?oo(t):Date.now())},writable:!1,configurable:!1}}),exports.$=zs,exports.Context=class{constructor(){this.id=Math.random().toString(36).substring(2,15),this.context=null}},exports.Delete=t=>ws.Delete(fs(t)),exports.ErrorTypes=ds,exports.Fetch=t=>ws.fetch(fs(t)),exports.FetchClient=vs,exports.Get=t=>ws.Get(fs(t)),exports.MA={fadeIn:"mates-fade-in",fadeOut:"mates-fade-out",slideInUp:"mates-slide-in-up",slideOutUp:"mates-slide-out-up",slideInDown:"mates-slide-in-down",slideOutDown:"mates-slide-out-down",slideInLeft:"mates-slide-in-left",slideOutLeft:"mates-slide-out-left",slideInRight:"mates-slide-in-right",slideOutRight:"mates-slide-out-right",scaleIn:"mates-scale-in",scaleOut:"mates-scale-out",springIn:"mates-spring-in",flipInX:"mates-flip-in-x",flipInY:"mates-flip-in-y",blurIn:"mates-blur-in",blurOut:"mates-blur-out",shake:"mates-shake",pulse:"mates-pulse",bounce:"mates-bounce",spin:"mates-spin"},exports.NotificationManager=le,exports.Patch=t=>ws.Patch(fs(t)),exports.Post=t=>ws.Post(fs(t)),exports.Put=t=>ws.Put(fs(t)),exports.Router=(t,e)=>{const n=t.find(t=>Gn(t.path));if(void 0===n)return e?()=>Vn(e):()=>C;const{component:s}=n;return ke(s),()=>Vn(s)},exports.SyncNotificationManager=ce,exports.ZeroPromise=us,exports._=Se,exports._subToView=Ce,exports.action=function(t){te("Action");let e=t;const n=new Set;let s=null,i=null;const r=t=>{n.forEach(e=>{try{e(t)}catch(t){console.error(t)}})};return Object.assign(function(...t){return((t,n)=>{try{let o;return o=s?s((...n)=>e.call(t,...n),...n):e.call(t,...n),i&&(o=i(o)),r(o),o}catch(t){const e=t instanceof Error?t:new Error(String(t));throw r(void 0),e}})(this,t)},{val:()=>e,set:t=>{e=t},__isAction___:!0,__subscribe:t=>(te("subscribe"),n.add(t),()=>n.delete(t)),interceptBefore:t=>{s=t},interceptAfter:t=>{i=t}})},exports.addStoreBeingRead=Bt,exports.animatedIf=Ds,exports.animatedRouter=function(t,e={}){return Vn(Zn,{routes:t,options:e})},exports.animatedX=function(t,e,n){const{show:s,...i}=n;return Ds(s,b`<x-view .view=${t} .props=${e}></x-view>`,C,i)},exports.arrayRange=function(t,e,n){if(void 0===e&&(e=t,t=0),void 0===n&&(n=t<=e?1:-1),0===n)return[];const s=[];if(n>0)for(let i=t;i<e;i+=n)s.push(i);else for(let i=t;i>e;i+=n)s.push(i);return s},exports.assertComponentOuterContext=ee,exports.assertNotInRestrictedContext=te,exports.asyncAction=kn,exports.asyncAppend=_t,exports.asyncReplace=mt,exports.atom=bn,exports.attr=function(t){return js(t)},exports.blurInPreset=function(t=10,e=400,n="ease-out"){return{keyframes:[{filter:`blur(${t}px)`,opacity:0},{filter:"blur(0px)",opacity:1}],options:{duration:e,easing:n,fill:"both"}}},exports.blurOutPreset=function(t=10,e=400,n="ease-in"){return{keyframes:[{filter:"blur(0px)",opacity:1},{filter:`blur(${t}px)`,opacity:0}],options:{duration:e,easing:n,fill:"both"}}},exports.bouncePreset=function(t=600){return{keyframes:[{transform:"translateY(0)",offset:0},{transform:"translateY(-30%)",offset:.3},{transform:"translateY(0)",offset:.5},{transform:"translateY(-15%)",offset:.7},{transform:"translateY(0)",offset:.85},{transform:"translateY(-5%)",offset:.95},{transform:"translateY(0)",offset:1}],options:{duration:t,easing:"ease",fill:"both"}}},exports.buildPath=Kn,exports.buildRequestUrl=ps,exports.cacheAtom=function(t){const e=new Map,n=new Map,s=bn(e,t),i=s.get.bind(s),r=s;return r.add=(t,i,r)=>{if(n.has(t)&&(clearTimeout(n.get(t)),n.delete(t)),s.update(e=>{e.set(t,i)}),void 0!==r&&-1!==r&&r>0){const i=setTimeout(()=>{e.delete(t),n.delete(t),s.update(()=>{})},r);n.set(t,i)}},r.get=t=>(i(),e.get(t)),r.remove=t=>!!e.has(t)&&(n.has(t)&&(clearTimeout(n.get(t)),n.delete(t)),e.delete(t),s.update(()=>{}),!0),r.has=t=>(i(),e.has(t)),r.getAll=()=>(i(),Array.from(e.values())),r.clearAll=()=>{n.forEach(t=>clearTimeout(t)),n.clear(),e.clear(),s.update(()=>{})},Object.defineProperty(r,"size",{get:()=>(i(),e.size),enumerable:!0,configurable:!0}),Object.defineProperty(r,"name",{get:()=>"cacheAtom",enumerable:!0,configurable:!0}),Ae(s,r.clearAll),r},exports.cacheFn=An,exports.chunk=function(t,e){if(e<1)return[];const n=[];for(let s=0;s<t.length;s+=e)n.push(t.slice(s,s+e));return n},exports.clamp=function(t,e,n){return Math.min(Math.max(t,e),n)},exports.classMap=vt,exports.classes=function(t){return Us(t)},exports.cleanupScheduler=_e,exports.clearInterceptors=()=>{_s.clear(),gs.clear(),ys.clear()},exports.collapseWidthPreset=function(t=500,e="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{width:"auto",overflow:"hidden"},{width:"0",overflow:"hidden"}],options:{duration:t,easing:e,fill:"both"}}},exports.componentRunningStatus=Qt,exports.computeAutoPlacement=function(t,e,n,s){const i=window.innerHeight-t.bottom-s,r=t.top-s,o=window.innerWidth-t.right-s,a=t.left-s;return i>=n?"bottom":r>=n?"top":o>=e?"right":a>=e?"left":[["bottom",i],["top",r],["right",o],["left",a]].reduce((t,e)=>e[1]>t[1]?e:t)[0]},exports.configureCSS=function(t){t.breakpoints&&Object.assign(Ne,t.breakpoints)},exports.createCacheManager=An,exports.createManagedTimer=$n,exports.createPollingManager=Mn,exports.createReactiveRunner=vn,exports.createTimedAtom=Wi,exports.date=mo,exports.debounce=Pn,exports.debouncedAtom=(t,e,n)=>Wi(t,e,Pn,n),exports.deepClone=function t(e,n=new WeakMap){if("function"==typeof structuredClone)return structuredClone(e);if(null===e||"object"!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(e instanceof Map){const s=new Map;return n.set(e,s),e.forEach((e,i)=>s.set(t(i,n),t(e,n))),s}if(e instanceof Set){const s=new Set;return n.set(e,s),e.forEach(e=>s.add(t(e,n))),s}if(Array.isArray(e)){const s=[];n.set(e,s);for(let i=0;i<e.length;i++)s[i]=t(e[i],n);return s}const s=n.get(e);if(s)return s;const i={};n.set(e,i);for(const s of Object.keys(e))i[s]=t(e[s],n);return i},exports.deepFreeze=_n,exports.deleteAction=t=>ws.deleteAction(t),exports.df=_n,exports.dialog=function(t,e){return hr(t,e)},exports.effect=Ln,exports.effectScheduler=ge,exports.eleHook=Ns,exports.event=t=>{te("event");const e=t||Math.random().toString(36).substring(2,15),n=new ce;return{trigger:t=>{Nt(e,t),n.trigger(t)},__subscribe:t=>n.subscribe(t),name:e,__isEvent___:!0}},exports.expandWidthPreset=function(t=500,e="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{width:"0",overflow:"hidden"},{width:"auto",overflow:"hidden"}],options:{duration:t,easing:e,fill:"both"}}},exports.fadeInPreset=dn,exports.fadeOutPreset=fn,exports.fetchAction=t=>ws.fetchAction(t),exports.fetchClient=ws,exports.flipInPreset=function(t="y",e=500,n="ease-out"){const s="x"===t?"rotateX":"rotateY";return{keyframes:[{transform:`${s}(90deg)`,opacity:0},{transform:`${s}(0deg)`,opacity:1}],options:{duration:e,easing:n,fill:"both"}}},exports.flipOutPreset=function(t="y",e=500,n="ease-in"){const s="x"===t?"rotateX":"rotateY";return{keyframes:[{transform:`${s}(0deg)`,opacity:1},{transform:`${s}(90deg)`,opacity:0}],options:{duration:e,easing:n,fill:"both"}}},exports.formAtom=(t,e=[],n)=>Ji(t,e,n),exports.get=function(t,e,n){const s=e.replace(/\[(\d+)]/g,".$1").split(".");let i=t;for(const t of s){if(null==i)return n;i=i[t]}return void 0===i?n:i},exports.getAction=t=>ws.getAction(t),exports.getAllProps=er,exports.getAllTimezones=function(){let t;try{t=Intl.supportedValuesOf("timeZone")}catch{return[]}const e=Date.now();return t.map(t=>({name:t,longName:Gr(t,e),shortName:Xr(t,e),offset:qr(t,e)}))},exports.getCalendar=function(t,e){if(!Number.isInteger(t)||!Number.isInteger(e)||e<1||e>12)throw new RangeError("getCalendar(year, month): month must be integer 1–12");const n=mo({year:t,month:e,day:1}),{year:s,month:i,numberOfDaysOfTheMonth:r}=n.values,o=[];for(let t=Zr(n.valueOf(),Yr()).wd;t>0;t--)o.push(mo({year:s,month:i,day:1-t}));for(let t=1;t<=r;t++)o.push(mo({year:s,month:i,day:t}));const a=o.length%7,l=0===a?0:7-a,c=mo({year:s,month:i,day:r});for(let t=0;t<l;t++)c.add(1,"day"),o.push(mo(c.valueOf()));const h=[];for(let t=0;t<o.length;t+=7)h.push(o.slice(t,t+7));return h},exports.getCoords=function(t,e,n){switch(e){case"top":case"top-start":return{top:t.top-n,left:t.left};case"top-end":return{top:t.top-n,left:t.right};case"bottom":case"bottom-start":default:return{top:t.bottom+n,left:t.left};case"bottom-end":return{top:t.bottom+n,left:t.right};case"right":case"right-start":return{top:t.top,left:t.right+n};case"right-end":return{top:t.bottom,left:t.right+n};case"left":case"left-start":return{top:t.top,left:t.left-n};case"left-end":return{top:t.bottom,left:t.left-n}}},exports.getCurrentHost=de,exports.getLocale=function(){return Br()},exports.getMonths=function(t){const e=t??Br(),n=new Intl.DateTimeFormat(e,{month:"long",timeZone:"UTC"}),s=new Intl.DateTimeFormat(e,{month:"short",timeZone:"UTC"}),i=[];for(let t=1;t<=12;t++){const e=new Date(Date.UTC(2024,t-1,15,12,0,0));i.push({number:t,name:n.format(e),shortName:s.format(e)})}return i},exports.getParentScope=sr,exports.getScope=sr,exports.getStoresBeingRead=function(){return Vt},exports.getTimezoneOffset=function(){return Yr()},exports.globalCSS=ln,exports.globalScheduler=ye,exports.globalTheme=function(t){const e=Object.keys(t);if(0===e.length)throw new Error("[globalTheme] themes object must have at least one entry.");const n=e[0],s=e[1],i=t[n],r=[];r.push(Es(":root",i));for(const n of e)r.push(Es(`[data-theme="${n}"]`,t[n]));void 0!==s&&r.push(function(t){let e="";for(const n in t)e+=` ${Cs(n)}: ${t[n]};\n`;return e?`@media (prefers-color-scheme: dark) {\n :root:not([data-theme]) {\n${e} }\n}`:""}(t[s])),an();const o=on(),a=r.filter(Boolean).join("\n");a&&o.appendRules(a);const l=Object.create(null);for(const t in i)l[t]=Cs(t);return{cssVars:Object.freeze(l),themeAtom:Ss}},exports.groupBy=function(t,e){const n={};for(const s of t){const t=String(e(s));n[t]||(n[t]=[]),n[t].push(s)}return n},exports.guard=bt,exports.hashAtom=Qn,exports.html=b,exports.htmlHook=Vs,exports.iAtom=xn,exports.ifDefined=t=>t??C,exports.injectMatesAnimations=un,exports.installDevToolsHooks=function(t){t.registerComponent&&(It.registerComponent=t.registerComponent),t.unregisterComponent&&(It.unregisterComponent=t.unregisterComponent),t.notifyRender&&(It.notifyRender=t.notifyRender),t.getComponentName&&(It.getComponentName=t.getComponentName),t.logComponentMount&&(It.logComponentMount=t.logComponentMount),t.logComponentRender&&(It.logComponentRender=t.logComponentRender),t.logComponentUnmount&&(It.logComponentUnmount=t.logComponentUnmount),t.logAtomSet&&(It.logAtomSet=t.logAtomSet),t.logAtomUpdate&&(It.logAtomUpdate=t.logAtomUpdate),t.logEventTrigger&&(It.logEventTrigger=t.logEventTrigger),t.logCleanupEventTrigger&&(It.logCleanupEventTrigger=t.logCleanupEventTrigger),t.logFetchRequest&&(It.logFetchRequest=t.logFetchRequest),t.logFetchResponse&&(It.logFetchResponse=t.logFetchResponse),t.logFetchError&&(It.logFetchError=t.logFetchError),t.recordRender&&(It.recordRender=t.recordRender)},exports.interceptAfter=t=>ms(gs,t),exports.interceptBefore=t=>ms(_s,t),exports.interceptError=t=>ms(ys,t),exports.isAction=t=>"function"==typeof t&&!0===t.__isAction___&&"function"==typeof t.__subscribe,exports.isApiResponseSuccess=function(t){return t>=200&&t<300},exports.isAsyncAction=t=>"function"==typeof t&&!0===t.__isAsyncAction___&&"function"==typeof t.subscribe,exports.isAsyncFunction=Vi,exports.isAsyncValue=ke,exports.isAtom=Ui,exports.isChannel=t=>"object"==typeof t&&null!==t&&!0===t.__isChannel___&&"function"==typeof t.join,exports.isConfirmationEvent=t=>"object"==typeof t&&null!==t&&!0===t.__isConfirmationEvent___&&"function"==typeof t.requestConfirmation&&"function"==typeof t.onConfirmRequest,exports.isDefinedAsGetter=function(t,e){let n=Object.getOwnPropertyDescriptor(t,e),s=Object.getPrototypeOf(t);for(;!n&&s&&s!==Object.prototype;)n=Object.getOwnPropertyDescriptor(s,e),s=Object.getPrototypeOf(s);return n?.get&&"function"==typeof n.get?n.get:null},exports.isDevToolsInstalled=Ut,exports.isEffectRunning=Yt,exports.isEmail=t=>(t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t))(t)?null:"Invalid email",exports.isEmpty=tr,exports.isEvent=t=>"object"==typeof t&&null!==t&&!0===t.__isEvent___&&"function"==typeof t.__subscribe&&"function"==typeof t.trigger,exports.isFunction=Fi,exports.isGetter=t=>"function"==typeof t&&!0===t.__isSelector___&&"function"==typeof t.areVersionsChanged,exports.isInRestrictedContext=function(){return!Qt.isHookRunning&&(Qt.templateInProgress||Yt())},exports.isMax=t=>e=>((t,e)=>t<=e)(e,t)?null:`Max is ${t}`,exports.isMin=t=>e=>((t,e)=>t>=e)(e,t)?null:`Min is ${t}`,exports.isPathMatching=Gn,exports.isPattern=(t,e="Invalid format")=>n=>((t,e)=>e.test(t))(n,t)?null:e,exports.isReadTrackingEnabled=Ht,exports.isRequired=t=>(t=>"number"==typeof t||"boolean"==typeof t||!tr(t))(t)?null:"Required",exports.isSSR=pe,exports.isSetter=t=>"function"==typeof t&&!0===t.__isSetter___&&"function"==typeof t.__subscribe,exports.isUnit=t=>"object"==typeof t&&null!==t&&!0===t.__isUnit___&&"function"==typeof t.__subscribe&&"function"==typeof t.__reset,exports.iterateDeeply=function t(e,n){if(null==e||"object"!=typeof e)return;const s=Array.isArray(e)?e.map((t,e)=>e):Object.keys(e);for(const i of s){const s=n(i,e[i],e);void 0!==s&&(e[i]=s);const r=e[i];null!==r&&"object"==typeof r&&t(r,n)}},exports.join=
|
|
192
192
|
/**
|
|
193
193
|
* @license
|
|
194
194
|
* Copyright 2021 Google LLC
|
|
195
195
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
196
196
|
*/
|
|
197
|
-
function*(t,e){const n="function"==typeof e;if(void 0!==t){let s=-1;for(const i of t)s>-1&&(yield n?e(s):e),s++,yield i}},exports.keyed=xt,exports.keyframes=function(t,e){Je("keyframes"),an();const n=tn(t);return sn.appendRules(en(n,e)),n},exports.lazyLoad=function(t,e){return Hs(t,e)},exports.litCache=yt,exports.live=St,exports.location=os,exports.lockNavigation=()=>qn.set(!0),exports.logError=ne,exports.lsAtom=Xi,exports.mapAtom=(t=[],e)=>{const n=new Map(t),s=bn(n,e),i=n.set.bind(n);n.set=(t,e)=>(i(t,e),s.update(()=>{}),n);const r=n.delete.bind(n);n.delete=t=>{const e=r(t);return s.update(()=>{}),e};const o=n.clear.bind(n);n.clear=()=>{o(),s.update(()=>{})};const a=n.get.bind(n);n.get=t=>(s.get(),a(t));const l=n.has.bind(n);n.has=t=>(s.get(),l(t));const c=Object.getOwnPropertyDescriptor(Map.prototype,"size");Object.defineProperty(n,"size",{get:()=>(s.get(),c.get.call(n))});const h=n.entries.bind(n);n.entries=()=>(s.get(),h());const u=n.values.bind(n);n.values=()=>(s.get(),u());const d=n.keys.bind(n);n.keys=()=>(s.get(),d());const f=n.forEach.bind(n);n.forEach=(t,e)=>(s.get(),f(t,e));const p=n[Symbol.iterator].bind(n);return n[Symbol.iterator]=()=>(s.get(),p()),n.update=t=>{const e={set:(t,n)=>(i(t,n),e),delete:t=>r(t),clear:()=>{o()},get:t=>a(t),has:t=>l(t),entries:()=>h(),values:()=>u(),keys:()=>d(),forEach:(t,e)=>f(t,e),[Symbol.iterator]:()=>p(),get size(){return c.get.call(n)}};return t(e),s.update(()=>{}),n},n.updateItem=(t,e)=>{const i=a(t);return null==i||"object"!=typeof i||(e(i),s.update(()=>{})),n},Object.defineProperty(n,"__isAtom___",{value:s,writable:!1,enumerable:!1}),Object.defineProperty(n,"__version__",{get:()=>s.__version__,enumerable:!1}),n},exports.masonryGrid=function(t,e,n,s){return qs(t,e,n,s)},exports.maxLength=t=>e=>((t,e)=>t.length<=e)(e,t)?null:`Max ${t} characters`,exports.memo=function(t){let e;return vn({name:"Memo",fn:t,onRun:t=>{e?e.set(()=>t):(e=bn(void 0,{skipRestrictedContextCheck:!0}),e.set(()=>t,!0))}}),e},exports.memoTemplate=function(t,e){return Zs(t,e)},exports.merge=function t(e,...n){const s={...e};for(const e of n)for(const n of Object.keys(e))Qi(s[n])&&Qi(e[n])?s[n]=t(s[n],e[n]):s[n]=e[n];return s},exports.minLength=t=>e=>((t,e)=>t.length>=e)(e,t)?null:`Min ${t} characters`,exports.navigateTo=function(t,e,n){qn()||(e?window.history.replaceState(n,"",t):window.history.pushState(n,"",t),Xn.set(t))},exports.navigationLocked=qn,exports.noChange=S,exports.nothing=C,exports.omit=function(t,e){const n={...t};for(const t of e)delete n[t];return n},exports.on=Ee,exports.onAllMount=t=>{ve(),t.__isOnAllMount__=!0;const e=de();e.addToCleanUps(t,we),ye.onceIdle(()=>{if(!e.isConnected)return;const n=t();n&&e.addToCleanUps(t,n)})},exports.onBlur=t=>{
|
|
197
|
+
function*(t,e){const n="function"==typeof e;if(void 0!==t){let s=-1;for(const i of t)s>-1&&(yield n?e(s):e),s++,yield i}},exports.keyed=xt,exports.keyframes=function(t,e){Je("keyframes"),an();const n=tn(t);return sn.appendRules(en(n,e)),n},exports.lazyLoad=function(t,e){return Hs(t,e)},exports.litCache=yt,exports.live=St,exports.location=os,exports.lockNavigation=()=>qn.set(!0),exports.logError=ne,exports.lsAtom=Xi,exports.mapAtom=(t=[],e)=>{const n=new Map(t),s=bn(n,e),i=n.set.bind(n);n.set=(t,e)=>(i(t,e),s.update(()=>{}),n);const r=n.delete.bind(n);n.delete=t=>{const e=r(t);return s.update(()=>{}),e};const o=n.clear.bind(n);n.clear=()=>{o(),s.update(()=>{})};const a=n.get.bind(n);n.get=t=>(s.get(),a(t));const l=n.has.bind(n);n.has=t=>(s.get(),l(t));const c=Object.getOwnPropertyDescriptor(Map.prototype,"size");Object.defineProperty(n,"size",{get:()=>(s.get(),c.get.call(n))});const h=n.entries.bind(n);n.entries=()=>(s.get(),h());const u=n.values.bind(n);n.values=()=>(s.get(),u());const d=n.keys.bind(n);n.keys=()=>(s.get(),d());const f=n.forEach.bind(n);n.forEach=(t,e)=>(s.get(),f(t,e));const p=n[Symbol.iterator].bind(n);return n[Symbol.iterator]=()=>(s.get(),p()),n.update=t=>{const e={set:(t,n)=>(i(t,n),e),delete:t=>r(t),clear:()=>{o()},get:t=>a(t),has:t=>l(t),entries:()=>h(),values:()=>u(),keys:()=>d(),forEach:(t,e)=>f(t,e),[Symbol.iterator]:()=>p(),get size(){return c.get.call(n)}};return t(e),s.update(()=>{}),n},n.updateItem=(t,e)=>{const i=a(t);return null==i||"object"!=typeof i||(e(i),s.update(()=>{})),n},Object.defineProperty(n,"__isAtom___",{value:s,writable:!1,enumerable:!1}),Object.defineProperty(n,"__version__",{get:()=>s.__version__,enumerable:!1}),n},exports.masonryGrid=function(t,e,n,s){return qs(t,e,n,s)},exports.maxLength=t=>e=>((t,e)=>t.length<=e)(e,t)?null:`Max ${t} characters`,exports.memo=function(t){let e;return vn({name:"Memo",fn:t,onRun:t=>{e?e.set(()=>t):(e=bn(void 0,{skipRestrictedContextCheck:!0}),e.set(()=>t,!0))}}),e},exports.memoTemplate=function(t,e){return Zs(t,e)},exports.merge=function t(e,...n){const s={...e};for(const e of n)for(const n of Object.keys(e))Qi(s[n])&&Qi(e[n])?s[n]=t(s[n],e[n]):s[n]=e[n];return s},exports.minLength=t=>e=>((t,e)=>t.length>=e)(e,t)?null:`Min ${t} characters`,exports.navigateTo=function(t,e,n){qn()||(e?window.history.replaceState(n,"",t):window.history.pushState(n,"",t),Xn.set(t))},exports.navigationLocked=qn,exports.noChange=S,exports.nothing=C,exports.omit=function(t,e){const n={...t};for(const t of e)delete n[t];return n},exports.on=Ee,exports.onAllMount=t=>{ve(),t.__isOnAllMount__=!0;const e=de();e.addToCleanUps(t,we),ye.onceIdle(()=>{if(!e.isConnected)return;const n=t();n&&e.addToCleanUps(t,n)})},exports.onBlur=t=>{lr("blur",t)},exports.onCleanup=t=>{ve(),t.__isOnCleanup__=!0;de().addToCleanUps(t,t)},exports.onClickAway=t=>{if(pe())return;ve();const e=de(!0),n=n=>{const s=n.target;s&&!e.contains(s)&&t(n)};document.addEventListener("mousedown",n,!0),e.addToCleanUps(t,()=>{document.removeEventListener("mousedown",n,!0)})},exports.onConnect=function(t){return Ys(t)},exports.onCopy=t=>{lr("copy",t)},exports.onCut=t=>{lr("cut",t)},exports.onDOMReady=t=>{const e=de();if(!e)throw new Error("onDOMReady must be called within a component context");return e.DOMReadyEvent.__subscribe(t)},exports.onDisconnect=function(t){return Bs(t)},exports.onError=t=>{ve();const e=de();e._errorHandlers||(e._errorHandlers=[]),e._errorHandlers.push(t)},exports.onEvent=function(t){return ii(t)},exports.onFileDrop=t=>{if(pe())return;ve();const e=de();let n;const s=t=>t.preventDefault(),i=e=>{e.preventDefault(),n&&n(),n=t(e)};window.addEventListener("dragover",s),window.addEventListener("drop",i),e.addToCleanUps(t,()=>{window.removeEventListener("dragover",s),window.removeEventListener("drop",i),n&&n()})},exports.onFocus=t=>{lr("focus",t)},exports.onHidden=function(t,e){return Ws({onHidden:t,...e})},exports.onIntersect=function(t){return Ws(t)},exports.onInterval=(t,e)=>{if(pe())return;ve();const n=de();let s;const i=setInterval(()=>{s&&s(),s=t()},e);n.addToCleanUps(t,()=>{clearInterval(i),s&&s()})},exports.onKeyDown=t=>{lr("keydown",t)},exports.onKeyUp=t=>{lr("keyup",t)},exports.onMount=be,exports.onNavigate=t=>{if(pe())return;ve();const e=de();let n;const s=Xn.__subscribe(()=>{n&&n(),n=t(Xn.get())||null});e.addToCleanUps(t,()=>{s(),n&&n()})},exports.onOffline=t=>{lr("offline",t)},exports.onOnline=t=>{lr("online",t)},exports.onPaint=t=>{ve(),t.__isOnPaint__=!0;const e=de();e.addToCleanUps(t,we),e.PaintEvent.__subscribe(()=>t())},exports.onParent=function(t,e){return ri(t,e)},exports.onPaste=t=>{lr("paste",t)},exports.onReferenceChange=(t,e)=>{const n=de();if(ve(),!n)throw new Error("onReferenceChange must be called inside a component");let s=[];t(),s=e(),n.onEachUpdate(()=>{const n=e();s.some((t,e)=>t!==n[e])&&(t(),s=n)})},exports.onResize=(t,e)=>{if(pe())return;ve();const n=de();let s;const i=new ResizeObserver(e=>{for(const n of e)s&&s(),s=t(n)}),r=e||n;i.observe(r),n.addToCleanUps(t,()=>{i.disconnect(),s&&s()})},exports.onScroll=(t,e=window)=>{if(pe())return;ve();const n=de();let s;const i=e=>{s&&s(),s=t(e)};e.addEventListener("scroll",i,{passive:!0}),n.addToCleanUps(t,()=>{e.removeEventListener("scroll",i),s&&s()})},exports.onScrolledIntoView=function(t,e){return Hs(t,e)},exports.onSelectionChange=t=>{if(pe())return;ve();let e;or("selectionchange",()=>{e&&e(),e=t(window.getSelection())},de())},exports.onSocket=function(t,e){ve();const n=de(),s=e.map(e=>e.__subscribe(t));n.addToCleanUps(t,()=>{s.forEach(t=>t())})},exports.onStorageChange=t=>{lr("storage",t)},exports.onTimeout=(t,e)=>{if(pe())return;ve();const n=de();let s;const i=setTimeout(()=>{s=t()},e);n.addToCleanUps(t,()=>{clearTimeout(i),s&&s()})},exports.onUpdate=t=>{ve();const e=de();let n;e.onEachUpdate(()=>{n&&n(),n=t()}),e.addToCleanUps(t,()=>{n&&n()})},exports.onVisibilityChange=t=>{if(pe())return;ve();let e;or("visibilitychange",()=>{e&&e(),e=t(document.hidden)},de())},exports.onVisible=function(t,e){return Ws({onVisible:t,...e})},exports.onWindow=lr,exports.onWindowCapture=cr,exports.onWindowResize=t=>{lr("resize",t)},exports.onWindowScroll=t=>{cr("scroll",t)},exports.paginatedAsyncAction=function(t,e){const n=!!e?.allowInRestrictedContext,s=kn(t,e),i=bn(1,{skipRestrictedContextCheck:n}),r=bn(-1,{skipRestrictedContextCheck:n});return Object.assign(s,{page:i,totalPages:r,next:(...t)=>{if(!(-1!==r.val&&i.val>=r.val))return i.update(t=>t+1),s(...t)}})},exports.paginationAtom=(t=1,e)=>{const n=bn(t,e),s=n;return s.next=()=>{n.set(t=>t+1)},s.prev=()=>{n.set(t=>t>1?t-1:t)},s.reset=()=>{n.set(1)},Object.defineProperty(s,"currentPage",{get:()=>n.get(),enumerable:!1,configurable:!0}),Object.defineProperty(s,"name",{value:"paginationAtom",writable:!0,configurable:!0,enumerable:!1}),s},exports.patchAction=t=>ws.patchAction(t),exports.pathAtom=Xn,exports.pick=function(t,e){const n={};for(const s of e)s in t&&(n[s]=t[s]);return n},exports.placementTransform=function(t){return"top"===t||"top-start"===t||"top-end"===t?"translateY(-100%)":"left"===t||"left-start"===t||"left-end"===t?"translateX(-100%)":""},exports.popEffect=Xt,exports.popup=function(t,e){return dr(t,"string"==typeof e?{position:e}:e??{})},exports.portal=function(t,e){return fr(t,e)},exports.postAction=t=>ws.postAction(t),exports.pulsePreset=function(t=1.05,e=400){return{keyframes:[{transform:"scale(1)"},{transform:`scale(${t})`},{transform:"scale(1)"}],options:{duration:e,easing:"ease-in-out",fill:"both"}}},exports.pushEffect=qt,exports.putAction=t=>ws.putAction(t),exports.qsAtom=ss,exports.randomId=Nr,exports.range=
|
|
198
198
|
/**
|
|
199
199
|
* @license
|
|
200
200
|
* Copyright 2021 Google LLC
|
|
201
201
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
202
202
|
*/
|
|
203
|
-
function*(t,e,n=1){const s=void 0===e?0:t;e??=t;for(let t=s;n>0?t<e:e<t;t+=n)yield t},exports.ref=Un,exports.registerCleanup=Ae,exports.removeAttr=function(t){},exports.removeClasses=function(t){},exports.removeOn=function(t){ni.get(t)?.()},exports.removeStyle=function(t){},exports.render=U,exports.renderSwitch=function(t){for(const e of t){if(!Array.isArray(e))return e;{const[t,n]=e;if(t)return n}}return C},exports.renderTemplate=Bn,exports.renderX=Yn,exports.repeat=Et,exports.resetComponentState=me,exports.resolveAsyncValue=$e,exports.restoreTracking=Zt,exports.rootCSS=function(t){an();const e=on(),n=Es(":root",t);return n&&e.appendRules(n),t},exports.route=(t,{view:e})=>Gn(t)?e?Wn(e,{}):C:null,exports.safeSVG=Dr,exports.safetyCheck=ve,exports.saveAndEnableTracking=Gt,exports.scaleInPreset=function(t=0,e=300,n="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:`scale(${t})`,opacity:0},{transform:"scale(1)",opacity:1}],options:{duration:e,easing:n,fill:"both"}}},exports.scaleOutPreset=function(t=0,e=300,n="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:"scale(1)",opacity:1},{transform:`scale(${t})`,opacity:0}],options:{duration:e,easing:n,fill:"both"}}},exports.scope=nr,exports.setAtom=(t=[],e)=>{const n=new Set(t),s=bn(n,e),i=n.add.bind(n);n.add=t=>(i(t),s.update(()=>{}),n);const r=n.delete.bind(n);n.delete=t=>{const e=r(t);return s.update(()=>{}),e};const o=n.clear.bind(n);n.clear=()=>{o(),s.update(()=>{})};const a=n.has.bind(n);n.has=t=>(s.get(),a(t));const l=Object.getOwnPropertyDescriptor(Set.prototype,"size");Object.defineProperty(n,"size",{get:()=>(s.get(),l.get.call(n))});const c=n.entries.bind(n);n.entries=()=>(s.get(),c());const h=n.values.bind(n);n.values=()=>(s.get(),h());const u=n.keys.bind(n);n.keys=()=>(s.get(),u());const d=n.forEach.bind(n);n.forEach=(t,e)=>(s.get(),d(t,e));const f=n[Symbol.iterator].bind(n);return n[Symbol.iterator]=()=>(s.get(),f()),n.update=t=>{const e={add:t=>(i(t),e),delete:t=>r(t),clear:()=>{o()},has:t=>a(t),entries:()=>c(),values:()=>h(),keys:()=>u(),forEach:(t,e)=>d(t,e),[Symbol.iterator]:()=>f(),get size(){return l.get.call(n)}};return t(e),s.update(()=>{}),n},n.updateItem=(t,e)=>(null==t||"object"!=typeof t||(e(t),s.update(()=>{})),n),Object.defineProperty(n,"__isAtom___",{value:s,writable:!1,enumerable:!1}),Object.defineProperty(n,"__version__",{get:()=>s.__version__,enumerable:!1}),n},exports.setLocale=function(t){!function(t){Ur=t}(t??null)},exports.setRef=Fn,exports.setSSRApiLookup=function(t){as=t},exports.setSSRMode=function(t){fe=t},exports.setSSRRequest=function(t){ls=t},exports.setTimezone=function(t){null==t?(Fr(null),Vr(null)):(Fr(t.offset),Vr(t.name))},exports.setTimezoneOffset=function(t){Fr(t),Vr(null)},exports.setter=xe,exports.shakePreset=function(t=10,e=400){return{keyframes:[{transform:"translateX(0)"},{transform:`translateX(-${t}px)`},{transform:`translateX(${t}px)`},{transform:`translateX(-${t}px)`},{transform:`translateX(${t}px)`},{transform:"translateX(0)"}],options:{duration:e,easing:"ease-in-out",fill:"both"}}},exports.signal=xn,exports.slideInPreset=function(t="up",e,n=400,s="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:e?mn(t,e):pn[t],opacity:0},{transform:"translate(0, 0)",opacity:1}],options:{duration:n,easing:s,fill:"both"}}},exports.slideOutPreset=function(t="down",e,n=400,s="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:"translate(0, 0)",opacity:1},{transform:e?mn(t,e):pn[t],opacity:0}],options:{duration:n,easing:s,fill:"both"}}},exports.spinPreset=function(t=1,e=600,n="linear"){return{keyframes:[{transform:"rotate(0deg)"},{transform:`rotate(${360*t}deg)`}],options:{duration:e,easing:n,fill:"both"}}},exports.springInPreset=function(t=500,e="cubic-bezier(0.34, 1.56, 0.64, 1)"){return{keyframes:[{transform:"scale(0)",opacity:0},{transform:"scale(1)",opacity:1}],options:{duration:t,easing:e,fill:"both"}}},exports.ssAtom=Gi,exports.startTracking=Kt,exports.stopTracking=Jt,exports.style=function(t){return oi(t)},exports.styleMap=kt,exports.stylesheet=function(){Je("stylesheet");const t=new nn;return{css:function(e){Je("css");const n=[],s=Ve(e,n);return n.length>0&&t.appendRules(n.join("\n")),We(s)},mount:function(){if(function(t){if(Qt.templateInProgress)throw new Error(`[css-in-js] ${t}() must not be called inside a template function. Call it in the component outer function or at module level.`)}("mount"),null===de(!1))return t.mount(),()=>t.unmount();be(()=>(t.mount(),()=>t.unmount()))},keyframes:function(e,n){return Je("keyframes"),t.keyframes(e,n)}}},exports.superAtom=Sn,exports.svg=x,exports.taskAction=function(t){te("taskAction");const e=[];let n=0,s=1,i=!1;const r={skipRestrictedContextCheck:!0},o=bn([],r),a=bn("idle",r),l=bn(0,r);function c(){if(o.set([...e]),0===e.length)return void l.set(0);let t=0;for(const n of e)"running"===n.status?t+=.5:"pending"!==n.status&&(t+=1);l.set(Math.round(t/e.length*100))}function h(){if(i){const t=e.some(t=>"running"===t.status);return void(t||a.set("idle"))}if("running"!==a.get())return;const n=e.filter(t=>"running"===t.status).length,r=e.filter(t=>"pending"===t.status);if(0===r.length&&0===n)return void a.set("idle");const o=-1===s?r.length:Math.max(0,s-n);0!==o&&r.slice(0,o).forEach(e=>function(e){const n=new AbortController;e.status="running",e.abortController=n;const s=t(e.input,n.signal);if(s?.__isZeroPromise__){const t=s;e.abortController={signal:t.signal,abort:()=>{t.cancel()}}}c(),Promise.resolve(s).then(t=>{"cancelled"===e.status||(e.status="success",e.result.data=t),e.abortController=null,c(),h()}).catch(t=>{if("cancelled"===e.status||!0===e.abortController?.signal?.aborted)e.status="cancelled",e.abortController=null;else{const n=t instanceof Error?t:new Error(String(t));e.status="failed",e.result.error=n,e.abortController=null,ne(n,"taskAction")}c(),h()})}(e))}function u(t){return{id:++n,input:t,status:"pending",result:{data:null,error:null},abortController:null}}function d(t){const n=Array.isArray(t)?t:[t];for(const t of n)e.push(u(t));c(),"running"!==a.get()||i||h()}function f(t=1){"running"!==a.get()&&(s=t,i=!1,a.set("running"),h())}function p(){i=!0,function(){for(const t of e)"running"===t.status&&(t.status="cancelled",t.abortController?.abort(),t.abortController=null)}(),a.set("idle"),c()}function m(t){p(),e.length=0,n=0,c(),d(t)}const _={add:d,start:f,pause:function(){i||(i=!0)},stop:p,delete:function(t){const n=Array.isArray(t)?t:[t],s=new Set(n.map(t=>t.id));for(let t=e.length-1;t>=0;t--){const n=e[t];s.has(n.id)&&("running"===n.status&&(n.status="cancelled",n.abortController?.abort(),n.abortController=null),e.splice(t,1))}c(),"running"!==a.get()||i||h()},clearAndAdd:m,addAndStart:function(t,e=1){d(t),f(e)},clearAndStart:function(t,e=1){m(t),f(e)},isRunning:function(){return"running"===a.val},progress:l,tasks:o,pendingTasks:function(){return o.val.filter(t=>"pending"===t.status)},runningTasks:function(){return o.val.filter(t=>"running"===t.status)},successTasks:function(){return o.val.filter(t=>"success"===t.status)},failedTasks:function(){return o.val.filter(t=>"failed"===t.status)},cancelledTasks:function(){return o.val.filter(t=>"cancelled"===t.status)},__isTaskAction__:!0};return Ae(_,p),_},exports.template=Hn,exports.themeAtom=Ss,exports.throttle=zn,exports.throttledAtom=(t,e,n)=>Wi(t,e,zn,n),exports.timer=function(t,e){return ai(t,e)},exports.tip=Cr,exports.titleAtom=Zi,exports.tooltip=Sr,exports.trackAndSubscribe=gn,exports.uniqBy=function(t,e){const n=new Set,s=[];for(const i of t){const t=e(i);n.has(t)||(n.add(t),s.push(i))}return s},exports.unlockNavigation=()=>qn.set(!1),exports.unsafeHTML=Tt,exports.unsafeSVG=Dr,exports.until=Pt,exports.unwrapModule=Te,exports.useContext=function(t){let e=null;const n=new CustomEvent("request-context",{bubbles:!0,composed:!0,detail:{context:t,resolve(t=null){e=t}}});return de().dispatchEvent(n),e},exports.useScope=nr,exports.useState=t=>{const e=de();if("object"!=typeof t||null===t)throw new Error("stateObj must be an object");const n=bn(t),s=((t,e,n)=>{const s=er(t);s.forEach(s=>{const i=ir(t,s);if(i?.get){let n,r=-1;const o=i.get;Object.defineProperty(t,s,{get(){const s=e.__version__;return s!==r&&(r=s,n=o.call(t)),n},configurable:!0,enumerable:i.enumerable})}else if(Fi(t[s])){if(Vi(t[s]))throw new Error(`Async functions are not supported inside ${n}`);const i=t[s];t[s]=(...n)=>{e.update(()=>i.apply(t,n))}}});const i=Object.create(t);return s.forEach(n=>{const s=ir(t,n);if(!s)return;const r=!!s.get,o=!r&&Fi(s.value);r||o||Object.defineProperty(i,n,{get:()=>e()[n],set(t){e.update(e=>{e[n]=t})},enumerable:!0,configurable:!0})}),i})(t,n,"useState");return e?._useStates&&e._useStates.push({state:t,atom:n}),[s,n.update]},exports.useStore=function(t){return Ce(t,!0),t},exports.uuid=Lr,exports.validateAll=function(t){const e=[],n={},s=new WeakSet;return function t(i,r){if(null==i)return;const o=typeof i;if("object"!==o&&"function"!==o)return;if(s.has(i))return;if(s.add(i),function(t){if(null==t)return!1;const e=typeof t;return("object"===e||"function"===e)&&!0===t.__isFormAtom__}(i)){const t=i.validate();return void(t.length>0&&(e.push(...t),n[r]=t))}if(Array.isArray(i)){for(let e=0;e<i.length;e++){const n=r?`${r}[${e}]`:`[${e}]`;t(i[e],n)}return}const a=Object.keys(i);for(const e of a){const n=r?`${r}.${e}`:e;t(i[e],n)}}(t,""),{isValid:0===e.length,errors:e,errorsByField:n}},exports.validateReactiveFunction=yn,exports.view=Wn,exports.virtualGrid=function(t,e,n,s){const{keyFn:i,template:r,opts:o}=ji(e,n,s),a={direction:o.direction??"vertical",itemSize:{width:o.itemWidth,height:o.itemHeight},gap:o.gap??"8px",flex:o.flex??!1,...o.pin?{pin:o.pin}:{}};return Ni({items:t,renderItem:r,keyFunction:i,scroller:o.scroller,layout:(l=a,Object.assign({type:Si},l))});var l},exports.virtualList=function(t,e,n,s){const{keyFn:i,template:r,opts:o}=ji(e,n,s),a={direction:o?.direction??"vertical",...o?.pin?{pin:o.pin}:{}};return Ni({items:t,renderItem:r,keyFunction:i,scroller:o?.scroller,layout:di(a)})},exports.virtualMasonry=function(t,e,n,s){const{keyFn:i,template:r,opts:o}=ji(e,n,s),a={direction:o.direction??"vertical",getAspectRatio:o.getAspectRatio,gap:o.gap??"8px",flex:!0,...o.itemSize?{itemSize:o.itemSize}:{},...o.pin?{pin:o.pin}:{}};return Ni({items:t,renderItem:r,keyFunction:i,scroller:o.scroller,layout:(l=a,Object.assign({type:Ei},l))});var l},exports.watch=Ee,exports.when=function(t,e,n){return t?e(t):n?.(t)},exports.withHost=ue,exports.withStaggerPreset=function(t,e,n=50){return{keyframes:t.keyframes,options:{...t.options,delay:(t.options.delay??0)+e*n}}},exports.ws=function(t,e={}){ee("ws");const{reconnect:n=!0,reconnectDelay:s=Er,reconnectMaxDelay:i=Ar,reconnectMaxAttempts:r=Mr,protocols:o,auth:a,autoConnect:l=!0}=e,c=bn("connecting",{skipRestrictedContextCheck:!0}),h=new Set;let u=null,d=0,f=s,p=null,m=!1;const _=[];function g(){null!==p&&(clearTimeout(p),p=null)}function y(){let e;m=!1,g(),c.set("connecting");try{e=function(){if(!a)return t;const e=a(),n=Object.entries(e);if(0===n.length)return t;const s=n.map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&");return t.includes("?")?`${t}&${s}`:`${t}?${s}`}()}catch(t){return ne(t),void c.set("error")}try{u=o?new WebSocket(e,o):new WebSocket(e)}catch(t){return ne(t),c.set("error"),void v()}u.onopen=()=>{m?u?.close():(d=0,f=s,c.set("connected"),function(){for(;_.length>0;){const t=_.shift();u?.readyState===WebSocket.OPEN&&u.send(t)}}())},u.onmessage=t=>{if(m)return;const e="string"==typeof t.data?t.data:String(t.data);let n;try{n=JSON.parse(e)}catch{n=e}var s;s=n,h.forEach(t=>{try{t(s)}catch(t){ne(t)}})},u.onerror=()=>{c.set("error")},u.onclose=()=>{m||(c.set("disconnected"),v())}}function v(){if(!n||m)return;if(d>=r)return;d++;const t=f;f=Math.min(2*f,i),p=setTimeout(()=>{m||y()},t)}function w(){m=!0,g(),u&&(u.onopen=null,u.onmessage=null,u.onerror=null,u.onclose=null,u.readyState!==WebSocket.OPEN&&u.readyState!==WebSocket.CONNECTING||u.close(1e3,"client disconnect"),u=null),c.set("disconnected"),h.clear(),_.length=0}const b={send:function(t){const e="string"==typeof t?t:JSON.stringify(t);u?.readyState===WebSocket.OPEN?u.send(e):_.push(e)},__subscribe:function(t){return h.add(t),()=>h.delete(t)},status:c,connect:y,disconnect:w,__isWs___:!0};return l?y():c.set("disconnected"),Ae(b,w),b},exports.x=Vn,exports.xTabEvent=t=>{te("xTabEvent");const e=new Set,n=n=>{e.forEach(e=>{try{e(n)}catch(e){ne(e,`xTabEvent(${t}) handler`)}})},s="undefined"!=typeof BroadcastChannel?new BroadcastChannel(t):null;s&&(s.onmessage=t=>{n(t.data)});return{trigger:e=>{if(Nt(t,e),s)try{s.postMessage(e)}catch(e){ne(e,`xTabEvent(${t}) postMessage`)}n(e)},__subscribe:t=>{e.add(t);const n=()=>{e.delete(t)};return Ae(t,n),n},close:()=>{s&&s.close()},name:t,__isEvent___:!0,__isXTabEvent___:!0}};
|
|
203
|
+
function*(t,e,n=1){const s=void 0===e?0:t;e??=t;for(let t=s;n>0?t<e:e<t;t+=n)yield t},exports.ref=Un,exports.registerCleanup=Ae,exports.removeAttr=function(t){},exports.removeClasses=function(t){},exports.removeOn=function(t){ni.get(t)?.()},exports.removeStyle=function(t){},exports.render=U,exports.renderSwitch=function(t){for(const e of t){if(!Array.isArray(e))return e;{const[t,n]=e;if(t)return n}}return C},exports.renderTemplate=Bn,exports.renderX=Yn,exports.repeat=Et,exports.resetComponentState=me,exports.resolveAsyncValue=$e,exports.restoreTracking=Zt,exports.rootCSS=function(t){an();const e=on(),n=Es(":root",t);return n&&e.appendRules(n),t},exports.route=(t,{view:e})=>Gn(t)?e?Wn(e,{}):C:null,exports.safeSVG=Lr,exports.safetyCheck=ve,exports.saveAndEnableTracking=Gt,exports.scaleInPreset=function(t=0,e=300,n="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:`scale(${t})`,opacity:0},{transform:"scale(1)",opacity:1}],options:{duration:e,easing:n,fill:"both"}}},exports.scaleOutPreset=function(t=0,e=300,n="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:"scale(1)",opacity:1},{transform:`scale(${t})`,opacity:0}],options:{duration:e,easing:n,fill:"both"}}},exports.scope=nr,exports.setAtom=(t=[],e)=>{const n=new Set(t),s=bn(n,e),i=n.add.bind(n);n.add=t=>(i(t),s.update(()=>{}),n);const r=n.delete.bind(n);n.delete=t=>{const e=r(t);return s.update(()=>{}),e};const o=n.clear.bind(n);n.clear=()=>{o(),s.update(()=>{})};const a=n.has.bind(n);n.has=t=>(s.get(),a(t));const l=Object.getOwnPropertyDescriptor(Set.prototype,"size");Object.defineProperty(n,"size",{get:()=>(s.get(),l.get.call(n))});const c=n.entries.bind(n);n.entries=()=>(s.get(),c());const h=n.values.bind(n);n.values=()=>(s.get(),h());const u=n.keys.bind(n);n.keys=()=>(s.get(),u());const d=n.forEach.bind(n);n.forEach=(t,e)=>(s.get(),d(t,e));const f=n[Symbol.iterator].bind(n);return n[Symbol.iterator]=()=>(s.get(),f()),n.update=t=>{const e={add:t=>(i(t),e),delete:t=>r(t),clear:()=>{o()},has:t=>a(t),entries:()=>c(),values:()=>h(),keys:()=>u(),forEach:(t,e)=>d(t,e),[Symbol.iterator]:()=>f(),get size(){return l.get.call(n)}};return t(e),s.update(()=>{}),n},n.updateItem=(t,e)=>(null==t||"object"!=typeof t||(e(t),s.update(()=>{})),n),Object.defineProperty(n,"__isAtom___",{value:s,writable:!1,enumerable:!1}),Object.defineProperty(n,"__version__",{get:()=>s.__version__,enumerable:!1}),n},exports.setLocale=function(t){!function(t){Fr=t}(t??null)},exports.setRef=Fn,exports.setSSRApiLookup=function(t){as=t},exports.setSSRMode=function(t){fe=t},exports.setSSRRequest=function(t){ls=t},exports.setTimezone=function(t){null==t?(Vr(null),Wr(null)):(Vr(t.offset),Wr(t.name))},exports.setTimezoneOffset=function(t){Vr(t),Wr(null)},exports.setter=xe,exports.shakePreset=function(t=10,e=400){return{keyframes:[{transform:"translateX(0)"},{transform:`translateX(-${t}px)`},{transform:`translateX(${t}px)`},{transform:`translateX(-${t}px)`},{transform:`translateX(${t}px)`},{transform:"translateX(0)"}],options:{duration:e,easing:"ease-in-out",fill:"both"}}},exports.signal=xn,exports.slideInPreset=function(t="up",e,n=400,s="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:e?mn(t,e):pn[t],opacity:0},{transform:"translate(0, 0)",opacity:1}],options:{duration:n,easing:s,fill:"both"}}},exports.slideOutPreset=function(t="down",e,n=400,s="cubic-bezier(0.4, 0, 0.2, 1)"){return{keyframes:[{transform:"translate(0, 0)",opacity:1},{transform:e?mn(t,e):pn[t],opacity:0}],options:{duration:n,easing:s,fill:"both"}}},exports.spinPreset=function(t=1,e=600,n="linear"){return{keyframes:[{transform:"rotate(0deg)"},{transform:`rotate(${360*t}deg)`}],options:{duration:e,easing:n,fill:"both"}}},exports.springInPreset=function(t=500,e="cubic-bezier(0.34, 1.56, 0.64, 1)"){return{keyframes:[{transform:"scale(0)",opacity:0},{transform:"scale(1)",opacity:1}],options:{duration:t,easing:e,fill:"both"}}},exports.ssAtom=Gi,exports.startTracking=Kt,exports.stopTracking=Jt,exports.store=t=>{if("object"!=typeof t||null===t)throw new Error("initial state must be an object");const e=bn(t),n=rr(t,e,"store");return()=>[n,e.update]},exports.style=function(t){return oi(t)},exports.styleMap=kt,exports.stylesheet=function(){Je("stylesheet");const t=new nn;return{css:function(e){Je("css");const n=[],s=Ve(e,n);return n.length>0&&t.appendRules(n.join("\n")),We(s)},mount:function(){if(function(t){if(Qt.templateInProgress)throw new Error(`[css-in-js] ${t}() must not be called inside a template function. Call it in the component outer function or at module level.`)}("mount"),null===de(!1))return t.mount(),()=>t.unmount();be(()=>(t.mount(),()=>t.unmount()))},keyframes:function(e,n){return Je("keyframes"),t.keyframes(e,n)}}},exports.superAtom=Sn,exports.svg=x,exports.taskAction=function(t){te("taskAction");const e=[];let n=0,s=1,i=!1;const r={skipRestrictedContextCheck:!0},o=bn([],r),a=bn("idle",r),l=bn(0,r);function c(){if(o.set([...e]),0===e.length)return void l.set(0);let t=0;for(const n of e)"running"===n.status?t+=.5:"pending"!==n.status&&(t+=1);l.set(Math.round(t/e.length*100))}function h(){if(i){const t=e.some(t=>"running"===t.status);return void(t||a.set("idle"))}if("running"!==a.get())return;const n=e.filter(t=>"running"===t.status).length,r=e.filter(t=>"pending"===t.status);if(0===r.length&&0===n)return void a.set("idle");const o=-1===s?r.length:Math.max(0,s-n);0!==o&&r.slice(0,o).forEach(e=>function(e){const n=new AbortController;e.status="running",e.abortController=n;const s=t(e.input,n.signal);if(s?.__isZeroPromise__){const t=s;e.abortController={signal:t.signal,abort:()=>{t.cancel()}}}c(),Promise.resolve(s).then(t=>{"cancelled"===e.status||(e.status="success",e.result.data=t),e.abortController=null,c(),h()}).catch(t=>{if("cancelled"===e.status||!0===e.abortController?.signal?.aborted)e.status="cancelled",e.abortController=null;else{const n=t instanceof Error?t:new Error(String(t));e.status="failed",e.result.error=n,e.abortController=null,ne(n,"taskAction")}c(),h()})}(e))}function u(t){return{id:++n,input:t,status:"pending",result:{data:null,error:null},abortController:null}}function d(t){const n=Array.isArray(t)?t:[t];for(const t of n)e.push(u(t));c(),"running"!==a.get()||i||h()}function f(t=1){"running"!==a.get()&&(s=t,i=!1,a.set("running"),h())}function p(){i=!0,function(){for(const t of e)"running"===t.status&&(t.status="cancelled",t.abortController?.abort(),t.abortController=null)}(),a.set("idle"),c()}function m(t){p(),e.length=0,n=0,c(),d(t)}const _={add:d,start:f,pause:function(){i||(i=!0)},stop:p,delete:function(t){const n=Array.isArray(t)?t:[t],s=new Set(n.map(t=>t.id));for(let t=e.length-1;t>=0;t--){const n=e[t];s.has(n.id)&&("running"===n.status&&(n.status="cancelled",n.abortController?.abort(),n.abortController=null),e.splice(t,1))}c(),"running"!==a.get()||i||h()},clearAndAdd:m,addAndStart:function(t,e=1){d(t),f(e)},clearAndStart:function(t,e=1){m(t),f(e)},isRunning:function(){return"running"===a.val},progress:l,tasks:o,pendingTasks:function(){return o.val.filter(t=>"pending"===t.status)},runningTasks:function(){return o.val.filter(t=>"running"===t.status)},successTasks:function(){return o.val.filter(t=>"success"===t.status)},failedTasks:function(){return o.val.filter(t=>"failed"===t.status)},cancelledTasks:function(){return o.val.filter(t=>"cancelled"===t.status)},__isTaskAction__:!0};return Ae(_,p),_},exports.template=Hn,exports.themeAtom=Ss,exports.throttle=zn,exports.throttledAtom=(t,e,n)=>Wi(t,e,zn,n),exports.timer=function(t,e){return ai(t,e)},exports.tip=Er,exports.titleAtom=Zi,exports.tooltip=Cr,exports.trackAndSubscribe=gn,exports.uniqBy=function(t,e){const n=new Set,s=[];for(const i of t){const t=e(i);n.has(t)||(n.add(t),s.push(i))}return s},exports.unlockNavigation=()=>qn.set(!1),exports.unsafeHTML=Tt,exports.unsafeSVG=Lr,exports.until=Pt,exports.unwrapModule=Te,exports.useContext=function(t){let e=null;const n=new CustomEvent("request-context",{bubbles:!0,composed:!0,detail:{context:t,resolve(t=null){e=t}}});return de().dispatchEvent(n),e},exports.useScope=nr,exports.useState=t=>{const e=de();if("object"!=typeof t||null===t)throw new Error("stateObj must be an object");const n=bn(t),s=rr(t,n,"useState");return e?._useStates&&e._useStates.push({state:t,atom:n}),[s,n.update]},exports.useStore=function(t){return Ce(t,!0),t},exports.uuid=Nr,exports.validateAll=function(t){const e=[],n={},s=new WeakSet;return function t(i,r){if(null==i)return;const o=typeof i;if("object"!==o&&"function"!==o)return;if(s.has(i))return;if(s.add(i),function(t){if(null==t)return!1;const e=typeof t;return("object"===e||"function"===e)&&!0===t.__isFormAtom__}(i)){const t=i.validate();return void(t.length>0&&(e.push(...t),n[r]=t))}if(Array.isArray(i)){for(let e=0;e<i.length;e++){const n=r?`${r}[${e}]`:`[${e}]`;t(i[e],n)}return}const a=Object.keys(i);for(const e of a){const n=r?`${r}.${e}`:e;t(i[e],n)}}(t,""),{isValid:0===e.length,errors:e,errorsByField:n}},exports.validateReactiveFunction=yn,exports.view=Wn,exports.virtualGrid=function(t,e,n,s){const{keyFn:i,template:r,opts:o}=ji(e,n,s),a={direction:o.direction??"vertical",itemSize:{width:o.itemWidth,height:o.itemHeight},gap:o.gap??"8px",flex:o.flex??!1,...o.pin?{pin:o.pin}:{}};return Ni({items:t,renderItem:r,keyFunction:i,scroller:o.scroller,layout:(l=a,Object.assign({type:Si},l))});var l},exports.virtualList=function(t,e,n,s){const{keyFn:i,template:r,opts:o}=ji(e,n,s),a={direction:o?.direction??"vertical",...o?.pin?{pin:o.pin}:{}};return Ni({items:t,renderItem:r,keyFunction:i,scroller:o?.scroller,layout:di(a)})},exports.virtualMasonry=function(t,e,n,s){const{keyFn:i,template:r,opts:o}=ji(e,n,s),a={direction:o.direction??"vertical",getAspectRatio:o.getAspectRatio,gap:o.gap??"8px",flex:!0,...o.itemSize?{itemSize:o.itemSize}:{},...o.pin?{pin:o.pin}:{}};return Ni({items:t,renderItem:r,keyFunction:i,scroller:o.scroller,layout:(l=a,Object.assign({type:Ei},l))});var l},exports.watch=Ee,exports.when=function(t,e,n){return t?e(t):n?.(t)},exports.withHost=ue,exports.withStaggerPreset=function(t,e,n=50){return{keyframes:t.keyframes,options:{...t.options,delay:(t.options.delay??0)+e*n}}},exports.ws=function(t,e={}){ee("ws");const{reconnect:n=!0,reconnectDelay:s=Ar,reconnectMaxDelay:i=Mr,reconnectMaxAttempts:r=kr,protocols:o,auth:a,autoConnect:l=!0}=e,c=bn("connecting",{skipRestrictedContextCheck:!0}),h=new Set;let u=null,d=0,f=s,p=null,m=!1;const _=[];function g(){null!==p&&(clearTimeout(p),p=null)}function y(){let e;m=!1,g(),c.set("connecting");try{e=function(){if(!a)return t;const e=a(),n=Object.entries(e);if(0===n.length)return t;const s=n.map(([t,e])=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&");return t.includes("?")?`${t}&${s}`:`${t}?${s}`}()}catch(t){return ne(t),void c.set("error")}try{u=o?new WebSocket(e,o):new WebSocket(e)}catch(t){return ne(t),c.set("error"),void v()}u.onopen=()=>{m?u?.close():(d=0,f=s,c.set("connected"),function(){for(;_.length>0;){const t=_.shift();u?.readyState===WebSocket.OPEN&&u.send(t)}}())},u.onmessage=t=>{if(m)return;const e="string"==typeof t.data?t.data:String(t.data);let n;try{n=JSON.parse(e)}catch{n=e}var s;s=n,h.forEach(t=>{try{t(s)}catch(t){ne(t)}})},u.onerror=()=>{c.set("error")},u.onclose=()=>{m||(c.set("disconnected"),v())}}function v(){if(!n||m)return;if(d>=r)return;d++;const t=f;f=Math.min(2*f,i),p=setTimeout(()=>{m||y()},t)}function w(){m=!0,g(),u&&(u.onopen=null,u.onmessage=null,u.onerror=null,u.onclose=null,u.readyState!==WebSocket.OPEN&&u.readyState!==WebSocket.CONNECTING||u.close(1e3,"client disconnect"),u=null),c.set("disconnected"),h.clear(),_.length=0}const b={send:function(t){const e="string"==typeof t?t:JSON.stringify(t);u?.readyState===WebSocket.OPEN?u.send(e):_.push(e)},__subscribe:function(t){return h.add(t),()=>h.delete(t)},status:c,connect:y,disconnect:w,__isWs___:!0};return l?y():c.set("disconnected"),Ae(b,w),b},exports.x=Vn,exports.xTabEvent=t=>{te("xTabEvent");const e=new Set,n=n=>{e.forEach(e=>{try{e(n)}catch(e){ne(e,`xTabEvent(${t}) handler`)}})},s="undefined"!=typeof BroadcastChannel?new BroadcastChannel(t):null;s&&(s.onmessage=t=>{n(t.data)});return{trigger:e=>{if(Nt(t,e),s)try{s.postMessage(e)}catch(e){ne(e,`xTabEvent(${t}) postMessage`)}n(e)},__subscribe:t=>{e.add(t);const n=()=>{e.delete(t)};return Ae(t,n),n},close:()=>{s&&s.close()},name:t,__isEvent___:!0,__isXTabEvent___:!0}};
|
|
204
204
|
//# sourceMappingURL=index.esm.js.map
|