peryl 1.5.13 → 1.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-esmodule/hsml-app.js +7 -7
- package/dist/browser-esmodule/hsml-app.js.map +1 -1
- package/dist/browser-esmodule/index.js +7 -7
- package/dist/browser-esmodule/index.js.map +1 -1
- package/dist/browser-umd/hsml-app.js +1 -1
- package/dist/browser-umd/hsml-app.js.map +1 -1
- package/dist/browser-umd/index.js +1 -1
- package/dist/browser-umd/index.js.map +1 -1
- package/dist/demo/hsml-app-form-validation_demo.1ef7fa68.js +2 -0
- package/dist/demo/hsml-app-form-validation_demo.1ef7fa68.js.map +1 -0
- package/dist/demo/hsml-app-form-validation_demo.81fb94b2.js +2 -0
- package/dist/demo/hsml-app-form-validation_demo.81fb94b2.js.map +1 -0
- package/dist/demo/hsml-app-form-validation_demo.html +1 -1
- package/dist/demo/hsml-app-form_demo.html +1 -1
- package/dist/demo/hsml-app-test_demo.html +1 -1
- package/dist/demo/hsml-app-tictactoe_demo.html +1 -1
- package/dist/demo/hsml-app_demo.html +1 -1
- package/dist/demo/hsml-appel_demo.html +1 -1
- package/dist/demo/hsml-appi_demo.html +1 -1
- package/dist/hsml-app.js +8 -8
- package/dist/hsml-app.js.map +1 -1
- package/package.json +1 -1
- package/src/hsml-app.ts +7 -7
- package/dist/demo/hsml-app-form-validation_demo.97679c59.js +0 -2
- package/dist/demo/hsml-app-form-validation_demo.97679c59.js.map +0 -1
- package/dist/demo/hsml-app-form-validation_demo.eea04196.js +0 -2
- package/dist/demo/hsml-app-form-validation_demo.eea04196.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){"use strict";var e={7731:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.HApp=t.happel=t.happ=t.HDispatchScopes=t.HAppActions=void 0;const i=n(8982),a=console.log,o=console.error,s=console.warn;var c,l;!function(e){e.init="happ-init",e.mount="happ-mount",e.umount="happ-umount",e.action="happ-action",e.attribute="happ-attribute"}(c=t.HAppActions||(t.HAppActions={})),(l=t.HDispatchScopes||(t.HDispatchScopes={})).element="element",l.window="window";const u=window.requestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},d=window.cancelAnimationFrame||function(e){window.clearTimeout(e)},f="action:",p="dispatch:",h="render:",m="happ";t.happ=function(e){return new b(e.state,e.view,e.dispatcher,e.element,e.debug,e.name)},t.happel=function(e){customElements.define(`${m}-${e.name}`,class extends HTMLElement{static get observedAttributes(){return e.attributes}constructor(){super(),this._happel=new b(e.state,e.view,e.dispatcher,void 0,e.debug,e.name,e.attributes),this._happel.customElement=this}connectedCallback(){this.attachShadow({mode:"open"}),this._happel.mount(this.shadowRoot)}disconnectedCallback(){this._happel.umount()}adoptedCallback(){this._happel.update()}attributeChangedCallback(e,t,n){this._happel.dispatch(c.attribute,{attrName:e,oldVal:t,newVal:n})}})};class b{constructor(e,t,n,i,s,l,p){this.refs={},this.dispatch=(e,t,n)=>r(this,void 0,void 0,(function*(){return this._dispatchAction(e,t,void 0,n)})),this.render=()=>{if(this.debug){const e=performance.now();let t;try{t=this.view(this.state)}catch(e){o(this.name,h,e)}const n=performance.now();return a(this.name,h,n-e+" ms",t),null!=t?t:[]}{let e;try{e=this.view(this.state)}catch(e){o(this.name,h,e)}return null!=e?e:[]}},this.actionCb=(e,t,n)=>{void 0===(t=(null==t?void 0:t.constructor)===Function?t(n):t)&&n&&(t=n instanceof CustomEvent?n.detail:function(e){const t=e.target;if("FORM"===t.nodeName){e.preventDefault();const n={data:{},validation:{},valid:!0},r=t.elements;for(let e=0;e<r.length;e++){const t=y(r[e]);if(t&&t.name){const i=n.data,a=t.name,o=t.value;void 0===i[a]?i[a]=o:"string"==typeof i[a]||i[a]instanceof String?i[a]=o instanceof Array?[i[a],...o]:[i[a],o]:i[a]instanceof Array?o instanceof Array?i[a]=i[a].concat(o):i[a].push(o):i[a]=o instanceof Array?[i[a],...o]:[i[a],o],i[a]instanceof Array&&(i[a]=i[a].filter((e=>null!==e)),"radio"===r[e].type&&(i[a]=i[a].length?i[a][0]:null)),t.validation&&(n.validation[a]=t.validation),t.valid||(n.valid=!1)}}return n}return y(t)}(n)),this._dispatchAction(e,t,n)},this.mount=e=>{const t="string"==typeof e?document.getElementById(e):e;if(t&&t[m]&&t[m].umount(),t&&!this.element){this.element=t,t[m]=this;const e=this.render();this._updateDom(t,e,this),this._dispatchAction(c.mount,this.element)}return this},this.umount=()=>{if(this.element){this._dispatchAction(c.umount,this.element),this.element.hasAttribute(m)&&this.element.removeAttribute(m);const e=this.element.querySelectorAll(`[${m}]`);for(let t=0;t<e.length;t++){const n=e[t].happ;null==n||n.umount()}for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);delete this.element.happ,this.element=void 0}return this._windowActionListener&&window.removeEventListener(c.action,this._windowActionListener),this},this.update=()=>(this.element&&!this._updateSched&&(this._updateSched=u((()=>{if(this.element){const e=this.render();this._updateDom(this.element,e,this)}this._updateSched=void 0}))),this),this.toHsml=()=>{if(this.element){if(!this._updateSched)return["div",{skip:!0}];d(this._updateSched),this._updateSched=void 0}const e=this.render();return e.push((e=>{this.element||(this.element=e,e.happ=this,this._dispatchAction(c.mount,this.element))})),["div",e]},this.toHtml=()=>this.element?this.element.outerHTML:"",this.debug=null!=s&&s,this.name=null!=l?l:m,this.attributes=null!=p?p:[],this.state=e(),this.view=t,this.dispatcher=null!=n?n:e=>r(this,void 0,void 0,(function*(){return a(this.name,f,e.type,e.data)})),this._dispatchAction(c.init,this).then((()=>i&&this.mount(i)))}_dispatchAction(e,t,n,i){return r(this,void 0,void 0,(function*(){if(this.debug){a(this.name,f,{type:e,data:t,event:n});const r=performance.now();yield this._dispatch(e,t,n,i);const o=performance.now();a(this.name,p,o-r+" ms",this.state)}else yield this._dispatch(e,t,n,i)}))}_dispatch(e,t,n,i){return r(this,void 0,void 0,(function*(){try{i||(yield this.dispatcher({type:e,data:t,event:n},this.state,this.dispatch),this.update()),"element"===i&&this._dispatchElement(e,t),"window"===i&&this._dispatchWindow(e,t)}catch(e){o(this.name,p,e)}}))}_dispatchElement(e,t){return r(this,void 0,void 0,(function*(){this.customElement&&v(this.customElement,c.action,{type:e,data:t}),!this.customElement&&this.element&&v(this.element,c.action,{type:e,data:t})}))}_dispatchWindow(e,t){return r(this,void 0,void 0,(function*(){window.dispatchEvent(new CustomEvent(c.action,{detail:{type:e,data:t}}))}))}windowActionListen(){this._windowActionListener?s("windowEventListener already added"):(this._windowActionListener=e=>{const t=e.detail;this._dispatchAction(c.action,t)},window.addEventListener(c.action,this._windowActionListener))}_updateDom(e,t,n){if(this.debug){const r=performance.now();(0,i.hsmls2idomPatch)(e,t,n);const o=performance.now();a(this.name,"update:",o-r+" ms",e)}else(0,i.hsmls2idomPatch)(e,t,n)}}function v(e,t,n){var r,i;null==e||e.dispatchEvent(new CustomEvent(t,{detail:n})),null===(i=(r=e)[`on${t}`])||void 0===i||i.call(r,new CustomEvent(t,{detail:n}))}function y(e){const t=e;if(t.willValidate){let e=!0;for(const n in t.validity)if("customError"!==n&&"valid"!==n&&t.validity[n]){const r=t.validation;if(r){const i=r[n];if(i){t.setCustomValidity(i),e=!1;break}t.setCustomValidity("");break}}e&&t.setCustomValidity("")}let n;switch(e.nodeName){case"INPUT":const t=e;switch(t.type){case"text":case"hidden":case"password":case"email":case"search":case"url":case"tel":case"color":case"submit":case"button":n={name:t.name,value:t.value,validation:t.validationMessage,valid:t.validity.valid};break;case"number":case"range":n={name:t.name,value:t.valueAsNumber,valueString:t.value,validation:t.validationMessage,valid:t.validity.valid};break;case"datetime-local":n={name:t.name,value:t.value,valueNumber:isNaN(t.valueAsNumber)?null:t.valueAsNumber,valueDate:isNaN(t.valueAsNumber)?null:new Date(t.valueAsNumber),validation:t.validationMessage,valid:t.validity.valid};break;case"date":case"month":case"time":case"week":n={name:t.name,value:t.value,valueNumber:isNaN(t.valueAsNumber)?null:t.valueAsNumber,valueDate:t.valueAsDate,validation:t.validationMessage,valid:t.validity.valid};break;case"radio":n={name:t.name,value:t.checked?t.value:null,valueString:t.value,validation:t.validationMessage,valid:t.validity.valid};break;case"checkbox":n="on"===t.value?{name:t.name,value:t.checked,valueString:t.value,validation:t.validationMessage,valid:t.validity.valid}:{name:t.name,value:t.checked?String(t.value):null,valueString:t.value,validation:t.validationMessage,valid:t.validity.valid};break;case"file":const e=t.files,r=1===e.length?e[0]:e;n={name:t.name,value:r,valueString:t.value,validation:t.validationMessage,valid:t.validity.valid}}break;case"SELECT":const r=e;if(r.multiple){const e=Array.from(r.selectedOptions).map((e=>e.value));n={name:r.name,value:e,valueString:r.value,validation:r.validationMessage,valid:r.validity.valid}}else n={name:r.name,value:r.value,validation:r.validationMessage,valid:r.validity.valid};break;case"TEXTAREA":const i=e;n={name:i.name,value:i.value,validation:i.validationMessage,valid:i.validity.valid};break;case"BUTTON":const a=e;n={name:a.name,value:a.value,validation:a.validationMessage,valid:a.validity.valid}}return n}t.HApp=b},8982:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hsmls2idomPatch=t.hsml2idomPatch=void 0;const r=n(8574),i=n(706);function a(e,t,n){e&&e.actionCb&&"function"==typeof e.actionCb&&e.actionCb(t[1],t[2],n)}class o{open(e,t,n,r){const o=[];let s=t._id,c=t._classes?t._classes:[],l=t._ref,u=t._hObj;for(const e in t)if(t.hasOwnProperty(e))switch(e){case"_id":case"_classes":case"_ref":case"_hObj":case"key":case"skip":break;case"id":s=t[e];break;case"ref":l=t[e];break;case"classes":const n=t[e];c=c.concat(n?n.map((e=>e.constructor===String?e:e[1]?e[0]:void 0)).filter((e=>void 0!==e)):[]);break;case"class":c=c.concat(t[e].split(" "));break;case"data":const i=t[e];for(const e in i)i.hasOwnProperty(e)&&(i[e].constructor===String?o.push("data-"+e,i[e]):o.push("data-"+e,JSON.stringify(i[e])));break;case"styles":o.push("style",t[e]);break;case"on":const u=t[e];"string"==typeof u[0]?"function"==typeof u[1]?o.push("on"+u[0],u[1]):o.push("on"+u[0],(e=>a(r,u,e))):u.forEach((e=>{"function"==typeof e[1]?o.push("on"+e[0],e[1]):o.push("on"+e[0],(t=>a(r,e,t)))}));break;default:switch(typeof t[e]){case"function":o.push("on"+e,t[e]);break;case"object":default:o.push(e,t[e]);break;case"boolean":t[e]&&o.push(e,e)}}return c.length&&o.unshift("class",c.join(" ")),s&&o.unshift("id",s),l&&o.unshift("ref",l),(0,i.elementOpen)(e,t.key,void 0,...o),t.skip&&(0,i.skip)(),r&&l&&(r.refs[l]=(0,i.currentElement)()),u&&u.mount&&u.mount.constructor===Function&&(u.mount((0,i.currentElement)()),(0,i.skip)()),!!t.skip}close(e,t,n){(0,i.elementClose)(e)}text(e,t){(0,i.text)(e)}fnc(e,t){e((0,i.currentElement)())&&(0,i.skip)()}obj(e,t){"toHsml"in e?e.toHsml&&(0,r.hsml)(e.toHsml(),this,e):this.text(""+e,t)}}function s(e,t){(0,r.hsml)(e,new o,t)}t.hsml2idomPatch=function(e,t,n){(0,i.patch)(e,(e=>e&&s(e,n)),t)},t.hsmls2idomPatch=function(e,t,n){(0,i.patch)(e,(e=>e&&function(e,t){for(const n of e)if(null!=n)if(n.constructor===String)(0,i.text)(n);else if("toHsml"in n){const e=n;e.toHsml&&s(e.toHsml(),e)}else s(n,t)}(e,n)),t)}},8574:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hjoin=t.hsml=t.NBSP=void 0,t.NBSP=" ",t.hsml=function e(t,n,r){if(null!=t)switch(t.constructor){case Array:!function(t,n,r){var i;if("string"!=typeof t[0])return void console.error("HSML tag head not string:",t);const a=t[0],o=t[1],s=o&&o.constructor===Object;let c,l,u=[];const d=t[s?2:1];switch(null!=d&&d.constructor){case Array:u=d;break;case Function:c=d;break;case String:case Boolean:case Number:case Date:u=[d];break;default:l=d}const f=a.split("~"),p=f[1],h=f[0].split("."),m=h[0].split("#"),b=null!==(i=m[0])&&void 0!==i?i:"div",v=m[1],y=h.slice(1);let g;g=s?o:{},v&&(g._id=v),y.length&&(g._classes=y),p&&(g._ref=p),l&&(g._hObj=l);const A=n.open(b,g,u,r);c&&n.fnc(c,r),A||u.forEach((t=>e(t,n,r))),n.close(b,u,r)}(t,n,r);break;case Function:n.fnc(t,r);break;case String:n.text(t,r);break;case Boolean:n.text(""+t,r);break;case Number:const i=t,a=i.toLocaleString?i.toLocaleString():i.toString();n.text(a,r);break;case Date:const o=t,s=o.toLocaleString?o.toLocaleString():o.toString();n.text(s,r);break;default:n.obj(t,r)}},t.hjoin=function(e,t){const n=e.reduce(((e,n)=>(e.push(n,t),e)),[]);return n.splice(-1),n}},5510:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.updatePatchContext=t.setInSkip=t.setInAttributes=t.assertPatchOuterHasParentNode=t.assertPatchElementNoExtras=t.assertNotInSkip=t.assertNoChildrenDeclaredYet=t.assertVirtualAttributesClosed=t.assertCloseMatchesOpenTag=t.assertInAttributes=t.assertNotInAttributes=t.assertNoUnclosedTags=t.assertInPatch=t.assert=void 0;const r=n(6384);let i=!1,a=!1,o=!1;function s(e){if(r.DEBUG&&!e)throw new Error("Expected value to be defined");return e}t.assert=s,t.assertInPatch=function(e){if(!o)throw new Error("Cannot call "+e+"() unless in patch.")},t.assertNoUnclosedTags=function(e,t){if(e===t)return;let n=e;const r=[];for(;n&&n!==t;)r.push(n.nodeName.toLowerCase()),n=n.parentNode;throw new Error("One or more tags were not closed:\n"+r.join("\n"))},t.assertPatchOuterHasParentNode=function(e){e||console.warn("patchOuter requires the node have a parent if there is a key.")},t.assertNotInAttributes=function(e){if(i)throw new Error(e+"() can not be called between elementOpenStart() and elementOpenEnd().")},t.assertNotInSkip=function(e){if(a)throw new Error(e+"() may not be called inside an element that has called skip().")},t.assertInAttributes=function(e){if(!i)throw new Error(e+"() can only be called after calling elementOpenStart().")},t.assertVirtualAttributesClosed=function(){if(i)throw new Error("elementOpenEnd() must be called after calling elementOpenStart().")},t.assertCloseMatchesOpenTag=function(e,t){if(e!==t)throw new Error('Received a call to close "'+t+'" but "'+e+'" was open.')},t.assertNoChildrenDeclaredYet=function(e,t){if(null!==t)throw new Error(e+"() must come before any child declarations inside the current element.")},t.assertPatchElementNoExtras=function(e,t,n,r){const i=s(e),a=s(t),o=a.nextSibling===n&&a.previousSibling===r,c=a.nextSibling===i.nextSibling&&a.previousSibling===r;if(!o&&!c&&a!==i)throw new Error("There must be exactly one top level call corresponding to the patched element.")},t.updatePatchContext=function(e){o=null!=e},t.setInAttributes=function(e){const t=i;return i=e,t},t.setInSkip=function(e){const t=a;return a=e,t}},5513:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.attributes=t.applyAttr=t.applyProp=t.updateAttribute=t.createAttributeMap=void 0;const r=n(5510),i=n(1326),a=n(5641);function o(e,t,n){if(null==n)e.removeAttribute(t);else{const r=function(e){return 0===e.lastIndexOf("xml:",0)?"http://www.w3.org/XML/1998/namespace":0===e.lastIndexOf("xlink:",0)?"http://www.w3.org/1999/xlink":null}(t);r?e.setAttributeNS(r,t,n):e.setAttribute(t,n)}}function s(e,t,n){n instanceof Boolean?e[t]=1==n:e[t]=n}function c(e,t,n){t.indexOf("-")>=0?e.setProperty(t,n):e[t]=n}function l(e,t,n){(0,r.assert)("style"in e);const a=e.style;if("string"==typeof n)a.cssText=n;else{a.cssText="";for(const e in n)(0,i.has)(n,e)&&c(a,e,n[e])}}function u(e,t,n){const r=typeof n;"object"===r||"function"===r?s(e,t,n):o(e,t,n)}function d(){const e=(0,i.createMap)();return e[a.symbols.default]=u,e.style=l,e}t.applyAttr=o,t.applyProp=s,t.createAttributeMap=d;const f=d();t.attributes=f,t.updateAttribute=function(e,t,n,r){(r[t]||r[a.symbols.default])(e,t,n)}},6413:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.flush=t.queueChange=void 0;const r=n(1326),i=[];let a=0;t.queueChange=function(e,t,n,r,a){i.push(e),i.push(t),i.push(n),i.push(r),i.push(a)},t.flush=function(){const e=a,t=i.length;a=t;for(let n=e;n<t;n+=5)(0,i[n])(i[n+1],i[n+2],i[n+3],i[n+4]);a=e,(0,r.truncateArray)(i,e)}},9210:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0;const r=n(4536);t.Context=class{constructor(e){this.created=[],this.deleted=[],this.node=e}markCreated(e){this.created.push(e)}markDeleted(e){this.deleted.push(e)}notifyChanges(){r.notifications.nodesCreated&&this.created.length>0&&r.notifications.nodesCreated(this.created),r.notifications.nodesDeleted&&this.deleted.length>0&&r.notifications.nodesDeleted(this.deleted)}}},5897:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.tryGetCurrentElement=t.skipNode=t.skip=t.currentPointer=t.currentContext=t.currentElement=t.close=t.open=t.patchOuter=t.patchInner=t.createPatchOuter=t.createPatchInner=t.text=t.getAttrsBuilder=t.getArgsBuilder=t.alwaysDiffAttributes=t.alignWithDOM=void 0;const r=n(5510),i=n(9210),a=n(397),o=n(6384),s=n(2051),c=n(979);function l(e,t,n,r,i){return t==n&&r==i}let u=null,d=null,f=null,p=null,h=[],m=l,b=[],v=[];function y(e,t,n){const r=(0,s.getData)(e,n);return m(e,t,r.nameOrCtor,n,r.key)}function g(e,t,n){const r=e;let i=t;for(;i!==n;){const e=i.nextSibling;r.removeChild(i),u.markDeleted(i),i=e}}function A(){return d?d.nextSibling:f.firstChild}function O(){f=d,d=null}function w(){g(f,A(),null),d=f,f=f.parentNode}function P(){d=A()}function _(e,t,n){P();const r=function(e,t,n){if(!e)return null;let r=e;do{if(y(r,t,n))return r}while(n&&(r=r.nextSibling));return null}(d,e,t),i=r||function(e,t,n){let r;return"#text"===e?r=(0,c.createText)(p):(r=(0,c.createElement)(p,f,e,t),n&&r.setAttribute("nonce",n)),u.markCreated(r),r}(e,t,n);i!==d&&(h.indexOf(i)>=0?(0,a.moveBefore)(f,i,d):f.insertBefore(i,d),d=i)}function E(e,t={}){const{matches:n=l}=t;return(t,s,c)=>{const l=u,y=p,g=h,A=b,O=v,w=d,P=f,_=m;let E=!1,D=!1;p=t.ownerDocument,u=new i.Context(t),m=n,b=[],v=[],d=null,f=t.parentNode,h=(0,a.getFocusedPath)(t,f),o.DEBUG&&(E=(0,r.setInAttributes)(!1),D=(0,r.setInSkip)(!1),(0,r.updatePatchContext)(u));try{const n=e(t,s,c);return o.DEBUG&&(0,r.assertVirtualAttributesClosed)(),n}finally{u.notifyChanges(),p=y,u=l,m=_,b=A,v=O,d=w,f=P,h=g,o.DEBUG&&((0,r.setInAttributes)(E),(0,r.setInSkip)(D),(0,r.updatePatchContext)(u))}}}function D(e){return E(((e,t,n)=>(d=e,O(),t(n),w(),o.DEBUG&&(0,r.assertNoUnclosedTags)(d,e),e)),e)}function k(e){return E(((e,t,n)=>{const i={nextSibling:e};let a=null,c=null;return o.DEBUG&&(a=e.nextSibling,c=e.previousSibling),d=i,t(n),o.DEBUG&&((0,s.getData)(e).key&&(0,r.assertPatchOuterHasParentNode)(f),(0,r.assertPatchElementNoExtras)(i,d,a,c)),f&&g(f,A(),e.nextSibling),i===d?null:d}),e)}t.getArgsBuilder=function(){return b},t.getAttrsBuilder=function(){return v},t.alwaysDiffAttributes=function(e){(0,s.getData)(e).alwaysDiffAttributes=!0},t.skipNode=P,t.alignWithDOM=_,t.open=function(e,t,n){return _(e,t,n),O(),f},t.close=function(){return o.DEBUG&&(0,r.setInSkip)(!1),w(),d},t.text=function(){return _("#text",null),d},t.currentElement=function(){return o.DEBUG&&((0,r.assertInPatch)("currentElement"),(0,r.assertNotInAttributes)("currentElement")),f},t.tryGetCurrentElement=function(){return f},t.currentPointer=function(){return o.DEBUG&&((0,r.assertInPatch)("currentPointer"),(0,r.assertNotInAttributes)("currentPointer")),A()},t.currentContext=function(){return u},t.skip=function(){o.DEBUG&&((0,r.assertNoChildrenDeclaredYet)("skip",d),(0,r.setInSkip)(!0)),d=f.lastChild},t.createPatchInner=D,t.createPatchOuter=k;const x=D();t.patchInner=x;const N=k();t.patchOuter=N},5676:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG=void 0,t.DEBUG=!0},737:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDiff=void 0;const r=n(1326),i=n(6413),a=(0,r.createMap)();t.calculateDiff=function(e,t,n,o,s,c=!1){const l=!e.length||c;let u=0;for(;u<t.length;u+=2){const r=t[u];if(l)e[u]=r;else if(e[u]!==r)break;const a=t[u+1];(l||e[u+1]!==a)&&(e[u+1]=a,(0,i.queueChange)(o,n,r,a,s))}if(u<t.length||u<e.length){const c=u;for(u=c;u<e.length;u+=2)a[e[u]]=e[u+1];for(u=c;u<t.length;u+=2){const r=t[u],c=t[u+1];a[r]!==c&&(0,i.queueChange)(o,n,r,c,s),e[u]=r,e[u+1]=c,delete a[r]}(0,r.truncateArray)(e,t.length);for(const e in a)(0,i.queueChange)(o,n,e,void 0,s),delete a[e]}(0,i.flush)()}},397:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.moveBefore=t.getFocusedPath=t.isText=t.isElement=void 0;const r=n(5510);t.isElement=function(e){return 1===e.nodeType},t.isText=function(e){return 3===e.nodeType};const i="undefined"!=typeof Node&&Node.prototype.getRootNode||function(){let e=this,t=e;for(;e;)t=e,e=e.parentNode;return t};t.getFocusedPath=function(e,t){const n=function(e){const t=i.call(e);return function(e){return 11===e.nodeType||9===e.nodeType}(t)?t.activeElement:null}(e);return n&&e.contains(n)?function(e,t){const n=[];let i=e;for(;i!==t;){const e=(0,r.assert)(i);n.push(e),i=e.parentNode||(t?e.host:null)}return n}(n,t):[]},t.moveBefore=function(e,t,n){const r=t.nextSibling;let i=n;for(;null!==i&&i!==t;){const t=i.nextSibling;e.insertBefore(i,r),i=t}}},6384:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.setKeyAttributeName=t.getKeyAttributeName=t.DEBUG=void 0;let r="key";t.getKeyAttributeName=function(){return r},t.setKeyAttributeName=function(e){r=e};var i=n(5676);Object.defineProperty(t,"DEBUG",{enumerable:!0,get:function(){return i.DEBUG}})},706:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.text=t.key=t.elementVoid=t.elementOpenStart=t.elementOpenEnd=t.elementOpen=t.elementClose=t.attr=t.applyStatics=t.applyAttrs=t.symbols=t.notifications=t.isDataInitialized=t.importNode=t.getKey=t.clearCache=t.setKeyAttributeName=t.tryGetCurrentElement=t.skipNode=t.skip=t.patchOuter=t.patchInner=t.patch=t.open=t.currentPointer=t.currentContext=t.currentElement=t.createPatchOuter=t.createPatchInner=t.close=t.alwaysDiffAttributes=t.alignWithDOM=t.createAttributeMap=t.attributes=t.applyProp=t.applyAttr=void 0;var a=n(5513);Object.defineProperty(t,"applyAttr",{enumerable:!0,get:function(){return a.applyAttr}}),Object.defineProperty(t,"applyProp",{enumerable:!0,get:function(){return a.applyProp}}),Object.defineProperty(t,"attributes",{enumerable:!0,get:function(){return a.attributes}}),Object.defineProperty(t,"createAttributeMap",{enumerable:!0,get:function(){return a.createAttributeMap}});var o=n(5897);Object.defineProperty(t,"alignWithDOM",{enumerable:!0,get:function(){return o.alignWithDOM}}),Object.defineProperty(t,"alwaysDiffAttributes",{enumerable:!0,get:function(){return o.alwaysDiffAttributes}}),Object.defineProperty(t,"close",{enumerable:!0,get:function(){return o.close}}),Object.defineProperty(t,"createPatchInner",{enumerable:!0,get:function(){return o.createPatchInner}}),Object.defineProperty(t,"createPatchOuter",{enumerable:!0,get:function(){return o.createPatchOuter}}),Object.defineProperty(t,"currentElement",{enumerable:!0,get:function(){return o.currentElement}}),Object.defineProperty(t,"currentContext",{enumerable:!0,get:function(){return o.currentContext}}),Object.defineProperty(t,"currentPointer",{enumerable:!0,get:function(){return o.currentPointer}}),Object.defineProperty(t,"open",{enumerable:!0,get:function(){return o.open}}),Object.defineProperty(t,"patch",{enumerable:!0,get:function(){return o.patchInner}}),Object.defineProperty(t,"patchInner",{enumerable:!0,get:function(){return o.patchInner}}),Object.defineProperty(t,"patchOuter",{enumerable:!0,get:function(){return o.patchOuter}}),Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return o.skip}}),Object.defineProperty(t,"skipNode",{enumerable:!0,get:function(){return o.skipNode}}),Object.defineProperty(t,"tryGetCurrentElement",{enumerable:!0,get:function(){return o.tryGetCurrentElement}});var s=n(6384);Object.defineProperty(t,"setKeyAttributeName",{enumerable:!0,get:function(){return s.setKeyAttributeName}});var c=n(2051);Object.defineProperty(t,"clearCache",{enumerable:!0,get:function(){return c.clearCache}}),Object.defineProperty(t,"getKey",{enumerable:!0,get:function(){return c.getKey}}),Object.defineProperty(t,"importNode",{enumerable:!0,get:function(){return c.importNode}}),Object.defineProperty(t,"isDataInitialized",{enumerable:!0,get:function(){return c.isDataInitialized}});var l=n(4536);Object.defineProperty(t,"notifications",{enumerable:!0,get:function(){return l.notifications}});var u=n(5641);Object.defineProperty(t,"symbols",{enumerable:!0,get:function(){return u.symbols}});var d=n(2542);Object.defineProperty(t,"applyAttrs",{enumerable:!0,get:function(){return d.applyAttrs}}),Object.defineProperty(t,"applyStatics",{enumerable:!0,get:function(){return d.applyStatics}}),Object.defineProperty(t,"attr",{enumerable:!0,get:function(){return d.attr}}),Object.defineProperty(t,"elementClose",{enumerable:!0,get:function(){return d.elementClose}}),Object.defineProperty(t,"elementOpen",{enumerable:!0,get:function(){return d.elementOpen}}),Object.defineProperty(t,"elementOpenEnd",{enumerable:!0,get:function(){return d.elementOpenEnd}}),Object.defineProperty(t,"elementOpenStart",{enumerable:!0,get:function(){return d.elementOpenStart}}),Object.defineProperty(t,"elementVoid",{enumerable:!0,get:function(){return d.elementVoid}}),Object.defineProperty(t,"key",{enumerable:!0,get:function(){return d.key}}),Object.defineProperty(t,"text",{enumerable:!0,get:function(){return d.text}}),i(n(1469),t)},2051:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.clearCache=t.isDataInitialized=t.importNode=t.initData=t.getKey=t.getData=t.NodeData=void 0;const r=n(5510),i=n(1326),a=n(397),o=n(6384);class s{constructor(e,t,n){this._attrsArr=null,this.staticsApplied=!1,this.alwaysDiffAttributes=!1,this.nameOrCtor=e,this.key=t,this.text=n}hasEmptyAttrsArr(){const e=this._attrsArr;return!e||!e.length}getAttrsArr(e){return this._attrsArr||(this._attrsArr=(0,i.createArray)(e))}}function c(e,t,n,r){const i=new s(t,n,r);return e.__incrementalDOMData=i,i}function l(e,t){if(e.__incrementalDOMData)return e.__incrementalDOMData;const n=(0,a.isElement)(e)?e.localName:e.nodeName,r=(0,o.getKeyAttributeName)(),i=(0,a.isElement)(e)&&null!=r?e.getAttribute(r):null,s=c(e,n,(0,a.isElement)(e)?i||t:null);return(0,a.isElement)(e)&&function(e,t){const n=e.attributes,r=n.length;if(!r)return;const i=t.getAttrsArr(r);for(let e=0,t=0;e<r;e+=1,t+=2){const r=n[e],a=r.name,o=r.value;i[t]=a,i[t+1]=o}}(e,s),s}function u(e,t){return l(e,t)}t.NodeData=s,t.initData=c,t.isDataInitialized=function(e){return Boolean(e.__incrementalDOMData)},t.importNode=function e(t){l(t);for(let n=t.firstChild;n;n=n.nextSibling)e(n)},t.getData=u,t.getKey=function(e){return(0,r.assert)(e.__incrementalDOMData),u(e).key},t.clearCache=function e(t){t.__incrementalDOMData=null;for(let n=t.firstChild;n;n=n.nextSibling)e(n)}},979:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createText=t.createElement=void 0;const r=n(2051);t.createElement=function(e,t,n,i){let a;if("function"==typeof n)a=new n;else{const i=function(e,t){return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/Math/MathML":null==t||"foreignObject"===(0,r.getData)(t).nameOrCtor?null:t.namespaceURI}(n,t);a=i?e.createElementNS(i,n):e.createElement(n)}return(0,r.initData)(a,n,i),a},t.createText=function(e){const t=e.createTextNode("");return(0,r.initData)(t,"#text",null),t}},4536:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.notifications=void 0,t.notifications={nodesCreated:null,nodesDeleted:null}},5641:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.symbols=void 0,t.symbols={default:"__default"}},1469:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},1326:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.truncateArray=t.has=t.createMap=t.createArray=void 0;const n=Object.prototype.hasOwnProperty;function r(){}function i(e,t){for(;e.length>t;)e.pop()}r.prototype=Object.create(null),t.has=function(e,t){return n.call(e,t)},t.createMap=function(){return new r},t.truncateArray=i,t.createArray=function(e){const t=new Array(e);return i(t,0),t}},2542:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.key=t.attr=t.text=t.elementClose=t.elementVoid=t.elementOpen=t.elementOpenEnd=t.elementOpenStart=t.applyStatics=t.applyAttrs=void 0;const r=n(5510),i=n(5513),a=n(5897),o=n(6384),s=n(2051),c=n(1326),l=n(737),u=3,d=(0,c.createMap)();function f(e,t,n){const r=(0,a.getAttrsBuilder)(),o=t.getAttrsArr(r.length);(0,l.calculateDiff)(o,r,e,i.updateAttribute,n,t.alwaysDiffAttributes),(0,c.truncateArray)(r,0)}function p(e,t,n,r){if(t.staticsApplied)return;if(t.staticsApplied=!0,!n||!n.length)return;if(t.hasEmptyAttrsArr()){for(let t=0;t<n.length;t+=2)(0,i.updateAttribute)(e,n[t],n[t+1],r);return}for(let e=0;e<n.length;e+=2)d[n[e]]=e+1;const a=t.getAttrsArr(0);let o=0;for(let e=0;e<a.length;e+=2){const t=a[e],r=a[e+1],i=d[t];i?n[i]===r&&delete d[t]:(a[o]=t,a[o+1]=r,o+=2)}(0,c.truncateArray)(a,o);for(const t in d)(0,i.updateAttribute)(e,t,n[d[t]],r),delete d[t]}function h(e,t,n){const i=(0,a.getArgsBuilder)();o.DEBUG&&((0,r.assertNotInAttributes)("elementOpenStart"),(0,r.setInAttributes)(!0)),i[0]=e,i[1]=t,i[2]=n}function m(e,t){const n=(0,a.getAttrsBuilder)();o.DEBUG&&(0,r.assertInPatch)("attr"),n.push(e),n.push(t)}function b(){const e=(0,a.getArgsBuilder)();o.DEBUG&&((0,r.assertInAttributes)("elementOpenEnd"),(0,r.setInAttributes)(!1));const t=(0,a.open)(e[0],e[1],function(){const e=(0,a.getArgsBuilder)()[2];if(e)for(let t=0;t<e.length;t+=2)if("nonce"===e[t])return e[t+1];return""}()),n=(0,s.getData)(t);return p(t,n,e[2],i.attributes),f(t,n,i.attributes),(0,c.truncateArray)(e,0),t}function v(e,t,n,...i){o.DEBUG&&((0,r.assertNotInAttributes)("elementOpen"),(0,r.assertNotInSkip)("elementOpen")),h(e,t,n);for(let e=u;e<arguments.length;e+=2)m(arguments[e],arguments[e+1]);return b()}function y(e){o.DEBUG&&(0,r.assertNotInAttributes)("elementClose");const t=(0,a.close)();return o.DEBUG&&(0,r.assertCloseMatchesOpenTag)((0,s.getData)(t).nameOrCtor,e),t}t.elementOpenStart=h,t.key=function(e){const t=(0,a.getArgsBuilder)();o.DEBUG&&((0,r.assertInAttributes)("key"),(0,r.assert)(t)),t[1]=e},t.attr=m,t.elementOpenEnd=b,t.elementOpen=v,t.applyAttrs=function(e=i.attributes){const t=(0,a.currentElement)();f(t,(0,s.getData)(t),e)},t.applyStatics=function(e,t=i.attributes){const n=(0,a.currentElement)();p(n,(0,s.getData)(n),e,t)},t.elementClose=y,t.elementVoid=function(e,t,n,...r){return v.apply(null,arguments),y(e)},t.text=function(e,...t){o.DEBUG&&((0,r.assertNotInAttributes)("text"),(0,r.assertNotInSkip)("text"));const n=(0,a.text)(),i=(0,s.getData)(n);if(i.text!==e){i.text=e;let t=e;for(let e=1;e<arguments.length;e+=1)t=(0,arguments[e])(t);n.data!==t&&(n.data=t)}return n}}},t={};return function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(7731)}()}));
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){"use strict";var e={7731:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.HApp=t.happel=t.happ=t.HDispatchScopes=t.HAppActions=void 0;const i=n(8982),a=console.log,o=console.error,s=console.warn;var c,l;!function(e){e.init="happ-init",e.mount="happ-mount",e.umount="happ-umount",e.action="happ-action",e.attribute="happ-attribute"}(c=t.HAppActions||(t.HAppActions={})),(l=t.HDispatchScopes||(t.HDispatchScopes={})).element="element",l.window="window";const u=window.requestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},d=window.cancelAnimationFrame||function(e){window.clearTimeout(e)},f="action:",p="dispatch:",h="render:",m="happ";t.happ=function(e){return new b(e.state,e.view,e.dispatcher,e.element,e.debug,e.name)},t.happel=function(e){customElements.define(`${m}-${e.name}`,class extends HTMLElement{static get observedAttributes(){return e.attributes}constructor(){super(),this._happel=new b(e.state,e.view,e.dispatcher,void 0,e.debug,e.name,e.attributes),this._happel.customElement=this}connectedCallback(){this.attachShadow({mode:"open"}),this._happel.mount(this.shadowRoot)}disconnectedCallback(){this._happel.umount()}adoptedCallback(){this._happel.update()}attributeChangedCallback(e,t,n){this._happel.dispatch(c.attribute,{attrName:e,oldVal:t,newVal:n})}})};class b{constructor(e,t,n,i,s,l,p){this.refs={},this.dispatch=(e,t,n)=>r(this,void 0,void 0,(function*(){return this._dispatchAction(e,t,void 0,n)})),this.render=()=>{if(this.debug){const e=performance.now();let t;try{t=this.view(this.state)}catch(e){o(this.name,h,e)}const n=performance.now();return a(this.name,h,n-e+" ms",t),null!=t?t:[]}{let e;try{e=this.view(this.state)}catch(e){o(this.name,h,e)}return null!=e?e:[]}},this.actionCb=(e,t,n)=>{void 0===(t=(null==t?void 0:t.constructor)===Function?t(n):t)&&n&&(t=n instanceof CustomEvent?n.detail:function(e){const t=e.target;if("FORM"===t.nodeName){e.preventDefault();const n={data:{},validation:{},valid:!0},r=t.elements;for(let e=0;e<r.length;e++){const t=y(r[e]);if(t&&t.name){const i=n.data,a=t.name,o=t.value;void 0===i[a]?i[a]=o:"string"==typeof i[a]||i[a]instanceof String?i[a]=o instanceof Array?[i[a],...o]:[i[a],o]:i[a]instanceof Array?o instanceof Array?i[a]=i[a].concat(o):i[a].push(o):i[a]=o instanceof Array?[i[a],...o]:[i[a],o],i[a]instanceof Array&&(i[a]=i[a].filter((e=>null!==e)),"radio"===r[e].type&&(i[a]=i[a].length?i[a][0]:null)),t.validation&&(n.validation[a]=t.validation),t.valid||(n.valid=!1)}}return n}return y(t)}(n)),this._dispatchAction(e,t,n)},this.mount=e=>{const t="string"==typeof e?document.getElementById(e):e;if(t&&t[m]&&t[m].umount(),t&&!this.element){this.element=t,t[m]=this;const e=this.render();this._updateDom(t,e,this),this._dispatchAction(c.mount,this.element)}return this},this.umount=()=>{if(this.element){this._dispatchAction(c.umount,this.element),this.element.hasAttribute(m)&&this.element.removeAttribute(m);const e=this.element.querySelectorAll(`[${m}]`);for(let t=0;t<e.length;t++){const n=e[t].happ;null==n||n.umount()}for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);delete this.element.happ,this.element=void 0}return this._windowActionListener&&window.removeEventListener(c.action,this._windowActionListener),this},this.update=()=>(this.element&&!this._updateSched&&(this._updateSched=u((()=>{if(this.element){const e=this.render();this._updateDom(this.element,e,this)}this._updateSched=void 0}))),this),this.toHsml=()=>{if(this.element){if(!this._updateSched)return["div",{skip:!0}];d(this._updateSched),this._updateSched=void 0}const e=this.render();return e.push((e=>{this.element||(this.element=e,e.happ=this,this._dispatchAction(c.mount,this.element))})),["div",e]},this.toHtml=()=>this.element?this.element.outerHTML:"",this.debug=null!=s&&s,this.name=null!=l?l:m,this.attributes=null!=p?p:[],this.state=e(),this.view=t,this.dispatcher=null!=n?n:e=>r(this,void 0,void 0,(function*(){return a(this.name,f,e.type,e.data)})),this._dispatchAction(c.init,this).then((()=>i&&this.mount(i)))}_dispatchAction(e,t,n,i){return r(this,void 0,void 0,(function*(){if(this.debug){a(this.name,f,{type:e,data:t,event:n});const r=performance.now();yield this._dispatch(e,t,n,i);const o=performance.now();a(this.name,p,o-r+" ms",this.state)}else yield this._dispatch(e,t,n,i)}))}_dispatch(e,t,n,i){return r(this,void 0,void 0,(function*(){if(!i){try{yield this.dispatcher({type:e,data:t,event:n},this.state,this.dispatch)}catch(e){o(this.name,p,e)}this.update()}"element"===i&&this._dispatchElement(e,t),"window"===i&&this._dispatchWindow(e,t)}))}_dispatchElement(e,t){return r(this,void 0,void 0,(function*(){this.customElement&&v(this.customElement,c.action,{type:e,data:t}),!this.customElement&&this.element&&v(this.element,c.action,{type:e,data:t})}))}_dispatchWindow(e,t){return r(this,void 0,void 0,(function*(){window.dispatchEvent(new CustomEvent(c.action,{detail:{type:e,data:t}}))}))}windowActionListen(){this._windowActionListener?s("windowEventListener already added"):(this._windowActionListener=e=>{const t=e.detail;this._dispatchAction(c.action,t)},window.addEventListener(c.action,this._windowActionListener))}_updateDom(e,t,n){if(this.debug){const r=performance.now();(0,i.hsmls2idomPatch)(e,t,n);const o=performance.now();a(this.name,"update:",o-r+" ms",e)}else(0,i.hsmls2idomPatch)(e,t,n)}}function v(e,t,n){var r,i;null==e||e.dispatchEvent(new CustomEvent(t,{detail:n})),null===(i=(r=e)[`on${t}`])||void 0===i||i.call(r,new CustomEvent(t,{detail:n}))}function y(e){const t=e;if(t.willValidate){let e=!0;for(const n in t.validity)if("customError"!==n&&"valid"!==n&&t.validity[n]){const r=t.validation;if(r){const i=r[n];if(i){t.setCustomValidity(i),e=!1;break}t.setCustomValidity("");break}}e&&t.setCustomValidity("")}let n;switch(e.nodeName){case"INPUT":const t=e;switch(t.type){case"text":case"hidden":case"password":case"email":case"search":case"url":case"tel":case"color":case"submit":case"button":n={name:t.name,value:t.value,validation:t.validationMessage,valid:t.validity.valid};break;case"number":case"range":n={name:t.name,value:t.valueAsNumber,valueString:t.value,validation:t.validationMessage,valid:t.validity.valid};break;case"datetime-local":n={name:t.name,value:t.value,valueNumber:isNaN(t.valueAsNumber)?null:t.valueAsNumber,valueDate:isNaN(t.valueAsNumber)?null:new Date(t.valueAsNumber),validation:t.validationMessage,valid:t.validity.valid};break;case"date":case"month":case"time":case"week":n={name:t.name,value:t.value,valueNumber:isNaN(t.valueAsNumber)?null:t.valueAsNumber,valueDate:t.valueAsDate,validation:t.validationMessage,valid:t.validity.valid};break;case"radio":n={name:t.name,value:t.checked?t.value:null,valueString:t.value,validation:t.validationMessage,valid:t.validity.valid};break;case"checkbox":n="on"===t.value?{name:t.name,value:t.checked,valueString:t.value,validation:t.validationMessage,valid:t.validity.valid}:{name:t.name,value:t.checked?String(t.value):null,valueString:t.value,validation:t.validationMessage,valid:t.validity.valid};break;case"file":const e=t.files,r=1===e.length?e[0]:e;n={name:t.name,value:r,valueString:t.value,validation:t.validationMessage,valid:t.validity.valid}}break;case"SELECT":const r=e;if(r.multiple){const e=Array.from(r.selectedOptions).map((e=>e.value));n={name:r.name,value:e,valueString:r.value,validation:r.validationMessage,valid:r.validity.valid}}else n={name:r.name,value:r.value,validation:r.validationMessage,valid:r.validity.valid};break;case"TEXTAREA":const i=e;n={name:i.name,value:i.value,validation:i.validationMessage,valid:i.validity.valid};break;case"BUTTON":const a=e;n={name:a.name,value:a.value,validation:a.validationMessage,valid:a.validity.valid}}return n}t.HApp=b},8982:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hsmls2idomPatch=t.hsml2idomPatch=void 0;const r=n(8574),i=n(706);function a(e,t,n){e&&e.actionCb&&"function"==typeof e.actionCb&&e.actionCb(t[1],t[2],n)}class o{open(e,t,n,r){const o=[];let s=t._id,c=t._classes?t._classes:[],l=t._ref,u=t._hObj;for(const e in t)if(t.hasOwnProperty(e))switch(e){case"_id":case"_classes":case"_ref":case"_hObj":case"key":case"skip":break;case"id":s=t[e];break;case"ref":l=t[e];break;case"classes":const n=t[e];c=c.concat(n?n.map((e=>e.constructor===String?e:e[1]?e[0]:void 0)).filter((e=>void 0!==e)):[]);break;case"class":c=c.concat(t[e].split(" "));break;case"data":const i=t[e];for(const e in i)i.hasOwnProperty(e)&&(i[e].constructor===String?o.push("data-"+e,i[e]):o.push("data-"+e,JSON.stringify(i[e])));break;case"styles":o.push("style",t[e]);break;case"on":const u=t[e];"string"==typeof u[0]?"function"==typeof u[1]?o.push("on"+u[0],u[1]):o.push("on"+u[0],(e=>a(r,u,e))):u.forEach((e=>{"function"==typeof e[1]?o.push("on"+e[0],e[1]):o.push("on"+e[0],(t=>a(r,e,t)))}));break;default:switch(typeof t[e]){case"function":o.push("on"+e,t[e]);break;case"object":default:o.push(e,t[e]);break;case"boolean":t[e]&&o.push(e,e)}}return c.length&&o.unshift("class",c.join(" ")),s&&o.unshift("id",s),l&&o.unshift("ref",l),(0,i.elementOpen)(e,t.key,void 0,...o),t.skip&&(0,i.skip)(),r&&l&&(r.refs[l]=(0,i.currentElement)()),u&&u.mount&&u.mount.constructor===Function&&(u.mount((0,i.currentElement)()),(0,i.skip)()),!!t.skip}close(e,t,n){(0,i.elementClose)(e)}text(e,t){(0,i.text)(e)}fnc(e,t){e((0,i.currentElement)())&&(0,i.skip)()}obj(e,t){"toHsml"in e?e.toHsml&&(0,r.hsml)(e.toHsml(),this,e):this.text(""+e,t)}}function s(e,t){(0,r.hsml)(e,new o,t)}t.hsml2idomPatch=function(e,t,n){(0,i.patch)(e,(e=>e&&s(e,n)),t)},t.hsmls2idomPatch=function(e,t,n){(0,i.patch)(e,(e=>e&&function(e,t){for(const n of e)if(null!=n)if(n.constructor===String)(0,i.text)(n);else if("toHsml"in n){const e=n;e.toHsml&&s(e.toHsml(),e)}else s(n,t)}(e,n)),t)}},8574:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hjoin=t.hsml=t.NBSP=void 0,t.NBSP=" ",t.hsml=function e(t,n,r){if(null!=t)switch(t.constructor){case Array:!function(t,n,r){var i;if("string"!=typeof t[0])return void console.error("HSML tag head not string:",t);const a=t[0],o=t[1],s=o&&o.constructor===Object;let c,l,u=[];const d=t[s?2:1];switch(null!=d&&d.constructor){case Array:u=d;break;case Function:c=d;break;case String:case Boolean:case Number:case Date:u=[d];break;default:l=d}const f=a.split("~"),p=f[1],h=f[0].split("."),m=h[0].split("#"),b=null!==(i=m[0])&&void 0!==i?i:"div",v=m[1],y=h.slice(1);let g;g=s?o:{},v&&(g._id=v),y.length&&(g._classes=y),p&&(g._ref=p),l&&(g._hObj=l);const A=n.open(b,g,u,r);c&&n.fnc(c,r),A||u.forEach((t=>e(t,n,r))),n.close(b,u,r)}(t,n,r);break;case Function:n.fnc(t,r);break;case String:n.text(t,r);break;case Boolean:n.text(""+t,r);break;case Number:const i=t,a=i.toLocaleString?i.toLocaleString():i.toString();n.text(a,r);break;case Date:const o=t,s=o.toLocaleString?o.toLocaleString():o.toString();n.text(s,r);break;default:n.obj(t,r)}},t.hjoin=function(e,t){const n=e.reduce(((e,n)=>(e.push(n,t),e)),[]);return n.splice(-1),n}},5510:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.updatePatchContext=t.setInSkip=t.setInAttributes=t.assertPatchOuterHasParentNode=t.assertPatchElementNoExtras=t.assertNotInSkip=t.assertNoChildrenDeclaredYet=t.assertVirtualAttributesClosed=t.assertCloseMatchesOpenTag=t.assertInAttributes=t.assertNotInAttributes=t.assertNoUnclosedTags=t.assertInPatch=t.assert=void 0;const r=n(6384);let i=!1,a=!1,o=!1;function s(e){if(r.DEBUG&&!e)throw new Error("Expected value to be defined");return e}t.assert=s,t.assertInPatch=function(e){if(!o)throw new Error("Cannot call "+e+"() unless in patch.")},t.assertNoUnclosedTags=function(e,t){if(e===t)return;let n=e;const r=[];for(;n&&n!==t;)r.push(n.nodeName.toLowerCase()),n=n.parentNode;throw new Error("One or more tags were not closed:\n"+r.join("\n"))},t.assertPatchOuterHasParentNode=function(e){e||console.warn("patchOuter requires the node have a parent if there is a key.")},t.assertNotInAttributes=function(e){if(i)throw new Error(e+"() can not be called between elementOpenStart() and elementOpenEnd().")},t.assertNotInSkip=function(e){if(a)throw new Error(e+"() may not be called inside an element that has called skip().")},t.assertInAttributes=function(e){if(!i)throw new Error(e+"() can only be called after calling elementOpenStart().")},t.assertVirtualAttributesClosed=function(){if(i)throw new Error("elementOpenEnd() must be called after calling elementOpenStart().")},t.assertCloseMatchesOpenTag=function(e,t){if(e!==t)throw new Error('Received a call to close "'+t+'" but "'+e+'" was open.')},t.assertNoChildrenDeclaredYet=function(e,t){if(null!==t)throw new Error(e+"() must come before any child declarations inside the current element.")},t.assertPatchElementNoExtras=function(e,t,n,r){const i=s(e),a=s(t),o=a.nextSibling===n&&a.previousSibling===r,c=a.nextSibling===i.nextSibling&&a.previousSibling===r;if(!o&&!c&&a!==i)throw new Error("There must be exactly one top level call corresponding to the patched element.")},t.updatePatchContext=function(e){o=null!=e},t.setInAttributes=function(e){const t=i;return i=e,t},t.setInSkip=function(e){const t=a;return a=e,t}},5513:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.attributes=t.applyAttr=t.applyProp=t.updateAttribute=t.createAttributeMap=void 0;const r=n(5510),i=n(1326),a=n(5641);function o(e,t,n){if(null==n)e.removeAttribute(t);else{const r=function(e){return 0===e.lastIndexOf("xml:",0)?"http://www.w3.org/XML/1998/namespace":0===e.lastIndexOf("xlink:",0)?"http://www.w3.org/1999/xlink":null}(t);r?e.setAttributeNS(r,t,n):e.setAttribute(t,n)}}function s(e,t,n){n instanceof Boolean?e[t]=1==n:e[t]=n}function c(e,t,n){t.indexOf("-")>=0?e.setProperty(t,n):e[t]=n}function l(e,t,n){(0,r.assert)("style"in e);const a=e.style;if("string"==typeof n)a.cssText=n;else{a.cssText="";for(const e in n)(0,i.has)(n,e)&&c(a,e,n[e])}}function u(e,t,n){const r=typeof n;"object"===r||"function"===r?s(e,t,n):o(e,t,n)}function d(){const e=(0,i.createMap)();return e[a.symbols.default]=u,e.style=l,e}t.applyAttr=o,t.applyProp=s,t.createAttributeMap=d;const f=d();t.attributes=f,t.updateAttribute=function(e,t,n,r){(r[t]||r[a.symbols.default])(e,t,n)}},6413:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.flush=t.queueChange=void 0;const r=n(1326),i=[];let a=0;t.queueChange=function(e,t,n,r,a){i.push(e),i.push(t),i.push(n),i.push(r),i.push(a)},t.flush=function(){const e=a,t=i.length;a=t;for(let n=e;n<t;n+=5)(0,i[n])(i[n+1],i[n+2],i[n+3],i[n+4]);a=e,(0,r.truncateArray)(i,e)}},9210:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0;const r=n(4536);t.Context=class{constructor(e){this.created=[],this.deleted=[],this.node=e}markCreated(e){this.created.push(e)}markDeleted(e){this.deleted.push(e)}notifyChanges(){r.notifications.nodesCreated&&this.created.length>0&&r.notifications.nodesCreated(this.created),r.notifications.nodesDeleted&&this.deleted.length>0&&r.notifications.nodesDeleted(this.deleted)}}},5897:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.tryGetCurrentElement=t.skipNode=t.skip=t.currentPointer=t.currentContext=t.currentElement=t.close=t.open=t.patchOuter=t.patchInner=t.createPatchOuter=t.createPatchInner=t.text=t.getAttrsBuilder=t.getArgsBuilder=t.alwaysDiffAttributes=t.alignWithDOM=void 0;const r=n(5510),i=n(9210),a=n(397),o=n(6384),s=n(2051),c=n(979);function l(e,t,n,r,i){return t==n&&r==i}let u=null,d=null,f=null,p=null,h=[],m=l,b=[],v=[];function y(e,t,n){const r=(0,s.getData)(e,n);return m(e,t,r.nameOrCtor,n,r.key)}function g(e,t,n){const r=e;let i=t;for(;i!==n;){const e=i.nextSibling;r.removeChild(i),u.markDeleted(i),i=e}}function A(){return d?d.nextSibling:f.firstChild}function O(){f=d,d=null}function w(){g(f,A(),null),d=f,f=f.parentNode}function P(){d=A()}function _(e,t,n){P();const r=function(e,t,n){if(!e)return null;let r=e;do{if(y(r,t,n))return r}while(n&&(r=r.nextSibling));return null}(d,e,t),i=r||function(e,t,n){let r;return"#text"===e?r=(0,c.createText)(p):(r=(0,c.createElement)(p,f,e,t),n&&r.setAttribute("nonce",n)),u.markCreated(r),r}(e,t,n);i!==d&&(h.indexOf(i)>=0?(0,a.moveBefore)(f,i,d):f.insertBefore(i,d),d=i)}function E(e,t={}){const{matches:n=l}=t;return(t,s,c)=>{const l=u,y=p,g=h,A=b,O=v,w=d,P=f,_=m;let E=!1,D=!1;p=t.ownerDocument,u=new i.Context(t),m=n,b=[],v=[],d=null,f=t.parentNode,h=(0,a.getFocusedPath)(t,f),o.DEBUG&&(E=(0,r.setInAttributes)(!1),D=(0,r.setInSkip)(!1),(0,r.updatePatchContext)(u));try{const n=e(t,s,c);return o.DEBUG&&(0,r.assertVirtualAttributesClosed)(),n}finally{u.notifyChanges(),p=y,u=l,m=_,b=A,v=O,d=w,f=P,h=g,o.DEBUG&&((0,r.setInAttributes)(E),(0,r.setInSkip)(D),(0,r.updatePatchContext)(u))}}}function D(e){return E(((e,t,n)=>(d=e,O(),t(n),w(),o.DEBUG&&(0,r.assertNoUnclosedTags)(d,e),e)),e)}function k(e){return E(((e,t,n)=>{const i={nextSibling:e};let a=null,c=null;return o.DEBUG&&(a=e.nextSibling,c=e.previousSibling),d=i,t(n),o.DEBUG&&((0,s.getData)(e).key&&(0,r.assertPatchOuterHasParentNode)(f),(0,r.assertPatchElementNoExtras)(i,d,a,c)),f&&g(f,A(),e.nextSibling),i===d?null:d}),e)}t.getArgsBuilder=function(){return b},t.getAttrsBuilder=function(){return v},t.alwaysDiffAttributes=function(e){(0,s.getData)(e).alwaysDiffAttributes=!0},t.skipNode=P,t.alignWithDOM=_,t.open=function(e,t,n){return _(e,t,n),O(),f},t.close=function(){return o.DEBUG&&(0,r.setInSkip)(!1),w(),d},t.text=function(){return _("#text",null),d},t.currentElement=function(){return o.DEBUG&&((0,r.assertInPatch)("currentElement"),(0,r.assertNotInAttributes)("currentElement")),f},t.tryGetCurrentElement=function(){return f},t.currentPointer=function(){return o.DEBUG&&((0,r.assertInPatch)("currentPointer"),(0,r.assertNotInAttributes)("currentPointer")),A()},t.currentContext=function(){return u},t.skip=function(){o.DEBUG&&((0,r.assertNoChildrenDeclaredYet)("skip",d),(0,r.setInSkip)(!0)),d=f.lastChild},t.createPatchInner=D,t.createPatchOuter=k;const x=D();t.patchInner=x;const N=k();t.patchOuter=N},5676:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUG=void 0,t.DEBUG=!0},737:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.calculateDiff=void 0;const r=n(1326),i=n(6413),a=(0,r.createMap)();t.calculateDiff=function(e,t,n,o,s,c=!1){const l=!e.length||c;let u=0;for(;u<t.length;u+=2){const r=t[u];if(l)e[u]=r;else if(e[u]!==r)break;const a=t[u+1];(l||e[u+1]!==a)&&(e[u+1]=a,(0,i.queueChange)(o,n,r,a,s))}if(u<t.length||u<e.length){const c=u;for(u=c;u<e.length;u+=2)a[e[u]]=e[u+1];for(u=c;u<t.length;u+=2){const r=t[u],c=t[u+1];a[r]!==c&&(0,i.queueChange)(o,n,r,c,s),e[u]=r,e[u+1]=c,delete a[r]}(0,r.truncateArray)(e,t.length);for(const e in a)(0,i.queueChange)(o,n,e,void 0,s),delete a[e]}(0,i.flush)()}},397:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.moveBefore=t.getFocusedPath=t.isText=t.isElement=void 0;const r=n(5510);t.isElement=function(e){return 1===e.nodeType},t.isText=function(e){return 3===e.nodeType};const i="undefined"!=typeof Node&&Node.prototype.getRootNode||function(){let e=this,t=e;for(;e;)t=e,e=e.parentNode;return t};t.getFocusedPath=function(e,t){const n=function(e){const t=i.call(e);return function(e){return 11===e.nodeType||9===e.nodeType}(t)?t.activeElement:null}(e);return n&&e.contains(n)?function(e,t){const n=[];let i=e;for(;i!==t;){const e=(0,r.assert)(i);n.push(e),i=e.parentNode||(t?e.host:null)}return n}(n,t):[]},t.moveBefore=function(e,t,n){const r=t.nextSibling;let i=n;for(;null!==i&&i!==t;){const t=i.nextSibling;e.insertBefore(i,r),i=t}}},6384:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.setKeyAttributeName=t.getKeyAttributeName=t.DEBUG=void 0;let r="key";t.getKeyAttributeName=function(){return r},t.setKeyAttributeName=function(e){r=e};var i=n(5676);Object.defineProperty(t,"DEBUG",{enumerable:!0,get:function(){return i.DEBUG}})},706:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.text=t.key=t.elementVoid=t.elementOpenStart=t.elementOpenEnd=t.elementOpen=t.elementClose=t.attr=t.applyStatics=t.applyAttrs=t.symbols=t.notifications=t.isDataInitialized=t.importNode=t.getKey=t.clearCache=t.setKeyAttributeName=t.tryGetCurrentElement=t.skipNode=t.skip=t.patchOuter=t.patchInner=t.patch=t.open=t.currentPointer=t.currentContext=t.currentElement=t.createPatchOuter=t.createPatchInner=t.close=t.alwaysDiffAttributes=t.alignWithDOM=t.createAttributeMap=t.attributes=t.applyProp=t.applyAttr=void 0;var a=n(5513);Object.defineProperty(t,"applyAttr",{enumerable:!0,get:function(){return a.applyAttr}}),Object.defineProperty(t,"applyProp",{enumerable:!0,get:function(){return a.applyProp}}),Object.defineProperty(t,"attributes",{enumerable:!0,get:function(){return a.attributes}}),Object.defineProperty(t,"createAttributeMap",{enumerable:!0,get:function(){return a.createAttributeMap}});var o=n(5897);Object.defineProperty(t,"alignWithDOM",{enumerable:!0,get:function(){return o.alignWithDOM}}),Object.defineProperty(t,"alwaysDiffAttributes",{enumerable:!0,get:function(){return o.alwaysDiffAttributes}}),Object.defineProperty(t,"close",{enumerable:!0,get:function(){return o.close}}),Object.defineProperty(t,"createPatchInner",{enumerable:!0,get:function(){return o.createPatchInner}}),Object.defineProperty(t,"createPatchOuter",{enumerable:!0,get:function(){return o.createPatchOuter}}),Object.defineProperty(t,"currentElement",{enumerable:!0,get:function(){return o.currentElement}}),Object.defineProperty(t,"currentContext",{enumerable:!0,get:function(){return o.currentContext}}),Object.defineProperty(t,"currentPointer",{enumerable:!0,get:function(){return o.currentPointer}}),Object.defineProperty(t,"open",{enumerable:!0,get:function(){return o.open}}),Object.defineProperty(t,"patch",{enumerable:!0,get:function(){return o.patchInner}}),Object.defineProperty(t,"patchInner",{enumerable:!0,get:function(){return o.patchInner}}),Object.defineProperty(t,"patchOuter",{enumerable:!0,get:function(){return o.patchOuter}}),Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return o.skip}}),Object.defineProperty(t,"skipNode",{enumerable:!0,get:function(){return o.skipNode}}),Object.defineProperty(t,"tryGetCurrentElement",{enumerable:!0,get:function(){return o.tryGetCurrentElement}});var s=n(6384);Object.defineProperty(t,"setKeyAttributeName",{enumerable:!0,get:function(){return s.setKeyAttributeName}});var c=n(2051);Object.defineProperty(t,"clearCache",{enumerable:!0,get:function(){return c.clearCache}}),Object.defineProperty(t,"getKey",{enumerable:!0,get:function(){return c.getKey}}),Object.defineProperty(t,"importNode",{enumerable:!0,get:function(){return c.importNode}}),Object.defineProperty(t,"isDataInitialized",{enumerable:!0,get:function(){return c.isDataInitialized}});var l=n(4536);Object.defineProperty(t,"notifications",{enumerable:!0,get:function(){return l.notifications}});var u=n(5641);Object.defineProperty(t,"symbols",{enumerable:!0,get:function(){return u.symbols}});var d=n(2542);Object.defineProperty(t,"applyAttrs",{enumerable:!0,get:function(){return d.applyAttrs}}),Object.defineProperty(t,"applyStatics",{enumerable:!0,get:function(){return d.applyStatics}}),Object.defineProperty(t,"attr",{enumerable:!0,get:function(){return d.attr}}),Object.defineProperty(t,"elementClose",{enumerable:!0,get:function(){return d.elementClose}}),Object.defineProperty(t,"elementOpen",{enumerable:!0,get:function(){return d.elementOpen}}),Object.defineProperty(t,"elementOpenEnd",{enumerable:!0,get:function(){return d.elementOpenEnd}}),Object.defineProperty(t,"elementOpenStart",{enumerable:!0,get:function(){return d.elementOpenStart}}),Object.defineProperty(t,"elementVoid",{enumerable:!0,get:function(){return d.elementVoid}}),Object.defineProperty(t,"key",{enumerable:!0,get:function(){return d.key}}),Object.defineProperty(t,"text",{enumerable:!0,get:function(){return d.text}}),i(n(1469),t)},2051:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.clearCache=t.isDataInitialized=t.importNode=t.initData=t.getKey=t.getData=t.NodeData=void 0;const r=n(5510),i=n(1326),a=n(397),o=n(6384);class s{constructor(e,t,n){this._attrsArr=null,this.staticsApplied=!1,this.alwaysDiffAttributes=!1,this.nameOrCtor=e,this.key=t,this.text=n}hasEmptyAttrsArr(){const e=this._attrsArr;return!e||!e.length}getAttrsArr(e){return this._attrsArr||(this._attrsArr=(0,i.createArray)(e))}}function c(e,t,n,r){const i=new s(t,n,r);return e.__incrementalDOMData=i,i}function l(e,t){if(e.__incrementalDOMData)return e.__incrementalDOMData;const n=(0,a.isElement)(e)?e.localName:e.nodeName,r=(0,o.getKeyAttributeName)(),i=(0,a.isElement)(e)&&null!=r?e.getAttribute(r):null,s=c(e,n,(0,a.isElement)(e)?i||t:null);return(0,a.isElement)(e)&&function(e,t){const n=e.attributes,r=n.length;if(!r)return;const i=t.getAttrsArr(r);for(let e=0,t=0;e<r;e+=1,t+=2){const r=n[e],a=r.name,o=r.value;i[t]=a,i[t+1]=o}}(e,s),s}function u(e,t){return l(e,t)}t.NodeData=s,t.initData=c,t.isDataInitialized=function(e){return Boolean(e.__incrementalDOMData)},t.importNode=function e(t){l(t);for(let n=t.firstChild;n;n=n.nextSibling)e(n)},t.getData=u,t.getKey=function(e){return(0,r.assert)(e.__incrementalDOMData),u(e).key},t.clearCache=function e(t){t.__incrementalDOMData=null;for(let n=t.firstChild;n;n=n.nextSibling)e(n)}},979:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createText=t.createElement=void 0;const r=n(2051);t.createElement=function(e,t,n,i){let a;if("function"==typeof n)a=new n;else{const i=function(e,t){return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/Math/MathML":null==t||"foreignObject"===(0,r.getData)(t).nameOrCtor?null:t.namespaceURI}(n,t);a=i?e.createElementNS(i,n):e.createElement(n)}return(0,r.initData)(a,n,i),a},t.createText=function(e){const t=e.createTextNode("");return(0,r.initData)(t,"#text",null),t}},4536:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.notifications=void 0,t.notifications={nodesCreated:null,nodesDeleted:null}},5641:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.symbols=void 0,t.symbols={default:"__default"}},1469:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},1326:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.truncateArray=t.has=t.createMap=t.createArray=void 0;const n=Object.prototype.hasOwnProperty;function r(){}function i(e,t){for(;e.length>t;)e.pop()}r.prototype=Object.create(null),t.has=function(e,t){return n.call(e,t)},t.createMap=function(){return new r},t.truncateArray=i,t.createArray=function(e){const t=new Array(e);return i(t,0),t}},2542:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.key=t.attr=t.text=t.elementClose=t.elementVoid=t.elementOpen=t.elementOpenEnd=t.elementOpenStart=t.applyStatics=t.applyAttrs=void 0;const r=n(5510),i=n(5513),a=n(5897),o=n(6384),s=n(2051),c=n(1326),l=n(737),u=3,d=(0,c.createMap)();function f(e,t,n){const r=(0,a.getAttrsBuilder)(),o=t.getAttrsArr(r.length);(0,l.calculateDiff)(o,r,e,i.updateAttribute,n,t.alwaysDiffAttributes),(0,c.truncateArray)(r,0)}function p(e,t,n,r){if(t.staticsApplied)return;if(t.staticsApplied=!0,!n||!n.length)return;if(t.hasEmptyAttrsArr()){for(let t=0;t<n.length;t+=2)(0,i.updateAttribute)(e,n[t],n[t+1],r);return}for(let e=0;e<n.length;e+=2)d[n[e]]=e+1;const a=t.getAttrsArr(0);let o=0;for(let e=0;e<a.length;e+=2){const t=a[e],r=a[e+1],i=d[t];i?n[i]===r&&delete d[t]:(a[o]=t,a[o+1]=r,o+=2)}(0,c.truncateArray)(a,o);for(const t in d)(0,i.updateAttribute)(e,t,n[d[t]],r),delete d[t]}function h(e,t,n){const i=(0,a.getArgsBuilder)();o.DEBUG&&((0,r.assertNotInAttributes)("elementOpenStart"),(0,r.setInAttributes)(!0)),i[0]=e,i[1]=t,i[2]=n}function m(e,t){const n=(0,a.getAttrsBuilder)();o.DEBUG&&(0,r.assertInPatch)("attr"),n.push(e),n.push(t)}function b(){const e=(0,a.getArgsBuilder)();o.DEBUG&&((0,r.assertInAttributes)("elementOpenEnd"),(0,r.setInAttributes)(!1));const t=(0,a.open)(e[0],e[1],function(){const e=(0,a.getArgsBuilder)()[2];if(e)for(let t=0;t<e.length;t+=2)if("nonce"===e[t])return e[t+1];return""}()),n=(0,s.getData)(t);return p(t,n,e[2],i.attributes),f(t,n,i.attributes),(0,c.truncateArray)(e,0),t}function v(e,t,n,...i){o.DEBUG&&((0,r.assertNotInAttributes)("elementOpen"),(0,r.assertNotInSkip)("elementOpen")),h(e,t,n);for(let e=u;e<arguments.length;e+=2)m(arguments[e],arguments[e+1]);return b()}function y(e){o.DEBUG&&(0,r.assertNotInAttributes)("elementClose");const t=(0,a.close)();return o.DEBUG&&(0,r.assertCloseMatchesOpenTag)((0,s.getData)(t).nameOrCtor,e),t}t.elementOpenStart=h,t.key=function(e){const t=(0,a.getArgsBuilder)();o.DEBUG&&((0,r.assertInAttributes)("key"),(0,r.assert)(t)),t[1]=e},t.attr=m,t.elementOpenEnd=b,t.elementOpen=v,t.applyAttrs=function(e=i.attributes){const t=(0,a.currentElement)();f(t,(0,s.getData)(t),e)},t.applyStatics=function(e,t=i.attributes){const n=(0,a.currentElement)();p(n,(0,s.getData)(n),e,t)},t.elementClose=y,t.elementVoid=function(e,t,n,...r){return v.apply(null,arguments),y(e)},t.text=function(e,...t){o.DEBUG&&((0,r.assertNotInAttributes)("text"),(0,r.assertNotInSkip)("text"));const n=(0,a.text)(),i=(0,s.getData)(n);if(i.text!==e){i.text=e;let t=e;for(let e=1;e<arguments.length;e+=1)t=(0,arguments[e])(t);n.data!==t&&(n.data=t)}return n}}},t={};return function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(7731)}()}));
|
|
2
2
|
//# sourceMappingURL=hsml-app.js.map
|