taggedjs 2.8.32 → 2.8.35

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.
Files changed (153) hide show
  1. package/bundle.js +1 -1
  2. package/bundle.js.map +1 -1
  3. package/js/TagJsEvent.type.d.ts +10 -0
  4. package/js/TagJsEvent.type.js +2 -0
  5. package/js/TagJsEvent.type.js.map +1 -0
  6. package/js/castTextValue.function.d.ts +1 -1
  7. package/js/index.d.ts +2 -1
  8. package/js/index.js +1 -1
  9. package/js/index.js.map +1 -1
  10. package/js/interpolations/attributes/ElementTargetEvent.interface.d.ts +4 -0
  11. package/js/interpolations/attributes/howToSetInputValue.function.js +1 -1
  12. package/js/interpolations/attributes/howToSetInputValue.function.js.map +1 -1
  13. package/js/interpolations/attributes/processNameValueAttribute.function.d.ts +1 -1
  14. package/js/interpolations/attributes/processNameValueAttribute.function.js +1 -4
  15. package/js/interpolations/attributes/processNameValueAttribute.function.js.map +1 -1
  16. package/js/interpolations/attributes/specialAttribute.d.ts +1 -1
  17. package/js/interpolations/attributes/specialAttribute.js +34 -17
  18. package/js/interpolations/attributes/specialAttribute.js.map +1 -1
  19. package/js/interpolations/attributes/updateAttribute.function.js +7 -7
  20. package/js/interpolations/attributes/updateAttribute.function.js.map +1 -1
  21. package/js/interpolations/optimizers/ObjectNode.types.d.ts +1 -1
  22. package/js/interpolations/optimizers/attachDynamicDom.function.js +2 -8
  23. package/js/interpolations/optimizers/attachDynamicDom.function.js.map +1 -1
  24. package/js/interpolations/optimizers/htmlInterpolationToDomMeta.function.d.ts +3 -0
  25. package/js/interpolations/optimizers/htmlInterpolationToDomMeta.function.js +22 -11
  26. package/js/interpolations/optimizers/htmlInterpolationToDomMeta.function.js.map +1 -1
  27. package/js/interpolations/optimizers/parseHTML.function.js +72 -41
  28. package/js/interpolations/optimizers/parseHTML.function.js.map +1 -1
  29. package/js/interpolations/optimizers/replacePlaceholders.function.js +6 -6
  30. package/js/interpolations/optimizers/replacePlaceholders.function.js.map +1 -1
  31. package/js/interpolations/optimizers/restorePlaceholders.function.d.ts +1 -1
  32. package/js/interpolations/optimizers/restorePlaceholders.function.js +14 -8
  33. package/js/interpolations/optimizers/restorePlaceholders.function.js.map +1 -1
  34. package/js/render/attributes/NoDisplayValue.type.d.ts +1 -0
  35. package/js/render/attributes/NoDisplayValue.type.js +3 -0
  36. package/js/render/attributes/NoDisplayValue.type.js.map +1 -0
  37. package/js/render/attributes/Special.types.d.ts +2 -0
  38. package/js/render/attributes/Special.types.js +2 -0
  39. package/js/render/attributes/Special.types.js.map +1 -0
  40. package/js/render/attributes/createDynamicAttribute.function.d.ts +10 -0
  41. package/js/render/attributes/createDynamicAttribute.function.js +60 -0
  42. package/js/render/attributes/createDynamicAttribute.function.js.map +1 -0
  43. package/js/render/attributes/getTagJsVar.function.d.ts +4 -0
  44. package/js/render/attributes/getTagJsVar.function.js +9 -0
  45. package/js/render/attributes/getTagJsVar.function.js.map +1 -0
  46. package/js/render/attributes/getTagVarIndex.function.d.ts +2 -0
  47. package/js/render/attributes/getTagVarIndex.function.js +9 -0
  48. package/js/render/attributes/getTagVarIndex.function.js.map +1 -0
  49. package/js/render/attributes/isNoDisplayValue.function.d.ts +1 -0
  50. package/js/render/attributes/isNoDisplayValue.function.js +4 -0
  51. package/js/render/attributes/isNoDisplayValue.function.js.map +1 -0
  52. package/js/render/attributes/processAttribute.function.d.ts +5 -9
  53. package/js/render/attributes/processAttribute.function.js +14 -82
  54. package/js/render/attributes/processAttribute.function.js.map +1 -1
  55. package/js/render/attributes/processUpdateAttrContext.function.js +2 -3
  56. package/js/render/attributes/processUpdateAttrContext.function.js.map +1 -1
  57. package/js/render/dom/attachDomElements.function.js +5 -20
  58. package/js/render/dom/attachDomElements.function.js.map +1 -1
  59. package/js/render/paint.function.d.ts +3 -6
  60. package/js/render/paint.function.js +7 -7
  61. package/js/render/paint.function.js.map +1 -1
  62. package/js/render/renderExistingTag.function.js +1 -2
  63. package/js/render/renderExistingTag.function.js.map +1 -1
  64. package/js/render/update/processRenderOnceInit.function.d.ts +1 -2
  65. package/js/render/update/processRenderOnceInit.function.js +1 -2
  66. package/js/render/update/processRenderOnceInit.function.js.map +1 -1
  67. package/js/render/update/updateExistingTagComponent.function.js +5 -6
  68. package/js/render/update/updateExistingTagComponent.function.js.map +1 -1
  69. package/js/state/subject.function.d.ts +1 -1
  70. package/js/state/subject.function.js.map +1 -1
  71. package/js/state/subscribeWith.function.js +0 -1
  72. package/js/state/subscribeWith.function.js.map +1 -1
  73. package/js/subject/Subject.class.d.ts +2 -2
  74. package/js/subject/Subject.class.js.map +1 -1
  75. package/js/tag/Context.types.d.ts +4 -3
  76. package/js/tag/ContextItem.type.d.ts +2 -2
  77. package/js/tag/ProcessInit.type.d.ts +1 -2
  78. package/js/tag/checkDestroyPrevious.function.js +1 -2
  79. package/js/tag/checkDestroyPrevious.function.js.map +1 -1
  80. package/js/tag/checkTagValueChange.function.d.ts +2 -1
  81. package/js/tag/checkTagValueChange.function.js +2 -2
  82. package/js/tag/checkTagValueChange.function.js.map +1 -1
  83. package/js/tag/domMetaCollector.js +0 -3
  84. package/js/tag/domMetaCollector.js.map +1 -1
  85. package/js/tag/getDomTag.function.d.ts +0 -2
  86. package/js/tag/getDomTag.function.js +9 -12
  87. package/js/tag/getDomTag.function.js.map +1 -1
  88. package/js/tag/guaranteeInsertBefore.function.js +1 -4
  89. package/js/tag/guaranteeInsertBefore.function.js.map +1 -1
  90. package/js/tag/html.d.ts +2 -2
  91. package/js/tag/index.d.ts +1 -1
  92. package/js/tag/index.js +1 -1
  93. package/js/tag/index.js.map +1 -1
  94. package/js/tag/processUpdateContext.function.js +4 -3
  95. package/js/tag/processUpdateContext.function.js.map +1 -1
  96. package/js/tag/smartRemoveKids.function.js +3 -12
  97. package/js/tag/smartRemoveKids.function.js.map +1 -1
  98. package/js/tag/tagElement.js +1 -1
  99. package/js/tag/tagElement.js.map +1 -1
  100. package/js/tag/update/checkSubContext.function.d.ts +2 -1
  101. package/js/tag/update/checkSubContext.function.js +2 -2
  102. package/js/tag/update/checkSubContext.function.js.map +1 -1
  103. package/js/tag/update/compareArrayItems.function.d.ts +2 -3
  104. package/js/tag/update/compareArrayItems.function.js +10 -15
  105. package/js/tag/update/compareArrayItems.function.js.map +1 -1
  106. package/js/tag/update/createAndProcessContextItem.function.js +2 -9
  107. package/js/tag/update/createAndProcessContextItem.function.js.map +1 -1
  108. package/js/tag/update/deleteSubContext.function.js +1 -4
  109. package/js/tag/update/deleteSubContext.function.js.map +1 -1
  110. package/js/tag/update/forceUpdateExistingValue.function.d.ts +2 -1
  111. package/js/tag/update/forceUpdateExistingValue.function.js +3 -3
  112. package/js/tag/update/forceUpdateExistingValue.function.js.map +1 -1
  113. package/js/tag/update/processDomTagInit.function.d.ts +1 -2
  114. package/js/tag/update/processDomTagInit.function.js +1 -2
  115. package/js/tag/update/processDomTagInit.function.js.map +1 -1
  116. package/js/tag/update/processFirstSubjectValue.function.d.ts +1 -2
  117. package/js/tag/update/processFirstSubjectValue.function.js +1 -2
  118. package/js/tag/update/processFirstSubjectValue.function.js.map +1 -1
  119. package/js/tag/update/processNewSubjectTag.function.js +4 -16
  120. package/js/tag/update/processNewSubjectTag.function.js.map +1 -1
  121. package/js/tag/update/processRegularValue.function.js +4 -7
  122. package/js/tag/update/processRegularValue.function.js.map +1 -1
  123. package/js/tag/update/processSubscribe.function.d.ts +3 -6
  124. package/js/tag/update/processSubscribe.function.js +3 -6
  125. package/js/tag/update/processSubscribe.function.js.map +1 -1
  126. package/js/tag/update/processTagArray.js +2 -2
  127. package/js/tag/update/processTagArray.js.map +1 -1
  128. package/js/tag/update/processTagComponentInit.function.d.ts +1 -2
  129. package/js/tag/update/processTagComponentInit.function.js +1 -2
  130. package/js/tag/update/processTagComponentInit.function.js.map +1 -1
  131. package/js/tag/update/processTagResult.function.js +2 -8
  132. package/js/tag/update/processTagResult.function.js.map +1 -1
  133. package/js/tag/update/setupSubscribe.function.js +1 -1
  134. package/js/tag/update/setupSubscribe.function.js.map +1 -1
  135. package/js/tag/update/tagValueUpdateHandler.function.d.ts +3 -2
  136. package/js/tag/update/tagValueUpdateHandler.function.js +6 -5
  137. package/js/tag/update/tagValueUpdateHandler.function.js.map +1 -1
  138. package/js/tag/update/tryUpdateToTag.function.d.ts +2 -1
  139. package/js/tag/update/tryUpdateToTag.function.js +7 -36
  140. package/js/tag/update/tryUpdateToTag.function.js.map +1 -1
  141. package/js/tag/update/updateToDiffValue.function.d.ts +2 -2
  142. package/js/tag/update/updateToDiffValue.function.js +3 -3
  143. package/js/tag/update/updateToDiffValue.function.js.map +1 -1
  144. package/js/tagJsVars/getArrayTagJsVar.function.js +1 -2
  145. package/js/tagJsVars/getArrayTagJsVar.function.js.map +1 -1
  146. package/js/tagJsVars/getInnerHTML.function.js +5 -7
  147. package/js/tagJsVars/getInnerHTML.function.js.map +1 -1
  148. package/js/tagJsVars/getSimpleTagVar.function.d.ts +1 -2
  149. package/js/tagJsVars/getSimpleTagVar.function.js +10 -11
  150. package/js/tagJsVars/getSimpleTagVar.function.js.map +1 -1
  151. package/js/tagJsVars/subscribe.function.js +1 -1
  152. package/js/tagJsVars/subscribe.function.js.map +1 -1
  153. package/package.json +1 -1
package/bundle.js CHANGED
@@ -1,2 +1,2 @@
1
- var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t){return t.renderCount=t.renderCount||0,t.global={}}t.d(e,{W9:()=>ee,cg:()=>c,m0:()=>s,rS:()=>pe,Y2:()=>r,ei:()=>ne,B7:()=>P,TU:()=>V,XF:()=>re,PC:()=>te,Ot:()=>_n,Mj:()=>$n,tD:()=>u,j8:()=>st,xe:()=>Zr,um:()=>ot,E2:()=>rr,OH:()=>sr,TB:()=>_,Ii:()=>rt,m3:()=>Jn,yV:()=>Ut,zV:()=>E,pf:()=>L,ze:()=>or,WJ:()=>J,Ng:()=>nt,HG:()=>Vn,aZ:()=>U,Ey:()=>$,O:()=>Q,F3:()=>Ft,Ie:()=>o,ts:()=>Ot,B4:()=>I,Az:()=>$r,Xi:()=>hr,sV:()=>Kr,Ah:()=>n,ck:()=>mr,Gk:()=>Qt,j_:()=>Mn,zC:()=>de,cF:()=>to,jU:()=>i,PB:()=>a,qy:()=>Ur,cy:()=>y,Tn:()=>b,Gv:()=>m,yL:()=>h,D8:()=>p,Ze:()=>f,_4:()=>g,mn:()=>d,z:()=>tr,sA:()=>ar,TG:()=>In,MG:()=>ur,PL:()=>Kt,CG:()=>qr,nI:()=>fn,PZ:()=>Jt,r5:()=>nr,uc:()=>Ae,pG:()=>ue,QB:()=>Se,Ll:()=>Ct,vP:()=>Rn,wk:()=>zn,xP:()=>Kn,bc:()=>Yn,B1:()=>ir,RX:()=>lr,ag:()=>cr,Tc:()=>fe,Hf:()=>Xr,_A:()=>Yt,Ag:()=>M,NU:()=>dr,hW:()=>gr,wB:()=>Zn,id:()=>Un,MC:()=>Fn,SZ:()=>Gn});class r{get(t){return"todo"}}const o="";var s,c;!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"}(c||(c={}));const u={tag:"html",dom:"dom",templater:"templater",tagComponent:"tagComponent",tagArray:"tagArray",subscribe:"subscribe",signal:"signal",renderOnce:"renderOnce",stateRender:"stateRender",version:Date.now()};function a(t,e,n){cn.push((()=>i(t,e,n)))}function i(t,e,n){void 0!==n&&!1!==n&&null!==n?t.setAttribute(e,n):t.removeAttribute(e)}function l(t,e,n,r,o,s){switch(r){case"init":{const t=s.added;return void ln.push((function(){e({target:n,stagger:t})}))}case"destroy":{const t=++s.removed,r=o.subject.global;return r.destroys=r.destroys||[],void r.destroys.push((()=>e({target:n,stagger:t})))}case"autofocus":return void ln.push((()=>n.focus()));case"autoselect":return void ln.push((()=>n.select()));case"style":{const r=t.split(".");return void cn.push((()=>n.style[r[1]]=e))}case"class":return void function(t,e,n){const r=t.split(".");if(r.shift(),e){for(const t of r)cn.push((()=>n.classList.add(t)));return}for(const t of r)cn.push((()=>n.classList.remove(t)))}(t,e,n)}throw new Error(`Invalid special attribute of ${r}. ${t}`)}function p(t){switch(t){case s.string:case s.number:case s.boolean:return!0}return!1}function f(t){if(!t)return!1;switch(t.tagJsType){case u.dom:case u.tag:case u.templater:return!0}return!1}function d(t){const e=t?.tagJsType;return e===u.tagComponent||e===u.stateRender}function g(t){return m(t)&&typeof t.subscribe===c.function}function h(t){return t&&b(t.then)}function b(t){return typeof t===c.function}function m(t){return typeof t===c.object&&null!==t}function y(t){return Array.isArray(t)}function v(t,e){return w(t,e)}function w(t,e){if(null===t||typeof t!==c.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=y(t)?[]:Object.create(Object.getPrototypeOf(t));if(y(t))for(let r=0;r<t.length;r++)n[r]=w(t[r],e-1);else for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=w(t[r],e-1));return n}function T(t,e,n){return C(t,e,n)}function C(t,e,n){return!(t!==e&&(r=t,o=e,!b(r)||!b(o)||r.toString()!==o.toString()))||(n<0||typeof t===c.object&&typeof e===c.object&&(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():y(t)&&y(e)?function(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!C(t[r],e[r],n-1))return!1;return!0}(t,e,n-1):!y(t)&&!y(e)&&function(t,e,n){const r=Object.keys(t),o=Object.keys(e);if(0===r.length&&0===o.length)return!0;if(r.length!==o.length)return!1;for(const s of r){if(!o.includes(s)||!C(t[s],e[s],n-1))return!1}return!0}(t,e,n-1)));var r,o}function k(t){return t.map(S)}function S(t,e){const n=t,r=t?.tagJsType;if(r)switch(r){case u.signal:case u.subscribe:case u.stateRender:return;case u.dom:case u.tag:case u.templater:return k(n.values)}return y(t)?k(n):v(t,e)}function j(t){return S(t,me)}function x(t){return S(t,ye)}function E(t){const e=new P;return e.subscribeWith=e=>{const n=[],r=[],o=(o,s)=>{n[s]=!0,r[s]=o;if(n.length===t.length){for(const t of n)if(!t)return;e(r,c)}},s=[...t],c=s.shift().subscribe((t=>o(t,0))),u=s.map(((t,e)=>t.subscribe((t=>o(t,e+1)))));return c.subscriptions=u,c},e}function A(t,e,n){const r=P.globalSubCount$;P.globalSubCount$.next(r.value+1);const o=function(){o.unsubscribe()};return o.callback=e,o.subscriptions=[],o.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 r=P.globalSubCount$;P.globalSubCount$.next(r.value-1),t.unsubscribe=()=>t;const o=t.subscriptions;for(const t of o)t.unsubscribe();return t}(o,n,e)},o.add=t=>(o.subscriptions.push(t),o),o.next=t=>{e(t,o)},o}function O(t,e,n){const r=[...e],o=r.shift(),s=t=>{if(r.length)return O(t,r,n);n(t)};let c=s;const u=o(t,{setHandler:t=>c=t,next:s});c(u)}class P{value;onSubscription;methods=[];isSubject=!0;subscribers=[];subscribeWith;constructor(t,e){this.value=t,this.onSubscription=e}subscribe(t){const e=A(0,t,this.subscribers),n=this.subscribeWith;if(n){if(this.methods.length){const n=t;t=t=>{O(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,r)=>{const o=r?.unsubscribe;o?o():setTimeout((()=>e.unsubscribe()),0),t(n)}));return this}pipe(...t){const e=new P(this.value);return e.setMethods(t),e.subscribeWith=t=>this.subscribe(t),e.next=t=>this.next(t),e}setMethods(t){this.methods=t}static all(t){return E(t.map((t=>{if(g(t))return t;return new P(t,(e=>(e.next(t),e)))})))}static globalSubCount$=new P(0)}class V extends P{value;onSubscription;_value;constructor(t,e){super(t,e),this.value=t,this.onSubscription=e,this._value=t,J(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 J(t){Object.defineProperty(t,"value",{set(e){t._value=e,t.emit()},get:()=>t._value})}function I(t,e,n){const r={templater:t,subject:e,castedProps:n,appSupport:void 0},o=e.global;return o.blocked=[],o.destroy$=new P,r}function M(t,e,n,r){e.appSupport=n;const o=t.props;return o&&(e.propsConfig=function(t,e,n){const r=t.templater;if(r.tagJsType!==u.stateRender){switch(r.propWatch){case pe.IMMUTABLE:return t.propsConfig={latest:e,castProps:n};case pe.SHALLOW:return t.propsConfig={latest:e.map(j),castProps:n}}return t.propsConfig={latest:e.map(x),castProps:n}}}(e,o,r)),e}function L(t,e,n,r,o){const s={templater:t,subject:r,castedProps:o,appSupport:void 0};return s.ownerSupport=e,s.appSupport=n,s}function W(t,e){const n=e.providers;if(n)for(const t of n)for(let n=t.children.length-1;n>=0;--n){t.children[n].subject.global===e&&t.children.splice(n,1)}e.destroy$&&e.destroy$.next(),t.subject.renderCount=0}function H(t,e){for(const n of t){const t=n.lastArray;if(t){H(t,e);continue}const r=n.value;if(r?.tagJsType===u.subscribe){r.delete(n,e);continue}const o=n.global;if(!o)continue;const s=o.newest,c=o.subscriptions;c&&c.forEach(D),d(s.templater)&&W(s,o);H(o.context,s)}}function N(t,e=[],n=[]){for(const r of t){const t=r.global;if(!t)continue;const o=t.newest;if(o){e.push(o);const r=t.subscriptions;r&&n.push(...r)}const s=t.context;s&&N(s,e,n)}return{tags:e,subs:n}}function D(t){t.unsubscribe()}function R(t,e,n,r,o){const s=t.length-1,c=e-r,u=c<0||s<c,a=n[e];if(u)return B(a,o),1;const i=function(t,e,n,r,o,s){const c=e&&t!==e.arrayValue;if(c)return B(n,r),o.splice(s,1),2;return 0}(a.value.arrayValue,t[e],a,o,n,e);return i}function B(t,e){!function(t,e){if(t){Q(t.oldest,t)}else{const t=e.simpleValueElm;delete e.simpleValueElm,sn.push({processor:dn,args:[t]})}}(t.global,t),++e.removed}function _(t,e){return!y(t)&&($(e),9)}function $(t){U(t,t.lastArray)}function U(t,e){const n={added:0,removed:0};for(let t=0;t<e.length;++t)B(e[t],n);delete t.lastArray}function F(t,e){const n=t.context,r=t.destroys;if(r)return function(t,e,n){if(G.length=0,t.forEach(z),G.length){const t=Promise.all(G).then((()=>{++pn.locks,Z(e.context,n),X(e),--pn.locks,fn()}));return void n.push(t)}++pn.locks,Z(e.context,n),X(e),--pn.locks,fn()}(r,t,e);Z(n,e),X(t)}const G=[];function z(t){const e=t();e instanceof Promise&&G.push(e)}function Z(t,e){for(const n of t){if(n.withinOwnerElement)continue;const t=n.lastArray;if(t){U(n,t);continue}const r=n.simpleValueElm;if(r){delete n.simpleValueElm,sn.push({processor:dn,args:[r]});continue}const o=n.global;if(void 0===o)continue;if(!0===o.deleted)continue;o.deleted=!0;o.oldest&&F(o,e)}}function X(t){t.htmlDomMeta.forEach(q)}function q(t){const e=t.marker;e&&sn.push({processor:dn,args:[e]});const n=t.domElement;n&&sn.push({processor:dn,args:[n]})}function Q(t,e){const n=t.subject;e.deleted=!0,n.renderCount=0;const r=[];return H(e.context,t),e.destroy$&&W(t,e),F(e,r),r}function Y(t,e){const n=t.templater,r=e.templater,o=n?.tag||t,s=r.tag;if(n?.tagJsType===u.stateRender)return n.dom===r.dom;switch(o.tagJsType){case u.dom:return s?.tagJsType===u.dom&&function(t,e){const n=t.dom,r=e.dom;return n===r}(o,s);case u.tag:{const n=function(t,e,n,r){const o=t.strings,s=e.strings;if(o.length!==s.length)return!1;if(!o.every(((t,e)=>s[e].length===t.length)))return!1;const u=n.templater.values||t.values,a=r.templater.values||e.values;return function(t,e){const n=t.length===e.length;if(!n)return!1;const r=e.every((function(e,n){const r=t[n];if(typeof e===c.function&&typeof r===c.function){return!!(e.toString()===r.toString())}return!0}));if(r)return!0;return!1}(u,a)}(o,s,t,e);return n}}throw new Error(`unknown tagJsType of ${o.tagJsType}`)}function K(t){switch(t){case void 0:case!1:case null:return o}return t}function tt(t){return{tagJsType:"simple",value:t,processInit:et,checkValueChange:rt,delete:nt}}function et(t,e,n,r,o,s){const c=K(t);s=e.placeholder;const u=e.paint={processor:yn,args:[s,c,t=>{e.simpleValueElm=t,delete e.paint}]};sn.push(u)}function nt(t){const e=t.simpleValueElm;delete t.simpleValueElm,delete t.tagJsVar,sn.push({processor:dn,args:[e]})}function rt(t,e){return null==t||typeof t!==c.object?(function(t,e){const n=K(t);if(e.paint)return void(e.paint.args[1]=n);const r=e.simpleValueElm;un.push([n,r])}(t,e),-1):(nt(e),6)}function ot(t,e,n,r){const o=t.subject.global;o.oldest=t,o.newest=t,++pn.locks;const s=function(t,e,n,r){const o=function(t){const e=t.templater,n=e.tag;if(n.tagJsType===u.dom)return n.dom;const r=n.strings;return $r(r,n.values)}(t),s=t.templater.tag,c=s.values,a=[],i=t.subject.global;i.context=a;const l=nn(o,c,t,e,a,0,n,r);return l}(t,e,n,r);return o.htmlDomMeta=s.dom,--pn.locks,s}function st(t,e,n){const r={value:t,withinOwnerElement:n};return e.push(r),r}function ct(t,e,n){return t.map((function(t){return function(t,e,n,r){if(f(t)||!t)return t;if(!e)return t;return ut(t,e,n,r)}(t,e.ownerSupport,e,n)}))}function ut(t,e,n,r,o){if(!t)return t;if(t.tagJsType)return t;if(typeof t===c.function)return r<=1?function(t,e,n){const r=t.mem;if(r)return t;const o=function(...t){return function(t,e,n,r){const o=r.subject.global,s=o?.newest||r,c=void 0===pr(),u=t.apply(e,n),a=function(){const t=s.subject.global;return t&&!0!==t.locked?(lt(s,r),u):u};if(c)return a();return Ct.tagClosed$.toCallback(a),u}(o.mem,e,t,n)};return o.original=t,o.mem=t,Object.assign(o,t),o}(t,o,e):t;if(r===ye)return t;return it(t)?t:y(t)?function(t,e,n,r){for(let o=t.length-1;o>=0;--o){const s=t[o];if(t[o]=ut(s,n,e,r+1,t),typeof s===c.function){if(s.mem)continue;at(r+1,o,s,t,e)}}return t}(t,n,e,r):function(t,e,n,r){const o=Object.keys(t);for(const s of o){const o=t[s],u=ut(o,n,e,r+1,t);if(t[s]===u)continue;const a=Object.getOwnPropertyDescriptor(t,s);if(!(a?.get||a?.set)&&(t[s]=u,typeof u===c.function)){if(o.mem)continue;at(r+1,s,o,t,e)}}return t}(t,n,e,r)}function at(t,e,n,r,o){if(t>0){const t=o.subject.global;r[e].subscription=t.destroy$.toCallback((function(){r[e]=n}))}}function it(t){return typeof t!==c.object||!t||t.tagJsType}function lt(t,e){const n=t.subject;if(Ee(t.templater)){return Oe(e,t)}const r=n.global;r.locked=!0,xe(r.newest,t,e,n),delete r.locked}function pt(t){let e=t;for(;e.ownerSupport&&!d(e.templater);)e=e.ownerSupport;return e.subject.global.newest||e}function ft(...t){return t}function dt(t){const e=Ct.stateConfig;return e.states[e.statesIndex]=t,++e.statesIndex,t(ft)}function gt(t){const e=Ct.stateConfig,n=e.statesIndex,r=pt(e.prevSupport).states[n];let o=[];r((function(...t){return o=t,t}));return e.states[e.statesIndex]=t,++e.statesIndex,t((function(...t){return o}))}function ht(t,e){e.handlers.handler=wt,e.handlers.statesHandler=dt,e.rearray=[],e.stateArray=[],e.states=[],e.statesIndex=0,e.support=t}function bt(t,e,n,r){n.rearray=r,n.stateArray=[],n.states=[],n.statesIndex=0,n.handlers.handler=vt,n.handlers.statesHandler=gt,n.prevSupport=e}class mt{}function yt(t){const e=t.callback;if(!e)return t.defaultValue;const[n]=function(t){const[e]=t(mt),[n]=t(e);return[e,n]}(e);return n}function vt(){const t=Ct.stateConfig,e=t.rearray[t.stateArray.length];return t.stateArray.push(e),e.defaultValue}function wt(t){const e=Ct.stateConfig;let n=t;if(typeof t===c.function&&(n=t()),typeof n===c.function){const t=n;n=function(...e){return t(...e)},n.original=t}const r={get:function(){return yt(r)},defaultValue:n};return e.stateArray.push(r),n}const Tt=new P(void 0,(function(t){pr()||t.next()})),Ct={stateConfig:{stateArray:[],version:Date.now(),handlers:{handler:wt,statesHandler:dt}},tagClosed$:Tt};function kt(t,e,n,r){const o=e.original,s=t.tagJsType===u.stateRender,a=Ct.stateConfig;let i;return a.support=n,s?i=t():(i=o(...r),typeof i===c.function&&(i=i())),i.templater=t,t.tag=i,n.state=a.stateArray,n.states=a.states,n}function St(t,e,n,r,o){const s=I(t,r,o);return s.ownerSupport=e,M(t,s,n,o)}function jt(t,e,n){const r=t.propWatch===pe.DEEP?ye:me,o=t.props,s=e.propsConfig;let c=s.castProps;const u=n?.propsConfig,a=u?.castProps;a&&(s.castProps=a,c=Te(e,n,n.ownerSupport,o,r));return c||ct(o,e,0)}function xt(t,e,n,r){const o=St(t,n,n.appSupport,e),s=o.propsConfig;if(s){const e=t.tagJsType!==u.tagComponent?[]:jt(t,o);s.castProps=e}const c=e.global,{support:a}=Se(o,c.newest,e,n);return function(t,e,n){ot(t,e,void 0,n.placeholder)}(a,r,e),a}function Et(t,e,n,r,o){const s=St(t,n,n.appSupport,e),c=s.propsConfig;if(c){const e=t.tagJsType!==u.tagComponent?[]:jt(t,s);c.castProps=e}const a=e.global,{support:i}=Se(s,a.newest,e,n);return function(t,e,n){let r=an.length;const o=ot(t,e,n,void 0);for(const t of o.dom)t.domElement&&an.splice(r++,0,{args:[n,t.domElement],processor:hn}),t.marker&&an.splice(r++,0,{args:[n,t.marker],processor:hn})}(i,r,o),i}function At(t,e,n,r){const o=t&&t.tagJsType;if(o){if(o===u.renderOnce)return;$t(e,t,n)}else{if(y(t))return Lt(e,t,n,{added:0,removed:0}),void(e.tagJsVar=Ht(t));typeof t!==c.function?r&&function(t,e){e.value=t,e.tagJsVar=tt(t);const n=e.placeholder,r=K(t),o=e.paint={processor:yn,args:[n,r,t=>{e.simpleValueElm=t,delete e.paint}]};sn.push(o)}(t,e):e.value=t}}function Ot(t,e,n){const r=t.tagJsVar.checkValueChange(e,t);-1!==r&&At(e,t,n,r)}function Pt(t,e,n){t!==n.value&&Ot(n,t,e)}function Vt(t,e,r){if(!e.global.newest)return void xt(t,e,r,{added:0,removed:0});!function(t,e,r){const o=r.global,s=o.newest,c=s.templater.wrapper,a=e.templater.wrapper;let i=!1;const l=e.templater.tagJsType,p=u.stateRender===l||u.renderOnce===l;if(p)i=e.templater.tagJsType===u.renderOnce||Y(s,e);else if(c&&a){i=c.original===a.original}const f=e.templater;if(!i)return void function(t,e,r){const o=t.global,s=o.oldest;Q(s,o),n(t);const c=xt(e,t,r,{added:0,removed:0})}(r,f,t);const d=p||function(t,e){const n=e.props,r=t.propsConfig,o=r.latest,s=de(n,o,t.templater.propWatch);return s}(s,f);if(!d){return void function(t,e,n,r,o){const s=t.props,c=Te(e,n,r,s,o),u=e.propsConfig;u.castProps=c;const a=n.propsConfig;a.latest=u.latest}(f,e,s,t,f.propWatch===pe.DEEP?ye:me)}if(o.locked)return void o.blocked.push(e);Ae(e),++r.renderCount}(r,St(t,r,r.appSupport,e),e)}function Jt(t,e,n,r,o,s){const c=Dt(t);return e.tagJsVar=c,c.processInit(t,e,n,r,o,s)}function It(t,e,n,r,o,s){n.handler=Pt;e.subject.global.locked=!0,Jt(t,n,e,r,o,s);delete e.subject.global.locked,n.value=t}function Mt(t,e,n,r,s){const c=document.createTextNode(o),u={value:t,withinOwnerElement:!1,placeholder:c};return n.added=n.added+1,s||sn.push({processor:gn,args:[r,c]}),It(t,e,u,n,s,r),s&&an.push({processor:hn,args:[s,c]}),u}function Lt(t,e,n,r,o){const s=void 0===t.lastArray;s&&(t.lastArray=[]);const c=t.lastArray;let u=t.placeholder,a=0;const i=[];if(!s){for(let t=0;t<c.length;++t){const n=c[t],o=R(e,t,c,a,r);0!==o?2!==o?a+=o:t-=1:i.push(n)}t.lastArray=i}const l=e.length;for(let s=0;s<l;++s){u=Wt(e,s,t.lastArray,n,u,r,o).placeholder}}function Wt(t,e,n,r,o,s,c){const u=t[e],a=n[e];if(a)return function(t,e,n,r,o,s,c,u){const a=n.length>o;if(a)return Pt(t,r,e),e;const i=Mt(t,r,c,s,u);return n.push(i),i}(u,a,n,r,e,o,s,c);const i=Mt(u,r,s,o,c);return n.push(i),i}function Ht(t){return{tagJsType:"array",value:t,processInit:Nt,checkValueChange:_,delete:$}}function Nt(t,e,n,r,o){Lt(e,t,n,r,o)}function Dt(t){const e=t?.tagJsType;return e?t:function(t){if(y(t))return Ht(t);return tt(t)}(t)}function Rt(t,e,n,r){const o=t[e],s=n[e];if(o===s.value)return;(0,s.handler)(o,r,s,t),s.value=o,s.tagJsVar=Dt(o)}function Bt(t,e){const n=t.subject.global.context;!function(t,e){const n=e.templater,r=e.templater.tag,o=n.values||r.values,s=t.templater.tag;s.values=o}(t,e),++pn.locks,function(t,e){const n=t.templater.tag.values;let r=0;const o=n.length;for(;r<o;)Rt(n,r,e,t),++r}(t,n),--pn.locks,fn()}const _t={added:0,removed:0};function $t(t,e,r){const o=e.tagJsType;if(d(e))return void 0===t.global&&n(t),Vt(e,t,r),!0;const s=t.global;if(s){const n=s.newest;if(n)return typeof e===c.function||function(t,e,n,r){const o=St(n.templater||n,r,r.appSupport,e);Bt(t.subject.global.oldest,o)}(n,t,e,r),!0}switch(o){case u.templater:return Gt(r,t,_t),!0;case u.tag:case u.dom:return function(t,e,r){const o=t;let s=o.templater;s||(s=zt(),o.templater=s,s.tag=o);const c=e.global?e.global:n(e);c.newest=Zt(s,r,e),Gt(r,e,_t)}(e,t,r),!0;case u.subscribe:return e.processInit(e,t,r,{added:0,removed:0},void 0,t.placeholder),!0}return!1}function Ut(t,e){const r=e.global;if(!r)return 663;const o=r?.newest;if(f(t)){return Y(t,o)?77:(Q(o,r),n(e),7)}const s=t?.tagJsType;if(s){return!0===$t(e,t,r.newest.ownerSupport)?-1:88}return Ft(e),8}function Ft(t){const e=t.global,n=e?.newest;Q(n,e),delete t.global,t.renderCount=0}function Gt(t,e,n){const r=e.global.newest;r.ownerSupport=t;return ot(r,n,void 0,e.placeholder),r}function zt(){return{tagJsType:u.templater,processInit:qt,checkValueChange:Ut}}function Zt(t,e,n){const r=L(t,e,e.appSupport,n);return n.global.context=[],r}function Xt(t,e,n,r,o,s){const c=Zt(t,n,e);c.ownerSupport=n;const u=ot(c,r,o,o?void 0:s);for(const t of u.dom)t.marker&&(o?an.push({args:[o,t.marker],processor:hn}):sn.push({processor:gn,args:[s,t.marker]})),t.domElement&&(o?an.push({args:[o,t.domElement],processor:hn}):sn.push({processor:gn,args:[s,t.domElement]}));return c}function qt(t,e,n,r,o,s){return o?Xt(t,e,n,r,o,s):Gt(n,e,r)}function Qt(t,e){const n={tagJsType:u.templater,processInit:qt,checkValueChange:Ut,delete:Ft,propWatch:t,props:e,key:function(t){return n.arrayValue=t,n}};return n}const Yt=[];function Kt(t,e,n){const r=Qt(pe.DEEP);r.tagJsType=t.tagJsType;const o=Zt(r,n,e);function s(){return r.tag=t(),o}return r.wrapper=s,s.tagJsType=t.tagJsType,s.original=t.original||t,o}class te extends Error{details;constructor(t,e,n={}){super(t),this.name=te.name,this.details={...n,errorCode:e}}}class ee extends te{constructor(t,e){super(t,"array-no-key-error",e),this.name=ee.name}}class ne extends te{constructor(t,e){super(t,"state-mismatch-error",e),this.name=ne.name}}class re extends te{constructor(t,e){super(t,"sync-callback-error",e),this.name=re.name}}function oe(t,e){const n=t.rearray;n.length&&n.length!==t.stateArray.length&&function(t,e,n){const r=`Saved states between renders are inconsistent. Expected ${t.length} states got ${n.stateArray.length}.`,o=e.templater?.wrapper;let s=o;(o?.original||o?.original)&&(s=o.original);const c={oldStates:n.stateArray,newStates:n.rearray,tagFunction:s,templater:e.templater},u=new ne(r,c);throw console.error(se,c),u}(n,e,t)}const se="State tracking requires same number of state calls on every render. This error typically occurs when a state call is only reachable behind a condition. Also, wrapping tags that have state, with tag(), often helps when tag is only reachable by a condition.";function ce(t,e){const n=t.subject;++n.renderCount;const r=Ct.stateConfig;t.state=r.stateArray,t.states=r.states,n.global.newest=t,oe(r,t),delete r.prevSupport,delete r.support,delete r.stateArray,delete r.states,Ct.tagClosed$.next(e)}function ue(t,e,n,r){!function(t,e){const n=e?.state,r=Ct.stateConfig;if(n)return void bt(0,e,Ct.stateConfig,n);ht(t,r)}(t,e);const o=t.templater;let s;if(o.tagJsType===u.stateRender){const e=o;s=St(o,r,t.appSupport,n),kt(o,e,s)}else{s=(0,o.wrapper)(t,n,e)}return ce(s,r),s}function ae(t,e,r,o,s,c){n(e);const u=Kt(t,e,r);ue(u,void 0,e,r);return Xt(u.templater,e,r,o,s,c)}function ie(t,e,r,o,s){if(n(e),s){return Et(t,e,r,o,s)}return xt(t,e,r,o)}let le=0;var pe;function fe(t,e=pe.SHALLOW){const n=function(...r){const o=Qt(e,r);o.tagJsType=u.tagComponent,o.processInit=ie;const s=function(t,e){return function(n,r,o){const s=jt(t,n,o),c=n.ownerSupport,u=St(t,c,n.appSupport,r,s);return kt(t,e,u,s)}}(o,n);return s.original=t,o.wrapper=s,o},r=t;return n.original=t,r.tags=Yt,r.setUse=Ct,r.ValueTypes=u,r.tagIndex=le++,Yt.push(n),n}function de(t,e,n){if(Ve(t,e))return 11;switch(n){case pe.NONE:return 1;case pe.SHALLOW:return be(t,e);case pe.IMMUTABLE:return he(t,e)}return function(t,e){let n=t,r=e;n=[...t],r=[...e||[]];if(!n.every(((t,e)=>function(t,e,n,r){const o=r[e];if(typeof t===c.object){const e={...t},n={...o||{}},r=Object.entries(e).every((([t,r])=>ge(r,n[t],(()=>{delete e[t],delete n[t]}))));return r}return ge(t,o,(function(){n.splice(e,1),r.splice(e,1)}))}(t,e,n,r))))return 7;return!1}(t,e)}function ge(t,e,n){if(typeof t!==c.function)return!!T(t,e,ye)&&4;if(typeof e!==c.function)return!1;const r=e?.original;r&&(e=r);t.original&&(t=t.original);return t.toString()===e.toString()?(n(),5):(n(),6)}function he(t,e){const n=t.length;for(let r=0;r<n;++r){if(t[r]!==e[r])return 2}return!1}function be(t,e){const n=t.length;for(let r=0;r<n;++r){const n=t[r],o=e[r];if(y(n)&&y(o)){if(n===o)continue;return 3}if(typeof n!==c.function||typeof o!==c.function)if(typeof n!==c.object){if(n!==o)return 3.3}else if(typeof e===c.object){const t=Object.entries(n);for(const e of t){if(!ve(e,o))return 3.1}}}return!1}!function(t){t.DEEP="deep",t.SHALLOW="shallow",t.NONE="none",t.IMMUTABLE="immutable"}(pe||(pe={})),fe.renderOnce=function(){throw new Error("Do not call tag.renderOnce as a function but instead set it as: `(props) => tag.renderOnce = () => html`` `")},fe.use=function(){throw new Error("Do not call tag.use as a function but instead set it as: `(props) => tag.use = (use) => html`` `")},fe.deepPropWatch=fe,fe.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`` `")},fe.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`` `")},fe.immutableProps=function(t){return fe(t,pe.IMMUTABLE)},fe.watchProps=function(t){return fe(t,pe.SHALLOW)},Object.defineProperty(fe,"renderOnce",{set(t){t.tagJsType=u.renderOnce,t.processInit=ae,t.delete=Ft,t.checkValueChange=function(){return-1}}}),Object.defineProperty(fe,"use",{set(t){t.original={setUse:Ct,tags:Yt},t.tagJsType=u.stateRender,t.processInit=ie,t.checkValueChange=Ut,t.delete=Ft}});const me=3,ye=10;function ve([t,e],n){const r=n[t];return typeof e===c.function&&typeof r===c.function||r===e}function we(t,e,n,r,o,s){return null==t||s>o?e:typeof t===c.function?e.mem?(t.mem=e.mem,e):(t.mem=e,t):it(e)?e:y(e)?function(t,e,n,r,o,s){for(let c=t.length-1;c>=0;--c){const u=t[c],a=e[c];t[c]=we(a,u,n,r,s,o+1)}return t}(e,t,n,r,s,o):function(t,e,n,r,o,s){const c=Object.keys(t);for(const u of c){const c=t[u],a=we(e[u],c,n,r,s,o+1);if(c===a)continue;const i=Object.getOwnPropertyDescriptor(t,u)?.set;i||(t[u]=a)}return t}(e,t,n,r,s,o)}function Te(t,e,n,r,o,s=-1){const c=e.subject.global.newest;if(!c){const e=ct(r,t,s);r.push(...e);return t.propsConfig.castProps=e,r}const u=(e=c||e).propsConfig.castProps,a=[];for(let e=0;e<r.length;++e){const c=r[e],i=we(u[e],c,t,n,o,s+1);a.push(i)}return t.propsConfig.castProps=a,a}function Ce(t){const e=t.subject,r=e.global,{subs:o,tags:s}=N(r.context);ke(r);for(const t of s){const e=t.subject.global;if(!0===e.deleted)return;ke(e)}r.subscriptions&&o.forEach(D),n(e)}function ke(t){t.deleted=!0,F(t,[])}function Se(t,e,n,r){const o=e?.templater,s=o?.tag,c=ue(t,e,n,r),a=!e||Y(e,c);if(a){if(e){const t=e.templater.tag;t&&n.renderCount>0&&function(t,e,n){if(t.tagJsType===u.dom){const r=n?.dom;return void(r!==t.dom&&Ce(e))}if(n){const r=n.strings;if(r){const n=r?.length;n!==t.strings.length&&Ce(e)}}}(t,e,s)}}else{!function(t,e){const n=t.subject.global;let r=-1;const o=n.providers=n.providers||[],s=o.length-1;for(;r++<s;){const t=o[r];let s=-1;const c=t.children.length-1;for(;s++<c;)if(n===t.children[s].subject.global)return t.children.splice(s,1),void t.children.push(e)}}(e,c),Ce(e);const t=c.subject.global;t.oldest=c,t.newest=c}const i=e?.ownerSupport;return c.ownerSupport=r||i,{support:c,wasLikeTags:a}}const je={added:0,removed:0};function xe(t,e,n,r){const o=r.global,{support:s,wasLikeTags:c}=Se(e,t,r,n);return c?(Bt(o.oldest,s),s):(Gt(n,r,je),s)}function Ee(t){return u.templater===t.tagJsType}function Ae(t){const e=t.subject.global,n=Ee(t.templater),r=t.ownerSupport;if(e.locked)return e.blocked.push(t),t;if(n){return Oe(r,t)}e.locked=!0;const o=t.subject;e.blocked.length&&(t=e.blocked.pop(),e.blocked=[]);const s=xe(e.newest,t,r,o);return delete e.locked,s}function Oe(t,e){const n=t.subject.global;if(!n||!0===n.deleted)return e;return Ae(n.newest||t)}function Pe(t,e,n){const r=function(t,e){const n=t.props,r=e.propsConfig,o=r.latest;if(Ve(n,o))return!0;switch(t.propWatch){case pe.IMMUTABLE:return he(n,o);case pe.SHALLOW:return be(n,o)}return!T(n,o,ye)}(e,n);return!(!t||!r)}function Ve(t,e){return t.length!==e.length}function Je(t,e){const n=function(t,e,n=[]){const r=t.subject;n.push({support:t,renderCount:r.renderCount,provider:e});const o=e.children;for(let t=o.length-1;t>=0;--t){const r=o[t],s=r.subject;n.push({support:r,renderCount:s.renderCount,provider:e})}return n}(t,e);return n}function Ie(t){return t.support}function Me(t,e=[]){const n=t.subject.global,r=Ee(t.templater),o=t.ownerSupport;if(n.locked)return e.push(t),e;if(r)return Me(o,e);const s=t,c=d(s.templater),a=t.templater.tagJsType,i=o&&a!==u.stateRender&&(!c||Pe(o,s.templater,s)),l=function(t){const e=t.subject.global.providers;if(!e)return[];const n=[];for(const t of e){const e=Je(t.owner,t);n.push(...e.map(Ie))}return n}(s);return e.push(...l),i?(Me(o,e),c&&e.push(s),e):(e.push(s),e)}function Le(t){++pn.locks,t.forEach(We),--pn.locks,fn()}function We(t){const e=t.subject.global;e&&Ae(e.newest)}const He="no-data-ever",Ne="promise-no-data-ever";function De(t,e){const n=e.subject.global,r=function(t,e){if(!0!==n.deleted)return function(t,e,n,r,o){const s=pt(e),c=s.subject,u=c.global;u.locked=!0;const a=t.apply(r,o);delete u.locked;const i=function(t,e){const n=e.subject.global;return function(t,e,n){return Le(Me(t)),function(t,e,n){if(h(t)){return e.subject.global.locked=!0,t.then((()=>{if(!0===n.deleted)return Ne;delete e.subject.global.locked;return Le(Me(e)),Ne}))}return He}(e,t,n)}(e,t,n)}(a,s);return i}(r.tagFunction,r.support,r.states,t,e)};r.tagFunction=t;const o=pt(e);r.support=e;const s=o.states;return r.states=s,r}const Re=["init","destroy"];function Be(t,e,n,r,o,s,c){if(c)return l(t,e,n,c,s,o);r(n,t,e)}function _e(t,e,n,r){const o=t.appElement;"blur"===e&&(e="focusout");const s="_"+e,c=t.subject.global.events;if(!c[e]){const t=function(t){t.originalStopPropagation=t.stopPropagation,$e(t,s,t.target)};c[e]=t,o.addEventListener(e,t)}n[s]=r,n[e]=r}function $e(t,e,n){const r=n[e];if(r){let e=!1;if(t.stopPropagation=function(){e=!0,t.originalStopPropagation.call(t)},r(t),t.defaultPrevented||e)return}const o=n.parentNode;o&&$e(t,e,o)}function Ue(t,e,n,r){const o=function(...e){return o.tagFunction(t,e)};o.tagFunction=e,o.support=n,_e(n.appSupport,r,t,o)}function Fe(t){if(t.startsWith("class."))return"class";const e=function(t){switch(t){case"autoselect":return"autoselect";case"autofocus":return"autofocus";case"oninit":case"init":return"oninit";case"ondestroy":case"destroy":return"destroy"}return!1}(t);return!1!==e||!!t.startsWith("style.")&&"style"}const Ge={added:0,removed:0};function ze(t,e,n,r){if(n.isNameOnly)return function(t,e,n,r,o,s,u,a){if(n){if(Ke(e))return void r.removeAttribute(n);if(typeof n===c.object)if(typeof e===c.object)for(const t in n)t in e||cn.push((function(){r.removeAttribute(t)}));else for(const t in n)cn.push((function(){r.removeAttribute(t)}))}Xe(t,e,r,o,s,u,a)}(r,t,n.value,n.element,e,n.howToSet,[],Ge),void(n.value=t);const o=n.element;!function(t,e,n,r,o,s,c,a){if(b(t))return function(t,e,n,r,o,s,c,a){const i=t.templater.wrapper;if((i?.tagJsType||i?.original?.tagJsType)!==u.renderOnce)return Qe(c,e,t,r,n);return qe(e,n,r,o,s,t,a)}(o,t,r,e,c,s,n,a);qe(t,r,e,c,s,o,a)}(t,n.attrName,n,o,e,n.howToSet,n.isSpecial,Ge),n.value=t}function Ze(t,e,n,r,o,s,u,a,i){const p=Ye(e);if(p>=0){const e=t[p],c=st(e,s,!0);return c.isAttr=!0,c.element=n,c.howToSet=o,c.isNameOnly=!0,c.handler=ze,void Xe(t,e,n,r,o,s,a)}const f=Ye(i);if(f>=0){const i=t[f],p={isAttr:!0,element:n,attrName:e,withinOwnerElement:!0};return s.push(p),p.handler=ze,function(t,e,n,r,o,s,u,a){n.attrName=t,n.element=r,n.howToSet=o,typeof e===c.function?a&&Re.includes(t)?l(t,e,r,t,s,u):Qe(n,e,s,t,r):(n.attrName=t,n.element=r,n.howToSet=o,n.isSpecial=a,Be(t,e,r,o,u,s,a))}(e,i,p,n,o,r,a,u),void(p.value=i)}return Be(e,i,n,o,a,r,u)}function Xe(t,e,n,r,s,u,a){if(!Ke(e))if(typeof e!==c.object)0!==e.length&&s(n,e,o);else for(const o in e){const c=e[o];Ze(t,o,n,r,s,u,Fe(o),a,c)}}function qe(t,e,n,r,o,s,c){if(!1===r){switch(t){case void 0:case!1:case null:return void cn.push((function(){e.removeAttribute(n)}))}if(b(t))return Ue(e,t,s,n);o(e,n,t)}else l(n,t,e,r,s,c)}function Qe(t,e,n,r,o){return Ue(o,e=De(e,n),n,r)}function Ye(t){return m(t)&&"tagJsVar"in t?t.tagJsVar:-1}function Ke(t){return null==t||!1===t}function tn(t,e,n,r,s,c,u){const a=document.createTextNode(o),i=st(t,e,s>0);i.placeholder=a,c?an.push({processor:hn,args:[c,a]}):sn.push({processor:gn,args:[u,a]}),It(t,n,i,r,c,u)}const en=function(){};function nn(t,e,n,r,s,c,u,a){const i=[];u&&void 0===a&&(a=document.createTextNode(o),an.push({args:[u,a],processor:hn}),u=void 0);for(let o=0;o<t.length;++o){const l=t[o],p=l.v;if(!isNaN(p)){tn(e[s.length],s,n,r,c,u,a);continue}const f={};if(i.push(f),"text"===l.nn){on(f,l,u,a);continue}const d=rn(f,l,e,n,s,r,u,a);l.ch&&(f.ch=nn(l.ch,e,n,r,s,c+1,d,a).dom)}return{dom:i,context:s}}function rn(t,e,n,r,o,s,c,u){const a=t.domElement=document.createElement(e.nn);if(e.at)for(const t of e.at){const e=t[0],c=t[1];Ze(n,e,a,r,i,o,t[2]||!1,s,c)}return c?an.push({args:[c,a],processor:hn}):sn.push({processor:gn,args:[u,a]}),a}function on(t,e,n,r){const o=t,s=o.tc=e.tc;n?an.push({processor:wn,args:[n,s,t=>o.domElement=t]}):sn.push({processor:vn,args:[r,s,t=>o.domElement=t]})}let sn=[],cn=[],un=[],an=[],ln=[];const pn={locks:0};function fn(){if(!(pn.locks>0)){for(const t of cn)t();for(const[t,e]of un)e.textContent=t;for(const t of an)t.processor(...t.args);for(const t of sn)t.processor(...t.args);sn=[],cn=[],an=[],un=[];for(const t of ln)t();ln=[]}}function dn(t){t.parentNode.removeChild(t)}function gn(t,e){t.parentNode.insertBefore(e,t)}function hn(t,e){t.appendChild(e)}const bn="object"==typeof document&&document.createElement("div");function mn(t){return bn.innerHTML=t,document.createTextNode(bn.innerHTML)}function yn(t,e,n=en){const r=mn(e);gn(t,r),n(r)}function vn(t,e,n=en){bn.innerHTML=e;const r=document.createTextNode(bn.textContent);gn(t,r),n(r)}function wn(t,e,n){bn.innerHTML=e;const r=document.createTextNode(bn.textContent);hn(t,r),n(r)}function Tn(t,e){for(let n=0;n<t.length;++n){jn(t[n],e[n])}}let Cn;function kn(...t){return Cn=t,t}function Sn(){return Cn}function jn(t,e){t(kn,1),e(Sn,2)}function xn(t,e,n,r){for(let n=t.length-1;n>=0;--n){const r=t[n].get(),o=e[n].callback;o&&o(r)}for(let t=r.length-1;t>=0;--t){An.length=0,En=0;(0,r[t])(On),n[t](Pn)}}let En=0;const An=[];function On(...t){return An.push(t),t}function Pn(...t){return An[En++]}function Vn(t,e){const n=t.subContext;n.deleted=!0,delete t.subContext;const r=n.appendMarker;if(r&&(sn.push({processor:dn,args:[r]}),delete n.appendMarker),delete t.delete,t.handler=Pt,!n.hasEmitted)return;const o=n.contextItem;return o.tagJsVar.delete(o,e),77}function Jn(t,e,n){if(!t||!t.tagJsType||t.tagJsType!==u.subscribe){return n.tagJsVar.delete(n,e),At(t,n,e,99),99}const r=n.subContext;return r.hasEmitted?(r.callback=t.callback,r.valueHandler(r.lastValue),-1):-1}function In(t,e,n,r,o){e.hasEmitted=!0,e.contextItem=Mt(t,n,r,o)}function Mn(t,e){let n;return t&&(n=e=document.createTextNode(o),an.push({processor:hn,args:[t,e]})),{appendMarker:n,insertBefore:e}}function Ln(t,e,n,r,o,s,c){const{appendMarker:u,insertBefore:a}=Mn(s,c),i=function(t,e,n,r,o){const s=pt(e);let c=function(t){In(t,i,e,n,r),c=function(t){Ot(i.contextItem,t,e),a||Ct.stateConfig.support||fn()}};function u(t){i.lastValue=t;const e=s.subject.global.newest;var n;n=s,Tn(e.states,n.states),i.callback&&(t=i.callback(t)),c(t)}let a=!0;const i={valueHandler:u,callback:o};return i.subscription=t.subscribe(u),a=!1,i}(t,n,r,a,o);return i.appendMarker=u,e.subContext=i,e.handler=Jn,i}function Wn(t,e){return t.subContext.subscription.unsubscribe(),Vn(t,e)}function Hn(t,e,n,r,o,s){return Ln(t.Observable,e,n,r,t.callback,o,s)}function Nn(t,e,n,r,o,s){const c=t.Observable,u=Ln(c,e,n,r,t.callback,o,s);return u.hasEmitted||u.valueHandler(c.value||t.withDefault),u}function Dn(t,e,n,r,o){Ln(t,e,n,r,void 0,o)}function Rn(t){return pr()?zn((()=>Bn(t))):Bn(t)}function Bn(t){let e=t;const n=new Set;return{tagJsType:u.signal,processInit:Dn,get value(){return e},set value(t){e!==t&&(e=t,n.forEach((e=>e(t))))},subscribe(t){t(e),n.add(t);const r=()=>n.delete(t);return r.unsubscribe=r,r}}}class _n extends P{value;constructor(t){super(t),this.value=t}subscribe(t){const e=super.subscribe(t);return t(this.value,e),e}}class $n extends P{value;constructor(t){super(t),this.value=t,this._value=t,J(this)}subscribe(t){const e=super.subscribe(t);return t(this._value,e),e}}function Un(t){return(e,n)=>{n.setHandler((()=>{})),t(e,n.next)}}function Fn(t){return(e,n)=>{n.setHandler((()=>{}));t(e).then((t=>n.next(t)))}}const Gn=t=>(e,n)=>{n.setHandler((()=>{}));const r=t(e).subscribe((t=>{r.unsubscribe(),n.next(t)}))};function zn(t){return Ct.stateConfig.handlers.handler(t)}const Zn=(t,e)=>qn(t,e),Xn=t=>t;const qn=(t,e,{init:n,before:r,final:o=Xn}={})=>{const s=zn({pastResult:void 0,values:void 0}),c=s.values;if(void 0===c){if(r&&!r(t))return s.values=t,s.pastResult;const u=(n||e)(t,c);return s.pastResult=o(u),s.values=t,s.pastResult}if(t.every(((t,e)=>t===c[e])))return s.pastResult;if(r&&!r(t))return s.values=t,s.pastResult;const u=e(t,c);return s.pastResult=o(u),c.length=0,c.push(...t),s.pastResult};function Qn(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=zn((()=>pr())),r=zn((()=>new _n(void 0))),o=zn((()=>({stateArray:Ct.stateConfig.stateArray,states:Ct.stateConfig.states}))),s=(t,s)=>(qn(t,((t,e)=>{const c=pr(),u=s(t,e);if(c!==n){const t=o.stateArray,e=n.subject.global.oldest;xn(t,e.state,o.states,e.states)}r.next(u)}),e.setup),r);return s.setup=e.setup,Qn((()=>s),s),s}}),Object.defineProperty(e,"truthy",{get(){const e=t();return e.setup.before=t=>t.every((t=>t)),e}}),e}function Yn(t){return pr()?zn((()=>new P(t))):new P(t)}function Kn(t){return Ct.stateConfig.handlers.statesHandler(t)}function tr(t){const e=Rn([]),n=Rn(0),r=Rn(0);let o=[],s=0;return r.value=n.value,t(((...t)=>(o=t,e.value))),Zn(o,(()=>{++s,e.value=o,t((()=>o))})),Kn(((o,c)=>{if(s)return t(((...t)=>(c&&1!==c||(e.value=t),e.value))),r.value=n.value,void++n.value;t((()=>e.value))})),++s,e.value}function er(){return{stateDiff:0,provider:void 0}}Qn((()=>function(t){const e=(e,n)=>qn(e,n,t);return e.setup=t,Qn((()=>e),e),e}({})),Zn),Yn._value=t=>{const e=zn((function(){return{stateArray:Ct.stateConfig.stateArray,states:Ct.stateConfig.states}})),n=pr();return zn((function(){return new _n(t).pipe((t=>(xn(n.state,e.stateArray,n.states,e.states),t)))}))},Yn.all=function(t){const e=zn((()=>({stateArray:Ct.stateConfig.stateArray,states:Ct.stateConfig.states}))),n=pr();return P.all(t).pipe((t=>(xn(n.state,e.stateArray,n.states,e.states),t)))};const nr={create:t=>{const e=zn(er);if(e.stateDiff){let t=e.stateDiff;for(;t--;)zn(void 0);return zn(void 0)}const n=zn((()=>{const n=Ct.stateConfig,r=n.stateArray.length,o=t.prototype?new t:t(),s=n.support,c=n.stateArray.length-r,u={constructMethod:t,instance:o,stateDiff:c,owner:s,children:[]};e.provider=u;const a=s.subject.global;return(a.providers=a.providers||[]).push(u),e.stateDiff=c,o})),r=t,o=r.compareTo=r.toString();return e.provider.constructMethod.compareTo=o,n},inject:function(t){return zn((function(){const e=t,n=e.compareTo=e.compareTo||t.toString(),r=pr(),o=[];let s={ownerSupport:r.ownerSupport};for(;s.ownerSupport;){const t=s.ownerSupport.subject.global.providers;if(!t){s=s.ownerSupport;continue}const e=t.find((t=>{o.push(t);if(t.constructMethod.compareTo===n)return!0}));if(e){const t=r.subject.global;return(t.providers=t.providers||[]).push(e),e.children.push(r),e.instance}s=s.ownerSupport}const c=`Could not inject provider: ${t.name} ${t}`;throw console.warn(`${c}. Available providers`,o),new Error(c)}))}};function rr(t){const e=pr();if(!e)throw cr;return or(e,Ct.stateConfig,t)}function or(t,e,n){const r=e.states;return function(...e){return t.subject.renderCount>0?function(t,e,n,...r){const o=t.subject.global.newest,s=n(...r);return Ae(o),h(s)&&s.finally((()=>{Ae(o)})),s}(t,r,n,...e):n(...e)}}const sr=()=>{const t=pr();if(!t)throw cr;const e=Ct.stateConfig;return function(n){return or(t,e,n)}},cr=new re("callback() was called outside of synchronous rendering. Use `callback = callbackMaker()` to create a callback that could be called out of sync with rendering");function ur(t){zn(t)}function ar(t){zn((function(){pr().subject.global.destroy$.toCallback(t)}))}function ir(t,e){return{tagJsType:u.subscribe,processInit:Hn,delete:Wn,checkValueChange:function(){return console.log("weird to be here"),-1},Observable:t,callback:e,states:pt(pr()).states}}function lr(t,e,n){return{tagJsType:u.subscribe,processInit:Nn,delete:Wn,checkValueChange:function(){return console.log("weird to be here subscribeWith"),-1},Observable:t,callback:n,withDefault:e,states:pt(pr()).states}}function pr(){return Ct.stateConfig.support}function fr(t,e,r,o,s,c){const u=t;let a=u.templater;a||(a=function(t){const e=zt();return e.tag=t,t.templater=e,e}(u));const i=n(e);return s?Xt(a,e,r,o,s,c):(i.newest=Zt(a,r,e),Gt(r,e,o))}const dr=":tagvar",gr=":";function hr(t,e){const n={values:e,ownerSupport:pr(),dom:t,tagJsType:u.dom,processInit:fr,checkValueChange:Ut,delete:Ft,key:function(t){return n.arrayValue=t,n},setInnerHTML:function(t){return t.owner=n,n},html:{dom:function(t,e){return n.children={dom:t,values:e},n}}};return Object.defineProperty(n,"innerHTML",{set(t){t.outerHTML=n,n._innerHTML=t,t.oldProcessInit=t.processInit,t.processInit=br}}),n}function br(t,e,n,r,o,s){fr(t.outerHTML,e,n,r,o,s),e.handler=(t,e,n)=>{Ot(n,t?.outerHTML||t,e)},t.checkValueChange=function(t,e){return function(t,e){return Ut(t,e)}(t,e)}}function mr(t,e){const n={values:e,ownerSupport:pr(),tagJsType:u.tag,processInit:fr,checkValueChange:Ut,delete:Ft,strings:t,key:t=>(n.arrayValue=t,n),setInnerHTML:function(t){return t.owner=n,n},html:function(t,e){return n.children={strings:t,values:e},n}};return Object.defineProperty(n,"innerHTML",{set(t){t.outerHTML=n,t.processInit=br}}),n}const yr=/(:tagvar\d+:)/,vr="ondoubleclick",wr=/([:_a-zA-Z0-9\-.]+)\s*(?:=\s*"([^"]*)"|=\s*(\S+))?/g,Tr=/<\/?([a-zA-Z0-9-]+)((?:\s+[a-zA-Z_:*][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)+\s*|\s*)\/?>/g;function Cr(t){const e=[],n=[],r=[];let o=null,s=-1,c=0;const u=new RegExp(Tr,"g");for(t=function(t){return t.replace(kr,(function(t){return t.replace(/\[l t\]/g,"[l&nbsp;t]").replace(/\[g t\]/g,"[g&nbsp;t]").replace(/</g,"[l t]").replace(/>/g,"[g t]")}))}(t);c<t.length;){const a=u.exec(t);if(!a)break;const[i,l,p]=a,f=i.startsWith("</"),d=i.endsWith("/>");if(c<a.index){const e=t.slice(c,a.index);if(e.trim()){const t=Er(e);for(let e of t)e.startsWith(dr)&&(e=dr+ ++s+gr),jr(o,n,e)}}if(c=a.index+i.length,f){o=r.pop()||null;continue}const g=[];let h;for(;null!==(h=wr.exec(p));){const t=h[1]||h[3]||h[5];let n=h[2]||h[4]||h[6];if(void 0===t)continue;const r=""!==h[2],o=void 0===n&&r,c=t.toLowerCase(),u=c.startsWith("on")?Sr(c):c;if(o){if(t.slice(0,dr.length)===dr){const t=dr+ ++s+gr;e.push(["at",t]),g.push([t]);continue}if(h[0].startsWith(t)&&h[0].slice(t.length,h[0].length).search(/\s+$/)>=0){g.push([u]);continue}n=dr+ ++s+gr}r||(n=h[2]);const a=[u,n],i=Fe(c);i&&a.push(i),g.push(a)}const b={nn:l};g.length&&(b.at=g),o?(o.ch||(o.ch=[]),o.ch.push(b)):n.push(b),d||(r.push(o),o=b)}if(c<t.length){const e=t.slice(c);if(e.trim()){const t=Er(e);for(const e of t)e.startsWith(dr)&&++s,jr(o,n,e)}}return n}const kr=new RegExp("(\x3c!--[\\s\\S]*?--\x3e)","g");function Sr(t){if(t.startsWith("on")){return t.length===vr.length&&t===vr?"dblclick":t.slice(2,t.length)}return t}function jr(t,e,n){!function(t,e,n){t?(t.ch||(t.ch=[]),t.ch.push(n)):e.push(n)}(t,e,{nn:"text",tc:xr(n)})}function xr(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&nbsp;t\]/g,"[l t]").replace(/\[g&nbsp;t\]/g,"[g t]")}))}function Er(t){return t.split(yr).filter(Ar)}function Ar(t){return""!==t}const Or=/(^:tagvar\d+:|:tagvar\d+:$)/g,Pr="__safeTagVar";function Vr(t,e){return function(t,e){const n=[];for(let r=0;r<t.length;++r){const o=t[r];r<e.length?n.push(o+dr+r+gr):n.push(o)}return function(t,e,n){const r=n.length-e.length;if(r>0)for(let n=r;n>0;--n)t.push(dr+(e.length+n-1)+gr)}(n,t,e),n}(t.map(Jr),e)}function Jr(t){return t.replace(Or,((t,e)=>Pr+e))}const Ir=new RegExp(dr+"(\\d+)"+gr,"g"),Mr="ch";function Lr(t,e,n=[],r=[]){const o=t;for(let t=0;t<o.length;t++){const s=[...r,t],c=o[t];if(c.at){const t=c.at;c.at=Hr(t,e)}if(c.ch){const t=c.ch,r=[...s,Mr];c.ch=Lr(t,e,n,r)}t=Wr(c,e,o,t)}return o}function Wr(t,e,n,r){if("text"!==t.nn)return r;const o=t;let c,u=o.tc;if(typeof u!==s.string)return r;for(;null!==(c=Ir.exec(u));){const t=c[1],o=parseInt(t,10);if(!isNaN(o)&&o<e){const t=dr+o+gr,e=u.slice(c.index+t.length);n.splice(r,1,{nn:"text",v:o}),u=e,Ir.lastIndex=0}}return o.tc=u,r}function Hr(t,e){const n=[];for(const r of t){const[t,o,c]=r;if(t.startsWith(dr)){const r=parseInt(t.replace(dr,""),10);if(!isNaN(r)&&r<e){n.push([{tagJsVar:r}]);continue}}if(typeof o===s.string&&o.startsWith(dr)){const r=parseInt(o.replace(dr,""),10);if(!isNaN(r)&&r<e){n.push([t,{tagJsVar:r},c]);continue}}n.push(r)}return n}const Nr="__safeTagVar";const Dr=/__safeTagVar(\d+)/g;function Rr(t){if(t.at&&(t.at=t.at?t.at.map((t=>{if(1===t.length)return t;const[,e]=t;if(typeof e===s.string&&e.startsWith(Nr)){const n=parseInt(e.replace(Nr,""),10);t[1]=dr+n+gr}return t})):[]),t.ch){const e=t.ch;for(let t=0;t<e.length;t++){const n=e[t];if("text"===n.nn){if(typeof n.tc!==s.string)return;n.tc=n.tc.replace(Dr,((t,e)=>dr+e+gr))}Rr(n)}0===e.length&&delete t.ch}}function Br(t){return t.length}const _r={};function $r(t,e){const n=function(t){const e=t.map(Br);return e.push(t.length),Number(e.join(""))}(t),r=_r[n],o=r&&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,r);if(o)return r.domMetaMap;const s=function(t,e){return Vr(t,e),Cr(Vr(t,e).join(""))}(t,e),c=Lr(s,e.length);c.forEach(Rr);const u={interpolation:void 0,string:void 0,strings:t,values:e,domMetaMap:c};return _r[n]=u,c}function Ur(t,...e){const n=mr(t,e),r=Qt(pe.NONE);return r.tag=n,n.templater=r,n}function Fr(t,e){t.domElement&&e.appendChild(t.domElement),t.marker&&e.appendChild(t.marker)}function Gr(t,e,n){const r=e.global,o=I(t,e);return M(t,o,o),o.appElement=n,r.oldest=r.oldest||o,r.newest=o,o}function zr(t,e,n,r,s,c,a){const i=document.createTextNode(o);Yt.push(n.wrapper||{original:n});const l=function(t,e,n,r,o){r.placeholder=e;const s=r.global,c=s.oldest,a=s.newest===c,i=St(t,s.newest,s.newest.appSupport,r);a||bt(0,s.newest,Ct.stateConfig,c.state);if(t.tagJsType===u.stateRender)return function(t,e,n,r,o){const s=t.wrapper||{original:t};if(!e){const e=Gr(t,r,o);return ce(e),e}return kt(t,s,n),ce(n),n}(t,o,i,r,n);const l=t.wrapper,p=l(i,r);return ce(i),p}(n,i,s,c,a);if(e.isApp=!0,a&&(r.tag=l.templater.tag),!s)throw new Error(`Cannot tagElement, element received is type ${typeof s} and not type Element`);s.destroy=function(){const t=e.events;for(const e in t){const n=t[e];s.removeEventListener(e,n)}e.events={},++pn.locks;const n=Q(l,e);return--pn.locks,fn(),n},++pn.locks;const p=function(t,e,n,r,o,s){console.debug("🏷️ Building element into tag...",{element:e,app:o});const c=ot(t,{added:0,removed:0},e,void 0);n.oldest=t,n.newest=t;let a=r.setUse;if(r.tagJsType!==u.stateRender){const t=o.original;a=t.setUse,t.isApp=!0}e.setUse=a,e.ValueTypes=u,Zr.push({element:e,support:t});const i=document.createDocumentFragment();i.appendChild(s);for(const t of c.dom)Fr(t,i);return console.debug("🏷️ Element Tag DOM built ✅"),i}(l,s,e,n,t,i);return--pn.locks,fn(),s.appendChild(p),{support:l,tags:Yt,ValueTypes:u}}Ur.dom=function(t,...e){return hr(t,e)};const Zr=[];function Xr(t,e,r){const o=Zr.findIndex((t=>t.element===e));if(o>=0){const t=Zr[o].support;Q(t,t.subject.global),Zr.splice(o,1),console.warn("Found and destroyed app element already rendered to element",{element:e})}let s=()=>l(r);s.propWatch=pe.NONE,s.tagJsType=u.stateRender,s.props=[r],s.isApp=!0;const a=function(t,e){const r={value:t,withinOwnerElement:!1,renderCount:0,global:void 0,tagJsVar:{tagJsType:"templater",checkValueChange:Ut,delete:Ft,processInit:function(){console.log("do nothing app function")}}},o=n(r);return o.events={},Gr(t,r,e),r}(s,e),i=a.global;ht(i.newest,Ct.stateConfig);let l=t(r);const p=typeof l==c.function;return p||(d(l)?(i.newest.propsConfig={latest:[r],castProps:[r]},s.propWatch=l.propWatch,s.tagJsType=l.tagJsType,s.wrapper=l.wrapper,s=l):(s.tag=l,l=t)),zr(t,i,s,l,e,a,p)}function qr(t){if(!t)return en;const e=pr();if(!e)throw new Error("output must be used in render sync fashion");return(...n)=>{const r=e.ownerSupport,o=r.subject.global.newest;Tn(o.states,r.states);const s=t(...n);Tn(r.states,o.states);return lt(o,o.ownerSupport.subject.global.newest),s}}function Qr(t,e,n){const r=t.owner._innerHTML;r.processInit=r.oldProcessInit;const o=n.subContext?.contextItem;Ot(o,r,e)}function Yr(t,e,n,r,o,s){e.subContext={},e.handler=Qr,function(t,e,n,r,o,s){const{appendMarker:c,insertBefore:u}=Mn(s,o),a=n.subContext;a.appendMarker=c;const i=t.owner,l=i._innerHTML;l.processInit=l.oldProcessInit,In(l,a,e,r,u)}(t,n,e,r,s,o)}function Kr(){return{tagJsType:"innerHTML",processInit:Yr,delete:Vn,checkValueChange:()=>console.log("weird innerHTML check")}}const to={tagElement:Xr,renderWithSupport:Se,renderSupport:Ae,renderTagOnly:ue,paint:fn};var eo=e.W9,no=e.cg,ro=e.m0,oo=e.rS,so=e.Y2,co=e.ei,uo=e.B7,ao=e.TU,io=e.XF,lo=e.PC,po=e.Ot,fo=e.Mj,go=e.tD,ho=e.j8,bo=e.xe,mo=e.um,yo=e.E2,vo=e.OH,wo=e.TB,To=e.Ii,Co=e.m3,ko=e.yV,So=e.zV,jo=e.pf,xo=e.ze,Eo=e.WJ,Ao=e.Ng,Oo=e.HG,Po=e.aZ,Vo=e.Ey,Jo=e.O,Io=e.F3,Mo=e.Ie,Lo=e.ts,Wo=e.B4,Ho=e.Az,No=e.Xi,Do=e.sV,Ro=e.Ah,Bo=e.ck,_o=e.Gk,$o=e.j_,Uo=e.zC,Fo=e.cF,Go=e.jU,zo=e.PB,Zo=e.qy,Xo=e.cy,qo=e.Tn,Qo=e.Gv,Yo=e.yL,Ko=e.D8,ts=e.Ze,es=e._4,ns=e.mn,rs=e.z,os=e.sA,ss=e.TG,cs=e.MG,us=e.PL,as=e.CG,is=e.nI,ls=e.PZ,ps=e.r5,fs=e.uc,ds=e.pG,gs=e.QB,hs=e.Ll,bs=e.vP,ms=e.wk,ys=e.xP,vs=e.bc,ws=e.B1,Ts=e.RX,Cs=e.ag,ks=e.Tc,Ss=e.Hf,js=e._A,xs=e.Ag,Es=e.NU,As=e.hW,Os=e.wB,Ps=e.id,Vs=e.MC,Js=e.SZ;export{eo as ArrayNoKeyError,no as BasicTypes,ro as ImmutableTypes,oo as PropWatches,so as RouteQuery,co as StateMismatchError,uo as Subject,ao as Subjective,io as SyncCallbackError,lo as TagError,po as ValueSubject,fo as ValueSubjective,go as ValueTypes,ho as addOneContext,bo as appElements,mo as buildBeforeElement,yo as callback,vo as callbackMaker,wo as checkArrayValueChange,To as checkSimpleValueChange,Co as checkSubContext,ko as checkTagValueChange,So as combineLatest,jo as createHtmlSupport,xo as createTrigger,Eo as defineValueOn,Ao as deleteSimpleValue,Oo as deleteSubContext,Po as destroyArray,Vo as destroyArrayContextItem,Jo as destroySupport,Io as destroySupportByContextItem,Mo as empty,Lo as forceUpdateExistingValue,Wo as getBaseSupport,Ho as getDomMeta,No as getDomTag,Do as getInnerHTML,Ro as getNewGlobal,Bo as getStringTag,_o as getTemplaterResult,$o as guaranteeInsertBefore,Uo as hasPropChanges,Fo as hmr,Go as howToSetFirstInputValue,zo as howToSetInputValue,Zo as html,Xo as isArray,qo as isFunction,Qo as isObject,Yo as isPromise,Ko as isSimpleType,ts as isStaticTag,es as isSubjectInstance,ns as isTagComponent,rs as letProp,os as onDestroy,ss as onFirstSubContext,cs as onInit,us as oneRenderToSupport,as as output,is as paint,ls as processFirstSubjectValue,ps as providers,fs as renderSupport,ds as renderTagOnly,gs as renderWithSupport,hs as setUseMemory,bs as signal,ms as state,ys as states,vs as subject,ws as subscribe,Ts as subscribeWith,Cs as syncError,ks as tag,Ss as tagElement,js as tags,xs as upgradeBaseToSupport,Es as variablePrefix,As as variableSuffix,Os as watch,Ps as willCallback,Vs as willPromise,Js as willSubscribe};
1
+ var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t){return t.renderCount=t.renderCount||0,t.global={}}t.d(e,{W9:()=>Xe,cg:()=>A,m0:()=>E,rS:()=>Hn,Y2:()=>r,ei:()=>qe,B7:()=>yt,TU:()=>vt,XF:()=>Qe,PC:()=>Ze,Ot:()=>Ve,Mj:()=>Me,tD:()=>O,j8:()=>pn,xe:()=>eo,um:()=>ln,E2:()=>Ye,OH:()=>tn,TB:()=>Qt,Ii:()=>Nt,m3:()=>ke,yV:()=>un,zV:()=>ht,pf:()=>ce,ze:()=>Ke,WJ:()=>wt,Ng:()=>Ht,HG:()=>Gr,aZ:()=>Kt,Ey:()=>Yt,O:()=>Zt,F3:()=>an,Ie:()=>x,ts:()=>Ce,B4:()=>oe,Az:()=>H,Xi:()=>Zr,sV:()=>co,Ah:()=>n,ck:()=>qr,Gk:()=>mn,j_:()=>je,zC:()=>Wn,cF:()=>uo,jU:()=>W,PB:()=>N,qy:()=>Qr,cy:()=>K,Tn:()=>Q,Gv:()=>Y,yL:()=>q,D8:()=>G,Ze:()=>z,_4:()=>X,mn:()=>Z,z:()=>Fe,sA:()=>rn,TG:()=>Se,MG:()=>nn,PL:()=>xn,CG:()=>ro,nI:()=>Nr,PZ:()=>le,r5:()=>ze,uc:()=>Yn,pG:()=>Pn,QB:()=>Xn,Ll:()=>Ct,vP:()=>Ie,wk:()=>We,xP:()=>Ue,bc:()=>_e,B1:()=>on,RX:()=>sn,ag:()=>en,Tc:()=>Nn,Hf:()=>no,_A:()=>yn,Ag:()=>se,NU:()=>o,wB:()=>Re,id:()=>Le,MC:()=>He,SZ:()=>Ne});class r{get(t){return"todo"}}const o=":tagvar",s=":";function c(t){if(t.startsWith("class."))return"class";const e=function(t){switch(t){case"autoselect":return"autoselect";case"autofocus":return"autofocus";case"oninit":case"init":return"oninit";case"ondestroy":case"destroy":return"destroy"}return!1}(t);return!1!==e||!!t.startsWith("style.")&&"style"}const u=new RegExp(o+"(\\d+)"+s,"g");function a(t){return t.search&&t.startsWith(o)?t.search(u):-1}const i=/(:tagvar\d+:)/,l="ondoubleclick",p=/([:_a-zA-Z0-9\-.]+)\s*(?:=\s*"([^"]*)"|=\s*(\S+))?/g,f=/<\/?([a-zA-Z0-9-]+)((?:\s+[a-zA-Z_:*][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)+\s*|\s*)\/?>/g;function d(t){const e=[],n=[],r=[];let c=null,u=-1,a=0;const l=new RegExp(f,"g");for(t=function(t){return t.replace(g,(function(t){return t.replace(/\[l t\]/g,"[l&nbsp;t]").replace(/\[g t\]/g,"[g&nbsp;t]").replace(/</g,"[l t]").replace(/>/g,"[g t]")}))}(t);a<t.length;){const f=l.exec(t);if(!f)break;const[d,g,b]=f,y=d.startsWith("</"),w=d.endsWith("/>");if(a<f.index){const e=t.slice(a,f.index);if(e.trim()){const t=m(e);for(let e of t)e.startsWith(o)&&e.search(i)>=0&&-1===e.search(k)&&(e=o+ ++u+s),h(c,n,e)}}if(a=f.index+d.length,y){c=r.pop()||null;continue}const T=[];let C;for(;null!==(C=p.exec(b));)u=v(C,u,e,T);const S={nn:g};T.length&&(S.at=T),c?(c.ch||(c.ch=[]),c.ch.push(S)):n.push(S),w||(r.push(c),c=S)}if(a<t.length){const e=t.slice(a);if(e.trim()){const t=m(e);for(const e of t)e.startsWith(o)&&++u,h(c,n,e)}}return n}const g=new RegExp("(\x3c!--[\\s\\S]*?--\x3e)","g");function h(t,e,n){!function(t,e,n){t?(t.ch||(t.ch=[]),t.ch.push(n)):e.push(n)}(t,e,{nn:"text",tc:b(n)})}function b(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&nbsp;t\]/g,"[l t]").replace(/\[g&nbsp;t\]/g,"[g t]")}))}function m(t){return t.split(i).filter(y)}function y(t){return""!==t}function v(t,e,n,r){const a=t[1]||t[3]||t[5];let i=t[2]||t[4]||t[6];if(void 0===a)return e;const p=""!==t[2],f=void 0===i&&p,d=a.toLowerCase(),g=d.startsWith("on")?function(t){if(t.startsWith("on"))return t.length===l.length&&t===l?"dblclick":t.slice(2,t.length);return t}(d):d;if(f){if(a.slice(0,o.length)===o){const t=o+ ++e+s;return n.push(["at",t]),r.push([t]),e}if(t[0].startsWith(a)&&t[0].slice(a.length,t[0].length).search(/\s+$/)>=0)return r.push([g]),e;const c=t[3];if(c.search(k)>=0){i=c;const t=[g,i];return r.push(t),e}i=o+ ++e+s}p||(i=t[2]);const h=i.split(T).filter((t=>t.length>0));h.length>1&&(i=h,h.forEach((t=>{t.search(u)>=0&&++e})));const b=[g,i],m=c(d);return m&&b.push(m),r.push(b),e}const w=new RegExp(o+"(\\d+)"+s,"gi"),T=new RegExp("("+o+"\\d+"+s+")","gi"),C=o.slice(0,o.length-1),k=new RegExp(C+"&#x72;(\\d+)"+s,"gi"),S=C+"&#x72;$1"+s;function j(t,e){const n=function(t,e){const n=t;return function(t,e){const n=[];for(let r=0;r<t.length;++r){const c=t[r].replace(w,S);r<e.length?n.push(c+o+r+s):n.push(c)}return function(t,e,n){const r=n.length-e.length;if(r>0)for(let n=r;n>0;--n)t.push(o+(e.length+n-1)+s)}(n,t,e),n}(n,e)}(t,e).join("");return d(n)}const x="";var E,A;!function(t){t.string="string",t.number="number",t.boolean="boolean",t[void 0]="undefined"}(E||(E={})),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",subscribe:"subscribe",signal:"signal",renderOnce:"renderOnce",stateRender:"stateRender",version:Date.now()},P="ch";function I(t,e,n=[],r=[]){const o=t;for(let t=0;t<o.length;t++){const s=[...r,t],c=o[t];if(c.at){const t=c.at;c.at=V(t,e)}if(c.ch){const t=c.ch,r=[...s,P];c.ch=I(t,e,n,r)}t=J(c,e,o,t)}return o}function J(t,e,n,r){if("text"!==t.nn)return r;const c=t;let a,i=c.tc;if(typeof i!==E.string)return r;for(;null!==(a=u.exec(i));){const t=a[1],c=parseInt(t,10);if(!isNaN(c)&&c<e){const t=o+c+s,e=i.slice(a.index+t.length);n.splice(r,1,{nn:"text",v:c}),i=e,u.lastIndex=0}}return c.tc=i,r}function V(t,e){const n=[];for(const r of t){const[t,s,c]=r;if(t.startsWith(o)){const r=parseInt(t.replace(o,""),10);if(!isNaN(r)&&r<e){n.push([{tagJsVar:r}]);continue}}if(typeof s===E.string&&s.startsWith(o)){const r=parseInt(s.replace(o,""),10);if(!isNaN(r)&&r<e){n.push([t,{tagJsVar:r},c]);continue}}n.push(r)}return n}function M(t){return t.length}const L={};function H(t,e){const n=function(t){const e=t.map(M);return e.push(t.length),Number(e.join(""))}(t),r=L[n],o=r&&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,r);if(o)return r.domMetaMap;const s=I(j(t,e),e.length),c={interpolation:void 0,string:void 0,strings:t,values:e,domMetaMap:s};return L[n]=c,s}function N(t,e,n){Jr.push([W,[t,e,n]])}function W(t,e,n){void 0!==n&&!1!==n&&null!==n?t.setAttribute(e,n):t.removeAttribute(e)}function R(t,e,n,r,o,s){switch(r){case"init":{const t=s.added++;return void Lr.push([F,[n,t,e]])}case"destroy":{const t=s.removed++,r=o.subject.global;return r.destroys=r.destroys||[],void r.destroys.push((()=>e({target:n,stagger:t})))}case"autofocus":return void Lr.push([U,[n]]);case"autoselect":return void Lr.push([_,[n]]);case"style":{const r=t.split(".");return void Jr.push([D,[n,r,e]])}case"class":return void function(t,e,n){const r=t.split(".");if(r.shift(),e){for(const t of r)Jr.push([B,[n,t]]);return}for(const t of r)Jr.push([$,[n,t]])}(t,e,n)}throw new Error(`Invalid special attribute of ${r}. ${t}`)}function D(t,e,n){const r=e[1];t.style[r]=n,t.style.setProperty(r,n)}function B(t,e){t.classList.add(e)}function $(t,e){t.classList.remove(e)}function _(t){t.select()}function U(t){t.focus()}function F(t,e,n){n({target:t,stagger:e})}function G(t){switch(t){case E.string:case E.number:case E.boolean:return!0}return!1}function z(t){if(!t)return!1;switch(t.tagJsType){case O.dom:case O.tag:case O.templater:return!0}return!1}function Z(t){const e=t?.tagJsType;return e===O.tagComponent||e===O.stateRender}function X(t){return Y(t)&&typeof t.subscribe===A.function}function q(t){return t&&Q(t.then)}function Q(t){return typeof t===A.function}function Y(t){return typeof t===A.object&&null!==t}function K(t){return Array.isArray(t)}function tt(t,e){return et(t,e)}function et(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=K(t)?[]:Object.create(Object.getPrototypeOf(t));if(K(t))for(let r=0;r<t.length;r++)n[r]=et(t[r],e-1);else for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=et(t[r],e-1));return n}function nt(t,e,n){return rt(t,e,n)}function rt(t,e,n){return!(t!==e&&(r=t,o=e,!Q(r)||!Q(o)||r.toString()!==o.toString()))||(n<0||typeof t===A.object&&typeof e===A.object&&(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():K(t)&&K(e)?function(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!rt(t[r],e[r],n-1))return!1;return!0}(t,e,n-1):!K(t)&&!K(e)&&function(t,e,n){const r=Object.keys(t),o=Object.keys(e);if(0===r.length&&0===o.length)return!0;if(r.length!==o.length)return!1;for(const s of r){if(!o.includes(s)||!rt(t[s],e[s],n-1))return!1}return!0}(t,e,n-1)));var r,o}function ot(){return Ct.stateConfig.support}function st(t){let e=t;for(;e.ownerSupport&&!Z(e.templater);)e=e.ownerSupport;return e.subject.global.newest||e}function ct(...t){return t}function ut(t){const e=Ct.stateConfig;return e.states[e.statesIndex]=t,++e.statesIndex,t(ct)}function at(t){const e=Ct.stateConfig,n=e.statesIndex,r=st(e.prevSupport).states[n];let o=[];r((function(...t){return o=t,t}));return e.states[e.statesIndex]=t,++e.statesIndex,t((function(...t){return o}))}function it(t,e){e.handlers.handler=gt,e.handlers.statesHandler=ut,e.rearray=[],e.stateArray=[],e.states=[],e.statesIndex=0,e.support=t}function lt(t,e,n,r){n.rearray=r,n.stateArray=[],n.states=[],n.statesIndex=0,n.handlers.handler=dt,n.handlers.statesHandler=at,n.prevSupport=e}class pt{}function ft(t){const e=t.callback;if(!e)return t.defaultValue;const[n]=function(t){const[e]=t(pt),[n]=t(e);return[e,n]}(e);return n}function dt(){const t=Ct.stateConfig,e=t.rearray[t.stateArray.length];return t.stateArray.push(e),e.defaultValue}function gt(t){const e=Ct.stateConfig;let n=t;if(typeof t===A.function&&(n=t()),typeof n===A.function){const t=n;n=function(...e){return t(...e)},n.original=t}const r={get:function(){return ft(r)},defaultValue:n};return e.stateArray.push(r),n}function ht(t){const e=new yt;return e.subscribeWith=e=>{const n=[],r=[],o=(o,s)=>{n[s]=!0,r[s]=o;if(n.length===t.length){for(const t of n)if(!t)return;e(r,c)}},s=[...t],c=s.shift().subscribe((t=>o(t,0))),u=s.map(((t,e)=>t.subscribe((t=>o(t,e+1)))));return c.subscriptions=u,c},e}function bt(t,e,n){const r=yt.globalSubCount$;yt.globalSubCount$.next(r.value+1);const o=function(){o.unsubscribe()};return o.callback=e,o.subscriptions=[],o.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 r=yt.globalSubCount$;yt.globalSubCount$.next(r.value-1),t.unsubscribe=()=>t;const o=t.subscriptions;for(const t of o)t.unsubscribe();return t}(o,n,e)},o.add=t=>(o.subscriptions.push(t),o),o.next=t=>{e(t,o)},o}function mt(t,e,n){const r=[...e],o=r.shift(),s=t=>{if(r.length)return mt(t,r,n);n(t)};let c=s;const u=o(t,{setHandler:t=>c=t,next:s});c(u)}class yt{value;onSubscription;methods=[];isSubject=!0;subscribers=[];subscribeWith;constructor(t,e){this.value=t,this.onSubscription=e}subscribe(t){const e=bt(0,t,this.subscribers),n=this.subscribeWith;if(n){if(this.methods.length){const n=t;t=t=>{mt(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,r)=>{const o=r?.unsubscribe;o?o():setTimeout((()=>e.unsubscribe()),0),t(n)}));return this}pipe(...t){const e=new yt(this.value);return e.setMethods(t),e.subscribeWith=t=>this.subscribe(t),e.next=t=>this.next(t),e}setMethods(t){this.methods=t}static all(t){return ht(t.map((t=>{if(X(t))return t;return new yt(t,(e=>(e.next(t),e)))})))}static globalSubCount$=new yt(0)}class vt extends yt{value;onSubscription;_value;constructor(t,e){super(t,e),this.value=t,this.onSubscription=e,this._value=t,wt(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 wt(t){Object.defineProperty(t,"value",{set(e){t._value=e,t.emit()},get:()=>t._value})}const Tt=new yt(void 0,(function(t){ot()||t.next()})),Ct={stateConfig:{stateArray:[],version:Date.now(),handlers:{handler:gt,statesHandler:ut}},tagClosed$:Tt};function kt(t,e){for(let n=0;n<t.length;++n){Et(t[n],e[n])}}let St;function jt(...t){return St=t,t}function xt(){return St}function Et(t,e){t(jt,1),e(xt,2)}function At(t,e,n,r){for(let n=t.length-1;n>=0;--n){const r=t[n].get(),o=e[n].callback;o&&o(r)}for(let t=r.length-1;t>=0;--t){Pt.length=0,Ot=0;(0,r[t])(It),n[t](Jt)}}let Ot=0;const Pt=[];function It(...t){return Pt.push(t),t}function Jt(...t){return Pt[Ot++]}function Vt(t){switch(t){case void 0:case!1:case null:return x}return t}function Mt(t){return{tagJsType:"simple",value:t,processInit:Lt,checkValueChange:Nt,delete:Ht}}function Lt(t,e,n,r,o,s){const c=Vt(t);s=e.placeholder;const u=e.paint=[_r,[s,c,t=>{e.simpleValueElm=t,delete e.paint}]];Ir.push(u)}function Ht(t){const e=t.simpleValueElm;if(delete t.simpleValueElm,delete t.tagJsVar,void 0===t.paint)Ir.push([Wr,[e]]);else{const e=Ir.findIndex((e=>e===t.paint));Ir.splice(e,1)}}function Nt(t,e){return null==t||typeof t!==A.object?(function(t,e){const n=Vt(t);if(e.paint)return void(e.paint[1][1]=n);const r=e.simpleValueElm;Vr.push([n,r])}(t,e),-1):(Ht(e),6)}function Wt(t,e){const n=e.providers;if(n)for(const t of n)for(let n=t.children.length-1;n>=0;--n){t.children[n].subject.global===e&&t.children.splice(n,1)}e.destroy$&&e.destroy$.next(),t.subject.renderCount=0}function Rt(t,e){for(const n of t){const t=n.lastArray;if(t){Rt(t,e);continue}const r=n.value;if(r?.tagJsType===O.subscribe){r.delete(n,e);continue}const o=n.global;if(!o)continue;const s=o.newest,c=o.subscriptions;c&&c.forEach(Bt),Z(s.templater)&&Wt(s,o);Rt(o.context,s)}}function Dt(t,e=[],n=[]){for(const r of t){const t=r.global;if(!t)continue;const o=t.newest;if(o){e.push(o);const r=t.subscriptions;r&&n.push(...r)}const s=t.context;s&&Dt(s,e,n)}return{tags:e,subs:n}}function Bt(t){t.unsubscribe()}function $t(t,e){const n=t.context,r=t.destroys;if(r)return function(t,e,n){if(_t.length=0,t.forEach(Ut),_t.length){const t=Promise.all(_t).then((()=>{++Hr.locks,Ft(e.context,n),Gt(e),--Hr.locks,Nr()}));return void n.push(t)}++Hr.locks,Ft(e.context,n),Gt(e),--Hr.locks,Nr()}(r,t,e);Ft(n,e),Gt(t)}const _t=[];function Ut(t){const e=t();e instanceof Promise&&_t.push(e)}function Ft(t,e){for(const n of t){if(n.withinOwnerElement)continue;const t=n.lastArray;if(t){Kt(n,t);continue}const r=n.simpleValueElm;if(r){delete n.simpleValueElm,Ir.push([Wr,[r]]);continue}const o=n.global;if(void 0===o)continue;if(!0===o.deleted)continue;o.deleted=!0;o.oldest&&$t(o,e)}}function Gt(t){t.htmlDomMeta.forEach(zt)}function zt(t){const e=t.marker;e&&Ir.push([Wr,[e]]);const n=t.domElement;n&&Ir.push([Wr,[n]])}function Zt(t,e){const n=t.subject;e.deleted=!0,n.renderCount=0;const r=[];return Rt(e.context,t),e.destroy$&&Wt(t,e),$t(e,r),r}function Xt(t,e,n,r){const o=t.length-1,s=e-r,c=s<0||o<s,u=n[e];if(c)return qt(u),1;const a=function(t,e,n,r,o){const s=e&&t!==e.arrayValue;if(s)return qt(n),r.splice(o,1),2;return 0}(u.value.arrayValue,t[e],u,n,e);return a}function qt(t){!function(t,e){if(t){return void Zt(t.oldest,t)}const n=e.simpleValueElm;delete e.simpleValueElm,Ir.push([Wr,[n]])}(t.global,t)}function Qt(t,e){return!K(t)&&(Yt(e),9)}function Yt(t){Kt(t,t.lastArray)}function Kt(t,e){for(let t=0;t<e.length;++t)qt(e[t]);delete t.lastArray}function te(t){return t.map(ee)}function ee(t,e){const n=t,r=t?.tagJsType;if(r)switch(r){case O.signal:case O.subscribe:case O.stateRender:return;case O.dom:case O.tag:case O.templater:return te(n.values)}return K(t)?te(n):tt(t,e)}function ne(t){return ee(t,$n)}function re(t){return ee(t,_n)}function oe(t,e,n){const r={templater:t,subject:e,castedProps:n,appSupport:void 0},o=e.global;return o.blocked=[],o.destroy$=new yt,r}function se(t,e,n,r){e.appSupport=n;const o=t.props;return o&&(e.propsConfig=function(t,e,n){const r=t.templater;if(r.tagJsType!==O.stateRender){switch(r.propWatch){case Hn.IMMUTABLE:return t.propsConfig={latest:e,castProps:n};case Hn.SHALLOW:return t.propsConfig={latest:e.map(ne),castProps:n}}return t.propsConfig={latest:e.map(re),castProps:n}}}(e,o,r)),e}function ce(t,e,n,r,o){const s={templater:t,subject:r,castedProps:o,appSupport:void 0};return s.ownerSupport=e,s.appSupport=n,s}function ue(t,e,n,r,o){const s=oe(t,r,o);return s.ownerSupport=e,se(t,s,n,o)}function ae(t,e,n,r,o){t!==n.value&&Ce(n,t,e,o)}function ie(t,e,r,o){if(!e.global.newest)return void t.processInit(t,e,r,o,void 0,e.placeholder);!function(t,e,r){const o=r.global,s=o.newest,c=s.templater.wrapper,u=e.templater.wrapper;let a=!1;const i=e.templater.tagJsType,l=O.stateRender===i||O.renderOnce===i;if(l)a=e.templater.tagJsType===O.renderOnce||cn(s,e);else if(c&&u){a=c.original===u.original}const p=e.templater;if(!a)return void function(t,e,r){const o=t.global,s=o.oldest;Zt(s,o),n(t),e.processInit(e,t,r,{added:0,removed:0},void 0,t.placeholder)}(r,p,t);const f=l||function(t,e){const n=e.props,r=t.propsConfig,o=r.latest,s=Wn(n,o,t.templater.propWatch);return s}(s,p);if(!f){return void function(t,e,n,r,o){const s=t.props,c=Gn(e,n,r,s,o),u=e.propsConfig;u.castProps=c;const a=n.propsConfig;a.latest=u.latest}(p,e,s,t,p.propWatch===Hn.DEEP?_n:$n)}if(o.locked)return void o.blocked.push(e);Yn(e),++r.renderCount}(r,ue(t,r,r.appSupport,e),e)}function le(t,e,n,r,o,s){const c=me(t);return e.tagJsVar=c,c.processInit(t,e,n,r,o,s)}function pe(t,e,n,r,o,s){n.handler=ae;e.subject.global.locked=!0,le(t,n,e,r,o,s);delete e.subject.global.locked,n.value=t}function fe(t,e,n,r,o){const s=document.createTextNode(x),c={value:t,withinOwnerElement:!1,placeholder:s};return o||Ir.push([Rr,[r,s]]),pe(t,e,c,n,o,r),o&&Mr.push([Dr,[o,s]]),c}function de(t,e,n,r,o){const s=void 0===t.lastArray;s&&(t.lastArray=[]);const c=t.lastArray;let u=t.placeholder,a=0;const i=[];if(!s){for(let t=0;t<c.length;++t){const n=c[t],r=Xt(e,t,c,a);0!==r?2!==r?a+=r:t-=1:i.push(n)}t.lastArray=i}const l=e.length;for(let s=0;s<l;++s){u=ge(e,s,t.lastArray,n,u,r,o).placeholder}}function ge(t,e,n,r,o,s,c){const u=t[e],a=n[e];if(a)return function(t,e,n,r,o,s,c,u){const a=n.length>o;if(a)return ae(t,r,e,0,c),e;const i=fe(t,r,c,s,u);return n.push(i),i}(u,a,n,r,e,o,s,c);const i=fe(u,r,s,o,c);return n.push(i),i}function he(t){return{tagJsType:"array",value:t,processInit:be,checkValueChange:Qt,delete:Yt}}function be(t,e,n,r,o){de(e,t,n,r,o)}function me(t){const e=t?.tagJsType;return e?t:function(t){if(K(t))return he(t);return Mt(t)}(t)}function ye(t,e,n,r,o){const s=t[e],c=n[e];if(s===c.value)return;(0,c.handler)(s,r,c,t,o),c.value=s,c.tagJsVar=me(s)}function ve(t,e){const n=t.subject.global.context;!function(t,e){const n=e.templater,r=e.templater.tag,o=n.values||r.values,s=t.templater.tag;s.values=o}(t,e),++Hr.locks,function(t,e){const n=t.templater.tag.values;let r=0;const o=n.length,s={added:0,removed:0};for(;r<o;)ye(n,r,e,t,s),++r}(t,n),--Hr.locks,Nr()}function we(t,e,r,o){if(Z(e))return void 0===t.global&&n(t),ie(e,t,r,o),!0;const s=t.global;if(s){const n=s.newest;if(n)return typeof e===A.function||function(t,e,n,r){const o=ue(n.templater||n,r,r.appSupport,e);ve(t.subject.global.oldest,o)}(n,t,e,r),!0}return e.processInit(e,t,r,o,void 0,t.placeholder),!0}function Te(t,e,n,r,o){const s=t&&t.tagJsType;if(s){if(s===O.renderOnce)return;we(e,t,n,o)}else{if(K(t))return de(e,t,n,o),void(e.tagJsVar=he(t));typeof t!==A.function?r&&function(t,e){e.value=t,e.tagJsVar=Mt(t);const n=e.placeholder,r=Vt(t),o=e.paint=[_r,[n,r,t=>{e.simpleValueElm=t,delete e.paint}]];Ir.push(o)}(t,e):e.value=t}}function Ce(t,e,n,r){const o=t.tagJsVar.checkValueChange(e,t,r);-1!==o&&Te(e,t,n,o,r)}function ke(t,e,n,r,o){if(!t||!t.tagJsType||t.tagJsType!==O.subscribe){return n.tagJsVar.delete(n,e),Te(t,n,e,99,o),99}const s=n.subContext;return s.hasEmitted?(s.callback=t.callback,s.valueHandler(s.lastValue),-1):-1}function Se(t,e,n,r,o){e.hasEmitted=!0,e.contextItem=fe(t,n,r,o)}function je(t,e){let n;return t&&(n=e=document.createTextNode(x),Mr.push([Dr,[t,e]])),{appendMarker:n,insertBefore:e}}function xe(t,e,n,r,o,s,c){const{appendMarker:u,insertBefore:a}=je(s,c),i=function(t,e,n,r,o){const s=st(e);let c=function(t){Se(t,i,e,n,r),c=function(t){Ce(i.contextItem,t,e,{added:0,removed:0}),a||Ct.stateConfig.support||Nr()}};function u(t){i.lastValue=t;const e=s.subject.global.newest;var n;n=s,kt(e.states,n.states),i.callback&&(t=i.callback(t)),c(t)}let a=!0;const i={valueHandler:u,callback:o};return i.subscription=t.subscribe(u),a=!1,i}(t,n,r,a,o);return i.appendMarker=u,e.subContext=i,e.handler=ke,i}function Ee(t,e){return t.subContext.subscription.unsubscribe(),Gr(t,e)}function Ae(t,e,n,r,o,s){return xe(t.Observable,e,n,r,t.callback,o,s)}function Oe(t,e,n,r,o,s){const c=t.Observable,u=xe(c,e,n,r,t.callback,o,s);return u.hasEmitted||u.valueHandler(c.value||t.withDefault),u}function Pe(t,e,n,r,o){xe(t,e,n,r,void 0,o)}function Ie(t){return ot()?We((()=>Je(t))):Je(t)}function Je(t){let e=t;const n=new Set;return{tagJsType:O.signal,processInit:Pe,get value(){return e},set value(t){e!==t&&(e=t,n.forEach((e=>e(t))))},subscribe(t){t(e),n.add(t);const r=()=>n.delete(t);return r.unsubscribe=r,r}}}class Ve extends yt{value;constructor(t){super(t),this.value=t}subscribe(t){const e=super.subscribe(t);return t(this.value,e),e}}class Me extends yt{value;constructor(t){super(t),this.value=t,this._value=t,wt(this)}subscribe(t){const e=super.subscribe(t);return t(this._value,e),e}}function Le(t){return(e,n)=>{n.setHandler((()=>{})),t(e,n.next)}}function He(t){return(e,n)=>{n.setHandler((()=>{}));t(e).then((t=>n.next(t)))}}const Ne=t=>(e,n)=>{n.setHandler((()=>{}));const r=t(e).subscribe((t=>{r.unsubscribe(),n.next(t)}))};function We(t){return Ct.stateConfig.handlers.handler(t)}const Re=(t,e)=>Be(t,e),De=t=>t;const Be=(t,e,{init:n,before:r,final:o=De}={})=>{const s=We({pastResult:void 0,values:void 0}),c=s.values;if(void 0===c){if(r&&!r(t))return s.values=t,s.pastResult;const u=(n||e)(t,c);return s.pastResult=o(u),s.values=t,s.pastResult}if(t.every(((t,e)=>t===c[e])))return s.pastResult;if(r&&!r(t))return s.values=t,s.pastResult;const u=e(t,c);return s.pastResult=o(u),c.length=0,c.push(...t),s.pastResult};function $e(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=We((()=>ot())),r=We((()=>new Ve(void 0))),o=We((()=>({stateArray:Ct.stateConfig.stateArray,states:Ct.stateConfig.states}))),s=(t,s)=>(Be(t,((t,e)=>{const c=ot(),u=s(t,e);if(c!==n){const t=o.stateArray,e=n.subject.global.oldest;At(t,e.state,o.states,e.states)}r.next(u)}),e.setup),r);return s.setup=e.setup,$e((()=>s),s),s}}),Object.defineProperty(e,"truthy",{get(){const e=t();return e.setup.before=t=>t.every((t=>t)),e}}),e}function _e(t){return ot()?We((()=>new yt(t))):new yt(t)}function Ue(t){return Ct.stateConfig.handlers.statesHandler(t)}function Fe(t){const e=Ie([]),n=Ie(0),r=Ie(0);let o=[],s=0;return r.value=n.value,t(((...t)=>(o=t,e.value))),Re(o,(()=>{++s,e.value=o,t((()=>o))})),Ue(((o,c)=>{if(s)return t(((...t)=>(c&&1!==c||(e.value=t),e.value))),r.value=n.value,void++n.value;t((()=>e.value))})),++s,e.value}function Ge(){return{stateDiff:0,provider:void 0}}$e((()=>function(t){const e=(e,n)=>Be(e,n,t);return e.setup=t,$e((()=>e),e),e}({})),Re),_e._value=t=>{const e=We((function(){return{stateArray:Ct.stateConfig.stateArray,states:Ct.stateConfig.states}})),n=ot();return We((function(){return new Ve(t).pipe((t=>(At(n.state,e.stateArray,n.states,e.states),t)))}))},_e.all=function(t){const e=We((()=>({stateArray:Ct.stateConfig.stateArray,states:Ct.stateConfig.states}))),n=ot();return yt.all(t).pipe((t=>(At(n.state,e.stateArray,n.states,e.states),t)))};const ze={create:t=>{const e=We(Ge);if(e.stateDiff){let t=e.stateDiff;for(;t--;)We(void 0);return We(void 0)}const n=We((()=>{const n=Ct.stateConfig,r=n.stateArray.length,o=t.prototype?new t:t(),s=n.support,c=n.stateArray.length-r,u={constructMethod:t,instance:o,stateDiff:c,owner:s,children:[]};e.provider=u;const a=s.subject.global;return(a.providers=a.providers||[]).push(u),e.stateDiff=c,o})),r=t,o=r.compareTo=r.toString();return e.provider.constructMethod.compareTo=o,n},inject:function(t){return We((function(){const e=t,n=e.compareTo=e.compareTo||t.toString(),r=ot(),o=[];let s={ownerSupport:r.ownerSupport};for(;s.ownerSupport;){const t=s.ownerSupport.subject.global.providers;if(!t){s=s.ownerSupport;continue}const e=t.find((t=>{o.push(t);if(t.constructMethod.compareTo===n)return!0}));if(e){const t=r.subject.global;return(t.providers=t.providers||[]).push(e),e.children.push(r),e.instance}s=s.ownerSupport}const c=`Could not inject provider: ${t.name} ${t}`;throw console.warn(`${c}. Available providers`,o),new Error(c)}))}};class Ze extends Error{details;constructor(t,e,n={}){super(t),this.name=Ze.name,this.details={...n,errorCode:e}}}class Xe extends Ze{constructor(t,e){super(t,"array-no-key-error",e),this.name=Xe.name}}class qe extends Ze{constructor(t,e){super(t,"state-mismatch-error",e),this.name=qe.name}}class Qe extends Ze{constructor(t,e){super(t,"sync-callback-error",e),this.name=Qe.name}}function Ye(t){const e=ot();if(!e)throw en;return Ke(e,Ct.stateConfig,t)}function Ke(t,e,n){const r=e.states;return function(...e){return t.subject.renderCount>0?function(t,e,n,...r){const o=t.subject.global.newest,s=n(...r);return Yn(o),q(s)&&s.finally((()=>{Yn(o)})),s}(t,r,n,...e):n(...e)}}const tn=()=>{const t=ot();if(!t)throw en;const e=Ct.stateConfig;return function(n){return Ke(t,e,n)}},en=new Qe("callback() was called outside of synchronous rendering. Use `callback = callbackMaker()` to create a callback that could be called out of sync with rendering");function nn(t){We(t)}function rn(t){We((function(){ot().subject.global.destroy$.toCallback(t)}))}function on(t,e){return{tagJsType:O.subscribe,processInit:Ae,delete:Ee,checkValueChange:function(){return console.debug("weird to be here"),-1},Observable:t,callback:e,states:st(ot()).states}}function sn(t,e,n){return{tagJsType:O.subscribe,processInit:Oe,delete:Ee,checkValueChange:function(){return-1},Observable:t,callback:n,withDefault:e,states:st(ot()).states}}function cn(t,e){const n=t.templater,r=e.templater,o=n?.tag||t,s=r.tag;if(n?.tagJsType===O.stateRender)return n.dom===r.dom;switch(o.tagJsType){case O.dom:return s?.tagJsType===O.dom&&function(t,e){const n=t.dom,r=e.dom;return n===r}(o,s);case O.tag:{const n=function(t,e,n,r){const o=t.strings,s=e.strings;if(o.length!==s.length)return!1;if(!o.every(((t,e)=>s[e].length===t.length)))return!1;const c=n.templater.values||t.values,u=r.templater.values||e.values;return function(t,e){const n=t.length===e.length;if(!n)return!1;const r=e.every((function(e,n){const r=t[n];if(typeof e===A.function&&typeof r===A.function){return!!(e.toString()===r.toString())}return!0}));if(r)return!0;return!1}(c,u)}(o,s,t,e);return n}}throw new Error(`unknown tagJsType of ${o.tagJsType}`)}function un(t,e,r){const o=e.global;if(!o)return 663;const s=o?.newest;if(z(t)){return cn(t,s)?77:(Zt(s,o),n(e),7)}const c=t?.tagJsType;if(c){return!0===we(e,t,o.newest.ownerSupport,r)?-1:88}return an(e),8}function an(t){const e=t.global,n=e?.newest;Zt(n,e),delete t.global,t.renderCount=0}function ln(t,e,n,r){const o=t.subject.global;o.oldest=t,o.newest=t,++Hr.locks;const s=function(t,e,n,r){const o=function(t){const e=t.templater,n=e.tag;if(n.tagJsType===O.dom)return n.dom;const r=n.strings;return H(r,n.values)}(t),s=t.templater.tag,c=s.values,u=[],a=t.subject.global;a.context=u;const i=Ar(o,c,t,e,u,0,n,r);return i}(t,e,n,r);return o.htmlDomMeta=s.dom,--Hr.locks,s}function pn(t,e,n){const r={value:t,withinOwnerElement:n};return e.push(r),r}function fn(t,e,n){const r=e.global.newest;r.ownerSupport=t;return ln(r,n,void 0,e.placeholder),r}function dn(t){const e={tagJsType:O.templater,processInit:bn,checkValueChange:un};return e.tag=t,t.templater=e,e}function gn(t,e,n){const r=ce(t,e,e.appSupport,n);return n.global.context=[],r}function hn(t,e,n,r,o,s){const c=gn(t,n,e);c.ownerSupport=n;const u=ln(c,r,o,o?void 0:s);for(const t of u.dom)t.marker&&(o?Mr.push([Dr,[o,t.marker]]):Ir.push([Rr,[s,t.marker]])),t.domElement&&(o?Mr.push([Dr,[o,t.domElement]]):Ir.push([Rr,[s,t.domElement]]));return c}function bn(t,e,n,r,o,s){return o?hn(t,e,n,r,o,s):fn(n,e,r)}function mn(t,e){const n={tagJsType:O.templater,processInit:bn,checkValueChange:un,delete:an,propWatch:t,props:e,key:function(t){return n.arrayValue=t,n}};return n}const yn=[];function vn(t,e,n){return t.map((function(t){return function(t,e,n,r){if(z(t)||!t)return t;if(!e)return t;return wn(t,e,n,r)}(t,e.ownerSupport,e,n)}))}function wn(t,e,n,r,o){if(!t)return t;if(t.tagJsType)return t;if(typeof t===A.function)return r<=1?function(t,e,n){const r=t.mem;if(r)return t;const o=function(...t){return function(t,e,n,r){const o=r.subject.global,s=o?.newest||r,c=void 0===ot(),u=t.apply(e,n),a=function(){const t=s.subject.global;return t&&!0!==t.locked?(kn(s,r),u):u};if(c)return a();return Ct.tagClosed$.toCallback(a),u}(o.mem,e,t,n)};return o.original=t,o.mem=t,Object.assign(o,t),o}(t,o,e):t;if(r===_n)return t;return Cn(t)?t:K(t)?function(t,e,n,r){for(let o=t.length-1;o>=0;--o){const s=t[o];if(t[o]=wn(s,n,e,r+1,t),typeof s===A.function){if(s.mem)continue;Tn(r+1,o,s,t,e)}}return t}(t,n,e,r):function(t,e,n,r){const o=Object.keys(t);for(const s of o){const o=t[s],c=wn(o,n,e,r+1,t);if(t[s]===c)continue;const u=Object.getOwnPropertyDescriptor(t,s);if(!(u?.get||u?.set)&&(t[s]=c,typeof c===A.function)){if(o.mem)continue;Tn(r+1,s,o,t,e)}}return t}(t,n,e,r)}function Tn(t,e,n,r,o){if(t>0){const t=o.subject.global;r[e].subscription=t.destroy$.toCallback((function(){r[e]=n}))}}function Cn(t){return typeof t!==A.object||!t||t.tagJsType}function kn(t,e){const n=t.subject;if(Qn(t.templater)){return Kn(e,t)}const r=n.global;r.locked=!0,qn(r.newest,t,e,n),delete r.locked}function Sn(t,e,n,r){const o=e.original,s=t.tagJsType===O.stateRender,c=Ct.stateConfig;let u;return c.support=n,s?u=t():(u=o(...r),typeof u===A.function&&(u=u())),u.templater=t,t.tag=u,n.state=c.stateArray,n.states=c.states,n}function jn(t,e,n){const r=t.propWatch===Hn.DEEP?_n:$n,o=t.props,s=e.propsConfig;let c=s.castProps;const u=n?.propsConfig,a=u?.castProps;a&&(s.castProps=a,c=Gn(e,n,n.ownerSupport,o,r));return c||vn(o,e,0)}function xn(t,e,n){const r=mn(Hn.DEEP);r.tagJsType=t.tagJsType;const o=gn(r,n,e);function s(){return r.tag=t(),o}return r.wrapper=s,s.tagJsType=t.tagJsType,s.original=t.original||t,o}function En(t,e){const n=t.rearray;n.length&&n.length!==t.stateArray.length&&function(t,e,n){const r=`Saved states between renders are inconsistent. Expected ${t.length} states got ${n.stateArray.length}.`,o=e.templater?.wrapper;let s=o;(o?.original||o?.original)&&(s=o.original);const c={oldStates:n.stateArray,newStates:n.rearray,tagFunction:s,templater:e.templater},u=new qe(r,c);throw console.error(An,c),u}(n,e,t)}const An="State tracking requires same number of state calls on every render. This error typically occurs when a state call is only reachable behind a condition. Also, wrapping tags that have state, with tag(), often helps when tag is only reachable by a condition.";function On(t,e){const n=t.subject;++n.renderCount;const r=Ct.stateConfig;t.state=r.stateArray,t.states=r.states,n.global.newest=t,En(r,t),delete r.prevSupport,delete r.support,delete r.stateArray,delete r.states,Ct.tagClosed$.next(e)}function Pn(t,e,n,r){!function(t,e){const n=e?.state,r=Ct.stateConfig;if(n)return void lt(0,e,Ct.stateConfig,n);it(t,r)}(t,e);const o=t.templater;let s;if(o.tagJsType===O.stateRender){const e=o;s=ue(o,r,t.appSupport,n),Sn(o,e,s)}else{s=(0,o.wrapper)(t,n,e)}return On(s,r),s}function In(t,e,r,o,s,c){n(e);const u=xn(t,e,r);Pn(u,void 0,e,r);return hn(u.templater,e,r,o,s,c)}function Jn(t,e,n,r){const o=ue(t,n,n.appSupport,e),s=o.propsConfig;if(s){const e=t.tagJsType!==O.tagComponent?[]:jn(t,o);s.castProps=e}const c=e.global,{support:u}=Xn(o,c.newest,e,n);return function(t,e,n){ln(t,e,void 0,n.placeholder)}(u,r,e),u}function Vn(t,e,n,r,o){const s=ue(t,n,n.appSupport,e),c=s.propsConfig;if(c){const e=t.tagJsType!==O.tagComponent?[]:jn(t,s);c.castProps=e}const u=e.global,{support:a}=Xn(s,u.newest,e,n);return function(t,e,n){let r=Mr.length;const o=ln(t,e,n,void 0);for(const t of o.dom)t.domElement&&Mr.splice(r++,0,[Dr,[n,t.domElement]]),t.marker&&Mr.splice(r++,0,[Dr,[n,t.marker]])}(a,r,o),a}function Mn(t,e,r,o,s){if(n(e),s){return Vn(t,e,r,o,s)}return Jn(t,e,r,o)}let Ln=0;var Hn;function Nn(t,e=Hn.SHALLOW){const n=function(...r){const o=mn(e,r);o.tagJsType=O.tagComponent,o.processInit=Mn;const s=function(t,e){return function(n,r,o){const s=jn(t,n,o),c=n.ownerSupport,u=ue(t,c,n.appSupport,r,s);return Sn(t,e,u,s)}}(o,n);return s.original=t,o.wrapper=s,o},r=t;return n.original=t,r.tags=yn,r.setUse=Ct,r.ValueTypes=O,r.tagIndex=Ln++,yn.push(n),n}function Wn(t,e,n){if(er(t,e))return 11;switch(n){case Hn.NONE:return 1;case Hn.SHALLOW:return Bn(t,e);case Hn.IMMUTABLE:return Dn(t,e)}return function(t,e){let n=t,r=e;n=[...t],r=[...e||[]];if(!n.every(((t,e)=>function(t,e,n,r){const o=r[e];if(typeof t===A.object){const e={...t},n={...o||{}},r=Object.entries(e).every((([t,r])=>Rn(r,n[t],(()=>{delete e[t],delete n[t]}))));return r}return Rn(t,o,(function(){n.splice(e,1),r.splice(e,1)}))}(t,e,n,r))))return 7;return!1}(t,e)}function Rn(t,e,n){if(typeof t!==A.function)return!!nt(t,e,_n)&&4;if(typeof e!==A.function)return!1;const r=e?.original;r&&(e=r);t.original&&(t=t.original);return t.toString()===e.toString()?(n(),5):(n(),6)}function Dn(t,e){const n=t.length;for(let r=0;r<n;++r){if(t[r]!==e[r])return 2}return!1}function Bn(t,e){const n=t.length;for(let r=0;r<n;++r){const n=t[r],o=e[r];if(K(n)&&K(o)){if(n===o)continue;return 3}if(typeof n!==A.function||typeof o!==A.function)if(typeof n!==A.object){if(n!==o)return 3.3}else if(typeof e===A.object){const t=Object.entries(n);for(const e of t){if(!Un(e,o))return 3.1}}}return!1}!function(t){t.DEEP="deep",t.SHALLOW="shallow",t.NONE="none",t.IMMUTABLE="immutable"}(Hn||(Hn={})),Nn.renderOnce=function(){throw new Error("Do not call tag.renderOnce as a function but instead set it as: `(props) => tag.renderOnce = () => html`` `")},Nn.use=function(){throw new Error("Do not call tag.use as a function but instead set it as: `(props) => tag.use = (use) => html`` `")},Nn.deepPropWatch=Nn,Nn.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`` `")},Nn.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`` `")},Nn.immutableProps=function(t){return Nn(t,Hn.IMMUTABLE)},Nn.watchProps=function(t){return Nn(t,Hn.SHALLOW)},Object.defineProperty(Nn,"renderOnce",{set(t){t.tagJsType=O.renderOnce,t.processInit=In,t.delete=an,t.checkValueChange=function(){return-1}}}),Object.defineProperty(Nn,"use",{set(t){t.original={setUse:Ct,tags:yn},t.tagJsType=O.stateRender,t.processInit=Mn,t.checkValueChange=un,t.delete=an}});const $n=3,_n=10;function Un([t,e],n){const r=n[t];return typeof e===A.function&&typeof r===A.function||r===e}function Fn(t,e,n,r,o,s){return null==t||s>o?e:typeof t===A.function?e.mem?(t.mem=e.mem,e):(t.mem=e,t):Cn(e)?e:K(e)?function(t,e,n,r,o,s){for(let c=t.length-1;c>=0;--c){const u=t[c],a=e[c];t[c]=Fn(a,u,n,r,s,o+1)}return t}(e,t,n,r,s,o):function(t,e,n,r,o,s){const c=Object.keys(t);for(const u of c){const c=t[u],a=Fn(e[u],c,n,r,s,o+1);if(c===a)continue;const i=Object.getOwnPropertyDescriptor(t,u)?.set;i||(t[u]=a)}return t}(e,t,n,r,s,o)}function Gn(t,e,n,r,o,s=-1){const c=e.subject.global.newest;if(!c){const e=vn(r,t,s);r.push(...e);return t.propsConfig.castProps=e,r}const u=(e=c||e).propsConfig.castProps,a=[];for(let e=0;e<r.length;++e){const c=r[e],i=Fn(u[e],c,t,n,o,s+1);a.push(i)}return t.propsConfig.castProps=a,a}function zn(t){const e=t.subject,r=e.global,{subs:o,tags:s}=Dt(r.context);Zn(r);for(const t of s){const e=t.subject.global;if(!0===e.deleted)return;Zn(e)}r.subscriptions&&o.forEach(Bt),n(e)}function Zn(t){t.deleted=!0,$t(t,[])}function Xn(t,e,n,r){const o=e?.templater,s=o?.tag,c=Pn(t,e,n,r),u=!e||cn(e,c);if(u){if(e){const t=e.templater.tag;t&&n.renderCount>0&&function(t,e,n){if(t.tagJsType===O.dom){const r=n?.dom;return void(r!==t.dom&&zn(e))}if(n){const r=n.strings;if(r){const n=r?.length;n!==t.strings.length&&zn(e)}}}(t,e,s)}}else{!function(t,e){const n=t.subject.global;let r=-1;const o=n.providers=n.providers||[],s=o.length-1;for(;r++<s;){const t=o[r];let s=-1;const c=t.children.length-1;for(;s++<c;)if(n===t.children[s].subject.global)return t.children.splice(s,1),void t.children.push(e)}}(e,c),zn(e);const t=c.subject.global;t.oldest=c,t.newest=c}const a=e?.ownerSupport;return c.ownerSupport=r||a,{support:c,wasLikeTags:u}}function qn(t,e,n,r){const o=r.global,{support:s,wasLikeTags:c}=Xn(e,t,r,n);return c?(ve(o.oldest,s),s):(fn(n,r,{added:0,removed:0}),s)}function Qn(t){return O.templater===t.tagJsType}function Yn(t){const e=t.subject.global,n=Qn(t.templater),r=t.ownerSupport;if(e.locked)return e.blocked.push(t),t;if(n){return Kn(r,t)}e.locked=!0;const o=t.subject;e.blocked.length&&(t=e.blocked.pop(),e.blocked=[]);const s=qn(e.newest,t,r,o);return delete e.locked,s}function Kn(t,e){const n=t.subject.global;if(!n||!0===n.deleted)return e;return Yn(n.newest||t)}function tr(t,e,n){const r=function(t,e){const n=t.props,r=e.propsConfig,o=r.latest;if(er(n,o))return!0;switch(t.propWatch){case Hn.IMMUTABLE:return Dn(n,o);case Hn.SHALLOW:return Bn(n,o)}return!nt(n,o,_n)}(e,n);return!(!t||!r)}function er(t,e){return t.length!==e.length}function nr(t,e){const n=function(t,e,n=[]){const r=t.subject;n.push({support:t,renderCount:r.renderCount,provider:e});const o=e.children;for(let t=o.length-1;t>=0;--t){const r=o[t],s=r.subject;n.push({support:r,renderCount:s.renderCount,provider:e})}return n}(t,e);return n}function rr(t){return t.support}function or(t,e=[]){const n=t.subject.global,r=Qn(t.templater),o=t.ownerSupport;if(n.locked)return e.push(t),e;if(r)return or(o,e);const s=t,c=Z(s.templater),u=t.templater.tagJsType,a=o&&u!==O.stateRender&&(!c||tr(o,s.templater,s)),i=function(t){const e=t.subject.global.providers;if(!e)return[];const n=[];for(const t of e){const e=nr(t.owner,t);n.push(...e.map(rr))}return n}(s);return e.push(...i),a?(or(o,e),c&&e.push(s),e):(e.push(s),e)}function sr(t){++Hr.locks,t.forEach(cr),--Hr.locks,Nr()}function cr(t){const e=t.subject.global;e&&Yn(e.newest)}const ur="no-data-ever",ar="promise-no-data-ever";function ir(t,e){const n=e.subject.global,r=function(t,e){if(!0!==n.deleted)return function(t,e,n,r,o){const s=st(e),c=s.subject,u=c.global;u.locked=!0;const a=t.apply(r,o);delete u.locked;const i=function(t,e){const n=e.subject.global;return function(t,e,n){return sr(or(t)),function(t,e,n){if(q(t)){return e.subject.global.locked=!0,t.then((()=>{if(!0===n.deleted)return ar;delete e.subject.global.locked;return sr(or(e)),ar}))}return ur}(e,t,n)}(e,t,n)}(a,s);return i}(r.tagFunction,r.support,r.states,t,e)};r.tagFunction=t;const o=st(e);r.support=e;const s=o.states;return r.states=s,r}const lr=["init","destroy"];function pr(t,e,n,r,o,s,c){if(c)return R(t,e,n,c,s,o);r(n,t,e)}function fr(t,e,n,r){const o=t.appElement;"blur"===e&&(e="focusout");const s="_"+e,c=t.subject.global.events;if(!c[e]){const t=function(t){t.originalStopPropagation=t.stopPropagation,dr(t,s,t.target)};c[e]=t,o.addEventListener(e,t)}n[s]=r,n[e]=r}function dr(t,e,n){const r=n[e];if(r){let e=!1;if(t.stopPropagation=function(){e=!0,t.originalStopPropagation.call(t)},r(t),t.defaultPrevented||e)return}const o=n.parentNode;o&&dr(t,e,o)}function gr(t,e,n,r){const o=function(...e){return o.tagFunction(t,e)};o.tagFunction=e,o.support=n,fr(n.appSupport,r,t,o)}function hr(t){return null==t||!1===t}function br(t,e){t.removeAttribute(e)}function mr(t,e,n,r){if(n.isNameOnly)return function(t,e,n,r,o,s,c,u){if(n){if(hr(e))return void r.removeAttribute(n);if(typeof n===A.object)if(typeof e===A.object)for(const t in n)t in e||Jr.push([br,[r,t]]);else for(const t in n)Jr.push([br,[r,t]])}Cr(t,e,r,o,s,c,u)}(r,t,n.value,n.element,e,n.howToSet,[],{added:0,removed:0}),void(n.value=t);const o=n.element;!function(t,e,n,r,o,s,c,u){if(Q(t))return function(t,e,n,r,o,s,c,u){const a=t.templater.wrapper;if((a?.tagJsType||a?.original?.tagJsType)!==O.renderOnce)return Sr(c,e,t,r,n);return kr(e,n,r,o,s,t,u)}(o,t,r,e,c,s,n,u);kr(t,r,e,c,s,o,u)}(t,n.attrName,n,o,e,n.howToSet,n.isSpecial,{added:0,removed:0}),n.value=t}function yr(t,e,n,r,o,s,c,u){const i=r.length;function l(r){const s=function(t,e,n){return t.reduce(((t,r)=>{if(a(r)>=0){const r=n++,o=e[r];return t.push(o),t}return t.push(r),t}),[])}(e,r,i).join("");o(n,t,s)}e.forEach((e=>{if(a(e)>=0){const e=r.length,o={isAttr:!0,element:n,attrName:t,withinOwnerElement:!0,handler:(t,e,n,r)=>{l(r)}},s=u[e];o.value=s,r.push(o)}})),l(u)}function vr(t,e,n,r,o,s,c,u){const a={isAttr:!0,element:n,attrName:t,withinOwnerElement:!0};r.push(a),a.handler=mr,function(t,e,n,r,o,s,c,u){n.element=r,n.howToSet=o,typeof e===A.function?u&&lr.includes(t)?R(t,e,r,t,s,c):Sr(n,e,s,t,r):(n.attrName=t,n.isSpecial=u,pr(t,e,r,o,c,s,u))}(t,e,a,n,o,s,c,u),a.value=e}function wr(t){return Y(t)&&"tagJsVar"in t?t.tagJsVar:-1}function Tr(t,e,n,r,o,s,c,u,a){const i=wr(e);if(i>=0){const e=t[i],c=pn(e,s,!0);return c.isAttr=!0,c.element=n,c.howToSet=o,c.isNameOnly=!0,c.handler=mr,void Cr(t,e,n,r,o,s,u)}if(Array.isArray(a))return yr(e,a,n,s,o,0,0,t);const l=wr(a);if(l>=0){return vr(e,t[l],n,s,o,r,u,c)}return pr(e,a,n,o,u,r,c)}function Cr(t,e,n,r,o,s,u){if(!hr(e))if(typeof e!==A.object)0!==e.length&&o(n,e,x);else for(const a in e){const i=e[a];Tr(t,a,n,r,o,s,c(a),u,i)}}function kr(t,e,n,r,o,s,c){if(!1===r){switch(t){case void 0:case!1:case null:return void Jr.push([jr,[e,n]])}if(Q(t))return gr(e,t,s,n);o(e,n,t)}else R(n,t,e,r,s,c)}function Sr(t,e,n,r,o){return gr(o,e=ir(e,n),n,r)}function jr(t,e){t.removeAttribute(e)}function xr(t,e,n,r,o,s,c){const u=document.createTextNode(x),a=pn(t,e,o>0);a.placeholder=u,s?Mr.push([Dr,[s,u]]):Ir.push([Rr,[c,u]]),pe(t,n,a,r,s,c)}const Er=function(){};function Ar(t,e,n,r,o,s,c,u){const a=[];c&&void 0===u&&(u=document.createTextNode(x),Mr.push([Dr,[c,u]]),c=void 0);for(let i=0;i<t.length;++i){const l=t[i],p=l.v;if(!isNaN(p)){xr(e[o.length],o,n,r,s,c,u);continue}const f={};if(a.push(f),"text"===l.nn){Pr(f,l,c,u);continue}const d=Or(f,l,e,n,o,r,c,u);l.ch&&(f.ch=Ar(l.ch,e,n,r,o,s+1,d,u).dom)}return{dom:a,context:o}}function Or(t,e,n,r,o,s,c,u){const a=t.domElement=document.createElement(e.nn);if(e.at)for(const t of e.at){const e=t[0],c=t[1];Tr(n,e,a,r,W,o,t[2]||!1,s,c)}return c?Mr.push([Dr,[c,a]]):Ir.push([Rr,[u,a]]),a}function Pr(t,e,n,r){const o=t,s=o.tc=e.tc;n?Mr.push([Fr,[n,s,t=>o.domElement=t]]):Ir.push([Ur,[r,s,t=>o.domElement=t]])}let Ir=[],Jr=[],Vr=[],Mr=[],Lr=[];const Hr={locks:0};function Nr(){if(!(Hr.locks>0)){for(const t of Jr)t[0](...t[1]);for(const[t,e]of Vr)e.textContent=t;for(const t of Mr)t[0](...t[1]);for(const t of Ir)t[0](...t[1]);Ir=[],Jr=[],Mr=[],Vr=[];for(const t of Lr)t[0](...t[1]);Lr=[]}}function Wr(t){t.parentNode.removeChild(t)}function Rr(t,e){t.parentNode.insertBefore(e,t)}function Dr(t,e){t.appendChild(e)}const Br="object"==typeof document&&document.createElement("div");function $r(t){return Br.innerHTML=t,document.createTextNode(Br.innerHTML)}function _r(t,e,n=Er){const r=$r(e);Rr(t,r),n(r)}function Ur(t,e,n=Er){Br.innerHTML=e;const r=document.createTextNode(Br.textContent);Rr(t,r),n(r)}function Fr(t,e,n){Br.innerHTML=e;const r=document.createTextNode(Br.textContent);Dr(t,r),n(r)}function Gr(t,e){const n=t.subContext;n.deleted=!0,delete t.subContext;const r=n.appendMarker;if(r&&(Ir.push([Wr,[r]]),delete n.appendMarker),delete t.delete,t.handler=ae,!n.hasEmitted)return;const o=n.contextItem;return o.tagJsVar.delete(o,e),77}function zr(t,e,r,o,s,c){const u=t;let a=u.templater;a||(a=dn(u));const i=n(e);return s?hn(a,e,r,o,s,c):(i.newest=gn(a,r,e),fn(r,e,o))}function Zr(t,e){const n={values:e,ownerSupport:ot(),dom:t,tagJsType:O.dom,processInit:zr,checkValueChange:un,delete:an,key:function(t){return n.arrayValue=t,n},setInnerHTML:function(t){return t.owner=n,n},html:{dom:function(t,e){return n.children={dom:t,values:e},n}}};return Object.defineProperty(n,"innerHTML",{set(t){t.outerHTML=n,n._innerHTML=t,t.oldProcessInit=t.processInit,t.processInit=Xr}}),n}function Xr(t,e,n,r,o,s){zr(t.outerHTML,e,n,r,o,s),e.handler=(t,e,n,r,o)=>{Ce(n,t?.outerHTML||t,e,o)},t.checkValueChange=function(t,e,n){return function(t,e,n){return un(t,e,n)}(t,e,n)}}function qr(t,e){const n={values:e,ownerSupport:ot(),tagJsType:O.tag,processInit:zr,checkValueChange:un,delete:an,strings:t,key:t=>(n.arrayValue=t,n),setInnerHTML:function(t){return t.owner=n,n},html:function(t,e){return n.children={strings:t,values:e},n}};return Object.defineProperty(n,"innerHTML",{set(t){t.outerHTML=n,t.processInit=Xr}}),n}function Qr(t,...e){const n=qr(t,e),r=mn(Hn.NONE);return r.tag=n,n.templater=r,n}function Yr(t,e){t.domElement&&e.appendChild(t.domElement),t.marker&&e.appendChild(t.marker)}function Kr(t,e,n){const r=e.global,o=oe(t,e);return se(t,o,o),o.appElement=n,r.oldest=r.oldest||o,r.newest=o,o}function to(t,e,n,r,o,s,c){const u=document.createTextNode(x);yn.push(n.wrapper||{original:n});const a=function(t,e,n,r,o){r.placeholder=e;const s=r.global,c=s.oldest,u=s.newest===c,a=ue(t,s.newest,s.newest.appSupport,r);u||lt(0,s.newest,Ct.stateConfig,c.state);if(t.tagJsType===O.stateRender)return function(t,e,n,r,o){const s=t.wrapper||{original:t};if(!e){const e=Kr(t,r,o);return On(e),e}return Sn(t,s,n),On(n),n}(t,o,a,r,n);const i=t.wrapper,l=i(a,r);return On(a),l}(n,u,o,s,c);if(e.isApp=!0,c&&(r.tag=a.templater.tag),!o)throw new Error(`Cannot tagElement, element received is type ${typeof o} and not type Element`);o.destroy=function(){const t=e.events;for(const e in t){const n=t[e];o.removeEventListener(e,n)}e.events={},++Hr.locks;const n=Zt(a,e);return--Hr.locks,Nr(),n},++Hr.locks;const i=function(t,e,n,r,o,s){console.debug("🏷️ Building element into tag...",{element:e,app:o});const c=ln(t,{added:0,removed:0},e,void 0);n.oldest=t,n.newest=t;let u=r.setUse;if(r.tagJsType!==O.stateRender){const t=o.original;u=t.setUse,t.isApp=!0}e.setUse=u,e.ValueTypes=O,eo.push({element:e,support:t});const a=document.createDocumentFragment();a.appendChild(s);for(const t of c.dom)Yr(t,a);return console.debug("🏷️ Element Tag DOM built ✅"),a}(a,o,e,n,t,u);return--Hr.locks,Nr(),o.appendChild(i),{support:a,tags:yn,ValueTypes:O}}Qr.dom=function(t,...e){return Zr(t,e)};const eo=[];function no(t,e,r){const o=eo.findIndex((t=>t.element===e));if(o>=0){const t=eo[o].support;Zt(t,t.subject.global),eo.splice(o,1),console.warn("Found and destroyed app element already rendered to element",{element:e})}let s=()=>a(r);s.propWatch=Hn.NONE,s.tagJsType=O.stateRender,s.props=[r],s.isApp=!0;const c=function(t,e){const r={value:t,withinOwnerElement:!1,renderCount:0,global:void 0,tagJsVar:{tagJsType:"templater",checkValueChange:un,delete:an,processInit:function(){console.debug("do nothing app function")}}},o=n(r);return o.events={},Kr(t,r,e),r}(s,e),u=c.global;it(u.newest,Ct.stateConfig);let a=t(r);const i=typeof a==A.function;return i||(Z(a)?(u.newest.propsConfig={latest:[r],castProps:[r]},s.propWatch=a.propWatch,s.tagJsType=a.tagJsType,s.wrapper=a.wrapper,s=a):(s.tag=a,a=t)),to(t,u,s,a,e,c,i)}function ro(t){if(!t)return Er;const e=ot();if(!e)throw new Error("output must be used in render sync fashion");return(...n)=>{const r=e.ownerSupport,o=r.subject.global.newest;kt(o.states,r.states);const s=t(...n);kt(r.states,o.states);return kn(o,o.ownerSupport.subject.global.newest),s}}function oo(t,e,n,r,o){const s=t.owner._innerHTML;s.processInit=s.oldProcessInit;const c=n.subContext?.contextItem;Ce(c,s,e,o)}function so(t,e,n,r,o,s){e.subContext={},e.handler=oo,function(t,e,n,r,o,s){const{appendMarker:c,insertBefore:u}=je(s,o),a=n.subContext;a.appendMarker=c;const i=t.owner,l=i._innerHTML;l.processInit=l.oldProcessInit,Se(l,a,e,r,u)}(t,n,e,r,s,o)}function co(){return{tagJsType:"innerHTML",processInit:so,delete:Gr,checkValueChange:()=>console.debug("weird innerHTML check")}}const uo={tagElement:no,renderWithSupport:Xn,renderSupport:Yn,renderTagOnly:Pn,paint:Nr};var ao=e.W9,io=e.cg,lo=e.m0,po=e.rS,fo=e.Y2,go=e.ei,ho=e.B7,bo=e.TU,mo=e.XF,yo=e.PC,vo=e.Ot,wo=e.Mj,To=e.tD,Co=e.j8,ko=e.xe,So=e.um,jo=e.E2,xo=e.OH,Eo=e.TB,Ao=e.Ii,Oo=e.m3,Po=e.yV,Io=e.zV,Jo=e.pf,Vo=e.ze,Mo=e.WJ,Lo=e.Ng,Ho=e.HG,No=e.aZ,Wo=e.Ey,Ro=e.O,Do=e.F3,Bo=e.Ie,$o=e.ts,_o=e.B4,Uo=e.Az,Fo=e.Xi,Go=e.sV,zo=e.Ah,Zo=e.ck,Xo=e.Gk,qo=e.j_,Qo=e.zC,Yo=e.cF,Ko=e.jU,ts=e.PB,es=e.qy,ns=e.cy,rs=e.Tn,os=e.Gv,ss=e.yL,cs=e.D8,us=e.Ze,as=e._4,is=e.mn,ls=e.z,ps=e.sA,fs=e.TG,ds=e.MG,gs=e.PL,hs=e.CG,bs=e.nI,ms=e.PZ,ys=e.r5,vs=e.uc,ws=e.pG,Ts=e.QB,Cs=e.Ll,ks=e.vP,Ss=e.wk,js=e.xP,xs=e.bc,Es=e.B1,As=e.RX,Os=e.ag,Ps=e.Tc,Is=e.Hf,Js=e._A,Vs=e.Ag,Ms=e.NU,Ls=e.wB,Hs=e.id,Ns=e.MC,Ws=e.SZ;export{ao as ArrayNoKeyError,io as BasicTypes,lo as ImmutableTypes,po as PropWatches,fo as RouteQuery,go as StateMismatchError,ho as Subject,bo as Subjective,mo as SyncCallbackError,yo as TagError,vo as ValueSubject,wo as ValueSubjective,To as ValueTypes,Co as addOneContext,ko as appElements,So as buildBeforeElement,jo as callback,xo as callbackMaker,Eo as checkArrayValueChange,Ao as checkSimpleValueChange,Oo as checkSubContext,Po as checkTagValueChange,Io as combineLatest,Jo as createHtmlSupport,Vo as createTrigger,Mo as defineValueOn,Lo as deleteSimpleValue,Ho as deleteSubContext,No as destroyArray,Wo as destroyArrayContextItem,Ro as destroySupport,Do as destroySupportByContextItem,Bo as empty,$o as forceUpdateExistingValue,_o as getBaseSupport,Uo as getDomMeta,Fo as getDomTag,Go as getInnerHTML,zo as getNewGlobal,Zo as getStringTag,Xo as getTemplaterResult,qo as guaranteeInsertBefore,Qo as hasPropChanges,Yo as hmr,Ko as howToSetFirstInputValue,ts as howToSetInputValue,es as html,ns as isArray,rs as isFunction,os as isObject,ss as isPromise,cs as isSimpleType,us as isStaticTag,as as isSubjectInstance,is as isTagComponent,ls as letProp,ps as onDestroy,fs as onFirstSubContext,ds as onInit,gs as oneRenderToSupport,hs as output,bs as paint,ms as processFirstSubjectValue,ys as providers,vs as renderSupport,ws as renderTagOnly,Ts as renderWithSupport,Cs as setUseMemory,ks as signal,Ss as state,js as states,xs as subject,Es as subscribe,As as subscribeWith,Os as syncError,Ps as tag,Is as tagElement,Js as tags,Vs as upgradeBaseToSupport,Ms as variablePrefix,Ls as watch,Hs as willCallback,Ns as willPromise,Ws as willSubscribe};
2
2
  //# sourceMappingURL=bundle.js.map