native-document 1.0.166 → 1.0.168
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/.vitepress/config.js +166 -0
- package/CHANGELOG.md +153 -0
- package/components.js +2 -1
- package/dist/native-document.components.min.js +495 -228
- package/dist/native-document.dev.js +7 -0
- package/dist/native-document.dev.js.map +1 -1
- package/dist/native-document.min.js +1 -1
- package/docs/advanced-components.md +213 -608
- package/docs/anchor.md +173 -312
- package/docs/cache.md +95 -803
- package/docs/cli.md +179 -0
- package/docs/components/accordion.md +172 -0
- package/docs/components/alert.md +99 -0
- package/docs/components/avatar.md +160 -0
- package/docs/components/badge.md +102 -0
- package/docs/components/breadcrumb.md +89 -0
- package/docs/components/button.md +183 -0
- package/docs/components/card.md +69 -0
- package/docs/components/context-menu.md +118 -0
- package/docs/components/data-table.md +345 -0
- package/docs/components/dropdown.md +214 -0
- package/docs/components/form/autocomplete-field.md +81 -0
- package/docs/components/form/checkbox-field.md +41 -0
- package/docs/components/form/checkbox-group-field.md +54 -0
- package/docs/components/form/color-field.md +64 -0
- package/docs/components/form/date-field.md +92 -0
- package/docs/components/form/field-collection.md +63 -0
- package/docs/components/form/file-field.md +203 -0
- package/docs/components/form/form-control.md +87 -0
- package/docs/components/form/image-field.md +90 -0
- package/docs/components/form/index.md +115 -0
- package/docs/components/form/number-field.md +65 -0
- package/docs/components/form/radio-field.md +51 -0
- package/docs/components/form/select-field.md +123 -0
- package/docs/components/form/slider.md +136 -0
- package/docs/components/form/string-field.md +134 -0
- package/docs/components/form/textarea-field.md +65 -0
- package/docs/components/form-fields.md +372 -0
- package/docs/components/getting-started.md +264 -0
- package/docs/components/index.md +337 -0
- package/docs/components/layout.md +279 -0
- package/docs/components/list.md +73 -0
- package/docs/components/menu.md +215 -0
- package/docs/components/modal.md +156 -0
- package/docs/components/pagination.md +95 -0
- package/docs/components/popover.md +131 -0
- package/docs/components/progress.md +111 -0
- package/docs/components/shortcut-manager.md +221 -0
- package/docs/components/simple-table.md +107 -0
- package/docs/components/skeleton.md +155 -0
- package/docs/components/spinner.md +100 -0
- package/docs/components/splitter.md +133 -0
- package/docs/components/stepper.md +163 -0
- package/docs/components/switch.md +113 -0
- package/docs/components/tabs.md +153 -0
- package/docs/components/toast.md +119 -0
- package/docs/components/tooltip.md +151 -0
- package/docs/components/traits.md +261 -0
- package/docs/conditional-rendering.md +170 -588
- package/docs/contributing.md +300 -25
- package/docs/core-concepts.md +205 -374
- package/docs/elements.md +251 -367
- package/docs/extending-native-document-element.md +192 -207
- package/docs/filters.md +153 -1122
- package/docs/getting-started.md +193 -267
- package/docs/i18n.md +241 -0
- package/docs/index.md +76 -0
- package/docs/lifecycle-events.md +143 -75
- package/docs/list-rendering.md +227 -852
- package/docs/memory-management.md +134 -47
- package/docs/native-document-element.md +337 -186
- package/docs/native-fetch.md +99 -630
- package/docs/observable-resource.md +364 -0
- package/docs/observables.md +592 -526
- package/docs/routing.md +244 -653
- package/docs/state-management.md +134 -241
- package/docs/svg-elements.md +231 -0
- package/docs/theming.md +409 -0
- package/docs/tutorials/.gitkeep +0 -0
- package/docs/validation.md +95 -97
- package/docs/vitepress-conventions.md +219 -0
- package/package.json +34 -13
- package/readme.md +269 -89
- package/src/components/card/Card.js +93 -39
- package/src/components/card/index.js +1 -1
- package/src/components/list/HasListItem.js +171 -0
- package/src/components/list/List.js +41 -107
- package/src/components/list/ListDivider.js +39 -0
- package/src/components/list/ListGroup.js +76 -59
- package/src/components/list/ListItem.js +117 -69
- package/src/components/list/index.js +3 -1
- package/src/components/list/types/ListItem.d.ts +45 -34
- package/src/components/spacer/Spacer.js +1 -1
- package/src/core/data/ObservableResource.js +5 -0
- package/src/core/data/observable-helpers/observable.prototypes.js +2 -0
- package/src/ui/components/card/CardRender.js +133 -0
- package/src/ui/components/card/card.css +169 -0
- package/src/ui/components/contextmenu/ContextmenuRender.js +1 -1
- package/src/ui/components/list/ListRender.js +18 -0
- package/src/ui/components/list/divider/ListDividerRender.js +10 -0
- package/src/ui/components/list/divider/list-divider.css +12 -0
- package/src/ui/components/list/group/ListGroupRender.js +61 -0
- package/src/ui/components/list/group/list-group.css +62 -0
- package/src/ui/components/list/item/ListItemRender.js +238 -0
- package/src/ui/components/list/item/list-item.css +191 -0
- package/src/ui/components/list/list.css +24 -0
- package/src/ui/components/spacer/SpacerRender.js +10 -0
- package/src/ui/index.js +8 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var NativeDocument=function(e){"use strict";let t={};t={log(){},warn(){},error(){},disable(){}};var n=t;class r extends Error{constructor(e,t={}){super(e),this.name="NativeDocumentError",this.context=t,this.timestamp=(new Date).toISOString()}}const o=3,s=8,i=11,a=[];a[1]=!0,a[o]=!0,a[i]=!0,a[s]=!0;const l={isObservable:e=>e&&(e.__$isObservable||e.__$Observable),isTemplateBinding:e=>e?.__$isTemplateBinding,isObservableWhenResult:e=>e&&(e.__$isObservableWhen||"object"==typeof e&&"$target"in e&&"$observer"in e),isArrayObservable:e=>e?.__$isObservableArray,isProxy:e=>e?.__isProxy__,isObservableOrProxy:e=>e?.__$Observable,isAnchor:e=>e?.__Anchor__,isObservableChecker:e=>e?.__$isObservableChecker,isArray:e=>Array.isArray(e),isString:e=>"string"==typeof e,isNumber:e=>"number"==typeof e,isBoolean:e=>"boolean"==typeof e,isFunction:e=>"function"==typeof e,isAsyncFunction:e=>"function"==typeof e&&"AsyncFunction"===e.constructor.name,isObject:e=>"object"==typeof e&&null!==e,isJson:e=>!("object"!=typeof e||null===e||Array.isArray(e)||"Object"!==e.constructor.name),isElement:e=>e&&a[e.nodeType],isDOMNode:e=>a[e.nodeType],isFragment:e=>e?.nodeType===i,isStringOrObservable(e){return this.isString(e)||this.isObservable(e)},isValidChild(e){return null===e||this.isElement(e)||e.__$Observable||e?.__$isNDElement||["string","number","boolean"].includes(typeof e)},isNDElement:e=>e?.__$isNDElement,isValidChildren(e){Array.isArray(e)||(e=[e]);return 0===e.filter(e=>!this.isValidChild(e)).length},validateChildren(e){Array.isArray(e)||(e=[e]);const t=e.filter(e=>!this.isValidChild(e));if(t.length>0)throw new r(`Invalid children detected: ${t.map(e=>typeof e).join(", ")}`);return e},containsObservables:e=>!!e&&(l.isObject(e)&&Object.values(e).some(e=>l.isObservable(e))),containsObservableReference:e=>!(!e||"string"!=typeof e)&&/\{\{#ObItem::\([0-9]+\)\}\}/.test(e),validateAttributes(e){},validateEventCallback(e){if("function"!=typeof e)throw new r("Event callback must be a function")}},u=new Set(["checked","selected","disabled","readonly","required","autofocus","multiple","autocomplete","hidden","contenteditable","spellcheck","translate","draggable","async","defer","autoplay","controls","loop","muted","download","reversed","open","default","formnovalidate","novalidate","scoped","itemscope","allowfullscreen","allowpaymentrequest","playsinline"]),c={allowfullscreen:"allowFullscreen",allowpaymentrequest:"allowPaymentRequest",async:"async",autocomplete:"autocomplete",autofocus:"autofocus",autoplay:"autoplay",checked:"checked",controls:"controls",default:"default",defer:"defer",disabled:"disabled",download:"download",draggable:"draggable",formnovalidate:"formNoValidate",contenteditable:"contentEditable",hidden:"hidden",itemscope:"itemScope",loop:"loop",multiple:"multiple",muted:"muted",novalidate:"noValidate",open:"open",playsinline:"playsInline",readonly:"readOnly",required:"required",reversed:"reversed",scoped:"scoped",selected:"selected",spellcheck:"spellcheck",translate:"translate"},h=function(){let e=0;const t=new Map;return{register(n){const r=++e;return t.set(r,new WeakRef(n)),r},unregister(e){t.delete(e)},getObservableById:e=>t.get(e)?.deref(),cleanup(){for(const[e,n]of t){const e=n.deref();e&&e.cleanup()}t.clear()},cleanObservables(e){if(t.size<e)return;let r=0;for(const[e,n]of t)n.deref()||(t.delete(e),r++);r>0&&n.log("Memory Auto Clean",`🧹 Cleaned ${r} orphaned observables`)}}}();const p=function(e){let t=!1;return function(...n){t||(t=!0,Promise.resolve().then(()=>{e.apply(this,n),t=!1}))}},d=function(e,t){return e.replace(new RegExp(`^[${t}]+|[${t}]+$`,"g"),"")},f=(e,t)=>{try{if(void 0!==window.structuredClone)return window.structuredClone(e)}catch(e){}if(null===e||"object"!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e))return e.map(e=>f(e));if(l.isObservable(e))return t&&t(e),e;const n={};for(const t in e)Object.hasOwn(e,t)&&(n[t]=f(e[t]));return n},m={getJson(e){const t=localStorage.getItem(e);try{return JSON.parse(t)}catch(t){throw new r("invalid_json:"+e)}},getNumber(e){return Number(this.get(e))},getBool(e){const t=this.get(e);return"true"===t||"1"===t},setJson(e,t){localStorage.setItem(e,JSON.stringify(t))},setBool(e,t){localStorage.setItem(e,t?"true":"false")},get:(e,t=null)=>localStorage.getItem(e)||t,set:(e,t)=>localStorage.setItem(e,t),remove(e){localStorage.removeItem(e)},has:e=>null!=localStorage.getItem(e)},b=(e,t)=>{if(!m.has(e))return t;switch(typeof t){case"object":return m.getJson(e)??t;case"boolean":return m.getBool(e)??t;case"number":return m.getNumber(e)??t;default:return m.get(e,t)??t}},y=e=>{switch(typeof e){case"object":return m.setJson;case"boolean":return m.setBool;default:return m.set}};function g(e,t=null){e=l.isObservable(e)?e.val():e,this.$previousValue=null,this.$currentValue=e,this.$firstListener=null,this.$listeners=null,this.$watchers=null,this.$memoryId=null,t&&(this.configs=t,t.reset&&(this.$initialValue=l.isObject(e)?f(e):e))}Object.defineProperty(g.prototype,"$value",{get(){return this.$currentValue},set(e){this.set(e)},configurable:!0}),g.prototype.__$Observable=!0,g.prototype.__$isObservable=!0,g.computed=()=>{};const v=function(){};g.prototype.intercept=function(e){return this.$interceptor=e,this.set=this.$setWithInterceptor,this},g.prototype.interceptMutations=function(e){return this.$mutationInterceptor=e,this},g.prototype.triggerFirstListener=function(e){this.$firstListener(this.$currentValue,this.$previousValue,e)},g.prototype.triggerListeners=function(e){const t=this.$listeners,n=this.$previousValue,r=this.$currentValue;for(let o=0,s=t.length;o<s;o++)t[o](r,n,e)},g.prototype.triggerWatchers=function(e){const t=this.$watchers,n=this.$previousValue,r=this.$currentValue,o=t.get(r),s=t.get(n);o&&o(!0,n,e),s&&s(!1,r,e)},g.prototype.triggerAll=function(e){this.triggerWatchers(e),this.triggerListeners(e)},g.prototype.triggerWatchersAndFirstListener=function(e){this.triggerWatchers(e),this.triggerFirstListener(e)},g.prototype.assocTrigger=function(){if(this.$firstListener=null,this.$watchers?.size&&this.$listeners?.length)return this.$firstListener=this.$listeners[0],this.trigger=0===this.$firstListener.length?this.$firstListener:this.triggerFirstListener,void(this.trigger=1===this.$listeners.length?this.triggerWatchersAndFirstListener:this.triggerAll);this.$listeners?.length?1===this.$listeners.length?(this.$firstListener=this.$listeners[0],this.trigger=0===this.$firstListener.length?this.$firstListener:this.triggerFirstListener):this.trigger=this.triggerListeners:this.$watchers?.size?this.trigger=this.triggerWatchers:this.trigger=v},g.prototype.trigger=v;const $={action:"set"};function w(e){return e instanceof Date?e:new Date(e)}function S(e,t){const n=w(e),r=w(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()}function C(e){const t=w(e);return 3600*t.getHours()+60*t.getMinutes()+t.getSeconds()}function O(e,t){const n=l.isObservable(e);return{dependencies:n?e:null,callback:r=>t(r,n?e.val():e)}}function E(e,t){const n=e.filter(l.isObservable);return{dependencies:n.length>0?n:null,callback:n=>t(n,e.map(e=>l.isObservable(e)?e.val():e))}}function A(e){return O(e,(e,t)=>e===t)}function _(e){return O(e,(e,t)=>e!==t)}function N(e){return O(e,(e,t)=>e>t)}function x(e){return O(e,(e,t)=>e>=t)}function F(e){return O(e,(e,t)=>e<t)}function D(e){return O(e,(e,t)=>e<=t)}function M(e,t=!0,r=""){return E([e,t,r],(e,[t,r,o])=>{if(!t)return!0;if(r)try{return new RegExp(t,o).test(String(e))}catch(e){return n.warn("Invalid regex pattern:",t,e),!1}return o&&""!==o?String(e).includes(String(t)):String(e).toLowerCase().includes(String(t).toLowerCase())})}function T(...e){const t=e.flatMap(e=>e.dependencies?Array.isArray(e.dependencies)?e.dependencies:[e.dependencies]:[]).filter(l.isObservable);return{dependencies:t.length>0?t:null,callback:t=>e.every(e=>e.callback(t))}}function k(...e){const t=e.flatMap(e=>e.dependencies?Array.isArray(e.dependencies)?e.dependencies:[e.dependencies]:[]).filter(l.isObservable);return{dependencies:t.length>0?t:null,callback:t=>e.some(e=>e.callback(t))}}g.prototype.$updateWithNewValue=function(e){e=e?.__$isObservable?e.val():e,this.$currentValue!==e&&(this.$previousValue=this.$currentValue,this.$currentValue=e,this.trigger($),this.$previousValue=null)},g.prototype.$setWithInterceptor=function(e){let t="function"==typeof e?e(this.$currentValue):e;const n=this.$interceptor(t,this.$currentValue);void 0!==n&&(t=n),this.$updateWithNewValue(t)},g.prototype.$basicSet=function(e){const t="function"==typeof e?e(this.$currentValue):e;this.$updateWithNewValue(t)},g.prototype.set=g.prototype.$basicSet,g.prototype.val=function(){return this.$currentValue},g.prototype.disconnectAll=function(){this.$previousValue=null,this.$currentValue=null,this.$listeners=null,this.$watchers=null,this.trigger=v},g.prototype.onCleanup=function(e){this.$cleanupListeners=this.$cleanupListeners??[],this.$cleanupListeners.push(e)},g.prototype.cleanup=function(){if(this.$cleanupListeners){for(let e=0;e<this.$cleanupListeners.length;e++)this.$cleanupListeners[e]();this.$cleanupListeners=null}h.unregister(this.$memoryId),this.disconnectAll(),delete this.$value},g.prototype.subscribe=function(e){this.$listeners=this.$listeners??[],this.$listeners.push(e),this.assocTrigger()},g.prototype.on=function(e,t){this.$watchers=this.$watchers??new Map;let n=this.$watchers.get(e);t.__$isObservable&&(t=t.set.bind(t)),n?l.isArray(n.list)?n.list.push(t):(n=[n,t],t=e=>{for(let t=0,r=n.length;t<r;t++)n[t](e)},t.list=n,this.$watchers.set(e,t)):(n=t,this.$watchers.set(e,t)),this.assocTrigger()},g.prototype.off=function(e,t){if(!this.$watchers)return;const n=this.$watchers.get(e);if(!n)return;if(!t||!Array.isArray(n.list))return this.$watchers?.delete(e),void this.assocTrigger();const r=n.indexOf(t);n?.splice(r,1),1===n.length?this.$watchers.set(e,n[0]):0===n.length&&this.$watchers?.delete(e),this.assocTrigger()},g.prototype.once=function(e,t){const n="function"==typeof e?e:t=>t===e,r=e=>{n(e)&&(this.unsubscribe(r),t(e))};this.subscribe(r)},g.prototype.unsubscribe=function(e){if(!this.$listeners)return;const t=this.$listeners.indexOf(e);t>-1&&this.$listeners.splice(t,1),this.assocTrigger()},g.prototype.get=function(e){const t=this.$currentValue[e];return l.isObservable(t)?t.val():t},g.prototype.equals=function(e){return l.isObservable(e)?this.$currentValue===e.$currentValue:this.$currentValue===e},g.prototype.toBool=function(){return!!this.$currentValue},g.prototype.toggle=function(){this.set(!this.$currentValue)},g.prototype.reset=function(){if(!this.configs?.reset)return;const e=l.isObject(this.$initialValue)?f(this.$initialValue,e=>{e.reset()}):this.$initialValue;this.set(e)},g.prototype.toString=function(){return String(this.$currentValue)},g.prototype.valueOf=function(){return this.$currentValue},g.prototype.persist=function(e,t={}){let n=b(e,this.$currentValue);t.get&&(n=t.get(n)),this.set(n);const r=y(this.$currentValue);return this.subscribe(n=>{r(e,t.set?t.set(n):n)}),this},g.prototype.clone=function(){let e=this.$currentValue;return e&&"object"==typeof e&&(e="function"==typeof e.clone?e.clone():structuredClone(e)),new g(e)};const L=N,I=x,P=F,R=D,V=A,j=_,q=T,B=k;function W(e,t=!1){return O(e,(e,n)=>!!e&&(!n||(t?String(e).includes(String(n)):String(e).toLowerCase().includes(String(n).toLowerCase()))))}const z=W;var U=Object.freeze({__proto__:null,all:q,and:T,any:B,between:function(e,t){return E([e,t],(e,[t,n])=>e>=t&&e<=n)},contains:z,createFilter:O,createMultiSourceFilter:E,custom:function(e,...t){const n=t.filter(l.isObservable);return{dependencies:n.length>0?n:null,callback:n=>{const r=t.map(e=>l.isObservable(e)?e.val():e);return e(n,...r)}}},dateAfter:e=>O(e,(e,t)=>!(!e||!t)&&w(e)>w(t)),dateBefore:e=>O(e,(e,t)=>!(!e||!t)&&w(e)<w(t)),dateBetween:(e,t)=>E([e,t],(e,[t,n])=>{if(!e||!t||!n)return!1;const r=w(e);return r>=w(t)&&r<=w(n)}),dateEquals:e=>O(e,(e,t)=>!(!e||!t)&&S(e,t)),dateTimeAfter:e=>O(e,(e,t)=>!(!e||!t)&&w(e)>w(t)),dateTimeBefore:e=>O(e,(e,t)=>!(!e||!t)&&w(e)<w(t)),dateTimeBetween:(e,t)=>E([e,t],(e,[t,n])=>{if(!e||!t||!n)return!1;const r=w(e);return r>=w(t)&&r<=w(n)}),dateTimeEquals:e=>O(e,(e,t)=>!(!e||!t)&&w(e).getTime()===w(t).getTime()),endsWith:function(e,t=!1){return O(e,(e,n)=>!n||(t?String(e).endsWith(String(n)):String(e).toLowerCase().endsWith(String(n).toLowerCase())))},eq:V,equals:A,getSecondsOfDay:C,greaterThan:N,greaterThanOrEqual:x,gt:L,gte:I,inArray:function(e){return O(e,(e,t)=>t.includes(e))},includes:W,isEmpty:function(e=!0){return O(e,(e,t)=>{const n=!e||""===e||Array.isArray(e)&&0===e.length;return t?n:!n})},isNotEmpty:function(e=!0){return O(e,(e,t)=>{const n=!!e&&""!==e&&(!Array.isArray(e)||e.length>0);return t?n:!n})},isSameDay:S,lessThan:F,lessThanOrEqual:D,lt:P,lte:R,match:M,neq:j,not:function(e){return{dependencies:e.dependencies,callback:t=>!e.callback(t)}},notEquals:_,notIn:function(e){return O(e,(e,t)=>!t.includes(e))},or:k,startsWith:function(e,t=!1){return O(e,(e,n)=>!n||(t?String(e).startsWith(String(n)):String(e).toLowerCase().startsWith(String(n).toLowerCase())))},timeAfter:e=>O(e,(e,t)=>!(!e||!t)&&C(e)>C(t)),timeBefore:e=>O(e,(e,t)=>!(!e||!t)&&C(e)<C(t)),timeBetween:(e,t)=>E([e,t],(e,[t,n])=>{if(!e||!t||!n)return!1;const r=C(e);return r>=C(t)&&r<=C(n)}),timeEquals:e=>O(e,(e,t)=>{if(!e||!t)return!1;const n=w(e),r=w(t);return n.getHours()===r.getHours()&&n.getMinutes()===r.getMinutes()&&n.getSeconds()===r.getSeconds()}),toDate:w});const H=function(e,t=null){if(!Array.isArray(e))throw new r("Observable.array : target must be an array");g.call(this,e,t)};(H.prototype=Object.create(g.prototype)).constructor=H,H.prototype.__$isObservableArray=!0,Object.defineProperty(H.prototype,"length",{get(){return this.$currentValue.length}}),H.prototype.$mutate=function(e,t,n){if(this.$mutationInterceptor){const n=this.$mutationInterceptor(t,{action:e});void 0!==t&&(t=n)}n(t)},["push","pop","shift","unshift","reverse","sort","splice"].forEach(e=>{H.prototype[e]=function(...t){return this.$mutate(e,t,t=>{const n=this.$currentValue[e].apply(this.$currentValue,t);return this.trigger({action:e,args:t,result:n}),n})}}),["map","forEach","filter","reduce","some","every","find","findIndex","concat","includes","indexOf"].forEach(e=>{H.prototype[e]=function(...t){return this.$currentValue[e].apply(this.$currentValue,t)}});const G={action:"clear"};H.prototype.clear=function(){if(0!==this.$currentValue.length)return this.$mutate("clear",[],()=>{this.$currentValue.length=0,this.trigger(G)}),!0},H.prototype.at=function(e){return this.$currentValue[e]},H.prototype.merge=function(e){this.$mutate("merge",e,e=>{this.$currentValue.push.apply(this.$currentValue,e),this.trigger({action:"merge",args:e})})},H.prototype.count=function(e){let t=0;return this.$currentValue.forEach((n,r)=>{e(n,r)&&t++}),t},H.prototype.swap=function(e,t){return this.$mutate("swap",[e,t],([e,t])=>{const n=this.$currentValue,r=n.length;if(t<e){const n=e;e=t,t=n}if(r<e||r<t)return!1;const o=n[e],s=n[t];n[e]=s,n[t]=o,this.trigger({action:"swap",args:[e,t],result:[o,s]})}),!0},H.prototype.swapItems=function(e,t){const n=this.$currentValue.indexOf(e),r=this.$currentValue.indexOf(t);return this.swap(n,r)},H.prototype.insertAfter=function(e,t){const n=this.$currentValue.indexOf(t);return this.splice(n+1,0,e)},H.prototype.remove=function(e){let t=[];return this.$mutate("remove",[e],([e])=>{t=this.$currentValue.splice(e,1),0!==t.length&&this.trigger({action:"remove",args:[e],result:t[0]})}),t},H.prototype.removeItem=function(e){const t=this.$currentValue.indexOf(e);return-1===t?[]:this.remove(t)},H.prototype.empty=function(){return 0===this.$currentValue.length},H.prototype.populateAndRender=function(e,t){this.trigger({action:"populate",args:[this.$currentValue,e,t]})},H.prototype.where=function(e){"function"==typeof e&&(e={_:e});const t=this,n=[t],r={};for(const[t,o]of Object.entries(e)){const e=l.isObservable(o)?M(o,!1):o;if(e&&"object"==typeof e&&"callback"in e){if(r[t]=e.callback,e.dependencies){const t=Array.isArray(e.dependencies)?e.dependencies:[e.dependencies];n.push.apply(n,t)}}else r[t]="function"==typeof e?e:t=>t===e}const o=new H([]),s=Object.entries(r),i=()=>{const e=t.val().filter(e=>{for(const[t,n]of s)if("_"===t){if(!n(e))return!1}else if(!n(e[t]))return!1;return!0});o.set(e)};return n.forEach(e=>e.subscribe(i)),i(),o},H.prototype.whereSome=function(e,t){return this.where({_:{dependencies:t.dependencies,callback:n=>e.some(e=>t.callback(n[e]))}})},H.prototype.whereEvery=function(e,t){return this.where({_:{dependencies:t.dependencies,callback:n=>e.every(e=>t.callback(n[e]))}})},H.prototype.deepSubscribe=function(e){const t=p(()=>e(this.val())),n=new WeakMap,r=e=>{n.has(e)||(e?.__$isObservableArray?n.set(e,e.deepSubscribe(t)):e?.__$isObservable&&(e.subscribe(t),n.set(e,()=>e.unsubscribe(t))))},o=e=>{const t=n.get(e);t&&(t(),n.delete(e))};return this.$currentValue.forEach(r),this.subscribe(t),this.subscribe((e,t,n)=>{switch(n?.action){case"push":case"unshift":case"merge":n.args.forEach(r);break;case"splice":{const[e,t,...s]=n.args;n.result?.forEach(o),s.forEach(r);break}case"remove":o(n.result);break;case"clear":this.$currentValue.forEach(o)}}),()=>{this.$currentValue.forEach(o)}},H.prototype.sync=function(e){if(!e||!e.__$isObservableArray)throw new r("ObservableArray.sync : target must be an ObservableArray");e.set([...this.$currentValue]);const t=(t,n,r)=>{if(!r)return void e.set([...t]);const{action:o,args:s}=r;e[o].apply(e,s)};return this.subscribe(t),()=>this.unsubscribe(t)},H.prototype.clone=function(){return new H(this.resolve())},H.prototype.isNotEmpty=function(){return this.is(e=>e.length>0)};const J=function(e,t){g.call(this,e),this.$observables={},this.configs=t;for(const t in e)Object.hasOwn(this,t)||Object.defineProperty(this,t,{get:()=>this.$observables[t],set:e=>{this.$observables[t].set(e)},configurable:!0,enumerable:!0});this.$load(e),Object.defineProperty(this,"$currentValue",{get:function(){return this.val()},set(e){this.set(e)}})};J.prototype=Object.create(g.prototype),Object.defineProperty(J,"$value",{get(){return this.val()},set(e){this.set(e)}}),J.prototype.__$isObservableObject=!0,J.prototype.__isProxy__=!0,J.prototype.$load=function(e){const t=this.configs;for(const n in e){const r=e[n];if(Array.isArray(r)){if(!1!==t?.deep){const e=r.map(e=>l.isJson(e)?new J(e,t):l.isArray(e)?new H(e,t):new g(e,t));this.$observables[n]=new H(e,t);continue}this.$observables[n]=new H(r,t)}else this.$observables[n]=r?.__$Observable?r:l.isJson(r)?new J(r,t):new g(r,t)}},J.prototype.val=function(){const e={};for(const t in this.$observables){const n=this.$observables[t];if(n?.__$Observable){let r=n.val();Array.isArray(r)&&(r=r.map(e=>e.__$Observable?e.val():e)),e[t]=r}else e[t]=n}return e},J.prototype.$val=J.prototype.val,J.prototype.get=function(e){const t=this.$observables[e];return t?.__$Observable?t.val():t},J.prototype.$get=J.prototype.get,J.prototype.set=function(e){const t=e?.__$Observable?e.$value:e,n=this.configs;for(const r in t){const o=this.$observables[r],s=e[r],i=t[r];if(o?.__$Observable){if(o.__$isObservableObject){o.update(i);continue}if(!l.isArray(i)){o.set(i);continue}const e=s.at(0);if(e?.__$Observable){const t=i.map(t=>e.__$isObservableObject?new J(t,n):g(t,n));o.set(t);continue}o.set([...i]);continue}this[r]=i}},J.prototype.$set=J.prototype.set,J.prototype.$updateWith=J.prototype.set,J.prototype.observables=function(){return Object.values(this.$observables)},J.prototype.$observables=J.prototype.observables,J.prototype.keys=function(){return Object.keys(this.$observables)},J.prototype.$keys=J.prototype.keys,J.prototype.clone=function(){return new J(this.val(),this.configs)},J.prototype.$clone=J.prototype.clone,J.prototype.reset=function(){for(const e in this.$observables)this.$observables[e].reset()},J.prototype.originalSubscribe=J.prototype.subscribe,J.prototype.subscribe=function(e){const t=this.observables(),n=p(()=>this.trigger());this.originalSubscribe(e);for(let e=0,r=t.length;e<r;e++){const r=t[e];r.__$isObservableArray?r.deepSubscribe(n):r.subscribe(n)}},J.prototype.configs=function(){return this.configs},J.prototype.update=J.prototype.set;const K=(e,t)=>g.computed(e,t),Y=(e,t)=>e.transform(t);g.prototype.isEqualTo=function(e){return e?.__$Observable?K((e,t)=>e===t,[this,e]):Y(this,t=>t===e)},g.prototype.isNotEqualTo=function(e){return e?.__$Observable?K((e,t)=>e!==t,[this,e]):Y(this,t=>t!==e)},g.prototype.isGreaterThan=function(e){return e?.__$Observable?K((e,t)=>e>t,[this,e]):Y(this,t=>t>e)},g.prototype.isGreaterThanOrEqualTo=function(e){return e?.__$Observable?K((e,t)=>e>=t,[this,e]):Y(this,t=>t>=e)},g.prototype.isLessThan=function(e){return e?.__$Observable?K((e,t)=>e<t,[this,e]):Y(this,t=>t<e)},g.prototype.isLessThanOrEqualTo=function(e){return e?.__$Observable?K((e,t)=>e<=t,[this,e]):Y(this,t=>t<=e)},g.prototype.isBetween=function(e,t){return e.__$Observable&&t.__$Observable?K((e,t,n)=>e>=t&&e<=n,[this,e,t]):e.__$Observable?K((e,n)=>e>=n&&e<=t,[this,e]):t.__$Observable?K((t,n)=>t>=e&&t<=n,[this,t]):Y(this,n=>n>=e&&n<=t)},g.prototype.isNull=function(){return Y(this,e=>null==e)},g.prototype.isTruthy=function(){return Y(this,e=>!!e)},g.prototype.isFalsy=function(){return Y(this,e=>!e)},g.prototype.isStartingWith=function(e){return e?.__$Observable?K((e,t)=>String(e).startsWith(t),[this,e]):Y(this,t=>String(t).startsWith(e))},g.prototype.isEndingWith=function(e){return e?.__$Observable?K((e,t)=>String(e).endsWith(t),[this,e]):Y(this,t=>String(t).endsWith(e))},g.prototype.isMatchingPattern=function(e){return e?.__$Observable?K((e,t)=>new RegExp(t).test(String(e)),[this,e]):Y(this,t=>e.test(String(t)))},g.prototype.isEmpty=function(){return Y(this,e=>null==e||""===e||Array.isArray(e)&&0===e.length)},g.prototype.isNotEmpty=function(){return Y(this,e=>null!=e&&""!==e&&!(Array.isArray(e)&&0===e.length))},g.prototype.isIncludes=function(e){return e?.__$Observable?K((e,t)=>Array.isArray(e)?e.includes(t):String(e).includes(String(t)),[this,e]):Y(this,t=>Array.isArray(t)?t.includes(e):String(t).includes(String(e)))},g.prototype.isIncludedIn=function(e){return e?.__$Observable?K((e,t)=>t.includes(e),[this,e]):Y(this,t=>e.includes(t))},g.prototype.isOneOf=g.prototype.isIncludedIn,g.prototype.isHaving=function(e){return e?.__$Observable?K((e,t)=>t in Object(e),[this,e]):Y(this,t=>e in Object(t))},g.prototype.toUpperCase=function(){return Y(this,e=>String(e).toUpperCase())},g.prototype.toLowerCase=function(){return Y(this,e=>String(e).toLowerCase())},g.prototype.toTrimmed=function(){return Y(this,e=>String(e).trim())},g.prototype.toBoolean=function(){return Y(this,e=>!!e)},g.prototype.toLiteral=function(e,t="${v}"){return Y(this,n=>e.replace(t,n))},g.prototype.toFormatted=g.prototype.toLiteral,g.prototype.toProperty=function(e){const t=e.split(".");return Y(this,e=>{let n=e;for(const e of t){if(null==n)return;n=n[e]}return n})},g.prototype.toLength=function(){return Y(this,e=>null==e?0:e.length)},g.prototype.toClamped=function(e,t){return e.__$Observable&&t.__$Observable?K((e,t,n)=>Math.min(Math.max(e,t),n),[this,e,t]):e.__$Observable?K((e,n)=>Math.min(Math.max(e,n),t),[this,e]):t.__$Observable?K((t,n)=>Math.min(Math.max(t,e),n),[this,t]):Y(this,n=>Math.min(Math.max(n,e),t))},g.prototype.toPercent=function(e){return e?.__$Observable?K((e,t)=>0===t?0:e/t*100,[this,e]):Y(this,t=>0===e?0:t/e*100)};const Z=function(e,t){this.$target=t,this.$observer=e};function Q(e,t){this.observable=e,g.call(this),this.$mutation=t,e.subscribe(e=>{this.$updateWithMutation(e)}),this.$updateWithMutation(e.val())}Z.prototype.__$Observable=!0,Z.prototype.__$isObservableWhen=!0,Z.prototype.subscribe=function(e){return this.$observer.on(this.$target,e)},Z.prototype.val=function(){return this.$observer.$currentValue===this.$target},Z.prototype.isMatch=Z.prototype.val,Z.prototype.isActive=Z.prototype.val,Q.prototype=Object.create(g.prototype),Q.prototype.constructor=Q,Q.prototype.__$Observable=!0,Q.prototype.__$isObservableChecker=!0;const X=Q;X.prototype.constructor=X,Q.prototype.$updateWithMutation=function(e){return e=this.$mutation(e),this.set(e)};const ee=(e,t)=>{const n=new Date(e);return{d:n,parts:new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(n).reduce((e,{type:t,value:n})=>(e[t]=n,e),{})}},te=(e,t,n)=>{const r=e=>String(e).padStart(2,"0");return e.replace("YYYY",n.year).replace("YY",n.year.slice(-2)).replace("MMMM",n.month).replace("MMM",n.month.slice(0,3)).replace("MM",r(t.getMonth()+1)).replace("DD",r(t.getDate())).replace("D",t.getDate()).replace("HH",n.hour).replace("mm",n.minute).replace("ss",n.second)},ne={currency:(e,t,{currency:n="XOF",notation:r,minimumFractionDigits:o,maximumFractionDigits:s}={})=>new Intl.NumberFormat(t,{style:"currency",currency:n,notation:r,minimumFractionDigits:o,maximumFractionDigits:s}).format(e),number:(e,t,{notation:n,minimumFractionDigits:r,maximumFractionDigits:o}={})=>new Intl.NumberFormat(t,{notation:n,minimumFractionDigits:r,maximumFractionDigits:o}).format(e),percent:(e,t,{decimals:n=1}={})=>new Intl.NumberFormat(t,{style:"percent",maximumFractionDigits:n}).format(e),date:(e,t,{format:n,dateStyle:r="long"}={})=>{if(n){const{d:r,parts:o}=ee(e,t);return te(n,r,o)}return new Intl.DateTimeFormat(t,{dateStyle:r}).format(new Date(e))},time:(e,t,{format:n,hour:r="2-digit",minute:o="2-digit",second:s}={})=>{if(n){const{d:r,parts:o}=ee(e,t);return te(n,r,o)}return new Intl.DateTimeFormat(t,{hour:r,minute:o,second:s}).format(new Date(e))},datetime:(e,t,{format:n,dateStyle:r="long",hour:o="2-digit",minute:s="2-digit",second:i}={})=>{if(n){const{d:r,parts:o}=ee(e,t);return te(n,r,o)}return new Intl.DateTimeFormat(t,{dateStyle:r,hour:o,minute:s,second:i}).format(new Date(e))},relative:(e,t,{unit:n="day",numeric:r="auto"}={})=>{const o=Math.round((e-Date.now())/864e5);return new Intl.RelativeTimeFormat(t,{numeric:r}).format(o,n)},plural:(e,t,{singular:n,plural:r}={})=>`${e} ${"one"===new Intl.PluralRules(t).select(e)?n:r}`};g.prototype.when=function(e){return new Z(this,e)},g.prototype.check=function(e){return new Q(this,e)},g.prototype.transform=g.prototype.check,g.prototype.pluck=function(e){return new Q(this,t=>t[e])},g.prototype.is=function(e){return new Q(this,"function"==typeof e?e:t=>t===e)},g.prototype.select=g.prototype.check,g.prototype.format=function(e,t={}){const n=this;if("function"==typeof e)return new Q(n,e);const r=ne[e],o=ne.locale;return g.computed(()=>r(n.val(),o.val(),t),[n,o])};const re="unresolved",oe="pending",se="ready",ie="refreshing",ae="errored";function le(e,t,n){if(this.$fn=n.debounce>0?function(e,t,n={}){let r=null,o=null;return function(...s){const i=!0===n.context?this:null;n.check&&n.check(...s),o=s,clearTimeout(r),r=setTimeout(()=>function(e,t,n){n?e.apply(n,t):e(...t)}(e,o,i),t)}}(e,n.debounce):e,this.$dependencies=t,this.$config=n,this.$controller=null,this.$subscriptions=[],this.data=n.into??new g(null),this.error=new g(null),this.state=new g(re),this.loading=g.computed(e=>e===oe||e===ie,[this.state]),n.auto){if(t.length>0)return void this.$watchDependencies();this.fetch()}}function ue(e,t=null){return new g(e,t)}le.prototype.$applyResult=function(e){this.$config.apply?this.$config.apply(e,this.data):this.data.set(e)},le.prototype.$abort=function(){this.$controller&&(this.$controller.abort(),this.$controller=null)},le.prototype.$runWithAbortController=function(e=!1){this.$abort(),this.$controller=new AbortController;const t=this.$controller.signal,n=null!==this.data.val(),r=e&&n?ie:oe;this.error.set(null),this.state.set(r);const o=[...this.$dependencies.map(e=>e.val()),t];Promise.resolve(this.$fn(...o)).then(e=>{t.aborted||(this.$applyResult(e),this.error.set(null),this.state.set(se),this.$controller=null)}).catch(e=>{t.aborted||(this.error.set(e),this.state.set(ae),this.$controller=null)})},le.prototype.$runWithoutAbortController=function(e=!1){const t=null!==this.data.val(),n=e&&t?ie:oe;this.error.set(null),this.state.set(n);const r=this.$dependencies.map(e=>e.val());Promise.resolve(this.$fn(...r)).then(e=>{this.$applyResult(e),this.error.set(null),this.state.set(se)}).catch(e=>{this.error.set(e),this.state.set(ae)})},le.prototype.$run=function(e=!1){return this.$fn.length>this.$dependencies.length?(this.$run=this.$runWithAbortController,this.$runWithAbortController(e)):(this.$run=this.$runWithoutAbortController,this.$run(e))},le.prototype.$watchDependencies=function(){this.$subscriptions.forEach(e=>e()),this.$subscriptions=[],this.$dependencies.forEach(e=>{const t=()=>this.$run(!0);e.subscribe(t),this.$subscriptions.push(()=>e.unsubscribe(t))}),this.$config.lazy||this.$run(!1)},le.prototype.apply=function(e){return this.$config.apply=e,this},le.prototype.into=function(e){return this.$config.into=e,this.data=e,this},le.prototype.fetch=function(){return this.$run(!1),this},le.prototype.refetch=function(){return this.$run(!0),this},le.prototype.mutate=function(e){return this.data.set(e),this.state.set(se),this},le.prototype.destroy=function(){this.$abort(),this.$subscriptions.forEach(e=>e()),this.$subscriptions=[]},le.prototype.isReady=function(){return this.state.isEqualTo(se)},le.prototype.isPending=function(){return this.state.isEqualTo(oe)},le.prototype.isRefreshing=function(){return this.state.isEqualTo(ie)},le.prototype.isErrored=function(){return this.state.isEqualTo(ae)},le.prototype.isUnresolved=function(){return this.state.isEqualTo(re)},le.prototype.onSuccess=function(e){return this.data.subscribe(t=>{this.state.val()===se&&e(t)}),this},le.prototype.onError=function(e){return this.error.subscribe(t=>{null!==t&&e(t)}),this};const ce=ue,he=ue;ue.useValueProperty=function(e="value"){Object.defineProperty(g.prototype,e,{get(){return this.$currentValue},set(e){this.set(e)},configurable:!0})},ue.setLocale=function(e){ne.locale=e.__$Observable?e:ue(e)},ue.getById=function(e){const t=h.getObservableById(parseInt(e));if(!t)throw new r("Observable.getById : No observable found with id "+e);return t},ue.cleanup=function(e){e.cleanup()},ue.autoCleanup=function(e=!1,t={}){if(!e)return;const{interval:n=6e4,threshold:r=100}=t;window.addEventListener("beforeunload",()=>{h.cleanup()}),setInterval(()=>h.cleanObservables(r),n)},ue.array=function(e=[],t=null){return new H(e,t)},ue.batch=function(e){const t=ue(0),n=function(){if(l.isAsyncFunction(e))return e(...arguments).then(()=>{t.trigger()}).catch(e=>{throw e});e(...arguments),t.trigger()};return n.$observer=t,n},ue.computed=function(e,t=[]){const n=()=>t.map(e=>e.val()),o=new g(e(...n())),s=p(()=>o.set(e(...n())));if(l.isFunction(t)){if(!l.isObservable(t.$observer))throw new r("Observable.computed : dependencies must be valid batch function");return t.$observer.subscribe(s),o}return t.forEach(e=>{e.__$isObservableObject?e.observables().forEach(e=>{e.subscribe(s)}):e.subscribe(s)}),o},g.computed=ue.computed,ue.init=function(e,t=null){return new J(e,t)},ue.arrayOfObject=function(e){return e.map(e=>ue.object(e))},ue.value=function(e){if(e?.__$isObservableArray){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e.at(n);t.push(ue.value(r))}return t}return e?.__$Observable?e.val():e},ue.object=ue.init,ue.json=ue.init,ue.resource=function(e,t=[],n=!1){return new le(e,t,"boolean"==typeof n?{auto:n,debounce:0,lazy:!1}:{auto:!1,debounce:0,lazy:!1,...n})},g.prototype.resolve=function(){return ue.value(this)};const pe=(e,t)=>{for(const n in t){const r=t[n];if(r.__$Observable){if(r.__$isObservableChecker){let t=r.val();if("string"==typeof t){e.classes.toggle(t,!0),r.subscribe(n=>{e.classes.remove(t),e.classes.toggle(n,!0),t=n});continue}}e.classes.toggle(n,r.val()),r.subscribe(t=>e.classes.toggle(n,t))}else r.$hydrate?r.$hydrate(e,n):e.classes.toggle(n,r)}},de=(e,t)=>{for(const n in t){const r=t[n],o=n.startsWith("--");r.__$Observable?o?(e.style.setProperty(n,r.val()),r.subscribe(t=>{!1!==t?e.style.setProperty(n,t):e.style.removeProperty(n)})):(e.style[n]=r.val(),r.subscribe(t=>{!1!==t?e.style[n]=t:e.style.removeProperty(n)})):o?e.style.setProperty(n,r):e.style[n]=r}},fe=(e,t,n)=>{const r=n.__$isObservable,o=r?n.val():n,s=c[t];if(l.isBoolean(o)?e[s]=o:e[s]=o===e.value,r){if("checked"===t)return"boolean"==typeof o?e.addEventListener("input",()=>n.set(e[s])):e.addEventListener("input",()=>n.set(e.value)),void n.subscribe(t=>e[s]=t);n.subscribe(t=>e[s]=t===e.value)}},me=(e,t,n)=>{const r="value"===t?t=>e.value=t:n=>e.setAttribute(t,n);if(n.subscribe(r),"value"===t)return e.value=n.val(),void e.addEventListener("input",()=>n.set(e.value));e.setAttribute(t,n.val())},be=(e,t)=>{for(const n in t){const r=n.toLowerCase(),o=t[n];if(null!=o)if(o.handleNdAttribute)o.handleNdAttribute(e,r,o);else{if("object"==typeof o){if("class"===r){pe(e,o);continue}if("style"===r){de(e,o);continue}}u.has(r)?fe(e,r,o):e.setAttribute(r,o)}}return e};let ye=null;const ge={createTextNode:()=>(ye||(ye=document.createTextNode(""),ge.createTextNode=()=>ye.cloneNode()),ye.cloneNode()),createObservableNode:(e,t)=>{const n=ge.createTextNode();return t.subscribe(e=>n.nodeValue=e),n.nodeValue=t.val(),e&&e.appendChild(n),n},createHydratableNode:(e,t)=>{const n=ge.createTextNode();return t.$hydrate(n),n},createStaticTextNode:(e,t)=>{const n=ge.createTextNode();return n.nodeValue=t,e&&e.appendChild(n),n},createElement:e=>document.createElement(e).cloneNode(),bindTextNode:(e,t)=>{if(t?.__$isObservable)return t.subscribe(t=>e.nodeValue=t),void(e.nodeValue=t.val());e.nodeValue=t},processChildren:(e,t)=>{if(null===e)return;const n=ge.getChild(e);n&&t.appendChild(n)},async safeRemove(e){await e.remove()},getChild:e=>{if(null==e)return null;if(e.toNdElement)do{if(e=e.toNdElement(),l.isElement(e))return e}while(e.toNdElement);return ge.createStaticTextNode(null,e)},processAttributes:(e,t)=>{t&&be(e,t)},processAttributesDirect:be,processClassAttribute:pe,processStyleAttribute:de};function ve(e){const t=Reflect.construct(DocumentFragment,[],ve),n=document.createComment((e||"")+" Anchor Sentinel"),r=document.createComment("Anchor Start : "+e),o=document.createComment("/ Anchor End "+e),s={};t.append(r,n,o);const i=new MutationObserver(()=>{n.parentNode===t||n.parentNode instanceof DocumentFragment||s.connected&&s.connected(n.parentNode)});return i.observe(document,{childList:!0,subtree:!0}),t.$sentinel=n,t.$start=r,t.$end=o,t.$observer=i,t.$events=s,t}function $e(e,t=!1){const n=new ve(e);n.onConnectedOnce(e=>{t&&function(e,t){e.remove=()=>{e.append.apply(e,t.childNodes)},e.getParent=()=>t,e.appendChild=e=>{e=l.isElement(e)?e:ge.getChild(e),t.appendChild(e)},e.appendChildRaw=t.appendChild.bind(t),e.append=e.appendChild,e.appendRaw=e.appendChildRaw,e.insertAtStart=e=>{e=l.isElement(e)?e:ge.getChild(e),t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},e.insertAtStartRaw=e=>{t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},e.appendElement=e.appendChild,e.removeChildren=()=>{t.textContent=""},e.replaceContent=function(e){const n=l.isElement(e)?e:ge.getChild(e);t.replaceChildren(n)},e.replaceContentRaw=function(e){t.replaceChildren(e)},e.setContent=e.replaceContent,e.insertBefore=(e,n)=>{e=l.isElement(e)?e:ge.getChild(e),t.insertBefore(e,n)},e.insertBeforeRaw=(e,n)=>{t.insertBefore(e,n)},e.appendChildBefore=e.insertBefore,e.appendChildBeforeRaw=e.insertBeforeRaw,e.clear=e.remove,e.detach=e.remove,e.replaceChildren=function(){t.replaceChildren(...arguments)},e.getByIndex=e=>t.childNodes[e]}(n,e)}),n.__Anchor__=!0;const r=n.$start,o=n.$end;n.nativeInsertBefore=n.insertBefore,n.nativeAppendChild=n.appendChild,n.nativeAppend=n.append;const s=t?()=>!0:e=>e.firstChild===r&&e.lastChild===o,i=(e,t,r)=>{e!==n?s(e)&&r===o?e.append(t,r):e.insertBefore(t,r):e.nativeInsertBefore(t,r)};return n.appendElement=function(e){const t=r.parentNode;t!==n?t.insertBefore(e,o):t.nativeInsertBefore(e,o)},n.appendChild=function(e,t=null){const n=o.parentNode;n?((e,t,n)=>{const r=l.isElement(t)?t:ge.getChild(t);i(e,r,n)})(n,e,t=t??o):DebugManager.error("Anchor","Anchor : parent not found",e)},n.appendChildRaw=function(e,t=null){const n=o.parentNode;n?i(n,e,t=t??o):DebugManager.error("Anchor","Anchor : parent not found",e)},n.getParent=()=>o.parentNode,n.append=n.appendChild,n.appendRaw=n.appendChildRaw,n.insertAtStart=function(e){e=l.isElement(e)?e:ge.getChild(e),n.insertAtStartRaw(e)},n.insertAtStartRaw=function(e){const t=r.parentNode;t!==n?t.insertBefore(e,r.nextSibling):t.nativeInsertBefore(e,r)},n.removeChildren=function(){const e=o.parentNode;if(e===n)return;if(s(e))return void e.replaceChildren(r,o);let t,i=r.nextSibling;for(;i&&i!==o;)t=i.nextSibling,i.remove(),i=t},n.remove=function(){const e=o.parentNode;if(e===n)return;if(s(e))return n.nativeAppend.apply(n,e.childNodes),void e.replaceChildren(r,o);let t,i=r.nextSibling;for(;i&&i!==o;)t=i.nextSibling,n.nativeAppend(i),i=t},n.removeWithAnchors=function(){n.removeChildren(),r.remove(),o.remove()},n.delete=n.removeWithAnchors,n.replaceContent=function(e){const t=l.isElement(e)?e:ge.getChild(e);n.replaceContentRaw(t)},n.replaceContentRaw=function(e){const t=o.parentNode;t&&(s(t)?t.replaceChildren(r,e,o):(n.removeChildren(),t.insertBefore(e,o)))},n.setContent=n.replaceContent,n.setContentRaw=n.replaceContentRaw,n.insertBefore=n.appendChild,n.insertBeforeRaw=n.appendChildRaw,n.endElement=function(){return o},n.startElement=function(){return r},n.restore=function(){n.appendChild(n)},n.clear=n.remove,n.detach=n.remove,n.getByIndex=function(e){let t=r;for(let n=0;n<=e;n++){if(!t.nextSibling)return null;t=t.nextSibling}return t!==r?t:null},n}ve.prototype=Object.create(DocumentFragment.prototype),ve.prototype.constructor=ve,ve.prototype.onConnected=function(e){return this.$events.connected=e,this},ve.prototype.onConnectedOnce=function(e){this.$events.connected=t=>{e(t),this.$observer.disconnect(),this.$events.connectedOnce=null}},DocumentFragment.prototype.setAttribute=()=>{};let we=e=>e;e.ArgTypes={},e.ArgTypes={string:()=>!0,number:()=>!0,boolean:()=>!0,observable:()=>!0,element:()=>!0,function:()=>!0,object:()=>!0,objectNotNull:()=>!0,children:()=>!0,attributes:()=>!0,optional:()=>!0,oneOf:()=>!0};const Se=function(e,t=null){return e&&t?{props:e,children:t}:"object"!=typeof e||Array.isArray(e)||null===e||"Object"!==e.constructor.name||e.$hydrate?{props:t,children:e}:{props:e,children:t}},Ce={mounted:new WeakMap,beforeUnmount:new WeakMap,mountedSupposedSize:0,unmounted:new WeakMap,unmountedSupposedSize:0,observer:null,initObserver:()=>{Ce.observer||(Ce.observer=new MutationObserver(Ce.checkMutation),Ce.observer.observe(document.body,{childList:!0,subtree:!0}))},executeMountedCallback(e){const t=Ce.mounted.get(e);if(t&&(t.inDom=!0,t.mounted))if(Array.isArray(t.mounted))for(const n of t.mounted)n(e);else t.mounted(e)},executeUnmountedCallback(e){const t=Ce.unmounted.get(e);if(!t)return;if(t.inDom=!1,!t.unmounted)return;let n=!1;if(Array.isArray(t.unmounted))for(const r of t.unmounted)!0===r(e)&&(n=!0);else n=!0===t.unmounted(e);n&&(t.disconnect(),e.nd?.remove())},checkMutation:function(e){for(const t of e){if(Ce.mountedSupposedSize>0)for(const e of t.addedNodes){if(Ce.executeMountedCallback(e),!e.querySelectorAll)continue;const t=e.querySelectorAll("[data--nd-mounted]");for(const e of t)Ce.executeMountedCallback(e)}if(Ce.unmountedSupposedSize>0)for(const e of t.removedNodes){if(Ce.executeUnmountedCallback(e),!e.querySelectorAll)continue;const t=e.querySelectorAll("[data--nd-unmounted]");for(const e of t)Ce.executeUnmountedCallback(e)}}},watch:function(e,t=!1){let n=!1,r=!1;Ce.initObserver();let o={inDom:t,mounted:null,unmounted:null,disconnect:()=>{n&&(Ce.mounted.delete(e),Ce.mountedSupposedSize--),r&&(Ce.unmounted.delete(e),Ce.unmountedSupposedSize--),o=null}};const s=(e,t)=>{o[e]?Array.isArray(o[e])?o[e].push(t):o[e]=[o[e],t]:o[e]=t};return{disconnect:()=>o?.disconnect(),mounted:t=>{s("mounted",t),Ce.mounted.set(e,o),n||(Ce.mountedSupposedSize++,n=!0)},unmounted:t=>{s("unmounted",t),Ce.unmounted.set(e,o),r||(Ce.unmountedSupposedSize++,r=!0)},off:(e,t)=>{((e,t)=>{if(o?.[e]){if(Array.isArray(o[e])){const n=o[e].indexOf(t);return n>-1&&o[e].splice(n,1),1===o[e].length&&(o[e]=o[e][0]),void(0===o[e].length&&(o[e]=null))}o[e]=null}})(e,t)}}}};function Oe(e){this.$element=e,this.$attachements=null}Oe.prototype.__$isNDElement=!0,Oe.$getChild=e=>e,Oe.prototype.ghostDom=function(e){return this.$attachements||(this.$attachements=document.createDocumentFragment()),this.$attachements.appendChild(Oe.$getChild(e)),this},Oe.prototype.valueOf=function(){return this.$element},Oe.prototype.ref=function(e,t){return e[t]=this.$element,this},Oe.prototype.refSelf=function(e,t){return e[t]=this,this},Oe.prototype.unmountChildren=function(){let e=this.$element;for(let t=0,n=e.children.length;t<n;t++){let n=e.children[t];n.$ndProx||n.nd?.remove(),n=null}return e=null,this},Oe.prototype.remove=function(){let e=this.$element;return e.nd.unmountChildren(),e.$ndProx=null,Ee.delete(e),e=null,this};const Ee=new WeakMap;Oe.prototype.lifecycle=function(e){const t=this.$element;Ee.has(t)||Ee.set(t,Ce.watch(t));const n=Ee.get(t);return e.mounted&&(this.$element.setAttribute("data--nd-mounted","1"),n.mounted(e.mounted)),e.unmounted&&(this.$element.setAttribute("data--nd-unmounted","1"),n.unmounted(e.unmounted)),this},Oe.prototype.destroyOnUnmount=function(){return this.unmounted(()=>this.destroy()),this},Oe.prototype.destroy=function(){this.$element?.querySelectorAll("[data--nd-before-unmount]").forEach(e=>{e.remove(),e.__$controller?.abort(),e.__$controller=null,Ee.delete(e)}),this.$element.__$controller?.abort(),this.$element.__$controller=null,Ee.delete(this.$element),this.$element=null},Oe.prototype.mounted=function(e){return this.lifecycle({mounted:e})},Oe.prototype.unmounted=function(e){return this.lifecycle({unmounted:e})},Oe.prototype.beforeUnmount=function(e,t){const n=this.$element;if(!Ce.beforeUnmount.has(n)){Ce.beforeUnmount.set(n,new Map);const e=n.remove.bind(n);let t=!1;this.$element.setAttribute("data--nd-before-unmount","1"),n.remove=async()=>{if(!t){t=!0;try{const e=Ce.beforeUnmount.get(n);for(const t of e.values())await t.call(this,n)}finally{e(),t=!1}}}}return Ce.beforeUnmount.get(n).set(e,t),this},Oe.prototype.htmlElement=function(){return this.$element},Oe.prototype.node=Oe.prototype.htmlElement,Oe.prototype.shadow=function(e,t=null){const n=this.$element,r=Array.from(n.childNodes),o=n.attachShadow({mode:e});if(t){const e=document.createElement("style");e.textContent=t,o.appendChild(e)}return n.append=o.append.bind(o),n.appendChild=o.appendChild.bind(o),o.append(...r),this},Oe.prototype.openShadow=function(e=null){return this.shadow("open",e)},Oe.prototype.closedShadow=function(e=null){return this.shadow("closed",e)},Oe.prototype.with=function(e){if(!e||"object"!=typeof e)throw new r("extend() requires an object of methods");for(const t in e){const r=e[t];"function"==typeof r?this[t]=r.bind(this):n.warn(`⚠️ extends(): "${t}" is not a function, skipping`)}return this},Oe.prototype.attr=function(e,t){return t?.__$Observable?(me(this.$element,e,t),this):(this.$element.setAttribute(e,t),this)},Oe.prototype.attrs=function(e){return be(this.$element,e),this},Oe.prototype.class=function(e){return pe(this.$element,e),this},Oe.prototype.style=function(e){return de(this.$element,e),this},Oe.extend=function(e){if(!e||"object"!=typeof e)throw new r("NDElement.extend() requires an object of methods");if(Array.isArray(e))throw new r("NDElement.extend() requires an object, not an array");const t=new Set(["constructor","valueOf","$element","$observer","ref","remove","cleanup","with","extend","attach","lifecycle","mounted","unmounted","unmountChildren"]);for(const o in e){if(!Object.hasOwn(e,o))continue;const s=e[o];if("function"==typeof s){if(t.has(o))throw n.error("NDElement.extend",`Cannot override protected method "${o}"`),new r(`Cannot override protected method "${o}"`);Oe.prototype[o]&&n.warn("NDElement.extend",`Overwriting existing prototype method "${o}"`),Oe.prototype[o]=s}else n.warn("NDElement.extend",`"${o}" is not a function, skipping`)}return Oe},Oe.$sanitizer=null,Oe.setSanitizer=function(e){if("function"!=typeof e)throw new r("NDElement.setSanitizer() expects a function");return Oe.$sanitizer=e,Oe},Oe.prototype.html=function(e,{unsafe:t=!1,sanitize:n=!1}={}){const o=this.$element,s=e=>{if(n){if("function"==typeof n)return void(o.innerHTML=n(e));if(!Oe.$sanitizer)throw new r("nd.html() — no sanitizer configured. Call NDElement.setSanitizer() first.");const t=!0===n?{}:n;return void(o.innerHTML=Oe.$sanitizer(e,t))}t?o.innerHTML=e:console.warn("nd.html() — use {unsafe: true} or {sanitize: true|Object|Function}")};return e?.__$Observable?(e.subscribe(s),s(e.val()),this):(s(e),this)},Oe.prototype.contentEditable=function(e,{format:t="html"}={}){this.$element.contentEditable=!0;const n="text"===t?()=>this.$element.innerText:()=>this.$element.innerHTML,r="text"===t?e=>{this.$element.innerText=e}:e=>{this.$element.innerHTML=e};return e?.__$Observable&&(e.subscribe(e=>{document.activeElement!==this.$element&&r(e)}),r(e.val()||"")),this.$element.addEventListener("input",()=>{e?.set(n())},{signal:this.$getSignal()}),this};const Ae={configurable:!0,get(){return new Oe(this)}};Object.defineProperty(HTMLElement.prototype,"nd",Ae),Object.defineProperty(DocumentFragment.prototype,"nd",Ae),Object.defineProperty(Oe.prototype,"nd",{configurable:!0,get:function(){return this}}),["Click","DblClick","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","Wheel","KeyDown","KeyPress","KeyUp","Blur","Change","Focus","Input","Invalid","Reset","Search","Select","Submit","Drag","DragEnd","DragEnter","DragLeave","DragOver","DragStart","Drop","AfterPrint","BeforePrint","BeforeUnload","Error","HashChange","Load","Offline","Online","PageHide","PageShow","Resize","Scroll","Unload","Abort","CanPlay","CanPlayThrough","DurationChange","Emptied","Ended","LoadedData","LoadedMetadata","LoadStart","Pause","Play","Playing","Progress","RateChange","Seeked","Seeking","Stalled","Suspend","TimeUpdate","VolumeChange","Waiting","TouchCancel","TouchEnd","TouchMove","TouchStart","AnimationEnd","AnimationIteration","AnimationStart","TransitionEnd","Copy","Cut","Paste","FocusIn","FocusOut","ContextMenu"].forEach(e=>{const t=e.toLowerCase();Oe.prototype["on"+e]=function(e=null,n={}){return this.$element.addEventListener(t,e,{signal:this.$getSignal(),...n}),this}}),["Click","DblClick","MouseDown","MouseMove","MouseOut","MouseOver","MouseUp","Wheel","KeyDown","KeyPress","KeyUp","Change","Input","Invalid","Reset","Search","Select","Submit","Drag","DragEnd","DragEnter","DragLeave","DragOver","DragStart","Drop","BeforeUnload","HashChange","TouchCancel","TouchEnd","TouchMove","TouchStart","AnimationEnd","AnimationIteration","AnimationStart","TransitionEnd","Copy","Cut","Paste","FocusIn","FocusOut","ContextMenu"].forEach(e=>{const t=e.toLowerCase();Oe.prototype["onStop"+e]=function(e=null,n={}){return Ne(this.$element,t,e,{signal:this.$getSignal(),...n}),this},Oe.prototype["onPreventStop"+e]=function(e=null,n={}){return xe(this.$element,t,e,{signal:this.$getSignal(),...n}),this}}),["Click","DblClick","MouseDown","MouseUp","Wheel","KeyDown","KeyPress","Invalid","Reset","Submit","DragOver","Drop","BeforeUnload","TouchCancel","TouchEnd","TouchMove","TouchStart","Copy","Cut","Paste","ContextMenu"].forEach(e=>{const t=e.toLowerCase();Oe.prototype["onPrevent"+e]=function(e=null,n={}){return _e(this.$element,t,e,{signal:this.$getSignal(),...n}),this}}),Oe.prototype.$getSignal=function(){return this.$element.__$controller||(this.$element.__$controller=new AbortController),this.$element.__$controller.signal},Oe.prototype.on=function(e,t,n){return this.$element.addEventListener(e.toLowerCase(),t,{signal:this.$getSignal(),...n}),this},Oe.prototype.off=function(e,t){return this.$element.removeEventListener(e.toLowerCase(),t),this},Oe.prototype.once=function(e,t){return this.$element.addEventListener(e.toLowerCase(),t,{signal:this.$getSignal(),once:!0}),this},Oe.prototype.emit=function(e,t=null){const n=new CustomEvent(e,{detail:t,bubbles:!0,cancelable:!0});return this.$element.dispatchEvent(n),this};const _e=function(e,t,n,r){return e.addEventListener(t,t=>{t.preventDefault(),n&&n.call(e,t)},r),this},Ne=function(e,t,n,r){return e.addEventListener(t,t=>{t.stopPropagation(),n&&n.call(e,t)},r),this},xe=function(e,t,n,r){return e.addEventListener(t,t=>{t.stopPropagation(),t.preventDefault(),n&&n.call(e,t)},r),this},Fe={getClasses(){return this.$element.className?.split(" ").filter(Boolean)},add(e){const t=this.getClasses();t.indexOf(e)>=0||(t.push(e),this.$element.className=t.join(" "))},remove(e){const t=this.getClasses(),n=t.indexOf(e);n<0||(t.splice(n,1),this.$element.className=t.join(" "))},toggle(e,t=void 0){const n=this.getClasses(),r=n.indexOf(e);if(r>=0){if(!0===t)return;n.splice(r,1)}else{if(!1===t)return;n.push(e)}this.$element.className=n.join(" ")},contains(e){return this.getClasses().indexOf(e)>=0}};function De(e){this.$hydrate=e}Object.defineProperty(HTMLElement.prototype,"classes",{configurable:!0,get(){return{$element:this,...Fe}}}),DocumentFragment.prototype.__IS_FRAGMENT=!0,Function.prototype.args=function(...e){return this},Function.prototype.errorBoundary=function(e){const t=(...n)=>{try{return this.apply(this,n)}catch(r){return e(r,{caller:t,args:n})}};return t},De.prototype.__$isTemplateBinding=!0,Oe.$getChild=ge.getChild,String.prototype.toNdElement=function(){return ge.createStaticTextNode(null,this)},Number.prototype.toNdElement=function(){return ge.createStaticTextNode(null,this.toString())},Element.prototype.toNdElement=function(){return this},Text.prototype.toNdElement=function(){return this},Comment.prototype.toNdElement=function(){return this},Document.prototype.toNdElement=function(){return this},DocumentFragment.prototype.toNdElement=function(){return this},g.prototype.toNdElement=function(){return ge.createObservableNode(null,this)},Q.prototype.toNdElement=g.prototype.toNdElement,Oe.prototype.toNdElement=function(){const e=this.$element??this.$build?.()??this.build?.()??null;return this.$attachements?(this.$attachements.contains(this.$element)||this.$attachements.append(this.$element),this.$attachements):e},Array.prototype.toNdElement=function(){const e=document.createDocumentFragment();for(let t=0,n=this.length;t<n;t++){const n=ge.getChild(this[t]);null!==n&&e.appendChild(n)}return e},Function.prototype.toNdElement=function(){return ge.getChild(this())},De.prototype.toNdElement=function(){return ge.createHydratableNode(null,this)};const Me=(e,t=1e3)=>new Promise(n=>{let r=!1;const o=t=>{t&&t.target!==e||r||(r=!0,e.removeEventListener("transitionend",o),e.removeEventListener("animationend",o),clearTimeout(s),n())};e.addEventListener("transitionend",o),e.addEventListener("animationend",o);const s=setTimeout(o,t),i=window.getComputedStyle(e),a="0s"!==i.transitionDuration,l="0s"!==i.animationDuration;a||l||o()});Oe.prototype.transitionOut=function(e){const t=e+"-exit",n=this.$element;return this.beforeUnmount("transition-exit",async function(){n.classes.add(t),await Me(n),n.classes.remove(t)}),this},Oe.prototype.transitionIn=function(e){const t=e+"-enter-from",n=e+"-enter-to",r=this.$element;return r.classes.add(t),this.mounted(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{r.classes.remove(t),r.classes.add(n),Me(r).then(()=>{r.classes.remove(n)})})})}),this},Oe.prototype.transition=function(e){return this.transitionIn(e),this.transitionOut(e),this},Oe.prototype.animate=function(e){const t=this.$element;return t.classes.add(e),Me(t).then(()=>{t.classes.remove(e)}),this},g.prototype.handleNdAttribute=function(e,t){u.has(t)?fe(e,t,this):me(e,t,this)},Q.prototype.handleNdAttribute=g.prototype.handleNdAttribute,De.prototype.handleNdAttribute=function(e,t){this.$hydrate(e,t)};const Te=e=>e?e.toNdElement():ge.createTextNode(),ke=(e,t,n=null)=>{const{props:r,children:o=null}=Se(t,n);return ge.processAttributes(e,r),ge.processChildren(o,e),e};function Le(e,t=null){if(e){if(t){let n=null,r=(o,s)=>(n=document.createElement(e),r=(e,r)=>ke(t(n.cloneNode()),e,r),ke(t(n.cloneNode()),o,s));return(e,t)=>r(e,t)}let n=null,r=(t,o)=>(n=document.createElement(e),r=(e,t)=>ke(n.cloneNode(),e,t),ke(n.cloneNode(),t,o));return(e,t)=>r(e,t)}return(e,t="")=>{const n=$e(t);return n.append(e),n}}function Ie(e){this.$element=e,this.$classes=null,this.$styles=null,this.$attrs=null,this.$ndMethods=null}Oe.prototype.attach=function(e,t){if("function"==typeof t){const n=this.$element;return n.nodeCloner=n.nodeCloner||new Ie(n),n.nodeCloner.attach(e,t),n}return t.$hydrate(this.$element,e),this.$element},Ie.prototype.__$isNodeCloner=!0;const Pe=(e,t,n)=>{for(const r in t)e[r]=t[r].apply(null,n);return e};Ie.prototype.resolve=function(){if(this.$content)return;const e=[];if(this.$ndMethods){const t=Object.keys(this.$ndMethods);if(1===t.length){const n=t[0],r=this.$ndMethods[n];e.push((e,t)=>{e.nd[n](r.bind(e,...t))})}else e.push((e,t)=>{const n=e.nd;for(const r in this.$ndMethods)n[r](this.$ndMethods[r].bind(e,...t))})}if(this.$classes){const t={},n=Object.keys(this.$classes);if(1===n.length){const r=n[0],o=this.$classes[r];e.push((e,n)=>{t[r]=o.apply(null,n),ge.processClassAttribute(e,t)})}else e.push((e,n)=>{ge.processClassAttribute(e,Pe(t,this.$classes,n))})}if(this.$styles){const t={},n=Object.keys(this.$styles);if(1===n.length){const r=n[0],o=this.$styles[r];e.push((e,n)=>{t[r]=o.apply(null,n),ge.processStyleAttribute(e,t)})}else e.push((e,n)=>{ge.processStyleAttribute(e,Pe(t,this.$styles,n))})}if(this.$attrs){const t={},n=Object.keys(this.$attrs);if(1===n.length){const r=n[0],o=this.$attrs[r];e.push((e,n)=>{t[r]=o.apply(null,n),ge.processAttributes(e,t)})}else e.push((e,n)=>{ge.processAttributes(e,Pe(t,this.$attrs,n))})}const t=e.length,n=this.$element;this.cloneNode=r=>{const o=n.cloneNode(!1);for(let n=0;n<t;n++)e[n](o,r);return o}},Ie.prototype.cloneNode=function(e){return this.$element.cloneNode(!1)},Ie.prototype.attach=function(e,t){return this.$ndMethods=this.$ndMethods||{},this.$ndMethods[e]=t,this},Ie.prototype.text=function(e){return this.$content=e,"function"==typeof e?(this.cloneNode=t=>Te(e.apply(null,t)),this):(this.cloneNode=t=>Te(t[0][e]),this)},Ie.prototype.attr=function(e,t){return"class"===e?(this.$classes=this.$classes||{},this.$classes[t.property]=t.value,this):"style"===e?(this.$styles=this.$styles||{},this.$styles[t.property]=t.value,this):(this.$attrs=this.$attrs||{},this.$attrs[e]=t.value,this)};function Re(e){let t=null;const n=e=>{const t=e.childNodes;let r=!!e.nodeCloner;const o=t.length;for(let e=0;e<o;e++){const o=t[e];o.nodeCloner&&(r=!0);n(o)&&(r=!0)}return r?e.nodeCloner?(e.nodeCloner.resolve(),e.dynamicCloneNode=n=>{const r=e.nodeCloner.cloneNode(n);for(let e=0;e<o;e++)r.appendChild(t[e].dynamicCloneNode(n));return r}):e.dynamicCloneNode=n=>{const r=e.cloneNode();for(let e=0;e<o;e++)r.appendChild(t[e].dynamicCloneNode(n));return r}:e.dynamicCloneNode=e.cloneNode.bind(e,!0),r};this.clone=r=>{const o=Ve(this);return t=e(o),t.nodeCloner||(t.nodeCloner=new Ie(t)),n(t),this.clone=t.dynamicCloneNode,t.dynamicCloneNode(r)};const r=(e,t)=>new De((n,r)=>{!function(e,t,n,r){n.nodeCloner=n.nodeCloner||new Ie(n),"value"!==t?"attach"!==t?n.nodeCloner.attr(t,{property:r,value:e}):n.nodeCloner.attach(r,e):n.nodeCloner.text(e)}(e,t,n,r)});this.style=e=>r(e,"style"),this.class=e=>r(e,"class"),this.property=e=>this.value(e),this.value=e=>r(e,"value"),this.text=this.value,this.attr=e=>r(e,"attributes"),this.attach=e=>r(e,"attach"),this.callback=this.attach}const Ve=e=>new Proxy(e,{get:(e,t)=>t in e||"symbol"==typeof t?e[t]:e.value(t)});function je(e){let t=null,n=null;this.render=r=>{if(t||(t=e(this)),!n)return t;const o=r[0];if(o&&"object"==typeof o)for(const e in o)n[e]&&n[e](o[e]);return t},this.createSection=(e,t)=>{n=n||{};const r=$e("Component "+e);return n[e]=function(e){r.removeChildren(),t?r.appendChild(t(e)):r.append(e)},r}}const qe=function(e={}){const t=l.isString(e)?e.split(";").filter(Boolean):e;return{add(e,n){if(Array.isArray(t))t.push(e+": "+n);else if(l.isObject(e)){n=e;for(const e in n)t[e]=n[e]}else t[e]=n},value:()=>Array.isArray(t)?t.join(";").concat(";"):{...t}}},Be=function(e=[]){let t=l.isString(e)?e.split(" ").filter(Boolean):e;return{add(e,n=!0){if(l.isJson(e))for(const n in e)e[n]&&(t[n]=e[n]);else if(null!=n||e.__$Observable)if(Array.isArray(t)&&(t=t.reduce((e,t)=>(e[t]=!0,e),{})),e.__$Observable){const n=`obs-${Math.random().toString(36).substr(2,9)}`;t[n]=e}else t[e]=n;else Array.isArray(t)?t.push(e):t[e]=n},value:()=>Array.isArray(t)?t.join(" "):{...t}}},We=e=>{let t=null;return(...n)=>(null!=t||(t=e(...n)),t)},ze=e=>{let t=null;return new Proxy({},{get:(n,r)=>(t||(t=e()),t[r])})},Ue=e=>{const t=new Map;return new Proxy({},{get:(n,r)=>{const o=t.get(r);if(o)return o;if(e.length>0)return(...n)=>{const o=e(...n,r);return t.set(r,o),o};const s=e(r);return t.set(r,s),s}})},He=["use","get","create","createResettable","createComposed","createPersistent","createPersistentResettable","delete","reset"],Ge=function(){const e=new Map,t=new Map,o=(t,o)=>{const s=e.get(o);if(!s)throw n.error("Store",`Store.${t}('${o}') : store not found. Did you call Store.create('${o}') first?`),new r(`Store.${t}('${o}') : store not found.`);return s},s=(e,t={})=>Array.isArray(e)?ue.array(e,t):l.isJson(e)?ue.object(e,t):ue(e,t),i={create(t,o){if(e.has(t))throw n.warn("Store",`Store.create('${t}') : a store with this name already exists. Use Store.get('${t}') to retrieve it.`),new r(`Store.create('${t}') : a store with this name already exists.`);const i=s(o);return e.set(t,{observer:i,subscribers:new Set,resettable:!1,composed:!1}),i},createResettable(t,o){if(e.has(t))throw n.warn("Store",`Store.createResettable('${t}') : a store with this name already exists.`),new r(`Store.createResettable('${t}') : a store with this name already exists.`);const i=s(o,{reset:!0});return e.set(t,{observer:i,subscribers:new Set,resettable:!0,composed:!1}),i},createComposed(t,o,s){if(e.has(t))throw n.warn("Store",`Store.createComposed('${t}') : a store with this name already exists.`),new r(`Store.createComposed('${t}') : a store with this name already exists.`);if("function"!=typeof o)throw new r(`Store.createComposed('${t}') : computation must be a function.`);if(!Array.isArray(s)||0===s.length)throw new r(`Store.createComposed('${t}') : dependencies must be a non-empty array of store names.`);const i=s.map(o=>{if("string"!=typeof o)return o;const s=e.get(o);if(!s)throw n.error("Store",`Store.createComposed('${t}') : dependency '${o}' not found. Create it first.`),new r(`Store.createComposed('${t}') : dependency store '${o}' not found.`);return s.observer}),a=ue.computed(o,i);return e.set(t,{observer:a,subscribers:new Set,resettable:!1,composed:!0}),a},has:t=>e.has(t),reset(e){const t=o("reset",e);if(t.composed)throw n.error("Store",`Store.reset('${e}') : composed stores cannot be reset. Their value is derived from dependencies.`),new r(`Store.reset('${e}') : composed stores cannot be reset.`);if(!t.resettable)throw n.error("Store",`Store.reset('${e}') : this store is not resettable. Use Store.createResettable('${e}', value) instead of Store.create().`),new r(`Store.reset('${e}') : this store is not resettable. Use Store.createResettable('${e}', value) instead of Store.create().`);t.observer.reset()},use(e){const t=o("use",e);if(t.composed)throw n.error("Store",`Store.use('${e}') : composed stores are read-only. Use Store.follow('${e}') instead.`),new r(`Store.use('${e}') : composed stores are read-only. Use Store.follow('${e}') instead.`);const{observer:i,subscribers:a}=t,l=s(i.val()),u=e=>l.set(e),c=e=>i.set(e);return i.subscribe(u),l.subscribe(c),l.destroy=()=>{i.unsubscribe(u),l.unsubscribe(c),a.delete(l),l.cleanup()},l.dispose=l.destroy,a.add(l),l},follow(e){const{observer:t,subscribers:i}=o("follow",e),a=s(t.val()),l=a.set.bind(a),u=e=>l(e);return t.subscribe(u),((e,t,o)=>{const s=e=>()=>{throw n.error("Store",`Store.${o}('${t}') is read-only. '${e}()' is not allowed.`),new r(`Store.${o}('${t}') is read-only.`)};e.set=s("set"),e.toggle=s("toggle"),e.reset=s("reset")})(a,e,"follow"),a.destroy=()=>{t.unsubscribe(u),i.delete(a),a.cleanup()},a.dispose=a.destroy,i.add(a),a},get(t){const r=e.get(t);return r?r.observer:(n.warn("Store",`Store.get('${t}') : store not found.`),null)},getWithSubscribers:t=>e.get(t)??null,delete(r){const o=e.get(r);o?(o.subscribers.forEach(e=>e.destroy()),o.subscribers.clear(),o.observer.cleanup(),e.delete(r),t.delete(r)):n.warn("Store",`Store.delete('${r}') : store not found, nothing to delete.`)},group(e,t){"function"==typeof e&&(t=e,e="anonymous");const n=Ge();return t&&t(n),n},createPersistent(e,t,n){n=n||e;const r=this.create(e,b(n,t)),o=y(t);return r.subscribe(e=>o(n,e)),r},createPersistentResettable(e,t,n){n=n||e;const r=this.createResettable(e,b(n,t)),o=y(t);r.subscribe(e=>o(n,e));const s=r.reset.bind(r);return r.reset=()=>{m.remove(n),s()},r},protected:()=>new Proxy(i,{get:(e,t)=>"symbol"==typeof t||t.startsWith("$")?e[t]:He.includes(t)?()=>{throw new r(`Store.${t}() is not allowed on a read-only store. Use the original store reference instead.`)}:e.has(t)?e.follow(t):e[t],set(){throw new r("This store is read-only.")},deleteProperty(){throw new r("This store is read-only.")}})};return new Proxy(i,{get(e,n){if("symbol"==typeof n||n.startsWith("$")||n in e)return e[n];if(e.has(n)){if(t.has(n))return t.get(n);const r=e.follow(n);return t.set(n,r),r}},set(e,t,o){throw n.error("Store",`Forbidden: You cannot overwrite the store key '${String(t)}'. Use .use('${String(t)}').set(value) instead.`),new r("Store structure is immutable. Use .set() on the observable.")},deleteProperty(e,t){throw new r("Store keys cannot be deleted.")}})},Je=Ge();Je.create("locale",("undefined"!=typeof navigator?navigator.language.split("-")[0]:"en")||"en");const Ke=e=>e;const Ye=new Set(["clear","push","unshift","replace"]),Ze=e=>e;const Qe=function(e,t,{comment:r=null,shouldKeepInCache:o=!0}={}){if(!l.isObservable(e))return"boolean"==typeof e?e?ge.getChild(t):null:n.warn("ShowIf","ShowIf : condition must be an Observable or boolean / "+r,e);const s=$e("Show if : "+(r||""));let i=null;const a=()=>(i&&o||(i=ge.getChild(t),l.isFragment(i)&&(i=Array.from(i.childNodes))),i);return e.val()&&s.appendChild(a()),e.subscribe(e=>{e?s.appendChild(a()):s.remove()}),s},Xe=function(e,t,n=!0){if(!l.isObservable(e))throw new r("Toggle : condition must be an Observable");const o=$e("Match"),s=new Map,i=function(e){if(n&&s.has(e))return s.get(e);let r=t[e];return r?(r=ge.getChild(r),l.isFragment(r)&&(r=Array.from(r.children)),n&&s.set(e,r),r):null},a=e.val(),u=i(a);return u&&o.appendChild(u),e.subscribe(e=>{const t=i(e);o.remove(),t&&o.appendChild(t)}),o.nd.with({add(n,r,o=!1){t[n]=r,o&&e.set(n)},remove(r){n&&s.delete(r),e.set([...s.keys()].at(-1)??""),delete t[r]}})},et=function(e,t,n){if(!l.isObservable(e))throw new r("Toggle : condition must be an Observable");return Xe(e.toBoolean(),{true:t,false:n})},tt=Le("div"),nt=Le("span"),rt=Le("label"),ot=Le("p"),st=ot,it=Le("strong"),at=Le("h1"),lt=Le("h2"),ut=Le("h3"),ct=Le("h4"),ht=Le("h5"),pt=Le("h6"),dt=Le("br"),ft=Le("a"),mt=Le("pre"),bt=Le("code"),yt=Le("blockquote"),gt=Le("hr"),vt=Le("em"),$t=Le("small"),wt=Le("mark"),St=Le("del"),Ct=Le("ins"),Ot=Le("sub"),Et=Le("sup"),At=Le("abbr"),_t=Le("cite"),Nt=Le("q"),xt=Le("dl"),Ft=Le("dt"),Dt=Le("dd"),Mt=Le("form",e=>(e.submit=function(t){return"function"==typeof t?(e.onSubmit(e=>{e.preventDefault(),t(e)}),e):(this.setAttribute("action",t),e)},e.multipartFormData=function(){return this.setAttribute("enctype","multipart/form-data"),e},e.post=function(t){return this.setAttribute("method","post"),this.setAttribute("action",t),e},e.get=function(e){this.setAttribute("method","get"),this.setAttribute("action",e)},e)),Tt=Le("input"),kt=Le("textarea"),Lt=kt,It=Le("select"),Pt=Le("fieldset"),Rt=Le("option"),Vt=Le("legend"),jt=Le("datalist"),qt=Le("output"),Bt=Le("progress"),Wt=Le("meter"),zt=Le("button"),Ut=Le("main"),Ht=Le("section"),Gt=Le("article"),Jt=Le("aside"),Kt=Le("nav"),Yt=Le("figure"),Zt=Le("figcaption"),Qt=Le("header"),Xt=Le("footer"),en=Le("img"),tn=function(e,t){return en({src:e,...t})},nn=Le("details"),rn=Le("summary"),on=Le("dialog"),sn=Le("menu"),an=Le("ol"),ln=Le("ul"),un=Le("li"),cn=un,hn=an,pn=ln,dn=Le("audio"),fn=Le("video"),mn=Le("source"),bn=Le("track"),yn=Le("canvas"),gn=Le("svg"),vn=Le("time"),$n=Le("data"),wn=Le("address"),Sn=Le("kbd"),Cn=Le("samp"),On=Le("var"),En=Le("wbr"),An=Le("caption"),_n=Le("table"),Nn=Le("thead"),xn=Le("tfoot"),Fn=Le("tbody"),Dn=Le("tr"),Mn=Dn,Tn=Le("th"),kn=Tn,Ln=Tn,In=Le("td"),Pn=In;function Rn(e){let t=null,n=(r,o)=>(t=document.createElementNS("http://www.w3.org/2000/svg",e),n=(e,n)=>ke(t.cloneNode(),e,n),ke(t.cloneNode(),r,o));return(e,t)=>n(e,t)}const Vn=Rn("svg"),jn=Rn("circle"),qn=Rn("rect"),Bn=Rn("ellipse"),Wn=Rn("line"),zn=Rn("polyline"),Un=Rn("polygon"),Hn=Rn("path"),Gn=Rn("text"),Jn=Rn("tspan"),Kn=Rn("textPath"),Yn=Rn("g"),Zn=Rn("defs"),Qn=Rn("use"),Xn=Rn("symbol"),er=Rn("clipPath"),tr=Rn("mask"),nr=Rn("marker"),rr=Rn("pattern"),or=Rn("image"),sr=Rn("foreignObject"),ir=Rn("switch"),ar=Rn("linearGradient"),lr=Rn("radialGradient"),ur=Rn("stop"),cr=Rn("filter"),hr=Rn("feBlend"),pr=Rn("feColorMatrix"),dr=Rn("feComposite"),fr=Rn("feFlood"),mr=Rn("feGaussianBlur"),br=Rn("feMerge"),yr=Rn("feMergeNode"),gr=Rn("feOffset"),vr=Rn("feTurbulence"),$r=Rn("feDisplacementMap"),wr=Rn("feDiffuseLighting"),Sr=Rn("feSpecularLighting"),Cr=Rn("feDistantLight"),Or=Rn("fePointLight"),Er=Rn("feSpotLight"),Ar=Rn("feMorphology"),_r=Rn("feConvolveMatrix"),Nr=Rn("feComponentTransfer"),xr=Rn("feFuncR"),Fr=Rn("feFuncG"),Dr=Rn("feFuncB"),Mr=Rn("feFuncA"),Tr=Rn("animate"),kr=Rn("animateTransform"),Lr=Rn("animateMotion"),Ir=Rn("mpath"),Pr=Rn("set"),Rr=Rn("desc"),Vr=Rn("title"),jr=Rn("metadata"),qr=Rn("view"),Br=Rn("style"),Wr=Rn("script"),zr=Le("");var Ur=Object.freeze({__proto__:null,Abbr:At,Address:wn,Anchor:$e,Article:Gt,Aside:Jt,AsyncImg:function(e,t,n,o){const s=l.isObservable(e)?e.val():e,i=tn(t||s,n),a=new Image;return a.onload=()=>{l.isFunction(o)&&o(null,i),i.src=l.isObservable(e)?e.val():e},a.onerror=()=>{l.isFunction(o)&&o(new r("Image not found"))},l.isObservable(e)&&e.subscribe(e=>{a.src=e}),a.src=s,i},Audio:dn,BaseImage:en,Blockquote:yt,Br:dt,Button:zt,Canvas:yn,Caption:An,Checkbox:e=>Tt({type:"checkbox",...e}),Cite:_t,Code:bt,ColorInput:e=>Tt({type:"color",...e}),Data:$n,Datalist:jt,DateInput:e=>Tt({type:"date",...e}),DateTimeInput:e=>Tt({type:"datetime-local",...e}),Dd:Dt,Del:St,Details:nn,Dialog:on,Div:tt,Dl:xt,Dt:Ft,Em:vt,EmailInput:e=>Tt({type:"email",...e}),FieldSet:Pt,FigCaption:Zt,Figure:Yt,FileInput:e=>Tt({type:"file",...e}),Footer:Xt,ForEach:function(e,t,o,{shouldKeepItemsInCache:s=!1}={}){t=t||Ke;const i=$e("ForEach"),a=i.endElement();i.startElement();const u=new Map;let c=null;const h=new Set,p=e=>{if(!s)for(const[t,n]of u.entries()){if(h.has(t))continue;const r=n.child?.deref();e&&r&&r.remove(),n.indexObserver?.cleanup(),n.child=null,n.indexObserver=null,u.delete(n.keyId),c&&c.delete(n.keyId)}},d=(e,s)=>{const i=((e,t,n)=>{if(l.isString(n)){const r=l.isObservable(e)?e.val():e,o=r?.[n];return l.isObservable(o)?o.val():o??t}return l.isFunction(n)?n(e,t):(l.isObservable(e)?e.val():e)??t})(e,s,o);if(u.has(i)){const e=u.get(i);if(e.indexObserver?.set(s),e.isNew=!1,e.child?.deref())return i;u.delete(i)}try{const n=t.length>=2?ue(s):null,o=ge.getChild(t(e,n));if(!o)throw new r("ForEach child can't be null or undefined!");u.set(i,{keyId:i,isNew:!0,child:new WeakRef(o),indexObserver:n})}catch(e){throw n.error("ForEach",`Error creating element for key ${i}`,e),e}return i},f=()=>{const t=a.parentNode;if(!t)return;const n=l.isObservable(e)?e.val():e;if(h.clear(),Array.isArray(n))for(let e=0,t=n.length;e<t;e++){const t=d(n[e],e);h.add(t)}else for(const e in n){const t=d(n[e],e);h.add(t)}if(0===h.size)return i.removeChildren(),p(),void c?.clear();p(t),c&&0!==c.size?(()=>{const e=document.createDocumentFragment(),t=Array.from(h);Array.from(c);for(const n in t){const r=t[n],o=u.get(r);if(!o)continue;const s=o.child.deref();s&&e.appendChild(s)}i.replaceContent(e)})():(e=>{const t=document.createDocumentFragment();for(const e of h){const n=u.get(e);if(!n)continue;const r=n.child?.deref();r&&t.appendChild(r)}e.insertBefore(t,a)})(t),c?.clear(),c=new Set([...h])};return f(),l.isObservable(e)&&e.subscribe(f),i},ForEachArray:function(e,t,n={}){t=t||Ze;const r=$e("ForEach Array",n.isParentUniqueChild),o=r.endElement(),s=new Map;let i=0;const a=t.length>=2,l=e=>{r.removeChildren(),f(e),i=0},u=e=>s.get(e)?.child,c=(e,t=!0)=>{const n=s.get(e);if(n){if(t){const t=n.child;t?.remove(),s.delete(e)}n.indexObserver?.cleanup()}},h=e=>{const n=ge.getChild(t(e,null));return s.set(e,{child:n,indexObserver:null}),n};let p=(n,r)=>{const o=e.transform(e=>e.indexOf(n)),i=ge.getChild(t(n,o));return s.set(n,{child:i,indexObserver:o}),i};e.__$Observable||(p=(e,n)=>{const r=ge.getChild(t(e,n));return s.set(e,{child:r,indexObserver:null}),r});const d=(e,t)=>{const n=s.get(e);return n?(n.indexObserver?.set(t),n.child):h(e)};let f,m=h;f=a?n.shouldKeepItemsInCache?()=>{}:e=>{for(const[t,n]of s.entries())e&&e.includes(t)||c(t,!1)}:s.clear.bind(s);const b=(e,t)=>{const n=s.get(e);if(!n)return null;const r=n.child;if(!r)return null;t?t.appendChild(r):r.remove()};let y=null;y=Array.isArray(e)?()=>{l(e),r.appendChildRaw(g.toFragment(e))}:()=>{const t=e.val();l(t),r.appendChildRaw(g.toFragment(t))};const g={toFragment:e=>{const t=document.createDocumentFragment();for(let n=0,r=e.length;n<r;n++)t.appendChild(m(e[n],i)),i++;return t},add:e=>{r.appendChildRaw(g.toFragment(e))},replace:e=>{l(e),r.appendChildRaw(g.toFragment(e))},set:y,reOrder:e=>{let t=null;const n=document.createDocumentFragment();for(const r of e)t=u(r),t&&n.appendChild(t);t=null,r.appendChildRaw(n)},removeOne:(e,t)=>{c(e,!0)},clear:l,populate:([e,t,n])=>{const o=document.createDocumentFragment();for(let r=0;r<t;r++){const t=n(r);e.push(t),o.append(m(t,r)),i++}r.appendChildRaw(o),o.replaceChildren()},unshift:e=>{r.insertAtStartRaw(g.toFragment(e))},splice:(t,n)=>{const[s,i,...a]=t;let l=null;const c=document.createDocumentFragment();if(n.length>0){const e=n[0];if(1===n.length)b(e,c);else if(n.length>1){const e=u(n[0]);l=e?.previousSibling;for(let e=0;e<n.length;e++)b(n[e],c)}}else{const t=s-1>=0?s-1:s,n=e.at(t);l=u(n)||o.previousSibling}c.replaceChildren(),a&&a.length&&l&&r.insertBeforeRaw(g.toFragment(a),l.nextSibling)},reverse:(e,t)=>{g.reOrder(t)},sort:(e,t)=>{g.reOrder(t)},remove:(e,t)=>{g.removeOne(t)},pop:(e,t)=>{g.removeOne(t)},shift:(e,t)=>{g.removeOne(t)},swap:(e,t)=>{const n=r.getParent();let o=u(t[0]),s=u(t[1]);if(!o||!s)return;const i=s.nextSibling;n.insertBefore(s,o),n.insertBefore(o,i),o=null,s=null}};g.merge=g.add,g.push=g.add;const v=(e,t,n={})=>{((e=null)=>{m=Ye.has(e)?a?p:h:s.size?d:a?p:h})(n.action),g[n.action]&&g[n.action](n.args,n.result)};return Array.isArray(e)?(v(0,0,{action:"set"}),r):(e.val().length&&v(e.val(),0,{action:"set"}),e.subscribe(v),r)},Form:Mt,Fragment:zr,H1:at,H2:lt,H3:ut,H4:ct,H5:ht,H6:pt,Header:Qt,HiddenInput:e=>Tt({type:"hidden",...e}),HideIf:function(e,t,n){const r=ue(!e.val());return e.subscribe(e=>r.set(!e)),Qe(r,t,n)},HideIfNot:function(e,t,n){return Qe(e,t,n)},Hr:gt,Img:tn,Input:Tt,Ins:Ct,Kbd:Sn,Label:rt,LazyImg:function(e,t){return tn(e,{...t,loading:"lazy"})},Legend:Vt,Li:cn,Link:ft,ListItem:un,Main:Ut,Mark:wt,Match:Xe,Menu:sn,Meter:Wt,MonthInput:e=>Tt({type:"month",...e}),NativeDocumentFragment:$e,Nav:Kt,NumberInput:e=>Tt({type:"number",...e}),Ol:hn,Option:Rt,OrderedList:an,Output:qt,P:ot,Paragraph:st,PasswordInput:e=>Tt({type:"password",...e}),Pre:mt,Progress:Bt,Quote:Nt,Radio:e=>Tt({type:"radio",...e}),RangeInput:e=>Tt({type:"range",...e}),ReadonlyInput:e=>Tt({readonly:!0,...e}),Samp:Cn,SearchInput:e=>Tt({type:"search",...e}),Section:Ht,Select:It,ShowIf:Qe,ShowWhen:function(){if(2===arguments.length){const[e,t]=arguments;if(!l.isObservableWhenResult(e))throw new r("showWhen observer must be an ObservableWhenResult",{data:e,help:"Use observer.when(target) to create an ObservableWhenResult"});return Qe(e,t)}if(3===arguments.length){const[e,t,n]=arguments;if(!l.isObservable(e))throw new r("showWhen observer must be an Observable",{data:e});return Qe(e.when(t),n)}throw new r("showWhen must have 2 or 3 arguments",{data:["showWhen(observer, target, view)","showWhen(observerWhenResult, view)"]})},SimpleButton:(e,t)=>zt(e,{type:"button",...t}),Small:$t,Source:mn,Span:nt,Strong:it,Sub:Ot,SubmitButton:(e,t)=>zt(e,{type:"submit",...t}),Summary:rn,Sup:Et,Svg:gn,SvgAnimate:Tr,SvgAnimateMotion:Lr,SvgAnimateTransform:kr,SvgCircle:jn,SvgClipPath:er,SvgDefs:Zn,SvgDesc:Rr,SvgEllipse:Bn,SvgFEBlend:hr,SvgFEColorMatrix:pr,SvgFEComponentTransfer:Nr,SvgFEComposite:dr,SvgFEConvolveMatrix:_r,SvgFEDiffuseLighting:wr,SvgFEDisplacementMap:$r,SvgFEDistantLight:Cr,SvgFEFlood:fr,SvgFEFuncA:Mr,SvgFEFuncB:Dr,SvgFEFuncG:Fr,SvgFEFuncR:xr,SvgFEGaussianBlur:mr,SvgFEMerge:br,SvgFEMergeNode:yr,SvgFEMorphology:Ar,SvgFEOffset:gr,SvgFEPointLight:Or,SvgFESpecularLighting:Sr,SvgFESpotLight:Er,SvgFETurbulence:vr,SvgFilter:cr,SvgForeignObject:sr,SvgG:Yn,SvgImage:or,SvgLine:Wn,SvgLinearGradient:ar,SvgMPath:Ir,SvgMarker:nr,SvgMask:tr,SvgMetadata:jr,SvgPath:Hn,SvgPattern:rr,SvgPolygon:Un,SvgPolyline:zn,SvgRadialGradient:lr,SvgRect:qn,SvgScript:Wr,SvgSet:Pr,SvgStop:ur,SvgStyle:Br,SvgSvg:Vn,SvgSwitch:ir,SvgSymbol:Xn,SvgTSpan:Jn,SvgText:Gn,SvgTextPath:Kn,SvgTitle:Vr,SvgUse:Qn,SvgView:qr,Switch:et,TBody:Fn,TBodyCell:Pn,TFoot:xn,TFootCell:Ln,THead:Nn,THeadCell:kn,TRow:Mn,Table:_n,Td:In,TelInput:e=>Tt({type:"tel",...e}),TextArea:kt,TextInput:Lt,Th:Tn,Time:vn,TimeInput:e=>Tt({type:"time",...e}),Tr:Dn,Track:bn,Ul:pn,UnorderedList:ln,UrlInput:e=>Tt({type:"url",...e}),Var:On,Video:fn,Wbr:En,WeekInput:e=>Tt({type:"week",...e}),When:function(e){if(!l.isObservable(e))throw new r("When : condition must be an Observable");let t=null,n=null;return{show(e){return t=e,this},otherwise:r=>(n=r,et(e,t,n)),toNdElement:()=>et(e,t,n)}},createPortal:function(e,{parent:t,name:n="unnamed"}={}){const r=$e("Portal "+n);return r.appendChild(ge.getChild(e)),(t||document.body).appendChild(r),r}});const Hr={id:"[0-9]+",uuid:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",slug:"[a-z0-9]+(?:-[a-z0-9]+)*",hash:"[a-f0-9]{32,64}",alpha:"[a-zA-Z]+",alphanum:"[a-zA-Z0-9]+",string:"[^/]+",any:".*",int:"[0-9]+",float:"[0-9]+\\.[0-9]+",number:"[0-9]+(\\.[0-9]+)?",positive:"[1-9][0-9]*",locale:"[a-z]{2}(-[A-Z]{2})?",lang:"[a-z]{2}",token:"[A-Za-z0-9_\\-]+"};function Gr(e,t,n={}){e="/"+d(e,"/").replace(/\/+/,"/");let r=null;const o=n.name||null,s=n.middlewares||[],i=n.shouldRebuild||!1,a=n.with||{},l=n.layout||null,u={},c=[],h=e=>{if(!e)return null;const[t,n]=e.split(":");let r=a[t];return!r&&n&&(r=Hr[n]),r||(r="[^/]+"),r=r.replace("(","(?:"),{name:t,pattern:`(${r})`}},p=()=>{if(r)return r;const t=e.replace(/\{(.*?)}/gi,(e,t)=>{const n=h(t);return n&&n.pattern?(u[n.name]=n.pattern,c.push(n.name),n.pattern):e});return r=new RegExp("^"+t+"$"),r};this.name=()=>o,this.component=()=>t,this.middlewares=()=>s,this.shouldRebuild=()=>i,this.path=()=>e,this.layout=()=>l,this.match=function(e){e="/"+d(e,"/");if(!p().exec(e))return!1;const t={};return p().exec(e).forEach((e,n)=>{if(n<1)return;const r=c[n-1];t[r]=e}),t},this.url=function(t){const n=e.replace(/\{(.*?)}/gi,(e,n)=>{const r=h(n);if(t.params&&t.params[r.name])return t.params[r.name];throw new Error(`Missing parameter '${r.name}'`)}),r="object"==typeof t.query?new URLSearchParams(t.query).toString():null;return(t.basePath?t.basePath:"")+(r?`${n}?${r}`:n)}}class Jr extends Error{constructor(e,t){super(e),this.context=t}}const Kr=(e,t)=>{const n=[];return e.forEach(e=>{n.push(d(e.suffix,"/"))}),n.push(d(t,"/")),n.join("/")},Yr=(e,t)=>{const n=[];return e.forEach(e=>{e.options.middlewares&&n.push(...e.options.middlewares)}),t&&n.push(...t),n},Zr=(e,t)=>{const n=[];return e.forEach(e=>{e.options?.name&&n.push(e.options.name)}),t&&n.push(t),n.join(".")},Qr=e=>{for(let t=e.length-1;t>=0;t--)if(e[t]?.options?.layout)return e[t].options.layout;return null};function Xr(){const e=[];let t=0;const n=n=>{const o=t+n;if(!e[o])return;t=o;const{route:s,params:i,query:a,path:l}=e[o];r(l)},r=e=>{window.location.replace(`${window.location.pathname}${window.location.search}#${e}`)},o=()=>window.location.hash.slice(1);this.push=function(n){const{route:s,params:i,query:a,path:l}=this.resolve(n);l!==o()&&(e.splice(t+1),e.push({route:s,params:i,query:a,path:l}),t++,r(l))},this.replace=function(n){const{route:r,params:s,query:i,path:a}=this.resolve(n);a!==o()&&(e[t]={route:r,params:s,query:i,path:a})},this.forward=function(){return t<e.length-1&&n(1)},this.back=function(){return t>0&&n(-1)},this.init=function(n){window.addEventListener("hashchange",()=>{const{route:e,params:t,query:n,path:r}=this.resolve(o());this.handleRouteChange(e,t,n,r)});const{route:r,params:s,query:i,path:a}=this.resolve(n||o());e.push({route:r,params:s,query:i,path:a}),t=0,this.handleRouteChange(r,s,i,a)}}function eo(){this.push=function(e){try{const{route:t,path:n,params:r,query:o}=this.resolve(e);if(window.history.state&&window.history.state.path===n)return;window.history.pushState({name:t.name(),params:r,path:n},t.name()||n,n),this.handleRouteChange(t,r,o,n)}catch(e){n.error("HistoryRouter","Error in pushState",e)}},this.replace=function(e){const{route:t,path:r,params:o}=this.resolve(e);try{window.history.replaceState({name:t.name(),params:o,path:r},t.name()||r,r),this.handleRouteChange(t,o,{},r)}catch(e){n.error("HistoryRouter","Error in replaceState",e)}},this.forward=function(){window.history.forward()},this.back=function(){window.history.back()},this.init=function(e){window.addEventListener("popstate",e=>{try{if(!e.state||!e.state.path)return;const t=e.state.path,{route:n,params:r,query:o,path:s}=this.resolve(t);if(!n)return;this.handleRouteChange(n,r,o,s)}catch(e){n.error("HistoryRouter","Error in popstate event",e)}});const{route:t,params:r,query:o,path:s}=this.resolve(e||window.location.pathname+window.location.search);this.handleRouteChange(t,r,o,s)}}function to(){const e=[];let t=0;const n=n=>{const r=t+n;if(!e[r])return;t=r;const{route:o,params:s,query:i,path:a}=e[r];this.handleRouteChange(o,s,i,a)};this.push=function(n){const{route:r,params:o,query:s,path:i}=this.resolve(n);e[t]&&e[t].path===i||(e.splice(t+1),e.push({route:r,params:o,query:s,path:i}),t++,this.handleRouteChange(r,o,s,i))},this.replace=function(n){const{route:r,params:o,query:s,path:i}=this.resolve(n);e[t]={route:r,params:o,query:s,path:i},this.handleRouteChange(r,o,s,i)},this.forward=function(){return t<e.length-1&&n(1)},this.back=function(){return t>0&&n(-1)},this.init=function(n){const r=n||window.location.pathname+window.location.search,{route:o,params:s,query:i,path:a}=this.resolve(r);e.push({route:o,params:s,query:i,path:a}),t=0,this.handleRouteChange(o,s,i,a)}}function no(e,t){const n=new Map,r=new WeakMap,o=new WeakMap;let s=null,i=null;const a=new Map;let u=null;const c=(e,t)=>{const n=o.get(e);if(n)return n;let r=e;return l.isAnchor(e)||(r=$e(t),r.appendChild(e)),o.set(e,r),r},h=()=>{i?.remove()},p=()=>{t.nodeValue="",h(),s&&s.remove()},d=e=>{let t=e;return l.isNDElement(e)&&(t=e.node()),t},f=function(e,n,o){const a=n.layout();if(a)return void((e,n,o,a)=>{const l=d(n),u=r.get(l);if(u){if(u===s){const e=c(l,a);return h(),i=l,void e.replaceContent(l)}return p(),i=l,s=u,c(l,a).replaceContent(l),void t.appendChild(s)}p(),i=l;const f=c(l,a);s=ge.getChild(e(f)),r.set(l,s),t.appendChild(s)})(a,e,0,o);const l=d(e);p(),t.appendChild(l),i=e},m=function(e){if(!e.route)return;const{route:t,params:r,query:o,path:s}=e;if(u&&u!==s&&a.get(u)?.onLeave?.(),n.has(s)){const e=n.get(s);return f(e,t),a.get(s)?.onEnter?.(r,o),void(u=s)}const i={};a.set(s,i);const l=t.component()({params:r,query:o,onEnter:e=>{i.onEnter=e},onLeave:e=>{i.onLeave=e}});n.set(s,l),f(l,t,s),i.onEnter?.(r,o),u=s};return e.subscribe(m),m(e.currentState()),t}const ro="default";function oo(e={}){const t=[],r={},o=[],s=[],i={route:null,params:null,query:null,path:null,hash:null};if("hash"===e.mode)Xr.apply(this,[]);else if("history"===e.mode)eo.apply(this,[]);else{if("memory"!==e.mode)throw new Jr("Invalid router mode "+e.mode);to.apply(this,[])}const a=function(e,t){for(const r of s)try{r(e),t&&t(e)}catch(e){n.warn("Route Listener","Error in listener:",e)}};this.routes=()=>[...t],this.currentState=()=>({...i}),this.add=function(e,n,s){const i=new Gr(Kr(o,e),n,{...s,middlewares:Yr(o,s?.middlewares||[]),name:s?.name?Zr(o,s.name):null,layout:s?.layout||Qr(o)});return t.push(i),i.name()&&(r[i.name()]=i),this},this.group=function(e,t,n){if(!l.isFunction(n))throw new Jr("Callback must be a function");return o.push({suffix:e,options:t}),n(),o.pop(),this},this.generateUrl=function(e,t={},n={}){const o=r[e];if(!o)throw new Jr(`Route not found for name: ${e}`);return o.url({params:t,query:n})},this.resolve=function(e){if("string"==typeof e){const t=r[e];if(t)return{route:t,params:[],query:[],path:t.url({name:e})}}if(l.isJson(e)){const t=r[e.name];if(!t)throw new Jr(`Route not found for name: ${e.name}`);return{route:t,params:e.params,query:e.query,path:t.url({...e})}}const[n,o]=e.split("?"),s="/"+d(n,"/");let i,a=null;for(const e of t)if(i=e.match(s),i){a=e;break}if(!a)throw new Jr(`Route not found for url: ${n}`);const u={};if(o){const e=new URLSearchParams(o).entries();for(const[t,n]of e)u[t]=n}return{route:a,params:i,query:u,path:e}},this.subscribe=function(e){if(!l.isFunction(e))throw new Jr("Listener must be a function");return s.push(e),()=>{s.splice(s.indexOf(e),1)}},this.handleRouteChange=function(e,t,n,r){i.route=e,i.params=t,i.query=n,i.path=r;const o=[...e.middlewares(),a];let s=0;const l={...i},u=e=>{if(s++,!(s>=o.length))return o[s](e||l,u)};return o[s](l,u)}}function so(e,t){const{to:n,href:r,...o}=e;if(r){const e=oo.get();return ft({...o,href:r},t).nd.onPreventClick(()=>{e.push(r)})}const s="string"==typeof n?{name:n}:n,i=s.router||ro,a=oo.get(i);if(!a)throw new Jr('Router not found "'+i+'" for link "'+s.name+'"');const l=a.generateUrl(s.name,s.params,s.query);return ft({...o,href:l},t).nd.onPreventClick(()=>{a.push(l)})}oo.routers={},oo.create=function(e,t){if(!l.isFunction(t))throw n.error("Router","Callback must be a function"),new Jr("Callback must be a function");const r=new oo(e);return oo.routers[e.name||ro]=r,t(r),r.init(e.entry),r.mount=function(e){if(l.isString(e)){const t=document.querySelector(e);if(!t)throw new Jr(`Container not found for selector: ${e}`);e=t}else if(!l.isElement(e))throw new Jr("Container must be a string or an Element");return no(r,e)},r},oo.get=function(e){const t=oo.routers[e||ro];if(!t)throw new Jr(`Router not found for name: ${e}`);return t},oo.push=function(e,t=null){return oo.get(t).push(e)},oo.replace=function(e,t=null){return oo.get(t).replace(e)},oo.forward=function(e=null){return oo.get(e).forward()},oo.back=function(e=null){return oo.get(e).back()},oo.redirectTo=function(e,t=null,n=null){let r=e;const o=oo.get(n);return o.resolve({name:e,params:t})&&(r={name:e,params:t}),o.push(r)},so.blank=function(e,t){return ft({...e,target:"_blank"},t)};var io=Object.freeze({__proto__:null,Link:so,RouteParamPatterns:Hr,Router:oo});var ao=Object.freeze({__proto__:null,memoize:e=>Ue(e),once:e=>ze(e),singleton:e=>We(e)}),lo=Object.freeze({__proto__:null,Cache:ao,NativeFetch:function(e){const t={request:[],response:[]};this.interceptors={response:e=>{t.response.push(e)},request:e=>{t.request.push(e)}},this.fetch=async function(n,r,o={},s={}){if(s.formData){const e=new FormData;for(const t in o)e.append(t,o[t]);o=e}r.startsWith("http")||(r=(e.endsWith("/")?e:e+"/")+r);let i={method:n,headers:{...s.headers||{}}};if(o)if(o instanceof FormData)i.body=o;else if("GET"!==n)i.headers["Content-Type"]="application/json",i.body=JSON.stringify(o);else{const e=new URLSearchParams(o).toString();e&&(r=r+(r.includes("?")?"&":"?")+e)}for(const e of t.request)i=await e(i,r)||i;let a=await fetch(r,i);for(const e of t.response)a=await e(a,r)||a;const l=(a.headers.get("content-type")||"").includes("application/json")?await a.json():await a.text();if(!a.ok){const e=new Error(l?.message||a.statusText);throw e.status=a.status,e.data=l,e}return l},this.post=function(e,t={},n={}){return this.fetch("POST",e,t,n)},this.put=function(e,t={},n={}){return this.fetch("PUT",e,t,n)},this.delete=function(e,t={},n={}){return this.fetch("DELETE",e,t,n)},this.get=function(e,t={},n={}){return this.fetch("GET",e,t,n)}},classPropertyAccumulator:Be,cssPropertyAccumulator:qe,filters:U});return e.$=ce,e.ElementCreator=ge,e.HtmlElementWrapper=Le,e.NDElement=Oe,e.Observable=ue,e.PluginsManager=null,e.SingletonView=je,e.Store=Je,e.StoreFactory=Ge,e.TemplateCloner=Re,e.Validator=l,e.autoMemoize=Ue,e.autoOnce=ze,e.classPropertyAccumulator=Be,e.createTextNode=Te,e.cssPropertyAccumulator=qe,e.elements=Ur,e.memoize=e=>{const t=new Map;return(...n)=>{const[r,...o]=n,s=t.get(r);if(s)return s;const i=e(...o);return t.set(r,i),i}},e.normalizeComponentArgs=Se,e.obs=he,e.once=We,e.router=io,e.useCache=function(e){let t=null,n=r=>{t=new Re(e);const o=t.clone(r);return n=t.clone,o};return e.length<2?(...e)=>n(e):(e,t,...r)=>n([e,t,...r])},e.useSingleton=function(e){let t=null;return function(...n){return t||(t=new je(e)),t.render(n)}},e.utils=lo,e.withValidation=we,e}({});
|
|
1
|
+
var NativeDocument=function(e){"use strict";let t={};t={log(){},warn(){},error(){},disable(){}};var n=t;class r extends Error{constructor(e,t={}){super(e),this.name="NativeDocumentError",this.context=t,this.timestamp=(new Date).toISOString()}}const o=3,s=8,i=11,a=[];a[1]=!0,a[o]=!0,a[i]=!0,a[s]=!0;const l={isObservable:e=>e&&(e.__$isObservable||e.__$Observable),isTemplateBinding:e=>e?.__$isTemplateBinding,isObservableWhenResult:e=>e&&(e.__$isObservableWhen||"object"==typeof e&&"$target"in e&&"$observer"in e),isArrayObservable:e=>e?.__$isObservableArray,isProxy:e=>e?.__isProxy__,isObservableOrProxy:e=>e?.__$Observable,isAnchor:e=>e?.__Anchor__,isObservableChecker:e=>e?.__$isObservableChecker,isArray:e=>Array.isArray(e),isString:e=>"string"==typeof e,isNumber:e=>"number"==typeof e,isBoolean:e=>"boolean"==typeof e,isFunction:e=>"function"==typeof e,isAsyncFunction:e=>"function"==typeof e&&"AsyncFunction"===e.constructor.name,isObject:e=>"object"==typeof e&&null!==e,isJson:e=>!("object"!=typeof e||null===e||Array.isArray(e)||"Object"!==e.constructor.name),isElement:e=>e&&a[e.nodeType],isDOMNode:e=>a[e.nodeType],isFragment:e=>e?.nodeType===i,isStringOrObservable(e){return this.isString(e)||this.isObservable(e)},isValidChild(e){return null===e||this.isElement(e)||e.__$Observable||e?.__$isNDElement||["string","number","boolean"].includes(typeof e)},isNDElement:e=>e?.__$isNDElement,isValidChildren(e){Array.isArray(e)||(e=[e]);return 0===e.filter(e=>!this.isValidChild(e)).length},validateChildren(e){Array.isArray(e)||(e=[e]);const t=e.filter(e=>!this.isValidChild(e));if(t.length>0)throw new r(`Invalid children detected: ${t.map(e=>typeof e).join(", ")}`);return e},containsObservables:e=>!!e&&(l.isObject(e)&&Object.values(e).some(e=>l.isObservable(e))),containsObservableReference:e=>!(!e||"string"!=typeof e)&&/\{\{#ObItem::\([0-9]+\)\}\}/.test(e),validateAttributes(e){},validateEventCallback(e){if("function"!=typeof e)throw new r("Event callback must be a function")}},u=new Set(["checked","selected","disabled","readonly","required","autofocus","multiple","autocomplete","hidden","contenteditable","spellcheck","translate","draggable","async","defer","autoplay","controls","loop","muted","download","reversed","open","default","formnovalidate","novalidate","scoped","itemscope","allowfullscreen","allowpaymentrequest","playsinline"]),c={allowfullscreen:"allowFullscreen",allowpaymentrequest:"allowPaymentRequest",async:"async",autocomplete:"autocomplete",autofocus:"autofocus",autoplay:"autoplay",checked:"checked",controls:"controls",default:"default",defer:"defer",disabled:"disabled",download:"download",draggable:"draggable",formnovalidate:"formNoValidate",contenteditable:"contentEditable",hidden:"hidden",itemscope:"itemScope",loop:"loop",multiple:"multiple",muted:"muted",novalidate:"noValidate",open:"open",playsinline:"playsInline",readonly:"readOnly",required:"required",reversed:"reversed",scoped:"scoped",selected:"selected",spellcheck:"spellcheck",translate:"translate"},h=function(){let e=0;const t=new Map;return{register(n){const r=++e;return t.set(r,new WeakRef(n)),r},unregister(e){t.delete(e)},getObservableById:e=>t.get(e)?.deref(),cleanup(){for(const[e,n]of t){const e=n.deref();e&&e.cleanup()}t.clear()},cleanObservables(e){if(t.size<e)return;let r=0;for(const[e,n]of t)n.deref()||(t.delete(e),r++);r>0&&n.log("Memory Auto Clean",`🧹 Cleaned ${r} orphaned observables`)}}}();const p=function(e){let t=!1;return function(...n){t||(t=!0,Promise.resolve().then(()=>{e.apply(this,n),t=!1}))}},d=function(e,t){return e.replace(new RegExp(`^[${t}]+|[${t}]+$`,"g"),"")},f=(e,t)=>{try{if(void 0!==window.structuredClone)return window.structuredClone(e)}catch(e){}if(null===e||"object"!=typeof e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e))return e.map(e=>f(e));if(l.isObservable(e))return t&&t(e),e;const n={};for(const t in e)Object.hasOwn(e,t)&&(n[t]=f(e[t]));return n},m={getJson(e){const t=localStorage.getItem(e);try{return JSON.parse(t)}catch(t){throw new r("invalid_json:"+e)}},getNumber(e){return Number(this.get(e))},getBool(e){const t=this.get(e);return"true"===t||"1"===t},setJson(e,t){localStorage.setItem(e,JSON.stringify(t))},setBool(e,t){localStorage.setItem(e,t?"true":"false")},get:(e,t=null)=>localStorage.getItem(e)||t,set:(e,t)=>localStorage.setItem(e,t),remove(e){localStorage.removeItem(e)},has:e=>null!=localStorage.getItem(e)},b=(e,t)=>{if(!m.has(e))return t;switch(typeof t){case"object":return m.getJson(e)??t;case"boolean":return m.getBool(e)??t;case"number":return m.getNumber(e)??t;default:return m.get(e,t)??t}},y=e=>{switch(typeof e){case"object":return m.setJson;case"boolean":return m.setBool;default:return m.set}};function g(e,t=null){e=l.isObservable(e)?e.val():e,this.$previousValue=null,this.$currentValue=e,this.$firstListener=null,this.$listeners=null,this.$watchers=null,this.$memoryId=null,t&&(this.configs=t,t.reset&&(this.$initialValue=l.isObject(e)?f(e):e))}Object.defineProperty(g.prototype,"$value",{get(){return this.$currentValue},set(e){this.set(e)},configurable:!0}),g.prototype.__$Observable=!0,g.prototype.__$isObservable=!0,g.computed=()=>{};const v=function(){};g.prototype.intercept=function(e){return this.$interceptor=e,this.set=this.$setWithInterceptor,this},g.prototype.interceptMutations=function(e){return this.$mutationInterceptor=e,this},g.prototype.triggerFirstListener=function(e){this.$firstListener(this.$currentValue,this.$previousValue,e)},g.prototype.triggerListeners=function(e){const t=this.$listeners,n=this.$previousValue,r=this.$currentValue;for(let o=0,s=t.length;o<s;o++)t[o](r,n,e)},g.prototype.triggerWatchers=function(e){const t=this.$watchers,n=this.$previousValue,r=this.$currentValue,o=t.get(r),s=t.get(n);o&&o(!0,n,e),s&&s(!1,r,e)},g.prototype.triggerAll=function(e){this.triggerWatchers(e),this.triggerListeners(e)},g.prototype.triggerWatchersAndFirstListener=function(e){this.triggerWatchers(e),this.triggerFirstListener(e)},g.prototype.assocTrigger=function(){if(this.$firstListener=null,this.$watchers?.size&&this.$listeners?.length)return this.$firstListener=this.$listeners[0],this.trigger=0===this.$firstListener.length?this.$firstListener:this.triggerFirstListener,void(this.trigger=1===this.$listeners.length?this.triggerWatchersAndFirstListener:this.triggerAll);this.$listeners?.length?1===this.$listeners.length?(this.$firstListener=this.$listeners[0],this.trigger=0===this.$firstListener.length?this.$firstListener:this.triggerFirstListener):this.trigger=this.triggerListeners:this.$watchers?.size?this.trigger=this.triggerWatchers:this.trigger=v},g.prototype.trigger=v;const $={action:"set"};function w(e){return e instanceof Date?e:new Date(e)}function S(e,t){const n=w(e),r=w(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()}function C(e){const t=w(e);return 3600*t.getHours()+60*t.getMinutes()+t.getSeconds()}function O(e,t){const n=l.isObservable(e);return{dependencies:n?e:null,callback:r=>t(r,n?e.val():e)}}function E(e,t){const n=e.filter(l.isObservable);return{dependencies:n.length>0?n:null,callback:n=>t(n,e.map(e=>l.isObservable(e)?e.val():e))}}function A(e){return O(e,(e,t)=>e===t)}function _(e){return O(e,(e,t)=>e!==t)}function N(e){return O(e,(e,t)=>e>t)}function x(e){return O(e,(e,t)=>e>=t)}function F(e){return O(e,(e,t)=>e<t)}function D(e){return O(e,(e,t)=>e<=t)}function M(e,t=!0,r=""){return E([e,t,r],(e,[t,r,o])=>{if(!t)return!0;if(r)try{return new RegExp(t,o).test(String(e))}catch(e){return n.warn("Invalid regex pattern:",t,e),!1}return o&&""!==o?String(e).includes(String(t)):String(e).toLowerCase().includes(String(t).toLowerCase())})}function T(...e){const t=e.flatMap(e=>e.dependencies?Array.isArray(e.dependencies)?e.dependencies:[e.dependencies]:[]).filter(l.isObservable);return{dependencies:t.length>0?t:null,callback:t=>e.every(e=>e.callback(t))}}function k(...e){const t=e.flatMap(e=>e.dependencies?Array.isArray(e.dependencies)?e.dependencies:[e.dependencies]:[]).filter(l.isObservable);return{dependencies:t.length>0?t:null,callback:t=>e.some(e=>e.callback(t))}}g.prototype.$updateWithNewValue=function(e){e=e?.__$isObservable?e.val():e,this.$currentValue!==e&&(this.$previousValue=this.$currentValue,this.$currentValue=e,this.trigger($),this.$previousValue=null)},g.prototype.$setWithInterceptor=function(e){let t="function"==typeof e?e(this.$currentValue):e;const n=this.$interceptor(t,this.$currentValue);void 0!==n&&(t=n),this.$updateWithNewValue(t)},g.prototype.$basicSet=function(e){const t="function"==typeof e?e(this.$currentValue):e;this.$updateWithNewValue(t)},g.prototype.set=g.prototype.$basicSet,g.prototype.val=function(){return this.$currentValue},g.prototype.disconnectAll=function(){this.$previousValue=null,this.$currentValue=null,this.$listeners=null,this.$watchers=null,this.trigger=v},g.prototype.onCleanup=function(e){this.$cleanupListeners=this.$cleanupListeners??[],this.$cleanupListeners.push(e)},g.prototype.cleanup=function(){if(this.$cleanupListeners){for(let e=0;e<this.$cleanupListeners.length;e++)this.$cleanupListeners[e]();this.$cleanupListeners=null}h.unregister(this.$memoryId),this.disconnectAll(),delete this.$value},g.prototype.subscribe=function(e){this.$listeners=this.$listeners??[],this.$listeners.push(e),this.assocTrigger()},g.prototype.on=function(e,t){this.$watchers=this.$watchers??new Map;let n=this.$watchers.get(e);t.__$isObservable&&(t=t.set.bind(t)),n?l.isArray(n.list)?n.list.push(t):(n=[n,t],t=e=>{for(let t=0,r=n.length;t<r;t++)n[t](e)},t.list=n,this.$watchers.set(e,t)):(n=t,this.$watchers.set(e,t)),this.assocTrigger()},g.prototype.off=function(e,t){if(!this.$watchers)return;const n=this.$watchers.get(e);if(!n)return;if(!t||!Array.isArray(n.list))return this.$watchers?.delete(e),void this.assocTrigger();const r=n.indexOf(t);n?.splice(r,1),1===n.length?this.$watchers.set(e,n[0]):0===n.length&&this.$watchers?.delete(e),this.assocTrigger()},g.prototype.once=function(e,t){const n="function"==typeof e?e:t=>t===e,r=e=>{n(e)&&(this.unsubscribe(r),t(e))};this.subscribe(r)},g.prototype.unsubscribe=function(e){if(!this.$listeners)return;const t=this.$listeners.indexOf(e);t>-1&&this.$listeners.splice(t,1),this.assocTrigger()},g.prototype.get=function(e){const t=this.$currentValue[e];return l.isObservable(t)?t.val():t},g.prototype.equals=function(e){return l.isObservable(e)?this.$currentValue===e.$currentValue:this.$currentValue===e},g.prototype.toBool=function(){return!!this.$currentValue},g.prototype.toggle=function(){this.set(!this.$currentValue)},g.prototype.reset=function(){if(!this.configs?.reset)return;const e=l.isObject(this.$initialValue)?f(this.$initialValue,e=>{e.reset()}):this.$initialValue;this.set(e)},g.prototype.toString=function(){return String(this.$currentValue)},g.prototype.valueOf=function(){return this.$currentValue},g.prototype.persist=function(e,t={}){let n=b(e,this.$currentValue);t.get&&(n=t.get(n)),this.set(n);const r=y(this.$currentValue);return this.subscribe(n=>{r(e,t.set?t.set(n):n)}),this},g.prototype.clone=function(){let e=this.$currentValue;return e&&"object"==typeof e&&(e="function"==typeof e.clone?e.clone():structuredClone(e)),new g(e)};const L=N,I=x,P=F,R=D,V=A,j=_,q=T,B=k;function W(e,t=!1){return O(e,(e,n)=>!!e&&(!n||(t?String(e).includes(String(n)):String(e).toLowerCase().includes(String(n).toLowerCase()))))}const z=W;var U=Object.freeze({__proto__:null,all:q,and:T,any:B,between:function(e,t){return E([e,t],(e,[t,n])=>e>=t&&e<=n)},contains:z,createFilter:O,createMultiSourceFilter:E,custom:function(e,...t){const n=t.filter(l.isObservable);return{dependencies:n.length>0?n:null,callback:n=>{const r=t.map(e=>l.isObservable(e)?e.val():e);return e(n,...r)}}},dateAfter:e=>O(e,(e,t)=>!(!e||!t)&&w(e)>w(t)),dateBefore:e=>O(e,(e,t)=>!(!e||!t)&&w(e)<w(t)),dateBetween:(e,t)=>E([e,t],(e,[t,n])=>{if(!e||!t||!n)return!1;const r=w(e);return r>=w(t)&&r<=w(n)}),dateEquals:e=>O(e,(e,t)=>!(!e||!t)&&S(e,t)),dateTimeAfter:e=>O(e,(e,t)=>!(!e||!t)&&w(e)>w(t)),dateTimeBefore:e=>O(e,(e,t)=>!(!e||!t)&&w(e)<w(t)),dateTimeBetween:(e,t)=>E([e,t],(e,[t,n])=>{if(!e||!t||!n)return!1;const r=w(e);return r>=w(t)&&r<=w(n)}),dateTimeEquals:e=>O(e,(e,t)=>!(!e||!t)&&w(e).getTime()===w(t).getTime()),endsWith:function(e,t=!1){return O(e,(e,n)=>!n||(t?String(e).endsWith(String(n)):String(e).toLowerCase().endsWith(String(n).toLowerCase())))},eq:V,equals:A,getSecondsOfDay:C,greaterThan:N,greaterThanOrEqual:x,gt:L,gte:I,inArray:function(e){return O(e,(e,t)=>t.includes(e))},includes:W,isEmpty:function(e=!0){return O(e,(e,t)=>{const n=!e||""===e||Array.isArray(e)&&0===e.length;return t?n:!n})},isNotEmpty:function(e=!0){return O(e,(e,t)=>{const n=!!e&&""!==e&&(!Array.isArray(e)||e.length>0);return t?n:!n})},isSameDay:S,lessThan:F,lessThanOrEqual:D,lt:P,lte:R,match:M,neq:j,not:function(e){return{dependencies:e.dependencies,callback:t=>!e.callback(t)}},notEquals:_,notIn:function(e){return O(e,(e,t)=>!t.includes(e))},or:k,startsWith:function(e,t=!1){return O(e,(e,n)=>!n||(t?String(e).startsWith(String(n)):String(e).toLowerCase().startsWith(String(n).toLowerCase())))},timeAfter:e=>O(e,(e,t)=>!(!e||!t)&&C(e)>C(t)),timeBefore:e=>O(e,(e,t)=>!(!e||!t)&&C(e)<C(t)),timeBetween:(e,t)=>E([e,t],(e,[t,n])=>{if(!e||!t||!n)return!1;const r=C(e);return r>=C(t)&&r<=C(n)}),timeEquals:e=>O(e,(e,t)=>{if(!e||!t)return!1;const n=w(e),r=w(t);return n.getHours()===r.getHours()&&n.getMinutes()===r.getMinutes()&&n.getSeconds()===r.getSeconds()}),toDate:w});const H=function(e,t=null){if(!Array.isArray(e))throw new r("Observable.array : target must be an array");g.call(this,e,t)};(H.prototype=Object.create(g.prototype)).constructor=H,H.prototype.__$isObservableArray=!0,Object.defineProperty(H.prototype,"length",{get(){return this.$currentValue.length}}),H.prototype.$mutate=function(e,t,n){if(this.$mutationInterceptor){const n=this.$mutationInterceptor(t,{action:e});void 0!==t&&(t=n)}n(t)},["push","pop","shift","unshift","reverse","sort","splice"].forEach(e=>{H.prototype[e]=function(...t){return this.$mutate(e,t,t=>{const n=this.$currentValue[e].apply(this.$currentValue,t);return this.trigger({action:e,args:t,result:n}),n})}}),["map","forEach","filter","reduce","some","every","find","findIndex","concat","includes","indexOf"].forEach(e=>{H.prototype[e]=function(...t){return this.$currentValue[e].apply(this.$currentValue,t)}});const G={action:"clear"};H.prototype.clear=function(){if(0!==this.$currentValue.length)return this.$mutate("clear",[],()=>{this.$currentValue.length=0,this.trigger(G)}),!0},H.prototype.at=function(e){return this.$currentValue[e]},H.prototype.merge=function(e){this.$mutate("merge",e,e=>{this.$currentValue.push.apply(this.$currentValue,e),this.trigger({action:"merge",args:e})})},H.prototype.count=function(e){let t=0;return this.$currentValue.forEach((n,r)=>{e(n,r)&&t++}),t},H.prototype.swap=function(e,t){return this.$mutate("swap",[e,t],([e,t])=>{const n=this.$currentValue,r=n.length;if(t<e){const n=e;e=t,t=n}if(r<e||r<t)return!1;const o=n[e],s=n[t];n[e]=s,n[t]=o,this.trigger({action:"swap",args:[e,t],result:[o,s]})}),!0},H.prototype.swapItems=function(e,t){const n=this.$currentValue.indexOf(e),r=this.$currentValue.indexOf(t);return this.swap(n,r)},H.prototype.insertAfter=function(e,t){const n=this.$currentValue.indexOf(t);return this.splice(n+1,0,e)},H.prototype.remove=function(e){let t=[];return this.$mutate("remove",[e],([e])=>{t=this.$currentValue.splice(e,1),0!==t.length&&this.trigger({action:"remove",args:[e],result:t[0]})}),t},H.prototype.removeItem=function(e){const t=this.$currentValue.indexOf(e);return-1===t?[]:this.remove(t)},H.prototype.empty=function(){return 0===this.$currentValue.length},H.prototype.populateAndRender=function(e,t){this.trigger({action:"populate",args:[this.$currentValue,e,t]})},H.prototype.where=function(e){"function"==typeof e&&(e={_:e});const t=this,n=[t],r={};for(const[t,o]of Object.entries(e)){const e=l.isObservable(o)?M(o,!1):o;if(e&&"object"==typeof e&&"callback"in e){if(r[t]=e.callback,e.dependencies){const t=Array.isArray(e.dependencies)?e.dependencies:[e.dependencies];n.push.apply(n,t)}}else r[t]="function"==typeof e?e:t=>t===e}const o=new H([]),s=Object.entries(r),i=()=>{const e=t.val().filter(e=>{for(const[t,n]of s)if("_"===t){if(!n(e))return!1}else if(!n(e[t]))return!1;return!0});o.set(e)};return n.forEach(e=>e.subscribe(i)),i(),o},H.prototype.whereSome=function(e,t){return this.where({_:{dependencies:t.dependencies,callback:n=>e.some(e=>t.callback(n[e]))}})},H.prototype.whereEvery=function(e,t){return this.where({_:{dependencies:t.dependencies,callback:n=>e.every(e=>t.callback(n[e]))}})},H.prototype.deepSubscribe=function(e){const t=p(()=>e(this.val())),n=new WeakMap,r=e=>{n.has(e)||(e?.__$isObservableArray?n.set(e,e.deepSubscribe(t)):e?.__$isObservable&&(e.subscribe(t),n.set(e,()=>e.unsubscribe(t))))},o=e=>{const t=n.get(e);t&&(t(),n.delete(e))};return this.$currentValue.forEach(r),this.subscribe(t),this.subscribe((e,t,n)=>{switch(n?.action){case"push":case"unshift":case"merge":n.args.forEach(r);break;case"splice":{const[e,t,...s]=n.args;n.result?.forEach(o),s.forEach(r);break}case"remove":o(n.result);break;case"clear":this.$currentValue.forEach(o)}}),()=>{this.$currentValue.forEach(o)}},H.prototype.sync=function(e){if(!e||!e.__$isObservableArray)throw new r("ObservableArray.sync : target must be an ObservableArray");e.set([...this.$currentValue]);const t=(t,n,r)=>{if(!r)return void e.set([...t]);const{action:o,args:s}=r;e[o].apply(e,s)};return this.subscribe(t),()=>this.unsubscribe(t)},H.prototype.clone=function(){return new H(this.resolve())},H.prototype.isNotEmpty=function(){return this.is(e=>e.length>0)};const J=function(e,t){g.call(this,e),this.$observables={},this.configs=t;for(const t in e)Object.hasOwn(this,t)||Object.defineProperty(this,t,{get:()=>this.$observables[t],set:e=>{this.$observables[t].set(e)},configurable:!0,enumerable:!0});this.$load(e),Object.defineProperty(this,"$currentValue",{get:function(){return this.val()},set(e){this.set(e)}})};J.prototype=Object.create(g.prototype),Object.defineProperty(J,"$value",{get(){return this.val()},set(e){this.set(e)}}),J.prototype.__$isObservableObject=!0,J.prototype.__isProxy__=!0,J.prototype.$load=function(e){const t=this.configs;for(const n in e){const r=e[n];if(Array.isArray(r)){if(!1!==t?.deep){const e=r.map(e=>l.isJson(e)?new J(e,t):l.isArray(e)?new H(e,t):new g(e,t));this.$observables[n]=new H(e,t);continue}this.$observables[n]=new H(r,t)}else this.$observables[n]=r?.__$Observable?r:l.isJson(r)?new J(r,t):new g(r,t)}},J.prototype.val=function(){const e={};for(const t in this.$observables){const n=this.$observables[t];if(n?.__$Observable){let r=n.val();Array.isArray(r)&&(r=r.map(e=>e.__$Observable?e.val():e)),e[t]=r}else e[t]=n}return e},J.prototype.$val=J.prototype.val,J.prototype.get=function(e){const t=this.$observables[e];return t?.__$Observable?t.val():t},J.prototype.$get=J.prototype.get,J.prototype.set=function(e){const t=e?.__$Observable?e.$value:e,n=this.configs;for(const r in t){const o=this.$observables[r],s=e[r],i=t[r];if(o?.__$Observable){if(o.__$isObservableObject){o.update(i);continue}if(!l.isArray(i)){o.set(i);continue}const e=s.at(0);if(e?.__$Observable){const t=i.map(t=>e.__$isObservableObject?new J(t,n):g(t,n));o.set(t);continue}o.set([...i]);continue}this[r]=i}},J.prototype.$set=J.prototype.set,J.prototype.$updateWith=J.prototype.set,J.prototype.observables=function(){return Object.values(this.$observables)},J.prototype.$observables=J.prototype.observables,J.prototype.keys=function(){return Object.keys(this.$observables)},J.prototype.$keys=J.prototype.keys,J.prototype.clone=function(){return new J(this.val(),this.configs)},J.prototype.$clone=J.prototype.clone,J.prototype.reset=function(){for(const e in this.$observables)this.$observables[e].reset()},J.prototype.originalSubscribe=J.prototype.subscribe,J.prototype.subscribe=function(e){const t=this.observables(),n=p(()=>this.trigger());this.originalSubscribe(e);for(let e=0,r=t.length;e<r;e++){const r=t[e];r.__$isObservableArray?r.deepSubscribe(n):r.subscribe(n)}},J.prototype.configs=function(){return this.configs},J.prototype.update=J.prototype.set;const K=(e,t)=>g.computed(e,t),Y=(e,t)=>e.transform(t);g.prototype.isEqualTo=function(e){return e?.__$Observable?K((e,t)=>e===t,[this,e]):Y(this,t=>t===e)},g.prototype.isNotEqualTo=function(e){return e?.__$Observable?K((e,t)=>e!==t,[this,e]):Y(this,t=>t!==e)},g.prototype.isGreaterThan=function(e){return e?.__$Observable?K((e,t)=>e>t,[this,e]):Y(this,t=>t>e)},g.prototype.isGreaterThanOrEqualTo=function(e){return e?.__$Observable?K((e,t)=>e>=t,[this,e]):Y(this,t=>t>=e)},g.prototype.isLessThan=function(e){return e?.__$Observable?K((e,t)=>e<t,[this,e]):Y(this,t=>t<e)},g.prototype.isLessThanOrEqualTo=function(e){return e?.__$Observable?K((e,t)=>e<=t,[this,e]):Y(this,t=>t<=e)},g.prototype.isBetween=function(e,t){return e.__$Observable&&t.__$Observable?K((e,t,n)=>e>=t&&e<=n,[this,e,t]):e.__$Observable?K((e,n)=>e>=n&&e<=t,[this,e]):t.__$Observable?K((t,n)=>t>=e&&t<=n,[this,t]):Y(this,n=>n>=e&&n<=t)},g.prototype.isNull=function(){return Y(this,e=>null==e)},g.prototype.isTruthy=function(){return Y(this,e=>!!e)},g.prototype.isFalsy=function(){return Y(this,e=>!e)},g.prototype.isStartingWith=function(e){return e?.__$Observable?K((e,t)=>String(e).startsWith(t),[this,e]):Y(this,t=>String(t).startsWith(e))},g.prototype.isEndingWith=function(e){return e?.__$Observable?K((e,t)=>String(e).endsWith(t),[this,e]):Y(this,t=>String(t).endsWith(e))},g.prototype.isMatchingPattern=function(e){return e?.__$Observable?K((e,t)=>new RegExp(t).test(String(e)),[this,e]):Y(this,t=>e.test(String(t)))},g.prototype.isEmpty=function(){return Y(this,e=>null==e||""===e||Array.isArray(e)&&0===e.length)},g.prototype.isNotEmpty=function(){return Y(this,e=>null!=e&&""!==e&&!(Array.isArray(e)&&0===e.length))},g.prototype.isIncludes=function(e){return e?.__$Observable?K((e,t)=>Array.isArray(e)?e.includes(t):String(e).includes(String(t)),[this,e]):Y(this,t=>Array.isArray(t)?t.includes(e):String(t).includes(String(e)))},g.prototype.isIncludedIn=function(e){return e?.__$Observable?K((e,t)=>t.includes(e),[this,e]):Y(this,t=>e.includes(t))},g.prototype.isOneOf=g.prototype.isIncludedIn,g.prototype.isHaving=function(e){return e?.__$Observable?K((e,t)=>t in Object(e),[this,e]):Y(this,t=>e in Object(t))},g.prototype.toUpperCase=function(){return Y(this,e=>String(e).toUpperCase())},g.prototype.toLowerCase=function(){return Y(this,e=>String(e).toLowerCase())},g.prototype.toTrimmed=function(){return Y(this,e=>String(e).trim())},g.prototype.toBoolean=function(){return Y(this,e=>!!e)},g.prototype.toLiteral=function(e,t="${v}"){return Y(this,n=>e.replace(t,n))},g.prototype.toFormatted=g.prototype.toLiteral,g.prototype.toProperty=function(e){const t=e.split(".");return Y(this,e=>{let n=e;for(const e of t){if(null==n)return;n=n[e]}return n})},g.prototype.toLength=function(){return Y(this,e=>null==e?0:e.length)},g.prototype.toClamped=function(e,t){return e.__$Observable&&t.__$Observable?K((e,t,n)=>Math.min(Math.max(e,t),n),[this,e,t]):e.__$Observable?K((e,n)=>Math.min(Math.max(e,n),t),[this,e]):t.__$Observable?K((t,n)=>Math.min(Math.max(t,e),n),[this,t]):Y(this,n=>Math.min(Math.max(n,e),t))},g.prototype.toPercent=function(e){return e?.__$Observable?K((e,t)=>0===t?0:e/t*100,[this,e]):Y(this,t=>0===e?0:t/e*100)};const Z=function(e,t){this.$target=t,this.$observer=e};function Q(e,t){this.observable=e,g.call(this),this.$mutation=t,e.subscribe(e=>{this.$updateWithMutation(e)}),this.$updateWithMutation(e.val())}Z.prototype.__$Observable=!0,Z.prototype.__$isObservableWhen=!0,Z.prototype.subscribe=function(e){return this.$observer.on(this.$target,e)},Z.prototype.val=function(){return this.$observer.$currentValue===this.$target},Z.prototype.isMatch=Z.prototype.val,Z.prototype.isActive=Z.prototype.val,Q.prototype=Object.create(g.prototype),Q.prototype.constructor=Q,Q.prototype.__$Observable=!0,Q.prototype.__$isObservableChecker=!0;const X=Q;X.prototype.constructor=X,Q.prototype.$updateWithMutation=function(e){return e=this.$mutation(e),this.set(e)};const ee=(e,t)=>{const n=new Date(e);return{d:n,parts:new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(n).reduce((e,{type:t,value:n})=>(e[t]=n,e),{})}},te=(e,t,n)=>{const r=e=>String(e).padStart(2,"0");return e.replace("YYYY",n.year).replace("YY",n.year.slice(-2)).replace("MMMM",n.month).replace("MMM",n.month.slice(0,3)).replace("MM",r(t.getMonth()+1)).replace("DD",r(t.getDate())).replace("D",t.getDate()).replace("HH",n.hour).replace("mm",n.minute).replace("ss",n.second)},ne={currency:(e,t,{currency:n="XOF",notation:r,minimumFractionDigits:o,maximumFractionDigits:s}={})=>new Intl.NumberFormat(t,{style:"currency",currency:n,notation:r,minimumFractionDigits:o,maximumFractionDigits:s}).format(e),number:(e,t,{notation:n,minimumFractionDigits:r,maximumFractionDigits:o}={})=>new Intl.NumberFormat(t,{notation:n,minimumFractionDigits:r,maximumFractionDigits:o}).format(e),percent:(e,t,{decimals:n=1}={})=>new Intl.NumberFormat(t,{style:"percent",maximumFractionDigits:n}).format(e),date:(e,t,{format:n,dateStyle:r="long"}={})=>{if(n){const{d:r,parts:o}=ee(e,t);return te(n,r,o)}return new Intl.DateTimeFormat(t,{dateStyle:r}).format(new Date(e))},time:(e,t,{format:n,hour:r="2-digit",minute:o="2-digit",second:s}={})=>{if(n){const{d:r,parts:o}=ee(e,t);return te(n,r,o)}return new Intl.DateTimeFormat(t,{hour:r,minute:o,second:s}).format(new Date(e))},datetime:(e,t,{format:n,dateStyle:r="long",hour:o="2-digit",minute:s="2-digit",second:i}={})=>{if(n){const{d:r,parts:o}=ee(e,t);return te(n,r,o)}return new Intl.DateTimeFormat(t,{dateStyle:r,hour:o,minute:s,second:i}).format(new Date(e))},relative:(e,t,{unit:n="day",numeric:r="auto"}={})=>{const o=Math.round((e-Date.now())/864e5);return new Intl.RelativeTimeFormat(t,{numeric:r}).format(o,n)},plural:(e,t,{singular:n,plural:r}={})=>`${e} ${"one"===new Intl.PluralRules(t).select(e)?n:r}`};g.prototype.when=function(e){return new Z(this,e)},g.prototype.check=function(e){return new Q(this,e)},g.prototype.transform=g.prototype.check,g.prototype.pluck=function(e){return new Q(this,t=>t[e])},g.prototype.is=function(e){return new Q(this,"function"==typeof e?e:t=>t===e)},g.prototype.select=g.prototype.check,g.prototype.format=function(e,t={}){const n=this;if("function"==typeof e)return new Q(n,e);const r=ne[e],o=ne.locale;return g.computed(()=>r(n.val(),o.val(),t),[n,o])};const re="unresolved",oe="pending",se="ready",ie="refreshing",ae="errored";function le(e,t,n){if(this.$fn=n.debounce>0?function(e,t,n={}){let r=null,o=null;return function(...s){const i=!0===n.context?this:null;n.check&&n.check(...s),o=s,clearTimeout(r),r=setTimeout(()=>function(e,t,n){n?e.apply(n,t):e(...t)}(e,o,i),t)}}(e,n.debounce):e,this.$dependencies=t,this.$config=n,this.$controller=null,this.$subscriptions=[],this.data=n.into??new g(null),this.error=new g(null),this.state=new g(re),this.loading=g.computed(e=>e===oe||e===ie,[this.state]),n.auto){if(t.length>0)return void this.$watchDependencies();this.fetch()}}function ue(e,t=null){return new g(e,t)}le.prototype.$applyResult=function(e){this.$config.apply?this.$config.apply(e,this.data):this.data.set(e)},le.prototype.$abort=function(){this.$controller&&(this.$controller.abort(),this.$controller=null)},le.prototype.$runWithAbortController=function(e=!1){this.$abort(),this.$controller=new AbortController;const t=this.$controller.signal,n=null!==this.data.val(),r=e&&n?ie:oe;this.error.set(null),this.state.set(r);const o=[...this.$dependencies.map(e=>e.val()),t];Promise.resolve(this.$fn(...o)).then(e=>{t.aborted||(this.$applyResult(e),this.error.set(null),this.state.set(se),this.$controller=null)}).catch(e=>{t.aborted||(this.error.set(e),this.state.set(ae),this.$controller=null)})},le.prototype.$runWithoutAbortController=function(e=!1){const t=null!==this.data.val(),n=e&&t?ie:oe;this.error.set(null),this.state.set(n);const r=this.$dependencies.map(e=>e.val());Promise.resolve(this.$fn(...r)).then(e=>{this.$applyResult(e),this.error.set(null),this.state.set(se)}).catch(e=>{this.error.set(e),this.state.set(ae)})},le.prototype.into=function(e){return this.data=e,this},le.prototype.$run=function(e=!1){return this.$fn.length>this.$dependencies.length?(this.$run=this.$runWithAbortController,this.$runWithAbortController(e)):(this.$run=this.$runWithoutAbortController,this.$run(e))},le.prototype.$watchDependencies=function(){this.$subscriptions.forEach(e=>e()),this.$subscriptions=[],this.$dependencies.forEach(e=>{const t=()=>this.$run(!0);e.subscribe(t),this.$subscriptions.push(()=>e.unsubscribe(t))}),this.$config.lazy||this.$run(!1)},le.prototype.apply=function(e){return this.$config.apply=e,this},le.prototype.into=function(e){return this.$config.into=e,this.data=e,this},le.prototype.fetch=function(){return this.$run(!1),this},le.prototype.refetch=function(){return this.$run(!0),this},le.prototype.mutate=function(e){return this.data.set(e),this.state.set(se),this},le.prototype.destroy=function(){this.$abort(),this.$subscriptions.forEach(e=>e()),this.$subscriptions=[]},le.prototype.isReady=function(){return this.state.isEqualTo(se)},le.prototype.isPending=function(){return this.state.isEqualTo(oe)},le.prototype.isRefreshing=function(){return this.state.isEqualTo(ie)},le.prototype.isErrored=function(){return this.state.isEqualTo(ae)},le.prototype.isUnresolved=function(){return this.state.isEqualTo(re)},le.prototype.onSuccess=function(e){return this.data.subscribe(t=>{this.state.val()===se&&e(t)}),this},le.prototype.onError=function(e){return this.error.subscribe(t=>{null!==t&&e(t)}),this};const ce=ue,he=ue;ue.useValueProperty=function(e="value"){Object.defineProperty(g.prototype,e,{get(){return this.$currentValue},set(e){this.set(e)},configurable:!0})},ue.setLocale=function(e){ne.locale=e.__$Observable?e:ue(e)},ue.getById=function(e){const t=h.getObservableById(parseInt(e));if(!t)throw new r("Observable.getById : No observable found with id "+e);return t},ue.cleanup=function(e){e.cleanup()},ue.autoCleanup=function(e=!1,t={}){if(!e)return;const{interval:n=6e4,threshold:r=100}=t;window.addEventListener("beforeunload",()=>{h.cleanup()}),setInterval(()=>h.cleanObservables(r),n)},ue.array=function(e=[],t=null){return new H(e,t)},ue.batch=function(e){const t=ue(0),n=function(){if(l.isAsyncFunction(e))return e(...arguments).then(()=>{t.trigger()}).catch(e=>{throw e});e(...arguments),t.trigger()};return n.$observer=t,n},ue.computed=function(e,t=[]){const n=()=>t.map(e=>e.val()),o=new g(e(...n())),s=p(()=>o.set(e(...n())));if(l.isFunction(t)){if(!l.isObservable(t.$observer))throw new r("Observable.computed : dependencies must be valid batch function");return t.$observer.subscribe(s),o}return t.forEach(e=>{e.__$isObservableObject?e.observables().forEach(e=>{e.subscribe(s)}):e.subscribe(s)}),o},g.computed=ue.computed,ue.init=function(e,t=null){return new J(e,t)},ue.arrayOfObject=function(e){return e.map(e=>ue.object(e))},ue.value=function(e){if(e?.__$isObservableArray){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e.at(n);t.push(ue.value(r))}return t}return e?.__$Observable?e.val():e},ue.object=ue.init,ue.json=ue.init,ue.resource=function(e,t=[],n=!1){return new le(e,t,"boolean"==typeof n?{auto:n,debounce:0,lazy:!1}:{auto:!1,debounce:0,lazy:!1,...n})},g.prototype.resolve=function(){return ue.value(this)};const pe=(e,t)=>{for(const n in t){const r=t[n];if(r.__$Observable){if(r.__$isObservableChecker){let t=r.val();if("string"==typeof t){e.classes.toggle(t,!0),r.subscribe(n=>{e.classes.remove(t),e.classes.toggle(n,!0),t=n});continue}}e.classes.toggle(n,r.val()),r.subscribe(t=>e.classes.toggle(n,t))}else r.$hydrate?r.$hydrate(e,n):e.classes.toggle(n,r)}},de=(e,t)=>{for(const n in t){const r=t[n],o=n.startsWith("--");r.__$Observable?o?(e.style.setProperty(n,r.val()),r.subscribe(t=>{!1!==t?e.style.setProperty(n,t):e.style.removeProperty(n)})):(e.style[n]=r.val(),r.subscribe(t=>{!1!==t?e.style[n]=t:e.style.removeProperty(n)})):o?e.style.setProperty(n,r):e.style[n]=r}},fe=(e,t,n)=>{const r=n.__$isObservable,o=r?n.val():n,s=c[t];if(l.isBoolean(o)?e[s]=o:e[s]=o===e.value,r){if("checked"===t)return"boolean"==typeof o?e.addEventListener("input",()=>n.set(e[s])):e.addEventListener("input",()=>n.set(e.value)),void n.subscribe(t=>e[s]=t);n.subscribe(t=>e[s]=t===e.value)}},me=(e,t,n)=>{const r="value"===t?t=>e.value=t:n=>e.setAttribute(t,n);if(n.subscribe(r),"value"===t)return e.value=n.val(),void e.addEventListener("input",()=>n.set(e.value));e.setAttribute(t,n.val())},be=(e,t)=>{for(const n in t){const r=n.toLowerCase(),o=t[n];if(null!=o)if(o.handleNdAttribute)o.handleNdAttribute(e,r,o);else{if("object"==typeof o){if("class"===r){pe(e,o);continue}if("style"===r){de(e,o);continue}}u.has(r)?fe(e,r,o):e.setAttribute(r,o)}}return e};let ye=null;const ge={createTextNode:()=>(ye||(ye=document.createTextNode(""),ge.createTextNode=()=>ye.cloneNode()),ye.cloneNode()),createObservableNode:(e,t)=>{const n=ge.createTextNode();return t.subscribe(e=>n.nodeValue=e),n.nodeValue=t.val(),e&&e.appendChild(n),n},createHydratableNode:(e,t)=>{const n=ge.createTextNode();return t.$hydrate(n),n},createStaticTextNode:(e,t)=>{const n=ge.createTextNode();return n.nodeValue=t,e&&e.appendChild(n),n},createElement:e=>document.createElement(e).cloneNode(),bindTextNode:(e,t)=>{if(t?.__$isObservable)return t.subscribe(t=>e.nodeValue=t),void(e.nodeValue=t.val());e.nodeValue=t},processChildren:(e,t)=>{if(null===e)return;const n=ge.getChild(e);n&&t.appendChild(n)},async safeRemove(e){await e.remove()},getChild:e=>{if(null==e)return null;if(e.toNdElement)do{if(e=e.toNdElement(),l.isElement(e))return e}while(e.toNdElement);return ge.createStaticTextNode(null,e)},processAttributes:(e,t)=>{t&&be(e,t)},processAttributesDirect:be,processClassAttribute:pe,processStyleAttribute:de};function ve(e){const t=Reflect.construct(DocumentFragment,[],ve),n=document.createComment((e||"")+" Anchor Sentinel"),r=document.createComment("Anchor Start : "+e),o=document.createComment("/ Anchor End "+e),s={};t.append(r,n,o);const i=new MutationObserver(()=>{n.parentNode===t||n.parentNode instanceof DocumentFragment||s.connected&&s.connected(n.parentNode)});return i.observe(document,{childList:!0,subtree:!0}),t.$sentinel=n,t.$start=r,t.$end=o,t.$observer=i,t.$events=s,t}function $e(e,t=!1){const n=new ve(e);n.onConnectedOnce(e=>{t&&function(e,t){e.remove=()=>{e.append.apply(e,t.childNodes)},e.getParent=()=>t,e.appendChild=e=>{e=l.isElement(e)?e:ge.getChild(e),t.appendChild(e)},e.appendChildRaw=t.appendChild.bind(t),e.append=e.appendChild,e.appendRaw=e.appendChildRaw,e.insertAtStart=e=>{e=l.isElement(e)?e:ge.getChild(e),t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},e.insertAtStartRaw=e=>{t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},e.appendElement=e.appendChild,e.removeChildren=()=>{t.textContent=""},e.replaceContent=function(e){const n=l.isElement(e)?e:ge.getChild(e);t.replaceChildren(n)},e.replaceContentRaw=function(e){t.replaceChildren(e)},e.setContent=e.replaceContent,e.insertBefore=(e,n)=>{e=l.isElement(e)?e:ge.getChild(e),t.insertBefore(e,n)},e.insertBeforeRaw=(e,n)=>{t.insertBefore(e,n)},e.appendChildBefore=e.insertBefore,e.appendChildBeforeRaw=e.insertBeforeRaw,e.clear=e.remove,e.detach=e.remove,e.replaceChildren=function(){t.replaceChildren(...arguments)},e.getByIndex=e=>t.childNodes[e]}(n,e)}),n.__Anchor__=!0;const r=n.$start,o=n.$end;n.nativeInsertBefore=n.insertBefore,n.nativeAppendChild=n.appendChild,n.nativeAppend=n.append;const s=t?()=>!0:e=>e.firstChild===r&&e.lastChild===o,i=(e,t,r)=>{e!==n?s(e)&&r===o?e.append(t,r):e.insertBefore(t,r):e.nativeInsertBefore(t,r)};return n.appendElement=function(e){const t=r.parentNode;t!==n?t.insertBefore(e,o):t.nativeInsertBefore(e,o)},n.appendChild=function(e,t=null){const n=o.parentNode;n?((e,t,n)=>{const r=l.isElement(t)?t:ge.getChild(t);i(e,r,n)})(n,e,t=t??o):DebugManager.error("Anchor","Anchor : parent not found",e)},n.appendChildRaw=function(e,t=null){const n=o.parentNode;n?i(n,e,t=t??o):DebugManager.error("Anchor","Anchor : parent not found",e)},n.getParent=()=>o.parentNode,n.append=n.appendChild,n.appendRaw=n.appendChildRaw,n.insertAtStart=function(e){e=l.isElement(e)?e:ge.getChild(e),n.insertAtStartRaw(e)},n.insertAtStartRaw=function(e){const t=r.parentNode;t!==n?t.insertBefore(e,r.nextSibling):t.nativeInsertBefore(e,r)},n.removeChildren=function(){const e=o.parentNode;if(e===n)return;if(s(e))return void e.replaceChildren(r,o);let t,i=r.nextSibling;for(;i&&i!==o;)t=i.nextSibling,i.remove(),i=t},n.remove=function(){const e=o.parentNode;if(e===n)return;if(s(e))return n.nativeAppend.apply(n,e.childNodes),void e.replaceChildren(r,o);let t,i=r.nextSibling;for(;i&&i!==o;)t=i.nextSibling,n.nativeAppend(i),i=t},n.removeWithAnchors=function(){n.removeChildren(),r.remove(),o.remove()},n.delete=n.removeWithAnchors,n.replaceContent=function(e){const t=l.isElement(e)?e:ge.getChild(e);n.replaceContentRaw(t)},n.replaceContentRaw=function(e){const t=o.parentNode;t&&(s(t)?t.replaceChildren(r,e,o):(n.removeChildren(),t.insertBefore(e,o)))},n.setContent=n.replaceContent,n.setContentRaw=n.replaceContentRaw,n.insertBefore=n.appendChild,n.insertBeforeRaw=n.appendChildRaw,n.endElement=function(){return o},n.startElement=function(){return r},n.restore=function(){n.appendChild(n)},n.clear=n.remove,n.detach=n.remove,n.getByIndex=function(e){let t=r;for(let n=0;n<=e;n++){if(!t.nextSibling)return null;t=t.nextSibling}return t!==r?t:null},n}ve.prototype=Object.create(DocumentFragment.prototype),ve.prototype.constructor=ve,ve.prototype.onConnected=function(e){return this.$events.connected=e,this},ve.prototype.onConnectedOnce=function(e){this.$events.connected=t=>{e(t),this.$observer.disconnect(),this.$events.connectedOnce=null}},DocumentFragment.prototype.setAttribute=()=>{};let we=e=>e;e.ArgTypes={},e.ArgTypes={string:()=>!0,number:()=>!0,boolean:()=>!0,observable:()=>!0,element:()=>!0,function:()=>!0,object:()=>!0,objectNotNull:()=>!0,children:()=>!0,attributes:()=>!0,optional:()=>!0,oneOf:()=>!0};const Se=function(e,t=null){return e&&t?{props:e,children:t}:"object"!=typeof e||Array.isArray(e)||null===e||"Object"!==e.constructor.name||e.$hydrate?{props:t,children:e}:{props:e,children:t}},Ce={mounted:new WeakMap,beforeUnmount:new WeakMap,mountedSupposedSize:0,unmounted:new WeakMap,unmountedSupposedSize:0,observer:null,initObserver:()=>{Ce.observer||(Ce.observer=new MutationObserver(Ce.checkMutation),Ce.observer.observe(document.body,{childList:!0,subtree:!0}))},executeMountedCallback(e){const t=Ce.mounted.get(e);if(t&&(t.inDom=!0,t.mounted))if(Array.isArray(t.mounted))for(const n of t.mounted)n(e);else t.mounted(e)},executeUnmountedCallback(e){const t=Ce.unmounted.get(e);if(!t)return;if(t.inDom=!1,!t.unmounted)return;let n=!1;if(Array.isArray(t.unmounted))for(const r of t.unmounted)!0===r(e)&&(n=!0);else n=!0===t.unmounted(e);n&&(t.disconnect(),e.nd?.remove())},checkMutation:function(e){for(const t of e){if(Ce.mountedSupposedSize>0)for(const e of t.addedNodes){if(Ce.executeMountedCallback(e),!e.querySelectorAll)continue;const t=e.querySelectorAll("[data--nd-mounted]");for(const e of t)Ce.executeMountedCallback(e)}if(Ce.unmountedSupposedSize>0)for(const e of t.removedNodes){if(Ce.executeUnmountedCallback(e),!e.querySelectorAll)continue;const t=e.querySelectorAll("[data--nd-unmounted]");for(const e of t)Ce.executeUnmountedCallback(e)}}},watch:function(e,t=!1){let n=!1,r=!1;Ce.initObserver();let o={inDom:t,mounted:null,unmounted:null,disconnect:()=>{n&&(Ce.mounted.delete(e),Ce.mountedSupposedSize--),r&&(Ce.unmounted.delete(e),Ce.unmountedSupposedSize--),o=null}};const s=(e,t)=>{o[e]?Array.isArray(o[e])?o[e].push(t):o[e]=[o[e],t]:o[e]=t};return{disconnect:()=>o?.disconnect(),mounted:t=>{s("mounted",t),Ce.mounted.set(e,o),n||(Ce.mountedSupposedSize++,n=!0)},unmounted:t=>{s("unmounted",t),Ce.unmounted.set(e,o),r||(Ce.unmountedSupposedSize++,r=!0)},off:(e,t)=>{((e,t)=>{if(o?.[e]){if(Array.isArray(o[e])){const n=o[e].indexOf(t);return n>-1&&o[e].splice(n,1),1===o[e].length&&(o[e]=o[e][0]),void(0===o[e].length&&(o[e]=null))}o[e]=null}})(e,t)}}}};function Oe(e){this.$element=e,this.$attachements=null}Oe.prototype.__$isNDElement=!0,Oe.$getChild=e=>e,Oe.prototype.ghostDom=function(e){return this.$attachements||(this.$attachements=document.createDocumentFragment()),this.$attachements.appendChild(Oe.$getChild(e)),this},Oe.prototype.valueOf=function(){return this.$element},Oe.prototype.ref=function(e,t){return e[t]=this.$element,this},Oe.prototype.refSelf=function(e,t){return e[t]=this,this},Oe.prototype.unmountChildren=function(){let e=this.$element;for(let t=0,n=e.children.length;t<n;t++){let n=e.children[t];n.$ndProx||n.nd?.remove(),n=null}return e=null,this},Oe.prototype.remove=function(){let e=this.$element;return e.nd.unmountChildren(),e.$ndProx=null,Ee.delete(e),e=null,this};const Ee=new WeakMap;Oe.prototype.lifecycle=function(e){const t=this.$element;Ee.has(t)||Ee.set(t,Ce.watch(t));const n=Ee.get(t);return e.mounted&&(this.$element.setAttribute("data--nd-mounted","1"),n.mounted(e.mounted)),e.unmounted&&(this.$element.setAttribute("data--nd-unmounted","1"),n.unmounted(e.unmounted)),this},Oe.prototype.destroyOnUnmount=function(){return this.unmounted(()=>this.destroy()),this},Oe.prototype.destroy=function(){this.$element?.querySelectorAll("[data--nd-before-unmount]").forEach(e=>{e.remove(),e.__$controller?.abort(),e.__$controller=null,Ee.delete(e)}),this.$element.__$controller?.abort(),this.$element.__$controller=null,Ee.delete(this.$element),this.$element=null},Oe.prototype.mounted=function(e){return this.lifecycle({mounted:e})},Oe.prototype.unmounted=function(e){return this.lifecycle({unmounted:e})},Oe.prototype.beforeUnmount=function(e,t){const n=this.$element;if(!Ce.beforeUnmount.has(n)){Ce.beforeUnmount.set(n,new Map);const e=n.remove.bind(n);let t=!1;this.$element.setAttribute("data--nd-before-unmount","1"),n.remove=async()=>{if(!t){t=!0;try{const e=Ce.beforeUnmount.get(n);for(const t of e.values())await t.call(this,n)}finally{e(),t=!1}}}}return Ce.beforeUnmount.get(n).set(e,t),this},Oe.prototype.htmlElement=function(){return this.$element},Oe.prototype.node=Oe.prototype.htmlElement,Oe.prototype.shadow=function(e,t=null){const n=this.$element,r=Array.from(n.childNodes),o=n.attachShadow({mode:e});if(t){const e=document.createElement("style");e.textContent=t,o.appendChild(e)}return n.append=o.append.bind(o),n.appendChild=o.appendChild.bind(o),o.append(...r),this},Oe.prototype.openShadow=function(e=null){return this.shadow("open",e)},Oe.prototype.closedShadow=function(e=null){return this.shadow("closed",e)},Oe.prototype.with=function(e){if(!e||"object"!=typeof e)throw new r("extend() requires an object of methods");for(const t in e){const r=e[t];"function"==typeof r?this[t]=r.bind(this):n.warn(`⚠️ extends(): "${t}" is not a function, skipping`)}return this},Oe.prototype.attr=function(e,t){return t?.__$Observable?(me(this.$element,e,t),this):(this.$element.setAttribute(e,t),this)},Oe.prototype.attrs=function(e){return be(this.$element,e),this},Oe.prototype.class=function(e){return pe(this.$element,e),this},Oe.prototype.style=function(e){return de(this.$element,e),this},Oe.extend=function(e){if(!e||"object"!=typeof e)throw new r("NDElement.extend() requires an object of methods");if(Array.isArray(e))throw new r("NDElement.extend() requires an object, not an array");const t=new Set(["constructor","valueOf","$element","$observer","ref","remove","cleanup","with","extend","attach","lifecycle","mounted","unmounted","unmountChildren"]);for(const o in e){if(!Object.hasOwn(e,o))continue;const s=e[o];if("function"==typeof s){if(t.has(o))throw n.error("NDElement.extend",`Cannot override protected method "${o}"`),new r(`Cannot override protected method "${o}"`);Oe.prototype[o]&&n.warn("NDElement.extend",`Overwriting existing prototype method "${o}"`),Oe.prototype[o]=s}else n.warn("NDElement.extend",`"${o}" is not a function, skipping`)}return Oe},Oe.$sanitizer=null,Oe.setSanitizer=function(e){if("function"!=typeof e)throw new r("NDElement.setSanitizer() expects a function");return Oe.$sanitizer=e,Oe},Oe.prototype.html=function(e,{unsafe:t=!1,sanitize:n=!1}={}){const o=this.$element,s=e=>{if(n){if("function"==typeof n)return void(o.innerHTML=n(e));if(!Oe.$sanitizer)throw new r("nd.html() — no sanitizer configured. Call NDElement.setSanitizer() first.");const t=!0===n?{}:n;return void(o.innerHTML=Oe.$sanitizer(e,t))}t?o.innerHTML=e:console.warn("nd.html() — use {unsafe: true} or {sanitize: true|Object|Function}")};return e?.__$Observable?(e.subscribe(s),s(e.val()),this):(s(e),this)},Oe.prototype.contentEditable=function(e,{format:t="html"}={}){this.$element.contentEditable=!0;const n="text"===t?()=>this.$element.innerText:()=>this.$element.innerHTML,r="text"===t?e=>{this.$element.innerText=e}:e=>{this.$element.innerHTML=e};return e?.__$Observable&&(e.subscribe(e=>{document.activeElement!==this.$element&&r(e)}),r(e.val()||"")),this.$element.addEventListener("input",()=>{e?.set(n())},{signal:this.$getSignal()}),this};const Ae={configurable:!0,get(){return new Oe(this)}};Object.defineProperty(HTMLElement.prototype,"nd",Ae),Object.defineProperty(DocumentFragment.prototype,"nd",Ae),Object.defineProperty(Oe.prototype,"nd",{configurable:!0,get:function(){return this}}),["Click","DblClick","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","Wheel","KeyDown","KeyPress","KeyUp","Blur","Change","Focus","Input","Invalid","Reset","Search","Select","Submit","Drag","DragEnd","DragEnter","DragLeave","DragOver","DragStart","Drop","AfterPrint","BeforePrint","BeforeUnload","Error","HashChange","Load","Offline","Online","PageHide","PageShow","Resize","Scroll","Unload","Abort","CanPlay","CanPlayThrough","DurationChange","Emptied","Ended","LoadedData","LoadedMetadata","LoadStart","Pause","Play","Playing","Progress","RateChange","Seeked","Seeking","Stalled","Suspend","TimeUpdate","VolumeChange","Waiting","TouchCancel","TouchEnd","TouchMove","TouchStart","AnimationEnd","AnimationIteration","AnimationStart","TransitionEnd","Copy","Cut","Paste","FocusIn","FocusOut","ContextMenu"].forEach(e=>{const t=e.toLowerCase();Oe.prototype["on"+e]=function(e=null,n={}){return this.$element.addEventListener(t,e,{signal:this.$getSignal(),...n}),this}}),["Click","DblClick","MouseDown","MouseMove","MouseOut","MouseOver","MouseUp","Wheel","KeyDown","KeyPress","KeyUp","Change","Input","Invalid","Reset","Search","Select","Submit","Drag","DragEnd","DragEnter","DragLeave","DragOver","DragStart","Drop","BeforeUnload","HashChange","TouchCancel","TouchEnd","TouchMove","TouchStart","AnimationEnd","AnimationIteration","AnimationStart","TransitionEnd","Copy","Cut","Paste","FocusIn","FocusOut","ContextMenu"].forEach(e=>{const t=e.toLowerCase();Oe.prototype["onStop"+e]=function(e=null,n={}){return Ne(this.$element,t,e,{signal:this.$getSignal(),...n}),this},Oe.prototype["onPreventStop"+e]=function(e=null,n={}){return xe(this.$element,t,e,{signal:this.$getSignal(),...n}),this}}),["Click","DblClick","MouseDown","MouseUp","Wheel","KeyDown","KeyPress","Invalid","Reset","Submit","DragOver","Drop","BeforeUnload","TouchCancel","TouchEnd","TouchMove","TouchStart","Copy","Cut","Paste","ContextMenu"].forEach(e=>{const t=e.toLowerCase();Oe.prototype["onPrevent"+e]=function(e=null,n={}){return _e(this.$element,t,e,{signal:this.$getSignal(),...n}),this}}),Oe.prototype.$getSignal=function(){return this.$element.__$controller||(this.$element.__$controller=new AbortController),this.$element.__$controller.signal},Oe.prototype.on=function(e,t,n){return this.$element.addEventListener(e.toLowerCase(),t,{signal:this.$getSignal(),...n}),this},Oe.prototype.off=function(e,t){return this.$element.removeEventListener(e.toLowerCase(),t),this},Oe.prototype.once=function(e,t){return this.$element.addEventListener(e.toLowerCase(),t,{signal:this.$getSignal(),once:!0}),this},Oe.prototype.emit=function(e,t=null){const n=new CustomEvent(e,{detail:t,bubbles:!0,cancelable:!0});return this.$element.dispatchEvent(n),this};const _e=function(e,t,n,r){return e.addEventListener(t,t=>{t.preventDefault(),n&&n.call(e,t)},r),this},Ne=function(e,t,n,r){return e.addEventListener(t,t=>{t.stopPropagation(),n&&n.call(e,t)},r),this},xe=function(e,t,n,r){return e.addEventListener(t,t=>{t.stopPropagation(),t.preventDefault(),n&&n.call(e,t)},r),this},Fe={getClasses(){return this.$element.className?.split(" ").filter(Boolean)},add(e){const t=this.getClasses();t.indexOf(e)>=0||(t.push(e),this.$element.className=t.join(" "))},remove(e){const t=this.getClasses(),n=t.indexOf(e);n<0||(t.splice(n,1),this.$element.className=t.join(" "))},toggle(e,t=void 0){const n=this.getClasses(),r=n.indexOf(e);if(r>=0){if(!0===t)return;n.splice(r,1)}else{if(!1===t)return;n.push(e)}this.$element.className=n.join(" ")},contains(e){return this.getClasses().indexOf(e)>=0}};function De(e){this.$hydrate=e}Object.defineProperty(HTMLElement.prototype,"classes",{configurable:!0,get(){return{$element:this,...Fe}}}),DocumentFragment.prototype.__IS_FRAGMENT=!0,Function.prototype.args=function(...e){return this},Function.prototype.errorBoundary=function(e){const t=(...n)=>{try{return this.apply(this,n)}catch(r){return e(r,{caller:t,args:n})}};return t},De.prototype.__$isTemplateBinding=!0,Oe.$getChild=ge.getChild,String.prototype.toNdElement=function(){return ge.createStaticTextNode(null,this)},Number.prototype.toNdElement=function(){return ge.createStaticTextNode(null,this.toString())},Element.prototype.toNdElement=function(){return this},Text.prototype.toNdElement=function(){return this},Comment.prototype.toNdElement=function(){return this},Document.prototype.toNdElement=function(){return this},DocumentFragment.prototype.toNdElement=function(){return this},g.prototype.toNdElement=function(){return ge.createObservableNode(null,this)},Q.prototype.toNdElement=g.prototype.toNdElement,Oe.prototype.toNdElement=function(){const e=this.$element??this.$build?.()??this.build?.()??null;return this.$attachements?(this.$attachements.contains(this.$element)||this.$attachements.append(this.$element),this.$attachements):e},Array.prototype.toNdElement=function(){const e=document.createDocumentFragment();for(let t=0,n=this.length;t<n;t++){const n=ge.getChild(this[t]);null!==n&&e.appendChild(n)}return e},Function.prototype.toNdElement=function(){return ge.getChild(this())},De.prototype.toNdElement=function(){return ge.createHydratableNode(null,this)};const Me=(e,t=1e3)=>new Promise(n=>{let r=!1;const o=t=>{t&&t.target!==e||r||(r=!0,e.removeEventListener("transitionend",o),e.removeEventListener("animationend",o),clearTimeout(s),n())};e.addEventListener("transitionend",o),e.addEventListener("animationend",o);const s=setTimeout(o,t),i=window.getComputedStyle(e),a="0s"!==i.transitionDuration,l="0s"!==i.animationDuration;a||l||o()});Oe.prototype.transitionOut=function(e){const t=e+"-exit",n=this.$element;return this.beforeUnmount("transition-exit",async function(){n.classes.add(t),await Me(n),n.classes.remove(t)}),this},Oe.prototype.transitionIn=function(e){const t=e+"-enter-from",n=e+"-enter-to",r=this.$element;return r.classes.add(t),this.mounted(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{r.classes.remove(t),r.classes.add(n),Me(r).then(()=>{r.classes.remove(n)})})})}),this},Oe.prototype.transition=function(e){return this.transitionIn(e),this.transitionOut(e),this},Oe.prototype.animate=function(e){const t=this.$element;return t.classes.add(e),Me(t).then(()=>{t.classes.remove(e)}),this},g.prototype.handleNdAttribute=function(e,t){u.has(t)?fe(e,t,this):me(e,t,this)},Q.prototype.handleNdAttribute=g.prototype.handleNdAttribute,De.prototype.handleNdAttribute=function(e,t){this.$hydrate(e,t)};const Te=e=>e?e.toNdElement():ge.createTextNode(),ke=(e,t,n=null)=>{const{props:r,children:o=null}=Se(t,n);return ge.processAttributes(e,r),ge.processChildren(o,e),e};function Le(e,t=null){if(e){if(t){let n=null,r=(o,s)=>(n=document.createElement(e),r=(e,r)=>ke(t(n.cloneNode()),e,r),ke(t(n.cloneNode()),o,s));return(e,t)=>r(e,t)}let n=null,r=(t,o)=>(n=document.createElement(e),r=(e,t)=>ke(n.cloneNode(),e,t),ke(n.cloneNode(),t,o));return(e,t)=>r(e,t)}return(e,t="")=>{const n=$e(t);return n.append(e),n}}function Ie(e){this.$element=e,this.$classes=null,this.$styles=null,this.$attrs=null,this.$ndMethods=null}Oe.prototype.attach=function(e,t){if("function"==typeof t){const n=this.$element;return n.nodeCloner=n.nodeCloner||new Ie(n),n.nodeCloner.attach(e,t),n}return t.$hydrate(this.$element,e),this.$element},Ie.prototype.__$isNodeCloner=!0;const Pe=(e,t,n)=>{for(const r in t)e[r]=t[r].apply(null,n);return e};Ie.prototype.resolve=function(){if(this.$content)return;const e=[];if(this.$ndMethods){const t=Object.keys(this.$ndMethods);if(1===t.length){const n=t[0],r=this.$ndMethods[n];e.push((e,t)=>{e.nd[n](r.bind(e,...t))})}else e.push((e,t)=>{const n=e.nd;for(const r in this.$ndMethods)n[r](this.$ndMethods[r].bind(e,...t))})}if(this.$classes){const t={},n=Object.keys(this.$classes);if(1===n.length){const r=n[0],o=this.$classes[r];e.push((e,n)=>{t[r]=o.apply(null,n),ge.processClassAttribute(e,t)})}else e.push((e,n)=>{ge.processClassAttribute(e,Pe(t,this.$classes,n))})}if(this.$styles){const t={},n=Object.keys(this.$styles);if(1===n.length){const r=n[0],o=this.$styles[r];e.push((e,n)=>{t[r]=o.apply(null,n),ge.processStyleAttribute(e,t)})}else e.push((e,n)=>{ge.processStyleAttribute(e,Pe(t,this.$styles,n))})}if(this.$attrs){const t={},n=Object.keys(this.$attrs);if(1===n.length){const r=n[0],o=this.$attrs[r];e.push((e,n)=>{t[r]=o.apply(null,n),ge.processAttributes(e,t)})}else e.push((e,n)=>{ge.processAttributes(e,Pe(t,this.$attrs,n))})}const t=e.length,n=this.$element;this.cloneNode=r=>{const o=n.cloneNode(!1);for(let n=0;n<t;n++)e[n](o,r);return o}},Ie.prototype.cloneNode=function(e){return this.$element.cloneNode(!1)},Ie.prototype.attach=function(e,t){return this.$ndMethods=this.$ndMethods||{},this.$ndMethods[e]=t,this},Ie.prototype.text=function(e){return this.$content=e,"function"==typeof e?(this.cloneNode=t=>Te(e.apply(null,t)),this):(this.cloneNode=t=>Te(t[0][e]),this)},Ie.prototype.attr=function(e,t){return"class"===e?(this.$classes=this.$classes||{},this.$classes[t.property]=t.value,this):"style"===e?(this.$styles=this.$styles||{},this.$styles[t.property]=t.value,this):(this.$attrs=this.$attrs||{},this.$attrs[e]=t.value,this)};function Re(e){let t=null;const n=e=>{const t=e.childNodes;let r=!!e.nodeCloner;const o=t.length;for(let e=0;e<o;e++){const o=t[e];o.nodeCloner&&(r=!0);n(o)&&(r=!0)}return r?e.nodeCloner?(e.nodeCloner.resolve(),e.dynamicCloneNode=n=>{const r=e.nodeCloner.cloneNode(n);for(let e=0;e<o;e++)r.appendChild(t[e].dynamicCloneNode(n));return r}):e.dynamicCloneNode=n=>{const r=e.cloneNode();for(let e=0;e<o;e++)r.appendChild(t[e].dynamicCloneNode(n));return r}:e.dynamicCloneNode=e.cloneNode.bind(e,!0),r};this.clone=r=>{const o=Ve(this);return t=e(o),t.nodeCloner||(t.nodeCloner=new Ie(t)),n(t),this.clone=t.dynamicCloneNode,t.dynamicCloneNode(r)};const r=(e,t)=>new De((n,r)=>{!function(e,t,n,r){n.nodeCloner=n.nodeCloner||new Ie(n),"value"!==t?"attach"!==t?n.nodeCloner.attr(t,{property:r,value:e}):n.nodeCloner.attach(r,e):n.nodeCloner.text(e)}(e,t,n,r)});this.style=e=>r(e,"style"),this.class=e=>r(e,"class"),this.property=e=>this.value(e),this.value=e=>r(e,"value"),this.text=this.value,this.attr=e=>r(e,"attributes"),this.attach=e=>r(e,"attach"),this.callback=this.attach}const Ve=e=>new Proxy(e,{get:(e,t)=>t in e||"symbol"==typeof t?e[t]:e.value(t)});function je(e){let t=null,n=null;this.render=r=>{if(t||(t=e(this)),!n)return t;const o=r[0];if(o&&"object"==typeof o)for(const e in o)n[e]&&n[e](o[e]);return t},this.createSection=(e,t)=>{n=n||{};const r=$e("Component "+e);return n[e]=function(e){r.removeChildren(),t?r.appendChild(t(e)):r.append(e)},r}}const qe=function(e={}){const t=l.isString(e)?e.split(";").filter(Boolean):e;return{add(e,n){if(Array.isArray(t))t.push(e+": "+n);else if(l.isObject(e)){n=e;for(const e in n)t[e]=n[e]}else t[e]=n},value:()=>Array.isArray(t)?t.join(";").concat(";"):{...t}}},Be=function(e=[]){let t=l.isString(e)?e.split(" ").filter(Boolean):e;return{add(e,n=!0){if(l.isJson(e))for(const n in e)e[n]&&(t[n]=e[n]);else if(null!=n||e.__$Observable)if(Array.isArray(t)&&(t=t.reduce((e,t)=>(e[t]=!0,e),{})),e.__$Observable){const n=`obs-${Math.random().toString(36).substr(2,9)}`;t[n]=e}else t[e]=n;else Array.isArray(t)?t.push(e):t[e]=n},value:()=>Array.isArray(t)?t.join(" "):{...t}}},We=e=>{let t=null;return(...n)=>(null!=t||(t=e(...n)),t)},ze=e=>{let t=null;return new Proxy({},{get:(n,r)=>(t||(t=e()),t[r])})},Ue=e=>{const t=new Map;return new Proxy({},{get:(n,r)=>{const o=t.get(r);if(o)return o;if(e.length>0)return(...n)=>{const o=e(...n,r);return t.set(r,o),o};const s=e(r);return t.set(r,s),s}})},He=["use","get","create","createResettable","createComposed","createPersistent","createPersistentResettable","delete","reset"],Ge=function(){const e=new Map,t=new Map,o=(t,o)=>{const s=e.get(o);if(!s)throw n.error("Store",`Store.${t}('${o}') : store not found. Did you call Store.create('${o}') first?`),new r(`Store.${t}('${o}') : store not found.`);return s},s=(e,t={})=>Array.isArray(e)?ue.array(e,t):l.isJson(e)?ue.object(e,t):ue(e,t),i={create(t,o){if(e.has(t))throw n.warn("Store",`Store.create('${t}') : a store with this name already exists. Use Store.get('${t}') to retrieve it.`),new r(`Store.create('${t}') : a store with this name already exists.`);const i=s(o);return e.set(t,{observer:i,subscribers:new Set,resettable:!1,composed:!1}),i},createResettable(t,o){if(e.has(t))throw n.warn("Store",`Store.createResettable('${t}') : a store with this name already exists.`),new r(`Store.createResettable('${t}') : a store with this name already exists.`);const i=s(o,{reset:!0});return e.set(t,{observer:i,subscribers:new Set,resettable:!0,composed:!1}),i},createComposed(t,o,s){if(e.has(t))throw n.warn("Store",`Store.createComposed('${t}') : a store with this name already exists.`),new r(`Store.createComposed('${t}') : a store with this name already exists.`);if("function"!=typeof o)throw new r(`Store.createComposed('${t}') : computation must be a function.`);if(!Array.isArray(s)||0===s.length)throw new r(`Store.createComposed('${t}') : dependencies must be a non-empty array of store names.`);const i=s.map(o=>{if("string"!=typeof o)return o;const s=e.get(o);if(!s)throw n.error("Store",`Store.createComposed('${t}') : dependency '${o}' not found. Create it first.`),new r(`Store.createComposed('${t}') : dependency store '${o}' not found.`);return s.observer}),a=ue.computed(o,i);return e.set(t,{observer:a,subscribers:new Set,resettable:!1,composed:!0}),a},has:t=>e.has(t),reset(e){const t=o("reset",e);if(t.composed)throw n.error("Store",`Store.reset('${e}') : composed stores cannot be reset. Their value is derived from dependencies.`),new r(`Store.reset('${e}') : composed stores cannot be reset.`);if(!t.resettable)throw n.error("Store",`Store.reset('${e}') : this store is not resettable. Use Store.createResettable('${e}', value) instead of Store.create().`),new r(`Store.reset('${e}') : this store is not resettable. Use Store.createResettable('${e}', value) instead of Store.create().`);t.observer.reset()},use(e){const t=o("use",e);if(t.composed)throw n.error("Store",`Store.use('${e}') : composed stores are read-only. Use Store.follow('${e}') instead.`),new r(`Store.use('${e}') : composed stores are read-only. Use Store.follow('${e}') instead.`);const{observer:i,subscribers:a}=t,l=s(i.val()),u=e=>l.set(e),c=e=>i.set(e);return i.subscribe(u),l.subscribe(c),l.destroy=()=>{i.unsubscribe(u),l.unsubscribe(c),a.delete(l),l.cleanup()},l.dispose=l.destroy,a.add(l),l},follow(e){const{observer:t,subscribers:i}=o("follow",e),a=s(t.val()),l=a.set.bind(a),u=e=>l(e);return t.subscribe(u),((e,t,o)=>{const s=e=>()=>{throw n.error("Store",`Store.${o}('${t}') is read-only. '${e}()' is not allowed.`),new r(`Store.${o}('${t}') is read-only.`)};e.set=s("set"),e.toggle=s("toggle"),e.reset=s("reset")})(a,e,"follow"),a.destroy=()=>{t.unsubscribe(u),i.delete(a),a.cleanup()},a.dispose=a.destroy,i.add(a),a},get(t){const r=e.get(t);return r?r.observer:(n.warn("Store",`Store.get('${t}') : store not found.`),null)},getWithSubscribers:t=>e.get(t)??null,delete(r){const o=e.get(r);o?(o.subscribers.forEach(e=>e.destroy()),o.subscribers.clear(),o.observer.cleanup(),e.delete(r),t.delete(r)):n.warn("Store",`Store.delete('${r}') : store not found, nothing to delete.`)},group(e,t){"function"==typeof e&&(t=e,e="anonymous");const n=Ge();return t&&t(n),n},createPersistent(e,t,n){n=n||e;const r=this.create(e,b(n,t)),o=y(t);return r.subscribe(e=>o(n,e)),r},createPersistentResettable(e,t,n){n=n||e;const r=this.createResettable(e,b(n,t)),o=y(t);r.subscribe(e=>o(n,e));const s=r.reset.bind(r);return r.reset=()=>{m.remove(n),s()},r},protected:()=>new Proxy(i,{get:(e,t)=>"symbol"==typeof t||t.startsWith("$")?e[t]:He.includes(t)?()=>{throw new r(`Store.${t}() is not allowed on a read-only store. Use the original store reference instead.`)}:e.has(t)?e.follow(t):e[t],set(){throw new r("This store is read-only.")},deleteProperty(){throw new r("This store is read-only.")}})};return new Proxy(i,{get(e,n){if("symbol"==typeof n||n.startsWith("$")||n in e)return e[n];if(e.has(n)){if(t.has(n))return t.get(n);const r=e.follow(n);return t.set(n,r),r}},set(e,t,o){throw n.error("Store",`Forbidden: You cannot overwrite the store key '${String(t)}'. Use .use('${String(t)}').set(value) instead.`),new r("Store structure is immutable. Use .set() on the observable.")},deleteProperty(e,t){throw new r("Store keys cannot be deleted.")}})},Je=Ge();Je.create("locale",("undefined"!=typeof navigator?navigator.language.split("-")[0]:"en")||"en");const Ke=e=>e;const Ye=new Set(["clear","push","unshift","replace"]),Ze=e=>e;const Qe=function(e,t,{comment:r=null,shouldKeepInCache:o=!0}={}){if(!l.isObservable(e))return"boolean"==typeof e?e?ge.getChild(t):null:n.warn("ShowIf","ShowIf : condition must be an Observable or boolean / "+r,e);const s=$e("Show if : "+(r||""));let i=null;const a=()=>(i&&o||(i=ge.getChild(t),l.isFragment(i)&&(i=Array.from(i.childNodes))),i);return e.val()&&s.appendChild(a()),e.subscribe(e=>{e?s.appendChild(a()):s.remove()}),s},Xe=function(e,t,n=!0){if(!l.isObservable(e))throw new r("Toggle : condition must be an Observable");const o=$e("Match"),s=new Map,i=function(e){if(n&&s.has(e))return s.get(e);let r=t[e];return r?(r=ge.getChild(r),l.isFragment(r)&&(r=Array.from(r.children)),n&&s.set(e,r),r):null},a=e.val(),u=i(a);return u&&o.appendChild(u),e.subscribe(e=>{const t=i(e);o.remove(),t&&o.appendChild(t)}),o.nd.with({add(n,r,o=!1){t[n]=r,o&&e.set(n)},remove(r){n&&s.delete(r),e.set([...s.keys()].at(-1)??""),delete t[r]}})},et=function(e,t,n){if(!l.isObservable(e))throw new r("Toggle : condition must be an Observable");return Xe(e.toBoolean(),{true:t,false:n})},tt=Le("div"),nt=Le("span"),rt=Le("label"),ot=Le("p"),st=ot,it=Le("strong"),at=Le("h1"),lt=Le("h2"),ut=Le("h3"),ct=Le("h4"),ht=Le("h5"),pt=Le("h6"),dt=Le("br"),ft=Le("a"),mt=Le("pre"),bt=Le("code"),yt=Le("blockquote"),gt=Le("hr"),vt=Le("em"),$t=Le("small"),wt=Le("mark"),St=Le("del"),Ct=Le("ins"),Ot=Le("sub"),Et=Le("sup"),At=Le("abbr"),_t=Le("cite"),Nt=Le("q"),xt=Le("dl"),Ft=Le("dt"),Dt=Le("dd"),Mt=Le("form",e=>(e.submit=function(t){return"function"==typeof t?(e.onSubmit(e=>{e.preventDefault(),t(e)}),e):(this.setAttribute("action",t),e)},e.multipartFormData=function(){return this.setAttribute("enctype","multipart/form-data"),e},e.post=function(t){return this.setAttribute("method","post"),this.setAttribute("action",t),e},e.get=function(e){this.setAttribute("method","get"),this.setAttribute("action",e)},e)),Tt=Le("input"),kt=Le("textarea"),Lt=kt,It=Le("select"),Pt=Le("fieldset"),Rt=Le("option"),Vt=Le("legend"),jt=Le("datalist"),qt=Le("output"),Bt=Le("progress"),Wt=Le("meter"),zt=Le("button"),Ut=Le("main"),Ht=Le("section"),Gt=Le("article"),Jt=Le("aside"),Kt=Le("nav"),Yt=Le("figure"),Zt=Le("figcaption"),Qt=Le("header"),Xt=Le("footer"),en=Le("img"),tn=function(e,t){return en({src:e,...t})},nn=Le("details"),rn=Le("summary"),on=Le("dialog"),sn=Le("menu"),an=Le("ol"),ln=Le("ul"),un=Le("li"),cn=un,hn=an,pn=ln,dn=Le("audio"),fn=Le("video"),mn=Le("source"),bn=Le("track"),yn=Le("canvas"),gn=Le("svg"),vn=Le("time"),$n=Le("data"),wn=Le("address"),Sn=Le("kbd"),Cn=Le("samp"),On=Le("var"),En=Le("wbr"),An=Le("caption"),_n=Le("table"),Nn=Le("thead"),xn=Le("tfoot"),Fn=Le("tbody"),Dn=Le("tr"),Mn=Dn,Tn=Le("th"),kn=Tn,Ln=Tn,In=Le("td"),Pn=In;function Rn(e){let t=null,n=(r,o)=>(t=document.createElementNS("http://www.w3.org/2000/svg",e),n=(e,n)=>ke(t.cloneNode(),e,n),ke(t.cloneNode(),r,o));return(e,t)=>n(e,t)}const Vn=Rn("svg"),jn=Rn("circle"),qn=Rn("rect"),Bn=Rn("ellipse"),Wn=Rn("line"),zn=Rn("polyline"),Un=Rn("polygon"),Hn=Rn("path"),Gn=Rn("text"),Jn=Rn("tspan"),Kn=Rn("textPath"),Yn=Rn("g"),Zn=Rn("defs"),Qn=Rn("use"),Xn=Rn("symbol"),er=Rn("clipPath"),tr=Rn("mask"),nr=Rn("marker"),rr=Rn("pattern"),or=Rn("image"),sr=Rn("foreignObject"),ir=Rn("switch"),ar=Rn("linearGradient"),lr=Rn("radialGradient"),ur=Rn("stop"),cr=Rn("filter"),hr=Rn("feBlend"),pr=Rn("feColorMatrix"),dr=Rn("feComposite"),fr=Rn("feFlood"),mr=Rn("feGaussianBlur"),br=Rn("feMerge"),yr=Rn("feMergeNode"),gr=Rn("feOffset"),vr=Rn("feTurbulence"),$r=Rn("feDisplacementMap"),wr=Rn("feDiffuseLighting"),Sr=Rn("feSpecularLighting"),Cr=Rn("feDistantLight"),Or=Rn("fePointLight"),Er=Rn("feSpotLight"),Ar=Rn("feMorphology"),_r=Rn("feConvolveMatrix"),Nr=Rn("feComponentTransfer"),xr=Rn("feFuncR"),Fr=Rn("feFuncG"),Dr=Rn("feFuncB"),Mr=Rn("feFuncA"),Tr=Rn("animate"),kr=Rn("animateTransform"),Lr=Rn("animateMotion"),Ir=Rn("mpath"),Pr=Rn("set"),Rr=Rn("desc"),Vr=Rn("title"),jr=Rn("metadata"),qr=Rn("view"),Br=Rn("style"),Wr=Rn("script"),zr=Le("");var Ur=Object.freeze({__proto__:null,Abbr:At,Address:wn,Anchor:$e,Article:Gt,Aside:Jt,AsyncImg:function(e,t,n,o){const s=l.isObservable(e)?e.val():e,i=tn(t||s,n),a=new Image;return a.onload=()=>{l.isFunction(o)&&o(null,i),i.src=l.isObservable(e)?e.val():e},a.onerror=()=>{l.isFunction(o)&&o(new r("Image not found"))},l.isObservable(e)&&e.subscribe(e=>{a.src=e}),a.src=s,i},Audio:dn,BaseImage:en,Blockquote:yt,Br:dt,Button:zt,Canvas:yn,Caption:An,Checkbox:e=>Tt({type:"checkbox",...e}),Cite:_t,Code:bt,ColorInput:e=>Tt({type:"color",...e}),Data:$n,Datalist:jt,DateInput:e=>Tt({type:"date",...e}),DateTimeInput:e=>Tt({type:"datetime-local",...e}),Dd:Dt,Del:St,Details:nn,Dialog:on,Div:tt,Dl:xt,Dt:Ft,Em:vt,EmailInput:e=>Tt({type:"email",...e}),FieldSet:Pt,FigCaption:Zt,Figure:Yt,FileInput:e=>Tt({type:"file",...e}),Footer:Xt,ForEach:function(e,t,o,{shouldKeepItemsInCache:s=!1}={}){t=t||Ke;const i=$e("ForEach"),a=i.endElement();i.startElement();const u=new Map;let c=null;const h=new Set,p=e=>{if(!s)for(const[t,n]of u.entries()){if(h.has(t))continue;const r=n.child?.deref();e&&r&&r.remove(),n.indexObserver?.cleanup(),n.child=null,n.indexObserver=null,u.delete(n.keyId),c&&c.delete(n.keyId)}},d=(e,s)=>{const i=((e,t,n)=>{if(l.isString(n)){const r=l.isObservable(e)?e.val():e,o=r?.[n];return l.isObservable(o)?o.val():o??t}return l.isFunction(n)?n(e,t):(l.isObservable(e)?e.val():e)??t})(e,s,o);if(u.has(i)){const e=u.get(i);if(e.indexObserver?.set(s),e.isNew=!1,e.child?.deref())return i;u.delete(i)}try{const n=t.length>=2?ue(s):null,o=ge.getChild(t(e,n));if(!o)throw new r("ForEach child can't be null or undefined!");u.set(i,{keyId:i,isNew:!0,child:new WeakRef(o),indexObserver:n})}catch(e){throw n.error("ForEach",`Error creating element for key ${i}`,e),e}return i},f=()=>{const t=a.parentNode;if(!t)return;const n=l.isObservable(e)?e.val():e;if(h.clear(),Array.isArray(n))for(let e=0,t=n.length;e<t;e++){const t=d(n[e],e);h.add(t)}else for(const e in n){const t=d(n[e],e);h.add(t)}if(0===h.size)return i.removeChildren(),p(),void c?.clear();p(t),c&&0!==c.size?(()=>{const e=document.createDocumentFragment(),t=Array.from(h);Array.from(c);for(const n in t){const r=t[n],o=u.get(r);if(!o)continue;const s=o.child.deref();s&&e.appendChild(s)}i.replaceContent(e)})():(e=>{const t=document.createDocumentFragment();for(const e of h){const n=u.get(e);if(!n)continue;const r=n.child?.deref();r&&t.appendChild(r)}e.insertBefore(t,a)})(t),c?.clear(),c=new Set([...h])};return f(),l.isObservable(e)&&e.subscribe(f),i},ForEachArray:function(e,t,n={}){t=t||Ze;const r=$e("ForEach Array",n.isParentUniqueChild),o=r.endElement(),s=new Map;let i=0;const a=t.length>=2,l=e=>{r.removeChildren(),f(e),i=0},u=e=>s.get(e)?.child,c=(e,t=!0)=>{const n=s.get(e);if(n){if(t){const t=n.child;t?.remove(),s.delete(e)}n.indexObserver?.cleanup()}},h=e=>{const n=ge.getChild(t(e,null));return s.set(e,{child:n,indexObserver:null}),n};let p=(n,r)=>{const o=e.transform(e=>e.indexOf(n)),i=ge.getChild(t(n,o));return s.set(n,{child:i,indexObserver:o}),i};e.__$Observable||(p=(e,n)=>{const r=ge.getChild(t(e,n));return s.set(e,{child:r,indexObserver:null}),r});const d=(e,t)=>{const n=s.get(e);return n?(n.indexObserver?.set(t),n.child):h(e)};let f,m=h;f=a?n.shouldKeepItemsInCache?()=>{}:e=>{for(const[t,n]of s.entries())e&&e.includes(t)||c(t,!1)}:s.clear.bind(s);const b=(e,t)=>{const n=s.get(e);if(!n)return null;const r=n.child;if(!r)return null;t?t.appendChild(r):r.remove()};let y=null;y=Array.isArray(e)?()=>{l(e),r.appendChildRaw(g.toFragment(e))}:()=>{const t=e.val();l(t),r.appendChildRaw(g.toFragment(t))};const g={toFragment:e=>{const t=document.createDocumentFragment();for(let n=0,r=e.length;n<r;n++)t.appendChild(m(e[n],i)),i++;return t},add:e=>{r.appendChildRaw(g.toFragment(e))},replace:e=>{l(e),r.appendChildRaw(g.toFragment(e))},set:y,reOrder:e=>{let t=null;const n=document.createDocumentFragment();for(const r of e)t=u(r),t&&n.appendChild(t);t=null,r.appendChildRaw(n)},removeOne:(e,t)=>{c(e,!0)},clear:l,populate:([e,t,n])=>{const o=document.createDocumentFragment();for(let r=0;r<t;r++){const t=n(r);e.push(t),o.append(m(t,r)),i++}r.appendChildRaw(o),o.replaceChildren()},unshift:e=>{r.insertAtStartRaw(g.toFragment(e))},splice:(t,n)=>{const[s,i,...a]=t;let l=null;const c=document.createDocumentFragment();if(n.length>0){const e=n[0];if(1===n.length)b(e,c);else if(n.length>1){const e=u(n[0]);l=e?.previousSibling;for(let e=0;e<n.length;e++)b(n[e],c)}}else{const t=s-1>=0?s-1:s,n=e.at(t);l=u(n)||o.previousSibling}c.replaceChildren(),a&&a.length&&l&&r.insertBeforeRaw(g.toFragment(a),l.nextSibling)},reverse:(e,t)=>{g.reOrder(t)},sort:(e,t)=>{g.reOrder(t)},remove:(e,t)=>{g.removeOne(t)},pop:(e,t)=>{g.removeOne(t)},shift:(e,t)=>{g.removeOne(t)},swap:(e,t)=>{const n=r.getParent();let o=u(t[0]),s=u(t[1]);if(!o||!s)return;const i=s.nextSibling;n.insertBefore(s,o),n.insertBefore(o,i),o=null,s=null}};g.merge=g.add,g.push=g.add;const v=(e,t,n={})=>{((e=null)=>{m=Ye.has(e)?a?p:h:s.size?d:a?p:h})(n.action),g[n.action]&&g[n.action](n.args,n.result)};return Array.isArray(e)?(v(0,0,{action:"set"}),r):(e.val().length&&v(e.val(),0,{action:"set"}),e.subscribe(v),r)},Form:Mt,Fragment:zr,H1:at,H2:lt,H3:ut,H4:ct,H5:ht,H6:pt,Header:Qt,HiddenInput:e=>Tt({type:"hidden",...e}),HideIf:function(e,t,n){const r=ue(!e.val());return e.subscribe(e=>r.set(!e)),Qe(r,t,n)},HideIfNot:function(e,t,n){return Qe(e,t,n)},Hr:gt,Img:tn,Input:Tt,Ins:Ct,Kbd:Sn,Label:rt,LazyImg:function(e,t){return tn(e,{...t,loading:"lazy"})},Legend:Vt,Li:cn,Link:ft,ListItem:un,Main:Ut,Mark:wt,Match:Xe,Menu:sn,Meter:Wt,MonthInput:e=>Tt({type:"month",...e}),NativeDocumentFragment:$e,Nav:Kt,NumberInput:e=>Tt({type:"number",...e}),Ol:hn,Option:Rt,OrderedList:an,Output:qt,P:ot,Paragraph:st,PasswordInput:e=>Tt({type:"password",...e}),Pre:mt,Progress:Bt,Quote:Nt,Radio:e=>Tt({type:"radio",...e}),RangeInput:e=>Tt({type:"range",...e}),ReadonlyInput:e=>Tt({readonly:!0,...e}),Samp:Cn,SearchInput:e=>Tt({type:"search",...e}),Section:Ht,Select:It,ShowIf:Qe,ShowWhen:function(){if(2===arguments.length){const[e,t]=arguments;if(!l.isObservableWhenResult(e))throw new r("showWhen observer must be an ObservableWhenResult",{data:e,help:"Use observer.when(target) to create an ObservableWhenResult"});return Qe(e,t)}if(3===arguments.length){const[e,t,n]=arguments;if(!l.isObservable(e))throw new r("showWhen observer must be an Observable",{data:e});return Qe(e.when(t),n)}throw new r("showWhen must have 2 or 3 arguments",{data:["showWhen(observer, target, view)","showWhen(observerWhenResult, view)"]})},SimpleButton:(e,t)=>zt(e,{type:"button",...t}),Small:$t,Source:mn,Span:nt,Strong:it,Sub:Ot,SubmitButton:(e,t)=>zt(e,{type:"submit",...t}),Summary:rn,Sup:Et,Svg:gn,SvgAnimate:Tr,SvgAnimateMotion:Lr,SvgAnimateTransform:kr,SvgCircle:jn,SvgClipPath:er,SvgDefs:Zn,SvgDesc:Rr,SvgEllipse:Bn,SvgFEBlend:hr,SvgFEColorMatrix:pr,SvgFEComponentTransfer:Nr,SvgFEComposite:dr,SvgFEConvolveMatrix:_r,SvgFEDiffuseLighting:wr,SvgFEDisplacementMap:$r,SvgFEDistantLight:Cr,SvgFEFlood:fr,SvgFEFuncA:Mr,SvgFEFuncB:Dr,SvgFEFuncG:Fr,SvgFEFuncR:xr,SvgFEGaussianBlur:mr,SvgFEMerge:br,SvgFEMergeNode:yr,SvgFEMorphology:Ar,SvgFEOffset:gr,SvgFEPointLight:Or,SvgFESpecularLighting:Sr,SvgFESpotLight:Er,SvgFETurbulence:vr,SvgFilter:cr,SvgForeignObject:sr,SvgG:Yn,SvgImage:or,SvgLine:Wn,SvgLinearGradient:ar,SvgMPath:Ir,SvgMarker:nr,SvgMask:tr,SvgMetadata:jr,SvgPath:Hn,SvgPattern:rr,SvgPolygon:Un,SvgPolyline:zn,SvgRadialGradient:lr,SvgRect:qn,SvgScript:Wr,SvgSet:Pr,SvgStop:ur,SvgStyle:Br,SvgSvg:Vn,SvgSwitch:ir,SvgSymbol:Xn,SvgTSpan:Jn,SvgText:Gn,SvgTextPath:Kn,SvgTitle:Vr,SvgUse:Qn,SvgView:qr,Switch:et,TBody:Fn,TBodyCell:Pn,TFoot:xn,TFootCell:Ln,THead:Nn,THeadCell:kn,TRow:Mn,Table:_n,Td:In,TelInput:e=>Tt({type:"tel",...e}),TextArea:kt,TextInput:Lt,Th:Tn,Time:vn,TimeInput:e=>Tt({type:"time",...e}),Tr:Dn,Track:bn,Ul:pn,UnorderedList:ln,UrlInput:e=>Tt({type:"url",...e}),Var:On,Video:fn,Wbr:En,WeekInput:e=>Tt({type:"week",...e}),When:function(e){if(!l.isObservable(e))throw new r("When : condition must be an Observable");let t=null,n=null;return{show(e){return t=e,this},otherwise:r=>(n=r,et(e,t,n)),toNdElement:()=>et(e,t,n)}},createPortal:function(e,{parent:t,name:n="unnamed"}={}){const r=$e("Portal "+n);return r.appendChild(ge.getChild(e)),(t||document.body).appendChild(r),r}});const Hr={id:"[0-9]+",uuid:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",slug:"[a-z0-9]+(?:-[a-z0-9]+)*",hash:"[a-f0-9]{32,64}",alpha:"[a-zA-Z]+",alphanum:"[a-zA-Z0-9]+",string:"[^/]+",any:".*",int:"[0-9]+",float:"[0-9]+\\.[0-9]+",number:"[0-9]+(\\.[0-9]+)?",positive:"[1-9][0-9]*",locale:"[a-z]{2}(-[A-Z]{2})?",lang:"[a-z]{2}",token:"[A-Za-z0-9_\\-]+"};function Gr(e,t,n={}){e="/"+d(e,"/").replace(/\/+/,"/");let r=null;const o=n.name||null,s=n.middlewares||[],i=n.shouldRebuild||!1,a=n.with||{},l=n.layout||null,u={},c=[],h=e=>{if(!e)return null;const[t,n]=e.split(":");let r=a[t];return!r&&n&&(r=Hr[n]),r||(r="[^/]+"),r=r.replace("(","(?:"),{name:t,pattern:`(${r})`}},p=()=>{if(r)return r;const t=e.replace(/\{(.*?)}/gi,(e,t)=>{const n=h(t);return n&&n.pattern?(u[n.name]=n.pattern,c.push(n.name),n.pattern):e});return r=new RegExp("^"+t+"$"),r};this.name=()=>o,this.component=()=>t,this.middlewares=()=>s,this.shouldRebuild=()=>i,this.path=()=>e,this.layout=()=>l,this.match=function(e){e="/"+d(e,"/");if(!p().exec(e))return!1;const t={};return p().exec(e).forEach((e,n)=>{if(n<1)return;const r=c[n-1];t[r]=e}),t},this.url=function(t){const n=e.replace(/\{(.*?)}/gi,(e,n)=>{const r=h(n);if(t.params&&t.params[r.name])return t.params[r.name];throw new Error(`Missing parameter '${r.name}'`)}),r="object"==typeof t.query?new URLSearchParams(t.query).toString():null;return(t.basePath?t.basePath:"")+(r?`${n}?${r}`:n)}}class Jr extends Error{constructor(e,t){super(e),this.context=t}}const Kr=(e,t)=>{const n=[];return e.forEach(e=>{n.push(d(e.suffix,"/"))}),n.push(d(t,"/")),n.join("/")},Yr=(e,t)=>{const n=[];return e.forEach(e=>{e.options.middlewares&&n.push(...e.options.middlewares)}),t&&n.push(...t),n},Zr=(e,t)=>{const n=[];return e.forEach(e=>{e.options?.name&&n.push(e.options.name)}),t&&n.push(t),n.join(".")},Qr=e=>{for(let t=e.length-1;t>=0;t--)if(e[t]?.options?.layout)return e[t].options.layout;return null};function Xr(){const e=[];let t=0;const n=n=>{const o=t+n;if(!e[o])return;t=o;const{route:s,params:i,query:a,path:l}=e[o];r(l)},r=e=>{window.location.replace(`${window.location.pathname}${window.location.search}#${e}`)},o=()=>window.location.hash.slice(1);this.push=function(n){const{route:s,params:i,query:a,path:l}=this.resolve(n);l!==o()&&(e.splice(t+1),e.push({route:s,params:i,query:a,path:l}),t++,r(l))},this.replace=function(n){const{route:r,params:s,query:i,path:a}=this.resolve(n);a!==o()&&(e[t]={route:r,params:s,query:i,path:a})},this.forward=function(){return t<e.length-1&&n(1)},this.back=function(){return t>0&&n(-1)},this.init=function(n){window.addEventListener("hashchange",()=>{const{route:e,params:t,query:n,path:r}=this.resolve(o());this.handleRouteChange(e,t,n,r)});const{route:r,params:s,query:i,path:a}=this.resolve(n||o());e.push({route:r,params:s,query:i,path:a}),t=0,this.handleRouteChange(r,s,i,a)}}function eo(){this.push=function(e){try{const{route:t,path:n,params:r,query:o}=this.resolve(e);if(window.history.state&&window.history.state.path===n)return;window.history.pushState({name:t.name(),params:r,path:n},t.name()||n,n),this.handleRouteChange(t,r,o,n)}catch(e){n.error("HistoryRouter","Error in pushState",e)}},this.replace=function(e){const{route:t,path:r,params:o}=this.resolve(e);try{window.history.replaceState({name:t.name(),params:o,path:r},t.name()||r,r),this.handleRouteChange(t,o,{},r)}catch(e){n.error("HistoryRouter","Error in replaceState",e)}},this.forward=function(){window.history.forward()},this.back=function(){window.history.back()},this.init=function(e){window.addEventListener("popstate",e=>{try{if(!e.state||!e.state.path)return;const t=e.state.path,{route:n,params:r,query:o,path:s}=this.resolve(t);if(!n)return;this.handleRouteChange(n,r,o,s)}catch(e){n.error("HistoryRouter","Error in popstate event",e)}});const{route:t,params:r,query:o,path:s}=this.resolve(e||window.location.pathname+window.location.search);this.handleRouteChange(t,r,o,s)}}function to(){const e=[];let t=0;const n=n=>{const r=t+n;if(!e[r])return;t=r;const{route:o,params:s,query:i,path:a}=e[r];this.handleRouteChange(o,s,i,a)};this.push=function(n){const{route:r,params:o,query:s,path:i}=this.resolve(n);e[t]&&e[t].path===i||(e.splice(t+1),e.push({route:r,params:o,query:s,path:i}),t++,this.handleRouteChange(r,o,s,i))},this.replace=function(n){const{route:r,params:o,query:s,path:i}=this.resolve(n);e[t]={route:r,params:o,query:s,path:i},this.handleRouteChange(r,o,s,i)},this.forward=function(){return t<e.length-1&&n(1)},this.back=function(){return t>0&&n(-1)},this.init=function(n){const r=n||window.location.pathname+window.location.search,{route:o,params:s,query:i,path:a}=this.resolve(r);e.push({route:o,params:s,query:i,path:a}),t=0,this.handleRouteChange(o,s,i,a)}}function no(e,t){const n=new Map,r=new WeakMap,o=new WeakMap;let s=null,i=null;const a=new Map;let u=null;const c=(e,t)=>{const n=o.get(e);if(n)return n;let r=e;return l.isAnchor(e)||(r=$e(t),r.appendChild(e)),o.set(e,r),r},h=()=>{i?.remove()},p=()=>{t.nodeValue="",h(),s&&s.remove()},d=e=>{let t=e;return l.isNDElement(e)&&(t=e.node()),t},f=function(e,n,o){const a=n.layout();if(a)return void((e,n,o,a)=>{const l=d(n),u=r.get(l);if(u){if(u===s){const e=c(l,a);return h(),i=l,void e.replaceContent(l)}return p(),i=l,s=u,c(l,a).replaceContent(l),void t.appendChild(s)}p(),i=l;const f=c(l,a);s=ge.getChild(e(f)),r.set(l,s),t.appendChild(s)})(a,e,0,o);const l=d(e);p(),t.appendChild(l),i=e},m=function(e){if(!e.route)return;const{route:t,params:r,query:o,path:s}=e;if(u&&u!==s&&a.get(u)?.onLeave?.(),n.has(s)){const e=n.get(s);return f(e,t),a.get(s)?.onEnter?.(r,o),void(u=s)}const i={};a.set(s,i);const l=t.component()({params:r,query:o,onEnter:e=>{i.onEnter=e},onLeave:e=>{i.onLeave=e}});n.set(s,l),f(l,t,s),i.onEnter?.(r,o),u=s};return e.subscribe(m),m(e.currentState()),t}const ro="default";function oo(e={}){const t=[],r={},o=[],s=[],i={route:null,params:null,query:null,path:null,hash:null};if("hash"===e.mode)Xr.apply(this,[]);else if("history"===e.mode)eo.apply(this,[]);else{if("memory"!==e.mode)throw new Jr("Invalid router mode "+e.mode);to.apply(this,[])}const a=function(e,t){for(const r of s)try{r(e),t&&t(e)}catch(e){n.warn("Route Listener","Error in listener:",e)}};this.routes=()=>[...t],this.currentState=()=>({...i}),this.add=function(e,n,s){const i=new Gr(Kr(o,e),n,{...s,middlewares:Yr(o,s?.middlewares||[]),name:s?.name?Zr(o,s.name):null,layout:s?.layout||Qr(o)});return t.push(i),i.name()&&(r[i.name()]=i),this},this.group=function(e,t,n){if(!l.isFunction(n))throw new Jr("Callback must be a function");return o.push({suffix:e,options:t}),n(),o.pop(),this},this.generateUrl=function(e,t={},n={}){const o=r[e];if(!o)throw new Jr(`Route not found for name: ${e}`);return o.url({params:t,query:n})},this.resolve=function(e){if("string"==typeof e){const t=r[e];if(t)return{route:t,params:[],query:[],path:t.url({name:e})}}if(l.isJson(e)){const t=r[e.name];if(!t)throw new Jr(`Route not found for name: ${e.name}`);return{route:t,params:e.params,query:e.query,path:t.url({...e})}}const[n,o]=e.split("?"),s="/"+d(n,"/");let i,a=null;for(const e of t)if(i=e.match(s),i){a=e;break}if(!a)throw new Jr(`Route not found for url: ${n}`);const u={};if(o){const e=new URLSearchParams(o).entries();for(const[t,n]of e)u[t]=n}return{route:a,params:i,query:u,path:e}},this.subscribe=function(e){if(!l.isFunction(e))throw new Jr("Listener must be a function");return s.push(e),()=>{s.splice(s.indexOf(e),1)}},this.handleRouteChange=function(e,t,n,r){i.route=e,i.params=t,i.query=n,i.path=r;const o=[...e.middlewares(),a];let s=0;const l={...i},u=e=>{if(s++,!(s>=o.length))return o[s](e||l,u)};return o[s](l,u)}}function so(e,t){const{to:n,href:r,...o}=e;if(r){const e=oo.get();return ft({...o,href:r},t).nd.onPreventClick(()=>{e.push(r)})}const s="string"==typeof n?{name:n}:n,i=s.router||ro,a=oo.get(i);if(!a)throw new Jr('Router not found "'+i+'" for link "'+s.name+'"');const l=a.generateUrl(s.name,s.params,s.query);return ft({...o,href:l},t).nd.onPreventClick(()=>{a.push(l)})}oo.routers={},oo.create=function(e,t){if(!l.isFunction(t))throw n.error("Router","Callback must be a function"),new Jr("Callback must be a function");const r=new oo(e);return oo.routers[e.name||ro]=r,t(r),r.init(e.entry),r.mount=function(e){if(l.isString(e)){const t=document.querySelector(e);if(!t)throw new Jr(`Container not found for selector: ${e}`);e=t}else if(!l.isElement(e))throw new Jr("Container must be a string or an Element");return no(r,e)},r},oo.get=function(e){const t=oo.routers[e||ro];if(!t)throw new Jr(`Router not found for name: ${e}`);return t},oo.push=function(e,t=null){return oo.get(t).push(e)},oo.replace=function(e,t=null){return oo.get(t).replace(e)},oo.forward=function(e=null){return oo.get(e).forward()},oo.back=function(e=null){return oo.get(e).back()},oo.redirectTo=function(e,t=null,n=null){let r=e;const o=oo.get(n);return o.resolve({name:e,params:t})&&(r={name:e,params:t}),o.push(r)},so.blank=function(e,t){return ft({...e,target:"_blank"},t)};var io=Object.freeze({__proto__:null,Link:so,RouteParamPatterns:Hr,Router:oo});var ao=Object.freeze({__proto__:null,memoize:e=>Ue(e),once:e=>ze(e),singleton:e=>We(e)}),lo=Object.freeze({__proto__:null,Cache:ao,NativeFetch:function(e){const t={request:[],response:[]};this.interceptors={response:e=>{t.response.push(e)},request:e=>{t.request.push(e)}},this.fetch=async function(n,r,o={},s={}){if(s.formData){const e=new FormData;for(const t in o)e.append(t,o[t]);o=e}r.startsWith("http")||(r=(e.endsWith("/")?e:e+"/")+r);let i={method:n,headers:{...s.headers||{}}};if(o)if(o instanceof FormData)i.body=o;else if("GET"!==n)i.headers["Content-Type"]="application/json",i.body=JSON.stringify(o);else{const e=new URLSearchParams(o).toString();e&&(r=r+(r.includes("?")?"&":"?")+e)}for(const e of t.request)i=await e(i,r)||i;let a=await fetch(r,i);for(const e of t.response)a=await e(a,r)||a;const l=(a.headers.get("content-type")||"").includes("application/json")?await a.json():await a.text();if(!a.ok){const e=new Error(l?.message||a.statusText);throw e.status=a.status,e.data=l,e}return l},this.post=function(e,t={},n={}){return this.fetch("POST",e,t,n)},this.put=function(e,t={},n={}){return this.fetch("PUT",e,t,n)},this.delete=function(e,t={},n={}){return this.fetch("DELETE",e,t,n)},this.get=function(e,t={},n={}){return this.fetch("GET",e,t,n)}},classPropertyAccumulator:Be,cssPropertyAccumulator:qe,filters:U});return e.$=ce,e.ElementCreator=ge,e.HtmlElementWrapper=Le,e.NDElement=Oe,e.Observable=ue,e.PluginsManager=null,e.SingletonView=je,e.Store=Je,e.StoreFactory=Ge,e.TemplateCloner=Re,e.Validator=l,e.autoMemoize=Ue,e.autoOnce=ze,e.classPropertyAccumulator=Be,e.createTextNode=Te,e.cssPropertyAccumulator=qe,e.elements=Ur,e.memoize=e=>{const t=new Map;return(...n)=>{const[r,...o]=n,s=t.get(r);if(s)return s;const i=e(...o);return t.set(r,i),i}},e.normalizeComponentArgs=Se,e.obs=he,e.once=We,e.router=io,e.useCache=function(e){let t=null,n=r=>{t=new Re(e);const o=t.clone(r);return n=t.clone,o};return e.length<2?(...e)=>n(e):(e,t,...r)=>n([e,t,...r])},e.useSingleton=function(e){let t=null;return function(...n){return t||(t=new je(e)),t.render(n)}},e.utils=lo,e.withValidation=we,e}({});
|