@base-framework/base 3.9.27 → 3.9.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.js +1 -1
- package/dist/chunks/chunk-4WQU37H7.js +2 -0
- package/dist/chunks/chunk-6EAE4I3C.js +2 -0
- package/dist/chunks/chunk-76NP53O5.js +2 -0
- package/dist/chunks/chunk-EBXFAKPV.js +2 -0
- package/dist/chunks/chunk-FRII433W.js +2 -0
- package/dist/chunks/chunk-KV6FLEYW.js +2 -0
- package/dist/modules/component.js +1 -1
- package/dist/modules/data.js +1 -1
- package/dist/modules/html.js +1 -1
- package/dist/modules/router.js +1 -1
- package/dist/modules/state.js +1 -1
- package/dist/types/modules/component/data-resume-helper.d.ts +6 -1
- package/dist/types/modules/router/history/history.d.ts +19 -0
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as A}from"./chunk-CKS4W2H6.js";import{a as I,b as Lt,c as Mt,d as P,e as S,f as L}from"./chunk-R7IRTCS2.js";import{a as W,b as At}from"./chunk-6N533MOU.js";import{b as bt,c as Et,f as E,g as It,i as q}from"./chunk-UBJO7NXL.js";import{b as f,c as p}from"./chunk-ZUB7I6Z4.js";var F={items:new Map,add(n,t){return this.items.set(n,t),this},get(n){return this.items.get(n)??null}};var g=[],z=0,ut=!1,qe=typeof queueMicrotask=="function"?queueMicrotask:n=>Promise.resolve().then(n),Fe=n=>{let t=n.panel,e=0;for(;t&&t.isUnit===!0&&e++<50;)t=t.panel;return t||n.container||null},Ge=n=>{n._mountPending=!1;try{n.afterMount()}catch(t){console.error("Error in afterMount:",t)}},_t=()=>{ut=!1;let n=g;if(n.length===0)return;g=[];let t=[];for(let e=0,r=n.length;e<r;e++){let s=n[e];if(s.rendered!==!0||s._mountPending!==!0){s._mountPending=!1;continue}let o=Fe(s);if(o&&o.isConnected===!0){Ge(s);continue}t.push(s)}t.length&&(g=g.length?t.concat(g):t),g.length&&z===0&&g.length!==t.length&&dt()},dt=()=>{ut||(ut=!0,qe(_t))},v={add(n){n._mountPending!==!0&&(n._mountPending=!0,g.push(n))},enter(){z++},leave(){--z>0||(z=0,g.length&&dt())},schedule(){g.length&&dt()},flush(){_t()},get size(){return g.length}};f.addType("components",n=>{if(!n)return;let t=n.component;!t||!t.isUnit||(t.persistToken&&t.parent&&t.parent.removePersistedChild(t.persistToken,t),t.rendered===!0&&(t.prepareDestroy(),t.cleanUpAfterDestroy()))});var Ke=0,Q=class{constructor(t,e,r){this.isUnit=!0,this.data=null,this.persist=null,this.nest=null,this.state=null,this.panel=null,this.parent=null,this.unitType=null,this._classId,this.id="",this.cached=[],this.init();let s,o;if(t==null)s={},o=[];else{let i=typeof t;i==="string"||i==="number"?(s={},o=[{tag:"text",textContent:t}]):Array.isArray(t)?(s={},o=t):(s=t||{},o=typeof e=="string"?[{tag:"text",textContent:e}]:e)}this.setupProps(s),this.children=o||[],this.persistedChildren={},this.persistedCount=0,this.onCreated(),this.rendered=!1,this.container=null}init(){this.id="cp-"+Ke++,this.unitType=this._classId||this.constructor.name.toLowerCase()}declareProps(){}addPersistedChild(t){let e=t.key,r=t.cache,s;r!=null&&e!=null?s="pk:"+r+":"+e:r!=null?s="pk:"+r:e!=null?s="pk:"+e:s="pc"+this.persistedCount++;let o=this.persistedChildren[s];return o&&t.unitType===o.unitType&&t.resumeScope(o),t.persistToken=s,this.persistedChildren[s]=t,s}removePersistedChild(t,e){if(!this.rendered)return;let r=t?this.persistedChildren[t]:null;r&&(e&&r!==e||delete this.persistedChildren[t])}setupProps(t){if(this.declareProps(),!(!t||typeof t!="object"))for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(this[e]=t[e],e==="data"&&(this._externalData=!0))}getChildScope(){return this}getParentContext(){return this.parent?this.parent.getContext():null}setupContext(){if(this._contextResumed)return;let t=this.getParentContext(),e=this.setContext(t);if(e){this.context=e;return}this.context=t,this.setupAddingContext()}setupAddingContext(){let t=this.context,e=this.addContext(t);if(!e)return;let r=e[0];r&&(this.addingContext=!0,this.contextBranchName=r,this.addContextBranch(r,e[1]))}addContextBranch(t,e){this.context??={},this.context[t]=e}setContext(t){return null}addContext(t){return null}removeContext(){this.addingContext&&this.removeContextBranch(this.contextBranchName)}removeContextBranch(t){t&&delete this.context[t]}getContext(){return this.context}onCreated(){}render(){return{}}_cacheRoot(t){return t&&(t.id||(t.id=this.getId()),t.cache="panel",t)}_createLayout(){return this.render()}prepareLayout(){let t=this._createLayout();return this._cacheRoot(t)}afterBuild(){f.add(this.panel,"components",{component:this}),this.rendered=!0,this.afterLayout(),typeof this.afterMount=="function"&&v.add(this)}afterLayout(){this.afterSetup()}if(t,e){return t?e||t:null}map(t,e){let r=[];if(!t||t.length<1)return r;for(let s=0,o=t.length;s<o;s++){let i=e(t[s],s);r.push(i)}return r}removeAll(t){return q.removeAll(t)}getId(t){let e=this.id;return typeof t=="string"&&(e+="-"+t),e}cacheEle(t,e){e&&(this[e]=t,this.cached.push(e))}initialize(){this.setupContext(),this.beforeSetup()}beforeSetup(){}afterSetup(){}setup(t){this.setContainer(t),this.initialize()}setContainer(t){this.container=t}_remove(){this.prepareDestroy();let t=this.panel;t&&q.removeElement(t),this.cleanUpAfterDestroy()}cleanUpAfterDestroy(){this.panel=null,this.container=null;let t=this.cached;for(let e=0,r=t.length;e<r;e++)this[t[e]]=null;this.cached=[],this.persist!==!0&&(this.persistedChildren={},this.persistToken=null)}prepareDestroy(){this.persistedCount=0,this.rendered=!1;try{this.beforeDestroy()}catch(t){console.error("Error in beforeDestroy:",t)}this.removeContext(),this.data&&this.persist!==!0&&typeof this.data.unlink=="function"&&this.data.unlink()}beforeDestroy(){}destroy(){this._remove()}};var M=class{static resume(t,e){if(t._externalData){this._resumeExternal(t,e);return}this._resumeOwned(t,e)}static _releaseLinks(t,e){!t||t===e||typeof t.unlink!="function"||t.unlink()}static refresh(t){let e=t.setData();e&&t.data&&t.data.set(e.stage),this.refreshContext(t)}static refreshContext(t){let e=t.context;if(!e||!e.data)return;let r=t.getParentContext();if(!r||!r.data)return;let s=r.data.stage,o=e.data.stage,i=null;for(let a in s){if(!Object.prototype.hasOwnProperty.call(s,a))continue;let l=s[a];l!==o[a]&&(i===null&&(i={}),i[a]=l)}i!==null&&(typeof e.data._silentSet=="function"?e.data._silentSet(i):e.data.set(i))}static _resumeExternal(t,e){let r=t.setData();if(!r){t.data=e;return}if(this._releaseLinks(e,r),e&&e.stage){let s=e._retainState||r._retainState,o=!s&&(e._refreshState||r._refreshState),i=this._buildExternalUpdates(e.stage,r.stage,s,o);W.isEmpty(i)||r._silentSet(i)}typeof r.flushPending=="function"&&r.flushPending(),t.data=r}static _buildExternalUpdates(t,e,r,s){let o={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;if(s){Object.prototype.hasOwnProperty.call(e,i)||(o[i]=t[i]);continue}let a=t[i];!r&&a==null||a!==e[i]&&(o[i]=a)}return o}static _resumeOwned(t,e){let r=t.data;if(!r){this._releaseLinks(e),t.data=e;return}if(e&&e._retainState){this._releaseLinks(r,e),this._releaseLinks(e),t.data=e;return}if(this._releaseLinks(e,r),e&&e.stage){let s=e._refreshState||t.data._refreshState,o=this._buildOwnedUpdates(e.stage,t.data.stage,s);W.isEmpty(o)||t.data._silentSet(o)}t.data&&typeof t.data.flushPending=="function"&&t.data.flushPending()}static _buildOwnedUpdates(t,e,r){let s={};for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;if(r){Object.prototype.hasOwnProperty.call(e,o)||(s[o]=t[o]);continue}let i=t[o];i!=null&&i!==e[o]&&(s[o]=i)}return s}};var j=class{constructor(){this.events=[]}addEvents(t){let e=t.length;if(!(e<1))for(let r=0;r<e;r++){let s=t[r];this.on(s[0],s[1],s[2],s[3])}}on(t,e,r,s){p.on(t,e,r,s),this.events.push({event:t,obj:e,callBack:r,capture:s})}off(t,e,r,s){p.off(t,e,r,s);let o,i=this.events;for(let a=0,l=i.length;a<l;a++)if(o=i[a],o.event===t&&o.obj===e&&o.callBack===r&&o.capture===s){i.splice(a,1);break}}set(){let t=this.events;for(let e=0,r=t.length;e<r;e++){let s=t[e];p.on(s.event,s.obj,s.callBack,s.capture)}}unset(){let t=this.events;for(let e=0,r=t.length;e<r;e++){let s=t[e];p.off(s.event,s.obj,s.callBack,s.capture)}}reset(){this.unset(),this.events=[]}};var V=class{constructor(t,e){this.remoteStates=[],this.callBackStates=[];let r=this.convertStates(e);this.addStatesToTarget(t,r)}addStates(t,e){let r=this.convertStates(e);this.addStatesToTarget(t,r)}createState(t,e,r,s){return{action:t,state:e,callBack:r,targetId:s,token:null,callBackToken:null}}convertStates(t){let e=[];for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;if(r==="remotes"){this.setupRemoteStates(t[r],e);continue}let s=null,o=null,i=t[r];i&&typeof i=="object"&&(o=i.callBack,s=i.id||i.targetId,i=i.state),e.push(this.createState(r,i,o,s))}return e}setupRemoteStates(t,e){for(let r=0,s=t.length;r<s;r++){let o=t[r];if(o)for(let i in o){if(!Object.prototype.hasOwnProperty.call(o,i)||i==="id")continue;let a=null,l=o[i],c=l!==null?l:void 0;c&&typeof c=="object"&&(a=c.callBack,c=c.state),e.push(this.createState(i,c,a,o.id))}}}removeRemoteStates(t){let e=this.remoteStates;e&&this.removeActions(t,e)}removeLocalStates(t){let e=this.callBackStates;if(e)for(let r=0,s=e.length;r<s;r++){let o=e[r];o.callBackToken&&(t.off(o.action,o.callBackToken),o.callBackToken=null)}}removeActions(t,e){if(!(e.length<1))for(let r=0,s=e.length;r<s;r++){let o=e[r];o.token&&this.unbindRemoteState(t,o.token),o.targetId&&A.remove(o.targetId,o.action,o.token)}}restore(t){A.restore(t.id,t);let e=this.callBackStates;if(e)for(let s=0,o=e.length;s<o;s++){let i=e[s];i.callBackToken=t.on(i.action,i.callBack)}let r=this.remoteStates;if(r)for(let s=0,o=r.length;s<o;s++){let i=r[s];i.token=this.bindRemoteState(t,i.action,i.targetId)}}bindRemoteState(t,e,r){let s=A.getTarget(r);return t.link(s,e)}unbindRemoteState(t,e){t.unlink(e)}addStatesToTarget(t,e){let r=this.remoteStates;for(let s=0,o=e.length;s<o;s++){let i=e[s],a=this.addAction(t,i);i.targetId&&(i.token=a,r.push(i))}}addAction(t,e){let r,s=e.action,o=e.targetId;o&&(r=this.bindRemoteState(t,s,o)),typeof e.state<"u"&&t.addAction(s,e.state);let i=e.callBack;return typeof i=="function"&&(e.callBackToken=t.on(s,i),this.callBackStates.push(e)),r||null}};var x=class extends Q{constructor(t,e,r){super(t,e,r),this.isComponent=!0,this.stateResumed=!1,this.stateTargetId=null,this._externalData=this._externalData??!1,this._setupData()}setData(){return null}_setupData(){if(this.data)return;let t=this.setData();t&&(this.data=t)}resumeScope(t){if(this._resumeData(t.data),this.state=t.state,this.stateHelper=t.stateHelper,this.persistedChildren=t.persistedChildren,t.context){let e=t.context.data;e&&e._refreshState===!0&&e._retainState!==!0||(this.context=t.context,this._contextResumed=!0)}this.id=t.id,this._refreshContextData()}_resumeData(t){M.resume(this,t)}_refreshData(){M.refresh(this)}_refreshContextData(){M.refreshContext(this)}initialize(){this.setupContext(),this.addStates(),this.beforeSetup()}afterLayout(){this.addEvents(),this.afterSetup()}setupStateTarget(t){let e=t||this.stateTargetId||this.id;this.state=A.attach(String(e))}setupStates(){return{}}addStates(){let t=this.state;if(t){this.stateResumed=!0,this.stateHelper?.restore(t);return}let e=this.setupStates();W.isEmpty(e)||this.setStateHelper(e)}setStateHelper(t={}){this.state||(this.setupStateTarget(),this.stateHelper=new V(this.state??{},t))}addState(t){!this.stateHelper||this.stateResumed===!0||this.stateHelper.addStates(this.state,t)}removeStates(){let t=this.state;if(!t)return;let e=this.stateHelper;e&&(e.removeRemoteStates(t),e.removeLocalStates(t)),A.detach(String(t.id)),this.stateResumed=!1}onFlush(t){let e=this.data??this?.context?.data??null;e&&e.onFlush(t)}setEventHelper(){this.events||(this.events=new j)}setupEvents(){return[]}addEvents(){let t=this.setupEvents();t.length<1||(this.setEventHelper(),this.events&&this.events.addEvents(t))}removeEvents(){let t=this.events;t&&t.reset()}prepareDestroy(){this.persistedCount=0,this.rendered=!1;try{this.beforeDestroy()}catch(t){console.error("Error in beforeDestroy:",t)}this.removeEvents(),this.removeStates(),this.removeContext(),this.data&&this.persist!==!0&&typeof this.data.unlink=="function"&&this.data.unlink()}};var Dt={created:"onCreated",setStates:"setupStates",state:"setupStates",events:"setupEvents",before:"beforeSetup",render:"render",after:"afterSetup",mounted:"afterMount",destroy:"beforeDestroy"},Ot=(n,t)=>typeof n!="function"&&t==="setupStates"?()=>n:n;var ft=(n,t)=>{if(!n)return t;let e=Object.keys(n);for(let r=0,s=e.length;r<s;r++){let o=e[r],i=n[o],a=Dt[o]||o;t[a]=Ot(i,a)}return t},ze=n=>ft(n,{}),Qe=0,Bt=(n,t)=>{class e extends n{}return Object.assign(e.prototype,t),e.prototype._classId="jot"+Qe++,e},_=(n,t=x)=>{n||(n={});let e,r=typeof n;return r==="object"&&n.render?(e=ze(n),Bt(t,e)):(e={render:r==="function"?n:()=>n},Bt(t,e))};var pt=(n,t)=>({attr:n,directive:t});var k=(n,t)=>({key:n,value:t});var Ut=(n,t,e,r)=>({tag:n,attr:t,directives:e,children:r});var Ht=null,je=()=>Ht||(Ht=F.get("watch")),w=class{static getTag(t){return t.tag||"div"}static setupChildren(t){t.nest&&(t.children=t.nest,delete t.nest)}static setElementContent(t,e,r,s){return t==="text"?(s.push({tag:"text",textContent:e}),!0):t==="html"||t==="innerHTML"?(r.push(k("innerHTML",e)),!0):!1}static setTextAsWatcher(t,e,r){t.push(pt(k(e,L.getWatcherSettings(r,It(e))),je()))}static setButtonType(t,e,r){if(t==="button"){let s=e.type||"button";r.push(k("type",s))}}static parse(t,e){let r=[],s=[],o=t.tag||"div";o==="button"&&r.push(k("type",t.type||"button"));let i=[],a,l;for(let c in t){if(!Object.prototype.hasOwnProperty.call(t,c)||c==="tag"||(a=t[c],a==null))continue;if(c==="children"||c==="nest"){if(Array.isArray(a))for(let u=0;u<a.length;u++)i.push(a[u]);else i.push(a);continue}if((l=F.get(c))!==null){s.push(pt(k(c,a),l));continue}let h=typeof a;if(h==="object"){if(L.isWatching(a)){this.setTextAsWatcher(s,c,a);continue}i.push(a);continue}if(h==="function"){let u=a,m=function(y){u.call(this,y,e)};m.originalCallback=u,r.push(k(c,m));continue}if(h==="string"&&a.includes("[[")){this.setTextAsWatcher(s,c,a);continue}if(c==="text"){i.push({tag:"text",textContent:a});continue}if(c==="html"||c==="innerHTML"){r.push(k("innerHTML",a));continue}r.push(k(c,a))}return Ut(o,r,s,i)}};var D=class{build(t,e,r){}setupComponent(t,e,r){let s=r?.getChildScope();t.parent=s,s&&s.persist===!0&&t.persist!==!1&&(t.persist=!0,t.parent.addPersistedChild(t)),t.cache&&s&&(s[t.cache]=t),t.setup(e)}buildComponent(t){let e=t.prepareLayout(),r=this.build(e,t.container,t);return t.afterBuild(),t.component&&typeof t.onCreated=="function"&&t.onCreated(t),r}createComponent(t,e,r){return this.setupComponent(t,e,r),this.buildComponent(t),t}setDirectives(t,e,r){}removeNode(t){}removeAll(t){}};var Ve=n=>{for(let e in n)if(e!=="tag"&&e!=="textContent")return!1;let t=n.textContent;return typeof t=="string"?t.indexOf("[[")===-1:typeof t!="object"},Y=class extends D{build(t,e,r){let s=S.createDocFragment();if(Array.isArray(t))for(let o=0,i=t.length;o<i;o++)this.buildElement(t[o],s,r);else this.buildElement(t,s,r);return e&&typeof e=="object"&&e.appendChild(s),s}buildElement(t,e,r){if(t){if(t.isUnit===!0){this.createComponent(t,e,r);return}this.createElement(t,e,r)}}createElement(t,e,r){if(t.tag==="text"&&Ve(t)){let c=t.textContent;S.createText(c??"",e);return}let s=r?.getChildScope();if(t.data||t.state){this.createTempComponent(t,e,s);return}let o=w.parse(t,s),i=this.createNode(o,e,s);this.cache(i,t.cache,r);let a=o.children;for(let c=0,h=a.length;c<h;c++){let u=a[c];u!==null&&this.buildElement(u,i,r)}let l=o.directives;l.length&&this.setDirectives(i,l,s)}createTempComponent(t,e,r){let s={cache:t.cache,key:t.key,persist:t.persist,_externalData:!0,setData:()=>t.data,...ft(t.methods||{},{}),render(){return{...t,data:null,state:null,methods:null,key:null,persist:null}}};t.state&&(s.setupStateTarget=function(i){this.state=t.state});let o=new x(s);this.createComponent(o,e,r)}setDirectives(t,e,r){for(let s=0,o=e.length;s<o;s++)this.handleDirective(t,e[s],r)}handleDirective(t,e,r){e.directive(t,e.attr.value,r)}cache(t,e,r){r&&e&&r.cacheEle(t,e)}createNode(t,e,r){let s=t.tag;if(s==="text"){let o=t.attr[0],i=o?o.value:"";return S.createText(i,e)}else if(s==="comment"){let o=t.attr[0],i=o?o.value:"";return S.createComment(i,e)}return S.create(s,t.attr,e,r)}removeNode(t){S.removeElement(t)}removeAll(t){S.removeAll(t)}};var Ye=new Set(["area","base","br","col","embed","hr","img","input","link","meta","source"]),$e=/[&<>"]/,mt=n=>{let t=typeof n=="string"?n:String(n);return $e.test(t)?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""):t},O=class{static create(t,e=[],r=""){let s="",o="";for(let i=0,a=e.length;i<a;i++){let l=e[i],c=l.key,h=l.value;if(c==="text"||c==="textContent"){s+=mt(h);continue}if(c==="html"||c==="innerHTML"){s+=h;continue}if(typeof h=="function")continue;let u=c+'="'+mt(h)+'"';o?o+=" "+u:o=u}return Ye.has(t)?"<"+t+" "+o+" />":"<"+t+" "+o+">"+s+r+"</"+t+">"}static createText(t){return mt(t)}static createComment(t){return"<!-- "+t+" -->"}};var $=class extends D{build(t,e,r){if(Array.isArray(t)){let s="";for(let o=0,i=t.length;o<i;o++)s+=this.buildElement(t[o],r);return s}return this.buildElement(t,r)}createComponent(t,e,r){return this.setupComponent(t,e,r),this.buildComponent(t)}buildElement(t,e){return t?t.isUnit===!0?this.createComponent(t,{},e):this.createElement(t,e):""}createElement(t,e){let r=w.parse(t,e),s=r.children,o="";for(let i=0,a=s.length;i<a;i++){let l=s[i];l!==null&&(o+=this.buildElement(l,e))}return this.createNode(r,o)}createNode(t,e){let r=t.tag;if(r==="text"){let s=t.attr[0],o=s?s.value:"";return O.createText(o)}else if(r==="comment"){let s=t.attr[0],o=s?s.value:"";return O.createComment(o)}return O.create(r,t.attr,e)}removeAll(t){}};var J=class{static browserIsSupported(){return typeof window<"u"&&typeof document=="object"}static setup(){return this.browserIsSupported()?new Y:new $}};var b=J.setup(),Je=n=>typeof n=="object"&&n.isUnit===!0,Nt=new WeakMap,Xe=n=>{let t=Nt.get(n);if(!t){if(t=_(n),!t)return null;Nt.set(n,t)}return new t},d=class{static render(t,e,r){if(!t||(Je(t)||(t=Xe(t)),!t))return null;v.enter();try{return b.createComponent(t,e,r)}finally{v.leave()}}static build(t,e,r){v.enter();try{return b.build(t,e,r)}finally{v.leave()}}static rebuild(t,e,r){return b.removeAll(e),this.build(t,e,r)}static setDirectives(t,e,r){b.setDirectives(t,e,r)}static createNode(t,e,r){return b.createNode(t,e,r)}static removeNode(t){b.removeNode(t)}static removeAll(t){b.removeAll(t)}};At.augment({buildLayout(n,t,e){d.build(n,t,e)}});var gt=[],Ze=n=>gt.indexOf(n)!==-1,tr=n=>({tag:"script",src:n.src,async:!1,load(t){gt.push(n.src);let e=n.load;e&&e()}}),er=n=>({tag:"link",rel:"stylesheet",type:"text/css",href:n.src,load(t){gt.push(n.src);let e=n.load;e&&e()}}),X=class{constructor(t){this.percent=0,this.loaded=0,this.total=0,this.callBack=t||null}add(t){this.total++;let e,r=this.update.bind(this);t.indexOf(".css")!==-1?e=er({load:r,src:t}):e=tr({load:r,src:t}),d.build(e,document.head)}addFiles(t){t&&t.forEach(e=>{Ze(e)||this.add(e)})}update(){if(this.updateProgress()<100)return;let e=this.callBack;e&&e()}updateProgress(){return++this.loaded,this.percent=Math.floor(this.loaded/this.total*100)}};var rr=n=>n?typeof n?.prototype?.constructor=="function":!1,C=class{static process(t,e){let r=t.default;return r?e.callback?e.callback(r):(rr(r)?r=new r:r=r(),r.isUnit===!0&&(r.route=e.route,e.persist&&(r.persist=!0)),r):null}static render(t,e,r){return this.renderNodes(t,e,r)[0]||null}static renderNodes(t,e,r){let s=d.build(t,null,r),o=Array.from(s.childNodes);return o.length===0&&t?.panel&&o.push(t.panel),e.after(s),o}};var Z=class{static load(t,e,r){return t.then(s=>(e&&e(s),s)).catch(s=>{console.error("Error loading module:",s),r&&r(s)})}};var nr=n=>({tag:"comment",textContent:"import placeholder",onCreated:n.onCreated}),T=new I(100),Wt=n=>{if(T.has(n)){let r=T.get(n);return r&&typeof r.then!="function"?Promise.resolve(r):r}let t=typeof n,e;if(t==="string")e=import(n);else if(t==="function")e=n();else return n;return e.then(r=>{T.set(n,r)}).catch(()=>{T.delete(n)}),T.set(n,e),e},qt=n=>{if(!T.has(n))return null;let t=T.get(n);return t&&typeof t.then=="function"?null:t||null},Ft=n=>{let t=typeof n;if(t!=="string"&&t!=="function")return null;if(qt(n))return Promise.resolve(T.get(n));let e;try{e=Wt(n)}catch{return null}return e.catch(()=>null)},yt=n=>{for(let t=0,e=n.length;t<e;t++){let r=n[t];r&&d.removeNode(r)}},Gt=_({declareProps(){this.loaded=!1,this.errorRoot=null,this.loadingRoots=null,this.generation=0},render(){return nr({onCreated:n=>{if(this.src){if(this.layout){this.setLayoutRoots(C.renderNodes(this.layout,this.panel,this.parent));return}if(this.depends){this.renderLoading(n),new X(()=>{this.loadAndRender(n)}).addFiles(this.depends);return}this.loadAndRender(n)}}})},loadAndRender(n){let t=this.generation,e=qt(this.src);if(e){this.renderModule(n,e);return}this.renderLoading(n),Z.load(Wt(this.src),r=>{t===this.generation&&this.renderModule(n,r)},r=>{t===this.generation&&(this.loaded=!1,this.removeLoadingLayout(),this.renderError(n,r))})},renderLoading(n){let t=this.loading;if(!t||this.loadingRoots)return;let e=typeof t=="function"?t():t;e&&(this.loadingRoots=C.renderNodes(e,n,this.parent))},removeLoadingLayout(){let n=this.loadingRoots;return n?(this.loadingRoots=null,yt(n),!0):!1},renderError(n,t){let e=()=>this.retry(n),r=this.fallback,s=typeof r=="function"?r(t,e):r||{class:"base-import-error",children:[{tag:"span",text:"Failed to load content."},{tag:"button",type:"button",text:"Retry",click:e}]};if(!s)return;let o=C.renderNodes(s,n,this.parent);this.errorRoots=o,this.errorRoot=o[0]||null},setLayoutRoots(n){this.layoutRoots=n,this.layoutRoot=n[0]||null},retry(n){this.removeErrorLayout(),this.loadAndRender(n)},removeErrorLayout(){this.errorRoot&&(yt(this.errorRoots||[this.errorRoot]),this.errorRoot=null,this.errorRoots=null)},renderModule(n,t){this.loaded=!0;let e=this.layout||C.process(t,{callback:this.callback,route:this.route,persist:this.persist});this.layout=e,this.setLayoutRoots(C.renderNodes(e,n,this.parent)),this.removeLoadingLayout()&&typeof this.onReplaceLoading=="function"&&this.onReplaceLoading(this.layoutRoots,e),typeof this.onModuleRender=="function"&&this.onModuleRender(e)},shouldUpdate(n){return this.updateLayout===!0?!0:this.updateLayout=n&&n.isUnit&&typeof n.update=="function"},updateModuleLayout(n){let t=this.layout;this.shouldUpdate(t)&&t&&t.update(n)},update(n){this.loaded===!0&&this.updateModuleLayout(n)},destroy(){this.generation++,this.removeErrorLayout(),this.removeLoadingLayout(),this.layoutRoot&&(yt(this.layoutRoots||[this.layoutRoot]),this.persist!==!0&&(this.layoutRoot=null,this.layoutRoots=null,this.layout=null,this.loaded=!1,this.updateLayout=!1))}});var Kt=n=>{let t=typeof n;return(t==="string"||t==="function"||n instanceof Promise)&&(n={src:n}),new Gt(n)};var sr=0,B=class{constructor(t){this.router=t,this.locationId="base-app-router-"+sr++,this.callBack=this.check.bind(this)}setup(){return this.addEvent(),this}check(t){}getScrollPosition(){return{x:window.scrollX,y:window.scrollY}}scrollTo(t){window.scrollTo(t.x,t.y)}addEvent(){return this}};var or=0,ir=()=>Date.now().toString(36)+"-"+(or++).toString(36)+"-"+Math.random().toString(36).substring(2,8),Qt=typeof navigator<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent||"")&&!window.MSStream,zt=()=>{Qt&&requestAnimationFrame(()=>requestAnimationFrame(()=>{let n=window.scrollX,t=window.scrollY;window.scrollTo(0,t+1),document.documentElement.offsetHeight,window.scrollTo(n,t)}))},tt=class extends B{constructor(t){super(t),this.currentKey=null,this.positions=new I(200)}saveCurrentPosition(){let t=this.getScrollPosition(),e=this.currentKey;return e&&this.positions.set(e,t),t}addEvent(){p.on("popstate",window,this.callBack);let t=window.history;return t&&"scrollRestoration"in t&&(this.previousScrollRestoration=t.scrollRestoration,t.scrollRestoration="manual"),Qt&&(this.pageShowCallBack=this.onPageShow.bind(this),p.on("pageshow",window,this.pageShowCallBack)),this}removeEvent(){p.off("popstate",window,this.callBack);let t=window.history;return this.previousScrollRestoration&&t&&"scrollRestoration"in t&&(t.scrollRestoration=this.previousScrollRestoration,this.previousScrollRestoration=null),this.pageShowCallBack&&p.off("pageshow",window,this.pageShowCallBack),this}onPageShow(t){t.persisted&&zt()}check(t){let e=t.state;if(!e||e.location!==this.locationId)return!1;t.preventDefault(),t.stopPropagation(),this.saveCurrentPosition();let r=e.key||null;this.currentKey=r;let s=r&&this.positions.get(r)||e.scrollPosition,o=this.router;o.checkActiveRoutes(e.uri,!!s),s&&(typeof o.restoreScrollPosition=="function"?o.restoreScrollPosition(s):this.scrollTo(s)),zt()}createState(t,e={}){let r=this.getScrollPosition();return e=e===null?{}:e,{location:this.locationId,...e,key:ir(),scrollPosition:r,uri:t}}addState(t,e,r=!1){let s=window.history,o=s.state;if(o&&o.uri===t)return o.key&&o.location===this.locationId&&(this.currentKey=o.key),this;!r&&o&&o.location===this.locationId&&(o.scrollPosition=this.saveCurrentPosition(),s.replaceState(o,"",window.location.href));let i=this.createState(t,e);return r||(i.scrollPosition={x:0,y:0}),s[r===!1?"pushState":"replaceState"](i,null,t),this.currentKey=i.key,this.positions.set(i.key,i.scrollPosition),this}};var et={removeSlashes(n){return typeof n!="string"?"":(n[0]==="/"&&(n=n.substring(1)),n[n.length-1]==="/"&&(n=n.substring(0,n.length-1)),n)},getHashUri(n){if(typeof n!="string")return"";let t=n.indexOf("#");return t===-1?"":n.substring(t+1)}};var rt=class extends B{addEvent(){return p.on("hashchange",window,this.callBack),this}removeEvent(){return p.off("hashchange",window,this.callBack),this}check(t){this.router.checkActiveRoutes(et.getHashUri(t.newURL))}addState(t,e,r){return window.location.hash=t,this}};var nt=class{static browserIsSupported(){return typeof window=="object"&&"history"in window&&"pushState"in window.history}static setup(t){return this.browserIsSupported()?new tt(t).setup():new rt(t).setup()}};var St=5,ar=200,st=class{constructor(t){this.owner=t||null,this.pages=new Set,this.scrollMemory=new I(ar),this.historyNavigation=!1}isEnabled(){let t=this.owner;return t!==null&&t.keepAlive===!0}getMode(){let t=this.owner;return t!==null&&t.keepAliveMode==="hide"?"hide":"detach"}getMax(){let t=this.owner,e=t?t.keepAliveMax:void 0;return typeof e=="number"&&e>=0?e:St}get size(){return this.pages.size}add(t){let e=this.pages;e.delete(t),e.add(t),this.trim()}delete(t){this.pages.delete(t)}trim(){let t=this.pages,e=this.getMax();for(;t.size>e;){let r=t.values().next().value;t.delete(r),r.evict()}}clear(){let t=Array.from(this.pages);this.pages.clear();for(let e=0,r=t.length;e<r;e++)t[e].evict()}saveScroll(t,e){if(e){this.scrollMemory.set(t,e);return}this.scrollMemory.has(t)&&this.scrollMemory.delete(t)}getScroll(t){return this.scrollMemory.get(t)||null}};var vt=class extends x{getChildScope(){return this.parent}},jt=n=>_(n,vt);var xt="data-scroll-key",lr="["+xt+"]",cr="[data-route-dormant]",Vt=n=>typeof n.closest=="function"&&n.closest(cr)!==null,Yt=(n,t)=>{for(let e=0,r=n.length;e<r;e++){let s=n[e];if(!s||s.nodeType!==1||Vt(s))continue;let o=s.getAttribute(xt);o!==null&&t(s,o);let i=s.querySelectorAll(lr);for(let a=0,l=i.length;a<l;a++){let c=i[a];Vt(c)||t(c,c.getAttribute(xt))}}},kt=n=>{let t=null;return Yt(n,(e,r)=>{let s=e.scrollTop||0,o=e.scrollLeft||0;s===0&&o===0||(t=t||{},t[r]=[s,o])}),t},ot=(n,t)=>{if(!t)return!0;let e={},r=0;for(let s in t)e[s]=!0,r++;return Yt(n,(s,o)=>{let i=t[o];if(!i)return;let a=i[0],l=i[1];s.scrollTop=a,s.scrollLeft=l,Math.abs((s.scrollTop||0)-a)<1&&Math.abs((s.scrollLeft||0)-l)<1&&e[o]&&(e[o]=!1,r--)}),r<=0};var hr=n=>{for(let t=0;t<n.length;t++){let e=n[t],r=e&&e.nodeType===8?e._prevNodes:null;if(!Array.isArray(r)||r.length===0)continue;let s=[];for(let o=0,i=r.length;o<i;o++){let a=r[o];a&&n.indexOf(a)===-1&&s.indexOf(a)===-1&&s.push(a)}n.splice(t+1,0,...s)}},G="data-route-dormant",it=[["content-visibility","hidden"],["position","absolute"],["top","0"],["left","0"],["width","100%"],["opacity","0"],["clip-path","inset(50%)"]],ur=n=>{let t=n.style,e=[];for(let s=0,o=it.length;s<o;s++){let[i,a]=it[s];e.push([i,t.getPropertyValue(i),t.getPropertyPriority(i)]),t.setProperty(i,a,"important")}let r=n.ownerDocument&&n.ownerDocument.activeElement;return r&&r!==n.ownerDocument.body&&n.contains(r)&&typeof r.blur=="function"&&r.blur(),n.setAttribute(G,""),n.inert=!0,e},dr=(n,t)=>{let e=n.style,r=t||[];for(let s=0,o=it.length;s<o;s++){let i=it[s][0],a=r.find(l=>l[0]===i);a&&a[1]?e.setProperty(i,a[1],a[2]||""):e.removeProperty(i)}n.removeAttribute(G),n.inert=!1},fr="iframe, embed, object",pr="video, audio",Jt=(n,t)=>{let e=[];for(let r=0,s=n.length;r<s;r++){let o=n[r];if(!o||o.nodeType!==1)continue;o.matches(t)&&e.push(o);let i=o.querySelectorAll(t);for(let a=0,l=i.length;a<l;a++)e.push(i[a])}return e},mr=n=>{let t=Jt(n,pr);for(let e=0,r=t.length;e<r;e++){let s=t[e];s.paused===!1&&typeof s.pause=="function"&&s.pause()}},gr=n=>/^class[\s{]/.test(Function.prototype.toString.call(n)),yr=1500,$t=()=>typeof performance<"u"&&performance.now?performance.now():Date.now(),Sr=n=>{let t=n.panel,e=0;for(;t&&t.isUnit===!0&&e++<50;)t=t.panel;return t||null},wt=(n,t,e)=>{if(!(!n||typeof n[t]!="function"))try{n[t](...e)}catch(r){console.error("Error in "+t+":",r)}},at=class{constructor(t,e){this.route=t,this.template=e.component,this.component=null,this.hasTemplate=!1,this.setup=!1,this.container=e.container,this.persist=e.persist,this.parent=e.parent,this.keepAlive=typeof e.keepAlive=="boolean"?e.keepAlive:null,this.keepAliveMode=e.keepAliveMode==="hide"||e.keepAliveMode==="detach"?e.keepAliveMode:null,this.hiddenInPlace=!1,this.hiddenStyles=null,this.capturedScroll=null,this.pageCache=e.pageCache||null,this.detachedNodes=null,this.detachedParents=null,this.detachedPath=null,this.savedScroll=null,this.params=null,this.scrollToken=0}isKeepAlive(t){if(this.keepAlive!==null)return this.keepAlive;if(t=t||this.component,t){if(typeof t.keepAlive=="boolean")return t.keepAlive;let r=t.layout;if(r&&r.isUnit===!0&&typeof r.keepAlive=="boolean")return r.keepAlive}let e=this.pageCache;return e!==null&&e.isEnabled()}getKeepAliveMode(t){if(this.keepAliveMode!==null)return this.keepAliveMode;if(t=t||this.component,t){let r=t.keepAliveMode;if(r==="hide"||r==="detach")return r;let s=t.layout;if(s&&s.isUnit===!0&&(s.keepAliveMode==="hide"||s.keepAliveMode==="detach"))return s.keepAliveMode}let e=this.pageCache;return e!==null&&typeof e.getMode=="function"?e.getMode():"detach"}isDetached(){return this.detachedNodes!==null}captureScroll(){let t=this.component;if(this.setup!==!0||!t||t.rendered!==!0){this.capturedScroll=null;return}this.capturedScroll={value:kt(this.getRootNodes(t))}}releaseCapturedScroll(){this.capturedScroll=null}takeScroll(t){let e=this.capturedScroll;return this.capturedScroll=null,e?e.value:kt(this.getRootNodes(t))}focus(t){if(this.params=t,this.setup===!1){if(this.detachedNodes!==null&&this.detachedPath!==this.getPagePath()&&this.evict(),this.detachedNodes!==null&&this.reattach()){this.update(t),this.restoreDetachedScroll(),this.callPageHook("onActivate",[t,{restored:!0}]);return}this.route&&typeof this.route.flushPending=="function"&&this.route.flushPending(),this.create(),this.update(t),this.afterCreate(t);return}this.update(t)}setupTemplate(){let e=typeof this.template;e==="function"?this.initializeComponent():e==="object"&&this.initializeTemplateObject(),this.hasTemplate=!0}initializeComponent(){let t=this.template;this.template=gr(t)?new t:t(),this.initializeTemplateObject()}transferSettings(t){this.persist=this.persist&&t.persist!==!1,Object.assign(t,{route:this.route,persist:this.persist}),this.component=t}initializeTemplateObject(){let t=this.template;if(!t)return;t.isUnit||(this.template=new(jt(t)));let e=this.template;this.transferSettings(e)}create(){if(this.setupTemplate(),!this.hasTemplate)return;this.setup=!0;let t=this.component;d.render(t,this.container,this.parent)}afterCreate(t){let e=this.component;!e||this.pageCache===null||(e.loaded===!1&&e.src&&(e.onModuleRender=()=>this.onModuleRender(e)),this.isKeepAlive(e)&&this.callPageHook("onActivate",[t,{restored:!1}]),this.pageCache.historyNavigation===!0&&this.restoreHistoryScroll())}onModuleRender(t){if(this.setup!==!0||this.component!==t)return;let e=t.layout;e&&e.isUnit===!0&&this.isKeepAlive(t)&&wt(e,"onActivate",[this.params,{restored:!1}])}getScrollKey(){let t=this.route||{};return(t.routeId||"")+"|"+(t.path||"")}getPagePath(){let e=(this.route||{}).path||"",r=e.indexOf("#");return r>-1?e.substring(0,r):e}getRootNodes(t){let e=[],r=Sr(t);r&&e.push(r);let s=t.layoutRoots||(t.layoutRoot?[t.layoutRoot]:null),o=t.errorRoots||(t.errorRoot?[t.errorRoot]:null),i=t.loadingRoots||null,a=[s,o,i];for(let l=0;l<3;l++){let c=a[l];if(c)for(let h=0,u=c.length;h<u;h++){let m=c[h];m&&e.indexOf(m)===-1&&e.push(m)}}return hr(e),e}callPageHook(t,e){let r=this.component;if(!r)return;wt(r,t,e);let s=r.layout;s&&s!==r&&s.isUnit===!0&&wt(s,t,e)}restoreHistoryScroll(){let t=this.pageCache.getScroll(this.getScrollKey());if(!t)return;let e=++this.scrollToken,r=this.component,s=()=>ot(this.getRootNodes(r),t);if(s()||typeof requestAnimationFrame>"u")return;let o=$t(),i=()=>{e!==this.scrollToken||this.setup!==!0||this.component!==r||s()||$t()-o>yr||requestAnimationFrame(i)};requestAnimationFrame(i)}restoreDetachedScroll(){let t=this.savedScroll;this.savedScroll=null;let e=this.component;if(!t||!e)return;if(typeof requestAnimationFrame>"u"){ot(this.getRootNodes(e),t);return}let r=++this.scrollToken;requestAnimationFrame(()=>{r!==this.scrollToken||this.setup!==!0||this.component!==e||ot(this.getRootNodes(e),t)})}detach(t){if(t.rendered!==!0)return!1;let e=this.getRootNodes(t);if(e.length===0)return!1;let r=this.takeScroll(t);return this.savedScroll=r,this.pageCache.saveScroll(this.getScrollKey(),r),this.getKeepAliveMode(t)==="hide"&&t.loaded!==!1&&Jt(e,fr).length===0?(mr(e),this.hideInPlace(e)):this.removeNodes(e),this.detachedNodes=e,this.detachedPath=this.getPagePath(),this.callPageHook("onDeactivate",[]),this.pageCache.add(this),!0}removeNodes(t){let e=new WeakMap;for(let r=0,s=t.length;r<s;r++){let o=t[r],i=o.parentNode;i&&(e.set(o,i),i.removeChild(o))}this.detachedParents=e,this.hiddenInPlace=!1,this.hiddenStyles=null}hideInPlace(t){let e=new WeakMap;for(let r=0,s=t.length;r<s;r++){let o=t[r];o&&o.nodeType===1&&e.set(o,ur(o))}this.detachedParents=null,this.hiddenInPlace=!0,this.hiddenStyles=e}showInPlace(t,e){let r=this.hiddenStyles;for(let s=0,o=t.length;s<o;s++){let i=t[s];i.nodeType===1&&i.hasAttribute(G)&&dr(i,r?r.get(i):void 0),i.isConnected||e.appendChild(i)}}reattach(){let t=this.pageCache;t&&t.delete(this),this.detachedNodes=null;let e=this.detachedParents;this.detachedParents=null;let r=this.hiddenInPlace;this.hiddenInPlace=!1;let s=this.component,o=this.container;if(!s||s.rendered!==!0||!o||typeof o.appendChild!="function")return this.savedScroll=null,this.hiddenStyles=null,this.releaseComponent(),!1;if(r)return this.showInPlace(this.getRootNodes(s),o),this.hiddenStyles=null,this.setup=!0,v.schedule(),!0;let i=this.getRootNodes(s);for(let a=0,l=i.length;a<l;a++){let c=i[a],h=e?e.get(c):null;(h&&h.isConnected?h:o).appendChild(c)}return this.setup=!0,v.schedule(),!0}evict(){if(this.detachedNodes===null)return;let t=this.pageCache;t&&t.delete(this),this.detachedNodes=null,this.detachedParents=null,this.savedScroll=null,this.hiddenInPlace=!1,this.hiddenStyles=null,this.releaseComponent()}releaseComponent(){let t=this.component;this.component=null,t&&typeof t.destroy=="function"&&t.destroy()}remove(t){if(this.setup!==!0){t===!0&&this.evict();return}this.setup=!1,this.scrollToken++;let e=this.component;if(!e)return;let r=this.pageCache;if(t!==!0&&r!==null){if(this.isKeepAlive(e)&&this.detach(e))return;r.saveScroll(this.getScrollKey(),this.takeScroll(e))}this.capturedScroll=null,this.releaseComponent()}update(t){let e=this.component;e&&typeof e.update=="function"&&e.update(t)}};var Xt=n=>{if(!n.length)return null;let t={};for(let e=0,r=n.length;e<r;e++)t[n[e]]=null;return t},Zt=n=>{let t=[];if(!n)return t;let e=/[*?]/g;n=n.replace(e,"");let r=/:(.[^./?&($]+)\?*/g,s=n.match(r);if(s===null)return t;for(let o=0,i=s.length;o<i;o++){let a=s[o];a&&t.push(a.replace(":",""))}return t};var vr=/(\/):[^/(]*?\?/g,xr=/\//g,kr=/(\?\/+\*?)/g,wr=/(:[^/?&($]+)/g,Cr=/(\*)/g,Tr=n=>n.replace(vr,t=>t.replace(xr,"(?:$|/)")),Rr=n=>(n=n.replace(kr,"?/*"),n.replace(wr,t=>t.indexOf(".")<0?"([^/|?]+)":"([^/|?]+.*)")),Pr=n=>n.replace(Cr,".*"),Ar=(n,t)=>n+=t[t.length-1]==="*"?"":"$",te=n=>{if(!n)return"";let t=n;return t=Tr(t),t=Rr(t),t=Pr(t),t=Ar(t,n),t};var br=0,ee=(n,t="")=>{let e=n||"",r=typeof t=="string"&&t?t:e,s=null,o=[],i=r.match(/#\{([^}]+)\}/);i&&i[1]&&(s=i[1].trim(),r=r.replace(i[0],""),e=e.replace(i[0],""));let a=r.indexOf("?");if(a>-1){let h=r.substring(a+1);if(h.indexOf("=")>-1){let u=h.split("&");for(let y=0,H=u.length;y<H;y++){let N=u[y];if(!N)continue;let[Ne,We=""]=N.split("="),Pt=(Ne||"").trim();Pt&&o.push({key:Pt,value:(We||"").trim()})}r=r.substring(0,a);let m=e.indexOf("?");m>-1&&(e=e.substring(0,m))}}let l=s!==null||o.length>0;return l&&!r&&(e="*"),{uriPath:e,requiredHash:s,requiredQuery:o,hasConditions:l}},re=n=>{if(!n)return"";let t=n.indexOf("?"),e=n.indexOf("#"),r=n.length;return t>-1&&(r=t),e>-1&&e<r&&(r=e),n.substring(0,r).replace(/\/\.(?:\/|$)/g,"/")},Er=n=>{if(!n)return"";let t=n.indexOf("#");return t===-1?"":n.substring(t+1)},Ir=n=>{if(!n)return"";let t=n.indexOf("?");if(t===-1)return"";let e=n.indexOf("#",t);return e===-1?n.substring(t+1):n.substring(t+1,e)},lt=class extends Lt{constructor(t,e,r=null){let s=t.baseUri,i=ee(s,t.rawUri).uriPath,a=Zt(i),l=Xt(a),c=super(l);return this.uri=s,this.matchUri=i,this.paramKeys=a,this.titleCallBack=e,this.pageCache=r,this.setupRoute(t),this.set("active",!1),c}setup(){this.stage={},this.routeId=null,this.uri=null,this.rawUri=null,this.matchUri="",this.uriQuery=/$^/,this.controller=null,this.paramKeys=[],this.requiredHash=null,this.requiredQuery=[],this.hasConditions=!1,this.titleCallBack=()=>{},this.path=null,this.referralPath=null,this.params=null,this.callBack=null,this.title=null,this.preventScroll=!1,this.scrollTo=null,this.pageCache=null,this.importSrc=null}setupRoute(t){this.routeId=t.id||"bs-rte-"+br++,this.rawUri=t.rawUri||null,this.path=null,this.referralPath=null;let e=ee(this.uri,this.rawUri||"");this.matchUri=e.uriPath,this.requiredHash=e.requiredHash,this.requiredQuery=e.requiredQuery,this.hasConditions=e.hasConditions;let r=te(this.matchUri);this.uriQuery=new RegExp("^"+r),this.params=null,this.setupComponentHelper(t),this.callBack=t.callBack,this.title=t.title,this.preventScroll=t.preventScroll||!1,this.scrollTo=t.scrollTo||null}setTitle(t){this.title=t,this.titleCallBack(this,t)}deactivate(t){this.set("active",!1);let e=this.controller;e&&e.remove(t===!0)}captureScroll(){let t=this.controller;t&&this.get("active")&&t.captureScroll()}releaseCapturedScroll(){let t=this.controller;t&&t.releaseCapturedScroll()}isDormant(){let t=this.controller;if(!t)return!1;let e=t.container;return e?e.isConnected===!1?!0:typeof e.closest=="function"&&e.closest("["+G+"]")!==null:!1}getLayout(t){if(t.component)return t.component;let e=t.import;if(!e)return null;let r=e&&typeof e=="object"&&!(e instanceof Promise)?e.src:e;return this.importSrc=typeof r=="string"||typeof r=="function"?r:null,Kt(e)}setupComponentHelper(t){let e=this.getLayout(t);if(!e)return;let{container:r,persist:s,parent:o,keepAlive:i,keepAliveMode:a}=t,l={component:e,container:r,persist:s,parent:o,keepAlive:i,keepAliveMode:a,pageCache:this.pageCache},c=bt(this);this.controller=new at(c,l)}resumeRoute(t){let e=this.controller;e&&(e.container=t)}setPath(t,e){this.path=t,this.referralPath=e}select(){this.set("active",!0);let t=this.stage,e=this.callBack;typeof e=="function"&&e(t);let r=this.controller;r&&r.focus(t);let s=this.path;if(!s)return;let o=s.split("#")[1];o&&this.scrollToId(o)}scrollToId(t){if(!t)return;let e=document.getElementById(t);e&&e.scrollIntoView(!0)}match(t){let e=!1,r=re(t),s=this.uriQuery||/$^/,o=r.match(s);return o===null?(this.resetParams(),e):Array.isArray(o)?this.matchConditions(t)?(this.setParams(o,1),e=o,e):(this.resetParams(),!1):e}matches(t){return(this.uriQuery||/$^/).test(re(t))&&this.matchConditions(t)}prefetch(){let t=this.importSrc;return t?Ft(t):null}matchConditions(t){if(!this.hasConditions)return!0;if(this.requiredHash!==null&&Er(t)!==this.requiredHash)return!1;let e=this.requiredQuery||[];if(e.length>0){let r=Ir(t);if(!r)return!1;let s=new URLSearchParams(r);for(let o=0,i=e.length;o<i;o++){let a=e[o];if(!s.has(a.key)||s.get(a.key)!==a.value)return!1}}return!0}resetParams(){this.stage={}}setParams(t,e=0){if(!Array.isArray(t))return;let r=this.paramKeys;if(!r)return;let s={};for(let o=0,i=r.length;o<i;o++){let a=r[o];typeof a<"u"&&(s[a]=t[o+e])}this.set(s)}getParams(){return this.stage}};var Lr=n=>{let t=/\w\S*/;return n.replace(t,e=>e.charAt(0).toUpperCase()+e.substring(1).toLowerCase())},Mr=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),_r=(n,t)=>{if(n.indexOf(":")===-1)return n;let e=t.stage;for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let s=new RegExp(":"+Mr(r),"gi");n=n.replace(s,()=>e[r])}return n},Dr=(n,t)=>t&&(typeof t=="function"&&(t=t(n.stage)),t=_r(t,n),Lr(t)),Or=(n,t)=>(t!==""&&(n+=" - "+t),n),ne=(n,t,e)=>t&&(t=Dr(n,t),Or(t,e));var Br=()=>typeof window<"u"?window.location:{},Ur=n=>{if(!n)return"";let t=n.indexOf("#");return t>-1?n.substring(t+1):""},Hr=1500,ct=["wheel","touchstart","keydown","pointerdown"],se=()=>typeof performance<"u"&&performance.now?performance.now():Date.now(),Ct=class{constructor(){this.version="1.0.2",this.baseURI="/",this.title="",this.lastPath=null,this.path=null,this.lastMatchedRoute=null,this.lastScrollGroup=null,this.activeScrollGroups=new Set,this.scrollGroupsReady=new Set,this.currentGroupId=null,this.scrollWaitToken=0,this.cancelScrollWait=null,this.keepAlive=!1,this.keepAliveMax=St,this.keepAliveMode="detach",this.pageCache=new st(this),this.history=null,this.callBackLink=null,this.location=Br(),this.routes=[],this.switches=new Map,this.switchCount=0,this.data=new Mt({path:""})}setupHistory(){this.history=nt.setup(this)}createRoute(t){let e=t.uri||"*";return t.rawUri=e,t.baseUri=this.createURI(e),new lt(t,this.updateTitle.bind(this),this.pageCache)}setKeepAlive(t,e){this.keepAlive=t===!0;let r=e?e.max:void 0;typeof r=="number"&&r>=0&&(this.keepAliveMax=r);let s=e?e.mode:void 0;return(s==="hide"||s==="detach")&&(this.keepAliveMode=s),this.pageCache.trim(),this}add(t){if(typeof t!="object"){let r=arguments;t={uri:r[0],component:r[1],callBack:r[2],title:r[3],id:r[4],container:r[5]}}let e=this.createRoute(t);return this.addRoute(e),e}addRoute(t){this.routes.push(t),this.checkRoute(t,this.getPath())}resume(t,e){t.resumeRoute(e),this.addRoute(t)}getBasePath(){if(!this.basePath){let t=this.baseURI||"";t[t.length-1]!=="/"&&(t+="/"),this.basePath=t}return this.basePath}createURI(t){let e=this.getBasePath(),r=et.removeSlashes(t);return r=r.replace(/^(?:\.\/)+/,""),r==="."&&(r=""),e+r}getRoute(t){let e=this.routes,r=e.length;if(r>0)for(let s=0;s<r;s++){let o=e[s];if(o.uri===t)return o}return null}getRouteById(t){let e=this.routes,r=e.length;if(r>0)for(let s=0;s<r;s++){let o=e[s];if(o.routeId===t)return o}return!1}removeRoute(t){let e=this.routes,r=e.indexOf(t);r>-1&&e.splice(r,1),this.lastMatchedRoute===t&&(this.lastMatchedRoute=null),t&&typeof t.deactivate=="function"&&t.deactivate(!0)}addSwitch(t){let e=this.switchCount++,r=this.getSwitchGroup(e);for(let s=0,o=t.length;s<o;s++){let i=t[s];if(!i)continue;let a=this.createRoute(i);r.push(a)}return this.checkGroupForRegistration(e,r),e}resumeSwitch(t,e){let r=this.switchCount++,s=this.getSwitchGroup(r);for(let o=0,i=t.length;o<i;o++){let l=t[o].component.route;l.resumeRoute(e),s.push(l)}return this.checkGroupForRegistration(r,s),r}checkGroupForRegistration(t,e){let r=this.scrollIntent,s=this.currentGroupId;this.scrollIntent=null,this.currentGroupId=t,this.checkGroup(e,this.getPath()),this.currentGroupId=s;let o=this.scrollIntent;o&&o.type==="target"&&o.groupId!==null&&o.groupId!==void 0&&(this.activeScrollGroups.add(o.groupId),this.lastScrollGroup=o.groupId),this.scrollIntent=r}getSwitchGroup(t){let e=this.switches.get(t);if(e)return e;let r=[];return this.switches.set(t,r),r}removeSwitch(t){this.activeScrollGroups.delete(t),this.lastScrollGroup===t&&(this.lastScrollGroup=null);let e=this.switches.get(t);if(this.switches.delete(t),!!e)for(let r=0,s=e.length;r<s;r++){let o=e[r];o&&typeof o.deactivate=="function"&&o.deactivate(!0)}}remove(t){t=this.createURI(t);let e=this.getRoute(t);return e&&this.removeRoute(e),this}setup(t,e){this.baseURI=t||"/",this.updateBaseTag(this.baseURI),this.title=typeof e<"u"?e:"",this.setupHistory(),this.data.path=this.getPath(),this.callBackLink=this.checkLink.bind(this),p.on("click",document,this.callBackLink);let r=this.getEndPoint();return this.navigate(r,null,!0),this}updateBaseTag(t){let e=document.getElementsByTagName("base");e.length&&(e[0].href=t)}getParentLink(t){return t.closest("a")}checkLink(t){if(t.defaultPrevented===!0||t.ctrlKey===!0||t.metaKey===!0||t.shiftKey===!0||t.altKey===!0||typeof t.button=="number"&&t.button!==0)return!0;let e=t.target&&t.target.closest?t.target.closest("a"):null;if(!e||e.dataset.cancelRoute||e.hasAttribute("download"))return!0;let r=e.getAttribute("target");if(r&&r!=="_self")return!0;let s=e.getAttribute("href");if(s===null)return!0;let o=this.getLinkPath(s);if(o===null)return!0;let i=e.dataset.replace==="true";return this.navigate(o,null,i),t.preventDefault(),t.stopPropagation(),!1}getLinkPath(t){let e=t;if(e.substring(0,2)==="//"||/^[a-z][a-z0-9+.-]*:/i.test(e)){let s=this.location;if(!s||!s.origin||typeof URL>"u")return null;let o;try{o=new URL(e,s.href)}catch{return null}if(o.origin!==s.origin)return null;e=o.pathname+o.search+o.hash}let r=this.baseURI;return r!=="/"&&e.indexOf(r)===0&&(e=e.substring(r.length)),e}reset(){let t=this.routes;for(let e=0,r=t.length;e<r;e++){let s=t[e];s&&typeof s.deactivate=="function"&&s.deactivate(!0)}return this.pageCache.clear(),this.routes=[],this.switches=new Map,this.switchCount=0,this.lastMatchedRoute=null,this}activate(){return this.checkActiveRoutes(),this}navigate(t,e,r){return t=this.createURI(t),this.history.addState(t,e,r),this.updatePath(),this.activate(),this}prefetch(t){if(typeof t!="string"||!t)return Promise.resolve([]);let e=this.getLinkPath(t);if(e===null)return Promise.resolve([]);let r=this.createURI(e),s=[],o=a=>{if(!a||!a.controller||typeof a.matches!="function"||!a.matches(r))return!1;let l=a.prefetch();return l&&s.push(l),!0},i=this.routes;for(let a=0,l=i.length;a<l;a++)o(i[a]);for(let a of this.switches.values())for(let l=0,c=a.length;l<c&&!o(a[l]);l++);return Promise.all(s)}updatePath(){let t=this.getPath();this.data.path=t}updateTitle(t){if(!t||!t.title)return this;let e=t.title;return document.title=ne(t,e,this.title),this}checkActiveRoutes(t,e){t=t||this.getPath(),t!==this.path&&(this.lastPath=this.path),this.path=t,this.updatePath(),this.scrollIntent=null,this.scrollGroupsReady=new Set(this.activeScrollGroups),this.scrollWaitToken++;let r=this.pageCache;r.historyNavigation=e===!0;let s=this.captureActiveScroll(),o=this.routes;for(let i=0,a=o.length;i<a;i++){let l=o[i];typeof l>"u"||r.size>0&&l.isDormant()||this.checkRoute(l,t)}if(this.checkSwitches(t,!0),r.historyNavigation=!1,this.releaseCapturedScroll(s),e===!0){this.scrollIntent=null;return}this.applyScrollIntent()}captureActiveScroll(){let t=[],e=s=>{!s||!s.controller||!s.get("active")||s.isDormant()||(s.captureScroll(),t.push(s))},r=this.routes;for(let s=0,o=r.length;s<o;s++)e(r[s]);for(let s of this.switches.values())for(let o=0,i=s.length;o<i;o++)e(s[o]);return t}releaseCapturedScroll(t){for(let e=0,r=t.length;e<r;e++)t[e].releaseCapturedScroll()}checkSwitches(t,e){let r=this.switches;for(let[s,o]of r.entries())e===!0&&this.pageCache.size>0&&o.length&&o[0].isDormant()||(this.currentGroupId=s,this.checkGroup(o,t));this.currentGroupId=null}checkGroup(t,e){let r=t.length;if(!r)return;let s=null;for(let a=0;a<r;a++)if(t[a].get("active")){s=t[a];break}let o=!1;s&&(o=s.match(e)!==!1);let i;for(let a=0;a<r;a++){let l=t[a];if(typeof l>"u")continue;(l===s?o:l.match(e))!==!1&&i===void 0&&l.controller&&(i=l)}if(!i){s&&s!==t[0]&&s.deactivate(),this.select(t[0],!0);return}this.select(i),s&&s!==i&&s.deactivate();for(let a=0;a<r;a++){let l=t[a];l&&l!==i&&l!==s&&l.deactivate()}}checkRoute(t,e){let r=this.check(t,e);return r!==!1?(this.select(t),this.lastMatchedRoute=t):t.deactivate(),r}check(t,e){return t?(e=e||this.getPath(),t.match(e)!==!1):!1}select(t,e){if(!t||(t.setPath(this.path,this.lastPath),t.select(),this.updateTitle(t),e===!0))return;let r=this.scrollIntent;if(r&&r.type==="hash")return;let s=Ur(this.path);if(s){this.scrollIntent={type:"hash",hash:s};return}t.scrollTo?(this.scrollIntent={type:"target",selector:t.scrollTo,groupId:this.currentGroupId},this.currentGroupId!==null&&this.currentGroupId!==void 0&&this.activeScrollGroups.add(this.currentGroupId)):t.preventScroll!==!0&&!this.scrollIntent&&(this.scrollIntent={type:"top"})}applyScrollIntent(){let t=this.scrollIntent;if(this.scrollIntent=null,!t)return;if(t.type==="hash"){this.lastScrollGroup=null,this.scrollToHash(t.hash);return}if(t.type==="top"){this.lastScrollGroup=null,this.checkToScroll(),this.reassertScrollTop();return}if(t.type!=="target")return;let e=t.groupId!==null&&t.groupId!==void 0,r=e&&this.scrollGroupsReady.has(t.groupId);if(this.lastScrollGroup=e?t.groupId:null,r){this.scrollToTarget(t.selector,t.groupId);return}typeof window<"u"&&window.scrollTo(0,0),this.reassertScrollTop()}reassertScrollTop(){if(typeof window>"u"||typeof requestAnimationFrame>"u")return;let t=++this.scrollWaitToken;requestAnimationFrame(()=>{t===this.scrollWaitToken&&(window.scrollY>0||window.pageYOffset>0)&&window.scrollTo(0,0)})}restoreScrollPosition(t){if(!t||typeof window>"u")return;let e=++this.scrollWaitToken;this.clearScrollWait();let r=t.x||0,s=t.y||0;if(typeof requestAnimationFrame>"u"||this.canReachScroll(r,s)){window.scrollTo(r,s);return}let o=()=>{e===this.scrollWaitToken&&this.scrollWaitToken++,this.clearScrollWait()},i={capture:!0,passive:!0};for(let c=0,h=ct.length;c<h;c++)window.addEventListener(ct[c],o,i);this.cancelScrollWait=()=>{for(let c=0,h=ct.length;c<h;c++)window.removeEventListener(ct[c],o,i)};let a=se(),l=()=>{if(e!==this.scrollWaitToken){this.clearScrollWait();return}if(this.canReachScroll(r,s)||se()-a>=Hr){this.clearScrollWait(),window.scrollTo(r,s);return}requestAnimationFrame(l)};requestAnimationFrame(l)}clearScrollWait(){let t=this.cancelScrollWait;t&&(this.cancelScrollWait=null,t())}canReachScroll(t,e){let r=document.documentElement;if(!r)return!0;let s=(r.scrollHeight||0)-(window.innerHeight||0),o=(r.scrollWidth||0)-(window.innerWidth||0);return(e<=0||e<=s+1)&&(t<=0||t<=o+1)}scrollToHash(t){if(!t||typeof document>"u")return;let e=()=>{let l=document.getElementById(t);if(l)return l;try{return document.getElementById(decodeURIComponent(t))}catch{return null}},r=e();if(r){r.scrollIntoView(!0);return}if(typeof requestAnimationFrame>"u")return;let s=++this.scrollWaitToken,o=30,i=0,a=()=>{if(s!==this.scrollWaitToken)return;let l=e();if(l){l.scrollIntoView(!0);return}++i<o&&requestAnimationFrame(a)};requestAnimationFrame(a)}findScrollTarget(t,e){if(typeof document>"u")return null;let r=this.findScopedScrollTarget(t,e);if(r)return r;let s=document.querySelectorAll(t);for(let o=0,i=s.length;o<i;o++){let a=s[o];if(a&&a.isConnected!==!1)return a}return null}findScopedScrollTarget(t,e){if(e==null||!this.switches)return null;let r=this.switches.get(e),s=r&&r[0],o=s&&s.controller&&s.controller.container;if(!o||o.nodeType!==1)return null;let i=o;for(let a=0;a<8;a++){let l=i.parentElement;if(!l||l===document.body||l===document.documentElement)break;let c=l.querySelector(t);if(c)return c;i=l}return null}readScrollTarget(t){let e=window.getComputedStyle(t),r=e.position==="sticky",s=r&&parseFloat(e.top)||0,o=(t.offsetWidth||0)>0||(t.offsetHeight||0)>0,i;if(r){let a=t.style.position;t.style.position="static",i=t.getBoundingClientRect().top+window.scrollY,t.style.position=a}else i=t.getBoundingClientRect().top+window.scrollY;return{sized:o,targetScroll:i-s}}scrollToTarget(t,e){if(typeof t!="string"||typeof document>"u")return;let r=c=>{window.scrollY>c&&window.scrollTo(0,Math.max(0,c))};if(typeof requestAnimationFrame>"u"){let c=this.findScrollTarget(t,e);if(c){let h=this.readScrollTarget(c);h.sized&&r(h.targetScroll)}return}let s=++this.scrollWaitToken,o=30,i=0,a=null,l=()=>{if(s!==this.scrollWaitToken)return;let c=this.findScrollTarget(t,e);if(c){let h=this.readScrollTarget(c);if(h.sized){if(a!==null&&Math.abs(a-h.targetScroll)<1){r(h.targetScroll);return}a=h.targetScroll}}if(++i<o){requestAnimationFrame(l);return}a!==null&&r(a)};requestAnimationFrame(l)}checkToScroll(){this.shouldScrollToTop()&&window.scrollTo(0,0)}cleanPath(t){return t?t.split("?")[0].split("#")[0]:"/"}shouldScrollToTop(){let t=this.cleanPath(this.getPath()),r=this.cleanPath(this.lastPath).split("/"),s=t.split("/");if(r.length!==s.length)return!0;let o=r[r.length-1],i=s[s.length-1];return o!==i}getEndPoint(){return this.getPath().replace(this.baseURI,"")||"/"}destroy(){typeof this.callBackLink=="function"&&p.off("click",document,this.callBackLink);let t=this.history;t&&typeof t.removeEvent=="function"&&t.removeEvent(),this.clearScrollWait(),this.pageCache.clear()}getPath(){let t=this.location,e=this.history;return e&&e.type==="hash"?t.hash.replace("#",""):t.pathname+t.search+t.hash}},R=new Ct;var oe=(n,t)=>({attr:n,value:t}),Nr=(n,t)=>{if(!t.startsWith(n))return!1;let e=t[n.length];return e===void 0||e==="/"||e==="#"||e==="."||e==="?"},Tt=class extends x{beforeSetup(){this.selectedClass=this.activeClass||"active"}render(){let t=this.href,e=this.text,r=this.setupWatchers(t,e);return{tag:"a",class:this.class||this.className||null,onState:["selected",{[this.selectedClass]:!0}],href:this.getString(t),text:this.getString(e),nest:this.nest||this.children,dataStateSet:this.dataSet,"data-replace":this.replace?"true":null,watch:r}}getLinkPath(){return this?.panel?.pathname||null}getString(t){let e=typeof t;return e!=="object"&&e!=="undefined"?t:null}setupWatchers(t,e){let r=this.exact===!0,s=R.data,o=[];t&&typeof t=="object"&&o.push(oe("href",t)),e&&typeof e=="object"&&o.push(oe("text",e));let i=null,a="",l="";return o.push({value:["[[path]]",s],callBack:(c,h)=>{if(typeof h.pathname>"u")return;let u=h.getAttribute("href");if(u!==i){i=u;let y=h.pathname+h.search+h.hash;a=y,l=h.hash||h.search?y:h.pathname}let m=r?c===a:Nr(l,c);this.update(m)}}),o}setupStates(){return{selected:!1}}update(t){this.state&&(this.state.selected=t)}};var ie=(n,t,e=null)=>{if(!n)return;let r=null,s=!1,o=()=>{s||(s=!0,r&&(clearTimeout(r),r=null),p.off("animationend",n,i),n&&n.classList.remove(t),e&&e())},i=l=>{l.target===n&&o()};p.on("animationend",n,i),n.classList.add(t);let a=()=>{if(!s)try{let l=window.getComputedStyle(n),c=parseFloat(l.animationDuration)*1e3||1e3,h=parseFloat(l.animationDelay)*1e3||0;r=setTimeout(o,c+h+100)}catch{r=setTimeout(o,1e3)}};if(typeof requestAnimationFrame>"u"){r=setTimeout(o,1e3);return}requestAnimationFrame(()=>requestAnimationFrame(a))},ae=(n,t,e)=>{ie(n,t)},le=(n,t,e)=>{let r=()=>{n&&n.remove&&n.remove()};Wr(n,()=>ie(n,t,r),e)};f.addType("manual-destroy",n=>{if(!n)return!1;n.callBack(n.ele,n.parent)});var Wr=(n,t,e)=>{f.add(n,"manual-destroy",{ele:n,callBack:t,parent:e})};var K=(n,t,e,r)=>{if(Array.isArray(e[0])){e.forEach(s=>{s&&K(n,t,s,r)});return}qr(n,t,e,r)},qr=(n,t,e,r)=>{let s,o;if(e.length<3?[s,o]=e:[t,s,o]=e,!t||!s)return;if(typeof t.on!="function"){console.warn('Watcher directive: Data source does not have an "on" method. Make sure your component has data, state, or context.data initialized before using watchers like onSet, watch, or [[prop]] syntax.',n,t);return}let i=Fr(n,s,o,r);E.watch(n,t,s,i)},Fr=(n,t,e,r)=>typeof e=="object"?s=>{zr(n,e,s)}:s=>{Kr(n,e,t,s,r)},ce=new WeakSet,Gr=(n,t,e)=>{!n||!n.isUnit&&!n.isComponent||ce.has(e)||ce.add(e)},Kr=(n,t,e,r,s)=>{let o=t(r,n,s);switch(typeof o){case"object":if(o===null)break;Gr(o,e,n),d.rebuild(o,n,s);break;case"string":let i=Et(n);if(i!=="textContent"){n.setAttribute(i,o);break}q.addHtml(n,o);break}},zr=(n,t,e)=>{let r=Object.keys(t);for(let s=0,o=r.length;s<o;s++){let i=r[s];i&&(t[i]===e?n.classList.add(i):n.classList.remove(i))}};var U=(n,t,e)=>{let r=P(e);K(n,r,t,e)};var he=(n,t,e)=>{t&&n.setAttribute("role",t)},Qr=n=>(t,e)=>{let r=t?"true":"false";e.setAttribute(n,r)},ue=(n,t,e)=>{if(!t)return;let r=t.role;r&&(n.setAttribute("role",r),t.role=null);let s=Object.keys(t);for(let o=0,i=s.length;o<i;o++){let a=s[o],l=t[a];if(l===null)continue;let c="aria-"+a;if(Array.isArray(l)){let h=l.slice();h.push(Qr(c)),U(n,h,e)}else n.setAttribute(c,l)}};var de=(n,t,e)=>{if(!t)return;let r=w.parse(t,e);S.addAttributes(n,r.attr,e),d.setDirectives(n,r.directives,e)};f.addType("context",n=>{if(!n)return!1;n.parent.removeContextBranch(n.branch)});var Rt=n=>n?n.getContext():null,fe=(n,t,e)=>{if(typeof t!="function")return;let r=Rt(e),s=t(r);de(n,s,e)},pe=(n,t,e)=>{if(typeof t!="function")return;let r=Rt(e);t(r)},me=(n,t,e)=>{if(typeof t!="function"||!e)return;let r=Rt(e),s=t(r);if(!s)return;let o=s[0];o&&(e.addContextBranch(o,s[1]),jr(n,o,e))},jr=(n,t,e)=>{f.add(n,"context",{branch:t,parent:e})};var ge=(n,t,e)=>{};var ye=(n,t,e)=>{if(!e)return;let r=e._layout?e._layout:e.render();console.log("Debug: ","ele: ",n),console.log("Data: ",t),console.log("Layout: ",r),console.log("parent: ",e)};var Se=(n,t,e)=>{},ve=(n,t,e)=>{if(!t||!e)return;let r=t(e,n);r&&d.build(r,n,e)},xe=(n,t,e)=>{if(!t||!e)return;let r=e.getId(t);n.id=r},ke=(n,t,e)=>{if(!t||!e)return;let r=t(e.data,n);r&&d.build(r,n,e)},we=(n,t,e)=>{if(!t||!e)return;let r=t(e.state,n);r&&d.build(r,n,e)},Ce=(n,t,e)=>{if(!t||!e)return;let r=e.state,s=t(r);if(!e.state){e.setStateHelper(s);return}e.addState(s)},Te=(n,t,e)=>{if(!t||!e)return;e.events||e.setEventHelper();let r=t[2];if(r){let s=r;r=o=>{s(o,e)}}e.events.on(t[0],t[1],r,t[3])};var Re=(n,t,e)=>{let r,s,o;if(typeof t=="string"){if(r=P(e),!r)return;s=t}else if(Array.isArray(t))if(typeof t[0]!="object"){let i=P(e);if(!i)return;r=i,s=t[0],o=t[1]}else[r,s,o]=t;E.bind(n,r,s,o)};var ht=(n,t,e)=>{K(n,e.state,t,e)};var Pe=n=>(t,e)=>{let[r,s,o="active"]=n,i=t===s?o:"";e.dataset[r]=i},Ae=(n,t,e)=>{if(!t)return;let r=t.length-1,s=t[r],o=t.slice(0,r);o.push(Pe(s)),U(n,o,e)},be=(n,t,e)=>{if(!t)return;let r=t.length-1,s=t[r],o=t.slice(0,r);o.push(Pe(s)),ht(n,o,e)};var Ee=n=>{for(let t=0,e=n.length;t<e;t++){let r=n[t];r&&r.remove()}n.length=0};f.addType("forScopes",n=>{if(!n)return!1;Ee(n.scopes)});var Ie=(n,t,e)=>{let r,s,o,i;if(typeof t[0]=="string"||t.length<3){let h=P(e);if(!h)return;r=h,[s,o,i]=t}else[r,s,o,i]=t;let a=i!==!1,l=s+"[",c=a?{scopes:[]}:null;c&&f.add(n,"forScopes",c),E.watch(n,r,s,h=>{if(d.removeAll(n),c&&Ee(c.scopes),!h||h.length<1)return;let u=[];for(let m=0,y=h.length;m<y;m++){let H=a?r.scope(l+m+"]"):null;H&&c&&c.scopes.push(H);let N=o(h[m],m,H,u);N!==null&&u.push(N)}return d.build(u,n,e)})};var Le=(n,t,e)=>{let r=t[0];if(!r||r.length<1)return;let s=t[1],o=[];for(let i=0,a=r.length;i<a;i++){let l=r[i];if(!l)continue;let c=s(l,i);c!==null&&o.push(c)}d.build(o,n,e)};var Me=(n,t,e)=>{t(n,e)};f.addType("destroyed",n=>{if(!n)return!1;n.callBack(n.ele,n.parent)});var _e=(n,t,e)=>{Vr(n,t,e)},Vr=(n,t,e)=>{f.add(n,"destroyed",{ele:n,callBack:t,parent:e})};var De=(n,t,e)=>{if(t)if(Array.isArray(t)&&typeof t[0]!="string")for(let r=0,s=t.length;r<s;r++)L.setup(n,t[r],e);else L.setup(n,t,e)};f.addType("routes",n=>{if(!n)return!1;let t=n.route;t&&R.removeRoute(t)});var Be=(n,t,e)=>{if(t)if(Array.isArray(t))for(let r=0,s=t.length;r<s;r++){let o=t[r];o&&Oe(n,o,e)}else Oe(n,t,e)},Oe=(n,t,e)=>{t.container=n,t.parent=e;let r=R.add(t);Yr(n,r)},Yr=(n,t)=>{f.add(n,"routes",{route:t})};var Ue=(n,t,e)=>{};f.addType("switch",n=>{if(!n)return!1;let t=n.id;R.removeSwitch(t)});var He=(n,t,e)=>{let r=t[0];for(let o=0,i=t.length;o<i;o++){let a=t[o];a&&(a.container=n,a.parent=e)}let s=R.addSwitch(t);$r(n,s)},$r=(n,t)=>{f.add(n,"switch",{id:t})};F.add("cache",Se).add("onCreated",Me).add("onDestroyed",_e).add("bind",Re).add("data",ge).add("state",Ue).add("onSet",U).add("onState",ht).add("animateIn",ae).add("animateOut",le).add("watch",De).add("useParent",ve).add("useData",ke).add("useState",we).add("getId",xe).add("addState",Ce).add("addEvent",Te).add("map",Le).add("for",Ie).add("useContext",pe).add("addContext",me).add("context",fe).add("role",he).add("aria",ue).add("route",Be).add("debug",ye).add("dataSet",Ae).add("dataStateSet",be).add("switch",He);export{F as a,Q as b,x as c,Dt as d,Ot as e,_ as f,d as g,Kt as h,Tt as i,Ct as j,R as k};
|
|
2
|
+
//# sourceMappingURL=chunk-KV6FLEYW.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b as A,c,d as f,e as m,f as P,g as C,h as S}from"../chunks/chunk-
|
|
1
|
+
import{a,b as A,c,d as f,e as m,f as P,g as C,h as S}from"../chunks/chunk-FRII433W.js";import"../chunks/chunk-EBXFAKPV.js";import{f as s}from"../chunks/chunk-76NP53O5.js";import"../chunks/chunk-6N533MOU.js";import"../chunks/chunk-6EAE4I3C.js";import"../chunks/chunk-ZUB7I6Z4.js";var b=r=>{let t=typeof r;return t!=="string"&&t!=="number"?r:d(r)},d=r=>[{tag:"text",textContent:r}],l=()=>({props:{},children:[]}),h=r=>({props:{},children:d(r)}),u=r=>({props:{},children:r}),y=r=>({props:r[0]||{},children:b(r[1])});var D=r=>({props:{watch:r},children:[]}),O=r=>{if(r.length===0)return l();let t=r[0],e=typeof t;if(e==="string"||e==="number")return h(t);if(Array.isArray(t))return s.isWatching(t)?D(t):u(t);let o=r[1]??r[0]??[];if(o&&Array.isArray(o)&&s.isWatching(o)){let n=r[0]&&!Array.isArray(r[0])?r[0]:{};r[0]={...n,watch:o},r[1]=[]}return y(r)},H=r=>(...t)=>{let{props:e,children:o}=O(t);return r(e,o)};var T=(r,t)=>{let e=Object.keys(r);for(let o=0,n=e.length;o<n;o++){let p=e[o],x=r[p],i=f[p]||p;t.prototype[i]=m(x,i)}return t},W=0,j=r=>{let t=class extends r{};return t.prototype._classId="pod"+W++,t},I=(r,t=c)=>{if(!r)return null;let e=j(t),o={},n=r(o);return T(o,e),e.prototype.render=n,e};export{H as Atom,C as Builder,c as Component,a as Directives,S as Import,P as Jot,I as Pod,A as Unit};
|
|
2
2
|
//# sourceMappingURL=component.js.map
|
package/dist/modules/data.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a,g as e,h as o}from"../chunks/chunk-
|
|
1
|
+
import{c as a,g as e,h as o}from"../chunks/chunk-76NP53O5.js";import"../chunks/chunk-6N533MOU.js";import"../chunks/chunk-6EAE4I3C.js";import"../chunks/chunk-ZUB7I6Z4.js";export{a as Data,e as Model,o as SimpleData};
|
|
2
2
|
//# sourceMappingURL=data.js.map
|
package/dist/modules/html.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as m}from"../chunks/chunk-
|
|
1
|
+
import{i as m}from"../chunks/chunk-6EAE4I3C.js";import"../chunks/chunk-ZUB7I6Z4.js";export{m as Html};
|
|
2
2
|
//# sourceMappingURL=html.js.map
|
package/dist/modules/router.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as r,j as o,k as t}from"../chunks/chunk-
|
|
1
|
+
import{i as r,j as o,k as t}from"../chunks/chunk-FRII433W.js";import"../chunks/chunk-EBXFAKPV.js";import"../chunks/chunk-76NP53O5.js";import"../chunks/chunk-6N533MOU.js";import"../chunks/chunk-6EAE4I3C.js";import"../chunks/chunk-ZUB7I6Z4.js";export{r as NavLink,o as Router,t as router};
|
|
2
2
|
//# sourceMappingURL=router.js.map
|
package/dist/modules/state.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r,b as t}from"../chunks/chunk-
|
|
1
|
+
import{a as r,b as t}from"../chunks/chunk-EBXFAKPV.js";import"../chunks/chunk-76NP53O5.js";import"../chunks/chunk-6N533MOU.js";import"../chunks/chunk-6EAE4I3C.js";import"../chunks/chunk-ZUB7I6Z4.js";export{r as State,t as Store};
|
|
2
2
|
//# sourceMappingURL=state.js.map
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
export function snapshotStage(stage: object | null | undefined): {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
} | null;
|
|
4
|
+
export function setInitialSnapshot(data: object, snapshot: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
} | null): void;
|
|
2
7
|
/**
|
|
3
8
|
* DataResumeHelper
|
|
4
9
|
*
|
|
@@ -32,6 +32,25 @@ export class History {
|
|
|
32
32
|
* @returns {object}
|
|
33
33
|
*/
|
|
34
34
|
getScrollPosition(): object;
|
|
35
|
+
/**
|
|
36
|
+
* This will record the window scroll position as it changes.
|
|
37
|
+
*
|
|
38
|
+
* @returns {void}
|
|
39
|
+
*/
|
|
40
|
+
trackScroll(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Read once at setup, before any route renders.
|
|
43
|
+
*
|
|
44
|
+
* @type {object|null} scrollPosition
|
|
45
|
+
*/
|
|
46
|
+
scrollPosition: object | null;
|
|
47
|
+
scrollHandler: () => void;
|
|
48
|
+
/**
|
|
49
|
+
* This will stop recording the scroll position.
|
|
50
|
+
*
|
|
51
|
+
* @returns {void}
|
|
52
|
+
*/
|
|
53
|
+
untrackScroll(): void;
|
|
35
54
|
/**
|
|
36
55
|
* This will scroll to a position.
|
|
37
56
|
*
|