peryl 1.5.2 → 1.5.3
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/README.md +30 -16
- package/demo/hsml-app-form-validation_demo.ts +22 -23
- package/demo/hsml-app-form_demo.ts +24 -20
- package/demo/hsml-app-test_demo.ts +35 -36
- package/demo/hsml-app-tictactoe_demo.ts +16 -15
- package/demo/hsml-app_demo.ts +20 -12
- package/demo/hsml-appel_demo.html +7 -0
- package/demo/hsml-appel_demo.ts +33 -25
- package/demo/hsml-appi_demo.ts +9 -9
- package/demo/hsml_demo.ts +27 -22
- package/demo/js/hsml-app-js-happi_demo.html +16 -8
- package/demo/js/hsml-app-js_demo.html +15 -15
- package/dist/browser-esmodule/encode.js.map +1 -1
- package/dist/browser-esmodule/hsml-app.js +67 -73
- package/dist/browser-esmodule/hsml-app.js.map +1 -1
- package/dist/browser-esmodule/hsml-convert.js.map +1 -1
- package/dist/browser-esmodule/hsml-dom.js +3 -3
- package/dist/browser-esmodule/hsml-dom.js.map +1 -1
- package/dist/browser-esmodule/hsml-h.js.map +1 -1
- package/dist/browser-esmodule/hsml-html.js +2 -2
- package/dist/browser-esmodule/hsml-html.js.map +1 -1
- package/dist/browser-esmodule/hsml-idom.js +5 -5
- package/dist/browser-esmodule/hsml-idom.js.map +1 -1
- package/dist/browser-esmodule/hsml.js.map +1 -1
- package/dist/browser-esmodule/http.js.map +1 -1
- package/dist/browser-esmodule/index.js +71 -77
- package/dist/browser-esmodule/index.js.map +1 -1
- package/dist/browser-esmodule/router.js.map +1 -1
- package/dist/browser-umd/encode.js +1 -1
- package/dist/browser-umd/encode.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/hsml-convert.js.map +1 -1
- package/dist/browser-umd/hsml-dom.js +1 -1
- package/dist/browser-umd/hsml-dom.js.map +1 -1
- package/dist/browser-umd/hsml-h.js.map +1 -1
- package/dist/browser-umd/hsml-html.js +1 -1
- package/dist/browser-umd/hsml-html.js.map +1 -1
- package/dist/browser-umd/hsml-idom.js +1 -1
- package/dist/browser-umd/hsml-idom.js.map +1 -1
- package/dist/browser-umd/hsml.js.map +1 -1
- package/dist/browser-umd/http.js +1 -1
- package/dist/browser-umd/http.js.map +1 -1
- package/dist/browser-umd/index.js +1 -1
- package/dist/browser-umd/index.js.map +1 -1
- package/dist/browser-umd/router.js +1 -1
- package/dist/browser-umd/router.js.map +1 -1
- package/dist/browser-umd/validators-moment.js +1 -1
- package/dist/browser-umd/validators-moment.js.map +1 -1
- package/dist/browser-umd/validators-numeral.js.map +1 -1
- package/dist/demo/encode_demo.ce182166.js.map +1 -1
- package/dist/demo/encode_demo.f40a44eb.js.map +1 -1
- package/dist/demo/hsml-app-form-validation_demo.a9e2c583.js +2 -0
- package/dist/demo/hsml-app-form-validation_demo.a9e2c583.js.map +1 -0
- package/dist/demo/hsml-app-form-validation_demo.bb392ab0.js +2 -0
- package/dist/demo/hsml-app-form-validation_demo.bb392ab0.js.map +1 -0
- package/dist/demo/hsml-app-form-validation_demo.c6856b02.js +2 -0
- package/dist/demo/hsml-app-form-validation_demo.c6856b02.js.map +1 -0
- package/dist/demo/hsml-app-form-validation_demo.fdcc0b2d.js +2 -0
- package/dist/demo/hsml-app-form-validation_demo.fdcc0b2d.js.map +1 -0
- package/dist/demo/hsml-app-form-validation_demo.html +1 -1
- package/dist/demo/hsml-app-form_demo.e36ef1e9.js +2 -0
- package/dist/demo/hsml-app-form_demo.e36ef1e9.js.map +1 -0
- package/dist/demo/hsml-app-form_demo.fd22dfcf.js +2 -0
- package/dist/demo/hsml-app-form_demo.fd22dfcf.js.map +1 -0
- package/dist/demo/hsml-app-form_demo.html +1 -1
- package/dist/demo/hsml-app-test_demo.ba5f166c.js +2 -0
- package/dist/demo/hsml-app-test_demo.ba5f166c.js.map +1 -0
- package/dist/demo/hsml-app-test_demo.e8b5e4b2.js +2 -0
- package/dist/demo/hsml-app-test_demo.e8b5e4b2.js.map +1 -0
- package/dist/demo/hsml-app-test_demo.html +1 -1
- package/dist/demo/hsml-app-tictactoe_demo.03d8363f.js +2 -0
- package/dist/demo/hsml-app-tictactoe_demo.03d8363f.js.map +1 -0
- package/dist/demo/hsml-app-tictactoe_demo.399f8e69.js +2 -0
- package/dist/demo/hsml-app-tictactoe_demo.399f8e69.js.map +1 -0
- package/dist/demo/hsml-app-tictactoe_demo.html +1 -1
- package/dist/demo/hsml-app_demo.44aa1072.js +2 -0
- package/dist/demo/hsml-app_demo.44aa1072.js.map +1 -0
- package/dist/demo/hsml-app_demo.70ef3e7a.js +2 -0
- package/dist/demo/hsml-app_demo.70ef3e7a.js.map +1 -0
- package/dist/demo/hsml-app_demo.html +1 -1
- package/dist/demo/hsml-appel_demo.2a9f7f3f.js +2 -0
- package/dist/demo/hsml-appel_demo.2a9f7f3f.js.map +1 -0
- package/dist/demo/hsml-appel_demo.bea7849a.js +2 -0
- package/dist/demo/hsml-appel_demo.bea7849a.js.map +1 -0
- package/dist/demo/hsml-appel_demo.html +1 -1
- package/dist/demo/hsml-appi_demo.3dc5de90.js +2 -0
- package/dist/demo/hsml-appi_demo.3dc5de90.js.map +1 -0
- package/dist/demo/hsml-appi_demo.bfc7056a.js +2 -0
- package/dist/demo/hsml-appi_demo.bfc7056a.js.map +1 -0
- package/dist/demo/hsml-appi_demo.html +1 -1
- package/dist/demo/hsml-convert_demo.0ea1fa3b.js.map +1 -1
- package/dist/demo/hsml-convert_demo.63e3e7b5.js.map +1 -1
- package/dist/demo/{hsml_demo.ff950ba1.js → hsml_demo.a248689a.js} +2 -2
- package/dist/demo/hsml_demo.a248689a.js.map +1 -0
- package/dist/demo/hsml_demo.eb3b08be.js +2 -0
- package/dist/demo/hsml_demo.eb3b08be.js.map +1 -0
- package/dist/demo/hsml_demo.html +1 -1
- package/dist/demo/http_demo.3e7da3d8.js.map +1 -1
- package/dist/demo/http_demo.8e435f23.js.map +1 -1
- package/dist/demo/i18n_demo.html +1 -1
- package/dist/demo/router_demo.3cfa03aa.js.map +1 -1
- package/dist/demo/router_demo.89ab1681.js.map +1 -1
- package/dist/demo/{validators_demo.252e13a6.js → validators_demo.90ff6001.js} +2 -2
- package/dist/demo/validators_demo.90ff6001.js.map +1 -0
- package/dist/demo/{validators_demo.66893723.js → validators_demo.ef5b2dea.js} +2 -2
- package/dist/demo/validators_demo.ef5b2dea.js.map +1 -0
- package/dist/demo/validators_demo.html +1 -1
- package/dist/encode.js +1 -1
- package/dist/encode.js.map +1 -1
- package/dist/hsml-app.d.ts +38 -37
- package/dist/hsml-app.js +60 -62
- package/dist/hsml-app.js.map +1 -1
- package/dist/hsml-convert.d.ts +3 -3
- package/dist/hsml-convert.js.map +1 -1
- package/dist/hsml-dom.d.ts +2 -2
- package/dist/hsml-dom.js +3 -3
- package/dist/hsml-dom.js.map +1 -1
- package/dist/hsml-h.d.ts +8 -8
- package/dist/hsml-h.js.map +1 -1
- package/dist/hsml-html.d.ts +4 -4
- package/dist/hsml-html.js +2 -2
- package/dist/hsml-html.js.map +1 -1
- package/dist/hsml-idom.d.ts +2 -2
- package/dist/hsml-idom.js +5 -5
- package/dist/hsml-idom.js.map +1 -1
- package/dist/hsml.d.ts +26 -27
- package/dist/hsml.js.map +1 -1
- package/dist/http.js +1 -1
- package/dist/http.js.map +1 -1
- package/dist/router.js +1 -1
- package/dist/router.js.map +1 -1
- package/package.json +8 -8
- package/src/hsml-app.ts +209 -144
- package/src/hsml-convert.ts +8 -8
- package/src/hsml-dom.ts +18 -18
- package/src/hsml-h.ts +10 -10
- package/src/hsml-html.ts +19 -19
- package/src/hsml-idom.ts +25 -25
- package/src/hsml.ts +46 -143
- package/demo/hsml-appc_demo.html +0 -16
- package/demo/hsml-appc_demo.ts +0 -49
- package/dist/demo/hsml-app-form-validation_demo.0b03b743.js +0 -2
- package/dist/demo/hsml-app-form-validation_demo.0b03b743.js.map +0 -1
- package/dist/demo/hsml-app-form-validation_demo.b3a5c810.js +0 -2
- package/dist/demo/hsml-app-form-validation_demo.b3a5c810.js.map +0 -1
- package/dist/demo/hsml-app-form-validation_demo.d3925067.js +0 -2
- package/dist/demo/hsml-app-form-validation_demo.d3925067.js.map +0 -1
- package/dist/demo/hsml-app-form-validation_demo.f757d763.js +0 -2
- package/dist/demo/hsml-app-form-validation_demo.f757d763.js.map +0 -1
- package/dist/demo/hsml-app-form_demo.007ffcaa.js +0 -2
- package/dist/demo/hsml-app-form_demo.007ffcaa.js.map +0 -1
- package/dist/demo/hsml-app-form_demo.a034239d.js +0 -2
- package/dist/demo/hsml-app-form_demo.a034239d.js.map +0 -1
- package/dist/demo/hsml-app-test_demo.35c14dc9.js +0 -2
- package/dist/demo/hsml-app-test_demo.35c14dc9.js.map +0 -1
- package/dist/demo/hsml-app-test_demo.3c7e16ae.js +0 -2
- package/dist/demo/hsml-app-test_demo.3c7e16ae.js.map +0 -1
- package/dist/demo/hsml-app-tictactoe_demo.5f4861c1.js +0 -2
- package/dist/demo/hsml-app-tictactoe_demo.5f4861c1.js.map +0 -1
- package/dist/demo/hsml-app-tictactoe_demo.7deeabad.js +0 -2
- package/dist/demo/hsml-app-tictactoe_demo.7deeabad.js.map +0 -1
- package/dist/demo/hsml-app_demo.87d83c29.js +0 -2
- package/dist/demo/hsml-app_demo.87d83c29.js.map +0 -1
- package/dist/demo/hsml-app_demo.941a13a6.js +0 -2
- package/dist/demo/hsml-app_demo.941a13a6.js.map +0 -1
- package/dist/demo/hsml-appc_demo.0234ff15.js +0 -2
- package/dist/demo/hsml-appc_demo.0234ff15.js.map +0 -1
- package/dist/demo/hsml-appc_demo.f5783031.js +0 -2
- package/dist/demo/hsml-appc_demo.f5783031.js.map +0 -1
- package/dist/demo/hsml-appc_demo.html +0 -1
- package/dist/demo/hsml-appel_demo.0e8a4d4c.js +0 -2
- package/dist/demo/hsml-appel_demo.0e8a4d4c.js.map +0 -1
- package/dist/demo/hsml-appel_demo.1a5c2c26.js +0 -2
- package/dist/demo/hsml-appel_demo.1a5c2c26.js.map +0 -1
- package/dist/demo/hsml-appi_demo.2c3fb511.js +0 -2
- package/dist/demo/hsml-appi_demo.2c3fb511.js.map +0 -1
- package/dist/demo/hsml-appi_demo.427fdebd.js +0 -2
- package/dist/demo/hsml-appi_demo.427fdebd.js.map +0 -1
- package/dist/demo/hsml_demo.33f28c29.js +0 -2
- package/dist/demo/hsml_demo.33f28c29.js.map +0 -1
- package/dist/demo/hsml_demo.ff950ba1.js.map +0 -1
- package/dist/demo/validators_demo.252e13a6.js.map +0 -1
- package/dist/demo/validators_demo.66893723.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;AAMM,MAAO;IAIT,GAAG,KAAa,EAAE,EAAY,EAA9B;QACI,IAAI,CAAE,CAAA,SAAS,IAAI,CAAC,UAAU,AAAV,GAChB,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,EAAE;QAE/B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC;QAC5B,OAAO,IAAI;IACf;IAEA,KAAK,KAAa,EAAE,GAAG,IAAW,EAAlC;QACI,IAAI,SAAS,IAAI,CAAC,UAAU,EACxB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA,KAAM,GAAG,KAAK,CAAC,IAAI,EAAE;QAExD,OAAO,IAAI;IACf;IAEA,IAAI,KAAa,EAAE,EAAa,EAAhC;QACI,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,UAAU,MAAM,KAAK,GAAG;YAC5C,IAAI,CAAC,UAAU,GAAG,CAAA;YAClB,OAAO,IAAI;QACd,CAAA;QACD,MAAM,YAAY,IAAI,CAAC,UAAU,CAAC,MAAM;QACxC,IAAI,CAAC,WACD,OAAO,IAAI;QAEf,IAAI,UAAU,MAAM,KAAK,GAAG;YACxB,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM;YAC7B,OAAO,IAAI;QACd,CAAA;QACD,IAAK,IAAI,IAAI,GAAG,I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e,WAAW,CAAC,gBAAgB,IAAI,CAAC,aAAa;IAEtE;A;AAlCO,0CAAA,OAAO,GAAW,IAAI;AAgF3B,SAAU,0CAAM,IAAY,EAAE,OAAiB,EAArD;IACI,OAAO,0CAAO,KAAK,CAAC,MAAM;AAC9B","sources":["src/router.ts"],"sourcesContent":["// implemented based on https://github.com/mench/hash-router/\n\ntype Path = string | RegExp | Array<string>;\n\nexport type Keys = { name: string; optional: boolean }[];\n\nexport class Emitter {\n\n private _callbacks: { [key: string]: Function[] } = {};\n\n on(event: string, fn: Function): this {\n if (!(event in this._callbacks)) {\n this._callbacks[event] = [];\n }\n this._callbacks[event].push(fn);\n return this;\n }\n\n emit(event: string, ...args: any[]): this {\n if (event in this._callbacks) {\n this._callbacks[event].forEach(cb => cb.apply(this, args));\n }\n return this;\n }\n\n off(event: string, fn?: Function) {\n if (!this._callbacks || arguments.length === 0) {\n this._callbacks = {};\n return this;\n }\n const callbacks = this._callbacks[event];\n if (!callbacks) {\n return this;\n }\n if (arguments.length === 1) {\n delete this._callbacks[event];\n return this;\n }\n for (let i = 0; i < callbacks.length; i++) {\n const callback = callbacks[i];\n if (callback === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n return this;\n }\n}\n\nexport class Route {\n\n private _regex!: RegExp;\n private _params: any = {};\n\n readonly path: string;\n readonly keys: Keys = [];\n\n constructor(path: string) {\n this.path = path;\n this._pathParse(path, false, false);\n }\n\n match(path: string, params: string[]) {\n const m = this._regex.exec(path);\n if (!m) {\n return false;\n }\n for (let i = 1; i < m.length; ++i) {\n const key = this.keys[i - 1];\n const val = \"string\" === typeof m[i] ? decodeURIComponent(m[i]) : m[i];\n if (key) {\n this._params[key.name] = val;\n }\n params.push(val);\n }\n return true;\n }\n\n private _pathParse(path: Path, sensitive: boolean, strict: boolean): void {\n if (path instanceof RegExp) {\n this._regex = path;\n return;\n }\n if (path instanceof Array) {\n path = \"(\" + path.join(\"|\") + \")\";\n }\n path = path\n .concat(strict ? \"\" : \"/?\")\n .replace(/\\/\\(/g, \"(?:/\")\n .replace(/\\+/g, \"__plus__\")\n .replace(\n /(\\/)?(\\.)?:(\\w+)(?:(\\(.*?\\)))?(\\?)?/g,\n (\n _: any,\n slash: string,\n format: string,\n key: string,\n capture: boolean,\n optional: boolean\n ) => {\n this.keys.push({ name: key, optional: !!optional });\n slash = slash ?? \"\";\n return (\n \"\" +\n (optional ? \"\" : slash) +\n \"(?:\" +\n (optional ? slash : \"\") +\n (format ?? \"\") +\n (capture ?? ((format && \"([^/.]+?)\") || \"([^/]+?)\")) +\n \")\" +\n (optional ?? \"\")\n );\n }\n )\n .replace(/([\\/.])/g, \"\\\\$1\")\n .replace(/__plus__/g, \"(.+)\")\n .replace(/\\*/g, \"(.*)\");\n this._regex = new RegExp(\"^\" + path + \"$\", sensitive ? \"\" : \"i\");\n }\n\n}\n\nexport class Router extends Emitter {\n\n static default: Router = new Router();\n\n static route(path: string, handler: Function): Router {\n Router.default.route(path, handler);\n return Router.default;\n }\n\n static navigate(path: string, force = false): Router {\n Router.default.navigate(path, force);\n return Router.default;\n }\n\n static start(): Router {\n Router.default.start();\n return Router.default;\n }\n\n static hash(): string {\n return Router.default.hash();\n }\n\n static handle(hash: string): Router {\n return Router.default.handle(hash);\n }\n\n private _routes: Route[] = [];\n\n constructor() {\n super();\n if (window.addEventListener) {\n window.addEventListener(\"hashchange\", this._onHashChange, false);\n } else {\n (window as any).attachEvent(\"onhashchange\", this._onHashChange);\n }\n }\n\n route(path: string, handler: Function): this {\n const route = new Route(path);\n this._routes.push(route);\n this.on(path, (params: any, route: any) => {\n return handler.apply(route, params);\n });\n return this;\n }\n\n navigate(path: string, force = false): this {\n const hash = this.hash();\n window.location.hash = path;\n if (force && hash === path) {\n this.handle(path);\n }\n return this;\n }\n\n start(): this {\n this._onHashChange();\n return this;\n }\n\n hash(): string {\n return window.location.hash.substring(1);\n }\n\n handle(hash: string): this {\n for (const route of this._routes) {\n const params: string[] = [];\n if (route.match(hash, params)) {\n this.emit(route.path, params, route);\n break;\n }\n }\n return this;\n }\n\n private _onHashChange = () => {\n this.handle(this.hash());\n }\n\n}\n\nexport function route(path: string, handler: Function) {\n return Router.route(path, handler);\n}\n"],"names":[],"version":3,"file":"router.js.map"}
|
|
@@ -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 r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,(function(){return function(){"use strict";var e={};return function(){var t=e;Object.defineProperty(t,"__esModule",{value:!0}),t.Base64=t.UrlEncodedData=void 0,t.UrlEncodedData=class{static encode(e,t=""){let r;if("object"!=typeof e)r=e;else{const o=[];let n=0;for(let r in e)if(e.hasOwnProperty(r)){let c=e[r];c instanceof Array||(c=[c]);const a=c.length;for(let e=0;e<a;e++){const a=c[e];"object"==typeof a&&null!=a?o[n++]=arguments.callee(a,t+r+"."):(o[n]=encodeURIComponent(t+r),null!=a&&(o[n]+="="+encodeURIComponent(a)),n++)}}r=o.join("&")}return r}static decode(e){const t={};if(e){const r=e.split("&"),o=r.length;for(let e=0;e<o;e++){const o=r[e].split("="),n=decodeURIComponent(o[0]);if(o.length>1){const e=decodeURIComponent(o[1]),r=n.split("."),c=r.length;let a=t;for(let t=0;t<c;t++){const o=r[t],n=a[o];t===c-1?n?n instanceof Array?a[o].push(e):(a[o]=[n],a[o][1]=e):a[o]=e:(n||(a[o]={}),a=a[o])}}else t[n]=null}}return t}};class r{static encode(e){let t,o,n,c,a,d,f,i="",l=0;for(e=r._utf8_encode(e);l<e.length;)t=e.charCodeAt(l++),o=e.charCodeAt(l++),n=e.charCodeAt(l++),c=t>>2,a=(3&t)<<4|o>>4,d=(15&o)<<2|n>>6,f=63&n,isNaN(o)?d=f=64:isNaN(n)&&(f=64),i=i+r._keyStr.charAt(c)+r._keyStr.charAt(a)+r._keyStr.charAt(d)+r._keyStr.charAt(f);return i}static decode(e){let t,o,n,c,a,d,f,i="",l=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<e.length;)c=this._keyStr.indexOf(e.charAt(l++)),a=this._keyStr.indexOf(e.charAt(l++)),d=this._keyStr.indexOf(e.charAt(l++)),f=this._keyStr.indexOf(e.charAt(l++)),t=c<<2|a>>4,o=(15&a)<<4|d>>2,n=(3&d)<<6|f,i+=String.fromCharCode(t),64!==d&&(i+=String.fromCharCode(o)),64!==f&&(i+=String.fromCharCode(n));return i=r._utf8_decode(i),i}static _utf8_encode(e){e=e.replace(/\r\n/g,"\n");let t="";for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t}static _utf8_decode(e){let t="",r=0,o=0,n=0,c=0;for(;r<e.length;)o=e.charCodeAt(r),o<128?(t+=String.fromCharCode(o),r++):o>191&&o<224?(n=e.charCodeAt(r+1),t+=String.fromCharCode((31&o)<<6|63&n),r+=2):(n=e.charCodeAt(r+1),c=e.charCodeAt(r+2),t+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&c),r+=3);return t}}
|
|
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 r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,(function(){return function(){"use strict";var e={};return function(){var t=e;Object.defineProperty(t,"__esModule",{value:!0}),t.Base64=t.UrlEncodedData=void 0,t.UrlEncodedData=class{static encode(e,t=""){let r;if("object"!=typeof e)r=e;else{const o=[];let n=0;for(let r in e)if(e.hasOwnProperty(r)){let c=e[r];c instanceof Array||(c=[c]);const a=c.length;for(let e=0;e<a;e++){const a=c[e];"object"==typeof a&&null!=a?o[n++]=arguments.callee(a,t+r+"."):(o[n]=encodeURIComponent(t+r),null!=a&&(o[n]+="="+encodeURIComponent(a)),n++)}}r=o.join("&")}return r}static decode(e){const t={};if(e){const r=e.split("&"),o=r.length;for(let e=0;e<o;e++){const o=r[e].split("="),n=decodeURIComponent(o[0]);if(o.length>1){const e=decodeURIComponent(o[1]),r=n.split("."),c=r.length;let a=t;for(let t=0;t<c;t++){const o=r[t],n=a[o];t===c-1?n?n instanceof Array?a[o].push(e):(a[o]=[n],a[o][1]=e):a[o]=e:(n||(a[o]={}),a=a[o])}}else t[n]=null}}return t}};class r{static encode(e){let t,o,n,c,a,d,f,i="",l=0;for(e=r._utf8_encode(e);l<e.length;)t=e.charCodeAt(l++),o=e.charCodeAt(l++),n=e.charCodeAt(l++),c=t>>2,a=(3&t)<<4|o>>4,d=(15&o)<<2|n>>6,f=63&n,isNaN(o)?d=f=64:isNaN(n)&&(f=64),i=i+r._keyStr.charAt(c)+r._keyStr.charAt(a)+r._keyStr.charAt(d)+r._keyStr.charAt(f);return i}static decode(e){let t,o,n,c,a,d,f,i="",l=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<e.length;)c=this._keyStr.indexOf(e.charAt(l++)),a=this._keyStr.indexOf(e.charAt(l++)),d=this._keyStr.indexOf(e.charAt(l++)),f=this._keyStr.indexOf(e.charAt(l++)),t=c<<2|a>>4,o=(15&a)<<4|d>>2,n=(3&d)<<6|f,i+=String.fromCharCode(t),64!==d&&(i+=String.fromCharCode(o)),64!==f&&(i+=String.fromCharCode(n));return i=r._utf8_decode(i),i}static _utf8_encode(e){e=e.replace(/\r\n/g,"\n");let t="";for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t}static _utf8_decode(e){let t="",r=0,o=0,n=0,c=0;for(;r<e.length;)o=e.charCodeAt(r),o<128?(t+=String.fromCharCode(o),r++):o>191&&o<224?(n=e.charCodeAt(r+1),t+=String.fromCharCode((31&o)<<6|63&n),r+=2):(n=e.charCodeAt(r+1),c=e.charCodeAt(r+2),t+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&c),r+=3);return t}}r._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",t.Base64=r}(),e}()}));
|
|
2
2
|
//# sourceMappingURL=encode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode.js","mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,EACvE,CACA,CATD,CASGC,MAAM,WACT,O,6ICTA,uBAEIC,cAAcC,EAAWC,EAAS,IAC9B,IAAIC,EACJ,GAAoB,iBAATF,EACPE,EAAMF,MACH,CACH,MAAMG,EAAmB,GACzB,IAAIC,EAAO,EACX,IAAK,IAAIC,KAAOL,EACZ,GAAIA,EAAKM,eAAeD,GAAM,CAC1B,IAAIE,EAAQP,EAAKK,GACXE,aAAiBC,QACnBD,EAAQ,CAACA,IAEb,MAAME,EAAcF,EAAMG,OAC1B,IAAK,IAAIb,EAAI,EAAGA,EAAIY,EAAaZ,IAAK,CAClC,MAAMc,EAAMJ,EAAMV,GACE,iBAARc,GAA6B,MAAPA,EAC9BR,EAAOC,KAAUQ,UAAUC,OAAOF,EAAKV,EAASI,EAAM,MAEtDF,EAAOC,GAAQU,mBAAmBb,EAASI,GAChC,MAAPM,IACAR,EAAOC,IAAS,IAAMU,mBAAmBH,IAE7CP,I,EAKhBF,EAAMC,EAAOY,KAAK,I,CAEtB,OAAOb,CACX,C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oBAAoB4B,GACxB,IAAIK,EAAI,GACJJ,EAAI,EACJC,EAAI,EACJgB,EAAK,EACLC,EAAK,EACT,KAAOlB,EAAID,EAAEjB,QACTmB,EAAIF,EAAEQ,WAAWP,GACbC,EAAI,KACJG,GAAKU,OAAOC,aAAad,GACzBD,KACOC,EAAI,KAAOA,EAAI,KACtBgB,EAAKlB,EAAEQ,WAAWP,EAAI,GACtBI,GAAKU,OAAOC,cAAkB,GAAJd,IAAW,EAAS,GAALgB,GACzCjB,GAAK,IAELiB,EAAKlB,EAAEQ,WAAWP,EAAI,GACtBkB,EAAKnB,EAAEQ,WAAWP,EAAI,GACtBI,GAAKU,OAAOC,cAAkB,GAAJd,IAAW,IAAW,GAALgB,IAAY,EAAS,GAALC,GAC3DlB,GAAK,GAGb,OAAOI,CACX,EA/FJ,WAEmB,EAAAK,QAAU,mE","sources":["webpack://peryl/webpack/universalModuleDefinition","webpack://peryl/./src/encode.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, function() {\nreturn ","\nexport class UrlEncodedData {\n\n static encode(data: any, prefix = \"\"): string {\n let str: string;\n if (typeof data !== \"object\") {\n str = data;\n } else {\n const params: string[] = [];\n let size = 0;\n for (let key in data) {\n if (data.hasOwnProperty(key)) {\n let value = data[key];\n if (!(value instanceof Array)) {\n value = [value];\n }\n const valueLength = value.length;\n for (let i = 0; i < valueLength; i++) {\n const val = value[i];\n if ((typeof val === \"object\") && (val != null)) {\n params[size++] = arguments.callee(val, prefix + key + \".\");\n } else { // list\n params[size] = encodeURIComponent(prefix + key);\n if (val != null) {\n params[size] += \"=\" + encodeURIComponent(val);\n }\n size++;\n }\n }\n }\n }\n str = params.join(\"&\");\n }\n return str;\n }\n\n static decode(str: string): any {\n const data: any = {};\n if (str) {\n const params = str.split(\"&\");\n const paramsLength = params.length;\n for (let j = 0; j < paramsLength; j++) {\n const parameter = params[j].split(\"=\");\n const key = decodeURIComponent(parameter[0]);\n if (parameter.length > 1) {\n const value = decodeURIComponent(parameter[1]);\n const path = key.split(\".\");\n const size = path.length;\n let obj = data;\n for (let i = 0; i < size; i++) {\n const property = path[i];\n const o = obj[property];\n if (i === (size - 1)) { // list\n if (!o) {\n obj[property] = value;\n } else if (o instanceof Array) {\n obj[property].push(value);\n } else { // create array\n obj[property] = [o];\n obj[property][1] = value;\n }\n } else {\n if (!o) {\n obj[property] = {};\n }\n obj = obj[property];\n }\n }\n } else {\n data[key] = null;\n }\n }\n }\n return data;\n }\n\n}\n\nexport class Base64 {\n\n private static _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n static encode(e: string): string {\n let t = \"\";\n let n: any, r: any, i: any, s: any, o: any, u: any, a: any;\n let f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64;\n } else if (isNaN(i)) {\n a = 64;\n }\n t = t + Base64._keyStr.charAt(s) + Base64._keyStr.charAt(o) + Base64._keyStr.charAt(u) + Base64._keyStr.charAt(a);\n }\n return t;\n }\n\n static decode(e: string): string {\n let t = \"\";\n let n: any, r: any, i: any;\n let s: any, o: any, u: any, a: any;\n let f = 0;\n e = e.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u !== 64) {\n t = t + String.fromCharCode(r);\n }\n if (a !== 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = Base64._utf8_decode(t);\n return t;\n }\n\n private static _utf8_encode(e: string): string {\n e = e.replace(/\\r\\n/g, \"\\n\");\n let t = \"\";\n for (let n = 0; n < e.length; n++) {\n const r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n } else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n } else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n }\n\n private static _utf8_decode(e: string): string {\n let t = \"\";\n let n = 0;\n let r = 0;\n let c1 = 0;\n let c2 = 0;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++;\n } else if (r > 191 && r < 224) {\n c1 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c1 & 63);\n n += 2;\n } else {\n c1 = e.charCodeAt(n + 1);\n c2 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c1 & 63) << 6 | c2 & 63);\n n += 3;\n }\n }\n return t;\n }\n}\n"],"names":["root","factory","exports","module","define","amd","a","i","self","static","data","prefix","str","params","size","key","hasOwnProperty","value","Array","valueLength","length","val","arguments","callee","encodeURIComponent","join","split","paramsLength","j","parameter","decodeURIComponent","path","obj","property","o","push","Base64","e","n","r","s","u","t","f","_utf8_encode","charCodeAt","isNaN","_keyStr","charAt","replace","this","indexOf","String","fromCharCode","_utf8_decode","c1","c2"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"encode.js","mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC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AAkB,GAAJd,IAAW,IAAW,GAALgB,IAAY,EAAS,GAALC,GAC3DlB,GAAK,GAGb,OAAOI,CACX,EA7Fe,EAAAK,QAAU,oEAFhB,EAAAX,OAAAA,C","sources":["webpack://peryl/webpack/universalModuleDefinition","webpack://peryl/./src/encode.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, function() {\nreturn ","\nexport class UrlEncodedData {\n\n static encode(data: any, prefix = \"\"): string {\n let str: string;\n if (typeof data !== \"object\") {\n str = data;\n } else {\n const params: string[] = [];\n let size = 0;\n for (let key in data) {\n if (data.hasOwnProperty(key)) {\n let value = data[key];\n if (!(value instanceof Array)) {\n value = [value];\n }\n const valueLength = value.length;\n for (let i = 0; i < valueLength; i++) {\n const val = value[i];\n if ((typeof val === \"object\") && (val != null)) {\n params[size++] = arguments.callee(val, prefix + key + \".\");\n } else { // list\n params[size] = encodeURIComponent(prefix + key);\n if (val != null) {\n params[size] += \"=\" + encodeURIComponent(val);\n }\n size++;\n }\n }\n }\n }\n str = params.join(\"&\");\n }\n return str;\n }\n\n static decode(str: string): any {\n const data: any = {};\n if (str) {\n const params = str.split(\"&\");\n const paramsLength = params.length;\n for (let j = 0; j < paramsLength; j++) {\n const parameter = params[j].split(\"=\");\n const key = decodeURIComponent(parameter[0]);\n if (parameter.length > 1) {\n const value = decodeURIComponent(parameter[1]);\n const path = key.split(\".\");\n const size = path.length;\n let obj = data;\n for (let i = 0; i < size; i++) {\n const property = path[i];\n const o = obj[property];\n if (i === (size - 1)) { // list\n if (!o) {\n obj[property] = value;\n } else if (o instanceof Array) {\n obj[property].push(value);\n } else { // create array\n obj[property] = [o];\n obj[property][1] = value;\n }\n } else {\n if (!o) {\n obj[property] = {};\n }\n obj = obj[property];\n }\n }\n } else {\n data[key] = null;\n }\n }\n }\n return data;\n }\n\n}\n\nexport class Base64 {\n\n private static _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\n static encode(e: string): string {\n let t = \"\";\n let n: any, r: any, i: any, s: any, o: any, u: any, a: any;\n let f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64;\n } else if (isNaN(i)) {\n a = 64;\n }\n t = t + Base64._keyStr.charAt(s) + Base64._keyStr.charAt(o) + Base64._keyStr.charAt(u) + Base64._keyStr.charAt(a);\n }\n return t;\n }\n\n static decode(e: string): string {\n let t = \"\";\n let n: any, r: any, i: any;\n let s: any, o: any, u: any, a: any;\n let f = 0;\n e = e.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u !== 64) {\n t = t + String.fromCharCode(r);\n }\n if (a !== 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = Base64._utf8_decode(t);\n return t;\n }\n\n private static _utf8_encode(e: string): string {\n e = e.replace(/\\r\\n/g, \"\\n\");\n let t = \"\";\n for (let n = 0; n < e.length; n++) {\n const r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n } else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n } else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n }\n\n private static _utf8_decode(e: string): string {\n let t = \"\";\n let n = 0;\n let r = 0;\n let c1 = 0;\n let c2 = 0;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++;\n } else if (r > 191 && r < 224) {\n c1 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c1 & 63);\n n += 2;\n } else {\n c1 = e.charCodeAt(n + 1);\n c2 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c1 & 63) << 6 | c2 & 63);\n n += 3;\n }\n }\n return t;\n }\n}\n"],"names":["root","factory","exports","module","define","amd","a","i","self","static","data","prefix","str","params","size","key","hasOwnProperty","value","Array","valueLength","length","val","arguments","callee","encodeURIComponent","join","split","paramsLength","j","parameter","decodeURIComponent","path","obj","property","o","push","Base64","e","n","r","s","u","t","f","_utf8_encode","charCodeAt","isNaN","_keyStr","charAt","replace","this","indexOf","String","fromCharCode","_utf8_decode","c1","c2"],"sourceRoot":""}
|
|
@@ -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(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.HApp=t.controllersDdispatcher=t.happel=t.happi=t.happ=t.HAppAction=void 0;const o=n(8982),i=console.log,s=console.error,a=console.warn;var c;!function(e){e._init="_init",e._mount="_mount",e._umount="_umount",e._element="_element"}(c=t.HAppAction||(t.HAppAction={}));const u=window.requestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},l=window.cancelAnimationFrame||function(e){window.clearTimeout(e)},d="HApp action:",f="HApp dispatch:",p="HApp render:";t.happ=function(e,t,n,r=document.body){return new m(e,t,n,r)},t.happi=function(e,t=document.body){const n=new e;return new m(n.state,n.view,n.dispatcher,t)},t.happel=function(e,t,n,r,o){customElements.define(e,class extends HTMLElement{static get observedAttributes(){return t}constructor(){super(),this._happel=new m(n,r,o),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._element,{attrName:e,oldVal:t,newVal:n})}})},t.controllersDdispatcher=function(e){return function(t){return r(this,void 0,void 0,(function*(){const n=e[t.type];n?n.apply(this,[t.data,t.event]):a("no controller for action",t)}))}};const h="happ";class m{constructor(e,t,n,o=document.body){this.refs={},this.onDispatch=e=>(this._onDispatch=e,this),this.dispatch=(e,t,n)=>r(this,void 0,void 0,(function*(){if(m.debug){i(d,{type:e,data:t,event:n});const r=performance.now();yield this._dispatch(e,t,n);const o=performance.now();i(f,o-r+" ms",this.state)}else yield this._dispatch(e,t,n)})),this.windowDispatch=(e,t,n)=>r(this,void 0,void 0,(function*(){window.dispatchEvent(new CustomEvent(h,{detail:{type:e,data:t}}))})),this.render=()=>{if(m.debug){const e=performance.now();let t;try{t=this.view(this.state)}catch(e){s(p,e)}const n=performance.now();return i(p,n-e+" ms",t),null!=t?t:[]}{let e;try{e=this.view(this.state)}catch(e){s(p,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=t.elements,r={};for(let e=0;e<n.length;e++){const t=g(n[e]);if("object"==typeof t){const o=Object.keys(t);if(o.length){const i=o[0],s=t[i];void 0===r[i]?r[i]=s:"string"==typeof r[i]||r[i]instanceof String?r[i]=s instanceof Array?[r[i],...s]:[r[i],s]:r[i]instanceof Array?s instanceof Array?r[i]=r[i].concat(s):r[i].push(s):r[i]=s instanceof Array?[r[i],...s]:[r[i],s],r[i]instanceof Array&&(r[i]=r[i].filter((e=>null!==e)),"radio"===n[e].type&&(r[i]=r[i].length?r[i][0]:null))}}}return r}return g(t)}(n)),this.dispatch(e,t,n)},this.mount=(e=document.body)=>{var t;const n="string"==typeof e?null!==(t=document.getElementById(e))&&void 0!==t?t:document.body:null!=e?e:document.body;return n[h]&&n[h].umount(),this.dom||(this.dom=n,n[h]=this,b(n,this.render(),this),this.dispatch(c._mount,this.dom)),this},this.umount=()=>{if(this.dom){this.dispatch(c._umount,this.dom),this.dom.hasAttribute(h)&&this.dom.removeAttribute(h);const e=this.dom.querySelectorAll(`[${h}]`);for(let t=0;t<e.length;t++){const n=e[t].happ;null==n||n.umount()}for(;this.dom.firstChild;)this.dom.removeChild(this.dom.firstChild);delete this.dom.happ,this.dom=void 0}return this},this.update=()=>(this.dom&&!this._updateSched&&(this._updateSched=u((()=>{if(this.dom){const e=this.render();b(this.dom,e,this)}this._updateSched=void 0}))),this),this.toHsml=()=>{if(this.dom){if(!this._updateSched)return["div",{_skip:!0}];l(this._updateSched),this._updateSched=void 0}const e=this.render();return e.push((e=>{this.dom||(this.dom=e,e.happ=this,this.dispatch(c._mount,this.dom))})),["div",e]},this.toHtml=()=>this.dom?this.dom.outerHTML:"",this.state=e(),this.view=t,this.dispatcher=null!=n?n:e=>r(this,void 0,void 0,(function*(){return i(d,e.type,e.data)})),this.dispatch(c._init,this).then((()=>this.mount(o)))}_dispatch(e,t,n){var o;return r(this,void 0,void 0,(function*(){try{yield this.dispatcher({type:e,data:t,event:n},this.state,this.dispatch),null===(o=this._onDispatch)||void 0===o||o.call(this,{type:e,data:t,event:n},this.state,this.dispatch),this.dom&&y(this.dom,h,{type:e,data:t,event:n}),this.customElement&&y(this.customElement,e,t),!this.customElement&&this.dom&&y(this.dom,e,t),this.update()}catch(e){s(f,e)}}))}windowDispatchOn(){this._windowEventListener?a("windowEventListener olready setted"):(this._windowEventListener=e=>{const t=e.detail;this.dispatch(t.type,t.data,e)},window.addEventListener(h,this._windowEventListener))}windowDispatchOff(){this._windowEventListener&&window.removeEventListener(h,this._windowEventListener)}}function b(e,t,n){if(m.debug){const r=performance.now();(0,o.hsmls2idomPatch)(e,t,n);const s=performance.now();i("HApp update:",s-r+" ms",e)}else(0,o.hsmls2idomPatch)(e,t,n)}function y(e,t,n){var r,o;null==e||e.dispatchEvent(new CustomEvent(t,{detail:n})),null===(o=(r=e)[`on${t.toLowerCase()}`])||void 0===o||o.call(r,new CustomEvent(t,{detail:n}))}function g(e){let t=null;switch(e.nodeName){case"INPUT":const n=e;switch(n.type){case"text":case"hidden":case"password":case"email":case"number":case"search":case"url":case"tel":case"color":case"date":case"datetime-local":case"month":case"range":case"time":case"week":case"submit":case"button":t=n.name?{[n.name]:n.value}:n.value;break;case"radio":t=n.name?{[n.name]:n.checked?n.value:null}:n.checked?n.value:null;break;case"checkbox":t="on"===n.value?n.name?{[n.name]:n.checked}:n.checked:n.name?{[n.name]:n.checked?String(n.value):null}:n.checked?String(n.value):null}break;case"SELECT":const r=e;if(r.multiple){const e=Array.from(r.selectedOptions).map((e=>e.value));t=r.name?{[r.name]:e}:e}else t=r.name?{[r.name]:r.value}:r.value;break;case"TEXTAREA":const o=e;t=o.name?{[o.name]:o.value}:o.value;break;case"BUTTON":const i=e;t=i.name?{[i.name]:i.value}:i.value}return t}t.HApp=m,m.debug=!1},8982:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hsmls2idomPatch=t.hsml2idomPatch=void 0;const r=n(8574),o=n(706);function i(e,t,n){e&&e.actionCb&&"function"==typeof e.actionCb&&e.actionCb(t[1],t[2],n)}class s{open(e,t,n,r){const s=[];let a=t._id,c=t._classes?t._classes:[],u=t._ref,l=t._hObj;for(const e in t)if(t.hasOwnProperty(e))switch(e){case"_id":case"_classes":case"_ref":case"_key":case"_skip":case"_hObj":break;case"id":a=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 o=t[e];for(const e in o)o.hasOwnProperty(e)&&(o[e].constructor===String?s.push("data-"+e,o[e]):s.push("data-"+e,JSON.stringify(o[e])));break;case"styles":s.push("style",t[e]);break;case"on":const u=t[e];"string"==typeof u[0]?"function"==typeof u[1]?s.push("on"+u[0],u[1]):s.push("on"+u[0],(e=>i(r,u,e))):u.forEach((e=>{"function"==typeof e[1]?s.push("on"+e[0],e[1]):s.push("on"+e[0],(t=>i(r,e,t)))}));break;default:switch(typeof t[e]){case"function":s.push("on"+e,t[e]);break;case"object":default:s.push(e,t[e]);break;case"boolean":t[e]&&s.push(e,e)}}return c.length&&s.unshift("class",c.join(" ")),a&&s.unshift("id",a),(0,o.elementOpen)(e,t._key,void 0,...s),t._skip&&(0,o.skip)(),r&&u&&(r.refs[u]=(0,o.currentElement)()),l&&l.mount&&l.mount.constructor===Function&&(l.mount((0,o.currentElement)()),(0,o.skip)()),!!t._skip}close(e,t,n){(0,o.elementClose)(e)}text(e,t){(0,o.text)(e)}fnc(e,t){e((0,o.currentElement)())&&(0,o.skip)()}obj(e,t){"toHsml"in e?e.toHsml&&(0,r.hsml)(e.toHsml(),this,e):this.text(""+e,t)}}function a(e,t){(0,r.hsml)(e,new s,t)}t.hsml2idomPatch=function(e,t,n){(0,o.patch)(e,(e=>e&&a(e,n)),t)},t.hsmls2idomPatch=function(e,t,n){(0,o.patch)(e,(e=>e&&function(e,t){for(const n of e)if(null!=n)if(n.constructor===String)(0,o.text)(n);else if("toHsml"in n){const e=n;e.toHsml&&a(e.toHsml(),e)}else a(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 o;if("string"!=typeof t[0])return void console.error("HSML tag head not string:",t);const i=t[0],s=t[1],a=s&&s.constructor===Object;let c,u,l=[];const d=t[a?2:1];switch(null!=d&&d.constructor){case Array:l=d;break;case Function:c=d;break;case String:case Boolean:case Number:case Date:l=[d];break;default:u=d}const f=i.split("~"),p=f[1],h=f[0].split("."),m=h[0].split("#"),b=null!==(o=m[0])&&void 0!==o?o:"div",y=m[1],g=h.slice(1);let v;v=a?s:{},y&&(v._id=y),g.length&&(v._classes=g),p&&(v._ref=p),u&&(v._hObj=u);const O=n.open(b,v,l,r);c&&n.fnc(c,r),O||l.forEach((t=>e(t,n,r))),n.close(b,l,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 o=t,i=o.toLocaleString?o.toLocaleString():o.toString();n.text(i,r);break;case Date:const s=t,a=s.toLocaleString?s.toLocaleString():s.toString();n.text(a,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 o=!1,i=!1,s=!1;function a(e){if(r.DEBUG&&!e)throw new Error("Expected value to be defined");return e}t.assert=a,t.assertInPatch=function(e){if(!s)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(o)throw new Error(e+"() can not be called between elementOpenStart() and elementOpenEnd().")},t.assertNotInSkip=function(e){if(i)throw new Error(e+"() may not be called inside an element that has called skip().")},t.assertInAttributes=function(e){if(!o)throw new Error(e+"() can only be called after calling elementOpenStart().")},t.assertVirtualAttributesClosed=function(){if(o)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 o=a(e),i=a(t),s=i.nextSibling===n&&i.previousSibling===r,c=i.nextSibling===o.nextSibling&&i.previousSibling===r;if(!s&&!c&&i!==o)throw new Error("There must be exactly one top level call corresponding to the patched element.")},t.updatePatchContext=function(e){s=null!=e},t.setInAttributes=function(e){const t=o;return o=e,t},t.setInSkip=function(e){const t=i;return i=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),o=n(1326),i=n(5641);function s(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 a(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 u(e,t,n){(0,r.assert)("style"in e);const i=e.style;if("string"==typeof n)i.cssText=n;else{i.cssText="";for(const e in n)(0,o.has)(n,e)&&c(i,e,n[e])}}function l(e,t,n){const r=typeof n;"object"===r||"function"===r?a(e,t,n):s(e,t,n)}function d(){const e=(0,o.createMap)();return e[i.symbols.default]=l,e.style=u,e}t.applyAttr=s,t.applyProp=a,t.createAttributeMap=d;const f=d();t.attributes=f,t.updateAttribute=function(e,t,n,r){(r[t]||r[i.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),o=[];let i=0;t.queueChange=function(e,t,n,r,i){o.push(e),o.push(t),o.push(n),o.push(r),o.push(i)},t.flush=function(){const e=i,t=o.length;i=t;for(let n=e;n<t;n+=5)(0,o[n])(o[n+1],o[n+2],o[n+3],o[n+4]);i=e,(0,r.truncateArray)(o,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),o=n(9210),i=n(397),s=n(6384),a=n(2051),c=n(979);function u(e,t,n,r,o){return t==n&&r==o}let l=null,d=null,f=null,p=null,h=[],m=u,b=[],y=[];function g(e,t,n){const r=(0,a.getData)(e,n);return m(e,t,r.nameOrCtor,n,r.key)}function v(e,t,n){const r=e;let o=t;for(;o!==n;){const e=o.nextSibling;r.removeChild(o),l.markDeleted(o),o=e}}function O(){return d?d.nextSibling:f.firstChild}function A(){f=d,d=null}function w(){v(f,O(),null),d=f,f=f.parentNode}function _(){d=O()}function P(e,t,n){_();const r=function(e,t,n){if(!e)return null;let r=e;do{if(g(r,t,n))return r}while(n&&(r=r.nextSibling));return null}(d,e,t),o=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)),l.markCreated(r),r}(e,t,n);o!==d&&(h.indexOf(o)>=0?(0,i.moveBefore)(f,o,d):f.insertBefore(o,d),d=o)}function E(e,t={}){const{matches:n=u}=t;return(t,a,c)=>{const u=l,g=p,v=h,O=b,A=y,w=d,_=f,P=m;let E=!1,D=!1;p=t.ownerDocument,l=new o.Context(t),m=n,b=[],y=[],d=null,f=t.parentNode,h=(0,i.getFocusedPath)(t,f),s.DEBUG&&(E=(0,r.setInAttributes)(!1),D=(0,r.setInSkip)(!1),(0,r.updatePatchContext)(l));try{const n=e(t,a,c);return s.DEBUG&&(0,r.assertVirtualAttributesClosed)(),n}finally{l.notifyChanges(),p=g,l=u,m=P,b=O,y=A,d=w,f=_,h=v,s.DEBUG&&((0,r.setInAttributes)(E),(0,r.setInSkip)(D),(0,r.updatePatchContext)(l))}}}function D(e){return E(((e,t,n)=>(d=e,A(),t(n),w(),s.DEBUG&&(0,r.assertNoUnclosedTags)(d,e),e)),e)}function k(e){return E(((e,t,n)=>{const o={nextSibling:e};let i=null,c=null;return s.DEBUG&&(i=e.nextSibling,c=e.previousSibling),d=o,t(n),s.DEBUG&&((0,a.getData)(e).key&&(0,r.assertPatchOuterHasParentNode)(f),(0,r.assertPatchElementNoExtras)(o,d,i,c)),f&&v(f,O(),e.nextSibling),o===d?null:d}),e)}t.getArgsBuilder=function(){return b},t.getAttrsBuilder=function(){return y},t.alwaysDiffAttributes=function(e){(0,a.getData)(e).alwaysDiffAttributes=!0},t.skipNode=_,t.alignWithDOM=P,t.open=function(e,t,n){return P(e,t,n),A(),f},t.close=function(){return s.DEBUG&&(0,r.setInSkip)(!1),w(),d},t.text=function(){return P("#text",null),d},t.currentElement=function(){return s.DEBUG&&((0,r.assertInPatch)("currentElement"),(0,r.assertNotInAttributes)("currentElement")),f},t.tryGetCurrentElement=function(){return f},t.currentPointer=function(){return s.DEBUG&&((0,r.assertInPatch)("currentPointer"),(0,r.assertNotInAttributes)("currentPointer")),O()},t.currentContext=function(){return l},t.skip=function(){s.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 j=k();t.patchOuter=j},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),o=n(6413),i=(0,r.createMap)();t.calculateDiff=function(e,t,n,s,a,c=!1){const u=!e.length||c;let l=0;for(;l<t.length;l+=2){const r=t[l];if(u)e[l]=r;else if(e[l]!==r)break;const i=t[l+1];(u||e[l+1]!==i)&&(e[l+1]=i,(0,o.queueChange)(s,n,r,i,a))}if(l<t.length||l<e.length){const c=l;for(l=c;l<e.length;l+=2)i[e[l]]=e[l+1];for(l=c;l<t.length;l+=2){const r=t[l],c=t[l+1];i[r]!==c&&(0,o.queueChange)(s,n,r,c,a),e[l]=r,e[l+1]=c,delete i[r]}(0,r.truncateArray)(e,t.length);for(const e in i)(0,o.queueChange)(s,n,e,void 0,a),delete i[e]}(0,o.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 o="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=o.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 o=e;for(;o!==t;){const e=(0,r.assert)(o);n.push(e),o=e.parentNode||(t?e.host:null)}return n}(n,t):[]},t.moveBefore=function(e,t,n){const r=t.nextSibling;let o=n;for(;null!==o&&o!==t;){const t=o.nextSibling;e.insertBefore(o,r),o=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 o=n(5676);Object.defineProperty(t,"DEBUG",{enumerable:!0,get:function(){return o.DEBUG}})},706:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=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 i=n(5513);Object.defineProperty(t,"applyAttr",{enumerable:!0,get:function(){return i.applyAttr}}),Object.defineProperty(t,"applyProp",{enumerable:!0,get:function(){return i.applyProp}}),Object.defineProperty(t,"attributes",{enumerable:!0,get:function(){return i.attributes}}),Object.defineProperty(t,"createAttributeMap",{enumerable:!0,get:function(){return i.createAttributeMap}});var s=n(5897);Object.defineProperty(t,"alignWithDOM",{enumerable:!0,get:function(){return s.alignWithDOM}}),Object.defineProperty(t,"alwaysDiffAttributes",{enumerable:!0,get:function(){return s.alwaysDiffAttributes}}),Object.defineProperty(t,"close",{enumerable:!0,get:function(){return s.close}}),Object.defineProperty(t,"createPatchInner",{enumerable:!0,get:function(){return s.createPatchInner}}),Object.defineProperty(t,"createPatchOuter",{enumerable:!0,get:function(){return s.createPatchOuter}}),Object.defineProperty(t,"currentElement",{enumerable:!0,get:function(){return s.currentElement}}),Object.defineProperty(t,"currentContext",{enumerable:!0,get:function(){return s.currentContext}}),Object.defineProperty(t,"currentPointer",{enumerable:!0,get:function(){return s.currentPointer}}),Object.defineProperty(t,"open",{enumerable:!0,get:function(){return s.open}}),Object.defineProperty(t,"patch",{enumerable:!0,get:function(){return s.patchInner}}),Object.defineProperty(t,"patchInner",{enumerable:!0,get:function(){return s.patchInner}}),Object.defineProperty(t,"patchOuter",{enumerable:!0,get:function(){return s.patchOuter}}),Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return s.skip}}),Object.defineProperty(t,"skipNode",{enumerable:!0,get:function(){return s.skipNode}}),Object.defineProperty(t,"tryGetCurrentElement",{enumerable:!0,get:function(){return s.tryGetCurrentElement}});var a=n(6384);Object.defineProperty(t,"setKeyAttributeName",{enumerable:!0,get:function(){return a.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 u=n(4536);Object.defineProperty(t,"notifications",{enumerable:!0,get:function(){return u.notifications}});var l=n(5641);Object.defineProperty(t,"symbols",{enumerable:!0,get:function(){return l.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}}),o(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),o=n(1326),i=n(397),s=n(6384);class a{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,o.createArray)(e))}}function c(e,t,n,r){const o=new a(t,n,r);return e.__incrementalDOMData=o,o}function u(e,t){if(e.__incrementalDOMData)return e.__incrementalDOMData;const n=(0,i.isElement)(e)?e.localName:e.nodeName,r=(0,s.getKeyAttributeName)(),o=(0,i.isElement)(e)&&null!=r?e.getAttribute(r):null,a=c(e,n,(0,i.isElement)(e)?o||t:null);return(0,i.isElement)(e)&&function(e,t){const n=e.attributes,r=n.length;if(!r)return;const o=t.getAttrsArr(r);for(let e=0,t=0;e<r;e+=1,t+=2){const r=n[e],i=r.name,s=r.value;o[t]=i,o[t+1]=s}}(e,a),a}function l(e,t){return u(e,t)}t.NodeData=a,t.initData=c,t.isDataInitialized=function(e){return Boolean(e.__incrementalDOMData)},t.importNode=function e(t){u(t);for(let n=t.firstChild;n;n=n.nextSibling)e(n)},t.getData=l,t.getKey=function(e){return(0,r.assert)(e.__incrementalDOMData),l(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,o){let i;if("function"==typeof n)i=new n;else{const o=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);i=o?e.createElementNS(o,n):e.createElement(n)}return(0,r.initData)(i,n,o),i},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 o(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=o,t.createArray=function(e){const t=new Array(e);return o(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),o=n(5513),i=n(5897),s=n(6384),a=n(2051),c=n(1326),u=n(737),l=(0,c.createMap)();function d(e,t,n){const r=(0,i.getAttrsBuilder)(),s=t.getAttrsArr(r.length);(0,u.calculateDiff)(s,r,e,o.updateAttribute,n,t.alwaysDiffAttributes),(0,c.truncateArray)(r,0)}function f(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,o.updateAttribute)(e,n[t],n[t+1],r);return}for(let e=0;e<n.length;e+=2)l[n[e]]=e+1;const i=t.getAttrsArr(0);let s=0;for(let e=0;e<i.length;e+=2){const t=i[e],r=i[e+1],o=l[t];o?n[o]===r&&delete l[t]:(i[s]=t,i[s+1]=r,s+=2)}(0,c.truncateArray)(i,s);for(const t in l)(0,o.updateAttribute)(e,t,n[l[t]],r),delete l[t]}function p(e,t,n){const o=(0,i.getArgsBuilder)();s.DEBUG&&((0,r.assertNotInAttributes)("elementOpenStart"),(0,r.setInAttributes)(!0)),o[0]=e,o[1]=t,o[2]=n}function h(e,t){const n=(0,i.getAttrsBuilder)();s.DEBUG&&(0,r.assertInPatch)("attr"),n.push(e),n.push(t)}function m(){const e=(0,i.getArgsBuilder)();s.DEBUG&&((0,r.assertInAttributes)("elementOpenEnd"),(0,r.setInAttributes)(!1));const t=(0,i.open)(e[0],e[1],function(){const e=(0,i.getArgsBuilder)()[2];if(e)for(let t=0;t<e.length;t+=2)if("nonce"===e[t])return e[t+1];return""}()),n=(0,a.getData)(t);return f(t,n,e[2],o.attributes),d(t,n,o.attributes),(0,c.truncateArray)(e,0),t}function b(e,t,n,...o){s.DEBUG&&((0,r.assertNotInAttributes)("elementOpen"),(0,r.assertNotInSkip)("elementOpen")),p(e,t,n);for(let e=3;e<arguments.length;e+=2)h(arguments[e],arguments[e+1]);return m()}function y(e){s.DEBUG&&(0,r.assertNotInAttributes)("elementClose");const t=(0,i.close)();return s.DEBUG&&(0,r.assertCloseMatchesOpenTag)((0,a.getData)(t).nameOrCtor,e),t}t.elementOpenStart=p,t.key=function(e){const t=(0,i.getArgsBuilder)();s.DEBUG&&((0,r.assertInAttributes)("key"),(0,r.assert)(t)),t[1]=e},t.attr=h,t.elementOpenEnd=m,t.elementOpen=b,t.applyAttrs=function(e=o.attributes){const t=(0,i.currentElement)();d(t,(0,a.getData)(t),e)},t.applyStatics=function(e,t=o.attributes){const n=(0,i.currentElement)();f(n,(0,a.getData)(n),e,t)},t.elementClose=y,t.elementVoid=function(e,t,n,...r){return b.apply(null,arguments),y(e)},t.text=function(e,...t){s.DEBUG&&((0,r.assertNotInAttributes)("text"),(0,r.assertNotInSkip)("text"));const n=(0,i.text)(),o=(0,a.getData)(n);if(o.text!==e){o.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 o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.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(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.HApp=t.happel=t.happi=t.happ=t.HDispatchScopes=t.HAppActions=void 0;const o=n(8982),i=console.log,s=console.error,a=console.warn;var c,u;(u=t.HAppActions||(t.HAppActions={})).init="init",u.mount="mount",u.umount="umount",u.action="action",u.elementAttr="elementAttr",(c=t.HDispatchScopes||(t.HDispatchScopes={})).element="element",c.window="window";const l=window.requestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},d=window.cancelAnimationFrame||function(e){window.clearTimeout(e)},f="HApp action:",p="HApp dispatch:",h="HApp render:",m="HApp update:";t.happ=function(e,t,n,r=document.body){return new y(e,t,n,r)},t.happi=function(e,t=document.body){const n=new e;return new y(n.state,n.view,n.dispatcher,t)},t.happel=function(e,t,n,r,o){customElements.define(e,class extends HTMLElement{static get observedAttributes(){return t}constructor(){super(),this._happel=new y(n,r,o),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("elementAttr",{attrName:e,oldVal:t,newVal:n})}})};const b="happ";class y{constructor(e,t,n,o=document.body){this.refs={},this.dispatch=(e,t,n)=>r(this,void 0,void 0,(function*(){return this._dispatchAction(e,t,void 0,n)})),this._dispatchElement=(e,t)=>r(this,void 0,void 0,(function*(){this.customElement&&v(this.customElement,"action",{type:e,data:t}),!this.customElement&&this.dom&&v(this.dom,"action",{type:e,data:t})})),this._dispatchWindow=(e,t)=>r(this,void 0,void 0,(function*(){window.dispatchEvent(new CustomEvent("action",{detail:{type:e,data:t}}))})),this.render=()=>{if(y.debug){const e=performance.now();let t;try{t=this.view(this.state)}catch(e){s(h,e)}const n=performance.now();return i(h,n-e+" ms",t),null!=t?t:[]}{let e;try{e=this.view(this.state)}catch(e){s(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=t.elements,r={};for(let e=0;e<n.length;e++){const t=O(n[e]);if("object"==typeof t){const o=Object.keys(t);if(o.length){const i=o[0],s=t[i];void 0===r[i]?r[i]=s:"string"==typeof r[i]||r[i]instanceof String?r[i]=s instanceof Array?[r[i],...s]:[r[i],s]:r[i]instanceof Array?s instanceof Array?r[i]=r[i].concat(s):r[i].push(s):r[i]=s instanceof Array?[r[i],...s]:[r[i],s],r[i]instanceof Array&&(r[i]=r[i].filter((e=>null!==e)),"radio"===n[e].type&&(r[i]=r[i].length?r[i][0]:null))}}}return r}return O(t)}(n)),this._dispatchAction(e,t,n)},this.mount=(e=document.body)=>{var t;const n="string"==typeof e?null!==(t=document.getElementById(e))&&void 0!==t?t:document.body:null!=e?e:document.body;return n[b]&&n[b].umount(),this.dom||(this.dom=n,n[b]=this,g(n,this.render(),this),this._dispatchAction("mount",this.dom)),this},this.umount=()=>{if(this.dom){this._dispatchAction("umount",this.dom),this.dom.hasAttribute(b)&&this.dom.removeAttribute(b);const e=this.dom.querySelectorAll(`[${b}]`);for(let t=0;t<e.length;t++){const n=e[t].happ;null==n||n.umount()}for(;this.dom.firstChild;)this.dom.removeChild(this.dom.firstChild);delete this.dom.happ,this.dom=void 0}return this},this.update=()=>(this.dom&&!this._updateSched&&(this._updateSched=l((()=>{if(this.dom){const e=this.render();g(this.dom,e,this)}this._updateSched=void 0}))),this),this.toHsml=()=>{if(this.dom){if(!this._updateSched)return["div",{skip:!0}];d(this._updateSched),this._updateSched=void 0}const e=this.render();return e.push((e=>{this.dom||(this.dom=e,e.happ=this,this._dispatchAction("mount",this.dom))})),["div",e]},this.toHtml=()=>this.dom?this.dom.outerHTML:"",this.state=e(),this.view=t,this.dispatcher=null!=n?n:e=>r(this,void 0,void 0,(function*(){return i(f,e.type,e.data)})),this._dispatchAction("init",this).then((()=>this.mount(o)))}_dispatchAction(e,t,n,o){return r(this,void 0,void 0,(function*(){if(y.debug){i(f,{type:e,data:t,event:n});const r=performance.now();yield this._dispatch(e,t,n,o);const s=performance.now();i(p,s-r+" ms",this.state)}else yield this._dispatch(e,t,n,o)}))}_dispatch(e,t,n,o){return r(this,void 0,void 0,(function*(){try{yield this.dispatcher({type:e,data:t,event:n},this.state,this.dispatch),this.update(),"element"===o&&this._dispatchElement(e,t),"window"===o&&this._dispatchWindow(e,t)}catch(e){s(p,e)}}))}windowDispatchOn(){this._windowEventListener?a("windowEventListener olready setted"):(this._windowEventListener=e=>{const t=e.detail;this._dispatchAction(t.type,t.data)},window.addEventListener("action",this._windowEventListener))}windowDispatchOff(){this._windowEventListener&&window.removeEventListener("action",this._windowEventListener)}}function g(e,t,n){if(y.debug){const r=performance.now();(0,o.hsmls2idomPatch)(e,t,n);const s=performance.now();i(m,s-r+" ms",e)}else(0,o.hsmls2idomPatch)(e,t,n)}function v(e,t,n){var r,o;null==e||e.dispatchEvent(new CustomEvent(t,{detail:n})),null===(o=(r=e)[`on${t}`])||void 0===o||o.call(r,new CustomEvent(t,{detail:n}))}function O(e){let t=null;switch(e.nodeName){case"INPUT":const n=e;switch(n.type){case"text":case"hidden":case"password":case"email":case"number":case"search":case"url":case"tel":case"color":case"date":case"datetime-local":case"month":case"range":case"time":case"week":case"submit":case"button":t=n.name?{[n.name]:n.value}:n.value;break;case"radio":t=n.name?{[n.name]:n.checked?n.value:null}:n.checked?n.value:null;break;case"checkbox":t="on"===n.value?n.name?{[n.name]:n.checked}:n.checked:n.name?{[n.name]:n.checked?String(n.value):null}:n.checked?String(n.value):null}break;case"SELECT":const r=e;if(r.multiple){const e=Array.from(r.selectedOptions).map((e=>e.value));t=r.name?{[r.name]:e}:e}else t=r.name?{[r.name]:r.value}:r.value;break;case"TEXTAREA":const o=e;t=o.name?{[o.name]:o.value}:o.value;break;case"BUTTON":const i=e;t=i.name?{[i.name]:i.value}:i.value}return t}y.debug=!1,t.HApp=y},8982:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hsmls2idomPatch=t.hsml2idomPatch=void 0;const r=n(8574),o=n(706);function i(e,t,n){e&&e.actionCb&&"function"==typeof e.actionCb&&e.actionCb(t[1],t[2],n)}class s{open(e,t,n,r){const s=[];let a=t._id,c=t._classes?t._classes:[],u=t._ref,l=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":a=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 o=t[e];for(const e in o)o.hasOwnProperty(e)&&(o[e].constructor===String?s.push("data-"+e,o[e]):s.push("data-"+e,JSON.stringify(o[e])));break;case"styles":s.push("style",t[e]);break;case"on":const u=t[e];"string"==typeof u[0]?"function"==typeof u[1]?s.push("on"+u[0],u[1]):s.push("on"+u[0],(e=>i(r,u,e))):u.forEach((e=>{"function"==typeof e[1]?s.push("on"+e[0],e[1]):s.push("on"+e[0],(t=>i(r,e,t)))}));break;default:switch(typeof t[e]){case"function":s.push("on"+e,t[e]);break;case"object":default:s.push(e,t[e]);break;case"boolean":t[e]&&s.push(e,e)}}return c.length&&s.unshift("class",c.join(" ")),a&&s.unshift("id",a),(0,o.elementOpen)(e,t.key,void 0,...s),t.skip&&(0,o.skip)(),r&&u&&(r.refs[u]=(0,o.currentElement)()),l&&l.mount&&l.mount.constructor===Function&&(l.mount((0,o.currentElement)()),(0,o.skip)()),!!t.skip}close(e,t,n){(0,o.elementClose)(e)}text(e,t){(0,o.text)(e)}fnc(e,t){e((0,o.currentElement)())&&(0,o.skip)()}obj(e,t){"toHsml"in e?e.toHsml&&(0,r.hsml)(e.toHsml(),this,e):this.text(""+e,t)}}function a(e,t){(0,r.hsml)(e,new s,t)}t.hsml2idomPatch=function(e,t,n){(0,o.patch)(e,(e=>e&&a(e,n)),t)},t.hsmls2idomPatch=function(e,t,n){(0,o.patch)(e,(e=>e&&function(e,t){for(const n of e)if(null!=n)if(n.constructor===String)(0,o.text)(n);else if("toHsml"in n){const e=n;e.toHsml&&a(e.toHsml(),e)}else a(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 o;if("string"!=typeof t[0])return void console.error("HSML tag head not string:",t);const i=t[0],s=t[1],a=s&&s.constructor===Object;let c,u,l=[];const d=t[a?2:1];switch(null!=d&&d.constructor){case Array:l=d;break;case Function:c=d;break;case String:case Boolean:case Number:case Date:l=[d];break;default:u=d}const f=i.split("~"),p=f[1],h=f[0].split("."),m=h[0].split("#"),b=null!==(o=m[0])&&void 0!==o?o:"div",y=m[1],g=h.slice(1);let v;v=a?s:{},y&&(v._id=y),g.length&&(v._classes=g),p&&(v._ref=p),u&&(v._hObj=u);const O=n.open(b,v,l,r);c&&n.fnc(c,r),O||l.forEach((t=>e(t,n,r))),n.close(b,l,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 o=t,i=o.toLocaleString?o.toLocaleString():o.toString();n.text(i,r);break;case Date:const s=t,a=s.toLocaleString?s.toLocaleString():s.toString();n.text(a,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 o=!1,i=!1,s=!1;function a(e){if(r.DEBUG&&!e)throw new Error("Expected value to be defined");return e}t.assert=a,t.assertInPatch=function(e){if(!s)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(o)throw new Error(e+"() can not be called between elementOpenStart() and elementOpenEnd().")},t.assertNotInSkip=function(e){if(i)throw new Error(e+"() may not be called inside an element that has called skip().")},t.assertInAttributes=function(e){if(!o)throw new Error(e+"() can only be called after calling elementOpenStart().")},t.assertVirtualAttributesClosed=function(){if(o)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 o=a(e),i=a(t),s=i.nextSibling===n&&i.previousSibling===r,c=i.nextSibling===o.nextSibling&&i.previousSibling===r;if(!s&&!c&&i!==o)throw new Error("There must be exactly one top level call corresponding to the patched element.")},t.updatePatchContext=function(e){s=null!=e},t.setInAttributes=function(e){const t=o;return o=e,t},t.setInSkip=function(e){const t=i;return i=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),o=n(1326),i=n(5641);function s(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 a(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 u(e,t,n){(0,r.assert)("style"in e);const i=e.style;if("string"==typeof n)i.cssText=n;else{i.cssText="";for(const e in n)(0,o.has)(n,e)&&c(i,e,n[e])}}function l(e,t,n){const r=typeof n;"object"===r||"function"===r?a(e,t,n):s(e,t,n)}function d(){const e=(0,o.createMap)();return e[i.symbols.default]=l,e.style=u,e}t.applyAttr=s,t.applyProp=a,t.createAttributeMap=d;const f=d();t.attributes=f,t.updateAttribute=function(e,t,n,r){(r[t]||r[i.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),o=[];let i=0;t.queueChange=function(e,t,n,r,i){o.push(e),o.push(t),o.push(n),o.push(r),o.push(i)},t.flush=function(){const e=i,t=o.length;i=t;for(let n=e;n<t;n+=5)(0,o[n])(o[n+1],o[n+2],o[n+3],o[n+4]);i=e,(0,r.truncateArray)(o,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),o=n(9210),i=n(397),s=n(6384),a=n(2051),c=n(979);function u(e,t,n,r,o){return t==n&&r==o}let l=null,d=null,f=null,p=null,h=[],m=u,b=[],y=[];function g(e,t,n){const r=(0,a.getData)(e,n);return m(e,t,r.nameOrCtor,n,r.key)}function v(e,t,n){const r=e;let o=t;for(;o!==n;){const e=o.nextSibling;r.removeChild(o),l.markDeleted(o),o=e}}function O(){return d?d.nextSibling:f.firstChild}function A(){f=d,d=null}function w(){v(f,O(),null),d=f,f=f.parentNode}function P(){d=O()}function _(e,t,n){P();const r=function(e,t,n){if(!e)return null;let r=e;do{if(g(r,t,n))return r}while(n&&(r=r.nextSibling));return null}(d,e,t),o=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)),l.markCreated(r),r}(e,t,n);o!==d&&(h.indexOf(o)>=0?(0,i.moveBefore)(f,o,d):f.insertBefore(o,d),d=o)}function E(e,t={}){const{matches:n=u}=t;return(t,a,c)=>{const u=l,g=p,v=h,O=b,A=y,w=d,P=f,_=m;let E=!1,D=!1;p=t.ownerDocument,l=new o.Context(t),m=n,b=[],y=[],d=null,f=t.parentNode,h=(0,i.getFocusedPath)(t,f),s.DEBUG&&(E=(0,r.setInAttributes)(!1),D=(0,r.setInSkip)(!1),(0,r.updatePatchContext)(l));try{const n=e(t,a,c);return s.DEBUG&&(0,r.assertVirtualAttributesClosed)(),n}finally{l.notifyChanges(),p=g,l=u,m=_,b=O,y=A,d=w,f=P,h=v,s.DEBUG&&((0,r.setInAttributes)(E),(0,r.setInSkip)(D),(0,r.updatePatchContext)(l))}}}function D(e){return E(((e,t,n)=>(d=e,A(),t(n),w(),s.DEBUG&&(0,r.assertNoUnclosedTags)(d,e),e)),e)}function k(e){return E(((e,t,n)=>{const o={nextSibling:e};let i=null,c=null;return s.DEBUG&&(i=e.nextSibling,c=e.previousSibling),d=o,t(n),s.DEBUG&&((0,a.getData)(e).key&&(0,r.assertPatchOuterHasParentNode)(f),(0,r.assertPatchElementNoExtras)(o,d,i,c)),f&&v(f,O(),e.nextSibling),o===d?null:d}),e)}t.getArgsBuilder=function(){return b},t.getAttrsBuilder=function(){return y},t.alwaysDiffAttributes=function(e){(0,a.getData)(e).alwaysDiffAttributes=!0},t.skipNode=P,t.alignWithDOM=_,t.open=function(e,t,n){return _(e,t,n),A(),f},t.close=function(){return s.DEBUG&&(0,r.setInSkip)(!1),w(),d},t.text=function(){return _("#text",null),d},t.currentElement=function(){return s.DEBUG&&((0,r.assertInPatch)("currentElement"),(0,r.assertNotInAttributes)("currentElement")),f},t.tryGetCurrentElement=function(){return f},t.currentPointer=function(){return s.DEBUG&&((0,r.assertInPatch)("currentPointer"),(0,r.assertNotInAttributes)("currentPointer")),O()},t.currentContext=function(){return l},t.skip=function(){s.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 j=k();t.patchOuter=j},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),o=n(6413),i=(0,r.createMap)();t.calculateDiff=function(e,t,n,s,a,c=!1){const u=!e.length||c;let l=0;for(;l<t.length;l+=2){const r=t[l];if(u)e[l]=r;else if(e[l]!==r)break;const i=t[l+1];(u||e[l+1]!==i)&&(e[l+1]=i,(0,o.queueChange)(s,n,r,i,a))}if(l<t.length||l<e.length){const c=l;for(l=c;l<e.length;l+=2)i[e[l]]=e[l+1];for(l=c;l<t.length;l+=2){const r=t[l],c=t[l+1];i[r]!==c&&(0,o.queueChange)(s,n,r,c,a),e[l]=r,e[l+1]=c,delete i[r]}(0,r.truncateArray)(e,t.length);for(const e in i)(0,o.queueChange)(s,n,e,void 0,a),delete i[e]}(0,o.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 o="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=o.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 o=e;for(;o!==t;){const e=(0,r.assert)(o);n.push(e),o=e.parentNode||(t?e.host:null)}return n}(n,t):[]},t.moveBefore=function(e,t,n){const r=t.nextSibling;let o=n;for(;null!==o&&o!==t;){const t=o.nextSibling;e.insertBefore(o,r),o=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 o=n(5676);Object.defineProperty(t,"DEBUG",{enumerable:!0,get:function(){return o.DEBUG}})},706:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=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 i=n(5513);Object.defineProperty(t,"applyAttr",{enumerable:!0,get:function(){return i.applyAttr}}),Object.defineProperty(t,"applyProp",{enumerable:!0,get:function(){return i.applyProp}}),Object.defineProperty(t,"attributes",{enumerable:!0,get:function(){return i.attributes}}),Object.defineProperty(t,"createAttributeMap",{enumerable:!0,get:function(){return i.createAttributeMap}});var s=n(5897);Object.defineProperty(t,"alignWithDOM",{enumerable:!0,get:function(){return s.alignWithDOM}}),Object.defineProperty(t,"alwaysDiffAttributes",{enumerable:!0,get:function(){return s.alwaysDiffAttributes}}),Object.defineProperty(t,"close",{enumerable:!0,get:function(){return s.close}}),Object.defineProperty(t,"createPatchInner",{enumerable:!0,get:function(){return s.createPatchInner}}),Object.defineProperty(t,"createPatchOuter",{enumerable:!0,get:function(){return s.createPatchOuter}}),Object.defineProperty(t,"currentElement",{enumerable:!0,get:function(){return s.currentElement}}),Object.defineProperty(t,"currentContext",{enumerable:!0,get:function(){return s.currentContext}}),Object.defineProperty(t,"currentPointer",{enumerable:!0,get:function(){return s.currentPointer}}),Object.defineProperty(t,"open",{enumerable:!0,get:function(){return s.open}}),Object.defineProperty(t,"patch",{enumerable:!0,get:function(){return s.patchInner}}),Object.defineProperty(t,"patchInner",{enumerable:!0,get:function(){return s.patchInner}}),Object.defineProperty(t,"patchOuter",{enumerable:!0,get:function(){return s.patchOuter}}),Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return s.skip}}),Object.defineProperty(t,"skipNode",{enumerable:!0,get:function(){return s.skipNode}}),Object.defineProperty(t,"tryGetCurrentElement",{enumerable:!0,get:function(){return s.tryGetCurrentElement}});var a=n(6384);Object.defineProperty(t,"setKeyAttributeName",{enumerable:!0,get:function(){return a.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 u=n(4536);Object.defineProperty(t,"notifications",{enumerable:!0,get:function(){return u.notifications}});var l=n(5641);Object.defineProperty(t,"symbols",{enumerable:!0,get:function(){return l.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}}),o(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),o=n(1326),i=n(397),s=n(6384);class a{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,o.createArray)(e))}}function c(e,t,n,r){const o=new a(t,n,r);return e.__incrementalDOMData=o,o}function u(e,t){if(e.__incrementalDOMData)return e.__incrementalDOMData;const n=(0,i.isElement)(e)?e.localName:e.nodeName,r=(0,s.getKeyAttributeName)(),o=(0,i.isElement)(e)&&null!=r?e.getAttribute(r):null,a=c(e,n,(0,i.isElement)(e)?o||t:null);return(0,i.isElement)(e)&&function(e,t){const n=e.attributes,r=n.length;if(!r)return;const o=t.getAttrsArr(r);for(let e=0,t=0;e<r;e+=1,t+=2){const r=n[e],i=r.name,s=r.value;o[t]=i,o[t+1]=s}}(e,a),a}function l(e,t){return u(e,t)}t.NodeData=a,t.initData=c,t.isDataInitialized=function(e){return Boolean(e.__incrementalDOMData)},t.importNode=function e(t){u(t);for(let n=t.firstChild;n;n=n.nextSibling)e(n)},t.getData=l,t.getKey=function(e){return(0,r.assert)(e.__incrementalDOMData),l(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,o){let i;if("function"==typeof n)i=new n;else{const o=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);i=o?e.createElementNS(o,n):e.createElement(n)}return(0,r.initData)(i,n,o),i},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 o(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=o,t.createArray=function(e){const t=new Array(e);return o(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),o=n(5513),i=n(5897),s=n(6384),a=n(2051),c=n(1326),u=n(737),l=3,d=(0,c.createMap)();function f(e,t,n){const r=(0,i.getAttrsBuilder)(),s=t.getAttrsArr(r.length);(0,u.calculateDiff)(s,r,e,o.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,o.updateAttribute)(e,n[t],n[t+1],r);return}for(let e=0;e<n.length;e+=2)d[n[e]]=e+1;const i=t.getAttrsArr(0);let s=0;for(let e=0;e<i.length;e+=2){const t=i[e],r=i[e+1],o=d[t];o?n[o]===r&&delete d[t]:(i[s]=t,i[s+1]=r,s+=2)}(0,c.truncateArray)(i,s);for(const t in d)(0,o.updateAttribute)(e,t,n[d[t]],r),delete d[t]}function h(e,t,n){const o=(0,i.getArgsBuilder)();s.DEBUG&&((0,r.assertNotInAttributes)("elementOpenStart"),(0,r.setInAttributes)(!0)),o[0]=e,o[1]=t,o[2]=n}function m(e,t){const n=(0,i.getAttrsBuilder)();s.DEBUG&&(0,r.assertInPatch)("attr"),n.push(e),n.push(t)}function b(){const e=(0,i.getArgsBuilder)();s.DEBUG&&((0,r.assertInAttributes)("elementOpenEnd"),(0,r.setInAttributes)(!1));const t=(0,i.open)(e[0],e[1],function(){const e=(0,i.getArgsBuilder)()[2];if(e)for(let t=0;t<e.length;t+=2)if("nonce"===e[t])return e[t+1];return""}()),n=(0,a.getData)(t);return p(t,n,e[2],o.attributes),f(t,n,o.attributes),(0,c.truncateArray)(e,0),t}function y(e,t,n,...o){s.DEBUG&&((0,r.assertNotInAttributes)("elementOpen"),(0,r.assertNotInSkip)("elementOpen")),h(e,t,n);for(let e=l;e<arguments.length;e+=2)m(arguments[e],arguments[e+1]);return b()}function g(e){s.DEBUG&&(0,r.assertNotInAttributes)("elementClose");const t=(0,i.close)();return s.DEBUG&&(0,r.assertCloseMatchesOpenTag)((0,a.getData)(t).nameOrCtor,e),t}t.elementOpenStart=h,t.key=function(e){const t=(0,i.getArgsBuilder)();s.DEBUG&&((0,r.assertInAttributes)("key"),(0,r.assert)(t)),t[1]=e},t.attr=m,t.elementOpenEnd=b,t.elementOpen=y,t.applyAttrs=function(e=o.attributes){const t=(0,i.currentElement)();f(t,(0,a.getData)(t),e)},t.applyStatics=function(e,t=o.attributes){const n=(0,i.currentElement)();p(n,(0,a.getData)(n),e,t)},t.elementClose=g,t.elementVoid=function(e,t,n,...r){return y.apply(null,arguments),g(e)},t.text=function(e,...t){s.DEBUG&&((0,r.assertNotInAttributes)("text"),(0,r.assertNotInSkip)("text"));const n=(0,i.text)(),o=(0,a.getData)(n);if(o.text!==e){o.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 o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(7731)}()}));
|
|
2
2
|
//# sourceMappingURL=hsml-app.js.map
|