taggedjs 3.1.13 → 3.1.15
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/bundle.js +1 -1
- package/bundle.js.map +1 -1
- package/js/TagJsTags/TagJsTag.type.d.ts +1 -0
- package/js/TagJsTags/getArrayTagJsTag.function.js.map +1 -1
- package/js/TagJsTags/getSimpleTagVar.function.js +11 -4
- package/js/TagJsTags/getSimpleTagVar.function.js.map +1 -1
- package/js/TagJsTags/tag.function.js.map +1 -1
- package/js/elements/attributeCallables.js +9 -2
- package/js/elements/attributeCallables.js.map +1 -1
- package/js/elements/elementFunctions.d.ts +4 -4
- package/js/elements/elementFunctions.js +25 -30
- package/js/elements/elementFunctions.js.map +1 -1
- package/js/elements/htmlTag.function.js +10 -12
- package/js/elements/htmlTag.function.js.map +1 -1
- package/js/interpolations/attributes/processFunctionAttr.function.js +0 -2
- package/js/interpolations/attributes/processFunctionAttr.function.js.map +1 -1
- package/js/render/executeWrap.function.js +0 -6
- package/js/render/executeWrap.function.js.map +1 -1
- package/js/render/paint.function.js +1 -1
- package/js/render/paint.function.js.map +1 -1
- package/js/render/update/updateExistingTagComponent.function.js +1 -0
- package/js/render/update/updateExistingTagComponent.function.js.map +1 -1
- package/js/tag/destroyArrayContext.function.js +3 -0
- package/js/tag/destroyArrayContext.function.js.map +1 -1
- package/js/tag/update/arrays/compareArrayItems.function.d.ts +3 -4
- package/js/tag/update/arrays/compareArrayItems.function.js +9 -22
- package/js/tag/update/arrays/compareArrayItems.function.js.map +1 -1
- package/js/tag/update/arrays/processTagArray.js +52 -18
- package/js/tag/update/arrays/processTagArray.js.map +1 -1
- package/js/tag/update/convertTagToElementManaged.function.js +0 -6
- package/js/tag/update/convertTagToElementManaged.function.js.map +1 -1
- package/js/tag/update/getOverrideTagVar.js.map +1 -1
- package/js/tag/update/tagValueUpdateHandler.function.js.map +1 -1
- package/js/version.d.ts +1 -1
- package/js/version.js +1 -1
- package/package.json +1 -1
package/bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t){return t.renderCount=t.renderCount||0,t.varCounter=0,t.state={newer:{state:[],states:[]}},t.global={blocked:[]}}t.d(e,{W9:()=>Sr,cg:()=>A,m0:()=>S,rS:()=>$o,Y2:()=>o,ei:()=>Ar,B7:()=>Q,TU:()=>tt,XF:()=>Or,PC:()=>Ir,Ot:()=>fr,Mj:()=>dr,tD:()=>O,a:()=>ma,xe:()=>Br,YO:()=>Dr,ZA:()=>kr,b:()=>Ta,rf:()=>Us,br:()=>ya,um:()=>Nn,x6:()=>Is,E2:()=>Mo,OH:()=>Mr,Ji:()=>Oa,TB:()=>Zt,Ii:()=>Gt,mX:()=>Zn,yV:()=>Ee,EI:()=>Ie,aY:()=>Aa,zV:()=>q,pf:()=>Xo,ze:()=>jo,Go:()=>at,bD:()=>ut,WJ:()=>et,wL:()=>zn,Ng:()=>zt,O:()=>fe,zH:()=>Da,r3:()=>aa,y4:()=>Ys,Df:()=>us,Ie:()=>I,lI:()=>ra,$F:()=>Sa,vP:()=>Ia,hp:()=>we,qr:()=>na,ts:()=>er,Zd:()=>oa,B4:()=>Zo,HD:()=>Nr,Az:()=>Hn,sV:()=>Qn,Ah:()=>n,f5:()=>Ce,Gk:()=>to,j_:()=>nr,h1:()=>Bs,h2:()=>_s,h3:()=>Fs,h4:()=>zs,h5:()=>Gs,h6:()=>Ks,zC:()=>Ro,d5:()=>Ls,wx:()=>ea,cF:()=>Ua,Hc:()=>ho,PB:()=>Jt,uq:()=>kt,hr:()=>Rs,qy:()=>js,gx:()=>Vs,pU:()=>ha,_8:()=>va,hF:()=>Os,cy:()=>U,Tn:()=>H,Gv:()=>N,yL:()=>D,D8:()=>M,Ze:()=>j,_4:()=>P,mn:()=>L,Pf:()=>xa,o1:()=>sa,z:()=>Vr,li:()=>Xs,nf:()=>Hs,iW:()=>Qs,mI:()=>Ds,C$:()=>Ea,et:()=>Ts,Vg:()=>Ws,ol:()=>Zs,sA:()=>Oo,TG:()=>qn,MG:()=>Io,PL:()=>oo,uK:()=>As,CG:()=>_n,p:()=>wa,nI:()=>m,Ae:()=>ja,Fs:()=>fo,n1:()=>La,AS:()=>ca,iv:()=>Pr,r5:()=>Tr,M$:()=>xe,Pc:()=>Pa,QB:()=>Te,K$:()=>$s,uW:()=>ta,Lt:()=>Ss,Jv:()=>It,TA:()=>Et,Jn:()=>St,Ll:()=>ot,L6:()=>lr,EX:()=>Ca,Ln:()=>Va,wk:()=>Eo,xP:()=>Cr,ko:()=>Ja,iF:()=>Ns,bc:()=>wr,B1:()=>po,RX:()=>io,Sx:()=>Ha,lR:()=>ka,JW:()=>Ma,ag:()=>jr,tp:()=>ua,Tc:()=>Wo,Hf:()=>Fr,zc:()=>xt,_A:()=>eo,T_:()=>da,td:()=>la,g0:()=>Ms,pd:()=>ga,th:()=>pa,VQ:()=>fa,DD:()=>Ps,tr:()=>ia,u:()=>ba,ul:()=>qs,Ag:()=>qo,gA:()=>Qt,NU:()=>Qe,rE:()=>Na,wB:()=>br,id:()=>gr,MC:()=>hr,SZ:()=>mr});class o{get(t){return"todo"}}function r(){return ot.stateConfig.support}function s(t){return Wr(t.context),ot.stateConfig.support=t}const a=function(){};let c=[];const u=[];let i=[],l=[],p=[],f=!1;const d=[],g={locks:0,removeLocks:0};function h(t,e){e.textContent=t}function m(){g.locks>0||(++g.locks,v(),--g.locks,b(),!f&&d.length&&(f=!0,requestAnimationFrame((()=>{for(++g.locks;d.length;){const t=d.shift();t[0](...t[1])}v(),b(),--g.locks,f=!1}))))}function b(){c=[],i=[],l=[];const t=p;p=[];for(const e of t)e[0](...e[1])}function v(){const t=u.length;!function(){for(const t of u)t[0](...t[1])}(),u.splice(0,t);for(const t of i)t[0](...t[1]);for(const t of l)t[0](...t[1]);for(const t of c)t[0](...t[1])}function y(t,e){u.push([x,[t,e]])}function x(t,e){const n=t.parentNode;t||console.debug("no element by",{_caller:e,element:t}),n||console.debug("no parentNode by",{_caller:e,element:t}),n.removeChild(t)}function w(t,e,n){t.parentNode.insertBefore(e,t)}function C(t,e){t.appendChild(e)}const V="object"==typeof document&&document.createElement("div");function J(t){return V.innerHTML=t,document.createTextNode(V.innerHTML)}function T(t,e,n=a,o){const r=J(e);w(t,r),n(r)}function k(t,e,n=a){V.innerHTML=e;const o=document.createTextNode(V.textContent);w(t,o),n(o)}function E(t,e,n){V.innerHTML=e;const o=document.createTextNode(V.textContent);C(t,o),n(o)}const I="";var S,A;!function(t){t.string="string",t.number="number",t.boolean="boolean",t[void 0]="undefined"}(S||(S={})),function(t){t.function="function",t.date="date",t.unknown="unknown",t.object="object"}(A||(A={}));const O={tag:"html",dom:"dom",templater:"templater",tagComponent:"tagComponent",tagArray:"tagArray",host:"host",subscribe:"subscribe",signal:"signal",renderOnce:"renderOnce",stateRender:"stateRender",version:Date.now()};function M(t){switch(t){case S.string:case S.number:case S.boolean:return!0}return!1}function j(t){if(!t)return!1;switch(t.tagJsType){case O.dom:case O.tag:case O.templater:return!0}return!1}function L(t){const e=t?.tagJsType;return e===O.tagComponent||e===O.stateRender}function P(t){return N(t)&&typeof t.subscribe===A.function}function D(t){return t&&H(t.then)}function H(t){return typeof t===A.function}function N(t){return typeof t===A.object&&null!==t}function U(t){return Array.isArray(t)}function $(t){const e=t.state;return e&&e.newest&&e.newest?e.newest:t.parentContext?$(t.parentContext):void 0}function W(t){let e=t;for(;e.ownerSupport&&!L(e.templater);)e=e.ownerSupport;const n=e.context.state;return n&&n.newest||e}function R(...t){return t}function B(t){const e=ot.stateConfig;return e.states[e.statesIndex]=t,++e.statesIndex,t(R)}function _(t){const e=ot.stateConfig,n=e.statesIndex,o=W(e.prevSupport).context.state.older.states[n];let r=[];o((function(...t){return r=t,o.lastValues=r,t}));return e.states[e.statesIndex]=t,++e.statesIndex,t((function(...t){return r}))}function F(t){Wr(t);const e=ot.stateConfig;e.handlers.handler=Z,e.handlers.statesHandler=B,e.rearray=[];const n=e.state=[],o=e.states=[];e.statesIndex=0;(t.state=t.state||{}).newer={state:n,states:o}}class z{}function G(t){const e=t.callback;if(!e)return t.defaultValue;const[n]=function(t){const[e]=t(z),[n]=t(e);return[e,n]}(e);return n}function K(){const t=ot.stateConfig,e=t.rearray[t.state.length];return t.state.push(e),e.defaultValue}function Z(t){const e=ot.stateConfig,n=Nr();if(!n||!n.state){const t="State requested but TaggedJs is not currently rendering a tag or host";throw console.error(t,{config:e,context:n,function:e.support?.templater.wrapper?.original}),new Error(t)}const o=n.state.newer;e.state=o.state;let r=t;if(typeof t===A.function&&(r=t()),typeof r===A.function){const t=r;r=function(...e){return t(...e)},r.original=t}const s={get:function(){return G(s)},defaultValue:r};return e.state.push(s),r}function q(t){const e=new Q;return e.subscribeWith=e=>{const n=[],o=[],r=(r,s)=>{n[s]=!0,o[s]=r;if(n.length===t.length){for(const t of n)if(!t)return;e(o,a)}},s=[...t],a=s.shift().subscribe((t=>r(t,0))),c=s.map(((t,e)=>t.subscribe((t=>r(t,e+1)))));return a.subscriptions=c,a},e}function X(t,e,n){const o=Q.globalSubCount$;Q.globalSubCount$.next(o.value+1);const r=function(){r.unsubscribe()};return r.callback=e,r.subscriptions=[],r.unsubscribe=function(){return function(t,e,n){!function(t,e){const n=t.findIndex((t=>t.callback===e));-1!==n&&t.splice(n,1)}(e,n);const o=Q.globalSubCount$;Q.globalSubCount$.next(o.value-1),t.unsubscribe=()=>t;const r=t.subscriptions;for(const t of r)t.unsubscribe();return t}(r,n,e)},r.add=t=>(r.subscriptions.push(t),r),r.next=t=>{e(t,r)},r}function Y(t,e,n){const o=[...e],r=o.shift(),s=t=>{if(o.length)return Y(t,o,n);n(t)};let a=s;const c=r(t,{setHandler:t=>a=t,next:s});a(c)}class Q{onSubscription;methods=[];isSubject=!0;subscribers=[];subscribeWith;value;constructor(t,e){this.onSubscription=e,arguments.length>0&&(this.value=t)}subscribe(t){const e=X(0,t,this.subscribers),n=this.subscribeWith;if(n){if(this.methods.length){const n=t;t=t=>{Y(t,this.methods,(t=>n(t,e)))}}return n(t)}return this.subscribers.push(e),this.onSubscription&&this.onSubscription(e),e}next(t){this.value=t,this.emit()}set=this.next.bind(this);emit(){const t=this.value,e=this.subscribers;for(const n of e)n.callback(t,n)}toPromise(){return new Promise((t=>{this.subscribe(((e,n)=>{n.unsubscribe(),t(e)}))}))}toCallback(t){const e=this.subscribe(((n,o)=>{const r=o?.unsubscribe;r?r():setTimeout((()=>{e.unsubscribe()}),0),t(n)}));return e}pipe(...t){const e=[];"value"in this&&e.push(this.value);const n=new Q(...e);return n.setMethods(t),n.subscribeWith=t=>this.subscribe(t),n.next=t=>this.next(t),n}setMethods(t){this.methods=t}static all(t){return q(t.map((t=>{if(P(t))return t;return new Q(t,(e=>(e.next(t),e)))})))}static globalSubCount$=new Q(0)}class tt extends Q{_value;constructor(...t){super(...t),this._value=t[0],et(this)}next(t){this._value=t,this.emit()}emit(){const t=this._value,e=this.subscribers;for(const n of e)n.callback(t,n)}}function et(t){Object.defineProperty(t,"value",{set(e){t._value=e,t.emit()},get:()=>t._value})}const nt=new Q(void 0,(function(t){r()||t.next()})),ot={stateConfig:{state:[],version:Date.now(),handlers:{handler:Z,statesHandler:B}},tagClosed$:nt};function rt(t,e,n){if(e.deleted)return;const o=t[e.valueIndex],r=e.tagJsVar;Wr(e),r.processUpdate(o,e,n,t),Rr(),e.value=o}function st(t,e){if(!t)return;const n=t.context.contexts;!function(t,e){const n=e.templater,o=e.templater.tag,r=n.values||o.values,s=t.templater.tag;s.values=r}(t,e),++g.locks,function(t,e){const n=t.templater.tag.values;for(const o of e)rt(n,o,t)}(t,n),--g.locks,m()}function at(t,e){return ct(t,e)}function ct(t,e){if(null===t||typeof t!==A.object)return t;if(e<0)return t;if(t instanceof Date)return new Date(t);if(t instanceof RegExp)return new RegExp(t);const n=U(t)?[]:Object.create(Object.getPrototypeOf(t));if(U(t))for(let o=0;o<t.length;o++)n[o]=ct(t[o],e-1);else for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=ct(t[o],e-1));return n}function ut(t,e,n){return it(t,e,n)}function it(t,e,n){return!(t!==e&&(o=t,r=e,!H(o)||!H(r)||o.toString()!==r.toString()))||(n<0||typeof t===A.object&&typeof e===A.object&&(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():U(t)&&U(e)?function(t,e,n){if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!it(t[o],e[o],n-1))return!1;return!0}(t,e,n-1):!U(t)&&!U(e)&&function(t,e,n){const o=Object.keys(t),r=Object.keys(e);if(0===o.length&&0===r.length)return!0;if(o.length!==r.length)return!1;for(const s of o){if(!r.includes(s)||!it(t[s],e[s],n-1))return!1}return!0}(t,e,n-1)));var o,r}function lt(t){return t.map(pt)}function pt(t,e){const n=t,o=t?.tagJsType;if(o)switch(o){case O.signal:case O.subscribe:case O.stateRender:return;case O.dom:case O.tag:case O.templater:return lt(n.values)}return U(t)?lt(n):at(t,e)}function ft(t,e){const n=t.length;for(let o=0;o<n;++o){const n=t[o],r=e[o];if(U(n)&&U(r)){if(n===r)continue;return 3}if(typeof n!==A.function||typeof r!==A.function)if(typeof n!==A.object){if(n!==r)return 3.3}else{if(!n&&!r)continue;if(typeof e===A.object){const t=Object.entries(n);for(const e of t){if(!dt(e,r))return 3.1}}}}return!1}function dt([t,e],n){const o=n[t];return typeof e===A.function&&typeof o===A.function||o===e}function gt(t,e,n){return t}function ht(t){return typeof t!==A.object||!t||t.tagJsType}function mt(t,e){const n=t.context.providers;if(n)for(const t of n)for(let n=t.children.length-1;n>=0;--n){t.children[n].context.global===e&&t.children.splice(n,1)}t.context.destroy$.next(),t.context.renderCount=0}function bt(t,e){for(const n of t){const t=n.lastArray;if(t){bt(t,e);continue}const o=n.value;if(o?.tagJsType===O.subscribe){o.destroy(n,e),n.deleted=!0;continue}const r=n.global;if(!r)continue;const s=n.state.newest,a=r.subscriptions;a&&a.forEach(yt),L(s.templater)&&mt(s,r);bt(n.contexts,s),r.deleted=!0}}function vt(t,e=[],n=[]){for(const o of t){const t=o.global;if(!t)continue;const r=o.state.newest;if(r){e.push(r);const o=t.subscriptions;o&&n.push(...o)}const s=o.contexts;s&&vt(s,e,n)}return{tags:e,subs:n}}function yt(t){t.unsubscribe()}function xt(t,e,n){const o=e.tagJsVar.tagJsType;return o&&["tag-conversion","element"].includes(o)?(e.tagJsVar.processUpdate(t,e,n,[]),e.value=t,0):t===e.value?0:(++e.updateCount,er(e,t,n))}function wt(t,e,n,o,r){const s=e.context;if(s.locked=3,n.target=n.target||o,Wr(n),n.inputsHandler){const t=e.propsConfig;n.inputsHandler(t)}n.tagJsVar.processInit(t,n,e,r,o),Rr(),n.value=t,delete s.locked}function Ct(t){switch(t){case void 0:case!1:case null:return I}return t}function Vt(t,e){if(t.startsWith("class."))return"class";if(t.startsWith("style."))return"style";const n=function(t){switch(t){case"autoselect":case"autoSelect":return"autoselect";case"autofocus":case"autoFocus":return"autofocus"}return!1}(t);return!1!==n?n:"value"===t&&"SELECT"===e&&"value"}function Jt(t,e,n){if(N(n))return Tt(t,e,n);i.push([Et,[t,e,n]])}function Tt(t,e,n){"object"!=typeof t[e]&&(t[e]={});for(const o in n){const r=n[o];i.push([Ot,[t,e,o,r]])}if(t[e].setProperty)for(const o in n){const r=n[o];i.push([At,[t,e,o,r]])}}function kt(t,e,n){t.setAttribute(e,"")}function Et(t,e,n){if(N(n))return Tt(t,e,n);St(t,e,n)}function It(t,e,n){t[e]=!!n}function St(t,e,n){t[e]=n,void 0!==n&&!1!==n&&null!==n?t.setAttribute(e,n):t.removeAttribute(e)}function At(t,e,n,o){t[e].setProperty(n,o)}function Ot(t,e,n,o){t[e][n]=o}function Mt(t,e,n,o){switch(o){case"autofocus":return void p.push([Ht,[n]]);case"autoselect":return void p.push([Dt,[n]]);case"style":{const o=t.split(".");return void i.push([jt,[n,o,e]])}case"class":return void function(t,e,n){const o=t.split(".");if(o.shift(),e){for(const t of o)i.push([Lt,[n,t]]);return}for(const t of o)i.push([Pt,[n,t]])}(t,e,n);case"value":return Et(n,t,e),void p.push([t=>{t.value=e},[n]])}throw new Error(`Invalid special attribute of ${o}. ${t}`)}function jt(t,e,n){const o=e[1];t.style[o]=n,t.style.setProperty(o,n)}function Lt(t,e){t.classList.add(e)}function Pt(t,e){t.classList.remove(e)}function Dt(t){t.select()}function Ht(t){t.focus()}function Nt(t,e,n,o,r,s,a){return n.target=o,n.howToSet=r,n.attrName=t,n.isSpecial=a,e?.tagJsType?function(t,e,n,o,r){e.processInitAttribute(t,e,r,e,n,o,Et),n.tagJsVar=e}(t,e,n,s,o):Ut(t,e,o,r,a,n)}function Ut(t,e,n,o,r,s){return"function"==typeof e?function(t,e,n,o,r){const s=t(),c={component:!1,tagJsType:"dynamic-attr",matchesInjection:t=>{const e=u.tagJsVar;if(e.matchesInjection)return e.matchesInjection(t,u)},hasValueChanged:(e,n,o)=>{const r=t();return u.tagJsVar.hasValueChanged(r,u,o)},processInit:a,processInitAttribute:a,destroy:(t,e)=>{u.tagJsVar.destroy(u,e)},processUpdate:(t,e,n,o)=>{++e.updateCount;const r=t();u.tagJsVar.processUpdate(r,u,n,o),u.value=r}},u={description:"sub-context",updateCount:0,isAttr:!0,target:o,parentContext:e,value:s,tagJsVar:Qt(s),valueIndex:-1,withinOwnerElement:!0,destroy$:new Q,render$:new Q},i={description:"override-context",updateCount:0,isAttr:!0,contexts:[u],target:o,parentContext:e,value:t,tagJsVar:c,valueIndex:-1,withinOwnerElement:!0,destroy$:new Q,render$:new Q};return u.tagJsVar.processInitAttribute(n,s,o,u.tagJsVar,u,{},r),i}(e,s,t,n,o):r?Mt(t,e,n,r):void o(n,t,e)}function $t(t,e,n,o,r,s){const a=e.tagJsVar,c=t;if(a.hasValueChanged(c,e,n)>0){a.destroy(e,n),o.removeAttribute(r);const c=Qt(t);return c.isAttr=!0,c.processInitAttribute(r,t,o,c,e,n,s),void(e.tagJsVar=c)}}function Wt(t,e,n,o,r,s,a){o.destroy=Rt,o.hasValueChanged=Gt,o.processUpdate=(e,o,r)=>$t(e,o,r,n,t,a);const c=Vt(t,n.tagName);Ut(t,e,n,a,c,r),r.tagJsVar=o}function Rt(t){const e=t.target,n=t.attrName;e.removeAttribute(n)}function Bt(t){return{component:!1,tagJsType:"simple",value:t,processInitAttribute:Wt,processInit:Ft,destroy:zt,hasValueChanged:Kt,processUpdate:_t}}function _t(t,e,n){return t===e.value?0:er(e,t,n)}function Ft(t,e,n,o,r){const s=Ct(t);o=e.placeholder;const a=e.paint=[T,[o,s,function(t){e.simpleValueElm=t,delete e.paint},"processSimpleValueInit"]];c.push(a)}function zt(t){if(!t.simpleValueElm&&t.paint)return void(t.paint[0]=a);const e=t.simpleValueElm;delete t.simpleValueElm,y(e,"deleteSimpleValue")}function Gt(t,e){return null==t||t===e.value?0:6}function Kt(t,e){return null!=t&&[A.object,A.function].includes(typeof t)?(zt(e),6):(function(t,e){const n=Ct(t);if(e.paint)return void(e.paint[1][1]=n);const o=e.simpleValueElm;i.push([h,[n,o]])}(t,e),0)}function Zt(t,e){return U(t)?0:(ce(e),9)}function qt(t){return{component:!1,tagJsType:"array",value:t,processInitAttribute:a,processInit:Yt,processUpdate:Xt,hasValueChanged:Zt,destroy:ce}}function Xt(t,e,n){if(++e.updateCount,Array.isArray(t))return void ne(e,t,n);0===xt(t,e,n)&&ne(e,t,n)}function Yt(t,e,n,o,r){ne(e,t,n,r)}function Qt(t){const e=t?.tagJsType;return e?t:function(t){if(U(t))return qt(t);return Bt(t)}(t)}function te(t,e,n,o,r){return{description:"getNewContext",updateCount:0,value:t,destroy$:new Q,render$:new Q,tagJsVar:r||Qt(t),withinOwnerElement:n,parentContext:o,valueIndex:o.varCounter}}function ee(t,e,n,o,r){const s=document.createTextNode(I),a=te(t,0,!0,e.context);return a.withinOwnerElement=!1,a.placeholder=s,r||(a.placeholder=o),wt(t,e,a,r,o),r&&l.push([C,[r,s]]),a}function ne(t,e,n,o){const r=void 0===t.lastArray;r&&(t.lastArray=[]);const s=t.lastArray;let a=t.placeholder;const c=e.length;let u=!r&&c!==s.length;if(!r){const n=function(t,e,n,o){const r=[];let s=0;for(let n=0;n<t.length;++n){const a=t[n];if(1===a.locked&&(o=!0),null===a.value){r.push(a);continue}const c=se(e,n,t,s);0!==c?2!==c?s+=c:n-=1:r.push(a)}return n.lastArray=r,{removed:s,batchUpdates:o}}(s,e,t,u);u=n.batchUpdates}for(let r=0;r<c;++r){a=oe(e,r,t.lastArray,n,u,a,o).placeholder}}function oe(t,e,n,o,r,s,a){const c=re(t[e]),u=n[e];if(u)return function(t,e,n,o,r,s,a,c){if(s)return d.push([()=>{xt(t,e,o)},[]]),e.value=t,e;const u=n.length>r;if(u)return Array.isArray(t)?(e.tagJsVar.processUpdate(t,e,o,[]),e.value=t,e):(xt(t,e,o),e);const i=ee(t,o,0,a,c);return n.push(i),i}(c,u,n,o,e,r,s,a);const i=ee(c,o,0,s,a);return n.push(i),c&&(i.arrayValue=c?.arrayValue||i.arrayValue||e),i}function re(t){if("function"==typeof t&&void 0===t.tagJsType){t=t()}return t}function se(t,e,n,o){const r=t.length-1,s=e-o,a=s<0||r<s,c=n[e];if(a)return ae(c),1;void 0===c.arrayValue&&(c.arrayValue=e);const u=function(t,e,n,o,r){const s=e.arrayValue||r,a=t!==s;if(a)return ae(n),o.splice(r,1),2;return 0}(c.arrayValue,re(t[e]),c,n,e);return u}function ae(t){!function(t,e){if(t&&e.state?.oldest){return void fe(e.state.oldest,t)}e.tagJsVar.destroy(e,{})}(t.global,t)}function ce(t){++t.updateCount;ue(t,t.lastArray)}function ue(t,e){for(let t=0;t<e.length;++t)ae(e[t]);delete t.lastArray}function ie(t){for(let e=t.length-1;e>=0;--e){le(t[e]),t.splice(e,1)}}function le(t){const e=t.marker;e&&y(e,"destroyMarker");y(t.domElement,"destroyClone")}function pe(t,e){t.contexts&&function(t,e){for(const n of t){if(n.withinOwnerElement){const t=n.tagJsVar;if(t&&"host"===t.tagJsType){const o=n.supportOwner,r=t.destroy(n,o);D(r)&&e.push(r)}continue}const t=n.lastArray;if(t){ue(n,t);continue}const o=n.simpleValueElm;if(o){delete n.simpleValueElm,y(o,"smartRemoveByContext");continue}const r=n.global;if(void 0===r)continue;r.deleted=!0;const s=n.state?.oldest;s&&pe(n,e)}}(t.contexts,e),t.htmlDomMeta&&ie(t.htmlDomMeta)}function fe(t,e){const n=t.context;e.deleted=!0,n.renderCount=0;const o=[];return bt(n.contexts,t),t.templater.wrapper&&mt(t,e),pe(n,o),delete n.state,delete n.contexts,delete n.returnValue,delete n.providers,o}function de(t,e,n,o,r,s){return null==t||s>r?e:typeof t===A.function?e.mem?(t.mem=e.mem,e):(t.mem=e,t):ht(e)?e:U(e)?function(t,e,n,o,r,s){for(let a=t.length-1;a>=0;--a){const c=t[a],u=e[a];t[a]=de(u,c,n,o,s,r+1)}return t}(e,t,n,o,s,r):function(t,e,n,o,r,s){const a=Object.keys(t);for(const c of a){const a=t[c],u=de(e[c],a,n,o,s,r+1);if(a===u)continue;const i=Object.getOwnPropertyDescriptor(t,c)?.set;i||(t[c]=u)}return t}(e,t,n,o,s,r)}function ge(t){const e=t.context,o=e.global,r=e.contexts;if(r){const{subs:t,tags:e}=vt(r);for(const t of e){if(!0===t.context.global.deleted)return;he(t.context)}o.subscriptions&&t.forEach(yt)}he(e),n(e)}function he(t){t.global.deleted=!0,pe(t,[]),delete t.contexts}function me(t,e,n,o){const r=e.original,a=t.tagJsType===O.stateRender,c=ot.stateConfig;let u;if(s(n),a?u=t():(u=r(...o),typeof u===A.function&&void 0===u.tagJsType&&(u=u())),!u)throw new Error("A tag cannot return a value of type "+(null===u?"null":typeof u));const i=n.context;return i.returnValue=u,n.returnValue=u,t.tag=u,i.state.newer={...c},Rr(),n}function be(t){!function(t){const e=ot.stateConfig,n=t||e.context;n.state=n.state||{},n.state.newer={...e};const o=e.support;n.state.newest=o}(t),function(){const t=ot.stateConfig;delete t.prevSupport,delete t.support,delete t.state,delete t.states,Rr()}()}function ve(t,e,n,o){let r;const s=t.templater;if(s.tagJsType===O.stateRender){const e=s;r=Yo(s,n,o,t.appSupport),me(s,e,r)}else{r=(0,s.wrapper)(t,n,e)}return function(t,e){++t.context.renderCount,be(t.context),ot.tagClosed$.next(e)}(r,o),r.ownerSupport=t.ownerSupport,r}function ye(t){const e=ot.stateConfig;return e.rearray=t,e.state=[],e.states=[],e.statesIndex=0,e.handlers.handler=K,e.handlers.statesHandler=_,e}function xe(t,e,n,o){return function(t,e,n){ye(n),ot.stateConfig.prevSupport=e,s(t)}(t,e,n.state.older.state),ve(t,e,n,o)}function we(t,e,n,o){F(t.context),s(t);const r=ve(t,e,n,o);return Rr(),r}function Ce(t){const e=t?.context,n=e?.state;return n?.older?.state}function Ve(t,e){const n=Je(t,e);return!(n||!e.templater.tag?._innerHTML||!Je(t.outerHTML,e))||n}function Je(t,e){const n=t.templater,o=e.templater,r=n?.tag||t,s=o.tag;if(n?.tagJsType===O.stateRender)return n.dom===o.dom;if(!s&&!r.returnValue)return!0;if(!r.returnValue)return!1;throw new Error(`unknown tagJsType of ${r.tagJsType}`)}function Te(t,e,n){let o;o=Ce(e)?xe(t,e,n):we(t,e,n);const r=!e||Ve(e,o);if(r){if(e){const t=e.templater.tag;if(t&&n.renderCount>0){const n=e?.templater,o=n?.tag;!function(t,e,n){if(t.tagJsType===O.dom){const o=n?.dom;return void(o!==t.dom&&ge(e))}if(n){const o=n.strings;if(o){const n=o?.length;n!==t.strings.length&&ge(e)}}}(t,e,o)}}}else{!function(t,e){const n=t.context,o=n.global;let r=-1;const s=n.providers=n.providers||[],a=s.length-1;for(;r++<a;){const t=s[r];let n=-1;const a=t.children.length-1;for(;n++<a;)if(o===t.children[n].context.global)return t.children.splice(n,1),void t.children.push(e)}}(e,o),ge(e);const t=o.context;t.state.oldest=o,t.state.newest=o}return o.ownerSupport=t.ownerSupport,{support:o,wasLikeTags:r}}function ke(t){++t.updateCount;const e=t.global,n=t.state.newest;delete t.inputsHandler,delete t.updatesHandler,fe(n,e),function(t){t.htmlDomMeta=[],delete t.contexts,delete t.state,delete t.global,t.renderCount=0}(t)}function Ee(t,e){const n=e.state?.newest;if(j(t)){return Ve(t,n)?0:7}const o=t?.tagJsType;if(o){const n=e.value;if(!n&&t)return 88;const o=n.wrapper,r=t.wrapper;return r?.original===o?.original?0:88}return 8}function Ie(t,e){const o=e.global,r=e.state?.newest;if(j(t)){return Ve(t,r)?(Qo(e,t,r),0):(fe(r,o),n(e),7)}const s=t?.tagJsType;if(s){return!0===Qo(e,t,e.state.newest.ownerSupport)?0:88}return ke(e),8}function Se(t,e,n,o,r,s,a){const u=document.createTextNode(I),i=function(t,e,n,o){const r=te(t,0,n,o);return e.push(r),++o.varCounter,r}(t,e,r>0,o);return i.placeholder=u,i.target=s,s?l.push([C,[s,u]]):c.push([w,[a,u,"attachDynamicDom.attachDynamicDom"]]),wt(t,n,i,s,a),i}function Ae(t,e){const n=function(t,e,n=[]){const o=t.context;n.push({support:t,renderCount:o.renderCount,provider:e});const r=e.children;for(let t=r.length-1;t>=0;--t){const o=r[t],s=o.context;n.push({support:o,renderCount:s.renderCount,provider:e})}return n}(t,e);return n}function Oe(t){return t.support}function Me(t,e){const n=e.context.global;if(n&&n.deleted)return!1;const o=function(t,e){const n=t.props,o=e.propsConfig,r=o.latest;if(je(n,r))return!0;switch(t.propWatch){case $o.IMMUTABLE:return _o(n,r);case $o.SHALLOW:return ft(n,r)}return!ut(n,r,zo)}(t,e);return!!o}function je(t,e){return t.length!==e.length}function Le(t,e=[]){const n=t.context,o=function(t){return O.templater===t.tagJsType}(t.templater),r=t.ownerSupport;if(n.locked)return e.push(t),e;if(o)return Le(r,e);const s=t.context.global;if(s&&!0===s.deleted)return e;const a=t,c=L(a.templater),u=t.templater.tagJsType,i=r&&u!==O.stateRender&&(!c||Me(a.templater,a));if(a.context.providers){const t=function(t){const e=t.context.providers;if(!e)return[];const n=[];for(const t of e){const e=Ae(t.owner,t);n.push(...e.map(Oe))}return n}(a);e.push(...t)}return i?(Le(r,e),c&&e.push(a),e):(e.push(a),e)}function Pe(t){++g.locks,t.forEach(De),--g.locks,m()}function De(t){const e=t.context;e.tagJsVar.processUpdate(e.value,e,t.ownerSupport,[])}function He(t,e,{resolvePromise:n,resolveValue:o}){return D(t)?t.then(function(t,e){return n=>{const o=t.context,r=o.global;if(!0===o.deleted||!0===r?.deleted)return e(n);return Pe(Le(t)),e(n)}}(e,n)):o(t)}function Ne(t,e){const n=e.context.global,o=function(t,e){if(!0!==n.deleted)return function(t,e,n,o){const r=W(e),s=r.context;s.locked=1;const a=t.apply(n,o);delete s.locked;return Ue(a,r)}(o.tagFunction,o.support,t,e)};return o.tagFunction=t,o.support=e,o}function Ue(t,e){const n=e.context.global;if(n?.deleted)return;return Pe(Le(e)),He(t,e,{resolvePromise:Re,resolveValue:Be})}const $e="no-data-ever",We="promise-no-data-ever";function Re(){return We}function Be(){return $e}function _e(t,e,n){const o=n[e];if(o){let e=!1;if(t.originalStopPropagation=t.stopPropagation,t.stopPropagation=function(){e=!0,t.originalStopPropagation.call(t),t.stopPropagation=t.originalStopPropagation,delete t.originalStopPropagation},o(t),t.defaultPrevented||e)return}const r=n.parentNode;r&&_e(t,e,r)}function Fe(t,e,n,o){const r=t.appElement,s=function(t){"blur"===t&&(t="focusout");return"_"+t}(e);"blur"===e&&(e="focusout");const a=t.context.events;if(!a[e]){const t=function(t){_e(t,s,t.target)};a[e]=t,r.addEventListener(e,t)}n[s]=o,n[e]=o}function ze(t,e,n,o){const r=function(...e){return r.tagFunction(t,e)};r.tagFunction=e,r.support=n,Fe(n.appSupport,o,t,r)}function Ge(t){return null==t||!1===t}function Ke(t,e,n,o,r,s,a,c,u){const i=te(t,0,!0,n);return i.description="tagJsVar-attr",i.target=c,i.valueIndex=r,i.isAttr=!0,i.isNameOnly=u,i.stateOwner=W(s),i.supportOwner=s,Wr(i),o.processInitAttribute(a,t,c,o,i,s,Et),Rr(),i.oldTagJsVar=i.tagJsVar,i.tagJsVar=o,i}function Ze(t,e,n,o,r,s,a,c){if(Ge(e))return;const u=typeof e;if(u===A.object){for(const r in e)qe(r,n,e,t,o,s,a,s);return s}if("function"===u){const r=function(t){const e={tagJsType:"relay",component:!1,hasValueChanged:(t,e,n)=>e.subContext.tagJsVar.hasValueChanged(t,e.subContext,n),processInitAttribute:(t,e,n,o,r,s,a)=>r.subContext.tagJsVar.processInitAttribute(t,e,n,o,r.subContext,s,a),destroy:(t,e)=>t.subContext.tagJsVar.destroy(t.subContext,e),processUpdate:(t,e,n,o)=>{const r=t(e.subContext);return e.subContext.tagJsVar.processUpdate(r,e.subContext,n,o)},processInit:(t,e,n,o,r)=>e.subContext.tagJsVar.processInit(t,e.subContext,n,o,r),matchesInjection:e=>t.subContext.tagJsVar.matchesInjection(e,t.subContext)};return e}(c);c.tagJsVar=r,Wr(c);const u=Qt(e(c));if(Rr(),u?.tagJsType){c.state={newer:{state:[],states:[]}};const t=Ke(u,0,a,u,-1,o,"attr",n,!0);return t.tagJsVar=u,c.subContext=t,s}return qe("attr",n,e,t||[],o,s,a,s),s}0!==e.length&&r(n,e,I)}function qe(t,e,n,o,r,s,a,c){const u=Vt(t,e.tagName),i=sn(t,n[t],o,e,r,Et,s,a,u);void 0!==i&&(Array.isArray(i)?c.push(...i):c.push(i))}function Xe(t,e){t.removeAttribute(e)}function Ye(t,e,n,o){const r=e,s=t;if(s?.tagJsType){const o=e.value;return o?.tagJsType?void o.hasValueChanged(s,e,n):(s.isAttr=!0,Wr(e),s.processInitAttribute(r.attrName,t,r.target,s,r,n,Et),Rr(),void(r.tagJsVar=s))}if(r.isNameOnly)return function(t,e,n,o,r,s,a,c,u){if(n){if(Ge(e)||""===e)return void o.removeAttribute(n);if(typeof n===A.object)if(typeof e===A.object)for(const t in n)t in e||i.push([Xe,[o,t]]);else for(const t in n)i.push([Xe,[o,t]])}const l=Ze(t,e,o,r,s,a,c,u);l&&a.push(...l)}(o,t,r.value,r.target,n,r.howToSet,[],r.parentContext,r),void(r.value=t);const a=r.target;!function(t,e,n,o,r,s,a){if(H(t))return function(t,e,n,o,r,s,a){const c=t.templater.wrapper;if((c?.tagJsType||c?.original?.tagJsType)!==O.renderOnce)return cn(e,t,o,n);return an(e,n,o,r,s,t)}(r,t,o,e,a,s);an(t,o,e,a,s,r)}(t,r.attrName,0,a,n,r.howToSet,r.isSpecial),e.value=t}const Qe=":tagvar",tn=":",en=new RegExp(Qe+"(\\d+)"+tn,"g");function nn(t){return t.search&&t.startsWith(Qe)?t.search(en):-1}function on(t,e,n,o,r,s,a){const c=o.length,u=[];function i(o){const s=function(t,e,n){return t.reduce(((t,o)=>{if(nn(o)>=0){const o=n++,r=e[o];return t.push(r),t}return t.push(o),t}),[])}(e,o,c).join("");r(n,t,s)}return e.forEach((e=>{if(nn(e)>=0){const r=o.length,c=Qt(e),l={description:"attribute-array-item",updateCount:0,isAttr:!0,target:n,attrName:t,withinOwnerElement:!0,tagJsVar:c,valueIndex:a.varCounter,parentContext:a,destroy$:new Q,render$:new Q};c.processUpdate=function(t,e,n,o){++e.updateCount,i(o)};const p=s[r];l.value=p,u.push(l),++a.varCounter}})),i(s),u}function rn(t){return N(t)&&"TagJsTag"in t?t.tagJsVar:-1}function sn(t,e,n,o,r,s,a,c,u){const i=rn(t);let l=i>=0||void 0===e&&"string"!=typeof t,p=n[i];e?.tagJsType?p=e:(t?.tagJsType||"function"==typeof t)&&(l=!0,p=t,e=t);const f=p;if(f?.tagJsType)return Ke(e,0,c,f,i,r,t,o,l);if(l){-1===i&&l&&(p=t);const e=te(p,0,!0,c);return e.description="processAttribute",e.valueIndex=i,e.isAttr=!0,e.target=o,e.isNameOnly=!0,e.howToSet=s,Ze(n,p,o,r,s,a,c,e),e}if(Array.isArray(e))return on(t,e,o,[],s,n,r.context);const d=rn(e);if(d>=0){return function(t,e,n,o,r,s,a,c,u){if(typeof e===A.function)return++r.varCounter,cn(e,a,t,n);const i=Qt(e),l={description:"dynamic-attribute",updateCount:0,isAttr:!0,target:n,attrName:t,howToSet:s,value:e,withinOwnerElement:!0,tagJsVar:i,destroy$:new Q,render$:new Q,valueIndex:u,parentContext:r};return o.push(l),i.processUpdate=Ye,Nt(t,e,l,n,s,a,c),l.value=e,l}(t,n[d],o,[],c,s,r,u,d)}return Ut(t,e,o,s,u,c)}function an(t,e,n,o,r,s){if(!1===o){switch(t){case void 0:case!1:case null:return void i.push([un,[e,n]])}if(H(t))return ze(e,t,s,n);r(e,n,t)}else Mt(n,t,e,o)}function cn(t,e,n,o){return ze(o,t=Ne(t,e),e,n)}function un(t,e){t.removeAttribute(e)}function ln(t,e,n,o,r){for(const s of t){const t=s[0],a=s[1],c=s[2]||!1;let u=s.length>1?Et:kt;s[3]&&(u=s[3]);const i=r.contexts,l=sn(t,a,e,n,o,u,i,r,c)||void 0;"object"==typeof l&&(i.push(l),++r.varCounter)}}function pn(t,e,n,o,r,s,a){e.at&&ln(e.at,n,t,o,r),s?l.push([C,[s,t,"appendToAttachDomElement"]]):c.push([w,[a,t,"insertBeforeAttachDomElement"]])}function fn(t,e,n,o,r,s,a){const c=n.context,u=c.contexts;o=c;const i=[];s&&void 0===a&&(a=document.createTextNode(I),l.push([C,[s,a]]),s=void 0);for(let c=0;c<t.length;++c){const l=t[c],p=l.v;if(!isNaN(p)){const t=Number(p),c=e[t];if(H(c)&&void 0===c.tagJsType){++o.varCounter;continue}Se(c,u,n,o,r,s,a).valueIndex=t;continue}const f={};if(i.push(f),"text"===l.nn){dn(f,l,s,a);continue}const d=f.domElement=document.createElement(l.nn),g={updateCount:0,isAttrs:!0,target:d,parentContext:o,contexts:[],destroy$:new Q,render$:new Q,tagJsVar:{tagJsType:"new-parent-context"},valueIndex:-1,withinOwnerElement:!0,varCounter:0};pn(d,l,e,n,g,s,a),g.target=d,l.ch&&(f.ch=fn(l.ch,e,n,g,r+1,d,a).dom)}return{dom:i,contexts:u}}function dn(t,e,n,o){const r=t,s=r.tc=e.tc;n?l.push([E,[n,s,function(t){r.domElement=t}]]):c.push([k,[o,s,function(t){r.domElement=t}]])}const gn=/(:tagvar\d+:)/,hn="ondoubleclick",mn=/([:_a-zA-Z0-9\-.]+)\s*(?:=\s*"([^"]*)"|=\s*(\S+))?/g,bn=/<\/?([a-zA-Z0-9-]+)((?:\s+[a-zA-Z_:*][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)+\s*|\s*)\/?>/g;function vn(t){const e=[],n=[],o=[];let r=null,s=-1,a=0;const c=new RegExp(bn,"g");for(t=function(t){return t.replace(yn,(function(t){return t.replace(/\[l t\]/g,"[l t]").replace(/\[g t\]/g,"[g t]").replace(/</g,"[l t]").replace(/>/g,"[g t]")}))}(t);a<t.length;){const u=c.exec(t);if(!u)break;const[i,l,p]=u,f=i.startsWith("</"),d=i.endsWith("/>");if(a<u.index){const e=t.slice(a,u.index);if(e.trim()){const t=Cn(e);for(let e of t)e.startsWith(Qe)&&e.search(gn)>=0&&-1===e.search(In)&&(e=Qe+ ++s+tn),xn(r,n,e)}}if(a=u.index+i.length,f){r=o.pop()||null;continue}const g=[];let h;for(;null!==(h=mn.exec(p));)s=Jn(h,s,e,g);const m={nn:l};g.length&&(m.at=g),r?(r.ch||(r.ch=[]),r.ch.push(m)):n.push(m),d||(o.push(r),r=m)}if(a<t.length){const e=t.slice(a);if(e.trim()){const t=Cn(e);for(const e of t)e.startsWith(Qe)&&++s,xn(r,n,e)}}return n}const yn=new RegExp("(\x3c!--[\\s\\S]*?--\x3e)","g");function xn(t,e,n){!function(t,e,n){t?(t.ch||(t.ch=[]),t.ch.push(n)):e.push(n)}(t,e,{nn:"text",tc:wn(n)})}function wn(t){return t.replace(/(\[l t\]!--[\s\S]*?--\[g t\])/g,(function(t){return t.replace(/\[l t\]/g,"<").replace(/\[g t\]/g,">").replace(/\[l t\]/g,"[l t]").replace(/\[g t\]/g,"[g t]")}))}function Cn(t){return t.split(gn).filter(Vn)}function Vn(t){return""!==t}function Jn(t,e,n,o){const r=t[1]||t[3]||t[5];let s=t[2]||t[4]||t[6];if(void 0===r)return e;const a=""!==t[2],c=void 0===s&&a,u=r.toLowerCase(),i=u.startsWith("on")?function(t){if(t.startsWith("on"))return t.length===hn.length&&t===hn?"dblclick":t.slice(2,t.length);return t}(u):u;if(c){if(r.slice(0,Qe.length)===Qe){const t=Qe+ ++e+tn;return n.push(["at",t]),o.push([t]),e}if(t[0].startsWith(r)&&t[0].slice(r.length,t[0].length).search(/\s+$/)>=0)return o.push([i]),e;const a=t[3];if(a.search(In)>=0){s=a;const t=[i,s];return o.push(t),e}s=Qe+ ++e+tn}a||(s=t[2]);const l=s.split(kn).filter((t=>t.length>0));l.length>1&&(s=l,l.forEach((t=>{t.search(en)>=0&&++e})));const p=[i,s];console.debug("EVER GET HERE??????");const f=Vt(u,"DIV");return f&&p.push(f),"style"===i?(o.unshift(p),e):(o.push(p),e)}const Tn=new RegExp(Qe+"(\\d+)"+tn,"gi"),kn=new RegExp("("+Qe+"\\d+"+tn+")","gi"),En=Qe.slice(0,Qe.length-1),In=new RegExp(En+"r(\\d+)"+tn,"gi"),Sn=En+"r$1"+tn;function An(t,e){const n=function(t,e){const n=t;return function(t,e){const n=[];for(let o=0;o<t.length;++o){const r=t[o].replace(Tn,Sn);o<e.length?n.push(r+Qe+o+tn):n.push(r)}return function(t,e,n){const o=n.length-e.length;if(o>0)for(let n=o;n>0;--n)t.push(Qe+(e.length+n-1)+tn)}(n,t,e),n}(n,e)}(t,e).join("");return vn(n)}const On="ch";function Mn(t,e,n=[],o=[]){const r=t;for(let t=0;t<r.length;t++){const s=[...o,t],a=r[t];if(a.at){const t=a.at;a.at=Ln(t,e)}if(a.ch){const t=a.ch,o=[...s,On];a.ch=Mn(t,e,n,o)}t=jn(a,e,r,t)}return r}function jn(t,e,n,o){if("text"!==t.nn)return o;const r=t;let s,a=r.tc;if(typeof a!==S.string)return o;for(;null!==(s=en.exec(a));){const t=s[1],r=parseInt(t,10);if(!isNaN(r)&&r<e){const t=Qe+r+tn,e=a.slice(s.index+t.length);n.splice(o,1,{nn:"text",v:r}),a=e,en.lastIndex=0}}return r.tc=a,o}function Ln(t,e){const n=[];for(const o of t){const[t,r,s]=o;if(t.startsWith(Qe)){const o=parseInt(t.replace(Qe,""),10);if(!isNaN(o)&&o<e){n.push([{tagJsVar:o}]);continue}}if(typeof r===S.string&&r.startsWith(Qe)){const o=parseInt(r.replace(Qe,""),10);if(!isNaN(o)&&o<e){n.push([t,{tagJsVar:o},s]);continue}}n.push(o)}return n}function Pn(t){return t.length}const Dn={};function Hn(t,e){const n=function(t){const e=t.map(Pn);return e.push(t.length),Number(e.join(""))}(t),o=Dn[n],r=o&&function(t,e,n){if(n&&n.strings.length===t.length&&n.strings.every(((e,n)=>e===t[n]))&&n.values.length===e.length)return!0;return!1}(t,e,o);if(r)return o.domMetaMap;const s=Mn(An(t,e),e.length),a={interpolation:void 0,string:void 0,strings:t,values:e,domMetaMap:s};return Dn[n]=a,s}function Nn(t,e,n){const o=t.context;o.state=o.state||{};const r=o.state;r.oldest=t,r.newest=t,o.state.older=o.state.newer,++g.locks;const s=function(t,e,n,o){const r=function(t){const e=t.templater,n=e.tag;if(n.tagJsType===O.dom)return n.dom;const o=n.strings;return Hn(o,n.values)}(t),s=t.templater.tag,a=s.values,c=[],u=t.context;e=u,u.contexts=c;const i=fn(r,a,t,e,0,n,o);return i}(t,t.context,e,n);return o.htmlDomMeta=s.dom,--g.locks,s}function Un(t,e,n,o,r){const s=Rn(t,n,e);s.ownerSupport=n;const a=Nn(s,o,o?void 0:r);for(const t of a.dom)t.marker&&(o?l.push([C,[o,t.marker]]):c.push([w,[r,t.marker,"subMarker"]])),t.domElement&&(o?l.push([C,[o,t.domElement,"subAppendTo"]]):c.push([w,[r,t.domElement,"subInsertBefore"]]));return s}function $n(t,e,n,o,r){return e.state={},r?Un(t,e,n,r,o):Wn(n,e)}function Wn(t,e){const n=e.state.newest,o=e.placeholder;return n.ownerSupport=t,e.value.tag?(Nn(n,void 0,o),n):n}function Rn(t,e,n){const o=Xo(t,e,e.appSupport,n);return n.contexts=n.contexts||[],o}function Bn(t){return function(t,e,n){const o=Te(e,t,n);if(o.wasLikeTags)return st(n.state.oldest,o.support),o.support;return Wn(e,n)}(t,t,t.context)}function _n(t){if(!t)return a;const e=Nr();if(!e)throw new Error("output must be used in render sync with a parent context");const n=$(e);if(!n)throw new Error("output must be used in render sync fashion");if(!0===t.wrapped)return t;const o=(...e)=>{const o=n.ownerSupport;return Fn(e,t,o.context)};return o.wrapped=!0,o}function Fn(t,e,n){const o=void 0;Wr(n);const r=e(...t);return Rr(),p.push([()=>{const t=n.global;if(void 0===t||!0===t.deleted){++g.locks;const t=n;return t.tagJsVar.processUpdate(t.value,t,o,[]),--g.locks,void m()}++g.locks,Bn(o),--g.locks,m()},[]]),r}function zn(t,e){++t.updateCount;const n=Gn(t.subContext,e);return delete t.subContext,n}function Gn(t,e){t.deleted=!0;const n=t.appendMarker;if(n&&(y(n,"deleteSubContext"),delete t.appendMarker),!t.hasEmitted)return;const o=t.contextItem;return o.tagJsVar.destroy(o,e),76}function Kn(t,e,n,o){const r=e.tagJsType;if(!e||!r||r!==t){return o.tagJsVar.destroy(o,n),tr(e,o,n,99),99}}function Zn(t,e,n){const o=e.subContext,r=Kn(O.subscribe,t,n,e);return r||(o&&o.hasEmitted?(o.tagJsVar=t,o.valuesHandler(o.lastValues,0),0):0)}function qn(t,e,n,o){return e.hasEmitted=!0,e.contextItem=ee(t,n,0,o)}function Xn(t,e,n){++e.updateCount;const o=t.owner._innerHTML;o.processInit=o.oldProcessInit;const r=e.subContext?.contextItem;er(r,o,n)}function Yn(t,e,n,o,r){e.subContext={},t.processUpdate=Xn,function(t,e,n,o,r){const{appendMarker:s,insertBefore:a}=nr(r,o),c=n.subContext;c.appendMarker=s;const u=t.owner,i=u._innerHTML;i.processInit=i.oldProcessInit,qn(i,c,e,a)}(t,n,e,o,r)}function Qn(){return{component:!1,tagJsType:"innerHTML",hasValueChanged:()=>0,processInitAttribute:a,processInit:Yn,processUpdate:Xn,destroy:zn}}function to(t,e){const n={component:!1,tagJsType:O.templater,processInit:$n,processInitAttribute:a,processUpdate:xt,hasValueChanged:Ie,destroy:ke,propWatch:t,props:e,key:function(t){return n.arrayValue=t,n},matchesInjection:(t,e)=>n.wrapper===t||n.wrapper?.original===t?.original?e:void 0};return n}const eo=[];function no(t,e,n){const o=t.propWatch===$o.DEEP?zo:Fo,r=t.props,s=e.propsConfig;let a=s.castProps;const c=n?.propsConfig,u=c?.castProps;u&&(s.castProps=u,a=function(t,e,n,o,r,s=-1){const a=e.context;if(!a.global||!a.state.newest){const e=gt(o);return o.push(...e),t.propsConfig.castProps=e,o}const c=(e=a.state.newest||e).propsConfig.castProps,u=[];for(let e=0;e<o.length;++e){const a=o[e],i=de(c[e],a,t,n,r,s+1);u.push(i)}return t.propsConfig.castProps=u,u}(e,n,n.ownerSupport,r,o));return a||gt(r)}function oo(t,e,n){const o=to($o.DEEP);o.tagJsType=t.tagJsType;const r=Rn(o,n,e);function s(){return o.tag=t(),r}return o.wrapper=s,s.tagJsType=t.tagJsType,s.original=t.original||t,r}function ro(t,e,o,r,s){n(e);const a=oo(t,e,o);return we(a,void 0,e),Un(a.templater,e,o,s,r)}function so(t,e,n,o,r){const s=rr(t,e,n,o,r);return s.hasEmitted||ao(t,s),s}function ao(t,e){const n=t.Observables[0];if(!e.hasEmitted)return"withDefault"in t?void e.subValueHandler(t.withDefault,0):"value"in n?void e.subValueHandler(n.value,0):void 0;const o=e.lastValues[0].value;e.subValueHandler(o,0)}function co(t,e,n,o,r,s){e.destroy=ar;const a=Vt(t,n.tagName),c=function(e,o){Ut(t,e,n,Et,a,r),ur(o)},u=sr(e.Observables,s,c,e,r);return r.subContext=u,r.value=e,r.tagJsVar=e,e.processUpdate=function(e,o,s){return $t(e,r,s,n,t,Et)},{subContext:u,onOutput:c}}function uo(t,e,n,o,r,s){const{subContext:a}=co(t,e,n,0,r,s);a.hasEmitted||function(t,e){const n=e.tagJsVar,o=n.onOutput,r=t.Observables;let s=r[0]?.value||t.withDefault;t.callback&&(s=t.callback(s));o(s,!0,e)}(e,a)}function io(t,e,n){return{component:!1,onOutput:a,tagJsType:O.subscribe,processInitAttribute:uo,processInit:so,hasValueChanged:lo,processUpdate:a,destroy:cr,callback:n,withDefault:e,Observables:[t]}}function lo(t,e){if(!t?.tagJsType)return 1;const n=t.Observables;if(!n)return 2;const o=e.value.Observables;if(!o||o.length!==n.length)return 3;return n.every(((t,e)=>t===o[e]))?0:4}function po(t,e){return{component:!1,onOutput:a,tagJsType:O.subscribe,processInitAttribute:co,processInit:rr,hasValueChanged:lo,processUpdate:Zn,destroy:cr,callback:e,Observables:[t]}}function fo(t,e){return{component:!1,onOutput:a,tagJsType:O.subscribe,processInitAttribute:a,hasValueChanged:lo,processInit:go,processUpdate:a,destroy:cr,callback:e,Observables:t}}function go(t,e,n,o,r){return rr({tagJsType:O.subscribe,states:[],Observables:t},e,n,void 0,r)}function ho(t,e={}){const n={tagJsType:O.host,processInitAttribute:bo,hasValueChanged:()=>0,processInit:vo,processUpdate:mo,destroy:yo,options:{callback:t,...e},matchesInjection(e,n){const o=e?.options;if(!o)return;const r=o?.callback;return r===t?n:void 0}},o=(...n)=>({...o,options:{arguments:n,...e,callback:t}});return Object.assign(o,n),o}function mo(t,e,n){const o=Kn(O.host,t,n,e);if(o)return o;const r=e.tagJsVar.options,s=t;var a;Wr(a=e),ye(a.state.newer.state);const c=s.options.arguments||r.arguments||[];e.returnValue=s.options.callback(...c),be(e)}function bo(t,e,n,o,r){return vo(o,r)}function vo(t,e){const n=e.target,o=e.state={};F(e),function(t,e,n,o){const r=e.options.arguments||[],s=e.options.callback(...r);n.returnValue=s;const a=e.options;a.onInit&&a.onInit(t,e,n,o)}(n,t,e,o),be(e)}function yo(t){++t.updateCount;const e=t,n=e.tagJsVar,o=n.options;if(e.destroy$.subscribers.length&&(Wr(t),Fn([],e.destroy$.next.bind(e.destroy$),t),Rr()),o.onDestroy){const r=e.target;return Fn([],(function(){Wr(t);const s=o.onDestroy(r,n,e,e.state);return Rr(),s}),t.stateOwner.context)}}function xo(t,e,n,o){const r={component:!1,tagJsType:"tag-conversion",processInitAttribute:a,processInit:(r,s,a)=>{const c=t.returnValue;return e.tagJsVar.processInit(c,e,n,o.placeholder)},processUpdate:(t,o,s)=>{if(o.locked||o.deleted)return;++o.updateCount;const a=o.value,c=a?.tagJsType,u=t?.tagJsType,i=u!==c;if(Ee(t,o)||i||r.hasValueChanged(t,o,n))return r.destroy(o,n),void tr(t,o,s,789);o.locked=467,o.render$.next();const l=o.returnValue;!function(t,e,n,o,r){const s=gt(e.props),a=t.value;a.props=s;const c=r.propsConfig;c&&(c.castProps=s);if("tagComponent"===e?.tagJsType){if(t.inputsHandler=n.inputsHandler,t.updatesHandler=n.updatesHandler,n.value=e,n.inputsHandler){Wr(n);(0,n.inputsHandler)(s),Rr()}if(n.updatesHandler){Wr(n);(0,n.updatesHandler)(s),Rr()}}t.tagJsVar.processUpdate(o,t,r,[]),t.value=o}(e,t,o,l,n),delete o.locked},hasValueChanged:(n,o,r)=>{const s=t.returnValue;return e.tagJsVar.hasValueChanged(s,e,r)},destroy:(o,r)=>{++t.updateCount,t.deleted=!0,delete t.returnValue;const s=e.tagJsVar.destroy(e,n);return D(s)?s.then((()=>{const e=Jo(t,r);return m(),e})):(t.destroy$.next(),Jo(t,r))}};return r}function wo(t,e,n){const o=t.context,r=t.returnValue,s=Qt(r);delete o.global,o.contexts=[];const a={updateCount:0,value:r,tagJsVar:s,destroy$:new Q,render$:new Q,placeholder:o.placeholder,valueIndex:-1,withinOwnerElement:!0,parentContext:o,contexts:o.contexts},c=xo(o,a,t,n);return o.subContext=a,o.tagJsVar=c,s.processInit(r,a,t,n.placeholder),t}function Co(t,e,n){const o=Yo(t,e,n,n?.appSupport),r=o.propsConfig;if(r){const e=t.tagJsType!==O.tagComponent?[]:no(t,o);r.castProps=e}return we(o,e.state.newest,e)}function Vo(t,e,n){const o=Co(t,e,n),r=o.templater.tag;return r?["dom","html"].includes(r.tagJsType)?(Nn(o,void 0,e.placeholder),o):wo(o,o.ownerSupport,e):o}function Jo(t,e){delete t.returnValue,delete t.global,t.contexts=[],t.htmlDomMeta=[],delete t.inputsHandler,delete t.updatesHandler}function To(t,e,n,o){const r=Co(t,e,n),s=r.templater.tag;return["dom","html"].includes(s.tagJsType)?function(t,e){const n=Nn(t,e,void 0);for(const t of n.dom)t.domElement&&l.push([C,[e,t.domElement]]),t.marker&&l.push([C,[e,t.marker]]);return t}(r,o):wo(r,0,e)}function ko(t,e,o,r,s){return n(e),s?To(t,e,o,s):Vo(t,e,o)}function Eo(t){return ot.stateConfig.handlers.handler(t)}function Io(t){return Eo((()=>{const e=t(),n=r();return n?.context?.global?He(e,n,{resolvePromise:So,resolveValue:Ao}):e})),Wo}function So(t){return t}function Ao(t){return t}function Oo(t){return Eo((function(){Nr().destroy$.toCallback(t)})),Wo}function Mo(t){const e=Nr(),n=Eo({callback:t}),o=Eo((()=>jo(e,ot.stateConfig,n)));return n.callback=t,o}function jo(t,e,n){const o=e.states;return function(...e){const r=function(t,e,n,...o){const r=n(...o),s=$(t);if(!s)return r;if(s.context.global);else{const t=s.context;t.tagJsVar.processUpdate(t.value,t,s.ownerSupport,[])}return D(r)&&r.finally((()=>{if(t.global);else{const t=s.context;t.tagJsVar.processUpdate(t.value,t,s.ownerSupport,[])}})),r}(t,o,n.callback,...e);return m(),r}}po.all=function(t,e){return po(Q.all(t),e)},ho.onInit=t=>ho((()=>{}),{onInit:t}),ho.onDestroy=t=>ho((()=>{}),{onDestroy:t});let Lo=0;const Po=Ho("click"),Do=Ho("mousedown");function Ho(t){return function(e){const n=Mo(e);return Eo((()=>{Ur().addEventListener(t,n)})),n}}const No={get:Ur,onclick:Po,click:Po,onClick:Po,mousedown:Do,onmousedown:Do,onMouseDown:Do};function Uo(t,e){Object.defineProperty(Wo,t,{get:()=>e,set:t=>e(t)})}var $o;function Wo(t,e=$o.SHALLOW){const n=function(...o){const r=to(e,o);r.tagJsType=O.tagComponent,r.processInit=ko,r.hasValueChanged=Ie;const s=function(t,e){return function(n,o,r){const s=no(t,n,r),a=n.ownerSupport,c=Yo(t,o,a,n.appSupport,s);return me(t,e,c,s)}}(r,n);return s.original=t,r.wrapper=s,r},o=t;n.original=t,o.tags=eo,o.setUse=ot,o.ValueTypes=O,o.tagIndex=Lo++,eo.push(n);const r=n;return r.inputs=t=>{const e=Nr();e.inputsHandler=t;return t(e.tagJsVar.props),!0},r.updates=t=>(Nr().updatesHandler=t,!0),r.getInnerHTML=Qn,r}function Ro(t,e,n){if(je(t,e))return 11;switch(n){case $o.NONE:return 1;case $o.SHALLOW:return ft(t,e);case $o.IMMUTABLE:return _o(t,e)}return function(t,e){let n=t,o=e;n=[...t],o=[...e||[]];if(!n.every(((t,e)=>function(t,e,n,o){const r=o[e];if(typeof t===A.object){const e={...t},n={...r||{}},o=Object.entries(e).every((([t,o])=>Bo(o,n[t],(()=>{delete e[t],delete n[t]}))));return o}return Bo(t,r,(function(){n.splice(e,1),o.splice(e,1)}))}(t,e,n,o))))return 7;return!1}(t,e)}function Bo(t,e,n){if(typeof t!==A.function)return!!ut(t,e,zo)&&4;if(typeof e!==A.function)return!1;const o=e?.original;o&&(e=o);t.original&&(t=t.original);return t.toString()===e.toString()?(n(),5):(n(),6)}function _o(t,e){const n=t.length;for(let o=0;o<n;++o){if(t[o]!==e[o])return 2}return!1}Uo("onclick",Po),Uo("click",Po),Uo("onMouseDown",Do),Uo("onmousedown",Do),Uo("mousedown",Do),function(t){t.DEEP="deep",t.SHALLOW="shallow",t.NONE="none",t.IMMUTABLE="immutable"}($o||($o={})),Wo.element=No,Wo.renderOnce=function(){throw new Error("Do not call tag.renderOnce as a function but instead set it as: `(props) => tag.renderOnce = () => html`` `")},Wo.use=function(){throw new Error("Do not call tag.use as a function but instead set it as: `(props) => tag.use = (use) => html`` `")},Wo.deepPropWatch=Wo,Wo.route=function(t){throw new Error("Do not call tag.route as a function but instead set it as: `tag.route = (routeProps: RouteProps) => (state) => html`` `")},Wo.inject=function(t){const e=Nr();if(!e)throw new Error("tag.inject can only be called within a tag or host context");let n=e.parentContext;for(;n;){const e=n.contexts;if(e)for(const n of e)if(n.isAttr&&n.tagJsVar?.matchesInjection){const e=n.tagJsVar.matchesInjection(t,n);if(void 0!==e)return e.returnValue}if(n.tagJsVar?.matchesInjection&&n.tagJsVar.matchesInjection(t,n))return n.returnValue;n=n.parentContext}const o=`Could not find parent context for tag.inject ${t}`;throw console.error(o,{targetItem:t,context:e}),new Error(o)},Wo.output=_n,Wo.onInit=Io,Wo.onDestroy=Oo,Wo.callback=Mo,Wo.onRender=function(t){const e=Nr(),n=n=>{Wr(e);const o=t();return Rr(),o},o=e.render$.subscribe((()=>{n()})),r=n();return Wo.onDestroy((()=>o.unsubscribe())),r},Wo.getInnerHTML=Qn,Wo.app=function(t){throw new Error("Do not call tag.route as a function but instead set it as: `tag.route = (routeProps: RouteProps) => (state) => html`` `")},Wo.immutableProps=function(t){return Wo(t,$o.IMMUTABLE)},Wo.watchProps=function(t){return Wo(t,$o.SHALLOW)},Object.defineProperty(Wo,"renderOnce",{set(t){t.tagJsType=O.renderOnce,t.processInit=ro,t.processUpdate=xt,t.destroy=ke,t.hasValueChanged=function(){return 0}}}),Object.defineProperty(Wo,"use",{set(t){t.original={setUse:ot,tags:eo},t.tagJsType=O.stateRender,t.processInit=ko,t.processUpdate=xt,t.hasValueChanged=Ie,t.destroy=ke}}),Object.defineProperty(Wo,"promise",{set(t){Pr(t)}});const Fo=3,zo=10;function Go(t){return pt(t,Fo)}function Ko(t){return pt(t,zo)}function Zo(t,e,n){const o={templater:t,context:e,castedProps:n,appSupport:void 0};return e.global.blocked=[],e.state||(e.state={newer:{state:[],states:[]}}),o}function qo(t,e,n,o){e.appSupport=n||e;const r=t.props;return r&&(e.propsConfig=function(t,e,n){const o=t.templater;if(o.tagJsType!==O.stateRender){switch(o.propWatch){case $o.IMMUTABLE:return t.propsConfig={latest:e,castProps:n};case $o.SHALLOW:return t.propsConfig={latest:e.map(Go),castProps:n}}return t.propsConfig={latest:e.map(Ko),castProps:n}}}(e,r,o)),e}function Xo(t,e,n,o,r){const s={templater:t,context:o,castedProps:r,appSupport:void 0};return s.ownerSupport=e,s.appSupport=n,s}function Yo(t,e,n,o,r){const s=Zo(t,e,r);return s.ownerSupport=n||s,s.ownerSupport.appSupport=o||s.ownerSupport,qo(t,s,o,r)}function Qo(t,e,o){if(L(e))return void 0===t.global&&n(t),t.oldTagJsVar=t.tagJsVar,t.tagJsVar=e,function(t,e,n){if(!e.state.newest){if(e.inputsHandler){const t=n.propsConfig;e.inputsHandler(t)}t.processInit(t,e,n,e.placeholder)}}(e,t,o),!0;if(t.global){t.oldTagJsVar=t.tagJsVar,t.tagJsVar=e;const n=t.state.newest;if(n)return typeof e===A.function||function(t,e,n,o){let r=n.templater||n;const s=t.templater.tag;s&&s._innerHTML&&(r=n._innerHTML);const a=Yo(r,e,o,o.appSupport);st(t.context.state.oldest,a)}(n,t,e,o),!0}if(t.inputsHandler){const e=o.propsConfig;t.inputsHandler(e)}return e.processInit(e,t,o,t.placeholder),t.oldTagJsVar=t.tagJsVar,t.tagJsVar=e,!0}function tr(t,e,n,o){const r=t&&t.tagJsType;if(delete e.deleted,r){if(r===O.renderOnce)return;Qo(e,t,n)}else{if(U(t))return ne(e,t,n),e.oldTagJsVar=e.tagJsVar,void(e.tagJsVar=qt(t));typeof t!==A.function?o&&function(t,e){e.value=t,e.oldTagJsVar=e.tagJsVar,e.tagJsVar=Bt(t);const n=e.placeholder,o=Ct(t),r=e.paint=[T,[n,o,function(t){e.simpleValueElm=t,delete e.paint},"processNowRegularValue"]];c.push(r)}(t,e):e.value=t}}function er(t,e,n){const o=t.tagJsVar.hasValueChanged(e,t,n);return 0===o||tr(e,t,n,o),o}function nr(t,e){let n;return t&&(n=e=document.createTextNode(I),l.push([C,[t,e]])),{appendMarker:n,insertBefore:e}}function or(t,e,n){const o=Zn(t,e,n);if(!0!==e.hasEmitted){const t=e.value.Observables;if(!t)return;if(!("value"in t[0]))return}if(0===o&&t.callback){ao(t,e.subContext)}}function rr(t,e,n,o,r){const s=t.Observables,{appendMarker:a,insertBefore:c}=nr(r,o);let u=function(t,e,o){qn(t,o,n,c),ur(e),u=o.tagJsVar.onOutput=function(t,e,o){const r=o.contextItem;er(r,t,n),r.tagJsVar.processUpdate(t,r,n,[t]),r.value=t,ur(e)}};const i=sr(s,n,((t,e,n)=>u(t,e,n)),t,e);return i.appendMarker=a,e.subContext=i,t.processUpdate=or,t.onOutput=u,i}function sr(t,e,n,o,r){function s(t,e){u.lastValues[e]={value:t,tagJsVar:Qt(t),oldTagJsVar:u.lastValues[e]?.tagJsVar},a(u.lastValues,e)}function a(t,e){const o=u.tagJsVar,s=o?.callback;if(s){Wr(r);const e=o.callback(...t.map((t=>t.value)));return n(e,c,u),void Rr()}const a=t[e].value;n(a,c,u)}let c=!0;const u={lastValues:[],subValueHandler:s,valuesHandler:a,tagJsVar:o,subscriptions:[]};return t.forEach(((t,e)=>{c=!0,u.subscriptions.push(t.subscribe((t=>s(t,e)))),c=!1})),o.onOutput=n,u}function ar(t){const e=t.subContext;if(!e)return;e.subscriptions.forEach((t=>t.unsubscribe())),delete t.subContext}function cr(t,e){++t.updateCount;const n=t.subContext;return ar(t),Gn(n,e)}function ur(t){t||ot.stateConfig.support||m()}function ir(t,e,n,o,r){rr({tagJsType:O.subscribe,states:[],Observables:[t]},e,n,o,r)}function lr(t){return r()?Eo((()=>pr(t))):pr(t)}function pr(t){let e=t;const n=new Set,o=t=>{n.forEach((e=>e(t)))};return{component:!1,tagJsType:O.signal,hasValueChanged:lo,processInitAttribute:a,processInit:ir,processUpdate:or,get value(){return e},set value(t){e!==t&&(e=t,o(t))},destroy:cr,emit:o,subscribe(t){t(e),n.add(t);const o=()=>n.delete(t);return o.unsubscribe=o,o}}}class fr extends Q{value;constructor(t){super(t),this.value=t}subscribe(t){const e=super.subscribe(t);return t(this.value,e),e}}class dr extends Q{value;constructor(t){super(t),this.value=t,this._value=t,et(this)}subscribe(t){const e=super.subscribe(t);return t(this._value,e),e}}function gr(t){return(e,n)=>{n.setHandler((()=>{})),t(e,n.next)}}function hr(t){return(e,n)=>{n.setHandler((()=>{}));t(e).then((t=>n.next(t)))}}const mr=t=>(e,n)=>{n.setHandler((()=>{}));const o=t(e).subscribe((t=>{o.unsubscribe(),n.next(t)}))},br=(t,e)=>yr(t,e).pastResult,vr=t=>t;const yr=(t,e,{init:n,before:o,final:r=vr}={})=>{const s=Eo({pastResult:void 0,values:void 0}),a="function"==typeof t?t():t,c=void 0===s.values;let u=0;function i(t){if(void 0===s.values){if(o&&!o(t))return s.values=t,s;const a=(n||e)(t,s.values);return s.pastResult=r(a),s.values=t,s}if(t.every(((t,e)=>t===s.values[e])))return s;if(o&&!o(t))return s.values=t,s;const a=e(t,s.values);return s.pastResult=r(a),s.values.length=0,s.values.push(...t),s}return c&&"function"==typeof t&&Wo.onRender((()=>{if(++u,1===u)return;i(t())})),i(a)};function xr(t,e){return Object.defineProperty(e,"noInit",{get(){const e=t();return e.setup.init=()=>{},e}}),Object.defineProperty(e,"asSubject",{get(){const e=t(),n=Eo((()=>r())),o=Eo((()=>new fr(void 0))),s=Eo((()=>({state:ot.stateConfig.state,states:ot.stateConfig.states}))),a=(t,a)=>(yr(t,((t,e)=>{const c=r(),u=a(t,e);if(c!==n){s.state,n.context.state.older}o.next(u)}),e.setup),o);return a.setup=e.setup,xr((()=>a),a),a}}),Object.defineProperty(e,"truthy",{get(){const e=t();return e.setup.before=t=>t.every((t=>t)),e}}),e}function wr(t){return r()?Eo((()=>new Q(t))):new Q(t)}function Cr(t){return ot.stateConfig.handlers.statesHandler(t)}function Vr(t){const e=lr([]),n=lr(0),o=lr(0);let r=[],s=0;return o.value=n.value,t(((...t)=>(r=t,e.value))),br(r,(()=>{++s,e.value=r,t((()=>r))})),Cr(((r,a)=>{if(s)return t(((...t)=>(a&&1!==a||(e.value=t),e.value))),o.value=n.value,void++n.value;t((()=>e.value))})),++s,e.value}function Jr(){return{stateDiff:0,provider:void 0}}xr((()=>function(t){const e=(e,n)=>yr(e,n,t).pastResult;return e.setup=t,xr((()=>e),e),e}({})),br),wr._value=t=>{Eo((function(){return{state:ot.stateConfig.state,states:ot.stateConfig.states}}));return Eo((function(){return new fr(t).pipe((t=>t))}))},wr.all=function(t){return Eo((()=>({state:ot.stateConfig.state,states:ot.stateConfig.states}))),r(),Q.all(t).pipe((t=>t))};const Tr={create:t=>{const e=Eo(Jr);if(e.stateDiff){let t=e.stateDiff;for(;t--;)Eo(void 0);return Eo(void 0)}const n=Eo((()=>{const n=ot.stateConfig,o=n.state.length,r=t.prototype?new t:t(),s=n.support,a=n.state.length-o,c={constructMethod:t,instance:r,stateDiff:a,owner:s,children:[]};e.provider=c;const u=s.context;return(u.providers=u.providers||[]).push(c),e.stateDiff=a,r})),o=t,r=o.compareTo=o.toString();return e.provider.constructMethod.compareTo=r,n},inject:function(t){return Eo((function(){const e=t,n=e.compareTo=e.compareTo||t.toString(),o=r(),s=[];let a={ownerSupport:o.ownerSupport};for(;a.ownerSupport;){const t=a.ownerSupport.context.providers;if(!t){a=a.ownerSupport;continue}const e=t.find((t=>{s.push(t);if(t.constructMethod.compareTo===n)return!0}));if(e){const t=o.context;return(t.providers=t.providers||[]).push(e),e.children.push(o),e.instance}a=a.ownerSupport}const c=`Could not inject provider: ${t.name} ${t}`;throw console.warn(`${c}. Available providers`,s),new Error(c)}))}};function kr(t=[],e){const n=Nr();return function(t,e,n=(()=>{})){const o=new Set(["push","pop","splice","shift","unshift"]),r=new Set(["map","reduce","forEach","every","filter"]),s=new Map,a=new Map,c=()=>{const o=$(e);n(t.value),Pe([o])},u=()=>{t.emit(t.value),c()},i=e=>{const n=s.get(e);if(n)return n;const o=(...n)=>{const o=t.value[e](...n);return u(),o};return s.set(e,o),o},l=e=>{const n=a.get(e);if(n)return n;const o=t.value[e].bind(t.value);return a.set(e,o),o};return new Proxy(t,{get:(e,n)=>Er(n)?t.value[n]:"length"===n?t.value.length:"string"==typeof n&&o.has(n)?i(n):"string"==typeof n&&r.has(n)?l(n):t[n],set:(e,n,o)=>Er(n)?(t.value[n]=o,u(),!0):"length"===n?(t.value.length=o,u(),!0):(t[n]=o,!0)})}(pr(t),n,e)}function Er(t){if("number"==typeof t)return Number.isInteger(t)&&t>=0;if("string"!=typeof t||""===t)return!1;const e=Number(t);return Number.isInteger(e)&&e>=0&&String(e)===t}class Ir extends Error{details;constructor(t,e,n={}){super(t),this.name=Ir.name,this.details={...n,errorCode:e}}}class Sr extends Ir{constructor(t,e){super(t,"array-no-key-error",e),this.name=Sr.name}}class Ar extends Ir{constructor(t,e){super(t,"state-mismatch-error",e),this.name=Ar.name}}class Or extends Ir{constructor(t,e){super(t,"sync-callback-error",e),this.name=Or.name}}const Mr=()=>{const t=Nr();if(!t)throw jr;const e=ot.stateConfig;return function(n){return jo(t,e,{callback:n})}},jr=new Or("callback() was called outside of synchronous rendering. Use `callback = callbackMaker()` to create a callback that could be called out of sync with rendering"),Lr=()=>{};function Pr(t){const e=Nr(),n=Eo({callback:Lr}),o=Eo({current:void 0}),r=Eo((()=>jo(e,ot.stateConfig,n)));if(o.current!==t){o.current=t;const e=t;t.then((()=>{o.current===e&&r()}))}}function Dr(t=[]){return r()?Eo((()=>Hr(pr(t)))):Hr(pr(t))}function Hr(t){const e=["push","pop","splice","shift","unshift"],n=["map","reduce","forEach","every","filter"],o=new Proxy(t,{get(r,s){return isNaN(s)?"length"===s?t.value.length:e.includes(s)?o[a=s]=(...e)=>{const n=t.value[a](...e);return t.emit(t.value),n}:n.includes(s)?t.value[s].bind(t.value):t[s]:t.value[s];var a},set:(e,n,o)=>isNaN(n)?"length"===n?(t.value.length=o,t.emit(t.value),!0):(t[n]=o,!0):(t.value[n]=o,t.emit(t.value),!0)});return o}function Nr(){return ot.stateConfig.context}function Ur(){return Nr().target}const $r=[];function Wr(t){return $r.push(t),ot.stateConfig.context=t}function Rr(){$r.pop(),ot.stateConfig.context=$r[$r.length-1]}"object"==typeof document&&(document.taggedJs&&console.warn("🏷️🏷️ Multiple versions of taggedjs are loaded. May cause issues."),document.taggedJs=!0);const Br=[],_r="__taggedjs_tag_element__";function Fr(t,e,o){const r=e[_r],c=Br.findIndex((t=>t.element===e));if((r||c>=0)&&console.warn("tagElement called multiple times for the same element",{element:e}),c>=0){const t=Br[c].support;fe(t,t.context.global),Br.splice(c,1)}e[_r]=!0,e.innerHTML="";let u=()=>f(o);u.propWatch=$o.NONE,u.tagJsType=O.stateRender,u.processUpdate=xt,u.props=[o],u.isApp=!0;const i=function(t,e){const o={component:!1,tagJsType:"templater",hasValueChanged:Ie,destroy:ke,processInitAttribute:a,processInit:function(){console.debug("do nothing app function")},processUpdate:xt},r={updateCount:0,value:t,valueIndex:0,varCounter:0,destroy$:new Q,render$:new Q,withinOwnerElement:!1,renderCount:0,global:void 0,state:{},tagJsVar:o};return n(r),r.events={},function(t,e,n){const o=Zo(t,e);qo(t,o,o),o.appElement=n,o.context=e,e.state.oldest||(e.state.oldest=o,e.state.older=e.state.newer),e.state.newest=o}(t,r,e),r}(u,e),l=i.global,p=i.state.newest;F(p.context),s(p);let f=t(o);const d=typeof f==A.function;d||(L(f)?(i.state.newest.propsConfig={latest:[o],castProps:[o]},u.propWatch=f.propWatch,u.tagJsType=f.tagJsType,u.wrapper=f.wrapper,u=f):(u.tag=f,f=t));const h=function(t,e,n,o,r,s,a){const c=document.createTextNode(I);if(eo.push(n.wrapper||{original:n}),s.placeholder=c,e.isApp=!0,!r)throw new Error(`Cannot tagElement, element received is type ${typeof r} and not type Element`);r.destroy=function(){const t=s.events;for(const e in t){const n=t[e];r.removeEventListener(e,n)}s.events={},++g.locks;const n=fe(i,e);return--g.locks,m(),n},++g.locks;const u=document.createDocumentFragment();u.appendChild(c);const i=Vo(n,s,{appSupport:{appElement:r,context:s},appElement:r,context:s,isRoot:!0});return i.appElement=r,a&&(o.tag=i.templater.tag),--g.locks,m(),r.appendChild(u),{support:i,tags:eo,ValueTypes:O}}(0,l,u,f,e,i,d);return Rr(),h}function zr(t,e){return function(n,o,r){if(s=o,Array.isArray(s)&&Object.prototype.hasOwnProperty.call(s,"raw")){const s=o.reduce(((t,e,n)=>t+e+(r[n]??"")),"");return e(n,[t,s])}var s;return e(n,[t,o])}}function Gr(t,e,n){function o(t){return o.toCallback(t)}return o.toCallback=n,t.listeners.push([e,o]),t.allListeners.push([e,o]),t}function Kr(t,e){const n=Js(t,t.elementFunctions);return cs(e[0],e[1],n),n}const Zr=Object.fromEntries([["alt","alt"],["ariaLabel","aria-label"],["referrerPolicy","referrerpolicy"],["autoFocus","autoFocus"],["border","border"],["id","id"],["for","for"],["fill","fill"],["content","content"],["charset","charset"],["cellPadding","cellpadding"],["cellSpacing","cellspacing"],["class","class"],["href","href"],["lang","lang"],["loading","loading"],["value","value"],["placeholder","placeholder"],["src","src"],["title","title"],["width","width"],["height","height"],["type","type"],["min","min"],["max","max"],["step","step"],["name","name"],["wrap","wrap"],["checked","checked"],["disabled","disabled"],["selected","selected"],["minLength","minLength"],["maxLength","maxLength"],["open","open"],["rel","rel"],["rows","rows"],["style","style"],["target","target"],["viewBox","viewBox"],["valign","valign"]].map((([t,e])=>[t,zr(e,Kr)]))),qr=[["onClose","onclose"],["onCancel","oncancel"],["onDoubleClick","ondblclick"],["onClick","click"],["onBlur","onblur"],["onChange","onchange"],["onInput","oninput"],["contextMenu","contextmenu"],["onMouseDown","onmousedown"],["onMouseUp","onmouseup"],["onMouseOver","onmouseover"],["onMouseOut","onmouseout"],["onKeyDown","onkeydown"],["onKeyUp","onkeyup"]];function Xr(t,e){return t.attributes.push(e),Qr(t,e[1]),ns(e[0])?es(e[0],t):ns(e[1])&&es(e[1],t),t}function Yr(t){const e=Object.fromEntries(qr.map((([e,n])=>[e,e=>function(t,e,n){return Gr(Js(t,t.elementFunctions),e,n)}(t,n,e)])));return{...e,attr:(...e)=>Kr(t,e),attrs:e=>function(t,e){const n=Js(t,t.elementFunctions);return Object.entries(e).map((t=>{n.attributes.push(t),Qr(n,t[1]),ns(t[0])?es(t[0],n):ns(t[1])&&es(t[1],n)})),n}(t,e),key:function(t){return this.arrayValue=t,this},...Object.fromEntries(Object.entries(Zr).map((([e,n])=>[e,ts(n,t)])))}}function Qr(t,e){let n=1;null!=e&&"function"!=typeof e&&"number"==typeof e.length&&(n+=e.length),t.contentId+=n}function ts(t,e){return(n,...o)=>t(e,n,o)}function es(t,e){e.contexts||(e.contexts=[]),e.contexts.push(t),++e.contentId}function ns(t){return Array.isArray(t)||H(t)||t?.tagJsType}function os(t,e){return(n,o)=>Xr(n,[t,o,!1,e])}function rs(t){return(e,n)=>Gr(e,t,n)}const ss=Object.fromEntries([["onClick",rs("click")],["onDoubleClick",rs("ondblclick")],["onDblClick",rs("ondblclick")],["onDblClick",rs("ondblclick")],["onBlur",rs("onblur")],["onChange",rs("onchange")],["onCancel",rs("oncancel")],["onClose",rs("onclose")],["onInput",rs("oninput")],["onMousedown",rs("onmousedown")],["onMouseDown",rs("onmousedown")],["onMouseup",rs("onmouseup")],["onMouseUp",rs("onmouseup")],["onMouseover",rs("onmouseover")],["onMouseOver",rs("onmouseup")],["onMouseout",rs("onmouseout")],["onMouseOut",rs("onmouseout")],["onKeyup",rs("onkeyup")],["onKeyUp",rs("onkeyup")],["onKeydown",rs("onkeydown")],["onKeyDown",rs("onkeydown")]]),as=Object.assign(Object.fromEntries(["checked","disabled","selected"].map((t=>[t,os(t,It)]))),{class:os("class",(function(t,e,n){N(n)?Object.entries(n).forEach((([e,n])=>{n?t.classList.add(e):t.classList.remove(e)})):St(t,e,n)}))},ss);function cs(t,e,n){return t in as?as[t](n,e):Xr(n,[t,e,!1,Et])}function us(t){return is(t)}function is(t){const e=function(t){if(!t||0===t.length)return"";const e=[];return t.forEach((t=>{const n=t[0];if("string"!=typeof n||0===n.length)return;const o=fs(t[1]);!0!==o?!1!==o&&null!=o&&e.push(`${n}="${ps(String(o))}"`):e.push(n)})),e.length>0?` ${e.join(" ")}`:""}(t.attributes),n=ls(t.innerHTML);return`<${t.tagName}${e}>${n}</${t.tagName}>`}function ls(t){return t&&0!==t.length?t.map((t=>{const e=fs(t);return(n=e)&&"object"==typeof n&&"string"==typeof n.tagName?is(e):Array.isArray(e)?ls(e):null==e||!1===e?"":ps(String(e));var n})).join(""):""}function ps(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function fs(t){return"function"==typeof t?t():t}function ds(t,e){++t.updateCount;const n=t.contexts,o=[];if(t.paintCommands){for(let e=c.length-1;e>=0;--e){const n=c[e],o=t.paintCommands.indexOf(n);if(o>=0&&(c.splice(e,1),t.paintCommands.splice(o,1),0===t.paintCommands.length))break}return delete t.paintCommands,void gs(t)}if(n.length&&(hs(n,e,o),n.length=0,o.length)){const e=t.htmlDomMeta;return t.deleted=!0,Promise.all(o).then((()=>{++g.locks,ie(e),gs(t),--g.locks,m()}))}ie(t.htmlDomMeta),gs(t)}function gs(t){t.htmlDomMeta=[],delete t.contexts,t.deleted=!0}function hs(t,e,n){const o=t[0],r=o.tagJsVar.destroy(o,e);return o.deleted=!0,D(r)?n.push(r.then((()=>{if(t.length>1)return hs(t.slice(1,t.length),e,n)}))):(o.htmlDomMeta&&(ie(o.htmlDomMeta),delete o.htmlDomMeta),t.length>1?hs(t.slice(1,t.length),e,n):void 0)}function ms(t,e,n){if(!0===e.deleted)return;++e.updateCount;if(bs(t,e))return ds(e,n),e.htmlDomMeta=[],delete e.deleted,void tr(t,e,n,789);const o=e.contexts,r=t.contexts||[],s=e.tagJsVar.allListeners;if(t.allListeners.forEach(((t,e)=>{s[e][1].toCallback=t[1].toCallback})),o.length!==r.length)throw console.info("context mismatch",{value:t,context:e,conValues:o.map((t=>t.value)),vContexts:r,deleted:e.deleted,contexts:o}),new Error(`Expected ${o.length} contexts but got ${r.length}`);e.locked=79,o.forEach(((t,e)=>{t.tagJsVar.processUpdate(r[e],t,n)})),delete e.locked}function bs(t,e){if(!t)return 1;if(e.value===t)return 0;if(!t||"element"!==t.tagJsType)return 1;if(t.contentId!==e.value.contentId)return 1;return t.innerHTML.length!==e.value.innerHTML.length?1:0}function vs(t,e,n,o,r){t.forEach((t=>{switch(typeof t){case"string":case"boolean":case"number":return xs(t,o,r);case"function":{if("element"===t.tagJsType)break;const s=function(t,e,n,o,r){const s=[],c={updateCount:0,parentContext:n,contexts:s,target:e,value:t,htmlDomMeta:[],tagJsVar:{component:!1,tagJsType:"dynamic-text",hasValueChanged:()=>0,processInit:a,processInitAttribute:a,destroy:(t,e)=>{++c.updateCount,s.forEach((t=>t.tagJsVar.destroy(t,e)))},processUpdate:(t,e,n,o)=>{++c.updateCount,Wr(i);let r=t(i);const s=c.underFunction;delete c.underFunction,r instanceof Function&&!r.tagJsType&&(s&&r.toString()===s.toString()?r=i.value:(c.underFunction=r,r=r()));const a=i.tagJsVar.processUpdate(r,i,n,o);return i.value=r,e.value=t,Rr(),a}},valueIndex:-1,withinOwnerElement:!0,destroy$:new Q,render$:new Q};Wr(c);let u=t();H(u)&&!u.tagJsType&&(c.underFunction=u,u=u());const i=ys(u,c,e,o,r);return n.contexts.push(c),c.subContext=i,Rr(),i}(t,o,e,n,r);return s}}if(null==t)return xs(t,o,r);if("element"!==t.tagJsType)return ys(t,e,o,n,r);{const s=ws(t,e,n,e.contexts);c.push([r,[o,s]]);e.htmlDomMeta.push({nn:s.tagName,domElement:s,at:[]})}}))}function ys(t,e,n,o,r){const s=te(t,0,!0,e);if(e.contexts.push(s),s.target=n,s.placeholder=document.createTextNode(""),c.push([r,[n,s.placeholder]]),Wr(s),s.inputsHandler){const t=o.propsConfig;s.inputsHandler(t)}return s.tagJsVar.processInit(t,s,o,s.placeholder),Rr(),s}function xs(t,e,n){const o=Ct(t),r=document.createTextNode(o);return c.push([n,[e,r]]),r}function ws(t,e,n,o){const r=document.createElement(t.tagName);return e.target=r,t.attributes.forEach((t=>{const e=t[0];"string"==typeof e&&(t[2]=Vt(e,r.tagName))})),ln(t.attributes,[],r,n,e),vs(t.innerHTML,e,n,r,C),t.listeners.forEach(((e,o)=>function(t,e,n,o,r){const s=(...o)=>{const r=t.listeners[e][1],s=W(n),a=s.context.updateCount;s.context.locked=1,++g.locks,Wr(s.context);const c=r(...o);--g.locks,delete s.context.locked,Rr();return a===s.context.updateCount?Ue(c,s):(m(),D(c)?c.then((()=>(Pe([s.context.state.newest]),"promise-no-data-ever"))):"no-data-ever")};Fe(n.appSupport,o[0],r,s)}(t,o,n,e,r))),r}function Cs(t,e,n,o){e.contexts=e.contexts||[],e.htmlDomMeta=[],e.locked=34;const r=ws(t,e,n,e.contexts);delete e.locked;const s=[w,[o,r,"htmlTag.processInit"]];c.push(s),e.paintCommands=[s],p.push([()=>{delete e.paintCommands},[]]);const a={nn:t.tagName,domElement:r,at:t.attributes};return e.htmlDomMeta=[a],r}function Vs(t){const e=Js({component:!1,tagJsType:"element",processInitAttribute:a,processInit:Cs,destroy:ds,processUpdate:ms,hasValueChanged:bs,tagName:t,innerHTML:[],attributes:[],contentId:0,listeners:[],allListeners:[],elementFunctions:Yr},Yr);return e.tagName=t,e}function Js(t,e){const n=(...t)=>{const e={...n};e.attributes=[...n.attributes],e.listeners=[...n.listeners],e.allListeners=[...n.allListeners];const o=e.contexts=e.contexts||[];return e.innerHTML=t,t.forEach((t=>{if(ns(t))return"element"===t.tagJsType?(e.allListeners.push(...t.allListeners),void(t.contexts&&(o.push(...t.contexts),++e.contentId))):void function(t,e){e.contexts||(e.contexts=[]);e.contexts.push(t)}(t,e)})),e};var o,r;return Object.assign(n,t),o=n,r=Yr(n),Object.entries(r).forEach((([t,e])=>{try{o[t]=e}catch{Object.defineProperty(o,t,{value:e,writable:!0,configurable:!0,enumerable:!1})}})),n.attributes=[...t.attributes],n.listeners=[...t.listeners],n.allListeners=[...t.allListeners],n.toString=function(){return us(this)},n}const Ts=function(){const t=Js({component:!1,tagJsType:"element",processInitAttribute:a,processInit:ks,destroy:Es,processUpdate:ms,hasValueChanged:bs,tagName:"no-element",innerHTML:[],attributes:[],contentId:0,listeners:[],allListeners:[],elementFunctions:Yr});return t.tagName="no-element",t}();function ks(t,e,n,o){e.contexts=e.contexts||[],e.htmlDomMeta=[],vs(t.innerHTML,e,n,o,w)}function Es(t,e){++t.updateCount;const n=t.contexts,o=[];if(n.length&&(hs(n,e,o),n.length=0,o.length)){const e=t.htmlDomMeta;return Promise.all(o).then((()=>{++g.locks,ie(e),--g.locks,m()}))}}const Is=Vs("button"),Ss=Vs("select"),As=Vs("option"),Os=Vs("input"),Ms=Vs("textarea"),js=Vs("html"),Ls=Vs("head"),Ps=Vs("title"),Ds=Vs("meta"),Hs=Vs("link"),Ns=Vs("style"),Us=Vs("body"),$s=Vs("script"),Ws=Vs("noscript"),Rs=Vs("hr"),Bs=Vs("h1"),_s=Vs("h2"),Fs=Vs("h3"),zs=Vs("h4"),Gs=Vs("h5"),Ks=Vs("h6"),Zs=Vs("ol"),qs=Vs("ul"),Xs=Vs("li"),Ys=Vs("div"),Qs=Vs("main"),ta=Vs("section"),ea=Vs("header"),na=Vs("footer"),oa=Vs("form"),ra=Vs("fieldset"),sa=Vs("legend"),aa=Vs("dialog"),ca=Vs("pre"),ua=Vs("table"),ia=Vs("tr"),la=Vs("td"),pa=Vs("th"),fa=Vs("thead"),da=Vs("tbody"),ga=Vs("tfoot"),ha=Vs("iframe"),ma=Vs("a"),ba=Vs("u"),va=Vs("img"),ya=Vs("br"),xa=Vs("label"),wa=Vs("p"),Ca=Vs("small"),Va=Vs("span"),Ja=Vs("strong"),Ta=Vs("b"),ka=Vs("sup"),Ea=Vs("nav"),Ia=Vs("figure"),Sa=Vs("figcaption"),Aa=Vs("code"),Oa=Vs("canvas"),Ma=Vs("svg"),ja=Vs("path"),La=Vs("polygon"),Pa=Vs("rect"),Da=Vs("details"),Ha=Vs("summary"),Na="3.1.13",Ua={tagElement:Fr,renderWithSupport:Te,firstTagRender:we,reRenderTag:xe,paint:m};var $a=e.W9,Wa=e.cg,Ra=e.m0,Ba=e.rS,_a=e.Y2,Fa=e.ei,za=e.B7,Ga=e.TU,Ka=e.XF,Za=e.PC,qa=e.Ot,Xa=e.Mj,Ya=e.tD,Qa=e.a,tc=e.xe,ec=e.YO,nc=e.ZA,oc=e.b,rc=e.rf,sc=e.br,ac=e.um,cc=e.x6,uc=e.E2,ic=e.OH,lc=e.Ji,pc=e.TB,fc=e.Ii,dc=e.mX,gc=e.yV,hc=e.EI,mc=e.aY,bc=e.zV,vc=e.pf,yc=e.ze,xc=e.Go,wc=e.bD,Cc=e.WJ,Vc=e.wL,Jc=e.Ng,Tc=e.O,kc=e.zH,Ec=e.r3,Ic=e.y4,Sc=e.Df,Ac=e.Ie,Oc=e.lI,Mc=e.$F,jc=e.vP,Lc=e.hp,Pc=e.qr,Dc=e.ts,Hc=e.Zd,Nc=e.B4,Uc=e.HD,$c=e.Az,Wc=e.sV,Rc=e.Ah,Bc=e.f5,_c=e.Gk,Fc=e.j_,zc=e.h1,Gc=e.h2,Kc=e.h3,Zc=e.h4,qc=e.h5,Xc=e.h6,Yc=e.zC,Qc=e.d5,tu=e.wx,eu=e.cF,nu=e.Hc,ou=e.PB,ru=e.uq,su=e.hr,au=e.qy,cu=e.gx,uu=e.pU,iu=e._8,lu=e.hF,pu=e.cy,fu=e.Tn,du=e.Gv,gu=e.yL,hu=e.D8,mu=e.Ze,bu=e._4,vu=e.mn,yu=e.Pf,xu=e.o1,wu=e.z,Cu=e.li,Vu=e.nf,Ju=e.iW,Tu=e.mI,ku=e.C$,Eu=e.et,Iu=e.Vg,Su=e.ol,Au=e.sA,Ou=e.TG,Mu=e.MG,ju=e.PL,Lu=e.uK,Pu=e.CG,Du=e.p,Hu=e.nI,Nu=e.Ae,Uu=e.Fs,$u=e.n1,Wu=e.AS,Ru=e.iv,Bu=e.r5,_u=e.M$,Fu=e.Pc,zu=e.QB,Gu=e.K$,Ku=e.uW,Zu=e.Lt,qu=e.Jv,Xu=e.TA,Yu=e.Jn,Qu=e.Ll,ti=e.L6,ei=e.EX,ni=e.Ln,oi=e.wk,ri=e.xP,si=e.ko,ai=e.iF,ci=e.bc,ui=e.B1,ii=e.RX,li=e.Sx,pi=e.lR,fi=e.JW,di=e.ag,gi=e.tp,hi=e.Tc,mi=e.Hf,bi=e.zc,vi=e._A,yi=e.T_,xi=e.td,wi=e.g0,Ci=e.pd,Vi=e.th,Ji=e.VQ,Ti=e.DD,ki=e.tr,Ei=e.u,Ii=e.ul,Si=e.Ag,Ai=e.gA,Oi=e.NU,Mi=e.rE,ji=e.wB,Li=e.id,Pi=e.MC,Di=e.SZ;export{$a as ArrayNoKeyError,Wa as BasicTypes,Ra as ImmutableTypes,Ba as PropWatches,_a as RouteQuery,Fa as StateMismatchError,za as Subject,Ga as Subjective,Ka as SyncCallbackError,Za as TagError,qa as ValueSubject,Xa as ValueSubjective,Ya as ValueTypes,Qa as a,tc as appElements,ec as array,nc as arrayWatch,oc as b,rc as body,sc as br,ac as buildBeforeElement,cc as button,uc as callback,ic as callbackMaker,lc as canvas,pc as checkArrayValueChange,fc as checkSimpleValueChange,dc as checkStillSubscription,gc as checkTagValueChange,hc as checkTagValueChangeAndUpdate,mc as code,bc as combineLatest,vc as createHtmlSupport,yc as createTrigger,xc as deepClone,wc as deepEqual,Cc as defineValueOn,Vc as deleteContextSubContext,Jc as deleteSimpleValue,Tc as destroySupport,kc as details,Ec as dialog,Ic as div,Sc as elementVarToHtmlString,Ac as empty,Oc as fieldset,Mc as figcaption,jc as figure,Lc as firstTagRender,Pc as footer,Dc as forceUpdateExistingValue,Hc as form,Nc as getBaseSupport,Uc as getContextInCycle,$c as getDomMeta,Wc as getInnerHTML,Rc as getNewGlobal,Bc as getSupportOlderState,_c as getTemplaterResult,Fc as guaranteeInsertBefore,zc as h1,Gc as h2,Kc as h3,Zc as h4,qc as h5,Xc as h6,Yc as hasPropChanges,Qc as head,tu as header,eu as hmr,nu as host,ou as howToSetInputValue,ru as howToSetStandAloneAttr,su as hr,au as html,cu as htmlTag,uu as iframe,iu as img,lu as input,pu as isArray,fu as isFunction,du as isObject,gu as isPromise,hu as isSimpleType,mu as isStaticTag,bu as isSubjectInstance,vu as isTagComponent,yu as label,xu as legend,wu as letProp,Cu as li,Vu as link,Ju as main,Tu as meta,ku as nav,Eu as noElement,Iu as noscript,Su as ol,Au as onDestroy,Ou as onFirstSubContext,Mu as onInit,ju as oneRenderToSupport,Lu as option,Pu as output,Du as p,Hu as paint,Nu as path,Uu as pipe,$u as polygon,Wu as pre,Ru as promise,Bu as providers,_u as reRenderTag,Fu as rect,zu as renderWithSupport,Gu as script,Ku as section,Zu as select,qu as setBooleanAttribute,Xu as setNonFunctionInputValue,Yu as setSimpleAttribute,Qu as setUseMemory,ti as signal,ei as small,ni as span,oi as state,ri as states,si as strong,ai as style,ci as subject,ui as subscribe,ii as subscribeWith,li as summary,pi as sup,fi as svg,di as syncError,gi as table,hi as tag,mi as tagElement,bi as tagValueUpdateHandler,vi as tags,yi as tbody,xi as td,wi as textarea,Ci as tfoot,Vi as th,Ji as thead,Ti as title,ki as tr,Ei as u,Ii as ul,Si as upgradeBaseToSupport,Ai as valueToTagJsVar,Oi as variablePrefix,Mi as version,ji as watch,Li as willCallback,Pi as willPromise,Di as willSubscribe};
|
|
1
|
+
var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t){return t.renderCount=t.renderCount||0,t.varCounter=0,t.state={newer:{state:[],states:[]}},t.global={blocked:[]}}t.d(e,{W9:()=>Er,cg:()=>A,m0:()=>S,rS:()=>Uo,Y2:()=>o,ei:()=>Sr,B7:()=>Q,TU:()=>tt,XF:()=>Ar,PC:()=>Ir,Ot:()=>pr,Mj:()=>fr,tD:()=>O,a:()=>ba,xe:()=>Rr,YO:()=>Pr,ZA:()=>Tr,b:()=>ka,rf:()=>$s,br:()=>xa,um:()=>Hn,x6:()=>Ss,E2:()=>Oo,OH:()=>Or,Ji:()=>Ma,TB:()=>me,Ii:()=>ge,mX:()=>Kn,yV:()=>Wt,EI:()=>Rt,aY:()=>Oa,zV:()=>q,pf:()=>qo,ze:()=>Mo,Go:()=>at,bD:()=>ut,WJ:()=>et,wL:()=>Fn,Ng:()=>de,O:()=>kt,zH:()=>Ha,r3:()=>ca,y4:()=>Qs,Df:()=>us,Ie:()=>E,lI:()=>sa,$F:()=>Aa,vP:()=>Sa,hp:()=>Pt,qr:()=>oa,ts:()=>tr,Zd:()=>ra,B4:()=>Ko,HD:()=>Hr,Az:()=>Dn,sV:()=>Yn,Ah:()=>n,f5:()=>Dt,Gk:()=>Qn,j_:()=>er,h1:()=>_s,h2:()=>Fs,h3:()=>zs,h4:()=>Gs,h5:()=>Ks,h6:()=>Zs,zC:()=>Wo,d5:()=>Ps,wx:()=>na,cF:()=>$a,Hc:()=>go,PB:()=>Ft,uq:()=>Gt,hr:()=>Bs,qy:()=>Ls,gx:()=>Vs,pU:()=>ma,_8:()=>ya,hF:()=>Ms,cy:()=>U,Tn:()=>H,Gv:()=>N,yL:()=>D,D8:()=>M,Ze:()=>j,_4:()=>P,mn:()=>L,Pf:()=>wa,o1:()=>aa,z:()=>Cr,li:()=>Ys,nf:()=>Ns,iW:()=>ta,mI:()=>Hs,C$:()=>Ea,et:()=>ks,Vg:()=>Rs,ol:()=>qs,sA:()=>Ao,TG:()=>Zn,MG:()=>Io,PL:()=>no,uK:()=>Os,CG:()=>Bn,p:()=>Ca,nI:()=>m,Ae:()=>La,Fs:()=>po,n1:()=>Pa,AS:()=>ua,iv:()=>Lr,r5:()=>Jr,M$:()=>Lt,Pc:()=>Da,QB:()=>Ut,K$:()=>Ws,uW:()=>ea,Lt:()=>As,Jv:()=>Zt,TA:()=>Kt,Jn:()=>qt,Ll:()=>ot,L6:()=>ir,EX:()=>Va,Ln:()=>Ja,wk:()=>ko,xP:()=>wr,ko:()=>Ta,iF:()=>Us,bc:()=>xr,B1:()=>lo,RX:()=>uo,Sx:()=>Na,lR:()=>Ia,JW:()=>ja,ag:()=>Mr,tp:()=>ia,Tc:()=>$o,Hf:()=>_r,zc:()=>be,_A:()=>to,T_:()=>ga,td:()=>pa,g0:()=>js,pd:()=>ha,th:()=>fa,VQ:()=>da,DD:()=>Ds,tr:()=>la,u:()=>va,ul:()=>Xs,Ag:()=>Zo,gA:()=>ke,NU:()=>Ye,rE:()=>Ua,wB:()=>mr,id:()=>dr,MC:()=>gr,SZ:()=>hr});class o{get(t){return"todo"}}function r(){return ot.stateConfig.support}function s(t){return $r(t.context),ot.stateConfig.support=t}const a=function(){};let c=[];const u=[];let i=[],l=[],p=[],f=!1;const d=[],g={locks:0,removeLocks:0};function h(t,e){e.textContent=t}function m(){g.locks>0||(++g.locks,v(),--g.locks,b(),!f&&d.length&&(f=!0,requestAnimationFrame((()=>{for(++g.locks;d.length;){const t=d.shift();t[0](...t[1])}v(),b(),--g.locks,f=!1}))))}function b(){c=[],i=[],l=[];const t=p;p=[];for(const e of t)e[0](...e[1])}function v(){const t=u.length;!function(){for(const t of u)t[0](...t[1])}(),u.splice(0,t);for(const t of i)t[0](...t[1]);for(const t of l)t[0](...t[1]);for(const t of c)t[0](...t[1])}function y(t,e){u.push([x,[t,e]])}function x(t,e){t||console.debug("no element by",{_caller:e,element:t});const n=t.parentNode;n||console.debug("no parentNode by",{_caller:e,element:t}),n.removeChild(t)}function w(t,e,n){t.parentNode.insertBefore(e,t)}function C(t,e){t.appendChild(e)}const V="object"==typeof document&&document.createElement("div");function J(t){return V.innerHTML=t,document.createTextNode(V.innerHTML)}function T(t,e,n=a,o){const r=J(e);w(t,r),n(r)}function k(t,e,n=a){V.innerHTML=e;const o=document.createTextNode(V.textContent);w(t,o),n(o)}function I(t,e,n){V.innerHTML=e;const o=document.createTextNode(V.textContent);C(t,o),n(o)}const E="";var S,A;!function(t){t.string="string",t.number="number",t.boolean="boolean",t[void 0]="undefined"}(S||(S={})),function(t){t.function="function",t.date="date",t.unknown="unknown",t.object="object"}(A||(A={}));const O={tag:"html",dom:"dom",templater:"templater",tagComponent:"tagComponent",tagArray:"tagArray",host:"host",subscribe:"subscribe",signal:"signal",renderOnce:"renderOnce",stateRender:"stateRender",version:Date.now()};function M(t){switch(t){case S.string:case S.number:case S.boolean:return!0}return!1}function j(t){if(!t)return!1;switch(t.tagJsType){case O.dom:case O.tag:case O.templater:return!0}return!1}function L(t){const e=t?.tagJsType;return e===O.tagComponent||e===O.stateRender}function P(t){return N(t)&&typeof t.subscribe===A.function}function D(t){return t&&H(t.then)}function H(t){return typeof t===A.function}function N(t){return typeof t===A.object&&null!==t}function U(t){return Array.isArray(t)}function $(t){const e=t.state;return e&&e.newest&&e.newest?e.newest:t.parentContext?$(t.parentContext):void 0}function W(t){let e=t;for(;e.ownerSupport&&!L(e.templater);)e=e.ownerSupport;const n=e.context.state;return n&&n.newest||e}function R(...t){return t}function B(t){const e=ot.stateConfig;return e.states[e.statesIndex]=t,++e.statesIndex,t(R)}function _(t){const e=ot.stateConfig,n=e.statesIndex,o=W(e.prevSupport).context.state.older.states[n];let r=[];o((function(...t){return r=t,o.lastValues=r,t}));return e.states[e.statesIndex]=t,++e.statesIndex,t((function(...t){return r}))}function F(t){$r(t);const e=ot.stateConfig;e.handlers.handler=Z,e.handlers.statesHandler=B,e.rearray=[];const n=e.state=[],o=e.states=[];e.statesIndex=0;(t.state=t.state||{}).newer={state:n,states:o}}class z{}function G(t){const e=t.callback;if(!e)return t.defaultValue;const[n]=function(t){const[e]=t(z),[n]=t(e);return[e,n]}(e);return n}function K(){const t=ot.stateConfig,e=t.rearray[t.state.length];return t.state.push(e),e.defaultValue}function Z(t){const e=ot.stateConfig,n=Hr();if(!n||!n.state){const t="State requested but TaggedJs is not currently rendering a tag or host";throw console.error(t,{config:e,context:n,function:e.support?.templater.wrapper?.original}),new Error(t)}const o=n.state.newer;e.state=o.state;let r=t;if(typeof t===A.function&&(r=t()),typeof r===A.function){const t=r;r=function(...e){return t(...e)},r.original=t}const s={get:function(){return G(s)},defaultValue:r};return e.state.push(s),r}function q(t){const e=new Q;return e.subscribeWith=e=>{const n=[],o=[],r=(r,s)=>{n[s]=!0,o[s]=r;if(n.length===t.length){for(const t of n)if(!t)return;e(o,a)}},s=[...t],a=s.shift().subscribe((t=>r(t,0))),c=s.map(((t,e)=>t.subscribe((t=>r(t,e+1)))));return a.subscriptions=c,a},e}function X(t,e,n){const o=Q.globalSubCount$;Q.globalSubCount$.next(o.value+1);const r=function(){r.unsubscribe()};return r.callback=e,r.subscriptions=[],r.unsubscribe=function(){return function(t,e,n){!function(t,e){const n=t.findIndex((t=>t.callback===e));-1!==n&&t.splice(n,1)}(e,n);const o=Q.globalSubCount$;Q.globalSubCount$.next(o.value-1),t.unsubscribe=()=>t;const r=t.subscriptions;for(const t of r)t.unsubscribe();return t}(r,n,e)},r.add=t=>(r.subscriptions.push(t),r),r.next=t=>{e(t,r)},r}function Y(t,e,n){const o=[...e],r=o.shift(),s=t=>{if(o.length)return Y(t,o,n);n(t)};let a=s;const c=r(t,{setHandler:t=>a=t,next:s});a(c)}class Q{onSubscription;methods=[];isSubject=!0;subscribers=[];subscribeWith;value;constructor(t,e){this.onSubscription=e,arguments.length>0&&(this.value=t)}subscribe(t){const e=X(0,t,this.subscribers),n=this.subscribeWith;if(n){if(this.methods.length){const n=t;t=t=>{Y(t,this.methods,(t=>n(t,e)))}}return n(t)}return this.subscribers.push(e),this.onSubscription&&this.onSubscription(e),e}next(t){this.value=t,this.emit()}set=this.next.bind(this);emit(){const t=this.value,e=this.subscribers;for(const n of e)n.callback(t,n)}toPromise(){return new Promise((t=>{this.subscribe(((e,n)=>{n.unsubscribe(),t(e)}))}))}toCallback(t){const e=this.subscribe(((n,o)=>{const r=o?.unsubscribe;r?r():setTimeout((()=>{e.unsubscribe()}),0),t(n)}));return e}pipe(...t){const e=[];"value"in this&&e.push(this.value);const n=new Q(...e);return n.setMethods(t),n.subscribeWith=t=>this.subscribe(t),n.next=t=>this.next(t),n}setMethods(t){this.methods=t}static all(t){return q(t.map((t=>{if(P(t))return t;return new Q(t,(e=>(e.next(t),e)))})))}static globalSubCount$=new Q(0)}class tt extends Q{_value;constructor(...t){super(...t),this._value=t[0],et(this)}next(t){this._value=t,this.emit()}emit(){const t=this._value,e=this.subscribers;for(const n of e)n.callback(t,n)}}function et(t){Object.defineProperty(t,"value",{set(e){t._value=e,t.emit()},get:()=>t._value})}const nt=new Q(void 0,(function(t){r()||t.next()})),ot={stateConfig:{state:[],version:Date.now(),handlers:{handler:Z,statesHandler:B}},tagClosed$:nt};function rt(t,e,n){if(e.deleted)return;const o=t[e.valueIndex],r=e.tagJsVar;$r(e),r.processUpdate(o,e,n,t),Wr(),e.value=o}function st(t,e){if(!t)return;const n=t.context.contexts;!function(t,e){const n=e.templater,o=e.templater.tag,r=n.values||o.values,s=t.templater.tag;s.values=r}(t,e),++g.locks,function(t,e){const n=t.templater.tag.values;for(const o of e)rt(n,o,t)}(t,n),--g.locks,m()}function at(t,e){return ct(t,e)}function ct(t,e){if(null===t||typeof t!==A.object)return t;if(e<0)return t;if(t instanceof Date)return new Date(t);if(t instanceof RegExp)return new RegExp(t);const n=U(t)?[]:Object.create(Object.getPrototypeOf(t));if(U(t))for(let o=0;o<t.length;o++)n[o]=ct(t[o],e-1);else for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=ct(t[o],e-1));return n}function ut(t,e,n){return it(t,e,n)}function it(t,e,n){return!(t!==e&&(o=t,r=e,!H(o)||!H(r)||o.toString()!==r.toString()))||(n<0||typeof t===A.object&&typeof e===A.object&&(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():U(t)&&U(e)?function(t,e,n){if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!it(t[o],e[o],n-1))return!1;return!0}(t,e,n-1):!U(t)&&!U(e)&&function(t,e,n){const o=Object.keys(t),r=Object.keys(e);if(0===o.length&&0===r.length)return!0;if(o.length!==r.length)return!1;for(const s of o){if(!r.includes(s)||!it(t[s],e[s],n-1))return!1}return!0}(t,e,n-1)));var o,r}function lt(t){return t.map(pt)}function pt(t,e){const n=t,o=t?.tagJsType;if(o)switch(o){case O.signal:case O.subscribe:case O.stateRender:return;case O.dom:case O.tag:case O.templater:return lt(n.values)}return U(t)?lt(n):at(t,e)}function ft(t,e){const n=t.length;for(let o=0;o<n;++o){const n=t[o],r=e[o];if(U(n)&&U(r)){if(n===r)continue;return 3}if(typeof n!==A.function||typeof r!==A.function)if(typeof n!==A.object){if(n!==r)return 3.3}else{if(!n&&!r)continue;if(typeof e===A.object){const t=Object.entries(n);for(const e of t){if(!dt(e,r))return 3.1}}}}return!1}function dt([t,e],n){const o=n[t];return typeof e===A.function&&typeof o===A.function||o===e}function gt(t,e,n){return t}function ht(t){return typeof t!==A.object||!t||t.tagJsType}function mt(t,e){const n=t.context.providers;if(n)for(const t of n)for(let n=t.children.length-1;n>=0;--n){t.children[n].context.global===e&&t.children.splice(n,1)}t.context.destroy$.next(),t.context.renderCount=0}function bt(t,e){for(const n of t){const t=n.lastArray;if(t){bt(t,e);continue}const o=n.value;if(o?.tagJsType===O.subscribe){o.destroy(n,e),n.deleted=!0;continue}const r=n.global;if(!r)continue;const s=n.state.newest,a=r.subscriptions;a&&a.forEach(yt),L(s.templater)&&mt(s,r);bt(n.contexts,s),r.deleted=!0}}function vt(t,e=[],n=[]){for(const o of t){const t=o.global;if(!t)continue;const r=o.state.newest;if(r){e.push(r);const o=t.subscriptions;o&&n.push(...o)}const s=o.contexts;s&&vt(s,e,n)}return{tags:e,subs:n}}function yt(t){t.unsubscribe()}function xt(t){!function(t,e){if(t&&e.state?.oldest){return void kt(e.state.oldest,t)}e.tagJsVar.destroy(e,{})}(t.global,t)}function wt(t){++t.updateCount;const e=t.lastArray;e&&Ct(t,e)}function Ct(t,e){for(let t=0;t<e.length;++t)xt(e[t]);delete t.lastArray}function Vt(t){for(let e=t.length-1;e>=0;--e){Jt(t[e]),t.splice(e,1)}}function Jt(t){const e=t.marker;e&&y(e,"destroyMarker");y(t.domElement,"destroyClone")}function Tt(t,e){t.contexts&&function(t,e){for(const n of t){if(n.withinOwnerElement){const t=n.tagJsVar;if(t&&"host"===t.tagJsType){const o=n.supportOwner,r=t.destroy(n,o);D(r)&&e.push(r)}continue}const t=n.lastArray;if(t){Ct(n,t);continue}const o=n.simpleValueElm;if(o){delete n.simpleValueElm,y(o,"smartRemoveByContext");continue}const r=n.global;if(void 0===r)continue;r.deleted=!0;const s=n.state?.oldest;s&&Tt(n,e)}}(t.contexts,e),t.htmlDomMeta&&Vt(t.htmlDomMeta)}function kt(t,e){const n=t.context;e.deleted=!0,n.renderCount=0;const o=[];return bt(n.contexts,t),t.templater.wrapper&&mt(t,e),Tt(n,o),delete n.state,delete n.contexts,delete n.returnValue,delete n.providers,o}function It(t,e,n,o,r,s){return null==t||s>r?e:typeof t===A.function?e.mem?(t.mem=e.mem,e):(t.mem=e,t):ht(e)?e:U(e)?function(t,e,n,o,r,s){for(let a=t.length-1;a>=0;--a){const c=t[a],u=e[a];t[a]=It(u,c,n,o,s,r+1)}return t}(e,t,n,o,s,r):function(t,e,n,o,r,s){const a=Object.keys(t);for(const c of a){const a=t[c],u=It(e[c],a,n,o,s,r+1);if(a===u)continue;const i=Object.getOwnPropertyDescriptor(t,c)?.set;i||(t[c]=u)}return t}(e,t,n,o,s,r)}function Et(t){const e=t.context,o=e.global,r=e.contexts;if(r){const{subs:t,tags:e}=vt(r);for(const t of e){if(!0===t.context.global.deleted)return;St(t.context)}o.subscriptions&&t.forEach(yt)}St(e),n(e)}function St(t){t.global.deleted=!0,Tt(t,[]),delete t.contexts}function At(t,e,n,o){const r=e.original,a=t.tagJsType===O.stateRender,c=ot.stateConfig;let u;if(s(n),a?u=t():(u=r(...o),typeof u===A.function&&void 0===u.tagJsType&&(u=u())),!u)throw new Error("A tag cannot return a value of type "+(null===u?"null":typeof u));const i=n.context;return i.returnValue=u,n.returnValue=u,t.tag=u,i.state.newer={...c},Wr(),n}function Ot(t){!function(t){const e=ot.stateConfig,n=t||e.context;n.state=n.state||{},n.state.newer={...e};const o=e.support;n.state.newest=o}(t),function(){const t=ot.stateConfig;delete t.prevSupport,delete t.support,delete t.state,delete t.states,Wr()}()}function Mt(t,e,n,o){let r;const s=t.templater;if(s.tagJsType===O.stateRender){const e=s;r=Xo(s,n,o,t.appSupport),At(s,e,r)}else{r=(0,s.wrapper)(t,n,e)}return function(t,e){++t.context.renderCount,Ot(t.context),ot.tagClosed$.next(e)}(r,o),r.ownerSupport=t.ownerSupport,r}function jt(t){const e=ot.stateConfig;return e.rearray=t,e.state=[],e.states=[],e.statesIndex=0,e.handlers.handler=K,e.handlers.statesHandler=_,e}function Lt(t,e,n,o){return function(t,e,n){jt(n),ot.stateConfig.prevSupport=e,s(t)}(t,e,n.state.older.state),Mt(t,e,n,o)}function Pt(t,e,n,o){F(t.context),s(t);const r=Mt(t,e,n,o);return Wr(),r}function Dt(t){const e=t?.context,n=e?.state;return n?.older?.state}function Ht(t,e){const n=Nt(t,e);return!(n||!e.templater.tag?._innerHTML||!Nt(t.outerHTML,e))||n}function Nt(t,e){const n=t.templater,o=e.templater,r=n?.tag||t,s=o.tag;if(n?.tagJsType===O.stateRender)return n.dom===o.dom;if(!s&&!r.returnValue)return!0;if(!r.returnValue)return!1;throw new Error(`unknown tagJsType of ${r.tagJsType}`)}function Ut(t,e,n){let o;o=Dt(e)?Lt(t,e,n):Pt(t,e,n);const r=!e||Ht(e,o);if(r){if(e){const t=e.templater.tag;if(t&&n.renderCount>0){const n=e?.templater,o=n?.tag;!function(t,e,n){if(t.tagJsType===O.dom){const o=n?.dom;return void(o!==t.dom&&Et(e))}if(n){const o=n.strings;if(o){const n=o?.length;n!==t.strings.length&&Et(e)}}}(t,e,o)}}}else{!function(t,e){const n=t.context,o=n.global;let r=-1;const s=n.providers=n.providers||[],a=s.length-1;for(;r++<a;){const t=s[r];let n=-1;const a=t.children.length-1;for(;n++<a;)if(o===t.children[n].context.global)return t.children.splice(n,1),void t.children.push(e)}}(e,o),Et(e);const t=o.context;t.state.oldest=o,t.state.newest=o}return o.ownerSupport=t.ownerSupport,{support:o,wasLikeTags:r}}function $t(t){++t.updateCount;const e=t.global,n=t.state.newest;delete t.inputsHandler,delete t.updatesHandler,kt(n,e),function(t){t.htmlDomMeta=[],delete t.contexts,delete t.state,delete t.global,t.renderCount=0}(t)}function Wt(t,e){const n=e.state?.newest;if(j(t)){return Ht(t,n)?0:7}const o=t?.tagJsType;if(o){const n=e.value;if(!n&&t)return 88;const o=n.wrapper,r=t.wrapper;return r?.original===o?.original?0:88}return 8}function Rt(t,e){const o=e.global,r=e.state?.newest;if(j(t)){return Ht(t,r)?(Yo(e,t,r),0):(kt(r,o),n(e),7)}const s=t?.tagJsType;if(s){return!0===Yo(e,t,e.state.newest.ownerSupport)?0:88}return $t(e),8}function Bt(t){switch(t){case void 0:case!1:case null:return E}return t}function _t(t,e){if(t.startsWith("class."))return"class";if(t.startsWith("style."))return"style";const n=function(t){switch(t){case"autoselect":case"autoSelect":return"autoselect";case"autofocus":case"autoFocus":return"autofocus"}return!1}(t);return!1!==n?n:"value"===t&&"SELECT"===e&&"value"}function Ft(t,e,n){if(N(n))return zt(t,e,n);i.push([Kt,[t,e,n]])}function zt(t,e,n){"object"!=typeof t[e]&&(t[e]={});for(const o in n){const r=n[o];i.push([Yt,[t,e,o,r]])}if(t[e].setProperty)for(const o in n){const r=n[o];i.push([Xt,[t,e,o,r]])}}function Gt(t,e,n){t.setAttribute(e,"")}function Kt(t,e,n){if(N(n))return zt(t,e,n);qt(t,e,n)}function Zt(t,e,n){t[e]=!!n}function qt(t,e,n){t[e]=n,void 0!==n&&!1!==n&&null!==n?t.setAttribute(e,n):t.removeAttribute(e)}function Xt(t,e,n,o){t[e].setProperty(n,o)}function Yt(t,e,n,o){t[e][n]=o}function Qt(t,e,n,o){switch(o){case"autofocus":return void p.push([re,[n]]);case"autoselect":return void p.push([oe,[n]]);case"style":{const o=t.split(".");return void i.push([te,[n,o,e]])}case"class":return void function(t,e,n){const o=t.split(".");if(o.shift(),e){for(const t of o)i.push([ee,[n,t]]);return}for(const t of o)i.push([ne,[n,t]])}(t,e,n);case"value":return Kt(n,t,e),void p.push([t=>{t.value=e},[n]])}throw new Error(`Invalid special attribute of ${o}. ${t}`)}function te(t,e,n){const o=e[1];t.style[o]=n,t.style.setProperty(o,n)}function ee(t,e){t.classList.add(e)}function ne(t,e){t.classList.remove(e)}function oe(t){t.select()}function re(t){t.focus()}function se(t,e,n,o,r,s,a){return n.target=o,n.howToSet=r,n.attrName=t,n.isSpecial=a,e?.tagJsType?function(t,e,n,o,r){e.processInitAttribute(t,e,r,e,n,o,Kt),n.tagJsVar=e}(t,e,n,s,o):ae(t,e,o,r,a,n)}function ae(t,e,n,o,r,s){return"function"==typeof e?function(t,e,n,o,r){const s=t(),c={component:!1,tagJsType:"dynamic-attr",matchesInjection:t=>{const e=u.tagJsVar;if(e.matchesInjection)return e.matchesInjection(t,u)},hasValueChanged:(e,n,o)=>{const r=t();return u.tagJsVar.hasValueChanged(r,u,o)},processInit:a,processInitAttribute:a,destroy:(t,e)=>{u.tagJsVar.destroy(u,e)},processUpdate:(t,e,n,o)=>{++e.updateCount;const r=t();u.tagJsVar.processUpdate(r,u,n,o),u.value=r}},u={description:"sub-context",updateCount:0,isAttr:!0,target:o,parentContext:e,value:s,tagJsVar:ke(s),valueIndex:-1,withinOwnerElement:!0,destroy$:new Q,render$:new Q},i={description:"override-context",updateCount:0,isAttr:!0,contexts:[u],target:o,parentContext:e,value:t,tagJsVar:c,valueIndex:-1,withinOwnerElement:!0,destroy$:new Q,render$:new Q};return u.tagJsVar.processInitAttribute(n,s,o,u.tagJsVar,u,{},r),i}(e,s,t,n,o):r?Qt(t,e,n,r):void o(n,t,e)}function ce(t,e,n,o,r,s){const a=e.tagJsVar,c=t;if(a.hasValueChanged(c,e,n)>0){a.destroy(e,n),o.removeAttribute(r);const c=ke(t);return c.isAttr=!0,c.processInitAttribute(r,t,o,c,e,n,s),void(e.tagJsVar=c)}}function ue(t,e,n,o,r,s,a){o.destroy=ie,o.hasValueChanged=ge,o.processUpdate=(e,o,r)=>ce(e,o,r,n,t,a);const c=_t(t,n.tagName);ae(t,e,n,a,c,r),r.tagJsVar=o}function ie(t){const e=t.target,n=t.attrName;e.removeAttribute(n)}function le(t){return{component:!1,tagJsType:"simple",value:t,processInitAttribute:ue,processInit:fe,destroy:de,hasValueChanged:he,processUpdate:pe}}function pe(t,e,n){return t===e.value?0:tr(e,t,n)}function fe(t,e,n,o,r){const s=Bt(t);o=e.placeholder;const a=e.paint=[T,[o,s,function(t){e.simpleValueElm=t,delete e.paint},"processSimpleValueInit"]];c.push(a)}function de(t){const e=t.simpleValueElm;if(!e){if(t.paint)return void(t.paint[0]=a);if(void 0===t.value||!1===t.value||null===t.value)return}delete t.simpleValueElm,y(e,"deleteSimpleValue")}function ge(t,e){return null==t||t===e.value?0:6}function he(t,e){return null!=t&&[A.object,A.function].includes(typeof t)?(de(e),6):(function(t,e){const n=Bt(t);if(e.paint)return void(e.paint[1][1]=n);const o=e.simpleValueElm;i.push([h,[n,o]])}(t,e),0)}function me(t,e){return U(t)?0:(wt(e),9)}function be(t,e,n){const o=e.tagJsVar.tagJsType;return o&&["tag-conversion","element"].includes(o)?(e.tagJsVar.processUpdate(t,e,n,[]),e.value=t,0):t===e.value?0:(++e.updateCount,tr(e,t,n))}function ve(t,e,n,o,r){const s=e.context;if(s.locked=3,n.target=n.target||o,$r(n),n.inputsHandler){const t=e.propsConfig;n.inputsHandler(t)}n.tagJsVar.processInit(t,n,e,r,o),Wr(),n.value=t,delete s.locked}function ye(t,e,n,o,r){const s=document.createTextNode(E),a=Ie(t,n,!0,e.context);return a.withinOwnerElement=!1,a.placeholder=s,r||(a.placeholder=o),ve(t,e,a,r,o),r&&l.push([C,[r,s]]),a}function xe(t,e,n,o){const r=void 0===t.lastArray;r&&(t.lastArray=[]);const s=t.lastArray;let a=t.placeholder;const c=e.length,u=new Array(c),i=new Array(c),l=function(t){if(i[t])return u[t];const n=function(t){if("function"!=typeof t)return t;const e=t;if(void 0!==e.tagJsType)return t;return e()}(e[t]);return u[t]=n,i[t]=!0,n};let p=!r&&c!==s.length;if(!r){const n=function(t,e,n,o,r){const s=[];let a=0;for(let n=0;n<t.length;++n){const c=t[n];if(1===c.locked&&(o=!0),null===c.value){s.push(c);continue}const u=Ce(e,n,t,a,r);0!==u?2!==u?a+=u:n-=1:s.push(c)}return n.lastArray=s,{removed:a,batchUpdates:o}}(s,e,t,p,l);p=n.batchUpdates}for(let e=0;e<c;++e){a=we(e,t.lastArray,n,p,l,a,o).placeholder}}function we(t,e,n,o,r,s,a){const c=r(t),u=e[t];if(u)return function(t,e,n,o,r,s,a,c){if(s)return d.push([function(){be(t,e,o)},[]]),e.value=t,e;const u=n.length>r;if(u)return Array.isArray(t)?(e.tagJsVar.processUpdate(t,e,o,[]),e.value=t,e):(be(t,e,o),e);const i=ye(t,o,n,a,c);return n.push(i),i}(c,u,e,n,t,o,s,a);const i=ye(c,n,e,s,a);return e.push(i),c&&(i.arrayValue=c.arrayValue||i.arrayValue),i}function Ce(t,e,n,o,r){const s=t.length-1,a=e-o,c=a<0||s<a,u=n[e];if(c)return xt(u),1;void 0===u.arrayValue&&(u.arrayValue=e);const i=function(t,e,n,o,r){const s=e.arrayValue;let a=t!==(s||r);!1===a&&void 0===s&&n.tagJsVar.hasValueChanged(e,n,void 0)&&(a=!0);return a?(xt(n),o.splice(r,1),2):0}(u.arrayValue,r(e),u,n,e);return i}function Ve(t){return{component:!1,tagJsType:"array",value:t,processInitAttribute:a,processInit:Te,processUpdate:Je,hasValueChanged:me,destroy:wt}}function Je(t,e,n){if(++e.updateCount,Array.isArray(t))return void xe(e,t,n);0===be(t,e,n)&&xe(e,t,n)}function Te(t,e,n,o,r){xe(e,t,n,r)}function ke(t){const e=t?.tagJsType;return e?t:function(t){if(U(t))return Ve(t);return le(t)}(t)}function Ie(t,e,n,o,r){return{description:"getNewContext",updateCount:0,value:t,destroy$:new Q,render$:new Q,tagJsVar:r||ke(t),withinOwnerElement:n,parentContext:o,valueIndex:o.varCounter}}function Ee(t,e,n,o,r,s,a){const u=document.createTextNode(E),i=function(t,e,n,o){const r=Ie(t,0,n,o);return e.push(r),++o.varCounter,r}(t,e,r>0,o);return i.placeholder=u,i.target=s,s?l.push([C,[s,u]]):c.push([w,[a,u,"attachDynamicDom.attachDynamicDom"]]),ve(t,n,i,s,a),i}function Se(t,e){const n=function(t,e,n=[]){const o=t.context;n.push({support:t,renderCount:o.renderCount,provider:e});const r=e.children;for(let t=r.length-1;t>=0;--t){const o=r[t],s=o.context;n.push({support:o,renderCount:s.renderCount,provider:e})}return n}(t,e);return n}function Ae(t){return t.support}function Oe(t,e){const n=e.context.global;if(n&&n.deleted)return!1;const o=function(t,e){const n=t.props,o=e.propsConfig,r=o.latest;if(Me(n,r))return!0;switch(t.propWatch){case Uo.IMMUTABLE:return Bo(n,r);case Uo.SHALLOW:return ft(n,r)}return!ut(n,r,Fo)}(t,e);return!!o}function Me(t,e){return t.length!==e.length}function je(t,e=[]){const n=t.context,o=function(t){return O.templater===t.tagJsType}(t.templater),r=t.ownerSupport;if(n.locked)return e.push(t),e;if(o)return je(r,e);const s=t.context.global;if(s&&!0===s.deleted)return e;const a=t,c=L(a.templater),u=t.templater.tagJsType,i=r&&u!==O.stateRender&&(!c||Oe(a.templater,a));if(a.context.providers){const t=function(t){const e=t.context.providers;if(!e)return[];const n=[];for(const t of e){const e=Se(t.owner,t);n.push(...e.map(Ae))}return n}(a);e.push(...t)}return i?(je(r,e),c&&e.push(a),e):(e.push(a),e)}function Le(t){++g.locks,t.forEach(Pe),--g.locks,m()}function Pe(t){const e=t.context;e.tagJsVar.processUpdate(e.value,e,t.ownerSupport,[])}function De(t,e,{resolvePromise:n,resolveValue:o}){return D(t)?t.then(function(t,e){return n=>{const o=t.context,r=o.global;if(!0===o.deleted||!0===r?.deleted)return e(n);return Le(je(t)),e(n)}}(e,n)):o(t)}function He(t,e){const n=e.context.global,o=function(t,e){if(!0!==n.deleted)return function(t,e,n,o){const r=W(e),s=r.context;s.locked=1;const a=t.apply(n,o);delete s.locked;return Ne(a,r)}(o.tagFunction,o.support,t,e)};return o.tagFunction=t,o.support=e,o}function Ne(t,e){const n=e.context.global;if(n?.deleted)return;return Le(je(e)),De(t,e,{resolvePromise:We,resolveValue:Re})}const Ue="no-data-ever",$e="promise-no-data-ever";function We(){return $e}function Re(){return Ue}function Be(t,e,n){const o=n[e];if(o){let e=!1;if(t.originalStopPropagation=t.stopPropagation,t.stopPropagation=function(){e=!0,t.originalStopPropagation.call(t),t.stopPropagation=t.originalStopPropagation,delete t.originalStopPropagation},o(t),t.defaultPrevented||e)return}const r=n.parentNode;r&&Be(t,e,r)}function _e(t,e,n,o){const r=t.appElement,s=function(t){"blur"===t&&(t="focusout");return"_"+t}(e);"blur"===e&&(e="focusout");const a=t.context.events;if(!a[e]){const t=function(t){Be(t,s,t.target)};a[e]=t,r.addEventListener(e,t)}n[s]=o,n[e]=o}function Fe(t,e,n,o){const r=function(...e){return r.tagFunction(t,e)};r.tagFunction=e,r.support=n,_e(n.appSupport,o,t,r)}function ze(t){return null==t||!1===t}function Ge(t,e,n,o,r,s,a,c,u){const i=Ie(t,0,!0,n);return i.description="tagJsVar-attr",i.target=c,i.valueIndex=r,i.isAttr=!0,i.isNameOnly=u,i.stateOwner=W(s),i.supportOwner=s,$r(i),o.processInitAttribute(a,t,c,o,i,s,Kt),Wr(),i.oldTagJsVar=i.tagJsVar,i.tagJsVar=o,i}function Ke(t,e,n,o,r,s,a,c){if(ze(e))return;const u=typeof e;if(u===A.object){for(const r in e)Ze(r,n,e,t,o,s,a,s);return s}if("function"===u){const r=function(t){const e={tagJsType:"relay",component:!1,hasValueChanged:(t,e,n)=>e.subContext.tagJsVar.hasValueChanged(t,e.subContext,n),processInitAttribute:(t,e,n,o,r,s,a)=>r.subContext.tagJsVar.processInitAttribute(t,e,n,o,r.subContext,s,a),destroy:(t,e)=>t.subContext.tagJsVar.destroy(t.subContext,e),processUpdate:(t,e,n,o)=>{const r=t(e.subContext);return e.subContext.tagJsVar.processUpdate(r,e.subContext,n,o)},processInit:(t,e,n,o,r)=>e.subContext.tagJsVar.processInit(t,e.subContext,n,o,r),matchesInjection:e=>t.subContext.tagJsVar.matchesInjection(e,t.subContext)};return e}(c);c.tagJsVar=r,$r(c);const u=ke(e(c));if(Wr(),u?.tagJsType){c.state={newer:{state:[],states:[]}};const t=Ge(u,0,a,u,-1,o,"attr",n,!0);return t.tagJsVar=u,c.subContext=t,s}return Ze("attr",n,e,t||[],o,s,a,s),s}0!==e.length&&r(n,e,E)}function Ze(t,e,n,o,r,s,a,c){const u=_t(t,e.tagName),i=rn(t,n[t],o,e,r,Kt,s,a,u);void 0!==i&&(Array.isArray(i)?c.push(...i):c.push(i))}function qe(t,e){t.removeAttribute(e)}function Xe(t,e,n,o){const r=e,s=t;if(s?.tagJsType){const o=e.value;return o?.tagJsType?void o.hasValueChanged(s,e,n):(s.isAttr=!0,$r(e),s.processInitAttribute(r.attrName,t,r.target,s,r,n,Kt),Wr(),void(r.tagJsVar=s))}if(r.isNameOnly)return function(t,e,n,o,r,s,a,c,u){if(n){if(ze(e)||""===e)return void o.removeAttribute(n);if(typeof n===A.object)if(typeof e===A.object)for(const t in n)t in e||i.push([qe,[o,t]]);else for(const t in n)i.push([qe,[o,t]])}const l=Ke(t,e,o,r,s,a,c,u);l&&a.push(...l)}(o,t,r.value,r.target,n,r.howToSet,[],r.parentContext,r),void(r.value=t);const a=r.target;!function(t,e,n,o,r,s,a){if(H(t))return function(t,e,n,o,r,s,a){const c=t.templater.wrapper;if((c?.tagJsType||c?.original?.tagJsType)!==O.renderOnce)return an(e,t,o,n);return sn(e,n,o,r,s,t)}(r,t,o,e,a,s);sn(t,o,e,a,s,r)}(t,r.attrName,0,a,n,r.howToSet,r.isSpecial),e.value=t}const Ye=":tagvar",Qe=":",tn=new RegExp(Ye+"(\\d+)"+Qe,"g");function en(t){return t.search&&t.startsWith(Ye)?t.search(tn):-1}function nn(t,e,n,o,r,s,a){const c=o.length,u=[];function i(o){const s=function(t,e,n){return t.reduce(((t,o)=>{if(en(o)>=0){const o=n++,r=e[o];return t.push(r),t}return t.push(o),t}),[])}(e,o,c).join("");r(n,t,s)}return e.forEach((e=>{if(en(e)>=0){const r=o.length,c=ke(e),l={description:"attribute-array-item",updateCount:0,isAttr:!0,target:n,attrName:t,withinOwnerElement:!0,tagJsVar:c,valueIndex:a.varCounter,parentContext:a,destroy$:new Q,render$:new Q};c.processUpdate=function(t,e,n,o){++e.updateCount,i(o)};const p=s[r];l.value=p,u.push(l),++a.varCounter}})),i(s),u}function on(t){return N(t)&&"TagJsTag"in t?t.tagJsVar:-1}function rn(t,e,n,o,r,s,a,c,u){const i=on(t);let l=i>=0||void 0===e&&"string"!=typeof t,p=n[i];e?.tagJsType?p=e:(t?.tagJsType||"function"==typeof t)&&(l=!0,p=t,e=t);const f=p;if(f?.tagJsType)return Ge(e,0,c,f,i,r,t,o,l);if(l){-1===i&&l&&(p=t);const e=Ie(p,0,!0,c);return e.description="processAttribute",e.valueIndex=i,e.isAttr=!0,e.target=o,e.isNameOnly=!0,e.howToSet=s,Ke(n,p,o,r,s,a,c,e),e}if(Array.isArray(e))return nn(t,e,o,[],s,n,r.context);const d=on(e);if(d>=0){return function(t,e,n,o,r,s,a,c,u){if(typeof e===A.function)return++r.varCounter,an(e,a,t,n);const i=ke(e),l={description:"dynamic-attribute",updateCount:0,isAttr:!0,target:n,attrName:t,howToSet:s,value:e,withinOwnerElement:!0,tagJsVar:i,destroy$:new Q,render$:new Q,valueIndex:u,parentContext:r};return o.push(l),i.processUpdate=Xe,se(t,e,l,n,s,a,c),l.value=e,l}(t,n[d],o,[],c,s,r,u,d)}return ae(t,e,o,s,u,c)}function sn(t,e,n,o,r,s){if(!1===o){switch(t){case void 0:case!1:case null:return void i.push([cn,[e,n]])}if(H(t))return Fe(e,t,s,n);r(e,n,t)}else Qt(n,t,e,o)}function an(t,e,n,o){return Fe(o,t=He(t,e),e,n)}function cn(t,e){t.removeAttribute(e)}function un(t,e,n,o,r){for(const s of t){const t=s[0],a=s[1],c=s[2]||!1;let u=s.length>1?Kt:Gt;s[3]&&(u=s[3]);const i=r.contexts,l=rn(t,a,e,n,o,u,i,r,c)||void 0;"object"==typeof l&&(i.push(l),++r.varCounter)}}function ln(t,e,n,o,r,s,a){e.at&&un(e.at,n,t,o,r),s?l.push([C,[s,t,"appendToAttachDomElement"]]):c.push([w,[a,t,"insertBeforeAttachDomElement"]])}function pn(t,e,n,o,r,s,a){const c=n.context,u=c.contexts;o=c;const i=[];s&&void 0===a&&(a=document.createTextNode(E),l.push([C,[s,a]]),s=void 0);for(let c=0;c<t.length;++c){const l=t[c],p=l.v;if(!isNaN(p)){const t=Number(p),c=e[t];if(H(c)&&void 0===c.tagJsType){++o.varCounter;continue}Ee(c,u,n,o,r,s,a).valueIndex=t;continue}const f={};if(i.push(f),"text"===l.nn){fn(f,l,s,a);continue}const d=f.domElement=document.createElement(l.nn),g={updateCount:0,isAttrs:!0,target:d,parentContext:o,contexts:[],destroy$:new Q,render$:new Q,tagJsVar:{tagJsType:"new-parent-context"},valueIndex:-1,withinOwnerElement:!0,varCounter:0};ln(d,l,e,n,g,s,a),g.target=d,l.ch&&(f.ch=pn(l.ch,e,n,g,r+1,d,a).dom)}return{dom:i,contexts:u}}function fn(t,e,n,o){const r=t,s=r.tc=e.tc;n?l.push([I,[n,s,function(t){r.domElement=t}]]):c.push([k,[o,s,function(t){r.domElement=t}]])}const dn=/(:tagvar\d+:)/,gn="ondoubleclick",hn=/([:_a-zA-Z0-9\-.]+)\s*(?:=\s*"([^"]*)"|=\s*(\S+))?/g,mn=/<\/?([a-zA-Z0-9-]+)((?:\s+[a-zA-Z_:*][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)+\s*|\s*)\/?>/g;function bn(t){const e=[],n=[],o=[];let r=null,s=-1,a=0;const c=new RegExp(mn,"g");for(t=function(t){return t.replace(vn,(function(t){return t.replace(/\[l t\]/g,"[l t]").replace(/\[g t\]/g,"[g t]").replace(/</g,"[l t]").replace(/>/g,"[g t]")}))}(t);a<t.length;){const u=c.exec(t);if(!u)break;const[i,l,p]=u,f=i.startsWith("</"),d=i.endsWith("/>");if(a<u.index){const e=t.slice(a,u.index);if(e.trim()){const t=wn(e);for(let e of t)e.startsWith(Ye)&&e.search(dn)>=0&&-1===e.search(In)&&(e=Ye+ ++s+Qe),yn(r,n,e)}}if(a=u.index+i.length,f){r=o.pop()||null;continue}const g=[];let h;for(;null!==(h=hn.exec(p));)s=Vn(h,s,e,g);const m={nn:l};g.length&&(m.at=g),r?(r.ch||(r.ch=[]),r.ch.push(m)):n.push(m),d||(o.push(r),r=m)}if(a<t.length){const e=t.slice(a);if(e.trim()){const t=wn(e);for(const e of t)e.startsWith(Ye)&&++s,yn(r,n,e)}}return n}const vn=new RegExp("(\x3c!--[\\s\\S]*?--\x3e)","g");function yn(t,e,n){!function(t,e,n){t?(t.ch||(t.ch=[]),t.ch.push(n)):e.push(n)}(t,e,{nn:"text",tc:xn(n)})}function xn(t){return t.replace(/(\[l t\]!--[\s\S]*?--\[g t\])/g,(function(t){return t.replace(/\[l t\]/g,"<").replace(/\[g t\]/g,">").replace(/\[l t\]/g,"[l t]").replace(/\[g t\]/g,"[g t]")}))}function wn(t){return t.split(dn).filter(Cn)}function Cn(t){return""!==t}function Vn(t,e,n,o){const r=t[1]||t[3]||t[5];let s=t[2]||t[4]||t[6];if(void 0===r)return e;const a=""!==t[2],c=void 0===s&&a,u=r.toLowerCase(),i=u.startsWith("on")?function(t){if(t.startsWith("on"))return t.length===gn.length&&t===gn?"dblclick":t.slice(2,t.length);return t}(u):u;if(c){if(r.slice(0,Ye.length)===Ye){const t=Ye+ ++e+Qe;return n.push(["at",t]),o.push([t]),e}if(t[0].startsWith(r)&&t[0].slice(r.length,t[0].length).search(/\s+$/)>=0)return o.push([i]),e;const a=t[3];if(a.search(In)>=0){s=a;const t=[i,s];return o.push(t),e}s=Ye+ ++e+Qe}a||(s=t[2]);const l=s.split(Tn).filter((t=>t.length>0));l.length>1&&(s=l,l.forEach((t=>{t.search(tn)>=0&&++e})));const p=[i,s];console.debug("EVER GET HERE??????");const f=_t(u,"DIV");return f&&p.push(f),"style"===i?(o.unshift(p),e):(o.push(p),e)}const Jn=new RegExp(Ye+"(\\d+)"+Qe,"gi"),Tn=new RegExp("("+Ye+"\\d+"+Qe+")","gi"),kn=Ye.slice(0,Ye.length-1),In=new RegExp(kn+"r(\\d+)"+Qe,"gi"),En=kn+"r$1"+Qe;function Sn(t,e){const n=function(t,e){const n=t;return function(t,e){const n=[];for(let o=0;o<t.length;++o){const r=t[o].replace(Jn,En);o<e.length?n.push(r+Ye+o+Qe):n.push(r)}return function(t,e,n){const o=n.length-e.length;if(o>0)for(let n=o;n>0;--n)t.push(Ye+(e.length+n-1)+Qe)}(n,t,e),n}(n,e)}(t,e).join("");return bn(n)}const An="ch";function On(t,e,n=[],o=[]){const r=t;for(let t=0;t<r.length;t++){const s=[...o,t],a=r[t];if(a.at){const t=a.at;a.at=jn(t,e)}if(a.ch){const t=a.ch,o=[...s,An];a.ch=On(t,e,n,o)}t=Mn(a,e,r,t)}return r}function Mn(t,e,n,o){if("text"!==t.nn)return o;const r=t;let s,a=r.tc;if(typeof a!==S.string)return o;for(;null!==(s=tn.exec(a));){const t=s[1],r=parseInt(t,10);if(!isNaN(r)&&r<e){const t=Ye+r+Qe,e=a.slice(s.index+t.length);n.splice(o,1,{nn:"text",v:r}),a=e,tn.lastIndex=0}}return r.tc=a,o}function jn(t,e){const n=[];for(const o of t){const[t,r,s]=o;if(t.startsWith(Ye)){const o=parseInt(t.replace(Ye,""),10);if(!isNaN(o)&&o<e){n.push([{tagJsVar:o}]);continue}}if(typeof r===S.string&&r.startsWith(Ye)){const o=parseInt(r.replace(Ye,""),10);if(!isNaN(o)&&o<e){n.push([t,{tagJsVar:o},s]);continue}}n.push(o)}return n}function Ln(t){return t.length}const Pn={};function Dn(t,e){const n=function(t){const e=t.map(Ln);return e.push(t.length),Number(e.join(""))}(t),o=Pn[n],r=o&&function(t,e,n){if(n&&n.strings.length===t.length&&n.strings.every(((e,n)=>e===t[n]))&&n.values.length===e.length)return!0;return!1}(t,e,o);if(r)return o.domMetaMap;const s=On(Sn(t,e),e.length),a={interpolation:void 0,string:void 0,strings:t,values:e,domMetaMap:s};return Pn[n]=a,s}function Hn(t,e,n){const o=t.context;o.state=o.state||{};const r=o.state;r.oldest=t,r.newest=t,o.state.older=o.state.newer,++g.locks;const s=function(t,e,n,o){const r=function(t){const e=t.templater,n=e.tag;if(n.tagJsType===O.dom)return n.dom;const o=n.strings;return Dn(o,n.values)}(t),s=t.templater.tag,a=s.values,c=[],u=t.context;e=u,u.contexts=c;const i=pn(r,a,t,e,0,n,o);return i}(t,t.context,e,n);return o.htmlDomMeta=s.dom,--g.locks,s}function Nn(t,e,n,o,r){const s=Wn(t,n,e);s.ownerSupport=n;const a=Hn(s,o,o?void 0:r);for(const t of a.dom)t.marker&&(o?l.push([C,[o,t.marker]]):c.push([w,[r,t.marker,"subMarker"]])),t.domElement&&(o?l.push([C,[o,t.domElement,"subAppendTo"]]):c.push([w,[r,t.domElement,"subInsertBefore"]]));return s}function Un(t,e,n,o,r){return e.state={},r?Nn(t,e,n,r,o):$n(n,e)}function $n(t,e){const n=e.state.newest,o=e.placeholder;return n.ownerSupport=t,e.value.tag?(Hn(n,void 0,o),n):n}function Wn(t,e,n){const o=qo(t,e,e.appSupport,n);return n.contexts=n.contexts||[],o}function Rn(t){return function(t,e,n){const o=Ut(e,t,n);if(o.wasLikeTags)return st(n.state.oldest,o.support),o.support;return $n(e,n)}(t,t,t.context)}function Bn(t){if(!t)return a;const e=Hr();if(!e)throw new Error("output must be used in render sync with a parent context");const n=$(e);if(!n)throw new Error("output must be used in render sync fashion");if(!0===t.wrapped)return t;const o=(...e)=>{const o=n.ownerSupport;return _n(e,t,o.context)};return o.wrapped=!0,o}function _n(t,e,n){const o=void 0;$r(n);const r=e(...t);return Wr(),p.push([()=>{const t=n.global;if(void 0===t||!0===t.deleted){++g.locks;const t=n;return t.tagJsVar.processUpdate(t.value,t,o,[]),--g.locks,void m()}++g.locks,Rn(o),--g.locks,m()},[]]),r}function Fn(t,e){++t.updateCount;const n=zn(t.subContext,e);return delete t.subContext,n}function zn(t,e){t.deleted=!0;const n=t.appendMarker;if(n&&(y(n,"deleteSubContext"),delete t.appendMarker),!t.hasEmitted)return;const o=t.contextItem;return o.tagJsVar.destroy(o,e),76}function Gn(t,e,n,o){const r=e.tagJsType;if(!e||!r||r!==t){return o.tagJsVar.destroy(o,n),Qo(e,o,n,99),99}}function Kn(t,e,n){const o=e.subContext,r=Gn(O.subscribe,t,n,e);return r||(o&&o.hasEmitted?(o.tagJsVar=t,o.valuesHandler(o.lastValues,0),0):0)}function Zn(t,e,n,o){return e.hasEmitted=!0,e.contextItem=ye(t,n,[],o)}function qn(t,e,n){++e.updateCount;const o=t.owner._innerHTML;o.processInit=o.oldProcessInit;const r=e.subContext?.contextItem;tr(r,o,n)}function Xn(t,e,n,o,r){e.subContext={},t.processUpdate=qn,function(t,e,n,o,r){const{appendMarker:s,insertBefore:a}=er(r,o),c=n.subContext;c.appendMarker=s;const u=t.owner,i=u._innerHTML;i.processInit=i.oldProcessInit,Zn(i,c,e,a)}(t,n,e,o,r)}function Yn(){return{component:!1,tagJsType:"innerHTML",hasValueChanged:()=>0,processInitAttribute:a,processInit:Xn,processUpdate:qn,destroy:Fn}}function Qn(t,e){const n={component:!1,tagJsType:O.templater,processInit:Un,processInitAttribute:a,processUpdate:be,hasValueChanged:Rt,destroy:$t,propWatch:t,props:e,key:function(t){return n.arrayValue=t,n},matchesInjection:(t,e)=>n.wrapper===t||n.wrapper?.original===t?.original?e:void 0};return n}const to=[];function eo(t,e,n){const o=t.propWatch===Uo.DEEP?Fo:_o,r=t.props,s=e.propsConfig;let a=s.castProps;const c=n?.propsConfig,u=c?.castProps;u&&(s.castProps=u,a=function(t,e,n,o,r,s=-1){const a=e.context;if(!a.global||!a.state.newest){const e=gt(o);return o.push(...e),t.propsConfig.castProps=e,o}const c=(e=a.state.newest||e).propsConfig.castProps,u=[];for(let e=0;e<o.length;++e){const a=o[e],i=It(c[e],a,t,n,r,s+1);u.push(i)}return t.propsConfig.castProps=u,u}(e,n,n.ownerSupport,r,o));return a||gt(r)}function no(t,e,n){const o=Qn(Uo.DEEP);o.tagJsType=t.tagJsType;const r=Wn(o,n,e);function s(){return o.tag=t(),r}return o.wrapper=s,s.tagJsType=t.tagJsType,s.original=t.original||t,r}function oo(t,e,o,r,s){n(e);const a=no(t,e,o);return Pt(a,void 0,e),Nn(a.templater,e,o,s,r)}function ro(t,e,n,o,r){const s=or(t,e,n,o,r);return s.hasEmitted||so(t,s),s}function so(t,e){const n=t.Observables[0];if(!e.hasEmitted)return"withDefault"in t?void e.subValueHandler(t.withDefault,0):"value"in n?void e.subValueHandler(n.value,0):void 0;const o=e.lastValues[0].value;e.subValueHandler(o,0)}function ao(t,e,n,o,r,s){e.destroy=sr;const a=_t(t,n.tagName),c=function(e,o){ae(t,e,n,Kt,a,r),cr(o)},u=rr(e.Observables,s,c,e,r);return r.subContext=u,r.value=e,r.tagJsVar=e,e.processUpdate=function(e,o,s){return ce(e,r,s,n,t,Kt)},{subContext:u,onOutput:c}}function co(t,e,n,o,r,s){const{subContext:a}=ao(t,e,n,0,r,s);a.hasEmitted||function(t,e){const n=e.tagJsVar,o=n.onOutput,r=t.Observables;let s=r[0]?.value||t.withDefault;t.callback&&(s=t.callback(s));o(s,!0,e)}(e,a)}function uo(t,e,n){return{component:!1,onOutput:a,tagJsType:O.subscribe,processInitAttribute:co,processInit:ro,hasValueChanged:io,processUpdate:a,destroy:ar,callback:n,withDefault:e,Observables:[t]}}function io(t,e){if(!t?.tagJsType)return 1;const n=t.Observables;if(!n)return 2;const o=e.value.Observables;if(!o||o.length!==n.length)return 3;return n.every(((t,e)=>t===o[e]))?0:4}function lo(t,e){return{component:!1,onOutput:a,tagJsType:O.subscribe,processInitAttribute:ao,processInit:or,hasValueChanged:io,processUpdate:Kn,destroy:ar,callback:e,Observables:[t]}}function po(t,e){return{component:!1,onOutput:a,tagJsType:O.subscribe,processInitAttribute:a,hasValueChanged:io,processInit:fo,processUpdate:a,destroy:ar,callback:e,Observables:t}}function fo(t,e,n,o,r){return or({tagJsType:O.subscribe,states:[],Observables:t},e,n,void 0,r)}function go(t,e={}){const n={tagJsType:O.host,processInitAttribute:mo,hasValueChanged:()=>0,processInit:bo,processUpdate:ho,destroy:vo,options:{callback:t,...e},matchesInjection(e,n){const o=e?.options;if(!o)return;const r=o?.callback;return r===t?n:void 0}},o=(...n)=>({...o,options:{arguments:n,...e,callback:t}});return Object.assign(o,n),o}function ho(t,e,n){const o=Gn(O.host,t,n,e);if(o)return o;const r=e.tagJsVar.options,s=t;var a;$r(a=e),jt(a.state.newer.state);const c=s.options.arguments||r.arguments||[];e.returnValue=s.options.callback(...c),Ot(e)}function mo(t,e,n,o,r){return bo(o,r)}function bo(t,e){const n=e.target,o=e.state={};F(e),function(t,e,n,o){const r=e.options.arguments||[],s=e.options.callback(...r);n.returnValue=s;const a=e.options;a.onInit&&a.onInit(t,e,n,o)}(n,t,e,o),Ot(e)}function vo(t){++t.updateCount;const e=t,n=e.tagJsVar,o=n.options;if(e.destroy$.subscribers.length&&($r(t),_n([],e.destroy$.next.bind(e.destroy$),t),Wr()),o.onDestroy){const r=e.target;return _n([],(function(){$r(t);const s=o.onDestroy(r,n,e,e.state);return Wr(),s}),t.stateOwner.context)}}function yo(t,e,n,o){const r={component:!1,tagJsType:"tag-conversion",processInitAttribute:a,processInit:(r,s,a)=>{const c=t.returnValue;return e.tagJsVar.processInit(c,e,n,o.placeholder)},processUpdate:(t,o,s)=>{if(o.locked||o.deleted)return;++o.updateCount;const a=o.value,c=a?.tagJsType,u=t?.tagJsType,i=u!==c;if(Wt(t,o)||i||r.hasValueChanged(t,o,n))return r.destroy(o,n),void Qo(t,o,s,789);o.locked=467,o.render$.next();const l=o.returnValue;!function(t,e,n,o,r){const s=gt(e.props),a=t.value;a.props=s;const c=r.propsConfig;c&&(c.castProps=s);if("tagComponent"===e?.tagJsType){if(t.inputsHandler=n.inputsHandler,t.updatesHandler=n.updatesHandler,n.value=e,n.inputsHandler){$r(n);(0,n.inputsHandler)(s),Wr()}if(n.updatesHandler){$r(n);(0,n.updatesHandler)(s),Wr()}}t.tagJsVar.processUpdate(o,t,r,[]),t.value=o}(e,t,o,l,n),delete o.locked},hasValueChanged:(n,o,r)=>{const s=t.returnValue;return e.tagJsVar.hasValueChanged(s,e,r)},destroy:(o,r)=>{++t.updateCount,t.deleted=!0,delete t.returnValue;const s=e.tagJsVar.destroy(e,n);return D(s)?s.then((()=>{const e=Vo(t,r);return m(),e})):(t.destroy$.next(),Vo(t,r))}};return r}function xo(t,e,n){const o=t.context,r=t.returnValue,s=ke(r);delete o.global,o.contexts=[];const a={updateCount:0,value:r,tagJsVar:s,destroy$:new Q,render$:new Q,placeholder:o.placeholder,valueIndex:-1,withinOwnerElement:!0,parentContext:o,contexts:o.contexts},c=yo(o,a,t,n);return o.subContext=a,o.tagJsVar=c,s.processInit(r,a,t,n.placeholder),t}function wo(t,e,n){const o=Xo(t,e,n,n?.appSupport),r=o.propsConfig;if(r){const e=t.tagJsType!==O.tagComponent?[]:eo(t,o);r.castProps=e}return Pt(o,e.state.newest,e)}function Co(t,e,n){const o=wo(t,e,n),r=o.templater.tag;return r?["dom","html"].includes(r.tagJsType)?(Hn(o,void 0,e.placeholder),o):xo(o,o.ownerSupport,e):o}function Vo(t,e){delete t.returnValue,delete t.global,t.contexts=[],t.htmlDomMeta=[],delete t.inputsHandler,delete t.updatesHandler}function Jo(t,e,n,o){const r=wo(t,e,n),s=r.templater.tag;return["dom","html"].includes(s.tagJsType)?function(t,e){const n=Hn(t,e,void 0);for(const t of n.dom)t.domElement&&l.push([C,[e,t.domElement]]),t.marker&&l.push([C,[e,t.marker]]);return t}(r,o):xo(r,0,e)}function To(t,e,o,r,s){return n(e),s?Jo(t,e,o,s):Co(t,e,o)}function ko(t){return ot.stateConfig.handlers.handler(t)}function Io(t){return ko((()=>{const e=t(),n=r();return n?.context?.global?De(e,n,{resolvePromise:Eo,resolveValue:So}):e})),$o}function Eo(t){return t}function So(t){return t}function Ao(t){return ko((function(){Hr().destroy$.toCallback(t)})),$o}function Oo(t){const e=Hr(),n=ko({callback:t}),o=ko((()=>Mo(e,ot.stateConfig,n)));return n.callback=t,o}function Mo(t,e,n){const o=e.states;return function(...e){const r=function(t,e,n,...o){const r=n(...o),s=$(t);if(!s)return r;if(s.context.global);else{const t=s.context;t.tagJsVar.processUpdate(t.value,t,s.ownerSupport,[])}return D(r)&&r.finally((()=>{if(t.global);else{const t=s.context;t.tagJsVar.processUpdate(t.value,t,s.ownerSupport,[])}})),r}(t,o,n.callback,...e);return m(),r}}lo.all=function(t,e){return lo(Q.all(t),e)},go.onInit=t=>go((()=>{}),{onInit:t}),go.onDestroy=t=>go((()=>{}),{onDestroy:t});let jo=0;const Lo=Do("click"),Po=Do("mousedown");function Do(t){return function(e){const n=Oo(e);return ko((()=>{Nr().addEventListener(t,n)})),n}}const Ho={get:Nr,onclick:Lo,click:Lo,onClick:Lo,mousedown:Po,onmousedown:Po,onMouseDown:Po};function No(t,e){Object.defineProperty($o,t,{get:()=>e,set:t=>e(t)})}var Uo;function $o(t,e=Uo.SHALLOW){const n=function(...o){const r=Qn(e,o);r.tagJsType=O.tagComponent,r.processInit=To,r.hasValueChanged=Rt;const s=function(t,e){return function(n,o,r){const s=eo(t,n,r),a=n.ownerSupport,c=Xo(t,o,a,n.appSupport,s);return At(t,e,c,s)}}(r,n);return s.original=t,r.wrapper=s,r},o=t;n.original=t,o.tags=to,o.setUse=ot,o.ValueTypes=O,o.tagIndex=jo++,to.push(n);const r=n;return r.inputs=t=>{const e=Hr();e.inputsHandler=t;return t(e.tagJsVar.props),!0},r.updates=t=>(Hr().updatesHandler=t,!0),r.getInnerHTML=Yn,r}function Wo(t,e,n){if(Me(t,e))return 11;switch(n){case Uo.NONE:return 1;case Uo.SHALLOW:return ft(t,e);case Uo.IMMUTABLE:return Bo(t,e)}return function(t,e){let n=t,o=e;n=[...t],o=[...e||[]];if(!n.every(((t,e)=>function(t,e,n,o){const r=o[e];if(typeof t===A.object){const e={...t},n={...r||{}},o=Object.entries(e).every((([t,o])=>Ro(o,n[t],(()=>{delete e[t],delete n[t]}))));return o}return Ro(t,r,(function(){n.splice(e,1),o.splice(e,1)}))}(t,e,n,o))))return 7;return!1}(t,e)}function Ro(t,e,n){if(typeof t!==A.function)return!!ut(t,e,Fo)&&4;if(typeof e!==A.function)return!1;const o=e?.original;o&&(e=o);t.original&&(t=t.original);return t.toString()===e.toString()?(n(),5):(n(),6)}function Bo(t,e){const n=t.length;for(let o=0;o<n;++o){if(t[o]!==e[o])return 2}return!1}No("onclick",Lo),No("click",Lo),No("onMouseDown",Po),No("onmousedown",Po),No("mousedown",Po),function(t){t.DEEP="deep",t.SHALLOW="shallow",t.NONE="none",t.IMMUTABLE="immutable"}(Uo||(Uo={})),$o.element=Ho,$o.renderOnce=function(){throw new Error("Do not call tag.renderOnce as a function but instead set it as: `(props) => tag.renderOnce = () => html`` `")},$o.use=function(){throw new Error("Do not call tag.use as a function but instead set it as: `(props) => tag.use = (use) => html`` `")},$o.deepPropWatch=$o,$o.route=function(t){throw new Error("Do not call tag.route as a function but instead set it as: `tag.route = (routeProps: RouteProps) => (state) => html`` `")},$o.inject=function(t){const e=Hr();if(!e)throw new Error("tag.inject can only be called within a tag or host context");let n=e.parentContext;for(;n;){const e=n.contexts;if(e)for(const n of e)if(n.isAttr&&n.tagJsVar?.matchesInjection){const e=n.tagJsVar.matchesInjection(t,n);if(void 0!==e)return e.returnValue}if(n.tagJsVar?.matchesInjection&&n.tagJsVar.matchesInjection(t,n))return n.returnValue;n=n.parentContext}const o=`Could not find parent context for tag.inject ${t}`;throw console.error(o,{targetItem:t,context:e}),new Error(o)},$o.output=Bn,$o.onInit=Io,$o.onDestroy=Ao,$o.callback=Oo,$o.onRender=function(t){const e=Hr(),n=n=>{$r(e);const o=t();return Wr(),o},o=e.render$.subscribe((()=>{n()})),r=n();return $o.onDestroy((()=>o.unsubscribe())),r},$o.getInnerHTML=Yn,$o.app=function(t){throw new Error("Do not call tag.route as a function but instead set it as: `tag.route = (routeProps: RouteProps) => (state) => html`` `")},$o.immutableProps=function(t){return $o(t,Uo.IMMUTABLE)},$o.watchProps=function(t){return $o(t,Uo.SHALLOW)},Object.defineProperty($o,"renderOnce",{set(t){t.tagJsType=O.renderOnce,t.processInit=oo,t.processUpdate=be,t.destroy=$t,t.hasValueChanged=function(){return 0}}}),Object.defineProperty($o,"use",{set(t){t.original={setUse:ot,tags:to},t.tagJsType=O.stateRender,t.processInit=To,t.processUpdate=be,t.hasValueChanged=Rt,t.destroy=$t}}),Object.defineProperty($o,"promise",{set(t){Lr(t)}});const _o=3,Fo=10;function zo(t){return pt(t,_o)}function Go(t){return pt(t,Fo)}function Ko(t,e,n){const o={templater:t,context:e,castedProps:n,appSupport:void 0};return e.global.blocked=[],e.state||(e.state={newer:{state:[],states:[]}}),o}function Zo(t,e,n,o){e.appSupport=n||e;const r=t.props;return r&&(e.propsConfig=function(t,e,n){const o=t.templater;if(o.tagJsType!==O.stateRender){switch(o.propWatch){case Uo.IMMUTABLE:return t.propsConfig={latest:e,castProps:n};case Uo.SHALLOW:return t.propsConfig={latest:e.map(zo),castProps:n}}return t.propsConfig={latest:e.map(Go),castProps:n}}}(e,r,o)),e}function qo(t,e,n,o,r){const s={templater:t,context:o,castedProps:r,appSupport:void 0};return s.ownerSupport=e,s.appSupport=n,s}function Xo(t,e,n,o,r){const s=Ko(t,e,r);return s.ownerSupport=n||s,s.ownerSupport.appSupport=o||s.ownerSupport,Zo(t,s,o,r)}function Yo(t,e,o){if(L(e))return void 0===t.global&&n(t),t.oldTagJsVar=t.tagJsVar,t.tagJsVar=e,function(t,e,n){if(!e.state.newest){if(e.inputsHandler){const t=n.propsConfig;e.inputsHandler(t)}t.processInit(t,e,n,e.placeholder)}}(e,t,o),!0;if(t.global){t.oldTagJsVar=t.tagJsVar,t.tagJsVar=e;const n=t.state.newest;if(n)return typeof e===A.function||function(t,e,n,o){let r=n.templater||n;const s=t.templater.tag;s&&s._innerHTML&&(r=n._innerHTML);const a=Xo(r,e,o,o.appSupport);st(t.context.state.oldest,a)}(n,t,e,o),!0}if(t.inputsHandler){const e=o.propsConfig;t.inputsHandler(e)}return e.processInit(e,t,o,t.placeholder),t.oldTagJsVar=t.tagJsVar,t.tagJsVar=e,!0}function Qo(t,e,n,o){const r=t&&t.tagJsType;if(delete e.deleted,r){if(r===O.renderOnce)return;Yo(e,t,n)}else{if(U(t))return xe(e,t,n),e.oldTagJsVar=e.tagJsVar,void(e.tagJsVar=Ve(t));typeof t!==A.function?o&&function(t,e){e.value=t,e.oldTagJsVar=e.tagJsVar,e.tagJsVar=le(t);const n=e.placeholder,o=Bt(t),r=e.paint=[T,[n,o,function(t){e.simpleValueElm=t,delete e.paint},"processNowRegularValue"]];c.push(r)}(t,e):e.value=t}}function tr(t,e,n){const o=t.tagJsVar.hasValueChanged(e,t,n);return 0===o||Qo(e,t,n,o),o}function er(t,e){let n;return t&&(n=e=document.createTextNode(E),l.push([C,[t,e]])),{appendMarker:n,insertBefore:e}}function nr(t,e,n){const o=Kn(t,e,n);if(!0!==e.hasEmitted){const t=e.value.Observables;if(!t)return;if(!("value"in t[0]))return}if(0===o&&t.callback){so(t,e.subContext)}}function or(t,e,n,o,r){const s=t.Observables,{appendMarker:a,insertBefore:c}=er(r,o);let u=function(t,e,o){Zn(t,o,n,c),cr(e),u=o.tagJsVar.onOutput=function(t,e,o){const r=o.contextItem;tr(r,t,n),r.tagJsVar.processUpdate(t,r,n,[t]),r.value=t,cr(e)}};const i=rr(s,n,((t,e,n)=>u(t,e,n)),t,e);return i.appendMarker=a,e.subContext=i,t.processUpdate=nr,t.onOutput=u,i}function rr(t,e,n,o,r){function s(t,e){u.lastValues[e]={value:t,tagJsVar:ke(t),oldTagJsVar:u.lastValues[e]?.tagJsVar},a(u.lastValues,e)}function a(t,e){const o=u.tagJsVar,s=o?.callback;if(s){$r(r);const e=o.callback(...t.map((t=>t.value)));return n(e,c,u),void Wr()}const a=t[e].value;n(a,c,u)}let c=!0;const u={lastValues:[],subValueHandler:s,valuesHandler:a,tagJsVar:o,subscriptions:[]};return t.forEach(((t,e)=>{c=!0,u.subscriptions.push(t.subscribe((t=>s(t,e)))),c=!1})),o.onOutput=n,u}function sr(t){const e=t.subContext;if(!e)return;e.subscriptions.forEach((t=>t.unsubscribe())),delete t.subContext}function ar(t,e){++t.updateCount;const n=t.subContext;return sr(t),zn(n,e)}function cr(t){t||ot.stateConfig.support||m()}function ur(t,e,n,o,r){or({tagJsType:O.subscribe,states:[],Observables:[t]},e,n,o,r)}function ir(t){return r()?ko((()=>lr(t))):lr(t)}function lr(t){let e=t;const n=new Set,o=t=>{n.forEach((e=>e(t)))};return{component:!1,tagJsType:O.signal,hasValueChanged:io,processInitAttribute:a,processInit:ur,processUpdate:nr,get value(){return e},set value(t){e!==t&&(e=t,o(t))},destroy:ar,emit:o,subscribe(t){t(e),n.add(t);const o=()=>n.delete(t);return o.unsubscribe=o,o}}}class pr extends Q{value;constructor(t){super(t),this.value=t}subscribe(t){const e=super.subscribe(t);return t(this.value,e),e}}class fr extends Q{value;constructor(t){super(t),this.value=t,this._value=t,et(this)}subscribe(t){const e=super.subscribe(t);return t(this._value,e),e}}function dr(t){return(e,n)=>{n.setHandler((()=>{})),t(e,n.next)}}function gr(t){return(e,n)=>{n.setHandler((()=>{}));t(e).then((t=>n.next(t)))}}const hr=t=>(e,n)=>{n.setHandler((()=>{}));const o=t(e).subscribe((t=>{o.unsubscribe(),n.next(t)}))},mr=(t,e)=>vr(t,e).pastResult,br=t=>t;const vr=(t,e,{init:n,before:o,final:r=br}={})=>{const s=ko({pastResult:void 0,values:void 0}),a="function"==typeof t?t():t,c=void 0===s.values;let u=0;function i(t){if(void 0===s.values){if(o&&!o(t))return s.values=t,s;const a=(n||e)(t,s.values);return s.pastResult=r(a),s.values=t,s}if(t.every(((t,e)=>t===s.values[e])))return s;if(o&&!o(t))return s.values=t,s;const a=e(t,s.values);return s.pastResult=r(a),s.values.length=0,s.values.push(...t),s}return c&&"function"==typeof t&&$o.onRender((()=>{if(++u,1===u)return;i(t())})),i(a)};function yr(t,e){return Object.defineProperty(e,"noInit",{get(){const e=t();return e.setup.init=()=>{},e}}),Object.defineProperty(e,"asSubject",{get(){const e=t(),n=ko((()=>r())),o=ko((()=>new pr(void 0))),s=ko((()=>({state:ot.stateConfig.state,states:ot.stateConfig.states}))),a=(t,a)=>(vr(t,((t,e)=>{const c=r(),u=a(t,e);if(c!==n){s.state,n.context.state.older}o.next(u)}),e.setup),o);return a.setup=e.setup,yr((()=>a),a),a}}),Object.defineProperty(e,"truthy",{get(){const e=t();return e.setup.before=t=>t.every((t=>t)),e}}),e}function xr(t){return r()?ko((()=>new Q(t))):new Q(t)}function wr(t){return ot.stateConfig.handlers.statesHandler(t)}function Cr(t){const e=ir([]),n=ir(0),o=ir(0);let r=[],s=0;return o.value=n.value,t(((...t)=>(r=t,e.value))),mr(r,(()=>{++s,e.value=r,t((()=>r))})),wr(((r,a)=>{if(s)return t(((...t)=>(a&&1!==a||(e.value=t),e.value))),o.value=n.value,void++n.value;t((()=>e.value))})),++s,e.value}function Vr(){return{stateDiff:0,provider:void 0}}yr((()=>function(t){const e=(e,n)=>vr(e,n,t).pastResult;return e.setup=t,yr((()=>e),e),e}({})),mr),xr._value=t=>{ko((function(){return{state:ot.stateConfig.state,states:ot.stateConfig.states}}));return ko((function(){return new pr(t).pipe((t=>t))}))},xr.all=function(t){return ko((()=>({state:ot.stateConfig.state,states:ot.stateConfig.states}))),r(),Q.all(t).pipe((t=>t))};const Jr={create:t=>{const e=ko(Vr);if(e.stateDiff){let t=e.stateDiff;for(;t--;)ko(void 0);return ko(void 0)}const n=ko((()=>{const n=ot.stateConfig,o=n.state.length,r=t.prototype?new t:t(),s=n.support,a=n.state.length-o,c={constructMethod:t,instance:r,stateDiff:a,owner:s,children:[]};e.provider=c;const u=s.context;return(u.providers=u.providers||[]).push(c),e.stateDiff=a,r})),o=t,r=o.compareTo=o.toString();return e.provider.constructMethod.compareTo=r,n},inject:function(t){return ko((function(){const e=t,n=e.compareTo=e.compareTo||t.toString(),o=r(),s=[];let a={ownerSupport:o.ownerSupport};for(;a.ownerSupport;){const t=a.ownerSupport.context.providers;if(!t){a=a.ownerSupport;continue}const e=t.find((t=>{s.push(t);if(t.constructMethod.compareTo===n)return!0}));if(e){const t=o.context;return(t.providers=t.providers||[]).push(e),e.children.push(o),e.instance}a=a.ownerSupport}const c=`Could not inject provider: ${t.name} ${t}`;throw console.warn(`${c}. Available providers`,s),new Error(c)}))}};function Tr(t=[],e){const n=Hr();return function(t,e,n=(()=>{})){const o=new Set(["push","pop","splice","shift","unshift"]),r=new Set(["map","reduce","forEach","every","filter"]),s=new Map,a=new Map,c=()=>{const o=$(e);n(t.value),Le([o])},u=()=>{t.emit(t.value),c()},i=e=>{const n=s.get(e);if(n)return n;const o=(...n)=>{const o=t.value[e](...n);return u(),o};return s.set(e,o),o},l=e=>{const n=a.get(e);if(n)return n;const o=t.value[e].bind(t.value);return a.set(e,o),o};return new Proxy(t,{get:(e,n)=>kr(n)?t.value[n]:"length"===n?t.value.length:"string"==typeof n&&o.has(n)?i(n):"string"==typeof n&&r.has(n)?l(n):t[n],set:(e,n,o)=>kr(n)?(t.value[n]=o,u(),!0):"length"===n?(t.value.length=o,u(),!0):(t[n]=o,!0)})}(lr(t),n,e)}function kr(t){if("number"==typeof t)return Number.isInteger(t)&&t>=0;if("string"!=typeof t||""===t)return!1;const e=Number(t);return Number.isInteger(e)&&e>=0&&String(e)===t}class Ir extends Error{details;constructor(t,e,n={}){super(t),this.name=Ir.name,this.details={...n,errorCode:e}}}class Er extends Ir{constructor(t,e){super(t,"array-no-key-error",e),this.name=Er.name}}class Sr extends Ir{constructor(t,e){super(t,"state-mismatch-error",e),this.name=Sr.name}}class Ar extends Ir{constructor(t,e){super(t,"sync-callback-error",e),this.name=Ar.name}}const Or=()=>{const t=Hr();if(!t)throw Mr;const e=ot.stateConfig;return function(n){return Mo(t,e,{callback:n})}},Mr=new Ar("callback() was called outside of synchronous rendering. Use `callback = callbackMaker()` to create a callback that could be called out of sync with rendering"),jr=()=>{};function Lr(t){const e=Hr(),n=ko({callback:jr}),o=ko({current:void 0}),r=ko((()=>Mo(e,ot.stateConfig,n)));if(o.current!==t){o.current=t;const e=t;t.then((()=>{o.current===e&&r()}))}}function Pr(t=[]){return r()?ko((()=>Dr(lr(t)))):Dr(lr(t))}function Dr(t){const e=["push","pop","splice","shift","unshift"],n=["map","reduce","forEach","every","filter"],o=new Proxy(t,{get(r,s){return isNaN(s)?"length"===s?t.value.length:e.includes(s)?o[a=s]=(...e)=>{const n=t.value[a](...e);return t.emit(t.value),n}:n.includes(s)?t.value[s].bind(t.value):t[s]:t.value[s];var a},set:(e,n,o)=>isNaN(n)?"length"===n?(t.value.length=o,t.emit(t.value),!0):(t[n]=o,!0):(t.value[n]=o,t.emit(t.value),!0)});return o}function Hr(){return ot.stateConfig.context}function Nr(){return Hr().target}const Ur=[];function $r(t){return Ur.push(t),ot.stateConfig.context=t}function Wr(){Ur.pop(),ot.stateConfig.context=Ur[Ur.length-1]}"object"==typeof document&&(document.taggedJs&&console.warn("🏷️🏷️ Multiple versions of taggedjs are loaded. May cause issues."),document.taggedJs=!0);const Rr=[],Br="__taggedjs_tag_element__";function _r(t,e,o){const r=e[Br],c=Rr.findIndex((t=>t.element===e));if((r||c>=0)&&console.warn("tagElement called multiple times for the same element",{element:e}),c>=0){const t=Rr[c].support;kt(t,t.context.global),Rr.splice(c,1)}e[Br]=!0,e.innerHTML="";let u=()=>f(o);u.propWatch=Uo.NONE,u.tagJsType=O.stateRender,u.processUpdate=be,u.props=[o],u.isApp=!0;const i=function(t,e){const o={component:!1,tagJsType:"templater",hasValueChanged:Rt,destroy:$t,processInitAttribute:a,processInit:function(){console.debug("do nothing app function")},processUpdate:be},r={updateCount:0,value:t,valueIndex:0,varCounter:0,destroy$:new Q,render$:new Q,withinOwnerElement:!1,renderCount:0,global:void 0,state:{},tagJsVar:o};return n(r),r.events={},function(t,e,n){const o=Ko(t,e);Zo(t,o,o),o.appElement=n,o.context=e,e.state.oldest||(e.state.oldest=o,e.state.older=e.state.newer),e.state.newest=o}(t,r,e),r}(u,e),l=i.global,p=i.state.newest;F(p.context),s(p);let f=t(o);const d=typeof f==A.function;d||(L(f)?(i.state.newest.propsConfig={latest:[o],castProps:[o]},u.propWatch=f.propWatch,u.tagJsType=f.tagJsType,u.wrapper=f.wrapper,u=f):(u.tag=f,f=t));const h=function(t,e,n,o,r,s,a){const c=document.createTextNode(E);if(to.push(n.wrapper||{original:n}),s.placeholder=c,e.isApp=!0,!r)throw new Error(`Cannot tagElement, element received is type ${typeof r} and not type Element`);r.destroy=function(){const t=s.events;for(const e in t){const n=t[e];r.removeEventListener(e,n)}s.events={},++g.locks;const n=kt(i,e);return--g.locks,m(),n},++g.locks;const u=document.createDocumentFragment();u.appendChild(c);const i=Co(n,s,{appSupport:{appElement:r,context:s},appElement:r,context:s,isRoot:!0});return i.appElement=r,a&&(o.tag=i.templater.tag),--g.locks,m(),r.appendChild(u),{support:i,tags:to,ValueTypes:O}}(0,l,u,f,e,i,d);return Wr(),h}function Fr(t,e){return function(n,o,r){if(s=o,Array.isArray(s)&&Object.prototype.hasOwnProperty.call(s,"raw")){const s=[];for(let t=0;t<o.length;++t)s.push(o[t]),t<r.length&&s.push(String(r[t]??""));const a=s.join("");return e(n,[t,a])}var s;return e(n,[t,o])}}function zr(t,e,n){function o(t){return o.toCallback(t)}return o.toCallback=n,t.listeners.push([e,o]),t.allListeners.push([e,o]),t}function Gr(t,e){const n=Js(t,t.elementFunctions);return cs(e[0],e[1],n),n}const Kr=Object.fromEntries([["alt","alt"],["ariaLabel","aria-label"],["referrerPolicy","referrerpolicy"],["autoFocus","autoFocus"],["border","border"],["id","id"],["for","for"],["fill","fill"],["content","content"],["charset","charset"],["cellPadding","cellpadding"],["cellSpacing","cellspacing"],["class","class"],["href","href"],["lang","lang"],["loading","loading"],["value","value"],["placeholder","placeholder"],["src","src"],["title","title"],["width","width"],["height","height"],["type","type"],["min","min"],["max","max"],["step","step"],["name","name"],["wrap","wrap"],["checked","checked"],["disabled","disabled"],["selected","selected"],["minLength","minLength"],["maxLength","maxLength"],["open","open"],["rel","rel"],["rows","rows"],["style","style"],["target","target"],["viewBox","viewBox"],["valign","valign"]].map((([t,e])=>[t,Fr(e,Gr)]))),Zr=[["onClose","onclose"],["onCancel","oncancel"],["onDoubleClick","ondblclick"],["onClick","click"],["onBlur","onblur"],["onChange","onchange"],["onInput","oninput"],["contextMenu","contextmenu"],["onMouseDown","onmousedown"],["onMouseUp","onmouseup"],["onMouseOver","onmouseover"],["onMouseOut","onmouseout"],["onKeyDown","onkeydown"],["onKeyUp","onkeyup"]];function qr(t,e){return t.attributes.push(e),Qr(t,e[1]),ns(e[0])?es(e[0],t):ns(e[1])&&es(e[1],t),t}const Xr=(()=>{const t=Object.fromEntries(Zr.map((([t,e])=>[t,function(t){return function(t,e,n){return zr(Js(t,t.elementFunctions),e,n)}(this,e,t)}]))),e=Object.fromEntries(Object.entries(Kr).map((([t,e])=>[t,ts(e)]))),n=e.id;return e.id=function(...t){const e=t[0];return this.arrayValue="function"==typeof e?e():e,n.apply(this,t)},{...t,attr:function(...t){return Gr(this,t)},attrs:function(t){return function(t,e){const n=Js(t,t.elementFunctions);return Object.entries(e).map((t=>{n.attributes.push(t),Qr(n,t[1]),ns(t[0])?es(t[0],n):ns(t[1])&&es(t[1],n)})),n}(this,t)},key:function(t){return this.arrayValue=t,this},...e}})();function Yr(t){return Xr}function Qr(t,e){let n=1;null!=e&&"function"!=typeof e&&"number"==typeof e.length&&(n+=e.length),t.contentId+=n}function ts(t){return function(e,...n){return t(this,e,n)}}function es(t,e){e.contexts||(e.contexts=[]),e.contexts.push(t),++e.contentId}function ns(t){return Array.isArray(t)||H(t)||t?.tagJsType}function os(t,e){return(n,o)=>qr(n,[t,o,!1,e])}function rs(t){return(e,n)=>zr(e,t,n)}const ss=Object.fromEntries([["onClick",rs("click")],["onDoubleClick",rs("ondblclick")],["onDblClick",rs("ondblclick")],["onDblClick",rs("ondblclick")],["onBlur",rs("onblur")],["onChange",rs("onchange")],["onCancel",rs("oncancel")],["onClose",rs("onclose")],["onInput",rs("oninput")],["onMousedown",rs("onmousedown")],["onMouseDown",rs("onmousedown")],["onMouseup",rs("onmouseup")],["onMouseUp",rs("onmouseup")],["onMouseover",rs("onmouseover")],["onMouseOver",rs("onmouseup")],["onMouseout",rs("onmouseout")],["onMouseOut",rs("onmouseout")],["onKeyup",rs("onkeyup")],["onKeyUp",rs("onkeyup")],["onKeydown",rs("onkeydown")],["onKeyDown",rs("onkeydown")]]),as=Object.assign(Object.fromEntries(["checked","disabled","selected"].map((t=>[t,os(t,Zt)]))),{class:os("class",(function(t,e,n){N(n)?Object.entries(n).forEach((([e,n])=>{n?t.classList.add(e):t.classList.remove(e)})):qt(t,e,n)}))},ss);function cs(t,e,n){return t in as?as[t](n,e):qr(n,[t,e,!1,Kt])}function us(t){return is(t)}function is(t){const e=function(t){if(!t||0===t.length)return"";const e=[];return t.forEach((t=>{const n=t[0];if("string"!=typeof n||0===n.length)return;const o=fs(t[1]);!0!==o?!1!==o&&null!=o&&e.push(`${n}="${ps(String(o))}"`):e.push(n)})),e.length>0?` ${e.join(" ")}`:""}(t.attributes),n=ls(t.innerHTML);return`<${t.tagName}${e}>${n}</${t.tagName}>`}function ls(t){return t&&0!==t.length?t.map((t=>{const e=fs(t);return(n=e)&&"object"==typeof n&&"string"==typeof n.tagName?is(e):Array.isArray(e)?ls(e):null==e||!1===e?"":ps(String(e));var n})).join(""):""}function ps(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function fs(t){return"function"==typeof t?t():t}function ds(t,e){++t.updateCount;const n=t.contexts,o=[];if(t.paintCommands){for(let e=c.length-1;e>=0;--e){const n=c[e],o=t.paintCommands.indexOf(n);if(o>=0&&(c.splice(e,1),t.paintCommands.splice(o,1),0===t.paintCommands.length))break}return delete t.paintCommands,void gs(t)}if(n.length&&(hs(n,e,o),n.length=0,o.length)){const e=t.htmlDomMeta;return t.deleted=!0,Promise.all(o).then((()=>{++g.locks,Vt(e),gs(t),--g.locks,m()}))}Vt(t.htmlDomMeta),gs(t)}function gs(t){t.htmlDomMeta=[],delete t.contexts,t.deleted=!0}function hs(t,e,n){const o=t[0],r=o.tagJsVar.destroy(o,e);return o.deleted=!0,D(r)?n.push(r.then((()=>{if(t.length>1)return hs(t.slice(1,t.length),e,n)}))):(o.htmlDomMeta&&(Vt(o.htmlDomMeta),delete o.htmlDomMeta),t.length>1?hs(t.slice(1,t.length),e,n):void 0)}function ms(t,e,n){if(!0===e.deleted)return;++e.updateCount;if(bs(t,e))return ds(e,n),e.htmlDomMeta=[],delete e.deleted,void Qo(t,e,n,789);const o=e.contexts,r=t.contexts||[],s=e.tagJsVar.allListeners;if(t.allListeners.forEach(((t,e)=>{s[e][1].toCallback=t[1].toCallback})),o.length!==r.length)throw console.info("context mismatch",{value:t,context:e,conValues:o.map((t=>t.value)),vContexts:r,deleted:e.deleted,contexts:o}),new Error(`Expected ${o.length} contexts but got ${r.length}`);e.locked=79,o.forEach(((t,e)=>{t.tagJsVar.processUpdate(r[e],t,n)})),delete e.locked}function bs(t,e){if(!t)return 1;if(e.value===t)return 0;if(!t||"element"!==t.tagJsType)return 1;if(t.contentId!==e.value.contentId)return 1;return t.innerHTML.length!==e.value.innerHTML.length?1:0}function vs(t,e,n,o,r){t.forEach((t=>{switch(typeof t){case"string":case"boolean":case"number":return xs(t,o,r);case"function":{if("element"===t.tagJsType)break;const s=function(t,e,n,o,r){const s=[],c={updateCount:0,parentContext:n,contexts:s,target:e,value:t,htmlDomMeta:[],tagJsVar:{component:!1,tagJsType:"dynamic-text",hasValueChanged:()=>0,processInit:a,processInitAttribute:a,destroy:(t,e)=>{++c.updateCount,s.forEach((t=>t.tagJsVar.destroy(t,e)))},processUpdate:(t,e,n,o)=>{++c.updateCount,$r(i);let r=t(i);const s=c.underFunction;delete c.underFunction,r instanceof Function&&!r.tagJsType&&(s&&r.toString()===s.toString()?r=i.value:(c.underFunction=r,r=r()));const a=i.tagJsVar.processUpdate(r,i,n,o);return i.value=r,e.value=t,Wr(),a}},valueIndex:-1,withinOwnerElement:!0,destroy$:new Q,render$:new Q};$r(c);let u=t();H(u)&&!u.tagJsType&&(c.underFunction=u,u=u());const i=ys(u,c,e,o,r);return n.contexts.push(c),c.subContext=i,Wr(),i}(t,o,e,n,r);return s}}if(null==t)return xs(t,o,r);if("element"!==t.tagJsType)return ys(t,e,o,n,r);{const s=ws(t,e,n,e.contexts);c.push([r,[o,s]]);e.htmlDomMeta.push({nn:s.tagName,domElement:s,at:[]})}}))}function ys(t,e,n,o,r){const s=Ie(t,0,!0,e);if(e.contexts.push(s),s.target=n,s.placeholder=document.createTextNode(""),c.push([r,[n,s.placeholder]]),$r(s),s.inputsHandler){const t=o.propsConfig;s.inputsHandler(t)}return s.tagJsVar.processInit(t,s,o,s.placeholder),Wr(),s}function xs(t,e,n){const o=Bt(t),r=document.createTextNode(o);return c.push([n,[e,r]]),r}function ws(t,e,n,o){const r=document.createElement(t.tagName);return e.target=r,t.attributes.forEach((t=>{const e=t[0];"string"==typeof e&&(t[2]=_t(e,r.tagName))})),un(t.attributes,[],r,n,e),vs(t.innerHTML,e,n,r,C),t.listeners.forEach(((e,o)=>function(t,e,n,o,r){const s=(...o)=>{const r=t.listeners[e][1],s=W(n),a=s.context.updateCount;s.context.locked=1,++g.locks,$r(s.context);const c=r(...o);--g.locks,delete s.context.locked,Wr();return a===s.context.updateCount?Ne(c,s):(m(),D(c)?c.then((()=>(Le([s.context.state.newest]),"promise-no-data-ever"))):"no-data-ever")};_e(n.appSupport,o[0],r,s)}(t,o,n,e,r))),r}function Cs(t,e,n,o){e.contexts=e.contexts||[],e.htmlDomMeta=[],e.locked=34;const r=ws(t,e,n,e.contexts);delete e.locked;const s=[w,[o,r,"htmlTag.processInit"]];c.push(s),e.paintCommands=[s],p.push([()=>{delete e.paintCommands},[]]);const a={nn:t.tagName,domElement:r,at:t.attributes};return e.htmlDomMeta=[a],r}function Vs(t){const e=Js({component:!1,tagJsType:"element",processInitAttribute:a,processInit:Cs,destroy:ds,processUpdate:ms,hasValueChanged:bs,tagName:t,innerHTML:[],attributes:[],contentId:0,listeners:[],allListeners:[],elementFunctions:Yr},Yr);return e.tagName=t,e}function Js(t,e){const n=function t(...e){const n={...t};n.attributes=[...t.attributes],n.listeners=[...t.listeners],n.allListeners=[...t.allListeners];const o=n.contexts=n.contexts||[];return n.innerHTML=e,e.forEach((function(t){if(ns(t))return"element"===t.tagJsType?(n.allListeners.push(...t.allListeners),void(t.contexts&&(o.push(...t.contexts),++n.contentId))):void function(t,e){e.contexts||(e.contexts=[]);e.contexts.push(t)}(t,n)})),n};var o,r;return Object.assign(n,t),o=n,r=e(n),Object.entries(r).forEach((function([t,e]){try{o[t]=e}catch{Object.defineProperty(o,t,{value:e,writable:!0,configurable:!0,enumerable:!1})}})),n.attributes=Ts(t.attributes),n.listeners=Ts(t.listeners),n.allListeners=Ts(t.allListeners),n.toString=function(){return us(this)},n}function Ts(t){return t.length?t.slice():[]}const ks=function(){const t=Js({component:!1,tagJsType:"element",processInitAttribute:a,processInit:Is,destroy:Es,processUpdate:ms,hasValueChanged:bs,tagName:"no-element",innerHTML:[],attributes:[],contentId:0,listeners:[],allListeners:[],elementFunctions:Yr},Yr);return t.tagName="no-element",t}();function Is(t,e,n,o){e.contexts=e.contexts||[],e.htmlDomMeta=[],vs(t.innerHTML,e,n,o,w)}function Es(t,e){++t.updateCount;const n=t.contexts,o=[];if(n.length&&(hs(n,e,o),n.length=0,o.length)){const e=t.htmlDomMeta;return Promise.all(o).then((()=>{++g.locks,Vt(e),--g.locks,m()}))}}const Ss=Vs("button"),As=Vs("select"),Os=Vs("option"),Ms=Vs("input"),js=Vs("textarea"),Ls=Vs("html"),Ps=Vs("head"),Ds=Vs("title"),Hs=Vs("meta"),Ns=Vs("link"),Us=Vs("style"),$s=Vs("body"),Ws=Vs("script"),Rs=Vs("noscript"),Bs=Vs("hr"),_s=Vs("h1"),Fs=Vs("h2"),zs=Vs("h3"),Gs=Vs("h4"),Ks=Vs("h5"),Zs=Vs("h6"),qs=Vs("ol"),Xs=Vs("ul"),Ys=Vs("li"),Qs=Vs("div"),ta=Vs("main"),ea=Vs("section"),na=Vs("header"),oa=Vs("footer"),ra=Vs("form"),sa=Vs("fieldset"),aa=Vs("legend"),ca=Vs("dialog"),ua=Vs("pre"),ia=Vs("table"),la=Vs("tr"),pa=Vs("td"),fa=Vs("th"),da=Vs("thead"),ga=Vs("tbody"),ha=Vs("tfoot"),ma=Vs("iframe"),ba=Vs("a"),va=Vs("u"),ya=Vs("img"),xa=Vs("br"),wa=Vs("label"),Ca=Vs("p"),Va=Vs("small"),Ja=Vs("span"),Ta=Vs("strong"),ka=Vs("b"),Ia=Vs("sup"),Ea=Vs("nav"),Sa=Vs("figure"),Aa=Vs("figcaption"),Oa=Vs("code"),Ma=Vs("canvas"),ja=Vs("svg"),La=Vs("path"),Pa=Vs("polygon"),Da=Vs("rect"),Ha=Vs("details"),Na=Vs("summary"),Ua="3.1.15",$a={tagElement:_r,renderWithSupport:Ut,firstTagRender:Pt,reRenderTag:Lt,paint:m};var Wa=e.W9,Ra=e.cg,Ba=e.m0,_a=e.rS,Fa=e.Y2,za=e.ei,Ga=e.B7,Ka=e.TU,Za=e.XF,qa=e.PC,Xa=e.Ot,Ya=e.Mj,Qa=e.tD,tc=e.a,ec=e.xe,nc=e.YO,oc=e.ZA,rc=e.b,sc=e.rf,ac=e.br,cc=e.um,uc=e.x6,ic=e.E2,lc=e.OH,pc=e.Ji,fc=e.TB,dc=e.Ii,gc=e.mX,hc=e.yV,mc=e.EI,bc=e.aY,vc=e.zV,yc=e.pf,xc=e.ze,wc=e.Go,Cc=e.bD,Vc=e.WJ,Jc=e.wL,Tc=e.Ng,kc=e.O,Ic=e.zH,Ec=e.r3,Sc=e.y4,Ac=e.Df,Oc=e.Ie,Mc=e.lI,jc=e.$F,Lc=e.vP,Pc=e.hp,Dc=e.qr,Hc=e.ts,Nc=e.Zd,Uc=e.B4,$c=e.HD,Wc=e.Az,Rc=e.sV,Bc=e.Ah,_c=e.f5,Fc=e.Gk,zc=e.j_,Gc=e.h1,Kc=e.h2,Zc=e.h3,qc=e.h4,Xc=e.h5,Yc=e.h6,Qc=e.zC,tu=e.d5,eu=e.wx,nu=e.cF,ou=e.Hc,ru=e.PB,su=e.uq,au=e.hr,cu=e.qy,uu=e.gx,iu=e.pU,lu=e._8,pu=e.hF,fu=e.cy,du=e.Tn,gu=e.Gv,hu=e.yL,mu=e.D8,bu=e.Ze,vu=e._4,yu=e.mn,xu=e.Pf,wu=e.o1,Cu=e.z,Vu=e.li,Ju=e.nf,Tu=e.iW,ku=e.mI,Iu=e.C$,Eu=e.et,Su=e.Vg,Au=e.ol,Ou=e.sA,Mu=e.TG,ju=e.MG,Lu=e.PL,Pu=e.uK,Du=e.CG,Hu=e.p,Nu=e.nI,Uu=e.Ae,$u=e.Fs,Wu=e.n1,Ru=e.AS,Bu=e.iv,_u=e.r5,Fu=e.M$,zu=e.Pc,Gu=e.QB,Ku=e.K$,Zu=e.uW,qu=e.Lt,Xu=e.Jv,Yu=e.TA,Qu=e.Jn,ti=e.Ll,ei=e.L6,ni=e.EX,oi=e.Ln,ri=e.wk,si=e.xP,ai=e.ko,ci=e.iF,ui=e.bc,ii=e.B1,li=e.RX,pi=e.Sx,fi=e.lR,di=e.JW,gi=e.ag,hi=e.tp,mi=e.Tc,bi=e.Hf,vi=e.zc,yi=e._A,xi=e.T_,wi=e.td,Ci=e.g0,Vi=e.pd,Ji=e.th,Ti=e.VQ,ki=e.DD,Ii=e.tr,Ei=e.u,Si=e.ul,Ai=e.Ag,Oi=e.gA,Mi=e.NU,ji=e.rE,Li=e.wB,Pi=e.id,Di=e.MC,Hi=e.SZ;export{Wa as ArrayNoKeyError,Ra as BasicTypes,Ba as ImmutableTypes,_a as PropWatches,Fa as RouteQuery,za as StateMismatchError,Ga as Subject,Ka as Subjective,Za as SyncCallbackError,qa as TagError,Xa as ValueSubject,Ya as ValueSubjective,Qa as ValueTypes,tc as a,ec as appElements,nc as array,oc as arrayWatch,rc as b,sc as body,ac as br,cc as buildBeforeElement,uc as button,ic as callback,lc as callbackMaker,pc as canvas,fc as checkArrayValueChange,dc as checkSimpleValueChange,gc as checkStillSubscription,hc as checkTagValueChange,mc as checkTagValueChangeAndUpdate,bc as code,vc as combineLatest,yc as createHtmlSupport,xc as createTrigger,wc as deepClone,Cc as deepEqual,Vc as defineValueOn,Jc as deleteContextSubContext,Tc as deleteSimpleValue,kc as destroySupport,Ic as details,Ec as dialog,Sc as div,Ac as elementVarToHtmlString,Oc as empty,Mc as fieldset,jc as figcaption,Lc as figure,Pc as firstTagRender,Dc as footer,Hc as forceUpdateExistingValue,Nc as form,Uc as getBaseSupport,$c as getContextInCycle,Wc as getDomMeta,Rc as getInnerHTML,Bc as getNewGlobal,_c as getSupportOlderState,Fc as getTemplaterResult,zc as guaranteeInsertBefore,Gc as h1,Kc as h2,Zc as h3,qc as h4,Xc as h5,Yc as h6,Qc as hasPropChanges,tu as head,eu as header,nu as hmr,ou as host,ru as howToSetInputValue,su as howToSetStandAloneAttr,au as hr,cu as html,uu as htmlTag,iu as iframe,lu as img,pu as input,fu as isArray,du as isFunction,gu as isObject,hu as isPromise,mu as isSimpleType,bu as isStaticTag,vu as isSubjectInstance,yu as isTagComponent,xu as label,wu as legend,Cu as letProp,Vu as li,Ju as link,Tu as main,ku as meta,Iu as nav,Eu as noElement,Su as noscript,Au as ol,Ou as onDestroy,Mu as onFirstSubContext,ju as onInit,Lu as oneRenderToSupport,Pu as option,Du as output,Hu as p,Nu as paint,Uu as path,$u as pipe,Wu as polygon,Ru as pre,Bu as promise,_u as providers,Fu as reRenderTag,zu as rect,Gu as renderWithSupport,Ku as script,Zu as section,qu as select,Xu as setBooleanAttribute,Yu as setNonFunctionInputValue,Qu as setSimpleAttribute,ti as setUseMemory,ei as signal,ni as small,oi as span,ri as state,si as states,ai as strong,ci as style,ui as subject,ii as subscribe,li as subscribeWith,pi as summary,fi as sup,di as svg,gi as syncError,hi as table,mi as tag,bi as tagElement,vi as tagValueUpdateHandler,yi as tags,xi as tbody,wi as td,Ci as textarea,Vi as tfoot,Ji as th,Ti as thead,ki as title,Ii as tr,Ei as u,Si as ul,Ai as upgradeBaseToSupport,Oi as valueToTagJsVar,Mi as variablePrefix,ji as version,Li as watch,Pi as willCallback,Di as willPromise,Hi as willSubscribe};
|
|
2
2
|
//# sourceMappingURL=bundle.js.map
|