@quicktvui/web-cli 3.2.5 → 3.2.6
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/lib/DevServer.js +3 -0
- package/package.json +2 -2
- package/runtime/860dbbc52c94ebd83844.wasm +0 -0
- package/runtime/wasm_crypto_bg.wasm +0 -0
- package/runtime/web-runtime.cc7d744ca290cb03a097.js +2 -0
- package/runtime/web-runtime.f4243c246d9c84993074.js +1 -0
- package/runtime/web-runtime.67a325683a8b26eb6a0a.js +0 -2
- package/runtime/web-runtime.ccab04df97ffd41b3a94.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see web-runtime.cc7d744ca290cb03a097.js.LICENSE.txt */
|
|
2
|
+
(()=>{var e,t,n,r,i={8576(e,t){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=s(e),a=o[0],u=o[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,u)),c=0,h=u>0?a-4:a;for(n=0;n<h;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[c++]=255&t);1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,s=0,u=r-i;s<u;s+=a)o.push(l(e,s,s+a>u?u:s+a));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(u(r));return i.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},430(e,t,n){"use strict";var r=n(8576),i=n(9057),o=n(4032);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n);e=s(e,r);var i=e.write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|f(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t){if(c(t),e=s(e,t<0?0:0|f(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|f(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(r)return W(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return x(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(e,o)===l(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var h=!0,d=0;d<u;d++)if(l(e,o+d)!==l(t,d)){h=!1;break}if(h)return o}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function b(e,t,n,r){return z(W(t,e.length-n),e,n,r)}function w(e,t,n,r){return z(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function k(e,t,n,r){return w(e,t,n,r)}function E(e,t,n,r){return z(V(t),e,n,r)}function S(e,t,n,r){return z(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function x(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,l=e[i],c=null,h=l>239?4:l>223?3:l>191?2:1;if(i+h<=n)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=C));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return l(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return h(null,e)},u.allocUnsafeSlow=function(e){return h(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):v.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(r,i),c=e.slice(t,n),h=0;h<s;++h)if(l[h]!==c[h]){o=l[h],a=c[h];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function I(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function O(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=U(e[o]);return i}function L(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function P(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function M(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,n,r,o){return o||M(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,o){return o||M(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=u.isBuffer(e)?e:W(new u(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function W(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function V(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}},1293(e,t,n){function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(430).Buffer.isBuffer},7294(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}v(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,i,{once:!0})})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,o,a;if(s(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,console&&console.warn}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=c.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(o){r.once&&e.removeEventListener(t,i),n(o)})}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var l=u.length,c=p(u,l);for(n=0;n<l;++n)r(c[n],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,h(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,h(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,a;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},9057(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+h],h+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+h],h+=d,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=l}return(f?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+h>=1?d/u:d*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(t*u-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[n+f]=255&a,f+=p,a/=256,l-=8);e[n+f-p]|=128*v}},7302(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},4032(e){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},9836(e,t,n){"use strict";var r={};(0,n(2677).assign)(r,n(3935),n(7539),n(8857)),e.exports=r},3935(e,t,n){"use strict";var r=n(3411),i=n(2677),o=n(1284),a=n(5594),s=n(2562),u=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var c;if(c="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,c)))throw new Error(a[n]);this._dict_set=!0}}function c(e,t){var n=new l(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}l.prototype.push=function(e,t){var n,a,s=this.strm,l=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===u.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(l),s.next_out=0,s.avail_out=l),1!==(n=r.deflate(s,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),s.avail_out=0,!0)},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=l,t.deflate=c,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,c(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,c(e,t)}},7539(e,t,n){"use strict";var r=n(8479),i=n(2677),o=n(1284),a=n(8857),s=n(5594),u=n(2562),l=n(8798),c=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);if(this.header=new l,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[n])}function d(e,t){var n=new h(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}h.prototype.push=function(e,t){var n,s,u,l,h,d=this.strm,f=this.options.chunkSize,p=this.options.dictionary,v=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?d.input=o.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(f),d.next_out=0,d.avail_out=f),(n=r.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(n=r.inflateSetDictionary(this.strm,p)),n===a.Z_BUF_ERROR&&!0===v&&(n=a.Z_OK,v=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&n!==a.Z_STREAM_END&&(0!==d.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(d.output,d.next_out),l=d.next_out-u,h=o.buf2string(d.output,u),d.next_out=l,d.avail_out=f-l,l&&i.arraySet(d.output,d.output,u,l,0),this.onData(h)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(v=!0)}while((d.avail_in>0||0===d.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),d.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=h,t.inflate=d,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.ungzip=d},2677(e,t){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){var t,n,r,i,o,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,i),i+=o.length;return a}},o={arraySet:function(e,t,n,r,i){for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(n)},1284(e,t,n){"use strict";var r=n(2677),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new r.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function u(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,t.string2buf=function(e){var t,n,i,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),u+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(u),a=0,o=0;a<u;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(i-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return u(e,e.length)},t.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,r,i,o,s=t||e.length,l=new Array(2*s);for(r=0,n=0;n<s;)if((i=e[n++])<128)l[r++]=i;else if((o=a[i])>4)l[r++]=65533,n+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&n<s;)i=i<<6|63&e[n++],o--;o>1?l[r++]=65533:i<65536?l[r++]=i:(i-=65536,l[r++]=55296|i>>10&1023,l[r++]=56320|1023&i)}return u(l,r)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},1245(e){"use strict";e.exports=function(e,t,n,r){for(var i=65535&e,o=e>>>16&65535,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+t[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16}},8857(e){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},5439(e){"use strict";var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,n,r,i){var o=t,a=i+r;e^=-1;for(var s=i;s<a;s++)e=e>>>8^o[255&(e^n[s])];return-1^e}},3411(e,t,n){"use strict";var r,i=n(2677),o=n(5065),a=n(1245),s=n(5439),u=n(5594),l=-2,c=258,h=262,d=103,f=113,p=666;function v(e,t){return e.msg=u[t],t}function y(e){return(e<<1)-(e>4?9:0)}function m(e){for(var t=e.length;--t>=0;)e[t]=0}function g(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function _(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,g(e.strm)}function b(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function k(e,t,n,r){var o=e.avail_in;return o>r&&(o=r),0===o?0:(e.avail_in-=o,i.arraySet(t,e.input,e.next_in,o,n),1===e.state.wrap?e.adler=a(e.adler,t,o,n):2===e.state.wrap&&(e.adler=s(e.adler,t,o,n)),e.next_in+=o,e.total_in+=o,o)}function E(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-h?e.strstart-(e.w_size-h):0,l=e.window,d=e.w_mask,f=e.prev,p=e.strstart+c,v=l[o+a-1],y=l[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(l[(n=t)+a]===y&&l[n+a-1]===v&&l[n]===l[o]&&l[++n]===l[o+1]){o+=2,n++;do{}while(l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&o<p);if(r=c-(p-o),o=p-c,r>a){if(e.match_start=t,a=r,r>=s)break;v=l[o+a-1],y=l[o+a]}}}while((t=f[t&d])>u&&0!==--i);return a<=e.lookahead?a:e.lookahead}function S(e){var t,n,r,o,a,s=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=s+(s-h)){i.arraySet(e.window,e.window,s,s,0),e.match_start-=s,e.strstart-=s,e.block_start-=s,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=s?r-s:0}while(--n);t=n=s;do{r=e.prev[--t],e.prev[t]=r>=s?r-s:0}while(--n);o+=s}if(0===e.strm.avail_in)break;if(n=k(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+3-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<h&&0!==e.strm.avail_in)}function A(e,t){for(var n,r;;){if(e.lookahead<h){if(S(e),e.lookahead<h&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-h&&(e.match_length=E(e,n)),e.match_length>=3)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}function x(e,t){for(var n,r,i;;){if(e.lookahead<h){if(S(e),e.lookahead<h&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-h&&(e.match_length=E(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(_(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=o._tr_tally(e,0,e.window[e.strstart-1]))&&_(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}function C(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function T(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),m(this.dyn_ltree),m(this.dyn_dtree),m(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),m(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),m(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function I(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:f,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):v(e,l)}function O(e){var t,n=I(e);return 0===n&&((t=e.state).window_size=2*t.w_size,m(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function L(e,t,n,r,o,a){if(!e)return l;var s=1;if(-1===t&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),o<1||o>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return v(e,l);8===r&&(r=9);var u=new T;return e.state=u,u.strm=e,u.wrap=s,u.gzhead=null,u.w_bits=r,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=a,u.method=n,O(e)}r=[new C(0,0,0,0,function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(S(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,_(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-h&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(_(e,!1),e.strm.avail_out),1)}),new C(4,4,8,4,A),new C(4,5,16,8,A),new C(4,6,32,32,A),new C(4,4,16,16,x),new C(8,16,32,32,x),new C(8,16,128,128,x),new C(8,32,128,256,x),new C(32,128,258,1024,x),new C(32,258,258,4096,x)],t.deflateInit=function(e,t){return L(e,t,8,15,8,0)},t.deflateInit2=L,t.deflateReset=O,t.deflateResetKeep=I,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?l:(e.state.gzhead=t,0):l},t.deflate=function(e,t){var n,i,a,u;if(!e||!e.state||t>5||t<0)return e?v(e,l):l;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===p&&4!==t)return v(e,0===e.avail_out?-5:l);if(i.strm=e,n=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,b(i,31),b(i,139),b(i,8),i.gzhead?(b(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),b(i,255&i.gzhead.time),b(i,i.gzhead.time>>8&255),b(i,i.gzhead.time>>16&255),b(i,i.gzhead.time>>24&255),b(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),b(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(b(i,255&i.gzhead.extra.length),b(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(b(i,0),b(i,0),b(i,0),b(i,0),b(i,0),b(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),b(i,3),i.status=f);else{var h=8+(i.w_bits-8<<4)<<8;h|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(h|=32),h+=31-h%31,i.status=f,w(i,h),0!==i.strstart&&(w(i,e.adler>>>16),w(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),g(e),a=i.pending,i.pending!==i.pending_buf_size));)b(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),g(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,b(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),g(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,b(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=d)}else i.status=d;if(i.status===d&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&g(e),i.pending+2<=i.pending_buf_size&&(b(i,255&e.adler),b(i,e.adler>>8&255),e.adler=0,i.status=f)):i.status=f),0!==i.pending){if(g(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&y(t)<=y(n)&&4!==t)return v(e,-5);if(i.status===p&&0!==e.avail_in)return v(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==p){var k=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(S(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,a,s=e.window;;){if(e.lookahead<=c){if(S(e),e.lookahead<=c&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){a=e.strstart+c;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<a);e.match_length=c-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==k&&4!==k||(i.status=p),1===k||3===k)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===k&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(m(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),g(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(b(i,255&e.adler),b(i,e.adler>>8&255),b(i,e.adler>>16&255),b(i,e.adler>>24&255),b(i,255&e.total_in),b(i,e.total_in>>8&255),b(i,e.total_in>>16&255),b(i,e.total_in>>24&255)):(w(i,e.adler>>>16),w(i,65535&e.adler)),g(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==d&&t!==f&&t!==p?v(e,l):(e.state=null,t===f?v(e,-3):0):l},t.deflateSetDictionary=function(e,t){var n,r,o,s,u,c,h,d,f=t.length;if(!e||!e.state)return l;if(2===(s=(n=e.state).wrap)||1===s&&42!==n.status||n.lookahead)return l;for(1===s&&(e.adler=a(e.adler,t,f,0)),n.wrap=0,f>=n.w_size&&(0===s&&(m(n.head),n.strstart=0,n.block_start=0,n.insert=0),d=new i.Buf8(n.w_size),i.arraySet(d,t,f-n.w_size,n.w_size,0),t=d,f=n.w_size),u=e.avail_in,c=e.next_in,h=e.input,e.avail_in=f,e.next_in=0,e.input=t,S(n);n.lookahead>=3;){r=n.strstart,o=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--o);n.strstart=r,n.lookahead=2,S(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=c,e.input=h,e.avail_in=u,n.wrap=s,0},t.deflateInfo="pako deflate (from Nodeca project)"},8798(e){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},1253(e){"use strict";e.exports=function(e,t){var n,r,i,o,a,s,u,l,c,h,d,f,p,v,y,m,g,_,b,w,k,E,S,A,x;n=e.state,r=e.next_in,A=e.input,i=r+(e.avail_in-5),o=e.next_out,x=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),u=n.dmax,l=n.wsize,c=n.whave,h=n.wnext,d=n.window,f=n.hold,p=n.bits,v=n.lencode,y=n.distcode,m=(1<<n.lenbits)-1,g=(1<<n.distbits)-1;e:do{p<15&&(f+=A[r++]<<p,p+=8,f+=A[r++]<<p,p+=8),_=v[f&m];t:for(;;){if(f>>>=b=_>>>24,p-=b,0===(b=_>>>16&255))x[o++]=65535&_;else{if(!(16&b)){if(64&b){if(32&b){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}_=v[(65535&_)+(f&(1<<b)-1)];continue t}for(w=65535&_,(b&=15)&&(p<b&&(f+=A[r++]<<p,p+=8),w+=f&(1<<b)-1,f>>>=b,p-=b),p<15&&(f+=A[r++]<<p,p+=8,f+=A[r++]<<p,p+=8),_=y[f&g];;){if(f>>>=b=_>>>24,p-=b,16&(b=_>>>16&255)){if(k=65535&_,p<(b&=15)&&(f+=A[r++]<<p,(p+=8)<b&&(f+=A[r++]<<p,p+=8)),(k+=f&(1<<b)-1)>u){e.msg="invalid distance too far back",n.mode=30;break e}if(f>>>=b,p-=b,k>(b=o-a)){if((b=k-b)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(E=0,S=d,0===h){if(E+=l-b,b<w){w-=b;do{x[o++]=d[E++]}while(--b);E=o-k,S=x}}else if(h<b){if(E+=l+h-b,(b-=h)<w){w-=b;do{x[o++]=d[E++]}while(--b);if(E=0,h<w){w-=b=h;do{x[o++]=d[E++]}while(--b);E=o-k,S=x}}}else if(E+=h-b,b<w){w-=b;do{x[o++]=d[E++]}while(--b);E=o-k,S=x}for(;w>2;)x[o++]=S[E++],x[o++]=S[E++],x[o++]=S[E++],w-=3;w&&(x[o++]=S[E++],w>1&&(x[o++]=S[E++]))}else{E=o-k;do{x[o++]=x[E++],x[o++]=x[E++],x[o++]=x[E++],w-=3}while(w>2);w&&(x[o++]=x[E++],w>1&&(x[o++]=x[E++]))}break}if(64&b){e.msg="invalid distance code",n.mode=30;break e}_=y[(65535&_)+(f&(1<<b)-1)]}}break}}while(r<i&&o<s);r-=w=p>>3,f&=(1<<(p-=w<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=f,n.bits=p}},8479(e,t,n){"use strict";var r=n(2677),i=n(1245),o=n(5439),a=n(1253),s=n(1110),u=-2,l=12,c=30;function h(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function d(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):u}function p(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,f(e)):u}function v(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,p(e))):u}function y(e,t){var n,r;return e?(r=new d,e.state=r,r.window=null,0!==(n=v(e,t))&&(e.state=null),n):u}var m,g,_=!0;function b(e){if(_){var t;for(m=new r.Buf32(512),g=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,m,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,g,0,e.work,{bits:5}),_=!1}e.lencode=m,e.lenbits=9,e.distcode=g,e.distbits=5}function w(e,t,n,i){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),i>=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),r.arraySet(a.window,t,n-i,o,a.wnext),(i-=o)?(r.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}t.inflateReset=p,t.inflateReset2=v,t.inflateResetKeep=f,t.inflateInit=function(e){return y(e,15)},t.inflateInit2=y,t.inflate=function(e,t){var n,d,f,p,v,y,m,g,_,k,E,S,A,x,C,T,I,O,L,P,R,N,D,M,F=0,B=new r.Buf8(4),j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;(n=e.state).mode===l&&(n.mode=13),v=e.next_out,f=e.output,m=e.avail_out,p=e.next_in,d=e.input,y=e.avail_in,g=n.hold,_=n.bits,k=y,E=m,N=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;_<16;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}if(2&n.wrap&&35615===g){n.check=0,B[0]=255&g,B[1]=g>>>8&255,n.check=o(n.check,B,2,0),g=0,_=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&g)<<8)+(g>>8))%31){e.msg="incorrect header check",n.mode=c;break}if(8!=(15&g)){e.msg="unknown compression method",n.mode=c;break}if(_-=4,R=8+(15&(g>>>=4)),0===n.wbits)n.wbits=R;else if(R>n.wbits){e.msg="invalid window size",n.mode=c;break}n.dmax=1<<R,e.adler=n.check=1,n.mode=512&g?10:l,g=0,_=0;break;case 2:for(;_<16;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}if(n.flags=g,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=c;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=c;break}n.head&&(n.head.text=g>>8&1),512&n.flags&&(B[0]=255&g,B[1]=g>>>8&255,n.check=o(n.check,B,2,0)),g=0,_=0,n.mode=3;case 3:for(;_<32;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}n.head&&(n.head.time=g),512&n.flags&&(B[0]=255&g,B[1]=g>>>8&255,B[2]=g>>>16&255,B[3]=g>>>24&255,n.check=o(n.check,B,4,0)),g=0,_=0,n.mode=4;case 4:for(;_<16;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}n.head&&(n.head.xflags=255&g,n.head.os=g>>8),512&n.flags&&(B[0]=255&g,B[1]=g>>>8&255,n.check=o(n.check,B,2,0)),g=0,_=0,n.mode=5;case 5:if(1024&n.flags){for(;_<16;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}n.length=g,n.head&&(n.head.extra_len=g),512&n.flags&&(B[0]=255&g,B[1]=g>>>8&255,n.check=o(n.check,B,2,0)),g=0,_=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((S=n.length)>y&&(S=y),S&&(n.head&&(R=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,d,p,S,R)),512&n.flags&&(n.check=o(n.check,d,S,p)),y-=S,p+=S,n.length-=S),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===y)break e;S=0;do{R=d[p+S++],n.head&&R&&n.length<65536&&(n.head.name+=String.fromCharCode(R))}while(R&&S<y);if(512&n.flags&&(n.check=o(n.check,d,S,p)),y-=S,p+=S,R)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===y)break e;S=0;do{R=d[p+S++],n.head&&R&&n.length<65536&&(n.head.comment+=String.fromCharCode(R))}while(R&&S<y);if(512&n.flags&&(n.check=o(n.check,d,S,p)),y-=S,p+=S,R)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;_<16;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}if(g!==(65535&n.check)){e.msg="header crc mismatch",n.mode=c;break}g=0,_=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=l;break;case 10:for(;_<32;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}e.adler=n.check=h(g),g=0,_=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=v,e.avail_out=m,e.next_in=p,e.avail_in=y,n.hold=g,n.bits=_,2;e.adler=n.check=1,n.mode=l;case l:if(5===t||6===t)break e;case 13:if(n.last){g>>>=7&_,_-=7&_,n.mode=27;break}for(;_<3;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}switch(n.last=1&g,_-=1,3&(g>>>=1)){case 0:n.mode=14;break;case 1:if(b(n),n.mode=20,6===t){g>>>=2,_-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=c}g>>>=2,_-=2;break;case 14:for(g>>>=7&_,_-=7&_;_<32;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}if((65535&g)!=(g>>>16^65535)){e.msg="invalid stored block lengths",n.mode=c;break}if(n.length=65535&g,g=0,_=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(S=n.length){if(S>y&&(S=y),S>m&&(S=m),0===S)break e;r.arraySet(f,d,p,S,v),y-=S,p+=S,m-=S,v+=S,n.length-=S;break}n.mode=l;break;case 17:for(;_<14;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}if(n.nlen=257+(31&g),g>>>=5,_-=5,n.ndist=1+(31&g),g>>>=5,_-=5,n.ncode=4+(15&g),g>>>=4,_-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=c;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;_<3;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}n.lens[j[n.have++]]=7&g,g>>>=3,_-=3}for(;n.have<19;)n.lens[j[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,D={bits:n.lenbits},N=s(0,n.lens,0,19,n.lencode,0,n.work,D),n.lenbits=D.bits,N){e.msg="invalid code lengths set",n.mode=c;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;T=(F=n.lencode[g&(1<<n.lenbits)-1])>>>16&255,I=65535&F,!((C=F>>>24)<=_);){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}if(I<16)g>>>=C,_-=C,n.lens[n.have++]=I;else{if(16===I){for(M=C+2;_<M;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}if(g>>>=C,_-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=c;break}R=n.lens[n.have-1],S=3+(3&g),g>>>=2,_-=2}else if(17===I){for(M=C+3;_<M;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}_-=C,R=0,S=3+(7&(g>>>=C)),g>>>=3,_-=3}else{for(M=C+7;_<M;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}_-=C,R=0,S=11+(127&(g>>>=C)),g>>>=7,_-=7}if(n.have+S>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=c;break}for(;S--;)n.lens[n.have++]=R}}if(n.mode===c)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=c;break}if(n.lenbits=9,D={bits:n.lenbits},N=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,D),n.lenbits=D.bits,N){e.msg="invalid literal/lengths set",n.mode=c;break}if(n.distbits=6,n.distcode=n.distdyn,D={bits:n.distbits},N=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,D),n.distbits=D.bits,N){e.msg="invalid distances set",n.mode=c;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(y>=6&&m>=258){e.next_out=v,e.avail_out=m,e.next_in=p,e.avail_in=y,n.hold=g,n.bits=_,a(e,E),v=e.next_out,f=e.output,m=e.avail_out,p=e.next_in,d=e.input,y=e.avail_in,g=n.hold,_=n.bits,n.mode===l&&(n.back=-1);break}for(n.back=0;T=(F=n.lencode[g&(1<<n.lenbits)-1])>>>16&255,I=65535&F,!((C=F>>>24)<=_);){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}if(T&&!(240&T)){for(O=C,L=T,P=I;T=(F=n.lencode[P+((g&(1<<O+L)-1)>>O)])>>>16&255,I=65535&F,!(O+(C=F>>>24)<=_);){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}g>>>=O,_-=O,n.back+=O}if(g>>>=C,_-=C,n.back+=C,n.length=I,0===T){n.mode=26;break}if(32&T){n.back=-1,n.mode=l;break}if(64&T){e.msg="invalid literal/length code",n.mode=c;break}n.extra=15&T,n.mode=22;case 22:if(n.extra){for(M=n.extra;_<M;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}n.length+=g&(1<<n.extra)-1,g>>>=n.extra,_-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;T=(F=n.distcode[g&(1<<n.distbits)-1])>>>16&255,I=65535&F,!((C=F>>>24)<=_);){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}if(!(240&T)){for(O=C,L=T,P=I;T=(F=n.distcode[P+((g&(1<<O+L)-1)>>O)])>>>16&255,I=65535&F,!(O+(C=F>>>24)<=_);){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}g>>>=O,_-=O,n.back+=O}if(g>>>=C,_-=C,n.back+=C,64&T){e.msg="invalid distance code",n.mode=c;break}n.offset=I,n.extra=15&T,n.mode=24;case 24:if(n.extra){for(M=n.extra;_<M;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}n.offset+=g&(1<<n.extra)-1,g>>>=n.extra,_-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=c;break}n.mode=25;case 25:if(0===m)break e;if(S=E-m,n.offset>S){if((S=n.offset-S)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=c;break}S>n.wnext?(S-=n.wnext,A=n.wsize-S):A=n.wnext-S,S>n.length&&(S=n.length),x=n.window}else x=f,A=v-n.offset,S=n.length;S>m&&(S=m),m-=S,n.length-=S;do{f[v++]=x[A++]}while(--S);0===n.length&&(n.mode=21);break;case 26:if(0===m)break e;f[v++]=n.length,m--,n.mode=21;break;case 27:if(n.wrap){for(;_<32;){if(0===y)break e;y--,g|=d[p++]<<_,_+=8}if(E-=m,e.total_out+=E,n.total+=E,E&&(e.adler=n.check=n.flags?o(n.check,f,E,v-E):i(n.check,f,E,v-E)),E=m,(n.flags?g:h(g))!==n.check){e.msg="incorrect data check",n.mode=c;break}g=0,_=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;_<32;){if(0===y)break e;y--,g+=d[p++]<<_,_+=8}if(g!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=c;break}g=0,_=0}n.mode=29;case 29:N=1;break e;case c:N=-3;break e;case 31:return-4;default:return u}return e.next_out=v,e.avail_out=m,e.next_in=p,e.avail_in=y,n.hold=g,n.bits=_,(n.wsize||E!==e.avail_out&&n.mode<c&&(n.mode<27||4!==t))&&w(e,e.output,e.next_out,E-e.avail_out)?(n.mode=31,-4):(k-=e.avail_in,E-=e.avail_out,e.total_in+=k,e.total_out+=E,n.total+=E,n.wrap&&E&&(e.adler=n.check=n.flags?o(n.check,f,E,e.next_out-E):i(n.check,f,E,e.next_out-E)),e.data_type=n.bits+(n.last?64:0)+(n.mode===l?128:0)+(20===n.mode||15===n.mode?256:0),(0===k&&0===E||4===t)&&0===N&&(N=-5),N)},t.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var n;return e&&e.state&&2&(n=e.state).wrap?(n.head=t,t.done=!1,0):u},t.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?u:11===n.mode&&i(1,t,r,0)!==n.check?-3:w(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):u},t.inflateInfo="pako inflate (from Nodeca project)"},1110(e,t,n){"use strict";var r=n(2677),i=15,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,l,c,h,d,f){var p,v,y,m,g,_,b,w,k,E=f.bits,S=0,A=0,x=0,C=0,T=0,I=0,O=0,L=0,P=0,R=0,N=null,D=0,M=new r.Buf16(16),F=new r.Buf16(16),B=null,j=0;for(S=0;S<=i;S++)M[S]=0;for(A=0;A<l;A++)M[t[n+A]]++;for(T=E,C=i;C>=1&&0===M[C];C--);if(T>C&&(T=C),0===C)return c[h++]=20971520,c[h++]=20971520,f.bits=1,0;for(x=1;x<C&&0===M[x];x++);for(T<x&&(T=x),L=1,S=1;S<=i;S++)if(L<<=1,(L-=M[S])<0)return-1;if(L>0&&(0===e||1!==C))return-1;for(F[1]=0,S=1;S<i;S++)F[S+1]=F[S]+M[S];for(A=0;A<l;A++)0!==t[n+A]&&(d[F[t[n+A]]++]=A);if(0===e?(N=B=d,_=19):1===e?(N=o,D-=257,B=a,j-=257,_=256):(N=s,B=u,_=-1),R=0,A=0,S=x,g=h,I=T,O=0,y=-1,m=(P=1<<T)-1,1===e&&P>852||2===e&&P>592)return 1;for(;;){b=S-O,d[A]<_?(w=0,k=d[A]):d[A]>_?(w=B[j+d[A]],k=N[D+d[A]]):(w=96,k=0),p=1<<S-O,x=v=1<<I;do{c[g+(R>>O)+(v-=p)]=b<<24|w<<16|k}while(0!==v);for(p=1<<S-1;R&p;)p>>=1;if(0!==p?(R&=p-1,R+=p):R=0,A++,0===--M[S]){if(S===C)break;S=t[n+d[A]]}if(S>T&&(R&m)!==y){for(0===O&&(O=T),g+=x,L=1<<(I=S-O);I+O<C&&!((L-=M[I+O])<=0);)I++,L<<=1;if(P+=1<<I,1===e&&P>852||2===e&&P>592)return 1;c[y=R&m]=T<<24|I<<16|g-h}}return 0!==R&&(c[g+R]=S-O<<24|64<<16),f.bits=T,0}},5594(e){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},5065(e,t,n){"use strict";var r=n(2677);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,a=286,s=30,u=15,l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],c=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],h=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],d=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Array(576);i(f);var p=new Array(60);i(p);var v=new Array(512);i(v);var y=new Array(256);i(y);var m=new Array(29);i(m);var g,_,b,w=new Array(s);function k(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function S(e){return e<256?v[e]:v[256+(e>>>7)]}function A(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function x(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,A(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function C(e,t,n){x(e,n[2*t],n[2*t+1])}function T(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function I(e,t,n){var r,i,o=new Array(16),a=0;for(r=1;r<=u;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=T(o[s]++,s))}}function O(e){var t;for(t=0;t<a;t++)e.dyn_ltree[2*t]=0;for(t=0;t<s;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function L(e){e.bi_valid>8?A(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function P(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function R(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&P(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!P(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function N(e,t,n){var r,i,a,s,u=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],i=e.pending_buf[e.l_buf+u],u++,0===r?C(e,i,t):(C(e,(a=y[i])+o+1,t),0!==(s=l[a])&&x(e,i-=m[a],s),C(e,a=S(--r),n),0!==(s=c[a])&&x(e,r-=w[a],s))}while(u<e.last_lit);C(e,256,t)}function D(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<l;n++)0!==o[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,n=e.heap_len>>1;n>=1;n--)R(e,o,n);i=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],R(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,R(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,l=t.dyn_tree,c=t.max_code,h=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,v=t.stat_desc.max_length,y=0;for(o=0;o<=u;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=l[2*l[2*(r=e.heap[n])+1]+1]+1)>v&&(o=v,y++),l[2*r+1]=o,r>c||(e.bl_count[o]++,a=0,r>=p&&(a=f[r-p]),s=l[2*r],e.opt_len+=s*(o+a),d&&(e.static_len+=s*(h[2*r+1]+a)));if(0!==y){do{for(o=v-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[v]--,y-=2}while(y>0);for(o=v;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>c||(l[2*i+1]!==o&&(e.opt_len+=(o-l[2*i+1])*l[2*i],l[2*i+1]=o),r--)}}(e,t),I(o,c,e.bl_count)}function M(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,l=4;for(0===a&&(u=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<u&&i===a||(s<l?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(u=138,l=3):i===a?(u=6,l=3):(u=7,l=4))}function F(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,l=4;for(0===a&&(u=138,l=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<l)do{C(e,i,e.bl_tree)}while(0!==--s);else 0!==i?(i!==o&&(C(e,i,e.bl_tree),s--),C(e,16,e.bl_tree),x(e,s-3,2)):s<=10?(C(e,17,e.bl_tree),x(e,s-3,3)):(C(e,18,e.bl_tree),x(e,s-11,7));s=0,o=i,0===a?(u=138,l=3):i===a?(u=6,l=3):(u=7,l=4)}}i(w);var B=!1;function j(e,t,n,i){x(e,0+(i?1:0),3),function(e,t,n,i){L(e),i&&(A(e,n),A(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}t._tr_init=function(e){B||(!function(){var e,t,n,r,i,o=new Array(16);for(n=0,r=0;r<28;r++)for(m[r]=n,e=0;e<1<<l[r];e++)y[n++]=r;for(y[n-1]=r,i=0,r=0;r<16;r++)for(w[r]=i,e=0;e<1<<c[r];e++)v[i++]=r;for(i>>=7;r<s;r++)for(w[r]=i<<7,e=0;e<1<<c[r]-7;e++)v[256+i++]=r;for(t=0;t<=u;t++)o[t]=0;for(e=0;e<=143;)f[2*e+1]=8,e++,o[8]++;for(;e<=255;)f[2*e+1]=9,e++,o[9]++;for(;e<=279;)f[2*e+1]=7,e++,o[7]++;for(;e<=287;)f[2*e+1]=8,e++,o[8]++;for(I(f,287,o),e=0;e<s;e++)p[2*e+1]=5,p[2*e]=T(e,5);g=new k(f,l,257,a,u),_=new k(p,c,0,s,u),b=new k(new Array(0),h,0,19,7)}(),B=!0),e.l_desc=new E(e.dyn_ltree,g),e.d_desc=new E(e.dyn_dtree,_),e.bl_desc=new E(e.bl_tree,b),e.bi_buf=0,e.bi_valid=0,O(e)},t._tr_stored_block=j,t._tr_flush_block=function(e,t,n,r){var i,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<o;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),D(e,e.l_desc),D(e,e.d_desc),s=function(e){var t;for(M(e,e.dyn_ltree,e.l_desc.max_code),M(e,e.dyn_dtree,e.d_desc.max_code),D(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*d[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?j(e,t,n,r):4===e.strategy||a===i?(x(e,2+(r?1:0),3),N(e,f,p)):(x(e,4+(r?1:0),3),function(e,t,n,r){var i;for(x(e,t-257,5),x(e,n-1,5),x(e,r-4,4),i=0;i<r;i++)x(e,e.bl_tree[2*d[i]+1],3);F(e,e.dyn_ltree,t-1),F(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),N(e,e.dyn_ltree,e.dyn_dtree)),O(e),r&&L(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(y[n]+o+1)]++,e.dyn_dtree[2*S(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){x(e,2,3),C(e,256,f),function(e){16===e.bi_valid?(A(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},2562(e){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},4578(e,t,n){"use strict";var r=n(5287);e.exports={nextTick:function(e,t,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return r.nextTick(e);case 2:return r.nextTick(function(){e.call(null,t)});case 3:return r.nextTick(function(){e.call(null,t,n)});case 4:return r.nextTick(function(){e.call(null,t,n,i)});default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return r.nextTick(function(){e.apply(null,o)})}}}},5510(e,t,n){"use strict";var r=n(4578),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=h;var o=Object.create(n(1293));o.inherits=n(7302);var a=n(3572),s=n(6116);o.inherits(h,a);for(var u=i(s.prototype),l=0;l<u.length;l++){var c=u[l];h.prototype[c]||(h.prototype[c]=s.prototype[c])}function h(e){if(!(this instanceof h))return new h(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||r.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),h.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},3008(e,t,n){"use strict";e.exports=o;var r=n(626),i=Object.create(n(1293));function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(7302),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},3572(e,t,n){"use strict";var r=n(5287),i=n(4578);e.exports=_;var o,a=n(4032);_.ReadableState=g;n(7294).EventEmitter;var s=function(e,t){return e.listeners(t).length},u=n(4393),l=n(6365).Buffer,c=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var h=Object.create(n(1293));h.inherits=n(7302);var d=n(7679),f=void 0;f=d&&d.debuglog?d.debuglog("stream"):function(){};var p,v=n(950),y=n(1528);h.inherits(_,u);var m=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var r=t instanceof(o=o||n(5510));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=n(4759).I),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function _(e){if(o=o||n(5510),!(this instanceof _))return new _(e);this._readableState=new g(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function b(e,t,n,r,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,S(e)}(e,a)):(i||(o=function(e,t){var n;r=t,l.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):x(e,a)):w(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function w(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&S(e)),x(e,t)}Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),_.prototype.destroy=y.destroy,_.prototype._undestroy=y.undestroy,_.prototype._destroy=function(e,t){this.push(null),t(e)},_.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),b(this,e,t,!1,n)},_.prototype.unshift=function(e){return b(this,e,null,!0,!1)},_.prototype.isPaused=function(){return!1===this._readableState.flowing},_.prototype.setEncoding=function(e){return p||(p=n(4759).I),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var k=8388608;function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=k?e=k:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(A,e):A(e))}function A(e){f("emit readable"),e.emit("readable"),O(e)}function x(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function T(e){f("readable nexttick read 0"),e.read(0)}function I(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),O(e),t.flowing&&!t.reading&&e.read(0)}function O(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=l.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function N(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}_.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):S(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&P(this),null;var r,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),t.ended||t.reading?f("reading or ended",i=!1):i&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(n,t))),null===(r=e>0?L(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&P(this)),null!==r&&this.emit("data",r),r},_.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},_.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,f("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:_;function l(t,r){f("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,f("cleanup"),e.removeListener("close",m),e.removeListener("finish",g),e.removeListener("drain",h),e.removeListener("error",y),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",_),n.removeListener("data",v),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function c(){f("onend"),e.end()}o.endEmitted?i.nextTick(u):n.once("end",u),e.on("unpipe",l);var h=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,O(e))}}(n);e.on("drain",h);var d=!1;var p=!1;function v(t){f("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==N(o.pipes,e))&&!d&&(f("false write response, pause",o.awaitDrain),o.awaitDrain++,p=!0),n.pause())}function y(t){f("onerror",t),_(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",g),_()}function g(){f("onfinish"),e.removeListener("close",m),_()}function _(){f("unpipe"),n.unpipe(e)}return n.on("data",v),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",m),e.once("finish",g),e.emit("pipe",n),o.flowing||(f("pipe resume"),n.resume()),e},_.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=N(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},_.prototype.on=function(e,t){var n=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&S(this):i.nextTick(T,this))}return n},_.prototype.addListener=_.prototype.on,_.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(I,e,t))}(this,e)),this},_.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},_.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",function(){if(f("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){(f("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<m.length;o++)e.on(m[o],this.emit.bind(this,m[o]));return this._read=function(t){f("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(_.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),_._fromList=L},626(e,t,n){"use strict";e.exports=a;var r=n(5510),i=Object.create(n(1293));function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(7302),i.inherits(a,r),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},6116(e,t,n){"use strict";var r=n(4578);function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=y;var o,a=r.nextTick;y.WritableState=v;var s=Object.create(n(1293));s.inherits=n(7302);var u={deprecate:n(5958)},l=n(4393),c=n(6365).Buffer,h=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,f=n(1528);function p(){}function v(e,t){o=o||n(5510),e=e||{};var s=t instanceof o;this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var u=e.highWaterMark,l=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:s&&(l||0===l)?l:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===e.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,o){--t.pendingcb,n?(r.nextTick(o,i),r.nextTick(k,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(o(i),e._writableState.errorEmitted=!0,e.emit("error",i),k(e,t))}(e,n,i,t,o);else{var s=b(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||_(e,n),i?a(g,e,n,s,o):g(e,n,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function y(e){if(o=o||n(5510),!(d.call(y,this)||this instanceof o))return new y(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function m(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function g(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),k(e,t)}function _(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)o[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;o.allBuffers=u,m(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,h=n.callback;if(m(e,t,!1,t.objectMode?1:l.length,l,c,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function b(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function w(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),k(e,t)})}function k(e,t){var n=b(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,r.nextTick(w,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}s.inherits(y,l),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===y&&(e&&e._writableState instanceof v)}})):d=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,n){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=e,c.isBuffer(i)||i instanceof h);return s&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=p),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),r.nextTick(t,n)}(this,n):(s||function(e,t,n,i){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),r.nextTick(i,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else m(e,t,!1,s,r,i,o);return u}(this,o,s,e,t,n)),a},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||_(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,n){var i=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,k(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=f.destroy,y.prototype._undestroy=f.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}},950(e,t,n){"use strict";var r=n(6365).Buffer,i=n(9603);function o(e,t,n){e.copy(t,n)}e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);for(var t=r.allocUnsafe(e>>>0),n=this.head,i=0;n;)o(n.data,t,i),i+=n.data.length,n=n.next;return t},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},1528(e,t,n){"use strict";var r=n(4578);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(i,this,e)):r.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,r.nextTick(i,n,e)):r.nextTick(i,n,e):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},4393(e,t,n){e.exports=n(7294).EventEmitter},6011(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new O(r||[]);return i(a,"_invoke",{value:x(e,n,s)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d="suspendedStart",f="suspendedYield",p="executing",v="completed",y={};function m(){}function g(){}function _(){}var b={};l(b,a,function(){return this});var w=Object.getPrototypeOf,k=w&&w(w(L([])));k&&k!==n&&r.call(k,a)&&(b=k);var E=_.prototype=m.prototype=Object.create(b);function S(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function A(e,t){function n(i,o,a,s){var u=h(e[i],e,o);if("throw"!==u.type){var l=u.arg,c=l.value;return c&&"object"==typeof c&&r.call(c,"__await")?t.resolve(c.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):t.resolve(c).then(function(e){l.value=e,a(l)},function(e){return n("throw",e,a,s)})}s(u.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t(function(t,i){n(e,r,t,i)})}return o=o?o.then(i,i):i()}})}function x(e,n,r){var i=d;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=h(e,n,r);if("normal"===l.type){if(i=r.done?v:f,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function C(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function L(e){if(null!=e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=_,i(E,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:g,configurable:!0}),g.displayName=l(_,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,l(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},S(A.prototype),l(A.prototype,s,function(){return this}),e.AsyncIterator=A,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new A(c(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},S(E),l(E,u,"Generator"),l(E,a,function(){return this}),l(E,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=L,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},6365(e,t,n){var r=n(430),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},422(e,t,n){var r=n(5287);!function(e){"use strict";if(!e.setImmediate){var t,n,i,o,a,s=1,u={},l=!1,c=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?t=function(e){r.nextTick(function(){f(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},t=function(e){i.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(n=c.documentElement,t=function(e){var t=c.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,n.removeChild(t),t=null},n.appendChild(t)}):t=function(e){setTimeout(f,0,e)}:(o="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&f(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),t=function(t){e.postMessage(o+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var n=new Array(arguments.length-1),r=0;r<n.length;r++)n[r]=arguments[r+1];var i={callback:e,args:n};return u[s]=i,t(s),s++},h.clearImmediate=d}function d(e){delete u[e]}function f(e){if(l)setTimeout(f,0,e);else{var t=u[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{d(e),l=!1}}}}}("undefined"==typeof self?void 0===n.g?this:n.g:self)},4759(e,t,n){"use strict";var r=n(6365).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=a(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if(i=a(t[r]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if(i=a(t[r]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},5958(e,t,n){function r(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation"),n=!0}return e.apply(this,arguments)}}},9131(e,t,n){"use strict";var r,i,o=n.g.MutationObserver||n.g.WebKitMutationObserver;if(o){var a=0,s=new o(h),u=n.g.document.createTextNode("");s.observe(u,{characterData:!0}),r=function(){u.data=a=++a%2}}else if(n.g.setImmediate||void 0===n.g.MessageChannel)r="document"in n.g&&"onreadystatechange"in n.g.document.createElement("script")?function(){var e=n.g.document.createElement("script");e.onreadystatechange=function(){h(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},n.g.document.documentElement.appendChild(e)}:function(){setTimeout(h,0)};else{var l=new n.g.MessageChannel;l.port1.onmessage=h,r=function(){l.port2.postMessage(0)}}var c=[];function h(){var e,t;i=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e<n;)t[e]();n=c.length}i=!1}e.exports=function(e){1!==c.push(e)||i||r()}},348(e,t,n){"use strict";var r=n(7790),i=n(4004),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.encode=function(e){for(var t,n,i,a,s,u,l,c=[],h=0,d=e.length,f=d,p="string"!==r.getTypeOf(e);h<e.length;)f=d-h,p?(t=e[h++],n=h<d?e[h++]:0,i=h<d?e[h++]:0):(t=e.charCodeAt(h++),n=h<d?e.charCodeAt(h++):0,i=h<d?e.charCodeAt(h++):0),a=t>>2,s=(3&t)<<4|n>>4,u=f>1?(15&n)<<2|i>>6:64,l=f>2?63&i:64,c.push(o.charAt(a)+o.charAt(s)+o.charAt(u)+o.charAt(l));return c.join("")},t.decode=function(e){var t,n,r,a,s,u,l=0,c=0,h="data:";if(e.substr(0,5)===h)throw new Error("Invalid base64 input, it looks like a data url.");var d,f=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&f--,e.charAt(e.length-2)===o.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=i.uint8array?new Uint8Array(0|f):new Array(0|f);l<e.length;)t=o.indexOf(e.charAt(l++))<<2|(a=o.indexOf(e.charAt(l++)))>>4,n=(15&a)<<4|(s=o.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(u=o.indexOf(e.charAt(l++))),d[c++]=t,64!==s&&(d[c++]=n),64!==u&&(d[c++]=r);return d}},9237(e,t,n){"use strict";var r=n(1388),i=n(1996),o=n(3841),a=n(8666);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new a("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},e.exports=s},2008(e,t,n){"use strict";var r=n(859);t.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},t.DEFLATE=n(7089)},6988(e,t,n){"use strict";var r=n(7790);var i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):0}},6141(e,t){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},1388(e,t,n){"use strict";var r=null;r="undefined"!=typeof Promise?Promise:n(9024),e.exports={Promise:r}},7089(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=n(9836),o=n(7790),a=n(859),s=r?"uint8array":"array";function u(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}t.magic="\b\0",o.inherits(u,a),u.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,e.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},t.compressWorker=function(e){return new u("Deflate",e)},t.uncompressWorker=function(){return new u("Inflate",{})}},7656(e,t,n){"use strict";var r=n(7790),i=n(859),o=n(1148),a=n(6988),s=n(5741),u=function(e,t){var n,r="";for(n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r},l=function(e,t,n,i,l,c){var h,d,f=e.file,p=e.compression,v=c!==o.utf8encode,y=r.transformTo("string",c(f.name)),m=r.transformTo("string",o.utf8encode(f.name)),g=f.comment,_=r.transformTo("string",c(g)),b=r.transformTo("string",o.utf8encode(g)),w=m.length!==f.name.length,k=b.length!==g.length,E="",S="",A="",x=f.dir,C=f.date,T={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(T.crc32=e.crc32,T.compressedSize=e.compressedSize,T.uncompressedSize=e.uncompressedSize);var I=0;t&&(I|=8),v||!w&&!k||(I|=2048);var O,L,P,R=0,N=0;x&&(R|=16),"UNIX"===l?(N=798,R|=(O=f.unixPermissions,L=x,P=O,O||(P=L?16893:33204),(65535&P)<<16)):(N=20,R|=63&(f.dosPermissions||0)),h=C.getUTCHours(),h<<=6,h|=C.getUTCMinutes(),h<<=5,h|=C.getUTCSeconds()/2,d=C.getUTCFullYear()-1980,d<<=4,d|=C.getUTCMonth()+1,d<<=5,d|=C.getUTCDate(),w&&(S=u(1,1)+u(a(y),4)+m,E+="up"+u(S.length,2)+S),k&&(A=u(1,1)+u(a(_),4)+b,E+="uc"+u(A.length,2)+A);var D="";return D+="\n\0",D+=u(I,2),D+=p.magic,D+=u(h,2),D+=u(d,2),D+=u(T.crc32,4),D+=u(T.compressedSize,4),D+=u(T.uncompressedSize,4),D+=u(y.length,2),D+=u(E.length,2),{fileRecord:s.LOCAL_FILE_HEADER+D+y+E,dirRecord:s.CENTRAL_FILE_HEADER+u(N,2)+D+u(_.length,2)+"\0\0\0\0"+u(R,4)+u(i,4)+y+E+_}},c=function(e){return s.DATA_DESCRIPTOR+u(e.crc32,4)+u(e.compressedSize,4)+u(e.uncompressedSize,4)};function h(e,t,n,r){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}r.inherits(h,i),h.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},h.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=l(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=l(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:c(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e,i=function(e,t,n,i,o){var a=r.transformTo("string",o(i));return s.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(e,2)+u(e,2)+u(t,4)+u(n,4)+u(a.length,2)+a}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},h.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(e){var t=this._sources;if(!i.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(e){}return!0},h.prototype.lock=function(){i.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},e.exports=h},5987(e,t,n){"use strict";var r=n(2008),i=n(7656);t.generateWorker=function(e,t,n){var o=new i(t.streamFiles,n,t.platform,t.encodeFileName),a=0;try{e.forEach(function(e,n){a++;var i=function(e,t){var n=e||t,i=r[n];if(!i)throw new Error(n+" is not a valid compression method !");return i}(n.options.compression,t.compression),s=n.options.compressionOptions||t.compressionOptions||{},u=n.dir,l=n.date;n._compressWorker(i,s).withStreamInfo("file",{name:e,dir:u,date:l,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(o)}),o.entriesCount=a}catch(e){o.error(e)}return o}},8067(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new r;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}r.prototype=n(2492),r.prototype.loadAsync=n(1387),r.support=n(4004),r.defaults=n(6141),r.version="3.10.1",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=n(1388),e.exports=r},1387(e,t,n){"use strict";var r=n(7790),i=n(1388),o=n(1148),a=n(1814),s=n(3841),u=n(8627);function l(e){return new i.Promise(function(t,n){var r=e.decompressed.getContentWorker().pipe(new s);r.on("error",function(e){n(e)}).on("end",function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}e.exports=function(e,t){var n=this;return t=r.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var n=new a(t);return n.load(e),n}).then(function(e){var n=[i.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var o=0;o<r.length;o++)n.push(l(r[o]));return i.Promise.all(n)}).then(function(e){for(var i=e.shift(),o=i.files,a=0;a<o.length;a++){var s=o[a],u=s.fileNameStr,l=r.resolve(s.fileNameStr);n.file(l,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:t.createFolders}),s.dir||(n.file(l).unsafeOriginalName=u)}return i.zipComment.length&&(n.comment=i.zipComment),n})}},9731(e,t,n){"use strict";var r=n(7790),i=n(859);function o(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}r.inherits(o,i),o.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},o.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=o},5378(e,t,n){"use strict";var r=n(313).Readable;function i(e,t,n){r.call(this,t),this._helper=e;var i=this;e.on("data",function(e,t){i.push(e)||i._helper.pause(),n&&n(t)}).on("error",function(e){i.emit("error",e)}).on("end",function(){i.push(null)})}n(7790).inherits(i,r),i.prototype._read=function(){this._helper.resume()},e.exports=i},8627(e){"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},2492(e,t,n){"use strict";var r=n(1148),i=n(7790),o=n(859),a=n(5950),s=n(6141),u=n(9237),l=n(2355),c=n(5987),h=n(8627),d=n(9731),f=function(e,t,n){var r,a=i.getTypeOf(t),c=i.extend(n||{},s);c.date=c.date||new Date,null!==c.compression&&(c.compression=c.compression.toUpperCase()),"string"==typeof c.unixPermissions&&(c.unixPermissions=parseInt(c.unixPermissions,8)),c.unixPermissions&&16384&c.unixPermissions&&(c.dir=!0),c.dosPermissions&&16&c.dosPermissions&&(c.dir=!0),c.dir&&(e=v(e)),c.createFolders&&(r=p(e))&&y.call(this,r,!0);var f="string"===a&&!1===c.binary&&!1===c.base64;n&&void 0!==n.binary||(c.binary=!f),(t instanceof u&&0===t.uncompressedSize||c.dir||!t||0===t.length)&&(c.base64=!1,c.binary=!0,t="",c.compression="STORE",a="string");var m=null;m=t instanceof u||t instanceof o?t:h.isNode&&h.isStream(t)?new d(e,t):i.prepareContent(e,t,c.binary,c.optimizedBinaryString,c.base64);var g=new l(e,m,c);this.files[e]=g},p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},v=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},y=function(e,t){return t=void 0!==t?t:s.createFolders,e=v(e),this.files[e]||f.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function m(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var g={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r)},filter:function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(r)}),t},file:function(e,t,n){if(1===arguments.length){if(m(e)){var r=e;return this.filter(function(e,t){return!t.dir&&r.test(e)})}var i=this.files[this.root+e];return i&&!i.dir?i:null}return e=this.root+e,f.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(m(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=y.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,n={};try{if((n=i.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:r.utf8encode})).type=n.type.toLowerCase(),n.compression=n.compression.toUpperCase(),"binarystring"===n.type&&(n.type="string"),!n.type)throw new Error("No output type specified.");i.checkSupport(n.type),"darwin"!==n.platform&&"freebsd"!==n.platform&&"linux"!==n.platform&&"sunos"!==n.platform||(n.platform="UNIX"),"win32"===n.platform&&(n.platform="DOS");var s=n.comment||this.comment||"";t=c.generateWorker(this,n,s)}catch(e){(t=new o("error")).error(e)}return new a(t,n.type||"string",n.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};e.exports=g},313(e,t,n){"use strict";e.exports=n(3745)},6893(e,t,n){"use strict";var r=n(9748);function i(e){r.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}n(7790).inherits(i,r),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),o=this.length-4;o>=0;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&r===o[2]&&i===o[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},9748(e,t,n){"use strict";var r=n(7790);function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},e.exports=i},4438(e,t,n){"use strict";var r=n(5413);function i(e){r.call(this,e)}n(7790).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},8409(e,t,n){"use strict";var r=n(9748);function i(e){r.call(this,e)}n(7790).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},5413(e,t,n){"use strict";var r=n(6893);function i(e){r.call(this,e)}n(7790).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},549(e,t,n){"use strict";var r=n(7790),i=n(4004),o=n(6893),a=n(8409),s=n(4438),u=n(5413);e.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new u(r.transformTo("uint8array",e)):new o(r.transformTo("array",e)):new a(e)}},5741(e,t){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},5769(e,t,n){"use strict";var r=n(859),i=n(7790);function o(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,r),o.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},e.exports=o},3841(e,t,n){"use strict";var r=n(859),i=n(6988);function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n(7790).inherits(o,r),o.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=o},8666(e,t,n){"use strict";var r=n(7790),i=n(859);function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(o,i),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},e.exports=o},1996(e,t,n){"use strict";var r=n(7790),i=n(859);function o(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},859(e){"use strict";function t(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}t.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},e.exports=t},5950(e,t,n){"use strict";var r=n(7790),i=n(5769),o=n(859),a=n(348),s=n(4004),u=n(1388),l=null;if(s.nodestream)try{l=n(5378)}catch(e){}function c(e,t){return new u.Promise(function(n,i){var o=[],s=e._internalType,u=e._outputType,l=e._mimeType;e.on("data",function(e,n){o.push(e),t&&t(n)}).on("error",function(e){o=[],i(e)}).on("end",function(){try{var e=function(e,t,n){switch(e){case"blob":return r.newBlob(r.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return r.transformTo(e,t)}}(u,function(e,t){var n,r=0,i=null,o=0;for(n=0;n<t.length;n++)o+=t[n].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(o),n=0;n<t.length;n++)i.set(t[n],r),r+=t[n].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(s,o),l);n(e)}catch(e){i(e)}o=[]}).resume()})}function h(e,t,n){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=t,this._mimeType=n,r.checkSupport(a),this._worker=e.pipe(new i(a)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}h.prototype={accumulate:function(e){return c(this,e)},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,function(e){t.call(n,e.data,e.meta)}):this._worker.on(e,function(){r.delay(t,arguments,n)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(r.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new l(this,{objectMode:"nodebuffer"!==this._outputType},e)}},e.exports=h},4004(e,t,n){"use strict";if(t.base64=!0,t.array=!0,t.string=!0,t.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,t.nodebuffer="undefined"!=typeof Buffer,t.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)t.blob=!1;else{var r=new ArrayBuffer(0);try{t.blob=0===new Blob([r],{type:"application/zip"}).size}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),t.blob=0===i.getBlob("application/zip").size}catch(e){t.blob=!1}}}try{t.nodestream=!!n(313).Readable}catch(e){t.nodestream=!1}},1148(e,t,n){"use strict";for(var r=n(7790),i=n(4004),o=n(8627),a=n(859),s=new Array(256),u=0;u<256;u++)s[u]=u>=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;s[254]=s[254]=1;function l(){a.call(this,"utf-8 decode"),this.leftOver=null}function c(){a.call(this,"utf-8 encode")}t.utf8encode=function(e){return i.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,n,r,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),u+=n<128?1:n<2048?2:n<65536?3:4;for(t=i.uint8array?new Uint8Array(u):new Array(u),a=0,o=0;a<u;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t}(e)},t.utf8decode=function(e){return i.nodebuffer?r.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,i,o,a=e.length,u=new Array(2*a);for(n=0,t=0;t<a;)if((i=e[t++])<128)u[n++]=i;else if((o=s[i])>4)u[n++]=65533,t+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&t<a;)i=i<<6|63&e[t++],o--;o>1?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return u.length!==n&&(u.subarray?u=u.subarray(0,n):u.length=n),r.applyFromCharCode(u)}(e=r.transformTo(i.uint8array?"uint8array":"array",e))},r.inherits(l,a),l.prototype.processChunk=function(e){var n=r.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=n;(n=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),n.set(o,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var a=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+s[e[n]]>t?n:t}(n),u=n;a!==n.length&&(i.uint8array?(u=n.subarray(0,a),this.leftOver=n.subarray(a,n.length)):(u=n.slice(0,a),this.leftOver=n.slice(a,n.length))),this.push({data:t.utf8decode(u),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=l,r.inherits(c,a),c.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=c},7790(e,t,n){"use strict";var r=n(4004),i=n(348),o=n(8627),a=n(1388);function s(e){return e}function u(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}n(422),t.newBlob=function(e,n){t.checkSupport("blob");try{return new Blob([e],{type:n})}catch(t){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return r.append(e),r.getBlob(n)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(e,t,n){var r=[],i=0,o=e.length;if(o<=n)return String.fromCharCode.apply(null,e);for(;i<o;)"array"===t||"nodebuffer"===t?r.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+n,o)))):r.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+n,o)))),i+=n;return r.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return r.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return r.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function c(e){var n=65536,r=t.getTypeOf(e),i=!0;if("uint8array"===r?i=l.applyCanBeUsed.uint8array:"nodebuffer"===r&&(i=l.applyCanBeUsed.nodebuffer),i)for(;n>1;)try{return l.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return l.stringifyByChar(e)}function h(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}t.applyFromCharCode=c;var d={};d.string={string:s,array:function(e){return u(e,new Array(e.length))},arraybuffer:function(e){return d.string.uint8array(e).buffer},uint8array:function(e){return u(e,new Uint8Array(e.length))},nodebuffer:function(e){return u(e,o.allocBuffer(e.length))}},d.array={string:c,array:s,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(e)}},d.arraybuffer={string:function(e){return c(new Uint8Array(e))},array:function(e){return h(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:s,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}},d.uint8array={string:c,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:s,nodebuffer:function(e){return o.newBufferFrom(e)}},d.nodebuffer={string:c,array:function(e){return h(e,new Array(e.length))},arraybuffer:function(e){return d.nodebuffer.uint8array(e).buffer},uint8array:function(e){return h(e,new Uint8Array(e.length))},nodebuffer:s},t.transformTo=function(e,n){if(n||(n=""),!e)return n;t.checkSupport(e);var r=t.getTypeOf(n);return d[r][e](n)},t.resolve=function(e){for(var t=e.split("/"),n=[],r=0;r<t.length;r++){var i=t[r];"."===i||""===i&&0!==r&&r!==t.length-1||(".."===i?n.pop():n.push(i))}return n.join("/")},t.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":r.nodebuffer&&o.isBuffer(e)?"nodebuffer":r.uint8array&&e instanceof Uint8Array?"uint8array":r.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},t.checkSupport=function(e){if(!r[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},t.MAX_VALUE_16BITS=65535,t.MAX_VALUE_32BITS=-1,t.pretty=function(e){var t,n,r="";for(n=0;n<(e||"").length;n++)r+="\\x"+((t=e.charCodeAt(n))<16?"0":"")+t.toString(16).toUpperCase();return r},t.delay=function(e,t,n){setImmediate(function(){e.apply(n||null,t||[])})},t.inherits=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n},t.extend=function(){var e,t,n={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===n[t]&&(n[t]=arguments[e][t]);return n},t.prepareContent=function(e,n,o,s,l){return a.Promise.resolve(n).then(function(e){return r.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new a.Promise(function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){n(e.target.error)},r.readAsArrayBuffer(e)}):e}).then(function(n){var c,h=t.getTypeOf(n);return h?("arraybuffer"===h?n=t.transformTo("uint8array",n):"string"===h&&(l?n=i.decode(n):o&&!0!==s&&(n=u(c=n,r.uint8array?new Uint8Array(c.length):new Array(c.length)))),n):a.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},1814(e,t,n){"use strict";var r=n(549),i=n(7790),o=n(5741),a=n(5146),s=n(4004);function u(e){this.files=[],this.loadOptions=e}u.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e);var r=this.reader.readString(4)===t;return this.reader.setIndex(n),r},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=s.uint8array?"uint8array":"array",n=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(n)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,r=this.zip64EndOfCentralSize-44;0<r;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw!this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var r=t-n;if(r>0)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=u},5146(e,t,n){"use strict";var r=n(549),i=n(7790),o=n(9237),a=n(6988),s=n(1148),u=n(2008),l=n(4004);function c(e,t){this.options=e,this.loadOptions=t}c.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in u)if(Object.prototype.hasOwnProperty.call(u,t)&&u[t].magic===e)return u[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[t]={id:t,length:n,value:r};e.setIndex(i)},handleUTF8:function(){var e=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var n=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(n)}var r=this.findExtraFieldUnicodeComment();if(null!==r)this.fileCommentStr=r;else{var o=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=r(e.value);return 1!==t.readInt(1)||a(this.fileName)!==t.readInt(4)?null:s.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=r(e.value);return 1!==t.readInt(1)||a(this.fileComment)!==t.readInt(4)?null:s.utf8decode(t.readData(e.length-5))}return null}},e.exports=c},2355(e,t,n){"use strict";var r=n(5950),i=n(1996),o=n(1148),a=n(9237),s=n(859),u=function(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};u.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var i="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var a=!this._dataBinary;a&&!i&&(t=t.pipe(new o.Utf8EncodeWorker)),!a&&i&&(t=t.pipe(new o.Utf8DecodeWorker))}catch(e){(t=new s("error")).error(e)}return new r(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof a&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new o.Utf8EncodeWorker)),a.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof s?this._data:new i(this._data)}};for(var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<l.length;h++)u.prototype[l[h]]=c;e.exports=u},9024(e,t,n){"use strict";var r=n(9131);function i(){}var o={},a=["REJECTED"],s=["FULFILLED"],u=["PENDING"];function l(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&f(this,e)}function c(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function h(e,t,n){r(function(){var r;try{r=t(n)}catch(t){return o.reject(e,t)}r===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,r)})}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var n=!1;function r(t){n||(n=!0,o.reject(e,t))}function i(t){n||(n=!0,o.resolve(e,t))}var a=p(function(){t(i,r)});"error"===a.status&&r(a.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}e.exports=l,l.prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})},l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var n=new this.constructor(i);this.state!==u?h(n,this.state===s?e:t,this.outcome):this.queue.push(new c(n,e,t));return n},c.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){o.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=p(d,t);if("error"===n.status)return o.reject(e,n.value);var r=n.value;if(r)f(e,r);else{e.state=s,e.outcome=t;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=a,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},l.resolve=function(e){if(e instanceof this)return e;return o.resolve(new this(i),e)},l.reject=function(e){var t=new this(i);return o.reject(t,e)},l.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);var a=new Array(n),s=0,u=-1,l=new this(i);for(;++u<n;)c(e[u],u);return l;function c(e,i){t.resolve(e).then(function(e){a[i]=e,++s!==n||r||(r=!0,o.resolve(l,a))},function(e){r||(r=!0,o.reject(l,e))})}},l.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);var a=-1,s=new this(i);for(;++a<n;)u(e[a]);return s;function u(e){t.resolve(e).then(function(e){r||(r=!0,o.resolve(s,e))},function(e){r||(r=!0,o.reject(s,e))})}}},5287(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var s,u=[],l=!1,c=-1;function h(){l&&s&&(l=!1,s.length?u=s.concat(u):c=-1,u.length&&d())}function d(){if(!l){var e=a(h);l=!0;for(var t=u.length;t;){for(s=u,u=[];++c<t;)s&&s[c].run();c=-1,t=u.length}s=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new f(e,t)),1!==u.length||l||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},3745(e,t,n){e.exports=i;var r=n(7294).EventEmitter;function i(){r.call(this)}n(7302)(i,r),i.Readable=n(3572),i.Writable=n(6116),i.Duplex=n(5510),i.Transform=n(626),i.PassThrough=n(3008),i.finished=n(3663),i.pipeline=n(7741),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",l),e.on("error",l),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},3261(e){"use strict";var t={};function n(e,n,r){r||(r=Error);var i=function(e){var t,r;function i(t,r,i){return e.call(this,function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(t,r,i))||this}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=e,t[e]=i}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(e){return String(e)}),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(e,t,n){var i,o,a,s;if("string"==typeof t&&(o="not ",t.substr(!a||a<0?0:+a,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(r(t,"type"));else{var u=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(r(t,"type"))}return s+=". Received type ".concat(typeof n)},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},3663(e,t,n){"use strict";var r=n(3261).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(o||i);var a=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,u=function(){t.writable||c()},l=t._writableState&&t._writableState.finished,c=function(){s=!1,l=!0,a||o.call(t)},h=t._readableState&&t._readableState.endEmitted,d=function(){a=!1,h=!0,s||o.call(t)},f=function(e){o.call(t,e)},p=function(){var e;return a&&!h?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):s&&!l?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},v=function(){t.req.on("finish",c)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",c),t.on("abort",p),t.req?v():t.on("request",v)),t.on("end",d),t.on("finish",c),!1!==n.error&&t.on("error",f),t.on("close",p),function(){t.removeListener("complete",c),t.removeListener("abort",p),t.removeListener("request",v),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("end",d),t.removeListener("error",f),t.removeListener("close",p)}}},7741(e,t,n){"use strict";var r;var i=n(3261).F,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function l(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var c,h=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var d=t.map(function(e,i){var o=i<t.length-1;return function(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",function(){s=!0}),void 0===r&&(r=n(3663)),r(e,{readable:t,writable:i},function(e){if(e)return o(e);s=!0,o()});var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}(e,o,i>0,function(e){c||(c=e),e&&d.forEach(u),o||(d.forEach(u),h(c))})});return t.reduce(l)}},2649(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function a(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){return r(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||o(e,t)||a()}function u(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function l(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){u(o,r,i,a,s,"next",e)}function s(e){u(o,r,i,a,s,"throw",e)}a(void 0)})}}var c=n(715),h=n.n(c),d=n(8067),f=n.n(d),p=n(6298);function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(e){return function(e){if(Array.isArray(e))return i(e)}(e)||v(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var m=null,g=new Map,_=new Map,b=new Map;function w(e,t,n,r){e&&t&&(b.has(e)||b.set(e,[]),b.get(e).push({funcName:t,args:n,callback:r}))}function k(e,t){if(b.has(e)){var n=b.get(e);b.delete(e),t&&0!==n.length&&n.forEach(function(e){var n=e.funcName,r=e.args,i=e.callback;if("function"==typeof t[n])try{var o=t[n].apply(t,y(r||[]));i&&"function"==typeof i&&i(o)}catch(e){}})}}function E(e,t){g.set(e,t),k(e,t)}function S(e,t){e&&"string"==typeof e&&(_.set(e,t),k(e,t))}function A(e){_.has(e)&&_.delete(e)}function x(e){if("string"==typeof e)return t=e,_.has(t)?_.get(t):null;var t;if(g.has(e))return g.get(e);if(!m)return null;try{var n,r,i=null===(n=m.context)||void 0===n||null===(r=n.getModuleByName)||void 0===r?void 0:r.call(n,"UIManagerModule");if(i&&i.findViewById){var o=i.findViewById(e);if(o)return o}}catch(e){}return null}var C=1920,T=1080,I="EsApp";function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var L=n(6517);function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(0,L.A)(r.key),r)}}function R(e,t,n){return t&&P(e.prototype,t),n&&P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(e,t){var n=e&&e.length?e[e.length-1]:null;return n&&"function"==typeof n.resolve&&n.resolve(t),t}function D(e){var t=e&&e.length?e[e.length-1]:null;return t&&"function"==typeof t.resolve&&t.resolve(!0),Promise.resolve(!0)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function B(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return j(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function U(){try{var e,t=null===(e=n.g.__GLOBAL__)||void 0===e?void 0:e.jsModuleList;return t&&t.EventDispatcher?t.EventDispatcher:null}catch(e){return null}}function W(e){if("string"!=typeof e||0===e.length)return"";if(!e.startsWith("on"))return e;var t=e.slice(2);return t?"".concat(t.charAt(0).toLowerCase()).concat(t.slice(1)):e}var V=new Set(["onLoadPageData","onPageChanged"]),z=new Map;function H(e,t){var n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return V.has(t)?JSON.stringify({targetNodeId:e,eventName:t,pageIndex:null==n?void 0:n.pageIndex,itemCount:null==n?void 0:n.itemCount,useDiff:null==n?void 0:n.useDiff}):null}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});if(!n)return!1;var r=Date.now(),i=z.get(n);if(z.set(n,r),i&&r-i<=32)return!0;var o,a=B(z.entries());try{for(a.s();!(o=a.n()).done;){var u=s(o.value,2),l=u[0];r-u[1]>128&&z.delete(l)}}catch(e){a.e(e)}finally{a.f()}return!1}function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=U();if(!n)return!1;try{return n.receiveNativeEvent([e,t]),!0}catch(e){return!1}}function Y(){return G("hardwareBackPress",null)}function q(e){return G("DispatchKeyEvent",e)}function X(e){return q(F(F({},e),{},{action:0}))}function Z(e){return q(F(F({},e),{},{action:1}))}function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=U();if(!r||"function"!=typeof r.receiveNativeGesture)return!1;if("number"!=typeof e||!t)return!1;try{return r.receiveNativeGesture(F({id:e,name:t},n)),!0}catch(e){return!1}}function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=U();return!(!r||"number"!=typeof e||!t)&&("function"==typeof r.receiveNativeGesture?K(e,t,n):G(t,F({id:e,currentId:e},n)))}function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=U();if(!r)return!1;if("number"!=typeof e||!t)return!1;if(H(e,t,n))return!0;try{return"function"==typeof r.receiveUIComponentEvent?(r.receiveUIComponentEvent([e,t,n]),!0):"function"==typeof r.receiveComponentEvent&&(r.receiveComponentEvent(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{id:e,currentId:e,nativeName:t,originalName:W(t),params:n,eventPhase:2}}(e,t,n),{stopPropagation(){}}),!0)}catch(e){return!1}}var Q=0,ee=1,te=2,ne=3,re=4,ie=5,oe=6,ae=7,se=8,ue=9,le=10,ce=11,he=12,de=13,fe=26,pe=29,ve=new(function(){return R(function e(){O(this,e),this.instances=new Map,this.defaultPlayRate=1,this.defaultVolume=1},[{key:"getInstance",value:function(e){if(!this.instances.has(e)){var t=new Audio;t.defaultPlaybackRate=this.defaultPlayRate,t.volume=this.defaultVolume,this._bindAudioEvents(t,e),this.instances.set(e,t)}return this.instances.get(e)}},{key:"_bindAudioEvents",value:function(e,t){var n=!1,r=Q;e.addEventListener("play",function(){r!==ie&&(r=ie,G("onESAudioPlayerStatusChanged",{playerStatus:ie,playerState:ie}))}),e.addEventListener("playing",function(){r!==ie&&(r=ie,G("onESAudioPlayerStatusChanged",{playerStatus:ie,playerState:ie}))}),e.addEventListener("pause",function(){r=se,G("onESAudioPlayerStatusChanged",{playerStatus:se,playerState:se})}),e.addEventListener("ended",function(){r=he,n=!0,G("onESAudioPlayerStatusChanged",{playerStatus:he,playerState:he})}),e.addEventListener("error",function(e){var t,n;r=de,G("onESAudioPlayerError",{errorCode:(null===(t=e.target.error)||void 0===t?void 0:t.code)||-1,errorMessage:(null===(n=e.target.error)||void 0===n?void 0:n.message)||"Audio error"})}),e.addEventListener("loadstart",function(){n=!1,r=ee,G("onESAudioPlayerStatusChanged",{playerStatus:ee,playerState:ee})}),e.addEventListener("canplay",function(){n||(n=!0,r=te,G("onESAudioPlayerStatusChanged",{playerStatus:te,playerState:te}))}),e.addEventListener("waiting",function(){G("onESAudioPlayerStatusChanged",{playerStatus:ne,playerState:ne})}),e.addEventListener("canplaythrough",function(){G("onESAudioPlayerStatusChanged",{playerStatus:re,playerState:re})}),e.addEventListener("durationchange",function(){e.duration&&!isNaN(e.duration)&&G("onESAudioPlayerInfo",{what:1,extra:Math.floor(1e3*e.duration)})}),e.addEventListener("ratechange",function(){G("onESAudioPlayRateChanged",{playRate:e.playbackRate})}),e.addEventListener("seeking",function(){G("onESAudioPlayerStatusChanged",{playerStatus:oe,playerState:oe})}),e.addEventListener("seeked",function(){G("onESAudioPlayerStatusChanged",{playerStatus:ae,playerState:ae})}),e.addEventListener("volumechange",function(){G("onESAudioPlayerInfo",{what:2,extra:Math.floor(100*e.volume)})})}},{key:"removeInstance",value:function(e){var t=this.instances.get(e);t&&(t.pause(),t.src="",this.instances.delete(e))}},{key:"clearAll",value:function(){this.instances.forEach(function(e,t){e.pause(),e.src=""}),this.instances.clear()}}])}()),ye=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"init",value:(u=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(G("onESAudioPlayerStatusChanged",{playerStatus:fe,playerState:fe}),G("onESAudioPlayerStatusChanged",{playerStatus:pe,playerState:pe}),t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return u.apply(this,arguments)})},{key:"initMediaPlayer",value:function(){G("onESAudioPlayerStatusChanged",{playerStatus:fe,playerState:fe}),G("onESAudioPlayerStatusChanged",{playerStatus:pe,playerState:pe});for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"play",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i,o=ve.getInstance(e),a=n||[],s="",u=!0;if(a.length>0){var l=a[0];"string"==typeof l?s=l:Array.isArray(l)&&"string"==typeof l[0]?s=l[0]:"object"!=typeof l||null===l||Array.isArray(l)||(s=l.url||l.src||l.uri||"",u=!1!==l.autoplay)}if(s){var c=function(e){var t;if("string"!=typeof e||!e.startsWith("/"))return null;if(!/^\/(?:audio|assets)\/.+\.(mp3|wav|ogg|m4a|aac|webm)$/i.test(e))return null;if("undefined"==typeof window||null===(t=window.location)||void 0===t||!t.origin)return null;var n=window.__VIRTUAL_FS__;if(n&&n.has){var r=e.replace(/^\//,""),i=n.baseDir?n.baseDir+"/"+r:r;if(n.has(i)||n.has(e))return null}return"".concat(window.location.origin).concat(e)}(s="string"!=typeof(i=s)?i:i.startsWith("/data:")?i.slice(1):i.startsWith("file://")?i.slice(7)||"/":i.startsWith("//")?i.replace(/^\/+/,"/"):i);c&&(s=c),o.src=s,o.load()}return u&&o.src&&o.play().catch(function(e){G("onESAudioPlayerError",{errorCode:-1,errorMessage:e.message||"Play error"})}),N(a,null)}},{key:"start",value:function(e){var t=ve.getInstance(e);t.src&&t.play().catch(function(e){});for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return N(r,null)}},{key:"pause",value:function(e){ve.getInstance(e).pause();for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"resume",value:function(e){ve.getInstance(e).play().catch(function(e){}),G("onESAudioPlayerStatusChanged",{playerStatus:ue,playerState:ue});for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"seekTo",value:function(e,t){var n=ve.getInstance(e);n.duration&&t>=0&&(n.currentTime=Math.min(t/1e3,n.duration));for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return N(i,null)}},{key:"stop",value:function(e){var t=ve.getInstance(e);G("onESAudioPlayerStatusChanged",{playerStatus:le,playerState:le}),t.pause(),t.currentTime=0,G("onESAudioPlayerStatusChanged",{playerStatus:ce,playerState:ce});for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return N(r,null)}},{key:"setPlayRate",value:function(e,t){var n=ve.getInstance(e);n.playbackRate=Number(t)||1,G("onESAudioPlayRateChanged",{playRate:n.playbackRate});for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return N(i,null)}},{key:"setVolume",value:function(e,t){ve.getInstance(e).volume=Math.max(0,Math.min(1,Number(t)||0));for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return N(r,null)}},{key:"setLeftRightVolume",value:function(e,t,n){var r=ve.getInstance(e),i=(Number(t)+Number(n))/2;r.volume=Math.max(0,Math.min(1,i||0));for(var o=arguments.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];return N(a,null)}},{key:"reset",value:function(e){var t=ve.getInstance(e);t.pause(),t.currentTime=0,t.src="";for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return N(r,null)}},{key:"release",value:function(e){ve.removeInstance(e);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"isPlaying",value:(s=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=ve.getInstance(t),r=!n.paused&&n.currentTime>0,i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];return e.abrupt("return",N(o,r));case 1:case"end":return e.stop()}},e)})),function(e){return s.apply(this,arguments)})},{key:"isPaused",value:(a=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=ve.getInstance(t),r=n.paused,i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];return e.abrupt("return",N(o,r));case 1:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)})},{key:"getDuration",value:(o=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=ve.getInstance(t),r=n.duration&&!isNaN(n.duration)?1e3*n.duration:-1,i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];return e.abrupt("return",N(o,r));case 1:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)})},{key:"getCurrentPosition",value:(i=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=ve.getInstance(t),r=n.currentTime&&!isNaN(n.currentTime)?1e3*n.currentTime:0,i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];return e.abrupt("return",N(o,r));case 1:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)})},{key:"getBufferPercentage",value:(r=l(c.mark(function e(t){var n,r,i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=ve.getInstance(t),r=u.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=u[o];if(!(n.buffered.length>0&&n.duration>0)){e.next=1;break}return a=n.buffered.end(n.buffered.length-1),s=Math.round(a/n.duration*100),e.abrupt("return",N(i,s));case 1:return e.abrupt("return",N(i,0));case 2:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)})},{key:"getCurrentPlayRate",value:(n=l(c.mark(function e(t){var n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=ve.getInstance(t),r=a.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=a[o];return e.abrupt("return",N(i,n.playbackRate||1));case 1:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"getLeftVolume",value:(t=l(c.mark(function e(t){var n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=ve.getInstance(t),r=a.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=a[o];return e.abrupt("return",N(i,n.volume));case 1:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})},{key:"getRightVolume",value:(e=l(c.mark(function e(t){var n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=ve.getInstance(t),r=a.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=a[o];return e.abrupt("return",N(i,n.volume));case 1:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)})},{key:"destroy",value:function(){ve.clearAll()}}]);var e,t,n,r,i,o,a,s,u}(),me="files",ge=null;function _e(){return new Promise(function(e,t){if(ge)e(ge);else{var n=indexedDB.open("es_vfs_db",1);n.onerror=function(){t(n.error)},n.onsuccess=function(){ge=n.result,e(ge)},n.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains(me)||t.createObjectStore(me,{keyPath:"path"})}}})}function be(e){return we.apply(this,arguments)}function we(){return(we=l(c.mark(function e(t){var n;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,_e();case 1:return n=e.sent,e.abrupt("return",new Promise(function(e,r){var i=n.transaction([me],"readonly").objectStore(me).get(t);i.onsuccess=function(){i.result?e(i.result.data):e(null)},i.onerror=function(){r(i.error)}}));case 2:return e.prev=2,e.catch(0),e.abrupt("return",null);case 3:case"end":return e.stop()}},e,null,[[0,2]])}))).apply(this,arguments)}function ke(e){var t;if("string"!=typeof e||!e.startsWith("/"))return null;if(!/^\/(?:audio|assets)\/.+\.(mp3|wav|ogg|m4a|aac|webm)$/i.test(e))return null;if("undefined"==typeof window||null===(t=window.location)||void 0===t||!t.origin)return null;var n=window.__VIRTUAL_FS__;if(n&&n.has){var r=e.replace(/^\//,""),i=n.baseDir?n.baseDir+"/"+r:r;if(n.has(i)||n.has(e))return null}return"".concat(window.location.origin).concat(e)}function Ee(e){return"string"!=typeof e?e:e.startsWith("/data:")?e.slice(1):e.startsWith("file://")?e.slice(7)||"/":e.startsWith("//")?e.replace(/^\/+/,"/"):e}function Se(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=function(){try{var e,t=null===(e=n.g.__GLOBAL__)||void 0===e?void 0:e.jsModuleList;return t&&t.EventDispatcher?t.EventDispatcher:null}catch(e){return null}}();if(!r)return!1;try{return r.receiveNativeEvent([e,t]),!0}catch(e){return!1}}var Ae=function(){return R(function e(){O(this,e),this.sounds=new Map,this.streams=new Map,this.nextSoundID=1,this.nextStreamID=1,this.maxStreams=10,this.config={usage:1,contentType:2,maxStreams:10,streamType:3,enableCache:!0}},[{key:"init",value:function(e,t,n,r,i){this.config={usage:e||1,contentType:t||2,maxStreams:n||10,streamType:r||3,enableCache:void 0===i||i},this.maxStreams=this.config.maxStreams}},{key:"load",value:(t=l(c.mark(function e(t){var n,r,i,o=this;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.nextSoundID++,r=t,t&&t.startsWith("/")&&t.includes("data:")&&(r=t.substring(t.indexOf("data:"))),(i=new Audio).preload="auto",e.abrupt("return",new Promise(function(e,t){var a=function(){i.removeEventListener("canplaythrough",a),i.removeEventListener("error",s),o.sounds.set(n,{url:r,audio:i}),e(n),setTimeout(function(){Se("onESSoundPoolLoadComplete",{status:0,sampleId:n})},0)},s=function(e){var r,o;i.removeEventListener("canplaythrough",a),i.removeEventListener("error",s),Se("onESSoundPoolLoadError",{soundID:n,errorCode:(null===(r=e.target)||void 0===r||null===(r=r.error)||void 0===r?void 0:r.code)||-1,errorMessage:(null===(o=e.target)||void 0===o||null===(o=o.error)||void 0===o?void 0:o.message)||"Load error"}),t(e)};i.addEventListener("canplaythrough",a),i.addEventListener("error",s),i.src=r,i.load()}));case 1:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"unload",value:function(e){var t=this.sounds.get(e);t&&(t.audio.pause(),t.audio.src="",this.sounds.delete(e))}},{key:"play",value:(e=l(c.mark(function e(t,n,r,i,o,a){var s,u,l,h,d,f=this;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=this.sounds.get(t)){e.next=1;break}return e.abrupt("return",Promise.reject(new Error("Sound not found")));case 1:return u=this.nextStreamID++,(l=new Audio).src=s.url,l.preload="auto",h=((n||1)+(r||1))/2,l.volume=Math.max(0,Math.min(1,h)),l.playbackRate=a||1,l.loop=-1===o||!0===o,this.streams.set(u,{soundID:t,audio:l}),l.addEventListener("ended",function(){f.streams.delete(u),Se("onESSoundPoolPlayComplete",{streamID:u,soundID:t})}),l.addEventListener("error",function(e){var n,r;f.streams.delete(u),Se("onESSoundPoolPlayError",{streamID:u,soundID:t,errorCode:(null===(n=e.target)||void 0===n||null===(n=n.error)||void 0===n?void 0:n.code)||-1,errorMessage:(null===(r=e.target)||void 0===r||null===(r=r.error)||void 0===r?void 0:r.message)||"Play error"})}),e.prev=2,e.next=3,l.play();case 3:return e.abrupt("return",u);case 4:throw e.prev=4,d=e.catch(2),this.streams.delete(u),d;case 5:case"end":return e.stop()}},e,this,[[2,4]])})),function(t,n,r,i,o,a){return e.apply(this,arguments)})},{key:"pause",value:function(e){var t=this.streams.get(e);t&&t.audio.pause()}},{key:"autoPause",value:function(){this.streams.forEach(function(e){e.audio.pause()})}},{key:"resume",value:function(e){var t=this.streams.get(e);t&&t.audio.paused&&t.audio.play().catch(function(e){})}},{key:"autoResume",value:function(){this.streams.forEach(function(e){e.audio.paused&&e.audio.play().catch(function(e){})})}},{key:"stop",value:function(e){var t=this.streams.get(e);t&&(t.audio.pause(),t.audio.currentTime=0,this.streams.delete(e))}},{key:"setVolume",value:function(e,t,n){var r=this.streams.get(e);if(r){var i=((t||1)+(n||1))/2;r.audio.volume=Math.max(0,Math.min(1,i))}}},{key:"setRate",value:function(e,t){var n=this.streams.get(e);n&&(n.audio.playbackRate=t||1)}},{key:"setPriority",value:function(e,t){}},{key:"setLoop",value:function(e,t){var n=this.streams.get(e);n&&(n.audio.loop=-1===t||!0===t)}},{key:"release",value:function(){this.streams.forEach(function(e){e.audio.pause(),e.audio.src=""}),this.streams.clear(),this.sounds.forEach(function(e){e.audio.pause(),e.audio.src=""}),this.sounds.clear(),this.nextSoundID=1,this.nextStreamID=1}}]);var e,t}(),xe=new Ae,Ce=function(){return R(function e(t){O(this,e),this.context=t},[{key:"init",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t&&t.length?t[t.length-1]:null;return r&&"function"==typeof r.resolve&&r.resolve(!0),Promise.resolve(!0)}},{key:"initSoundPool",value:function(e,t,n,r,i){xe.init(e,t,n,r,i);for(var o=arguments.length,a=new Array(o>5?o-5:0),s=5;s<o;s++)a[s-5]=arguments[s];return N(a,!0)}},{key:"load",value:(i=l(c.mark(function e(t){var r,i,o,a,s,u,l,h,d,f,p,v,y,m,g,_,b,w,k,E,S,A=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(r=A.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=A[o];if(e.prev=1,!(a=Ee(t))||!a.startsWith("data:")){e.next=3;break}return e.next=2,xe.load(a);case 2:return s=e.sent,e.abrupt("return",N(i,s));case 3:if(!a||!a.startsWith("http://")&&!a.startsWith("https://")){e.next=5;break}return e.next=4,xe.load(a);case 4:return u=e.sent,e.abrupt("return",N(i,u));case 5:if(!n.g.__WEB_FILE_URL_MAP__||!n.g.__WEB_FILE_URL_MAP__.has(a)){e.next=7;break}return l=n.g.__WEB_FILE_URL_MAP__.get(a),e.next=6,xe.load(l);case 6:return h=e.sent,e.abrupt("return",N(i,h));case 7:if(!(d=ke(a))){e.next=9;break}return e.next=8,xe.load(d);case 8:return f=e.sent,e.abrupt("return",N(i,f));case 9:if(!(p=window.__VIRTUAL_FS__)||!p.get){e.next=11;break}if(v=a.replace(/^\//,""),y=p.baseDir?p.baseDir+"/"+v:v,(m=p.get(y))||(m=p.get(a)),m||(m=p.get(v)),!m){e.next=11;break}return g=new Blob([m],{type:"audio/mpeg"}),_=URL.createObjectURL(g),e.next=10,xe.load(_);case 10:return b=e.sent,e.abrupt("return",N(i,b));case 11:return e.next=12,be(a);case 12:if(w=e.sent){e.next=13;break}return e.abrupt("return",N(i,-1));case 13:return k=new Blob([w]),E=URL.createObjectURL(k),e.next=14,xe.load(E);case 14:return S=e.sent,e.abrupt("return",N(i,S));case 15:return e.prev=15,e.catch(1),e.abrupt("return",N(i,-1));case 16:case"end":return e.stop()}},e,null,[[1,15]])})),function(e){return i.apply(this,arguments)})},{key:"unload",value:function(e){xe.unload(e);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"play",value:(r=l(c.mark(function e(t,n,r,i,o,a){var s,u,l,h,d=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(s=d.length,u=new Array(s>6?s-6:0),l=6;l<s;l++)u[l-6]=d[l];return e.prev=1,e.next=2,xe.play(t,n,r,i,o,a);case 2:return h=e.sent,e.abrupt("return",N(u,h));case 3:return e.prev=3,e.catch(1),e.abrupt("return",N(u,-1));case 4:case"end":return e.stop()}},e,null,[[1,3]])})),function(e,t,n,i,o,a){return r.apply(this,arguments)})},{key:"pause",value:function(e){xe.pause(e);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"autoPause",value:function(){xe.autoPause();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"resume",value:function(e){xe.resume(e);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"autoResume",value:function(){xe.autoResume();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"stop",value:function(e){xe.stop(e);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"setVolume",value:function(e,t,n){xe.setVolume(e,t,n);for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];return N(i,null)}},{key:"setRate",value:function(e,t){xe.setRate(e,t);for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return N(r,null)}},{key:"setPriority",value:function(e,t){xe.setPriority(e,t);for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return N(r,null)}},{key:"setLoop",value:function(e,t){xe.setLoop(e,t);for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return N(r,null)}},{key:"release",value:function(){xe.release();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"playLocalFile",value:(t=l(c.mark(function e(t){var r,i,o,a,s,u,l,h,d,f,p,v,y,m,g,_,b,w,k,E,S,A,x,C,T,I,O,L=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(r=L.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=L[o];if(e.prev=1,!(a=Ee(t))||!a.startsWith("data:")){e.next=4;break}return e.next=2,xe.load(a);case 2:return s=e.sent,e.next=3,xe.play(s,1,1,0,0,1);case 3:return u=e.sent,e.abrupt("return",N(i,u));case 4:if(!a||!a.startsWith("http://")&&!a.startsWith("https://")){e.next=7;break}return e.next=5,xe.load(a);case 5:return l=e.sent,e.next=6,xe.play(l,1,1,0,0,1);case 6:return h=e.sent,e.abrupt("return",N(i,h));case 7:if(!n.g.__WEB_FILE_URL_MAP__||!n.g.__WEB_FILE_URL_MAP__.has(a)){e.next=10;break}return d=n.g.__WEB_FILE_URL_MAP__.get(a),e.next=8,xe.load(d);case 8:return f=e.sent,e.next=9,xe.play(f,1,1,0,0,1);case 9:return p=e.sent,e.abrupt("return",N(i,p));case 10:if(!(v=ke(a))){e.next=13;break}return e.next=11,xe.load(v);case 11:return y=e.sent,e.next=12,xe.play(y,1,1,0,0,1);case 12:return m=e.sent,e.abrupt("return",N(i,m));case 13:if(!(g=window.__VIRTUAL_FS__)||!g.get){e.next=16;break}if(_=a.replace(/^\//,""),b=g.baseDir?g.baseDir+"/"+_:_,(w=g.get(b))||(w=g.get(a)),w||(w=g.get(_)),!w){e.next=16;break}return k=new Blob([w],{type:"audio/mpeg"}),E=URL.createObjectURL(k),e.next=14,xe.load(E);case 14:return S=e.sent,e.next=15,xe.play(S,1,1,0,0,1);case 15:return A=e.sent,e.abrupt("return",N(i,A));case 16:return e.next=17,be(a);case 17:if(x=e.sent){e.next=18;break}return e.abrupt("return",N(i,-1));case 18:return C=new Blob([x]),T=URL.createObjectURL(C),e.next=19,xe.load(T);case 19:return I=e.sent,e.next=20,xe.play(I,1,1,0,0,1);case 20:return O=e.sent,e.abrupt("return",N(i,O));case 21:return e.prev=21,e.catch(1),e.abrupt("return",N(i,-1));case 22:case"end":return e.stop()}},e,null,[[1,21]])})),function(e){return t.apply(this,arguments)})},{key:"playNetworkFile",value:(e=l(c.mark(function e(t){var n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=t,t&&"object"==typeof t&&(n=t.fileUrl||t.url||t.fileName),r=a.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=a[o];if(n){e.next=1;break}return e.abrupt("return",N(i,-1));case 1:return e.abrupt("return",this.playLocalFile.apply(this,[n].concat(i)));case 2:case"end":return e.stop()}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"destroy",value:function(){xe.release()}}]);var e,t,r,i}(),Te="files",Ie=null;function Oe(){return window.__VIRTUAL_FS__||null}function Le(e){if(n.g.__WEB_FILE_URL_MAP__&&n.g.__WEB_FILE_URL_MAP__.has(e))return n.g.__WEB_FILE_URL_MAP__.get(e)||null;var t=function(e){var t;if("string"!=typeof e||!e.startsWith("/"))return null;if(!/^\/(?:audio|assets)\/.+\.(mp3|wav|ogg|m4a|aac|webm)$/i.test(e))return null;if("undefined"==typeof window||null===(t=window.location)||void 0===t||!t.origin)return null;var n=window.__VIRTUAL_FS__;if(n&&n.has){var r=e.replace(/^\//,""),i=n.baseDir?n.baseDir+"/"+r:r;if(n.has(i)||n.has(e))return null}return"".concat(window.location.origin).concat(e)}(e);return t?(n.g.__WEB_FILE_URL_MAP__||(n.g.__WEB_FILE_URL_MAP__=new Map),n.g.__WEB_FILE_URL_MAP__.set(e,t),t):null}function Pe(e){return null==e?0:"string"==typeof e?e.length:"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.length?e.length:0}function Re(){return new Promise(function(e,t){if(Ie)e(Ie);else{var n=indexedDB.open("es_vfs_db",1);n.onerror=function(){t(n.error)},n.onsuccess=function(){Ie=n.result,e(Ie)},n.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains(Te)||t.createObjectStore(Te,{keyPath:"path"})}}})}function Ne(e){return De.apply(this,arguments)}function De(){return(De=l(c.mark(function e(t){var n;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Re();case 1:return n=e.sent,e.next=2,new Promise(function(e,r){var i=n.transaction([Te],"readonly").objectStore(Te).get(t);i.onsuccess=function(){e(i.result||null)},i.onerror=function(){r(i.error)}});case 2:return e.abrupt("return",e.sent);case 3:return e.prev=3,e.catch(0),e.abrupt("return",null);case 4:case"end":return e.stop()}},e,null,[[0,3]])}))).apply(this,arguments)}function Me(e){return Fe.apply(this,arguments)}function Fe(){return(Fe=l(c.mark(function e(t){var n,r,i,o;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=Le(t))){e.next=1;break}return e.abrupt("return",{exists:!0,length:n.length,source:"map"});case 1:if(!(r=Oe())||!r.has(t)){e.next=2;break}return i=r.get(t),e.abrupt("return",{exists:!0,length:Pe(i),source:"virtual-fs"});case 2:return e.next=3,Ne(t);case 3:if(!(o=e.sent)){e.next=4;break}return e.abrupt("return",{exists:!0,length:Pe(o.data),source:"indexeddb"});case 4:return e.abrupt("return",{exists:!1,length:0,source:null});case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Be(e){return"string"==typeof e&&e.startsWith("data:")}var je=new Map,Ue=function(){return R(function e(t){O(this,e),(0,p.A)(this,"name","AndroidFileModule"),this.context=t},[{key:"init",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t&&t.length?t[t.length-1]:null;return r&&"function"==typeof r.resolve&&r.resolve(!0),Promise.resolve(!0)}},{key:"newESFile",value:(j=l(c.mark(function e(t){var n,r,i,o,a,s,u,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=String((null==t?void 0:t.pathname)||(null==t?void 0:t.id)||""),r=Be(n),i={id:n,path:n,exists:r,isDirectory:!1,isFile:r,length:r?n.length:0,lastModified:Date.now()},r){e.next=2;break}return e.next=1,Me(n);case 1:o=e.sent,i.exists=o.exists,i.isFile=o.exists,i.length=o.length;case 2:for(je.set(n,i),a=l.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=l[u];return e.abrupt("return",N(s,n));case 3:case"end":return e.stop()}},e)})),function(e){return j.apply(this,arguments)})},{key:"newFile",value:(B=l(c.mark(function e(t){var n,r,i,o,a,s,u,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n="",n=String("object"==typeof t&&null!==t?t.pathname||t.path||"":t||""),r=Be(n),i={id:n,path:n,exists:r,isDirectory:!1,isFile:r,length:r?n.length:0,lastModified:Date.now()},r){e.next=2;break}return e.next=1,Me(n);case 1:o=e.sent,i.exists=o.exists,i.isFile=o.exists,i.length=o.length,o.source;case 2:for(je.set(n,i),a=l.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=l[u];return e.abrupt("return",N(s,n));case 3:case"end":return e.stop()}},e)})),function(e){return B.apply(this,arguments)})},{key:"newAbsolutePathFile",value:(F=l(c.mark(function e(t){var n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=String(t||""),r=a.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=a[o];return e.abrupt("return",this.newFile.apply(this,[n].concat(i)));case 1:case"end":return e.stop()}},e,this)})),function(e){return F.apply(this,arguments)})},{key:"getPath",value:(M=l(c.mark(function e(t){var n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n="","object"==typeof t&&null!==t?n=String(t.id||t.path||""):null!=t&&(n=String(t)),r=a.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=a[o];return e.abrupt("return",N(i,n));case 1:case"end":return e.stop()}},e)})),function(e){return M.apply(this,arguments)})},{key:"isAbsolute",value:(D=l(c.mark(function e(t){var n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n="","object"==typeof t&&null!==t?n=String(t.id||""):null!=t&&(n=String(t)),r=a.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=a[o];if(!Be(n)){e.next=1;break}return e.abrupt("return",N(i,!0));case 1:return e.abrupt("return",N(i,n.startsWith("/")));case 2:case"end":return e.stop()}},e)})),function(e){return D.apply(this,arguments)})},{key:"isDirectory",value:(P=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",r=je.get(n),i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];return e.abrupt("return",N(o,(null==r?void 0:r.isDirectory)||!1));case 1:case"end":return e.stop()}},e)})),function(e){return P.apply(this,arguments)})},{key:"canRead",value:(L=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=(null==t?void 0:t.id)||"",e.next=1,Me(n);case 1:for(r=e.sent,i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];return e.abrupt("return",N(o,r.exists));case 2:case"end":return e.stop()}},e)})),function(e){return L.apply(this,arguments)})},{key:"canWrite",value:(I=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(null==t||t.id,n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,!0));case 1:case"end":return e.stop()}},e)})),function(e){return I.apply(this,arguments)})},{key:"exists",value:(T=l(c.mark(function e(t){var n,r,i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n="","object"==typeof t&&null!==t?n=String(t.id||t.path||""):null!=t&&(n=String(t)),n=n.replace(/^\/+/g,"/"),r=u.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=u[o];if(!Be(n)){e.next=1;break}return e.abrupt("return",N(i,!0));case 1:if(!Le(n)){e.next=2;break}return e.abrupt("return",N(i,!0));case 2:if(!(a=je.get(n))){e.next=3;break}return e.abrupt("return",N(i,a.exists));case 3:return e.next=4,Me(n);case 4:return(s=e.sent).exists&&je.set(n,{id:n,path:n,exists:!0,isDirectory:!1,isFile:!0,length:s.length,lastModified:Date.now()}),e.abrupt("return",N(i,s.exists));case 5:case"end":return e.stop()}},e)})),function(e){return T.apply(this,arguments)})},{key:"length",value:(C=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=(null==t?void 0:t.id)||"",e.next=1,Me(n);case 1:for(r=e.sent,i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];return e.abrupt("return",N(o,r.length));case 2:case"end":return e.stop()}},e)})),function(e){return C.apply(this,arguments)})},{key:"createNewFile",value:(x=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",r=Oe(),i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];if(!r){e.next=1;break}return r.set(n,new Uint8Array(0)),e.abrupt("return",N(o,!0));case 1:return e.abrupt("return",N(o,!1));case 2:case"end":return e.stop()}},e)})),function(e){return x.apply(this,arguments)})},{key:"deleteOnExit",value:(A=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(null==t||t.id,n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,!0));case 1:case"end":return e.stop()}},e)})),function(e){return A.apply(this,arguments)})},{key:"delete",value:(S=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",r=Oe(),i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];if(!r||!r.has(n)){e.next=1;break}return r.files.delete(n),r.files.delete("/"+n),je.delete(n),e.abrupt("return",N(o,!0));case 1:return e.abrupt("return",N(o,!1));case 2:case"end":return e.stop()}},e)})),function(e){return S.apply(this,arguments)})},{key:"list",value:(E=l(c.mark(function e(t){var n,r,i,o,a,s,u,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",r=Oe(),i=l.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=l[a];if(!r){e.next=1;break}return s=r.list(),u=s.filter(function(e){return e.startsWith(n)}),e.abrupt("return",N(o,u));case 1:return e.abrupt("return",N(o,[]));case 2:case"end":return e.stop()}},e)})),function(e){return E.apply(this,arguments)})},{key:"mkdir",value:(k=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(null==t||t.id,n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,!0));case 1:case"end":return e.stop()}},e)})),function(e){return k.apply(this,arguments)})},{key:"mkdirs",value:(w=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(null==t||t.id,n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,!0));case 1:case"end":return e.stop()}},e)})),function(e){return w.apply(this,arguments)})},{key:"renameTo",value:(b=l(c.mark(function e(t){var n,r,i,o,a,s,u,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",r=(null==t?void 0:t.destPath)||"",i=Oe(),o=l.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=l[s];if(!i){e.next=1;break}if(!(u=i.get(n))){e.next=1;break}return i.set(r,u),i.files.delete(n),i.files.delete("/"+n),e.abrupt("return",N(a,!0));case 1:return e.abrupt("return",N(a,!1));case 2:case"end":return e.stop()}},e)})),function(e){return b.apply(this,arguments)})},{key:"setLastModified",value:(_=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(null==t||t.id,n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,!0));case 1:case"end":return e.stop()}},e)})),function(e){return _.apply(this,arguments)})},{key:"setReadOnly",value:(g=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(null==t||t.id,n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,!0));case 1:case"end":return e.stop()}},e)})),function(e){return g.apply(this,arguments)})},{key:"setWritable",value:(m=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(null==t||t.id,n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,!0));case 1:case"end":return e.stop()}},e)})),function(e){return m.apply(this,arguments)})},{key:"lastModified",value:(y=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(null==t||t.id,n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,Date.now()));case 1:case"end":return e.stop()}},e)})),function(e){return y.apply(this,arguments)})},{key:"getName",value:(v=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",r=n.split("/"),i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];return e.abrupt("return",N(o,r[r.length-1]||""));case 1:case"end":return e.stop()}},e)})),function(e){return v.apply(this,arguments)})},{key:"getParent",value:(f=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",r=n.lastIndexOf("/"),i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];if(!(r>0)){e.next=1;break}return e.abrupt("return",N(o,n.substring(0,r)));case 1:return e.abrupt("return",N(o,""));case 2:case"end":return e.stop()}},e)})),function(e){return f.apply(this,arguments)})},{key:"getParentFile",value:(d=l(c.mark(function e(t){var n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return null==t||t.id,e.next=1,this.getParent(t);case 1:if(!(n=e.sent)){e.next=2;break}return e.abrupt("return",this.newESFile({id:n}));case 2:for(r=a.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=a[o];return e.abrupt("return",N(i,null));case 3:case"end":return e.stop()}},e,this)})),function(e){return d.apply(this,arguments)})},{key:"getAbsolutePath",value:(h=l(c.mark(function e(t){var n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",r=a.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=a[o];return e.abrupt("return",N(i,n));case 1:case"end":return e.stop()}},e)})),function(e){return h.apply(this,arguments)})},{key:"getAbsoluteFile",value:(u=l(c.mark(function e(t){var n;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=(null==t?void 0:t.id)||"",e.abrupt("return",this.newESFile({id:n}));case 1:case"end":return e.stop()}},e,this)})),function(e){return u.apply(this,arguments)})},{key:"getCanonicalPath",value:(s=l(c.mark(function e(t){var n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",r=a.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=a[o];return e.abrupt("return",N(i,n));case 1:case"end":return e.stop()}},e)})),function(e){return s.apply(this,arguments)})},{key:"getCanonicalFile",value:(a=l(c.mark(function e(t){var n;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=(null==t?void 0:t.id)||"",e.abrupt("return",this.newESFile({id:n}));case 1:case"end":return e.stop()}},e,this)})),function(e){return a.apply(this,arguments)})},{key:"toURL",value:(o=l(c.mark(function e(t){var n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",r=a.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=a[o];return e.abrupt("return",N(i,"file://"+n));case 1:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)})},{key:"toURI",value:(i=l(c.mark(function e(t){var n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",r=a.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=a[o];return e.abrupt("return",N(i,"file://"+n));case 1:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)})},{key:"getFreeSpace",value:(r=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(null==t||t.id,n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,1073741824));case 1:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)})},{key:"getTotalSpace",value:(n=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(null==t||t.id,n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,10737418240));case 1:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"getUsableSpace",value:(t=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(null==t||t.id,n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,5368709120));case 1:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})},{key:"compareTo",value:(e=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",r=(null==t?void 0:t.otherPath)||"",i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];return e.abrupt("return",N(o,n.localeCompare(r)));case 1:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)})},{key:"destroy",value:function(){je.clear()}}]);var e,t,n,r,i,o,a,s,u,h,d,f,v,y,m,g,_,b,w,k,E,S,A,x,C,T,I,L,P,D,M,F,B,j}(),We=null,Ve=!1;function ze(){var e;G("NetSpeed",{speedKbps:e=Math.floor(5e3*Math.random())+100,speedMbps:(e/1024).toFixed(2)})}var He=new(function(){return R(function e(t){O(this,e),this.context=t,this.name="ESNetworkSpeedModule"},[{key:"showNetSpeed",value:function(){Ve||(Ve=!0,ze(),We=setInterval(function(){ze()},500))}},{key:"stopNetSpeed",value:function(){Ve&&(We&&(clearInterval(We),We=null),Ve=!1)}},{key:"isShowing",value:function(){return Ve}},{key:"destroy",value:function(){this.stopNetSpeed()}},{key:"init",value:function(){return Promise.resolve(!0)}}])}());function Ge(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ye(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ye(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}n.g.__WEB_FILE_URL_MAP__||(n.g.__WEB_FILE_URL_MAP__=new Map);var Ze=function(){return R(function e(t){O(this,e),this.context=t,this._downloads=new Map,this._listeners=new Map,this._downloadCacheDir="/vfs",this._progressThrottleInterval=500},[{key:"initDownload",value:function(e,t){e&&(this._downloadCacheDir=e),t&&(this._progressThrottleInterval=t);for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return N(r,!0)}},{key:"initDownloadPath",value:function(e,t){this._downloadCacheDir=e||"/vfs",this._progressThrottleInterval=t||500;for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return N(r,!0)}},{key:"download",value:(t=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];if(!(this._listeners.size>0)){e.next=1;break}return this._notifyListener("onDownloadInit",t),e.abrupt("return",N(r,!0));case 1:return e.abrupt("return",this.start.apply(this,[t].concat(r)));case 2:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"start",value:(e=l(c.mark(function e(t){var r,i,o,a,s,u,l,h,d=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(r=null==t?void 0:t.id,i=null==t?void 0:t.fileUrl,o=d.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=d[s];if(null!=r&&i){e.next=1;break}return e.abrupt("return",N(a,!1));case 1:return u=(null==t?void 0:t.fileName)||this._extractFileName(i),l=this._downloadCacheDir+"/"+u,h=Xe({id:r,url:i,fileName:u,filePath:l,fileLength:0,downloadLength:0,status:"pending"},t),this._downloads.set(r,h),n.g.__WEB_FILE_URL_MAP__.set(l,i),this._notifyListener("onDownloadStart",h),h.status="completed",this._notifyListener("onDownloadSuccess",h),e.abrupt("return",N(a,!0));case 2:case"end":return e.stop()}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"stop",value:function(e){var t=null==e?void 0:e.id,n=this._downloads.get(t);n&&(n.status="stopped",this._notifyListener("onDownloadStop",n));for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return N(i,!0)}},{key:"cancel",value:function(e){var t=null==e?void 0:e.id,n=this._downloads.get(t);n&&(n.status="cancelled",this._notifyListener("onDownloadCancel",n),this._downloads.delete(t));for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return N(i,!0)}},{key:"registerDownloadListener",value:function(e,t){this._listeners.set(e,t)}},{key:"unregisterDownloadListener",value:function(e){this._listeners.delete(e)}},{key:"addListener",value:function(e,t){return this._listeners.set(e,t),!0}},{key:"removeListener",value:function(e){if(this._listeners.has(e))return this._listeners.delete(e),!0;var t,n=Ge(this._listeners.entries());try{for(n.s();!(t=n.n()).done;){var r=s(t.value,2),i=r[0];if(r[1]===e)return this._listeners.delete(i),!0}}catch(e){n.e(e)}finally{n.f()}return!1}},{key:"_notifyListener",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];this._listeners.forEach(function(n){if("function"==typeof n[e])try{n[e].apply(n,[t].concat(r))}catch(e){}})}},{key:"_extractFileName",value:function(e){try{var t=new URL(e).pathname.split("/");return t[t.length-1]||"download"}catch(e){return"download"}}},{key:"init",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return D(t)}},{key:"destroy",value:function(){this._downloads.clear(),this._listeners.clear()}}]);var e,t}(),Ke=n(1824);function $e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Je(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Qe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qe(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var et=new Map;function tt(e){var t,n=new Set,r=Je(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,o=Array.isArray(i)?i[0]:i;if(o&&o.pId){var a=et.get(o.pId);if(a){var s=o.props&&o.props.style;if(s&&"absolute"===s.position){s.boxShadow=a,n.add(o.id),et.delete(o.pId);var u,l=Je(e);try{for(l.s();!(u=l.n()).done;){var c=u.value,h=Array.isArray(c)?c[0]:c;h&&h.id===o.pId&&h.props&&h.props.style&&delete h.props.style.boxShadow}}catch(e){l.e(e)}finally{l.f()}}}}}}catch(e){r.e(e)}finally{r.f()}var d,f=new Map,p=Je(e);try{for(p.s();!(d=p.n()).done;){var v=d.value,y=Array.isArray(v)?v[0]:v;y&&y.pId&&(f.has(y.pId)||f.set(y.pId,[]),f.get(y.pId).push(y))}}catch(e){p.e(e)}finally{p.f()}var m,g=Je(e);try{for(g.s();!(m=g.n()).done;){var _=m.value,b=Array.isArray(_)?_[0]:_;if(b&&b.props&&b.props.style&&!n.has(b.id)){var w=b.props.style;if(w.boxShadow){var k=f.get(b.id);if(k&&0!==k.length){var E=k.find(function(e){var t=e.props&&e.props.style;return t&&"absolute"===t.position});if(E){var S=E.props&&E.props.style||{};E.props.style=S,S.boxShadow=w.boxShadow,n.add(E.id),delete w.boxShadow}else et.set(b.id,w.boxShadow)}else et.set(b.id,w.boxShadow)}}}}catch(e){g.e(e)}finally{g.f()}}var nt=new ye(null),rt=new Ce(null),it=new Ue(null),ot=new Ze(null);n.g.__WEB_MODULES__||(n.g.__WEB_MODULES__={}),n.g.__WEB_MODULES__.ESIJKAudioPlayerModule=nt,n.g.__WEB_MODULES__.ESSoundPoolAudioPlayerModule=rt,n.g.__WEB_MODULES__.ESSoundPoolPlayerModule=rt,n.g.__WEB_MODULES__.AndroidFileModule=it,n.g.__WEB_MODULES__.ESNetworkSpeedModule=He,n.g.__WEB_MODULES__.ESDownloadModule=ot;var at=null,st=!1,ut=!1;function lt(){var e,t=null===(e=n.g.Hippy)||void 0===e?void 0:e.bridge;if(t&&t.callNativeWithPromise){var r=t.callNativeWithPromise.bind(t),i=new Set(["RuntimeDeviceModule","AndroidDeviceModule","AndroidNetworkModule","ESSoundPoolAudioPlayerModule","ESSoundPoolPlayerModule","AndroidFileModule","AndroidPermissionModule"]),o=new Set(["ESIJKAudioPlayerModule"]);t.callNativeWithPromise=function(e,t){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];if(o.has(e)){var l,c=null===(l=n.g.__WEB_MODULES__)||void 0===l?void 0:l[e];if(c&&"function"==typeof c[t]){var h=c[t].apply(c,[-1].concat(s));return h instanceof Promise?h:Promise.resolve(h)}return r.apply(void 0,[e,t].concat(s))}if(i.has(e)){var d,f,p=(null===(d=m)||void 0===d||null===(d=d.modules)||void 0===d?void 0:d[e])||(null===(f=n.g.__WEB_MODULES__)||void 0===f?void 0:f[e]);if(p&&"function"==typeof p[t]){var v=p[t].apply(p,s);return v instanceof Promise?v:Promise.resolve(v)}}return r.apply(void 0,[e,t].concat(s))}}}function ct(){void 0!==n.g.Hippy&&n.g.Hippy.device?(n.g.Hippy.device.window={width:C,height:T,scale:1,fontScale:1,statusBarHeight:0,navigatorBarHeight:0},n.g.Hippy.device.screen={width:C,height:T,scale:1,fontScale:1,statusBarHeight:0,navigatorBarHeight:0},n.g.Hippy.device.pixelRatio=1):setTimeout(ct,10)}function ht(){var e=document.getElementById("app");e?(e.style.width=C+"px",e.style.height=T+"px",new MutationObserver(function(){e.style.width===C+"px"&&e.style.height===T+"px"||(e.style.width=C+"px",e.style.height=T+"px")}).observe(e,{attributes:!0,attributeFilter:["style"]})):setTimeout(ht,10)}var dt=["focusColor","focusBackgroundColor","focusTextColor","focusBorderColor","focusBorderWidth","focusBorderRadius","focusOpacity","focusScale","selectColor","selectBackgroundColor"],ft=["focusBorderWidth","focusBorderRadius","focusOpacity","focusScale"];function pt(e){if("number"!=typeof e)return e;var t=(e>>24&255)/255,n=e>>8&255,r=255&e;return"rgba(".concat(e>>16&255,", ").concat(n,", ").concat(r,", ").concat(t,")")}var vt={0:"to bottom",1:"to bottom left",2:"to left",3:"to top left",4:"to top",5:"to top right",6:"to right",7:"to bottom right"};function yt(e){var t,n;if(!e||!e.colors||0===e.colors.length)return null;var r=e.colors.map(function(e){return function(e){if("string"!=typeof e)return e;if(/^#[0-9A-Fa-f]{8}$/.test(e)){var t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9),o=parseInt(t,16)/255,a=parseInt(n,16),s=parseInt(r,16),u=parseInt(i,16);return"rgba(".concat(a,", ").concat(s,", ").concat(u,", ").concat(o,")")}if(/^#[0-9A-Fa-f]{4}$/.test(e)){var l=e.substring(1,2)+e.substring(1,2),c=e.substring(2,3)+e.substring(2,3),h=e.substring(3,4)+e.substring(3,4),d=e.substring(4,5)+e.substring(4,5),f=parseInt(l,16)/255,p=parseInt(c,16),v=parseInt(h,16),y=parseInt(d,16);return"rgba(".concat(p,", ").concat(v,", ").concat(y,", ").concat(f,")")}return e}(e)}),i=null!==(t=e.orientation)&&void 0!==t?t:6,o=null!==(n=e.type)&&void 0!==n?n:0,a=e.cornerRadius,s=e.cornerRadii4,u=e.cornerRadii8,l="";if(1===o){var c=e.gradientRadius||"farthest-corner";l="radial-gradient(circle ".concat(c,", ").concat(r.join(", "),")")}else{l="linear-gradient(".concat(vt[i]||"to right",", ").concat(r.join(", "),")")}var h="";return u&&8===u.length?h="".concat(u[0],"px ").concat(u[2],"px ").concat(u[4],"px ").concat(u[6],"px / ").concat(u[1],"px ").concat(u[3],"px ").concat(u[5],"px ").concat(u[7],"px"):s&&4===s.length?h="".concat(s[0],"px ").concat(s[1],"px ").concat(s[2],"px ").concat(s[3],"px"):null!=a&&(h="".concat(a,"px")),{background:l,borderRadius:h}}function mt(e,t){if(!t||"object"!=typeof t)return t;if(!e||!e.setAttribute)return t;var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$e(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},t);["gap","rowGap","columnGap"].forEach(function(e){delete n[e]});var r=t.gradientBackground;if(r){var i=yt(r);i&&(n.background=i.background,i.borderRadius&&(n.borderRadius=i.borderRadius)),delete n.gradientBackground}return dt.forEach(function(r){var i,o=r.replace(/([A-Z])/g,"-$1").toLowerCase(),a=t[r]||t[o];void 0!==a&&(i=ft.includes(r)?a:"number"==typeof a?pt(a):a,e.setAttribute("data-"+o,String(i)),delete n[r],delete n[o])}),n}function gt(){var e=["focus-color","focus-background-color","focus-background","focus-text-color","focus-border-color","focus-border-width","focus-border-radius","focus-opacity","focus-scale","select-color","select-background-color"],t=function(n){n&&Array.from(n).forEach(function(n){if(n){var r,i=n.type;i===CSSRule.STYLE_RULE?(r=n.style)&&e.forEach(function(e){var t=r.getPropertyValue(e);if(t){var n="--"+e;r.getPropertyValue(n)||r.setProperty(n,t.trim())}}):i!==CSSRule.MEDIA_RULE&&i!==CSSRule.SUPPORTS_RULE&&i!==CSSRule.DOCUMENT_RULE||t(n.cssRules)}})};Array.from(document.styleSheets||[]).forEach(function(e){try{t(e.cssRules)}catch(e){}})}var _t=null;function bt(e){var t,n,r=null===(t=e.context)||void 0===t||null===(n=t.getModuleByName)||void 0===n?void 0:n.call(t,"UIManagerModule");if(r&&!r._addEventListenerPatched){r.addEventListener.bind(r);r.addEventListener=function(e,t,n){var i=r.findViewById(e);i&&i.addEventListener&&i.addEventListener(t,n)};var i=r.defaultUpdateViewProps.bind(r);return r.defaultUpdateViewProps=function(t,n){if(t.dom){null!=n&&n.style&&("ESPageRootView"!==t._originalComponentName&&"ESPageRouterView"!==t._originalComponentName||n.style.backgroundColor&&"transparent"!==n.style.backgroundColor||n.isDialogMode||(n.style.backgroundColor="#000000"),n.style=(0,Ke.Zd)(mt(t.dom,n.style)));var o=function(e){return e?"string"==typeof e?e:Array.isArray(e)?e.map(o).filter(Boolean).join(" "):"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}).join(" "):String(e):""},a=function(e,t){var n=o(t);n&&n.split(/\s+/).filter(Boolean).forEach(function(t){return e.classList.add(t)})},s=function(e,t){e&&e.setAttribute&&t&&dt.forEach(function(n){var r,i=n.replace(/([A-Z])/g,"-$1").toLowerCase(),o=null!==(r=t[n])&&void 0!==r?r:t[i];if(null!=o){var a=ft.includes(n)?o:"number"==typeof o?pt(o):o;e.setAttribute("data-"+i,String(a))}})};a(t.dom,(null==n?void 0:n.className)||(null==n?void 0:n.class)),s(t.dom,n);var u=r.findViewById(t.pId);if(u&&u.dom){var l;if(i(t,n),null!=u&&u.exitChildrenStackContext&&!t.updatedZIndex)void 0!==(null===(l=t.props)||void 0===l||null===(l=l.style)||void 0===l?void 0:l.zIndex)||(t.props||(t.props={}),t.props.style||(t.props.style={}),t.props.style.zIndex=0,t.updatedZIndex=!0,t.dom&&(t.dom.style.zIndex="0"));if(a(t.dom,(null==n?void 0:n.className)||(null==n?void 0:n.class)),s(t.dom,n),null!=n&&n.gradientBackground){var c=yt(n.gradientBackground);c&&(t.dom.style.background=c.background,c.borderRadius&&(t.dom.style.borderRadius=c.borderRadius))}}else{Object.keys(n);if(n.style){var h=e.context.getModuleByName("HippyWeb");null!=h&&h.setElementStyle?h.setElementStyle(t.dom,n.style):Object.assign(t.dom.style,(0,Ke.Zd)(n.style))}}}},r._addEventListenerPatched=!0,!0}return!1}function wt(e){var t,n=null==e?void 0:e.key,r=null!==(t=null==e?void 0:e.keyCode)&&void 0!==t?t:null==e?void 0:e.which;switch(n){case"ArrowUp":r=19;break;case"ArrowDown":r=20;break;case"ArrowLeft":r=21;break;case"ArrowRight":r=22;break;case"Enter":r=23;break;case"Escape":r=4}return{keyCode:r,key:n,code:null==e?void 0:e.code,repeat:null==e?void 0:e.repeat,altKey:null==e?void 0:e.altKey,ctrlKey:null==e?void 0:e.ctrlKey,shiftKey:null==e?void 0:e.shiftKey,metaKey:null==e?void 0:e.metaKey,nativeEvent:e}}function kt(e){switch(e){case 17:return"left";case 33:return"up";case 66:return"right";case 130:return"down";case 2:return"forward";case 1:return"backward";default:return null}}function Et(e,t){if(!e||!t)return 1/0;if(e===t)return 0;for(var n=new Set,r=e.parentElement,i=0;r&&r!==document.body;)n.add(r),r._tempDepth=++i,r=r.parentElement;for(r=t.parentElement;r&&r!==document.body;){if(n.has(r)){for(var o=r._tempDepth||0,a=e.parentElement;a&&a!==document.body;)delete a._tempDepth,a=a.parentElement;return o}r=r.parentElement}for(var s=e.parentElement;s&&s!==document.body;)delete s._tempDepth,s=s.parentElement;return 1/0}function St(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return At(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?At(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function At(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ct(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Tt=function(){return R(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O(this,e),this.options=Ct({useDistanceBasedNavigation:!0,crossDistanceWeight:.5,directionalAngleThreshold:60,blockedDirectionalAngleThreshold:40,directionalAngleOffset:20},t)},[{key:"setOptions",value:function(e){this.options=Ct(Ct({},this.options),e)}},{key:"findBestCandidate",value:function(e,t,n){return this.options.useDistanceBasedNavigation?this._findBestCandidateByDistance(e,t,n):this._findBestCandidateSequential(e,t,n)}},{key:"_findBestCandidateByDistance",value:function(e,t,n){var r=this,i=e.getBoundingClientRect(),o={x:i.left+i.width/2,y:i.top+i.height/2},a=null,s=1/0,u=(this.options.crossDistanceWeight,function(e,t){for(var n=e.parentElement;n&&n!==document.body;){var r=n.getAttribute("blockFocusDirections")||n.getAttribute("blockfocusdirections");if(r){var i=[];try{i=JSON.parse(r.replace(/'/g,'"')),Array.isArray(i)||(i=[])}catch(e){i=r.split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return e})}if(i.some(function(e){return e.toLowerCase()===t.toLowerCase()}))return!0}n=n.parentElement}return!1}(e,t)),l=new Set;return n.forEach(function(c){if(c!==e&&c&&document.body.contains(c)){var h=window.getComputedStyle(c);if("none"!==h.display&&"hidden"!==h.visibility){var d=r._findParentList(c);if(!d||d===e||l.has(d)){if(!d||!l.has(d)){var f=c.getBoundingClientRect();if(0!==f.width||0!==f.height){var p=f.left+f.width/2,v=f.top+f.height/2,y=p-o.x,m=v-o.y,g=!1,_=0,b=0;switch(t){case"up":if(m>=0)return;g=!0,_=Math.max(0,i.top-f.bottom),b=Math.abs(y);break;case"down":if(m<=0)return;g=!0,_=Math.max(0,f.top-i.bottom),b=Math.abs(y);break;case"left":if(y>=0)return;g=!0,_=Math.max(0,i.left-f.right),b=Math.abs(m);break;case"right":if(y<=0)return;g=!0,_=Math.max(0,f.left-i.right),b=Math.abs(m)}var w=c.getAttribute("selected"),k=c.hasAttribute("selected")&&"false"!==w,E=null!==c.querySelector('[selected="true"]'),S=k||E;if(g&&!S&&r._exceedsDirectionalAngle(t,y,m,u)){u?r.options.blockedDirectionalAngleThreshold:r.options.directionalAngleThreshold;b+=5e3}if(g){for(var A=!1,x=e.parentElement;x&&x!==document.body;){var C=x.getAttribute("blockFocusDirections")||x.getAttribute("blockfocusdirections");if(C){var T=[];try{T=JSON.parse(C.replace(/'/g,'"')),Array.isArray(T)||(T=[])}catch(e){T=C.split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return e})}if(T.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&!x.contains(c)){A=!0;break}}x=x.parentElement}if(A)return;var I=!1,O=0;if("left"===t||"right"===t){var L=Math.max(0,Math.min(f.bottom,i.bottom)-Math.max(f.top,i.top));I=L>0,O=L/Math.min(f.height,i.height),b*=I?1-.9*O:50}else if("up"===t||"down"===t){var P=Math.max(0,Math.min(f.right,i.right)-Math.max(f.left,i.left));I=P>0,O=P/Math.min(f.width,i.width),b*=I?1-.9*O:50}var R=Et(e,c),N=_+b+(I?0:1e4)+(R<=1?-500:R<=2?-200:R<=3?-50:0)+(S?-1e3:0);N<s&&(s=N,a=c)}}}}else{l.add(d);var D=r._evaluateListCandidate(d,e,i,o,t,u,n);D&&D.distance<s&&(s=D.distance,a=D.targetElement,!0)}}}}),a}},{key:"_findBestCandidateSequential",value:function(e,t,n){var r=n.indexOf(e);if(-1===r)return null;if("down"===t||"right"===t)for(var i=r+1;i<n.length;i++){var o=n[i];if(o&&document.body.contains(o))return o}else if("up"===t||"left"===t)for(var a=r-1;a>=0;a--){var s=n[a];if(s&&document.body.contains(s))return s}return null}},{key:"_exceedsDirectionalAngle",value:function(e,t,n,r){var i=Math.abs(t),o=Math.abs(n),a=r?this.options.blockedDirectionalAngleThreshold:this.options.directionalAngleThreshold,s=Math.tan(a*Math.PI/180),u=this.options.directionalAngleOffset;return"left"===e||"right"===e?o>i*s+u:i>o*s+u}},{key:"isDirectionBlocked",value:function(e,t){for(var n,r=this,i=e,o=function(){var n=i.getAttribute("blockFocusDirections")||i.getAttribute("blockfocusdirections");if(n){var o=t;if("number"==typeof t&&(!(o=r._directionNumberToName(t))||"forward"===o||"backward"===o))return{v:!1};var a=[];try{var s=n.replace(/'/g,'"');a=JSON.parse(s),Array.isArray(a)||(a=[])}catch(e){a=n.split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return e})}var u=String(o).toLowerCase();if(a.some(function(e){return e.toLowerCase()===u})&&i===e)return{v:!0}}i=i.parentElement};i&&i!==document.body;)if(n=o())return n.v;return!1}},{key:"getNextFocusByName",value:function(e,t,n,r){if(!e||!e.getAttribute)return null;var i=e.getAttribute("nextFocusName")||e.getAttribute("nextfocusname");if(!i)for(var o=e.parentElement;o&&o!==document.body&&!(i=o.getAttribute("nextFocusName")||o.getAttribute("nextfocusname"));)o=o.parentElement;if(!i)return null;var a=null;try{if("string"==typeof i){var s=i.replace(/'/g,'"');a=JSON.parse(s)}else"object"==typeof i&&(a=i)}catch(e){return null}if(!a||"object"!=typeof a)return null;var u=a[t];if(!u)return null;var l=this._findElementByName(u,n);return l&&(n.includes(l)||r(),n.includes(l))?l:null}},{key:"_findElementByName",value:function(e,t){if(!e)return null;var n=document.querySelectorAll('[name="'.concat(e,'"]'));if(n.length>0){var r,i=St(n);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=window.getComputedStyle(o),s="none"!==a.display&&"hidden"!==a.visibility&&parseFloat(a.opacity)>0,u=o.getBoundingClientRect(),l=u.width>0&&u.height>0;if(s&&l){var c=this._findFocusableChild(o,t);if(c)return c;if(t.includes(o))return o}}}catch(e){i.e(e)}finally{i.f()}}return null}},{key:"_findFocusableChild",value:function(e,t){if(!e||!e.querySelectorAll)return null;var n=e.querySelector('[autofocus="true"], [autofocus]');if(n&&t.includes(n))return n;var r=e.querySelector('[selected="true"], [selected=""], .selected, .focused');if(r){var i,o=St(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(r===a||r.contains(a))return a}}catch(e){o.e(e)}finally{o.f()}}var s,u=St(t);try{for(u.s();!(s=u.n()).done;){var l=s.value;if(e.contains(l))return l}}catch(e){u.e(e)}finally{u.f()}return null}},{key:"_isListContainer",value:function(e){if(!e||!e.getAttribute)return!1;var t=e.getAttribute("data-component-name");return"FastListView"===t||"ListView"===t||"QtFlexView"===t||"RecyclerView"===t||e.classList.contains("fast-list-item-container")||e.classList.contains("flex-view-item-container")}},{key:"_getListTargetElement",value:function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(!e)return null;var o=e.querySelector('[selected="true"]');if(o){var a=this._findFocusableInElement(o,n);if(a)return a}if(i){var s=this._findNearestElementInList(e,i,t,n);if(s)return s}var u=e.querySelector(".fast-list-item-container")||e.querySelector(".flex-view-item-container")||e,l=null==u||null===(r=u.children)||void 0===r?void 0:r[0];if(l){var c=this._findFocusableInElement(l,n);if(c)return c}var h,d=St(n);try{for(d.s();!(h=d.n()).done;){var f=h.value;if(e.contains(f)&&f!==e)return f}}catch(e){d.e(e)}finally{d.f()}return null}},{key:"_findNearestElementInList",value:function(e,t,n,r){var i,o=t.getBoundingClientRect(),a=o.left+o.width/2,s=o.top+o.height/2,u=null,l=1/0,c=St(r);try{for(c.s();!(i=c.n()).done;){var h=i.value;if(h!==t&&e.contains(h)){var d=h.getBoundingClientRect();if(0!==d.width||0!==d.height){var f={x:d.left+d.width/2,y:d.top+d.height/2},p=0;switch(n){case"up":if(f.y>=s)continue;p=Math.abs(f.x-a)+(s-f.y);break;case"down":if(f.y<=s)continue;p=Math.abs(f.x-a)+(f.y-s);break;case"left":if(f.x>=a)continue;p=Math.abs(f.y-s)+(a-f.x);break;case"right":if(f.x<=a)continue;p=Math.abs(f.y-s)+(f.x-a);break;default:p=Math.abs(f.x-a)+Math.abs(f.y-s)}p<l&&(l=p,u=h)}}}}catch(e){c.e(e)}finally{c.f()}return u}},{key:"_findFocusableInElement",value:function(e,t){if(!e)return null;if(t.includes(e))return e;var n,r=St(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(e.contains(i))return i}}catch(e){r.e(e)}finally{r.f()}return null}},{key:"_findParentList",value:function(e){for(var t=e;t&&t!==document.body;){if(this._isListContainer(t))return t;t=t.parentElement}return null}},{key:"_evaluateListCandidate",value:function(e,t,n,r,i,o,a){var s=e.getBoundingClientRect();if(0===s.width&&0===s.height)return null;var u=s.left+s.width/2,l=s.top+s.height/2,c=u-r.x,h=l-r.y,d=!1,f=0,p=0;switch(i){case"up":if(s.top>=n.bottom)return null;d=!0,f=Math.max(0,n.top-s.bottom),p=Math.abs(c);break;case"down":if(s.bottom<=n.top)return null;d=!0,f=Math.max(0,s.top-n.bottom),p=Math.abs(c);break;case"left":if(s.left>=n.right)return null;d=!0,f=Math.max(0,n.left-s.right),p=Math.abs(h);break;case"right":if(s.right<=n.left)return null;d=!0,f=Math.max(0,s.left-n.right),p=Math.abs(h)}var v=e.getAttribute("selected"),y=e.hasAttribute("selected")&&"false"!==v,m=null!==e.querySelector('[selected="true"]'),g=y||m,_=!1,b=0;if("left"===i||"right"===i){var w=Math.max(0,Math.min(s.bottom,n.bottom)-Math.max(s.top,n.top));_=w>0,b=w/Math.min(s.height,n.height)}else if("up"===i||"down"===i){var k=Math.max(0,Math.min(s.right,n.right)-Math.max(s.left,n.left));_=k>0,b=k/Math.min(s.width,n.width)}if(d&&!g&&!_&&this._exceedsDirectionalAngle(i,c,h,o)){o?this.options.blockedDirectionalAngleThreshold:this.options.directionalAngleThreshold;return null}p*=_?1-.9*b:50;var E=Et(t,e),S=f+p+(_?0:1e4)+(E<=1?-500:E<=2?-200:E<=3?-50:0)+(g?-1e3:0),A=this._getListTargetElement(e,i,a,t);return A?A===t?null:{distance:S,targetElement:A}:null}},{key:"_directionNumberToName",value:function(e){switch(e){case 17:return"left";case 33:return"up";case 66:return"right";case 130:return"down";case 2:return"forward";case 1:return"backward";default:return null}}}])}(),It=n(814);function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ot(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ot(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Pt=function(){return R(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O(this,e),this.defaultFocusStyle={border:{enabled:!0,color:"#FFFFFF",width:3,innerColor:"#000000",innerWidth:2,cornerRadius:0},scale:1,transition:"transform 0.15s ease-out, outline 0.15s ease-out"},this.focusedElementOriginalStyles=new Map,this.showOnStateManager=null,t.defaultFocusStyle&&(this.defaultFocusStyle=Lt(Lt({},this.defaultFocusStyle),t.defaultFocusStyle))},[{key:"setShowOnStateManager",value:function(e){this.showOnStateManager=e}},{key:"updateConfig",value:function(e){e&&(e.borderColorEnabled&&(this.defaultFocusStyle.border.color=e.borderColor),e.borderWidthEnabled&&(this.defaultFocusStyle.border.width=e.borderWidth),e.cornerEnabled&&(this.defaultFocusStyle.border.cornerRadius=e.cornerRadius),e.borderInsetEnabled&&(this.defaultFocusStyle.border.inset=e.borderInset),this.defaultFocusStyle.border.innerEnabled=e.innerBorderEnabled,e.focusScale&&(this.defaultFocusStyle.scale=e.focusScale))}},{key:"getFocusProps",value:function(e){var t,n,r,i,o,a,s,u,l=window.getComputedStyle(e),c=l.borderRadius,h=this.defaultFocusStyle.border.cornerRadius||8;if(c&&"none"!==c&&"0px"!==c){var d=c.match(/^(\d+(?:\.\d+)?)(px)?/);d&&(h=parseFloat(d[1]))}var f={enableBorder:!1,borderColor:this.defaultFocusStyle.border.color,borderWidth:this.defaultFocusStyle.border.width,borderRadius:h,innerBorderColor:this.defaultFocusStyle.border.innerColor,innerBorderWidth:this.defaultFocusStyle.border.innerWidth,innerBorderEnabled:!1!==this.defaultFocusStyle.border.innerEnabled,scale:this.defaultFocusStyle.scale,focusBackgroundColor:null,focusColor:null},p=e.getAttribute("enablefocusborder");"true"!==p&&"1"!==p&&""!==p||(f.enableBorder=!0);var v=e.getAttribute("focusscale")||e.getAttribute("data-focus-scale")||(null===(t=l.getPropertyValue("--focus-scale"))||void 0===t?void 0:t.trim());if(v){var y=parseFloat(v);!isNaN(y)&&y>0&&(f.scale=y)}var m=e.getAttribute("focusborderradius")||e.getAttribute("data-focus-border-radius")||(null===(n=l.getPropertyValue("--focus-border-radius"))||void 0===n?void 0:n.trim());if(m){var g=parseFloat(m);!isNaN(g)&&g>=0&&(f.borderRadius=g)}var _=e.getAttribute("focusborderwidth")||e.getAttribute("data-focus-border-width")||(null===(r=l.getPropertyValue("--focus-border-width"))||void 0===r?void 0:r.trim());if(_){var b=parseFloat(_);!isNaN(b)&&b>=0&&(f.borderWidth=b)}var w=e.getAttribute("focusbordercolor")||e.getAttribute("data-focus-border-color")||(null===(i=l.getPropertyValue("--focus-border-color"))||void 0===i?void 0:i.trim());w&&(f.borderColor=w);var k=e.getAttribute("data-focus-border");k&&(f.enableBorder="true"===k);var E=e.getAttribute("data-focus-background-color")||(null===(o=l.getPropertyValue("--focus-background-color"))||void 0===o?void 0:o.trim())||(null===(a=l.getPropertyValue("--focus-background"))||void 0===a?void 0:a.trim());E&&(f.focusBackgroundColor=E);var S=e.getAttribute("data-focus-color")||(null===(s=l.getPropertyValue("--focus-color"))||void 0===s?void 0:s.trim());S&&(f.focusColor=S);var A=e.getAttribute("data-select-color")||(null===(u=l.getPropertyValue("--select-color"))||void 0===u?void 0:u.trim());return A&&(f.selectColor=A),f}},{key:"applyFocusStyle",value:function(e){var t=this.getFocusProps(e),n={transform:e.style.transform,outline:e.style.outline,outlineOffset:e.style.outlineOffset,boxShadow:e.style.boxShadow,transition:e.style.transition,zIndex:e.style.zIndex,borderRadius:e.style.borderRadius,backgroundColor:e.style.backgroundColor,color:e.style.color,display:e.style.display,visibility:e.style.visibility};if(this.focusedElementOriginalStyles.set(e,n),e.style.transition=this.defaultFocusStyle.transition,1!==t.scale&&(e.style.transform="scale(".concat(t.scale,")"),e.style.zIndex="10"),t.enableBorder){e.style.borderRadius=t.borderRadius+"px";var r=t.borderWidth,i=t.innerBorderWidth,o=t.innerBorderEnabled?"inset 0 0 0 ".concat(i,"px ").concat(t.innerBorderColor):"";e.style.outline="".concat(r,"px solid ").concat(t.borderColor),e.style.outlineOffset="0px",e.style.boxShadow="0 0 0 ".concat(r,"px ").concat(t.borderColor,", ").concat(o,", 0 4px 12px rgba(0,0,0,0.3)")}t.focusBackgroundColor&&(e.style.backgroundColor=t.focusBackgroundColor),t.focusColor&&(e.style.color=t.focusColor),this._applyDuplicateParentStateStyles(e,!0),this.showOnStateManager&&this.showOnStateManager.updateShowOnStateVisibility(e,"focused"),requestAnimationFrame(function(){return(0,It.u6)(e)})}},{key:"removeFocusStyle",value:function(e){var t=this.focusedElementOriginalStyles.get(e);if(t?(e.style.transform=t.transform,e.style.outline=t.outline,e.style.outlineOffset=t.outlineOffset,e.style.boxShadow=t.boxShadow,e.style.transition=t.transition,e.style.zIndex=t.zIndex,e.style.borderRadius=t.borderRadius,void 0!==t.backgroundColor&&(e.style.backgroundColor=t.backgroundColor),void 0!==t.color&&(e.style.color=t.color)):(e.style.transform="",e.style.outline="",e.style.outlineOffset="",e.style.boxShadow="",e.style.zIndex=""),e.classList.remove("focused"),this._removeDuplicateParentStateStyles(e),e.hasAttribute("selected")&&"false"!==e.getAttribute("selected")){var n,r=window.getComputedStyle(e),i=e.getAttribute("selectBackgroundColor")||e.getAttribute("select-background-color")||e.getAttribute("data-select-background-color")||(null===(n=r.getPropertyValue("--select-background-color"))||void 0===n?void 0:n.trim());i&&(e.style.backgroundColor=i)}this.showOnStateManager&&this.showOnStateManager.updateShowOnStateVisibility(e,"normal"),requestAnimationFrame(function(){return(0,It.u6)(e)})}},{key:"_applyDuplicateParentStateStyles",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.querySelectorAll("[duplicateparentstate]").forEach(function(r){var i=r.getAttribute("duplicateparentstate");if("false"!==i&&"0"!==i){var o=window.getComputedStyle(r),a=function(e){var t;return r.getAttribute("data-"+e)||(null===(t=o.getPropertyValue("--"+e))||void 0===t?void 0:t.trim())},s=a("focus-color")||a("focus-text-color"),u=a("focus-background-color"),l=a("focus-border-radius"),c=a("focus-scale"),h=a("focus-border-width"),d=a("focus-border-color"),f=a("select-color"),p=a("select-background-color"),v=e.hasAttribute("select")&&"false"!==e.getAttribute("select")||e.hasAttribute("selected")&&"false"!==e.getAttribute("selected");if(v);var y=n?s:v&&f?f:null,m=n?u:v&&p?p:null,g=r.getAttribute("enablefocusborder"),_="true"===g||"1"===g||""===g;if(n&&!t.focusedElementOriginalStyles.has(r)){var b=window.getComputedStyle(r),w={backgroundColor:r.style.backgroundColor||b.backgroundColor,color:r.style.color||b.color,borderRadius:r.style.borderRadius,transform:r.style.transform,zIndex:r.style.zIndex,transition:r.style.transition,outline:r.style.outline,outlineOffset:r.style.outlineOffset};t.focusedElementOriginalStyles.set(r,w)}if(!n&&v&&!t.focusedElementOriginalStyles.has(r)){var k=window.getComputedStyle(r),E={backgroundColor:r.style.backgroundColor||k.backgroundColor,color:r.style.color||k.color};t.focusedElementOriginalStyles.set(r,E)}if(r.style.transition=t.defaultFocusStyle.transition,m&&(r.style.backgroundColor=m),y)r.style.color=y;else if(n){var S=t.focusedElementOriginalStyles.get(r);S&&void 0!==S.color&&(r.style.color=S.color)}if(l){var A=parseFloat(l);!isNaN(A)&&A>=0&&(r.style.borderRadius=A+"px")}if(c){var x=parseFloat(c);!isNaN(x)&&x>0&&1!==x&&(r.style.transform="scale(".concat(x,")"),r.style.zIndex="10")}if(_&&n){var C=h?parseFloat(h):3,T=d||"#FFFFFF",I=l?parseFloat(l):8;r.style.outline="".concat(C,"px solid ").concat(T),r.style.outlineOffset="0px",r.style.borderRadius=I+"px"}if(r.classList.add("focused-child"),t.showOnStateManager){var O=t.showOnStateManager.shouldShowOnState(r,"focused");if(null!==O){var L=r.style.display;if(t.focusedElementOriginalStyles.has(r))t.focusedElementOriginalStyles.get(r).display=L;else t.focusedElementOriginalStyles.set(r,{display:L});r.style.display=O?L:"none"}}}})}},{key:"_removeDuplicateParentStateStyles",value:function(e){var t=this;e.querySelectorAll("[duplicateparentstate]").forEach(function(n){var r=n.getAttribute("duplicateparentstate");if("false"!==r&&"0"!==r){var i=t.focusedElementOriginalStyles.get(n);if(i&&(n.style.backgroundColor=i.backgroundColor,n.style.color=i.color,n.style.borderRadius=i.borderRadius,n.style.transform=i.transform,n.style.zIndex=i.zIndex,n.style.transition=i.transition,n.style.outline=i.outline,n.style.outlineOffset=i.outlineOffset),n.classList.remove("focused-child"),t.showOnStateManager){var o,a=t.showOnStateManager.shouldShowOnState(n,"normal");if(null!==a)if(a)n.style.display=null!==(o=null==i?void 0:i.display)&&void 0!==o?o:"";else n.style.display="none"}if(e.hasAttribute("select")&&"false"!==e.getAttribute("select")||e.hasAttribute("selected")&&"false"!==e.getAttribute("selected")){var s,u,l=window.getComputedStyle(n),c=n.getAttribute("selectColor")||n.getAttribute("select-color")||n.getAttribute("data-select-color")||(null===(s=l.getPropertyValue("--select-color"))||void 0===s?void 0:s.trim()),h=n.getAttribute("selectBackgroundColor")||n.getAttribute("select-background-color")||n.getAttribute("data-select-background-color")||(null===(u=l.getPropertyValue("--select-background-color"))||void 0===u?void 0:u.trim());h&&(n.style.backgroundColor=h),c&&(n.style.color=c)}}})}},{key:"clearOriginalStyles",value:function(){this.focusedElementOriginalStyles.clear()}},{key:"deleteOriginalStyles",value:function(e){this.focusedElementOriginalStyles.delete(e)}}])}(),Rt=function(){return R(function e(){O(this,e),this.focusedElement=null},[{key:"setFocusedElement",value:function(e){this.focusedElement=e}},{key:"parseShowOnState",value:function(e){if(!e)return null;try{var t=JSON.parse(e);if(Array.isArray(t))return t.map(function(e){return String(e).toLowerCase()})}catch(e){}return[String(e).toLowerCase()]}},{key:"getShowOnStateAttr",value:function(e){return e&&e.getAttribute?e.getAttribute("showOnState")||e.getAttribute("showonstate"):null}},{key:"getShowOnStateElements",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e||!e.querySelectorAll)return[];var r=Array.from(e.querySelectorAll("[showOnState], [showonstate]"));return n&&null!==(t=e.matches)&&void 0!==t&&t.call(e,"[showOnState], [showonstate]")&&r.unshift(e),r}},{key:"resolveShowOnStateState",value:function(e){return e?this.focusedElement&&(e===this.focusedElement||this.focusedElement.contains(e))||e.closest(".focused")?"focused":e.closest('[selected="true"], [selected=""]')?"selected":"normal":"normal"}},{key:"shouldShowOnState",value:function(e,t){var n=this.getShowOnStateAttr(e);if(!n)return null;var r=this.parseShowOnState(n);return r&&0!==r.length?r.includes(t.toLowerCase()):null}},{key:"_saveDisplay",value:function(e){if(!e.hasAttribute("data-saved-display")){var t=e.style.display;t&&"none"!==t&&e.setAttribute("data-saved-display",t)}}},{key:"_restoreDisplay",value:function(e){var t=e.getAttribute("data-saved-display");t?(e.style.display=t,e.removeAttribute("data-saved-display")):"none"===e.style.display&&(e.style.display="")}},{key:"updateShowOnStateVisibility",value:function(e,t){var n=this,r=this.shouldShowOnState(e,t);null!==r&&(r?(this._restoreDisplay(e),e.style.visibility=""):(this._saveDisplay(e),e.style.display="none")),this.getShowOnStateElements(e).forEach(function(e){var r=n.shouldShowOnState(e,t);null!==r&&(r?(n._restoreDisplay(e),e.style.visibility=""):(n._saveDisplay(e),e.style.display="none"))})}},{key:"initShowOnStateVisibility",value:function(){var e=this;document.querySelectorAll("[showOnState], [showonstate]").forEach(function(t){var n=e.resolveShowOnStateState(t);e._updateShowOnStateVisibilityForElement(t,n)})}},{key:"_updateShowOnStateVisibilityForElement",value:function(e,t){var n=this.shouldShowOnState(e,t);null!==n&&(n?(this._restoreDisplay(e),e.style.visibility=""):(this._saveDisplay(e),e.style.display="none"))}},{key:"initShowOnStateForElement",value:function(e){var t=this;e&&this.getShowOnStateElements(e,!0).forEach(function(e){var n=t.resolveShowOnStateState(e);t._updateShowOnStateVisibilityForElement(e,n)})}}])}(),Nt=function(){return R(function e(){O(this,e),this.focusHistory=[],this.currentRouteName=null,this.focusedElement=null},[{key:"setFocusedElement",value:function(e){this.focusedElement=e}},{key:"isGoingBack",value:function(e,t){return this.focusHistory.findIndex(function(e){return e.routeName===t.name})>=0}},{key:"saveFocusState",value:function(e,t,n){if(t){var r=n(t),i={routeName:e,focusSelector:r},o=this.focusHistory.findIndex(function(t){return t.routeName===e});o>=0?this.focusHistory[o]=i:this.focusHistory.push(i)}}},{key:"restoreFocusState",value:function(e,t,n,r){var i=this.focusHistory.find(function(t){return t.routeName===e});t(),n(),i&&i.focusSelector&&setTimeout(function(){var e=document.querySelector(i.focusSelector);e&&r(e)},200)}},{key:"generateElementSelector",value:function(e,t){if(!e)return null;var n=e.getAttribute("data-component-name"),r=e.id;if(n&&r)return'[data-component-name="'.concat(n,'"][id="').concat(r,'"]');if(n)return'[data-component-name="'.concat(n,'"]');if(r)return'[id="'.concat(r,'"]');var i=e.getAttribute("data-position"),o=e.getAttribute("data-index");if(null!==i){var a=t?t(e):null;if(a){var s=a.id;if(s)return'[id="'.concat(s,'"] [data-position="').concat(i,'"]')}return'[data-position="'.concat(i,'"]')}if(null!==o){var u=t?t(e):null;if(u){var l=u.id;if(l)return'[id="'.concat(l,'"] [data-index="').concat(o,'"]')}return'[data-index="'.concat(o,'"]')}for(var c=[],h=e;h&&h!==document.body;){var d=h.tagName.toLowerCase();if(h.id){d='[id="'.concat(h.id,'"]'),c.unshift(d);break}var f=h.getAttribute("data-position"),p=h.getAttribute("data-index");if(null!==f){d='[data-position="'.concat(f,'"]'),c.unshift(d);break}if(null!==p){d='[data-index="'.concat(p,'"]'),c.unshift(d);break}if(h.className&&"string"==typeof h.className){var v=h.className.split(" ").filter(function(e){return e&&!e.includes(":")});v.length>0&&(d+=".".concat(v[0]))}var y=h.parentElement;if(y){var m=Array.from(y.children).filter(function(e){return e.tagName===h.tagName});if(m.length>1){var g=m.indexOf(h)+1;d+=":nth-child(".concat(g,")")}}c.unshift(d),h=h.parentElement}return c.join(" > ")}},{key:"findPageRootView",value:function(e){if(!e)return null;for(var t=e;t&&t!==document.body;){if("ESPageRootView"===t.getAttribute("data-component-name"))return t;t=t.parentElement}return null}},{key:"getFastListViewFocusInfo",value:function(e){if(!e)return null;for(var t=e,n=null,r=null;t&&t!==document.body;){var i=t.getAttribute("data-position"),o=t.getAttribute("data-index");if(null!==i?n=parseInt(i):null!==o&&(n=parseInt(o)),"FastListView"===t.getAttribute("data-component-name")){r=t;break}t=t.parentElement}return r&&null!==n?{containerId:r.id,position:n}:null}},{key:"saveCurrentPageFocus",value:function(e,t,n,r){if(e){var i=n(e);if(i){var o=r(e);o?(i.setAttribute("data-last-fastlist-id",o.containerId),i.setAttribute("data-last-fastlist-position",o.position)):(i.removeAttribute("data-last-fastlist-id"),i.removeAttribute("data-last-fastlist-position"));var a=t(e);i.setAttribute("data-last-focus-selector",a)}}}},{key:"restoreFocusFromPageRootView",value:function(e,t,n,r){var i=e();if(!i)return!1;var o=i.getAttribute("data-last-fastlist-id"),a=i.getAttribute("data-last-fastlist-position");if(o&&null!==a){var s=document.getElementById(o);if(s&&s.__fastListViewInstance){var u=s.__fastListViewInstance,l=parseInt(a);return setTimeout(function(){u.requestChildFocus(l)},100),!0}}var c=i.getAttribute("data-last-focus-selector");if(!c)return!1;t();var h=document.querySelector(c);if(h&&r.includes(h))return n(h),!0;var d=c.match(/\[data-position="(\d+)"\]/),f=c.match(/\[data-index="(\d+)"\]/),p=c.match(/\[id="([^"]+)"\]/);if((d||f)&&p){var v=d?parseInt(d[1]):parseInt(f[1]),y=p[1],m=document.getElementById(y);if(m&&m.__fastListViewInstance){var g=m.__fastListViewInstance;return setTimeout(function(){g.requestChildFocus(v)},100),!0}}return!1}},{key:"clearHistory",value:function(){this.focusHistory=[]}}])}(),Dt=function(){return R(function e(){O(this,e),this.focusedElement=null},[{key:"setFocusedElement",value:function(e){this.focusedElement=e}},{key:"findFastListViewContainer",value:function(e){if(!e)return null;for(var t=e;t&&t!==document.body;){if("FastListView"===t.getAttribute("data-component-name"))return t;t=t.parentElement}return null}},{key:"tryFastListViewNavigation",value:function(e,t,n){for(var r=e.parentElement,i=null;r;){if(r.__fastListViewInstance){i=r.__fastListViewInstance;break}r=r.parentElement}if(!i)return null;var o=i.handleFocusNavigation(e,t);return o||null}},{key:"triggerBoundaryScrollOnExitIfNeeded",value:function(e,t,n){if(e&&t)for(var r=e.parentElement;r&&r!==document.body;){if(r.__fastListViewInstance&&!r.contains(t)){var i=r.__fastListViewInstance;i&&"function"==typeof i._scrollToBoundary&&i._scrollToBoundary(n,e)}r=r.parentElement}}},{key:"triggerBoundaryScrollIfNeeded",value:function(e,t){for(var n=e.parentElement;n&&n!==document.body;){if(n.__fastListViewInstance){var r=n.__fastListViewInstance;"function"==typeof r._scrollToBoundary&&r._scrollToBoundary(t,e)}n=n.parentElement}}},{key:"maybeNotifyFastListItemFocusChanged",value:function(e,t){if(e){if(e.__fastListViewInstance){var n=e.__fastListViewInstance;if(n&&"function"==typeof n.notifyItemFocusChanged)return void n.notifyItemFocusChanged(e,t)}var r=e.parentElement;if(r&&r.__fastListViewInstance){var i=r.__fastListViewInstance;if(i&&"function"==typeof i.notifyItemFocusChanged)return void i.notifyItemFocusChanged(r,t)}for(var o=null;r;){if(r.__fastListViewInstance){var a,s,u,l=(o=r.__fastListViewInstance)._itemContainer;if(l&&(l===e||l.contains(e)))break;var c=null!==(a=null===(s=e.getAttribute)||void 0===s?void 0:s.call(e,"data-position"))&&void 0!==a?a:null===(u=e.getAttribute)||void 0===u?void 0:u.call(e,"data-index");if(null!=c){var h,d=Number(c),f=null==l||null===(h=l.children)||void 0===h?void 0:h[d];if(f&&(f===e||f.contains(e)))break}o=null}r=r.parentElement}o&&"function"==typeof o.notifyItemFocusChanged&&o.notifyItemFocusChanged(e,t)}}},{key:"maybeUpdateFastListBlockFocusDirections",value:function(e){if(e){for(var t=e.parentElement,n=null;t;){if(t.__fastListViewInstance){n=t.__fastListViewInstance;break}t=t.parentElement}n&&"function"==typeof n.updateBlockFocusDirections&&n.updateBlockFocusDirections(e)}}},{key:"maybeScrollFastListToStart",value:function(e){var t;if(e&&e.closest){var n=e.closest("[data-position]")||e.closest("[data-index]");if(n){var r=null!==(t=n.getAttribute("data-position"))&&void 0!==t?t:n.getAttribute("data-index");if(null!=r){var i=Number(r);if(Number.isFinite(i)&&0===i){var o=e.closest(".fast-list-item-container");if(o){var a=window.getComputedStyle(o);if("row"===a.flexDirection||"auto"===a.overflowX||"scroll"===a.overflowX){if(o.scrollLeft>0)try{o.scrollTo({left:0,behavior:"smooth"})}catch(e){o.scrollLeft=0}var s=o.parentElement;if(s&&s.scrollLeft>0)try{s.scrollTo({left:0,behavior:"smooth"})}catch(e){s.scrollLeft=0}}}}}}}}},{key:"getFastListViewFocusInfo",value:function(e){if(!e)return null;for(var t=e,n=null,r=null;t&&t!==document.body;){var i=t.getAttribute("data-position"),o=t.getAttribute("data-index");if(null!==i?n=parseInt(i):null!==o&&(n=parseInt(o)),"FastListView"===t.getAttribute("data-component-name")){r=t;break}t=t.parentElement}return r&&null!==n?{containerId:r.id,position:n}:null}}])}();function Mt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ft(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ft(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ut=function(){return R(function e(){O(this,e),this.focusableElements=[],this.focusedElement=null,this.options={useDistanceBasedNavigation:!0,crossDistanceWeight:.5},this._initModules(),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this),this.updateFocusableElements=this.updateFocusableElements.bind(this),this.init()},[{key:"_initModules",value:function(){this.navigator=new Tt(this.options),this.styler=new Pt,this.showOnStateManager=new Rt,this.stateManager=new Nt,this.fastListHandler=new Dt,this.styler.setShowOnStateManager(this.showOnStateManager)}},{key:"setOptions",value:function(e){this.options=jt(jt({},this.options),e),this.navigator.setOptions(this.options)}},{key:"updateFocusConfig",value:function(e){this.styler.updateConfig(e),this.focusedElement&&this._applyFocusStyle(this.focusedElement)}},{key:"_log",value:function(){}},{key:"init",value:function(){var e=this;document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp),document.addEventListener("click",this.handleClick.bind(this),!0),new MutationObserver(function(t){e.updateFocusableElements();var n,r=Mt(t);try{var i=function(){var t=n.value;"childList"===t.type&&t.addedNodes.length>0&&setTimeout(function(){var n,r=Mt(t.addedNodes);try{for(r.s();!(n=r.n()).done;){var i=n.value;e._checkAndFocusAutofocusElement(i)}}catch(e){r.e(e)}finally{r.f()}},50)};for(r.s();!(n=r.n()).done;)i()}catch(e){r.e(e)}finally{r.f()}}).observe(document.body,{childList:!0,subtree:!0}),setTimeout(function(){e.updateFocusableElements()},1e3),this._log("Focus manager initialized")}},{key:"_isGoingBack",value:function(e,t){return this.stateManager.isGoingBack(e,t)}},{key:"_saveFocusState",value:function(e){var t=this;this.focusedElement&&this.stateManager.saveFocusState(e,this.focusedElement,function(e){return t._generateElementSelector(e)})}},{key:"_restoreFocusState",value:function(e){var t=this;this.stateManager.restoreFocusState(e,function(){return t.clearFocus()},function(){return t.updateFocusableElements()},function(e){return t._doFocusElement(e)})}},{key:"_generateElementSelector",value:function(e){var t=this;return this.stateManager.generateElementSelector(e,function(e){return t.fastListHandler.findFastListViewContainer(e)})}},{key:"resetForNewPage",value:function(){var e=this;this.clearFocus();var t=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(e.updateFocusableElements(),e.focusableElements.length>0){var i=e.focusableElements.find(function(e){var t=e.getAttribute("autofocus");return"true"===t||""===t||"1"===t});i&&e._doFocusElement(i)}else if(n<r){setTimeout(function(){return t(n+1,r)},100+100*n)}};setTimeout(function(){return t(0)},150)}},{key:"_checkAndFocusAutofocusElement",value:function(e){if(e&&1===e.nodeType){var t=e.getAttribute&&e.getAttribute("autofocus"),n="true"===t||""===t||"1"===t,r=e.hasAttribute&&e.hasAttribute("focusable");if(n&&r&&(this.updateFocusableElements(),this.focusableElements.includes(e)))this._doFocusElement(e);else if(e.querySelector){var i=e.querySelector('[autofocus="true"], [autofocus=""], [autofocus="1"]');i&&i.hasAttribute&&i.hasAttribute("focusable")&&(this.updateFocusableElements(),this.focusableElements.includes(i)&&this._doFocusElement(i))}}}},{key:"_getCurrentPage",value:function(){for(var e=0,t=['[data-component-name="ESPageRouterView"]','[data-component-name="ESRouterView"]',"es-page-router-view","es-router-view","[data-router-view]",".es-router-view"];e<t.length;e++){var n=t[e],r=document.querySelector(n);if(r&&r.children.length>0){for(var i=r.children.length-1;i>=0;i--){var o=r.children[i],a=window.getComputedStyle(o);if("none"!==a.display&&"hidden"!==a.visibility&&parseFloat(a.opacity)>0)return o}return r.children[r.children.length-1]}}for(var s=document.querySelectorAll('[data-component-name="ESPageRootView"], es-page-root-view, [data-page]'),u=s.length-1;u>=0;u--){var l=s[u],c=window.getComputedStyle(l);if("none"!==c.display&&"hidden"!==c.visibility)return l}return document.body}},{key:"updateFocusableElements",value:function(){var e=new Set;['[focusable="true"]','[focusable="1"]',"[focusable]",'[data-focusable="true"]',"[data-focusable]",'[canfocus="true"]','[canFocus="true"]',".focusable",'[tabindex="0"]',"[tabindex]"].forEach(function(t){try{document.querySelectorAll(t).forEach(function(t){return e.add(t)})}catch(e){}});var t=Array.from(e),n=this._getCurrentPage(),r=Array.from(t).filter(function(e){var t=e.getAttribute("focusable");if("false"===t||"0"===t)return!1;var r=e.getAttribute("duplicateParentState");if("true"===r||""===r||e.hasAttribute("duplicateparentstate"))return!1;if(n!==document.body&&!n.contains(e))return!1;var i=window.getComputedStyle(e);if(!("none"!==i.display&&"hidden"!==i.visibility&&parseFloat(i.opacity)>0&&!e.hasAttribute("data-template")))return!1;var o=e.getBoundingClientRect(),a=o.width>0&&o.height>0,s=3*window.innerHeight,u=2*window.innerWidth,l=o.top<s&&o.bottom>-s&&o.left<u&&o.right>-u;return a&&l});this.focusableElements=r,this._initShowOnStateVisibility()}},{key:"handleKeyDown",value:function(e){if(this._dispatchPageKeyDown(e),this.focusedElement){var t=this._getCurrentPage(),n=t&&t.contains(this.focusedElement),r=document.body.contains(this.focusedElement);n&&r||this.clearFocus()}if(!this.focusedElement&&"Escape"!==e.key){if(this._restoreFocusFromPageRootView())return void e.preventDefault();if(this.updateFocusableElements(),this.focusableElements.length>0)return this._doFocusElement(this.focusableElements[0]),void e.preventDefault()}if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter","Escape"].includes(e.key))switch(e.preventDefault(),e.key){case"ArrowUp":this.moveFocus("up");break;case"ArrowDown":this.moveFocus("down");break;case"ArrowLeft":this.moveFocus("left");break;case"ArrowRight":this.moveFocus("right");break;case"Enter":this.clickFocused();break;case"Escape":this.dispatchBackPressed(e)}}},{key:"handleKeyUp",value:function(e){this._dispatchPageKeyUp(e),["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter","Escape"].includes(e.key)&&e.preventDefault()}},{key:"_dispatchPageKeyDown",value:function(e){var t=wt(e);X(t)||this._callCurrentPageMethod("onKeyDown",t)}},{key:"_dispatchPageKeyUp",value:function(e){var t=wt(e);Z(t)||this._callCurrentPageMethod("onKeyUp",t)}},{key:"_getCurrentPageVueInstance",value:function(){var e=n.g.__ES_PAGE_STACK__;if(e&&e.length>0){var t=e[e.length-1];if(t&&(t.exposed||t.proxy||t.setupState))return t}var r=this._getCurrentPage();return r?this._findVueInstanceInSubtree(r):null}},{key:"_findVueInstanceInSubtree",value:function(e){for(var t=[e],n=new Set,r=0;t.length>0&&r<200;){var i=t.shift();if(i&&!n.has(i)){n.add(i),r+=1;var o=i.__vueParentComponent||i.__vue__;if(o&&(o.exposed||o.proxy))return o;var a=i.children;if(a&&a.length>0)for(var s=0;s<a.length;s++)t.push(a[s])}}return null}},{key:"_callCurrentPageMethod",value:function(e,t){var n,r,i,o=this._getCurrentPageVueInstance();if(!o)return!1;var a=(null==o||null===(n=o.setupState)||void 0===n?void 0:n[e])||(null==o||null===(r=o.exposed)||void 0===r?void 0:r[e])||(null==o||null===(i=o.proxy)||void 0===i?void 0:i[e]);if("function"!=typeof a)return!1;try{var s=a(t);s&&"function"==typeof s.then&&s.catch(function(e){})}catch(e){}return!0}},{key:"moveFocus",value:function(e){var t=this;if(0!==this.focusableElements.length||(this.updateFocusableElements(),0!==this.focusableElements.length))if(this.focusedElement){var n=this.focusedElement;if(this.navigator.isDirectionBlocked(n,e))this._log("[TVFocus] Direction",e,"is blocked for current element");else{var r=this.navigator.getNextFocusByName(n,e,this.focusableElements,function(){return t.updateFocusableElements()});if(r)return this._log("[TVFocus] Found nextFocusName target for direction",e),void this._doFocusElement(r);if(!document.body.contains(n))return this.updateFocusableElements(),void(this.focusableElements.length>0&&this._doFocusElement(this.focusableElements[0]));var i=this.fastListHandler.tryFastListViewNavigation(n,e,this.options.useDistanceBasedNavigation);if(i)this._doFocusElement(i);else{var o=this.navigator.findBestCandidate(n,e,this.focusableElements);o?(this.options.useDistanceBasedNavigation&&this.fastListHandler.triggerBoundaryScrollOnExitIfNeeded(n,o,e),this._doFocusElement(o)):this.options.useDistanceBasedNavigation&&this.fastListHandler.triggerBoundaryScrollIfNeeded(n,e)}}}else this._doFocusElement(this.focusableElements[0])}},{key:"_doFocusElement",value:function(e){if(e){this.focusableElements.includes(e)||this.focusableElements.push(e);var t=this.focusedElement;t&&(t!==e&&this._dispatchFocusChange(t,!1),this.fastListHandler.maybeNotifyFastListItemFocusChanged(t,!1),this._removeFocusStyle(t)),this.focusedElement=e,this._applyFocusStyle(this.focusedElement),this.focusedElement.classList.add("focused"),this._dispatchFocusChange(this.focusedElement,!0),this._scrollToCenter(e),this.fastListHandler.maybeScrollFastListToStart(this.focusedElement),this.fastListHandler.maybeUpdateFastListBlockFocusDirections(this.focusedElement),this.fastListHandler.maybeNotifyFastListItemFocusChanged(this.focusedElement,!0),this.showOnStateManager.setFocusedElement(this.focusedElement),this.stateManager.setFocusedElement(this.focusedElement),this.fastListHandler.setFocusedElement(this.focusedElement)}}},{key:"_dispatchFocusChange",value:function(e,t){if(!e)return!1;for(var n=e;n&&n!==document.body;){var r=void 0!==n.id&&null!==n.id&&""!==n.id?Number(n.id):NaN;if(!Number.isNaN(r)){var i=x(r);if(i&&"function"==typeof i.dispatchEvent)return i.dispatchEvent("onFocus",{isFocused:t,currentTarget:{index:this._resolveElementIndex(e)},target:{attributes:{name:e.getAttribute("name")}}})}n=n.parentElement}return!1}},{key:"_resolveElementIndex",value:function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"index");if(null!=n&&""!==n){var r=Number(n);return Number.isNaN(r)?n:r}}},{key:"_scrollToCenter",value:function(e){if(e){var t=this._findScrollContainer(e);if(t){e.getBoundingClientRect(),t.getBoundingClientRect();for(var n=0,r=0,i=e;i&&i!==t;)n+=i.offsetTop,r+=i.offsetLeft,i=i.offsetParent;var o=t.scrollHeight>t.clientHeight,a=t.scrollWidth>t.clientWidth;if(o){var s=n,u=e.offsetHeight,l=t.clientHeight,c=s-(l-u)/2,h=t.scrollHeight-l,d=Math.max(0,Math.min(c,h)),f=t.scrollTop;if(Math.abs(d-f)>1){var p=performance.now(),v=function(){var e=performance.now()-p,n=Math.min(e/250,1),r=1-Math.pow(1-n,3);t.scrollTop=f+(d-f)*r,n<1&&requestAnimationFrame(v)};requestAnimationFrame(v)}else t.scrollTop=d}if(a){var y=r,m=e.offsetWidth,g=t.clientWidth,_=y-(g-m)/2,b=t.scrollWidth-g,w=Math.max(0,Math.min(_,b));t.scrollTo({left:w,behavior:"smooth"})}}else e.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})}}},{key:"_findScrollContainer",value:function(e){for(var t=e.parentElement,n=null,r=null;t&&t!==document.body;){var i=t.getAttribute("data-component-name");if("FastListView"!==i&&"ListView"!==i&&"QtFlexView"!==i||n||(n=t),!r){var o=window.getComputedStyle(t),a=o.overflowY,s=o.overflowX;(("auto"===a||"scroll"===a)&&t.scrollHeight>t.clientHeight||("auto"===s||"scroll"===s)&&t.scrollWidth>t.clientWidth)&&(r=t)}t=t.parentElement}if(n){var u=n.querySelector(".fast-list-item-container");if(u){var l=window.getComputedStyle(u),c=l.overflowY,h=l.overflowX,d=("auto"===c||"scroll"===c)&&u.scrollHeight>u.clientHeight,f=("auto"===h||"scroll"===h)&&u.scrollWidth>u.clientWidth;if(d||f)return u}var p=window.getComputedStyle(n),v=p.overflowY,y=p.overflowX,m=("auto"===v||"scroll"===v)&&n.scrollHeight>n.clientHeight,g=("auto"===y||"scroll"===y)&&n.scrollWidth>n.clientWidth;if(m||g)return n}return r}},{key:"saveCurrentPageFocus",value:function(){var e=this;this.stateManager.saveCurrentPageFocus(this.focusedElement,function(t){return e._generateElementSelector(t)},function(t){return e.stateManager.findPageRootView(t)},function(t){return e.fastListHandler.getFastListViewFocusInfo(t)})}},{key:"_restoreFocusFromPageRootView",value:function(){var e=this;return this.stateManager.restoreFocusFromPageRootView(function(){return e._getCurrentPage()},function(){return e.updateFocusableElements()},function(t){return e._doFocusElement(t)},this.focusableElements)}},{key:"restorePreviousPageFocus",value:function(){this.clearFocus(),this.updateFocusableElements(),this._restoreFocusFromPageRootView()||this.focusableElements.length>0&&this._doFocusElement(this.focusableElements[0])}},{key:"_initShowOnStateVisibility",value:function(){this.showOnStateManager.initShowOnStateVisibility()}},{key:"initShowOnStateForElement",value:function(e){this.showOnStateManager.initShowOnStateForElement(e)}},{key:"_getFocusProps",value:function(e){return this.styler.getFocusProps(e)}},{key:"_applyFocusStyle",value:function(e){this.styler.applyFocusStyle(e)}},{key:"_removeFocusStyle",value:function(e){this.styler.removeFocusStyle(e)}},{key:"_removeDuplicateParentStateStyles",value:function(e){this.styler._removeDuplicateParentStateStyles(e)}},{key:"clearFocus",value:function(){this.focusedElement&&this._removeFocusStyle(this.focusedElement),this.focusedElement=null,this.showOnStateManager.setFocusedElement(null),this.stateManager.setFocusedElement(null),this.fastListHandler.setFocusedElement(null)}},{key:"_dispatchComponentClickFromElement",value:function(e,t){for(var n=e;n&&n!==document.body;){if(void 0!==n._itemData||void 0!==n._itemPosition)return!1;if(n.classList&&n.classList.contains("fast-list-item-container"))return!1;n=n.parentElement}for(n=e;n&&n!==document.body;){var r=void 0!==n.id&&null!==n.id&&""!==n.id?Number(n.id):NaN;if(!Number.isNaN(r)){var i=x(r);return i&&"function"==typeof i.markClickHandled&&i.markClickHandled(),$(r,"onClick",{nativeEvent:t||{target:e,currentTarget:n}}),!0}n=n.parentElement}return!1}},{key:"clickFocused",value:function(){if(this.focusedElement){var e=this.focusedElement,t=this._dispatchComponentClickFromElement(e);if(!t&&e._emitter&&"function"==typeof e._emitter.emit){var n={type:"click",bubbles:!0,cancelable:!0,target:e,currentTarget:e};e._emitter.emit(n),t=!0}t||e.click()}}},{key:"handleClick",value:function(e){for(var t=e.target;t&&t!==document.body;){if(t.hasAttribute&&t.hasAttribute("focusable")){this.focusableElements.includes(t)&&this._doFocusElement(t),this._dispatchComponentClickFromElement(t,e);break}t=t.parentElement}}},{key:"dispatchBackPressed",value:function(e){Y()}},{key:"_directionNumberToName",value:function(e){return kt(e)}},{key:"setFocus",value:function(e){e<0||e>=this.focusableElements.length||this._doFocusElement(this.focusableElements[e])}},{key:"focusElement",value:function(e){return!!e&&(this.focusableElements.includes(e)||this.updateFocusableElements(),!!this.focusableElements.includes(e)&&(this._doFocusElement(e),!0))}},{key:"moveFocusFromElement",value:function(e,t){if(!e)return!1;var n=t;if("number"==typeof t&&(n=kt(t)),!n)return this.focusElement(e);if("forward"===n||"backward"===n){this.focusableElements.includes(e)||this.updateFocusableElements();var r,i=this.focusableElements.indexOf(e);return i<0?this.focusElement(e):(r="forward"===n?(i+1)%this.focusableElements.length:(i-1+this.focusableElements.length)%this.focusableElements.length,this._doFocusElement(this.focusableElements[r]),!0)}return this.focusableElements.includes(e)||this.updateFocusableElements(),!!this.focusableElements.includes(e)&&(this.navigator.isDirectionBlocked(e,n)?(this._log("[TVFocus] Direction",n,"is blocked for element"),!1):(this._doFocusElement(e),this.moveFocus(n),!0))}},{key:"clearFocusFromElement",value:function(e){return this.focusedElement===e&&(this.clearFocus(),!0)}}])}();function Wt(e){var t=en(e,un.__wbindgen_malloc),n=ln,r=un.decrypt(t,n);if(r[3])throw nn(r[2]);var i=Xt(r[0],r[1]).slice();return un.__wbindgen_free(r[0],1*r[1],1),i}function Vt(e){var t,n;try{var r=en(e,un.__wbindgen_malloc),i=ln,o=un.decrypt_api_response(r,i),a=o[0],s=o[1];if(o[3])throw a=0,s=0,nn(o[2]);return t=a,n=s,Zt(a,s)}finally{un.__wbindgen_free(t,n,1)}}function zt(e){var t=en(e,un.__wbindgen_malloc),n=ln,r=un.decrypt_zip(t,n),i=Xt(r[0],r[1]).slice();return un.__wbindgen_free(r[0],1*r[1],1),i}function Ht(e){var t=en(e,un.__wbindgen_malloc),n=ln,r=un.encrypt(t,n),i=Xt(r[0],r[1]).slice();return un.__wbindgen_free(r[0],1*r[1],1),i}function Gt(e){var t=tn(e,un.__wbindgen_malloc,un.__wbindgen_realloc),n=ln,r=un.encrypt_api_request(t,n),i=Xt(r[0],r[1]).slice();return un.__wbindgen_free(r[0],1*r[1],1),i}function Yt(){var e={__proto__:null,__wbg___wbindgen_is_function_147961669f068cd4:function(e){return"function"==typeof e},__wbg___wbindgen_is_object_3a2c414391dbf751:function(e){return"object"==typeof e&&null!==e},__wbg___wbindgen_is_string_6541b0f6ecd4e8e5:function(e){return"string"==typeof e},__wbg___wbindgen_is_undefined_4410e3c20a99fa97:function(e){return void 0===e},__wbg___wbindgen_throw_bbadd78c1bac3a77:function(e,t){throw new Error(Zt(e,t))},__wbg_call_ec09a4cf93377d3a:function(){return Jt(function(e,t,n){return e.call(t,n)},arguments)},__wbg_crypto_38df2bab126b63dc:function(e){return e.crypto},__wbg_getRandomValues_c44a50d8cfdaebeb:function(){return Jt(function(e,t){e.getRandomValues(t)},arguments)},__wbg_length_68a9d5278d084f4f:function(e){return e.length},__wbg_msCrypto_bd5a034af96bcba6:function(e){return e.msCrypto},__wbg_new_with_length_4b57a7a5dc67221c:function(e){return new Uint8Array(e>>>0)},__wbg_node_84ea875411254db1:function(e){return e.node},__wbg_process_44c7a14e11e9f69e:function(e){return e.process},__wbg_prototypesetcall_956c7493c68e29b4:function(e,t,n){Uint8Array.prototype.set.call(Xt(e,t),n)},__wbg_randomFillSync_6c25eac9869eb53c:function(){return Jt(function(e,t){e.randomFillSync(t)},arguments)},__wbg_require_b4edbdcf3e2a1ef0:function(){return Jt(function(){return module.require},arguments)},__wbg_static_accessor_GLOBAL_60a4124bab7dcc9a:function(){var e=void 0===n.g?null:n.g;return Qt(e)?0:qt(e)},__wbg_static_accessor_GLOBAL_THIS_95ca6460658b5d13:function(){var e="undefined"==typeof globalThis?null:globalThis;return Qt(e)?0:qt(e)},__wbg_static_accessor_SELF_4c95f759a91e9aae:function(){var e="undefined"==typeof self?null:self;return Qt(e)?0:qt(e)},__wbg_static_accessor_WINDOW_44b435597f9e9ee7:function(){var e="undefined"==typeof window?null:window;return Qt(e)?0:qt(e)},__wbg_subarray_42216645a367cd7a:function(e,t,n){return e.subarray(t>>>0,n>>>0)},__wbg_versions_276b2795b1c6a219:function(e){return e.versions},__wbindgen_cast_0000000000000001:function(e,t){return Xt(e,t)},__wbindgen_cast_0000000000000002:function(e,t){return Zt(e,t)},__wbindgen_init_externref_table:function(){var e=un.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}};return{__proto__:null,"./wasm_crypto_bg.js":e}}function qt(e){var t=un.__externref_table_alloc();return un.__wbindgen_externrefs.set(t,e),t}function Xt(e,t){return e>>>=0,$t().subarray(e/1,e/1+t)}function Zt(e,t){return function(e,t){an+=t,an>=on&&((rn=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0})).decode(),an=t);return rn.decode($t().subarray(e,e+t))}(e>>>0,t)}(0,p.A)(Ut,"FOCUS_DIRECTION",{BACKWARD:1,FORWARD:2,LEFT:17,UP:33,RIGHT:66,DOWN:130});var Kt=null;function $t(){return null!==Kt&&0!==Kt.byteLength||(Kt=new Uint8Array(un.memory.buffer)),Kt}function Jt(e,t){try{return e.apply(this,t)}catch(e){var n=qt(e);un.__wbindgen_exn_store(n)}}function Qt(e){return null==e}function en(e,t){var n=t(1*e.length,1)>>>0;return $t().set(e,n/1),ln=e.length,n}function tn(e,t,n){if(void 0===n){var r=sn.encode(e),i=t(r.length,1)>>>0;return $t().subarray(i,i+r.length).set(r),ln=r.length,i}for(var o=e.length,a=t(o,1)>>>0,s=$t(),u=0;u<o;u++){var l=e.charCodeAt(u);if(l>127)break;s[a+u]=l}if(u!==o){0!==u&&(e=e.slice(u)),a=n(a,o,o=u+3*e.length,1)>>>0;var c=$t().subarray(a+u,a+o);a=n(a,o,u+=sn.encodeInto(e,c).written,1)>>>0}return ln=u,a}function nn(e){var t=un.__wbindgen_externrefs.get(e);return un.__externref_table_dealloc(e),t}var rn=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});rn.decode();var on=2146435072,an=0;var sn=new TextEncoder;"encodeInto"in sn||(sn.encodeInto=function(e,t){var n=sn.encode(e);return t.set(n),{read:e.length,written:n.length}});var un,ln=0;function cn(e,t){return un=e.exports,Kt=null,un.__wbindgen_start(),un}function hn(e,t){return dn.apply(this,arguments)}function dn(){return dn=l(c.mark(function e(t,n){var r,i,o,a;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=function(e){switch(e){case"basic":case"cors":case"default":return!0}return!1},!("function"==typeof Response&&t instanceof Response)){e.next=8;break}if("function"!=typeof WebAssembly.instantiateStreaming){e.next=5;break}return e.prev=1,e.next=2,WebAssembly.instantiateStreaming(t,n);case 2:case 7:return e.abrupt("return",e.sent);case 3:if(e.prev=3,a=e.catch(1),!(t.ok&&o(t.type))||"application/wasm"===t.headers.get("Content-Type")){e.next=4;break}e.next=5;break;case 4:throw a;case 5:return e.next=6,t.arrayBuffer();case 6:return r=e.sent,e.next=7,WebAssembly.instantiate(r,n);case 8:return e.next=9,WebAssembly.instantiate(t,n);case 9:if(!((i=e.sent)instanceof WebAssembly.Instance)){e.next=10;break}return e.abrupt("return",{instance:i,module:t});case 10:return e.abrupt("return",i);case 11:case"end":return e.stop()}},e,null,[[1,3]])})),dn.apply(this,arguments)}function fn(e){return pn.apply(this,arguments)}function pn(){return pn=l(c.mark(function e(t){var r,i,o,a,s;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===un){e.next=1;break}return e.abrupt("return",un);case 1:return void 0!==t&&Object.getPrototypeOf(t)===Object.prototype&&(t=t.module_or_path),void 0===t&&(t=new URL(n(3087),n.b)),r=Yt(),("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t)),s=hn,e.next=2,t;case 2:return e.next=3,s(e.sent,r);case 3:return i=e.sent,o=i.instance,a=i.module,e.abrupt("return",cn(o,a));case 4:case"end":return e.stop()}},e)})),pn.apply(this,arguments)}var vn=l(h().mark(function e(){var t,r,i;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=new URL(n(3087),n.b),e.next=1,fetch(t);case 1:return r=e.sent,e.next=2,r.arrayBuffer();case 2:return i=e.sent,e.abrupt("return",fn(i));case 3:case"end":return e.stop()}},e)}))(),yn=n(5287);function mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var _n="undefined"!=typeof window&&{watch:!0}&&!0,bn="undefined"!=typeof window&&{watch:!0}&&!0;function wn(e){return{js:"application/javascript",json:"application/json",css:"text/css",html:"text/html",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf",mp3:"audio/mpeg",mp4:"video/mp4"}[e.split(".").pop().toLowerCase()]||"application/octet-stream"}var kn=(yn.env.VUE_APP_PROXY_DOMAINS||"").split(",").map(function(e){return e.trim()}).filter(Boolean),En=[/api\./i,/-api\./i,/\.api\./i,/qcloudimg\./i,/cdnott\./i,/baidu\./i].concat(y(kn.map(function(e){return new RegExp(e.replace(/\./g,"\\."),"i")})));function Sn(e){if(!e)return!1;if("string"==typeof e&&e.startsWith("data:"))return!1;if("string"==typeof e&&e.startsWith("blob:"))return!1;if("string"==typeof e&&e.startsWith("file:"))return!1;try{var t=new URL(e,window.location.origin);return t.origin!==window.location.origin&&(!t.pathname.endsWith(".zip")&&(!!bn||En.some(function(e){return e.test(t.hostname)})))}catch(e){return!1}}var An=[/api\./i,/-api\./i,/\.api\./i].concat(y(kn.map(function(e){return new RegExp(e.replace(/\./g,"\\."),"i")})));function xn(e){if(!e)return!1;if("string"!=typeof e||!e.startsWith("http://")&&!e.startsWith("https://"))return!1;try{var t=new URL(e,window.location.origin);return t.origin!==window.location.origin&&An.some(function(e){return e.test(t.hostname)})}catch(e){return!1}}var Cn=window.fetch.bind(window),Tn=window.Response;function In(e,t,n){return{body:e,status:t,statusText:200===t?"OK":"",headers:n||{},ok:t>=200&&t<300,text:function(){return Promise.resolve(e)},json:function(){return Promise.resolve(JSON.parse(e))},arrayBuffer:function(){var t=new TextEncoder;return Promise.resolve(t.encode(e).buffer)}}}function On(e,t,n,r){return Ln.apply(this,arguments)}function Ln(){return(Ln=l(c.mark(function e(t,n,r,i){var o,a,s,u,l,h,d,f,p,v,m,g,_,b;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=window.__PROXY_BASE__||("localhost"===location.hostname||"127.0.0.1"===location.hostname?"http://localhost:3001":location.origin),a={},r&&("function"==typeof r.forEach?r.forEach(function(e,t){a[t]=e}):"object"==typeof r&&(a=r._headers&&"object"==typeof r._headers&&!Array.isArray(r._headers)?gn({},r._headers):gn({},r))),s=null,!i){e.next=5;break}if("string"!=typeof i){e.next=1;break}s=i,e.next=5;break;case 1:if(!(i instanceof ArrayBuffer)){e.next=2;break}s=btoa(String.fromCharCode.apply(String,y(new Uint8Array(i)))),e.next=5;break;case 2:if(!(i instanceof Blob)){e.next=4;break}return e.next=3,i.text();case 3:s=e.sent,e.next=5;break;case 4:s=String(i);case 5:return u=JSON.stringify({method:t,url:n,headers:a,body:s}),e.prev=6,l=Gt(u),e.next=7,Cn("".concat(o,"/api/encrypt-proxy"),{method:"POST",headers:{"Content-Type":"application/octet-stream"},body:l});case 7:return h=e.sent,g=Uint8Array,e.next=8,h.arrayBuffer();case 8:return _=e.sent,d=new g(_),f=Vt(d),p=JSON.parse(f),v=p.body?(new TextDecoder).decode(new Uint8Array(atob(p.body).split("").map(function(e){return e.charCodeAt(0)}))):"",e.abrupt("return",In(v,p.status||200,p.headers||{}));case 9:throw e.prev=9,b=e.catch(6),m={method:t,url:n.substring(0,200),error:b.message,stack:(b.stack||"").substring(0,300)},window.__ENCRYPT_ERRORS__||(window.__ENCRYPT_ERRORS__=[]),window.__ENCRYPT_ERRORS__.push(m),b;case 10:case"end":return e.stop()}},e,null,[[6,9]])}))).apply(this,arguments)}function Pn(e){if(!e)return e;try{var t=String(e).trim().replace(/^['"`\s]+|['"`\s]+$/g,""),n=new URL(t,window.location.origin),r="/proxy?url=".concat(encodeURIComponent(n.toString()));return"".concat(window.location.origin).concat(r)}catch(t){return e}}function Rn(e){return _n&&Sn(e)?Pn(e):e}function Nn(){return Dn.apply(this,arguments)}function Dn(){return Dn=l(c.mark(function e(){var t,n,r,i,o,a,s,u,l,h,d,f,p,v,m,g,_,b;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(_n){e.next=1;break}return e.abrupt("return");case 1:if(t=!1,n=window.fetch,window.fetch=function(e){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="string"==typeof e?e:e.url;if("string"==typeof o&&o.startsWith("hpfile://")){var a=o.replace(/^hpfile:\/\/\.?\//,"/").replace(/^hpfile:\/\//,"/");if(window.__VIRTUAL_FS__&&window.__VIRTUAL_FS__.has(a)){var s=window.__VIRTUAL_FS__.get(a),u=new Blob([s],{type:wn(a)});return Promise.resolve(new Tn(u,{status:200,headers:{"Content-Type":wn(a)}}))}"string"==typeof e?e=a:e instanceof Request&&(e=new Request(a,i))}var l=i&&i.method||("string"==typeof e?"GET":e.method)||"GET",c=i&&i.headers||{},h=i&&i.body||null;if("localhost"!==window.location.hostname&&t&&xn(o))return On(l,o,c,h).catch(function(t){return Sn(o)&&(e=Pn(o)),n.call(r,e,i)});if(Sn(o)){var d=Pn(o);"string"==typeof e?e=d:e instanceof Request&&(e=new Request(d,{method:e.method,headers:e.headers,body:e.body,mode:"cors",credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity}))}return n.call(this,e,i)},r=XMLHttpRequest.prototype.open,i=XMLHttpRequest.prototype.send,o=XMLHttpRequest.prototype.setRequestHeader,a=new WeakMap,XMLHttpRequest.prototype.setRequestHeader=function(e,t){return a.has(this)||a.set(this,{}),a.get(this)[e]=t,o.call(this,e,t)},XMLHttpRequest.prototype.open=function(e,n,i,o,a){return t&&xn(n)?(this.__encryptMeta={method:e,url:n},void r.call(this,e,"/__encrypt_xhr__",!1,o,a)):(this.__encryptMeta=null,Sn(n)&&(n=Pn(n)),r.call(this,e,n,!1!==i,o,a))},XMLHttpRequest.prototype.send=function(e){var t=this;if(!this.__encryptMeta)return i.call(this,e);var n=this.__encryptMeta,o=n.method,s=n.url;this.__encryptMeta=null;var u=a.get(this)||{},l=null;if(null!=e)if("string"==typeof e)l=e;else if(e instanceof ArrayBuffer)l=btoa(String.fromCharCode.apply(String,y(new Uint8Array(e))));else if(ArrayBuffer.isView(e))l=btoa(String.fromCharCode.apply(String,y(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))));else{if(e instanceof Blob)return void(Sn(s)&&(r.call(this,o,Pn(s),!1),i.call(this,e)));l=String(e)}On(o,s,u,l).then(function(e){return e.text()}).then(function(e){Object.defineProperty(t,"status",{value:200,writable:!0,configurable:!0}),Object.defineProperty(t,"statusText",{value:"OK",writable:!0,configurable:!0});var n=t.responseType||"";if(""===n||"text"===n)Object.defineProperty(t,"responseText",{value:e,writable:!0,configurable:!0}),Object.defineProperty(t,"response",{value:e,writable:!0,configurable:!0});else if("json"===n)try{Object.defineProperty(t,"response",{value:JSON.parse(e),writable:!0,configurable:!0})}catch(n){Object.defineProperty(t,"response",{value:e,writable:!0,configurable:!0})}else"arraybuffer"===n?Object.defineProperty(t,"response",{value:(new TextEncoder).encode(e).buffer,writable:!0,configurable:!0}):Object.defineProperty(t,"response",{value:e,writable:!0,configurable:!0});Object.defineProperty(t,"readyState",{value:4,writable:!0,configurable:!0}),t.onreadystatechange&&t.onreadystatechange(new Event("readystatechange")),t.dispatchEvent(new Event("readystatechange")),t.onload&&t.onload(new Event("load")),t.dispatchEvent(new Event("load"))}).catch(function(e){Object.defineProperty(t,"readyState",{value:4,writable:!0,configurable:!0}),t.onreadystatechange&&t.onreadystatechange(new Event("readystatechange")),t.dispatchEvent(new Event("readystatechange"));var n=new Event("error");t.onerror&&t.onerror(n),t.dispatchEvent(n)})},!(s=Object.getOwnPropertyDescriptor(HTMLImageElement.prototype,"src"))||!s.set){e.next=2;break}v=Object,m=HTMLImageElement.prototype,g=gn,_=gn({},s),b={},v.defineProperty.call(v,m,"src",g(_,b,{set(e){return"string"==typeof e&&e.startsWith("hpfile://")?(u=e.replace(/^hpfile:\/\/\.?\//,"/").replace(/^hpfile:\/\//,"/"),window.__VIRTUAL_FS__&&window.__VIRTUAL_FS__.has(u)?(l=window.__VIRTUAL_FS__.get(u),h=new Blob([l],{type:wn(u)}),d=URL.createObjectURL(h),s.set.call(this,d)):s.set.call(this,u)):/https?:\/\/[^/:]+:38989\//.test(e)?(f=e.replace(/https?:\/\/[^/:]+:38989\//,"./"),s.set.call(this,f)):(p=Sn(e)?Pn(e):e,s.set.call(this,p))}}));case 2:vn.then(function(){t=!0}).catch(function(e){});case 3:case"end":return e.stop()}},e)})),Dn.apply(this,arguments)}var Mn=window.localStorage,Fn=new Map,Bn={getItem:e=>new Promise(function(t){setTimeout(function(){try{var n=Mn.getItem(e);t(n)}catch(e){t(null)}},0)}),setItem:(e,t)=>new Promise(function(n,r){setTimeout(function(){try{var i=Mn.getItem(e);Mn.setItem(e,t),jn(e,i,t),n()}catch(e){r(e)}},0)}),removeItem:e=>new Promise(function(t){setTimeout(function(){try{var n=Mn.getItem(e);Mn.removeItem(e),jn(e,n,null),t()}catch(e){t()}},0)}),clear:()=>new Promise(function(e){setTimeout(function(){try{Mn.clear(),e()}catch(t){e()}},0)}),key:e=>new Promise(function(t){setTimeout(function(){try{t(Mn.key(e))}catch(e){t(null)}},0)}),multiGet:e=>new Promise(function(t){setTimeout(function(){try{var n=e.map(function(e){return[e,Mn.getItem(e)]});t(n)}catch(n){t(e.map(function(e){return[e,null]}))}},0)}),multiSet:e=>new Promise(function(t,n){setTimeout(function(){try{e.forEach(function(e){var t=s(e,2),n=t[0],r=t[1],i=Mn.getItem(n);Mn.setItem(n,r),jn(n,i,r)}),t()}catch(e){n(e)}},0)}),multiRemove:e=>new Promise(function(t){setTimeout(function(){try{e.forEach(function(e){var t=Mn.getItem(e);Mn.removeItem(e),jn(e,t,null)}),t()}catch(e){t()}},0)}),get length(){return Mn.length},addChangeListener(e){var t=Date.now()+Math.random();return Fn.set(t,e),function(){return Fn.delete(t)}}};function jn(e,t,n){Fn.forEach(function(r){try{r(e,n,t)}catch(e){}})}var Un=n(553);function Wn(e,t){if(t&&("object"==(0,Un.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vn(e){return Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vn(e)}function zn(){return zn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Vn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},zn.apply(null,arguments)}function Hn(e,t){return Hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Hn(e,t)}function Gn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hn(e,t)}function Yn(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function qn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Xn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zn(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $n(e,t,n){return t=Vn(t),Wn(e,Jn()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Jn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jn=function(){return!!e})()}var Qn=function(){return"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}},er=Qn(),tr={initiallistready:"initialListReady",momentumscrollbegin:"onMomentumScrollBegin",momentumscrollend:"onMomentumScrollEnd",scrollbegindrag:"onScrollBeginDrag",scrollenddrag:"onScrollEndDrag",willappear:"willAppear",willdisappear:"willDisappear",endreached:"onEndReached",loadstart:"onLoadStart",loadend:"onLoadEnd",requestclose:"onRequestClose",headerreleased:"onHeaderReleased",headerpulling:"onHeaderPulling",footerreleased:"onFooterReleased",footerpulling:"onFooterPulling",getrefresh:"onGetRefresh"},nr={click:"onClick",longclick:"onLongClick",pressin:"onPressIn",pressout:"onPressOut",touchstart:"onTouchDown",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},rr={changetext:"onChangeText",keyboardwillhide:"onKeyboardWillHide",keyboardwillshow:"onKeyboardWillShow",contentsizechange:"onContentSizeChange",endediting:"onEndEditing"},ir={pageselected:"onPageSelected",pagescroll:"onPageScroll",statechanged:"onStateChanged",pagescrollstatechanged:"onPageScrollStateChanged"};function or(e){return tr[e]?tr[e]:function(e){return!!nr[e]}(e)?nr[e]:function(e){return!!rr[e]}(e)?rr[e]:function(e){return!!ir[e]}(e)?ir[e]:function(e){return e.startsWith("on")?e:"on".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))}(e)}var ar=function(){return R(function e(t){O(this,e),this.rootViewId=t},[{key:"create",value:function(e){Hippy.bridge.callNative("UIManagerModule","createNode",this.rootViewId,e)}},{key:"update",value:function(e){Hippy.bridge.callNative("UIManagerModule","updateNode",this.rootViewId,e)}},{key:"delete",value:function(e){Hippy.bridge.callNative("UIManagerModule","deleteNode",this.rootViewId,e)}},{key:"move",value:function(e){Hippy.bridge.callNative("UIManagerModule","moveNode",this.rootViewId,e)}},{key:"build",value:function(){}},{key:"addEventListener",value:function(e,t,n){Hippy.bridge.callNativeWithoutDelete("UIManagerModule","addEventListener",e,or(t),n)}},{key:"removeEventListener",value:function(e,t,n){Hippy.bridge.callNative("UIManagerModule","removeEventListener",e,or(t),n)}}])}(),sr="AnimationModule",ur=function(){return R(function e(t){O(this,e),this.id=t},[{key:"getId",value:function(){return this.id}},{key:"start",value:function(){Hippy.bridge.callNative(sr,"startAnimation",this.id)}},{key:"pause",value:function(){Hippy.bridge.callNative(sr,"pauseAnimation",this.id)}},{key:"resume",value:function(){Hippy.bridge.callNative(sr,"resumeAnimation",this.id)}},{key:"destroy",value:function(){Hippy.bridge.callNative(sr,"destroyAnimation",this.id)}},{key:"updateAnimation",value:function(e){Hippy.bridge.callNative(sr,"destroyAnimation",this.id,e)}},{key:"addEventListener",value:function(e,t){Hippy.bridge.callNative(sr,"addEventListener",this.id,e,t)}},{key:"removeEventListener",value:function(e,t){Hippy.bridge.callNative(sr,"removeEventListener",this.id,e,t)}}])}(),lr=function(e){function t(e){return O(this,t),$n(this,t,[Hippy.bridge.callNativeWithCallbackId(sr,"createAnimation",!0,e.mode,e)])}return Gn(t,e),R(t)}(ur),cr=function(e){function t(e){var n=e.children,r=e.repeatCount;return O(this,t),$n(this,t,[Hippy.bridge.callNativeWithCallbackId(sr,"createAnimationSet",!0,{children:n,repeatCount:r})])}return Gn(t,e),R(t)}(ur),hr={get:e=>(Hippy.device||{})[e],set(e){if(e){var t=e.windowPhysicalPixels,n=void 0===t?null:t,r=e.screenPhysicalPixels,i=void 0===r?null:r;n&&(Hippy.device.window={width:n.width,height:n.height,scale:n.scale,fontScale:n.fontScale,statusBarHeight:n.statusBarHeight,navigatorBarHeight:n.navigationBarHeight}),i&&(Hippy.device.screen={width:i.width,height:i.height,scale:i.scale,fontScale:i.fontScale,statusBarHeight:i.statusBarHeight,navigatorBarHeight:i.navigationBarHeight}),Hippy.device.pixelRatio=Hippy.device.window.scale}},init(){var e=__HIPPYNATIVEGLOBAL__.Dimensions,t=e.windowPhysicalPixels,n=e.screenPhysicalPixels;this.set({windowPhysicalPixels:t,screenPhysicalPixels:n})}};var dr={OS:"web",Platform:{OS:"android",Localization:void 0},Dimensions:Kn({window:{scale:window.devicePixelRatio||1,height:window.innerHeight,width:window.innerWidth}},function(){var e={width:0,height:0,scale:1,fontScale:1,statusBarHeight:0,navigationBarHeight:0},t=e;t.width=window.innerWidth,t.height=window.innerHeight,t.scale=window.devicePixelRatio,t.fontScale=window.devicePixelRatio,t.statusBarHeight=0,t.navigationBarHeight=0;var n=e;return n.width=window.innerWidth,n.height=window.innerHeight,n.scale=window.devicePixelRatio,n.fontScale=window.devicePixelRatio,n.statusBarHeight=0,n.navigationBarHeight=0,{windowPhysicalPixels:t,screenPhysicalPixels:n}}())},fr=function(){return R(function e(t){var n=this;O(this,e),this._headers={},"object"==typeof t&&Object.keys(t).forEach(function(e){var r=t[e];r instanceof Array?r.forEach(function(t){n.append(e,t)}):n.set(e,r)})},[{key:"append",value:function(e,t){if("string"==typeof e&&"string"==typeof t)if(this.has(e)){var n=this._headers[e];n.push(t),this._headers[e]=n}else this._headers[e]=[t]}},{key:"set",value:function(e,t){"string"==typeof e&&"string"==typeof t&&(this._headers[e]=[t])}},{key:"getAll",value:function(){return this._headers["Content-Type"]||this._headers["content-type"]||(this._headers["content-type"]=["text/plain;charset=UTF-8"]),Object.assign({},this._headers)}},{key:"delete",value:function(e){"string"==typeof e&&void 0!==this._headers[e]&&delete this._headers.name}},{key:"get",value:function(e){if("string"==typeof e)return this._headers[e]}},{key:"has",value:function(e){return"string"==typeof e&&void 0!==this._headers[e]}}])}(),pr=function(){return R(function e(t){O(this,e);var n=t||{};this.status=n.statusCode||404,this.statusText=n.statusLine||"Not Found",this.headers=n.respHeaders||{},this.body=n.respBody||"",this.ok=this.status>=200&&this.status<=299},[{key:"json",value:function(){var e=this;return new Promise(function(t,n){try{t(JSON.parse(e.body))}catch(e){n(new Error("error parsing object"))}})}},{key:"text",value:function(){return Promise.resolve(this.body)}}])}();var vr,yr=function(e,t){if("string"!=typeof e||"function"!=typeof t)throw new TypeError("Hippy.on() only accept a string as event name and a function as listener");var n=__GLOBAL__.globalEventHandle[e];return n instanceof Set||(__GLOBAL__.globalEventHandle[e]=new Set,n=__GLOBAL__.globalEventHandle[e]),n.add(t),n},mr=function(e,t){if("string"!=typeof e)throw new TypeError("Hippy.off() only accept a string as event name");var n=__GLOBAL__.globalEventHandle[e];return n instanceof Set?t?(n.delete(t),n):(n.clear(),null):null},gr=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if("string"!=typeof e)throw new TypeError("Hippy.emit() only accept a string as event name");var i=__GLOBAL__.globalEventHandle[e];if(i)try{i.forEach(function(e){return e.apply(void 0,n)})}catch(e){}else"uncaughtException"===e&&n[0]},_r=function(e){return e?((t=Array.isArray(e)?e:[e])&&t.map(function(e){return function(e){if(!e)return null;var t=new Error(e.message);return t.key=e.key,t}(e)}),t):null;var t},br={getAllKeys:()=>Hippy.bridge.callNativeWithPromise("StorageModule","getAllKeys"),setItem(e,t){var n=t;if("string"!=typeof n)try{n=n.toString()}catch(e){throw e}return Hippy.bridge.callNativeWithPromise("StorageModule","multiSet",[[e,n]])},getItem:e=>Hippy.bridge.callNativeWithPromise("StorageModule","multiGet",[e]).then(function(e){return e&&e[0]&&e[0][1]?e[0][1]:null}).catch(function(e){return _r(e)}),removeItem:e=>Hippy.bridge.callNativeWithPromise("StorageModule","multiRemove",[e]),multiGet:e=>Hippy.bridge.callNativeWithPromise("StorageModule","multiGet",e),multiSet:e=>Hippy.bridge.callNativeWithPromise("StorageModule","multiSet",e),multiRemove:e=>Hippy.bridge.callNativeWithPromise("StorageModule","multiRemove",e)},wr=["measureInWindow","measureInAppWindow","getBoundingClientRect"],kr={createNode(e,t){Hippy.bridge.callNative("UIManagerModule","createNode",e,t)},updateNode(e,t){Hippy.bridge.callNative("UIManagerModule","updateNode",e,t)},deleteNode(e,t){Hippy.bridge.callNative("UIManagerModule","deleteNode",e,t)},flushBatch(e,t){Hippy.bridge.callNative("UIManagerModule","flushBatch",e,t)},startBatch(){Hippy.bridge.callNative("UIManagerModule","startBatch")},endBatch(){Hippy.bridge.callNative("UIManagerModule","endBatch"),"function"==typeof flushQueueImmediate&&flushQueueImmediate()},sendRenderError(e){if(e)throw e},callUIFunction(e,t,n,r){wr.includes(t)?Hippy.bridge.callNative("UIManagerModule",t,[e,n],r):Hippy.bridge.callNative("UIManagerModule","callUIFunction",[e,t,n],r)}},Er={country:"",language:"",direction:0},Sr={callNative:function(){if("undefined"==typeof hippyCallNatives)throw new ReferenceError("hippyCallNatives not defined");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length<2)throw new TypeError("Arguments length must be larger than 2");var r=__GLOBAL__.moduleCallId;__GLOBAL__.moduleCallId+=1;for(var i=[],o=0,a=2;a<t.length;a+=1)"function"==typeof t[a]&&0===o?(o+=1,__GLOBAL__.moduleCallList[r]={cb:t[a],type:0}):i.push(t[a]);var s=-1;o>0&&(s=r),hippyCallNatives(t[0],t[1],s.toString(),i)},callNativeWithCallbackId:function(){if("undefined"==typeof hippyCallNatives)throw new ReferenceError("hippyCallNatives not defined");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length<3)throw new TypeError("Arguments length must be larger than 3");var r=t[0],i=t[1],o=t[2];if("string"!=typeof r||"string"!=typeof i||"boolean"!=typeof o)throw new TypeError("Invalid arguments");var a=__GLOBAL__.moduleCallId;__GLOBAL__.moduleCallId+=1;var s=[];"AnimationModule"!==r||"createAnimation"!==i&&"createAnimationSet"!==i||s.push(a);for(var u=0,l=3;l<t.length;l+=1)"function"==typeof t[l]&&0===u?(u+=1,__GLOBAL__.moduleCallList[a]={cb:t[l],type:o?1:2}):s.push(t[l]);return"TimerModule"!==r&&"AnimationFrameModule"!==r||s.push(a.toString()),hippyCallNatives(r,i,a.toString(),s),a},callNativeWithPromise:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"undefined"==typeof hippyCallNatives?Promise.reject(new ReferenceError("hippyCallNatives not defined")):t.length<2?Promise.reject(new TypeError("Arguments length must be larger than 2")):new Promise(function(e,n){var r=__GLOBAL__.moduleCallId;__GLOBAL__.moduleCallId+=1;for(var i=[],o=0,a=2;a<t.length;a+=1)"function"==typeof t[a]&&0===o?(o+=1,__GLOBAL__.moduleCallList[r]={cb:t[a],reject:n,type:0}):i.push(t[a]);0===o&&(__GLOBAL__.moduleCallList[r]={cb:e,reject:n,type:0}),hippyCallNatives(t[0],t[1],r.toString(),i)})},callNativeWithoutDelete:function(){if("undefined"==typeof hippyCallNatives)throw new ReferenceError("hippyCallNatives not defined");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length<2)throw new TypeError("Arguments length must be larger than 2");var r=__GLOBAL__.moduleCallId;__GLOBAL__.moduleCallId+=1;for(var i=[],o=0,a=2;a<t.length;a+=1)"function"==typeof t[a]&&0===o?(o+=1,__GLOBAL__.moduleCallList[r]={cb:t[a],type:2}):i.push(t[a]);var s=-1;o>0&&(s=r),hippyCallNatives(t[0],t[1],s.toString(),i)},removeNativeCallback:function(e){if("number"!=typeof e||e<0)throw new TypeError("Invalid arguments");if("object"!=typeof __GLOBAL__||"object"!=typeof __GLOBAL__.moduleCallList)throw new ReferenceError("moduleCallList not defined");var t=__GLOBAL__.moduleCallList[e];!t||1!==t.type&&2!==t.type||delete __GLOBAL__.moduleCallList[e]}},Ar=Qn();"undefined"!=typeof window&&(window.global=Ar),Ar.Hippy={},Ar.__GLOBAL__={},Ar.hippyBridge=function(e,t){var r="success",i=e,o=t;switch("pauseInstance"===i&&(i="callJsModule",o={methodName:"receiveNativeEvent",moduleName:"EventDispatcher",params:["@hippy:pauseInstance",null]}),"resumeInstance"===i&&(i="callJsModule",o={methodName:"receiveNativeEvent",moduleName:"EventDispatcher",params:["@hippy:resumeInstance",null]}),i){case"loadInstance":if(!__GLOBAL__.appRegister[o.name])throw r="error: ".concat(o.name," is not regist in js"),Error(r);Object.assign(o.params,{__instanceName__:o.name,__instanceId__:o.id}),Object.assign(__GLOBAL__.appRegister[o.name],{id:o.id,superProps:o.params});var a=__GLOBAL__.jsModuleList.EventDispatcher;if(a&&"function"==typeof a.receiveNativeEvent){var s=["@hp:loadInstance",o.params];a.receiveNativeEvent(s)}__GLOBAL__.appRegister[o.name].run(o.params);break;case"callBack":if(1===o.result)r="error: native no modules";else if(o.callId&&"AnimationFrameModule"===o.moduleName&&"requestAnimationFrame"===o.moduleFunc)__GLOBAL__.canRequestAnimationFrame=!0,__GLOBAL__.requestAnimationFrameQueue[o.callId]&&(__GLOBAL__.requestAnimationFrameQueue[o.callId].forEach(function(e){"function"==typeof e&&e(o.params)}),delete __GLOBAL__.requestAnimationFrameQueue[o.callId]);else if(o.callId&&__GLOBAL__.moduleCallList[o.callId]){var u=__GLOBAL__.moduleCallList[o.callId];0!==o.result&&"function"==typeof u.reject?u.reject(o.params):u.cb(o.params),0!==u.type&&1!==u.type||delete __GLOBAL__.moduleCallList[o.callId]}else r="error: calljs id is not regist in js";break;case"callJsModule":if(o&&o.moduleName&&o.methodName){var l=__GLOBAL__.jsModuleList[o.moduleName];l&&"function"==typeof l[o.methodName]?l[o.methodName](o.params,o.secondParams):r="error: callJsModule targetting an undefined module or method"}else r="error: callJsModule param invalid";break;case"destroyInstance":n.g.Hippy.emit("destroyInstance",o);var c=Date.now().toString();Hippy.bridge.callNative("UIManagerModule","startBatch",c),Hippy.bridge.callNative("UIManagerModule","deleteNode",o,[[{id:o}]]),Hippy.bridge.callNative("UIManagerModule","endBatch",c),delete __GLOBAL__.nodeIdCache[o],delete __GLOBAL__.nodeTreeCache[o],__GLOBAL__.destroyInstanceList[o]=!0;break;default:r="error: action not define"}return r},Ar.__ISHIPPY__=!0,Ar.__GLOBAL__.globalEventHandle={},Ar.__GLOBAL__.jsModuleList={Dimensions:hr},Ar.__HIPPYNATIVEGLOBAL__=dr,Ar.HippyDealloc=function(){Hippy&&Hippy.emit("dealloc")},Ar.__Headers=Ar.Headers,Ar.Headers=fr,Ar.__Response=Ar.Response,Ar.Response=pr,Ar.__fetch=Ar.fetch,Ar.fetch=function(e,t){if("string"!=typeof e)return Promise.reject(new Error("only String url supported"));var n=t||{},r={};if(n.headers)if(n.headers instanceof fr)r=n.headers.getAll();else{if(n.headers.constructor!==Object)return Promise.reject(new Error("Only Headers instance or a pure object is acceptable for headers option"));r=new fr(n.headers).getAll()}var i={method:n.method||"GET",url:e,headers:r||{},body:n.body||""};return new Promise(function(e,t){Hippy.bridge.callNativeWithPromise("network","fetch",i).then(function(n){if("object"==typeof n){var r=new pr(n);e(r)}else t(n)}).catch(function(e){t(e)})})},Ar.__WebSocket=Ar.WebSocket,Ar.getTurboModule=function(e){var t=Hippy.web.engine.modules[e];return t},Ar.dynamicLoad=function(e,t,n){var r=document.createElement("script");r.async=!0,r.setAttribute("src",e),"function"==typeof n&&(r.onload=function(){n()},r.onerror=function(){n('load script "'.concat(e,'" error'))}),document.head.appendChild(r)},__GLOBAL__.appRegister={},__GLOBAL__.nodeIdCache={},__GLOBAL__.nodeTreeCache={},__GLOBAL__.nodeParamCache={},__GLOBAL__.moduleCallId=0,__GLOBAL__.moduleCallList={},__GLOBAL__.canRequestAnimationFrame=!0,__GLOBAL__.requestAnimationFrameId=0,__GLOBAL__.requestAnimationFrameQueue={},__GLOBAL__.destroyInstanceList={},Hippy.bridge=Sr,Hippy.device={vibrate:function(){},cancelVibrate:function(){}},Hippy.register={regist:function(e,t){"ios"===__HIPPYNATIVEGLOBAL__.OS&&Hippy.bridge.callNative("JSCExecutor","setContextName","HippyContext: ".concat(e)),__GLOBAL__.appRegister[e]={run:t}}},Hippy.on=yr,Hippy.off=mr,Hippy.emit=gr,Hippy.asyncStorage=br,Hippy.turboPromise=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new Promise(function(t,r){var i={resolve:t,reject:r};e.apply(null,[].concat(n,[i]))})}},Hippy.document=kr,Hippy.device.platform={OS:__HIPPYNATIVEGLOBAL__.Platform.OS,Localization:__HIPPYNATIVEGLOBAL__.Platform.Localization||Er},Hippy.SceneBuilder=ar,Hippy.Animation=lr,Hippy.AnimationSet=cr,Ar.__localStorage=Ar.localStorage,Object.defineProperty(Ar,"localStorage",{value:Hippy.asyncStorage}),Ar.turboPromise=Hippy.turboPromise,Object.defineProperty(Ar.console,"reportUncaughtException",{value:function(e){if(e&&e instanceof Error)throw e}}),Ar.addEventListener("unhandledrejection",function(e){Ar.Hippy.emit("unhandledRejection",null==e?void 0:e.reason,null==e?void 0:e.promise)}),hr.init(),function(e){e.VIEW="View",e.TEXT="Text",e.IMAGE="Image",e.LIST_ITEM="ListViewItem",e.LIST="ListView",e.REFRESH="RefreshWrapper",e.REFRESH_ITEM="RefreshWrapperItemView",e.SCROLL_VIEW="ScrollView",e.VIEW_PAGER="ViewPager",e.VIEW_PAGER_ITEM="ViewPagerItem",e.TEXT_INPUT="TextInput",e.MODAL="Modal",e.WEB_VIEW="WebView"}(vr||(vr={}));var xr,Cr,Tr,Ir,Or,Lr,Pr,Rr,Nr=2;!function(e){e.HEAD="head",e.clip="clip",e.MIDDLE="middle",e.TAIL="tail"}(xr||(xr={})),function(e){e.COVER="cover",e.CONTAIN="contain",e.STRETCH="stretch",e.REPEAT="repeat",e.CENTER="center"}(Cr||(Cr={})),function(e){e.ELLIPSIZE_MODE="ellipsizeMode",e.TINY_COLOR="tinyColor",e.ON_LOAD="onLoad",e.ON_LOAD_START="onLoadStart",e.ON_LOAD_END="onLoadEnd",e.RESIZE_MODE="resizeMode",e.SOURCE="source",e.DEFAULT_SOURCE="defaultSource",e.ON_ERROR="onError",e.ON_PROGRESS="onProgress",e.CAP_INSETS="capInsets",e.HORIZONTAL="horizontal",e.STYLE="style",e.METHOD="method",e.USER_AGENT="userAgent",e.INITIAL_LIST_SIZE="initialListSize",e.INITIAL_CONTENT_OFFSET="initialContentOffset",e.BOUNCES="bounces",e.CONTENT_CONTAINER_STYLE="contentContainerStyle",e.SCROLL_INDICATOR_INSETS="scrollIndicatorInsets",e.OVER_SCROLL_ENABLED="overScrollEnabled",e.PRELOAD_ITEM_NUMBER="preloadItemNumber",e.ON_APPEAR="onAppear",e.ON_DISAPPEAR="onDisappear",e.ON_WILL_APPEAR="onWillAppear",e.ON_WILL_DISAPPEAR="onWillDisappear",e.ON_END_REACHED="onEndReached",e.ON_LOAD_MORE="onLoadMore",e.ON_MOMENTUM_SCROLL_BEGIN="onMomentumScrollBegin",e.ON_MOMENTUM_SCROLL_END="onMomentumScrollEnd",e.ON_SCROLL="onScroll",e.ON_SCROLL_BEGIN_DRAG="onScrollBeginDrag",e.ON_SCROLL_END_DRAG="onScrollEndDrag",e.ROW_SHOULD_STICKY="rowShouldSticky",e.STICKY="sticky",e.ON_HEADER_PULLING="onHeaderPulling",e.ON_HEADER_RELEASED="onHeaderReleased",e.SCROLL_EVENT_THROTTLE="scrollEventThrottle",e.INITIAL_LIST_READY="initialListReady",e.SCROLL_TO_CONTENT_OFFSET="scrollToContentOffset",e.SCROLL_TO_INDEX="scrollToIndex",e.COLLAPSE_PULL_HEADER="collapsePullHeader",e.ANIMATED="animated",e.ANIMATION_TYPE="animationType",e.SUPPORTED_ORIENTATIONS="supportedOrientations",e.IMMERSION_STATUS_BAR="immersionStatusBar",e.DARK_STATUS_BAR_TEXT="darkStatusBarText",e.ON_SHOW="onShow",e.ON_ORIENTATION_CHANGE="onOrientationChange",e.ON_REQUEST_CLOSE="onRequestClose",e.TRANSPARENT="transparent",e.VISIBLE="visible",e.ON_REFRESH="onRefresh",e.GET_REFRESH="getRefresh",e.BOUNCE_TIME="bounceTime",e.REFRESH_COMPLETED="refreshComplected",e.START_REFRESH="startRefresh",e.PAGING_ENABLED="pagingEnabled",e.SCROLL_ENABLED="scrollEnabled",e.SHOW_HORIZONTAL_SCROLL_INDICATOR="showsHorizontalScrollIndicator",e.SHOW_VERTICAL_SCROLL_INDICATOR="showsVerticalScrollIndicator",e.SHOW_SCROLL_INDICATOR="showScrollIndicator",e.DEFAULT_VALUE="defaultValue",e.EDITABLE="editable",e.KEY_BOARD_TYPE="keyboardType",e.MAX_LENGTH="maxLength",e.MULTILINE="multiline",e.NUMBER_OF_LINES="numberOfLines",e.ON_BLUR="onBlur",e.ON_CHANGE_TEXT="onChangeText",e.ON_KEYBOARD_WILL_SHOW="onKeyboardWillShow",e.ON_END_EDITING="onEndEditing",e.ON_SELECTION_CHANGE="onSelectionChange",e.PLACEHOLDER="placeholder",e.PLACEHOLDER_TEXT_COLOR="placeholderTextColor",e.PLACEHOLDER_TEXT_COLORS="placeholderTextColors",e.RETURN_KEY_TYPE="returnKeyType",e.VALUE="value",e.AUTO_FOCUS="autoFocus",e.BLUR_TEXT_INPUT="blurTextInput",e.CLEAR="clear",e.FOCUS_TEXT_INPUT="focusTextInput",e.IS_FOCUSED="isFocused",e.GET_VALUE="getValue",e.HIDE_INPUT_METHOD="hideInputMethod",e.SET_VALUE="setValue",e.SHOW_INPUT_METHOD="showInputMethod",e.ON_LAYOUT="onLayout",e.ACCESSIBLE="accessible",e.ACCESSIBILITY_LABEL="accessibilityLabel",e.OPACITY="opacity",e.OVERFLOW="overflow",e.ON_ATTACHED_TO_WINDOW="onAttachedToWindow",e.ON_TOUCH_DOWN="onTouchDown",e.ON_TOUCH_MOVE="onTouchMove",e.ON_TOUCH_END="onTouchEnd",e.ON_TOUCH_CANCEL="onTouchCancel",e.HIPPY_VIEW_PAGER_ITEM_PROPS="hippyViewPagerItemProps",e.INITIAL_PAGE="initialPage",e.ON_PAGE_SELECTED="onPageSelected",e.ON_PAGE_SCROLL="onPageScroll",e.ON_PAGE_SCROLL_STATE_CHANGED="onPageScrollStateChanged",e.DIRECTION="direction",e.SET_PAGE="setPage",e.SET_PAGE_WITHOUT_ANIMATION="setPageWithoutAnimation",e.ON_CLICK="onClick",e.ON_LONG_CLICK="onLongClick"}(Tr||(Tr={})),function(e){e.default="default",e.numeric="numeric",e.password="password",e.email="email",e.phonePad="phone-pad"}(Ir||(Ir={})),function(e){e.done="done",e.go="go",e.next="next",e.search="search",e.send="send"}(Or||(Or={})),function(e){e.Slide="slide",e.Fade="fade",e.SlideFade="slide_fade",e.None="none"}(Lr||(Lr={})),function(e){e.Portrait="portrait",e.PortraitUpsideDown="portrait-upside-down",e.Landscape="landscape",e.LandscapeLeft="landscape-left",e.LandscapeRight="landscape-right"}(Pr||(Pr={})),function(e){e.IDLE="idle",e.DRAG="dragging",e.SETTL="settling"}(Rr||(Rr={}));var Dr="marginVertical",Mr="marginHorizontal",Fr="paddingVertical",Br="paddingHorizontal";function jr(e,t){return e&&Object.prototype.hasOwnProperty.call(e,t)}function Ur(e,t,n){if(null!==t){for(var r,i,o,a,s={},u={},l={},c=0,h=Object.keys(t);c<h.length;c++){var d=h[c];if(jr(t,d))if(-1===d.indexOf("shadow"))if(-1===d.indexOf("textShadow"))if(!Hr(d)||isNaN(t[d]))if(Wr(d,t[d])&&n)n(d,t[d],e);else if(Zr(d)&&"span"===e.tagName){var f=Xr(t[d]);Vr(e,d,f),Vr(e,"line-height",f)}else{if(Gr(d,t[d]))Vr(e,d,Xr(t[d]));else Yr(d)?Vr(e,d,parseInt(t[d],10)):(qr(d)&&(l[d]=t[d]),Vr(e,d,t[d]))}else Vr(e,d,zr(t[d]));else u[d]=t[d];else s[d]=t[d]}!function(e,t){t.borderStyle||Kr(e,t);!t.borderStyle||t.borderWidth||t.borderTopWidth||t.borderLeftWidth||t.borderRightWidth||t.borderBottomWidth?!t.borderStyle&&t.borderWidth?Vr(e,"borderStyle","solid"):t.borderStyle&&!t.borderWidth&&(t.borderTopWidth||t.borderLeftWidth||t.borderRightWidth||t.borderBottomWidth)&&(Vr(e,"borderStyle","none"),Kr(e,t)):Vr(e,"borderStyle","none");void 0!==t[Dr]&&(Vr(e,"marginTop",Xr(t[Dr])),Vr(e,"marginBottom",Xr(t[Dr])));void 0!==t[Mr]&&(Vr(e,"marginLeft",Xr(t[Mr])),Vr(e,"marginRight",Xr(t[Mr])));void 0!==t[Fr]&&(Vr(e,"paddingTop",Xr(t[Fr])),Vr(e,"paddingBottom",Xr(t[Fr])));void 0!==t[Br]&&(Vr(e,"paddingLeft",Xr(t[Br])),Vr(e,"paddingRight",Xr(t[Br])))}(e,t),s.shadowRadius&&Vr(e,"box-shadow","".concat(null!==(i=(r=s).shadowOffsetX)&&void 0!==i?i:0,"px ").concat(null!==(o=r.shadowOffsetY)&&void 0!==o?o:0,"px ").concat(null!==(a=r.shadowRadius)&&void 0!==a?a:0,"px ").concat(zr(r.shadowColor))),(u.textShadowColor||u.textShadowOffset||u.textShadowOffsetX||u.textShadowOffsetY)&&Vr(e,"text-shadow",function(e){var t,n,r,i,o,a,s;return"".concat(null!==(r=null!==(t=null==e?void 0:e.textShadowOffsetX)&&void 0!==t?t:null===(n=null==e?void 0:e.textShadowOffset)||void 0===n?void 0:n.width)&&void 0!==r?r:0,"px ").concat(null!==(a=null!==(i=null==e?void 0:e.textShadowOffsetY)&&void 0!==i?i:null===(o=null==e?void 0:e.textShadowOffset)||void 0===o?void 0:o.height)&&void 0!==a?a:0,"px\n ").concat(null!==(s=e.textShadowRadius)&&void 0!==s?s:0,"px ").concat(zr(e.textShadowColor))}(u)),function(e,t){for(var n,r=function(){var r=o[i];if("backgroundImage"===r)return Vr(t,r,"url(".concat(e.backgroundImage,")")),1;if("backgroundSize"===r&&"contain"===e.backgroundSize?Vr(t,r,"100% 100%"):"backgroundSize"===r&&Vr(t,r,e.backgroundSize),"linearGradient"===r){var a="".concat(null!==(n=e.linearGradient.angle)&&void 0!==n?n:"0","deg"),s="".concat(a," ");e.linearGradient.colorStopList.forEach(function(e){s+=",".concat(zr(e.color)).concat(e.ratio>=0?" ".concat(100*e.ratio,"%"):"")}),Vr(t,"background","linear-gradient(".concat(s,")"))}},i=0,o=Object.keys(e);i<o.length;i++)r();Object.keys(e).length>0&&Vr(t,"backgroundRepeat","no-repeat")}(l,e)}}function Wr(e,t){return!!jr(t,"animationId")||(!("transform"!==e||!Array.isArray(t))||void 0)}function Vr(e,t,n){var r;null!==e.style[t]&&void 0!==e.style[t]&&""!==e.style[t]&&e.style[t]===(null===(r=null==n?void 0:n.trim)||void 0===r?void 0:r.call(n))||(e.style[t]=n)}function zr(e){var t=e>>24&255,n=e>>8&255,r=255&e;return"rgba(".concat(e>>16&255,", ").concat(n,", ").concat(r,", ").concat((t/256).toFixed(3),")")}function Hr(e){return e.endsWith("Color")||e.endsWith("color")}function Gr(e,t){return!(isNaN(t)||e.startsWith("flex")||e.startsWith("zIndex")||e.startsWith("-webkit")||e.startsWith("z-index")||e.startsWith("opacity"))}function Yr(e){return e.startsWith("zIndex")||e.startsWith("z-index")}function qr(e){return e.startsWith("background")||e.startsWith("linearGradient")}function Xr(e){return isNaN(e)?e:"".concat(e,"px")}function Zr(e){return e.startsWith("fontSize")}function Kr(e,t){t.borderTopWidth&&Vr(e,"borderTopStyle","solid"),t.borderLeftWidth&&Vr(e,"borderLeftStyle","solid"),t.borderRightWidth&&Vr(e,"borderRightStyle","solid"),t.borderBottomWidth&&Vr(e,"borderBottomStyle","solid")}function $r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]}var Jr=function(){},Qr=function(){return R(function e(t){O(this,e),this.engine=t},[{key:"sendEvent",value:function(e,t){hippyBridge("callJsModule",{moduleName:"EventDispatcher",methodName:"receiveNativeEvent",params:[e,t]})}},{key:"sendUiEvent",value:function(e,t,n){hippyBridge("callJsModule",{moduleName:"EventDispatcher",methodName:"receiveUIComponentEvent",params:[e,t,n]})}},{key:"sendGestureEvent",value:function(e){hippyBridge("callJsModule",{moduleName:"EventDispatcher",methodName:"receiveNativeGesture",params:e})}},{key:"subscribe",value:function(e,t){this.engine.eventBus.subscribe(e,t)}},{key:"getModuleByName",value:function(e){return this.engine.modules[e]}}])}(),ei=function(){return R(function e(){O(this,e),this.subscriptions=Object.create(null)},[{key:"subscribe",value:function(e,t){if("function"!=typeof t)throw"Subscribers must be functions";var n=this.subscriptions[e]||[];n.push(t),this.subscriptions[e]=n}},{key:"publish",value:function(e){for(var t=this.subscriptions[e]||[],n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var o=0;o<t.length;o++)t[o].apply(null,r)}},{key:"unsubscribe",value:function(e,t){var n=(this.subscriptions[e]||[]).filter(function(e){return e!==t});this.subscriptions[e]=n}},{key:"cancel",value:function(e){delete this.subscriptions[e]}}])}();function ti(e){return new Promise(function(t){var n=e.length;function r(e){var r=document.createElement("script");r.setAttribute("src",e),r.onload=function(){(n-=1)<1&&t()},document.body.appendChild(r)}var i,o=qn(e);try{for(o.s();!(i=o.n()).done;){r(i.value)}}catch(e){o.e(e)}finally{o.f()}})}var ni=function(){function e(t){O(this,e),this.modules={},this.components={},this.eventBus=new ei,this.pendingQueue={},this.pendingModules={},this.context=new Qr(this);var n=t||{},r=n.modules,i=n.components;this.registerCore(),this.registerModules(r),this.registerComponents(i),er.hippyCallNatives=function(e){return function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];e.invokeModuleMethod(t,n,r,i)}}(this),this.eventBus.publish("ready")}return R(e,[{key:"registerCore",value:function(){this.registerModules(e.coreModules),this.registerComponents(e.coreComponents)}},{key:"registerModules",value:function(e){var t=this;Object.keys(e||{}).forEach(function(n){var r=new(0,e[n])(t.context),i=""===r.name?n:r.name;t.modules[i]=r})}},{key:"registerComponents",value:function(e){var t=this;if(void 0!==e)if(Array.isArray(e))e.forEach(function(e){t.components[e.name]=e});else for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];this.registerComponent(i,e[i])}}},{key:"registerComponent",value:function(e,t){this.components[e]=t}},{key:"start",value:function(e){var t=this,n=e;n.params||(n.params={}),this.instance=n,Object.keys(this.modules).forEach(function(e){var n;null===(n=t.modules[e])||void 0===n||n.init()}),hippyBridge("loadInstance",n),this.eventBus.publish("loaded")}},{key:"stop",value:function(){this.eventBus.publish("beforeDestroy"),this.instance&&hippyBridge("destroyInstance",this.instance.id)}},{key:"pause",value:function(){hippyBridge("pauseInstance")}},{key:"resume",value:function(){hippyBridge("resumeInstance")}},{key:"load",value:function(e){return ti(e)}},{key:"invokeModuleMethod",value:(n=l(h().mark(function e(t,n,r){var i,o,a,s,u=arguments;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=u.length>3&&void 0!==u[3]?u[3]:[],!(null==(o=this.modules[t])?void 0:o[n])){e.next=5;break}if("sequential"!==o.mode){e.next=4;break}if(this.pendingQueue[t]||(this.pendingQueue[t]=[]),(a=this.pendingQueue[t]).push([t,n,r,i]),!0!==this.pendingModules[t]){e.next=1;break}return e.abrupt("return");case 1:if(!(a.length>0)){e.next=3;break}return this.pendingModules[t]=!0,s=a[0],e.next=2,this.invokeModuleMethodImmediately(s[0],s[1],s[2],s[3]);case 2:a.shift(),e.next=1;break;case 3:this.pendingModules[t]=!1,e.next=5;break;case 4:return e.next=5,this.invokeModuleMethodImmediately(t,n,r,i);case 5:case"end":return e.stop()}},e,this)})),function(e,t,r){return n.apply(this,arguments)})},{key:"invokeModuleMethodImmediately",value:(t=l(h().mark(function e(t,n,r){var i,o,a,s,u,l=arguments;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=l.length>3&&void 0!==l[3]?l[3]:[],o=this.modules[t],a=null!=r?ri(t,n,r):void 0,s=[].concat(y(i),[a]),u=o[n],e.prev=1,e.next=2,u.apply(o,s);case 2:e.next=4;break;case 3:e.prev=3,e.catch(1);case 4:case"end":return e.stop()}},e,this,[[1,3]])})),function(e,n,r){return t.apply(this,arguments)})}],[{key:"create",value:function(t){if(void 0===Hippy.web.engine){var n=new e(t);Hippy.web.engine=n}return Hippy.web.engine}}]);var t,n}();ni.coreModules={};var ri=function(e,t,n){return{resolve:function(r){hippyBridge("callBack",{callId:n,methodName:t,moduleName:e,params:r,result:0})},reject:function(r){hippyBridge("callBack",{callId:n,methodName:t,moduleName:e,params:r,result:-1})}}},ii=R(function e(){O(this,e),this.name=""}),oi=function(e){function t(e){var n;return O(this,t),(n=$n(this,t)).mode="normal",n.context=e,n}return Gn(t,e),R(t,[{key:"init",value:function(){}}])}(ii),ai=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),si="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,ui=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),li="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(ui):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)};var ci=["top","right","bottom","left","width","height","size","weight"],hi="undefined"!=typeof MutationObserver,di=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&s()}function a(){li(o)}function s(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,t);i=e}return s}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){si&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),hi?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){si&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;ci.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),fi=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},pi=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||ui},vi=wi(0,0,0,0);function yi(e){return parseFloat(e)||0}function mi(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+yi(e["border-"+n+"-width"])},0)}function gi(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return vi;var r=pi(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=e["padding-"+i];t[i]=yi(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=yi(r.width),u=yi(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=mi(r,"left","right")+o),Math.round(u+a)!==n&&(u-=mi(r,"top","bottom")+a)),!function(e){return e===pi(e).document.documentElement}(e)){var l=Math.round(s+o)-t,c=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(c)&&(u-=c)}return wi(i.left,i.top,s,u)}var _i="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof pi(e).SVGGraphicsElement}:function(e){return e instanceof pi(e).SVGElement&&"function"==typeof e.getBBox};function bi(e){return si?_i(e)?function(e){var t=e.getBBox();return wi(0,0,t.width,t.height)}(e):gi(e):vi}function wi(e,t,n,r){return{x:e,y:t,width:n,height:r}}var ki=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=wi(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=bi(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),Ei=function(e,t){var n,r,i,o,a,s,u,l=(r=(n=t).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),fi(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);fi(this,{target:e,contentRect:l})},Si=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new ai,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof pi(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new ki(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof pi(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new Ei(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Ai="undefined"!=typeof WeakMap?new WeakMap:new ai,xi=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=di.getInstance(),r=new Si(t,n,this);Ai.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){xi.prototype[e]=function(){var t;return(t=Ai.get(this))[e].apply(t,arguments)}});var Ci=void 0!==ui.ResizeObserver?ui.ResizeObserver:xi;function Ti(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ii={exports:{}};!function(e){!function(t,n,r,i){var o,a=["","webkit","Moz","MS","ms","o"],s=n.createElement("div"),u=Math.round,l=Math.abs,c=Date.now;function h(e,t,n){return setTimeout(g(e,n),t)}function d(e,t,n){return!!Array.isArray(e)&&(f(e,n[t],n),!0)}function f(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==i)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function p(e,n,r){var i="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,i,r),e.apply(this,arguments)}}o="function"!=typeof Object.assign?function(e){if(e===i||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==i&&null!==r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t}:Object.assign;var v=p(function(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;)(!n||n&&e[r[o]]===i)&&(e[r[o]]=t[r[o]]),o++;return e},"extend","Use `assign`."),y=p(function(e,t){return v(e,t,!0)},"merge","Use `assign`.");function m(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&o(r,n)}function g(e,t){return function(){return e.apply(t,arguments)}}function _(e,t){return"function"==typeof e?e.apply(t&&t[0]||i,t):e}function b(e,t){return e===i?t:e}function w(e,t,n){f(A(t),function(t){e.addEventListener(t,n,!1)})}function k(e,t,n){f(A(t),function(t){e.removeEventListener(t,n,!1)})}function E(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function S(e,t){return e.indexOf(t)>-1}function A(e){return e.trim().split(/\s+/g)}function x(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function C(e){return Array.prototype.slice.call(e,0)}function T(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];x(i,a)<0&&r.push(e[o]),i[o]=a,o++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}function I(e,t){for(var n,r,o=t[0].toUpperCase()+t.slice(1),s=0;s<a.length;){if((r=(n=a[s])?n+o:t)in e)return r;s++}return i}var O=1;function L(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var P="ontouchstart"in t,R=I(t,"PointerEvent")!==i,N=P&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),D="touch",M="mouse",F=24,B=["x","y"],j=["clientX","clientY"];function U(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){_(e.options.enable,[e])&&n.handler(t)},this.init()}function W(e,t,n){var r=n.pointers.length,o=n.changedPointers.length,a=1&t&&r-o===0,s=12&t&&r-o===0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,o=r.length;n.firstInput||(n.firstInput=V(t));o>1&&!n.firstMultiple?n.firstMultiple=V(t):1===o&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,u=s?s.center:a.center,h=t.center=z(r);t.timeStamp=c(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=q(u,h),t.distance=Y(u,h),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y});t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=G(t.deltaX,t.deltaY);var d=H(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=l(d.x)>l(d.y)?d.x:d.y,t.scale=s?(f=s.pointers,p=r,Y(p[0],p[1],j)/Y(f[0],f[1],j)):1,t.rotation=s?function(e,t){return q(t[1],t[0],j)+q(e[1],e[0],j)}(s.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,o,a,s=e.lastInterval||t,u=t.timeStamp-s.timeStamp;if(8!=t.eventType&&(u>25||s.velocity===i)){var c=t.deltaX-s.deltaX,h=t.deltaY-s.deltaY,d=H(u,c,h);r=d.x,o=d.y,n=l(d.x)>l(d.y)?d.x:d.y,a=G(c,h),e.lastInterval=t}else n=s.velocity,r=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=r,t.velocityY=o,t.direction=a}(n,t);var f,p;var v=e.element;E(t.srcEvent.target,v)&&(v=t.srcEvent.target);t.target=v}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function V(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:u(e.pointers[n].clientX),clientY:u(e.pointers[n].clientY)},n++;return{timeStamp:c(),pointers:t,center:z(t),deltaX:e.deltaX,deltaY:e.deltaY}}function z(e){var t=e.length;if(1===t)return{x:u(e[0].clientX),y:u(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:u(n/t),y:u(r/t)}}function H(e,t,n){return{x:t/e||0,y:n/e||0}}function G(e,t){return e===t?1:l(e)>=l(t)?e<0?2:4:t<0?8:16}function Y(e,t,n){n||(n=B);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function q(e,t,n){n||(n=B);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}U.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(L(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(L(this.element),this.evWin,this.domHandler)}};var X={mousedown:1,mousemove:2,mouseup:4},Z="mousedown",K="mousemove mouseup";function $(){this.evEl=Z,this.evWin=K,this.pressed=!1,U.apply(this,arguments)}m($,U,{handler:function(e){var t=X[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:M,srcEvent:e}))}});var J={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:D,3:"pen",4:M,5:"kinect"},ee="pointerdown",te="pointermove pointerup pointercancel";function ne(){this.evEl=ee,this.evWin=te,U.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ee="MSPointerDown",te="MSPointerMove MSPointerUp MSPointerCancel"),m(ne,U,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=J[r],o=Q[e.pointerType]||e.pointerType,a=o==D,s=x(t,e.pointerId,"pointerId");1&i&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&i&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var re={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ie(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,U.apply(this,arguments)}function oe(e,t){var n=C(e.touches),r=C(e.changedTouches);return 12&t&&(n=T(n.concat(r),"identifier",!0)),[n,r]}m(ie,U,{handler:function(e){var t=re[e.type];if(1===t&&(this.started=!0),this.started){var n=oe.call(this,e,t);12&t&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:D,srcEvent:e})}}});var ae={touchstart:1,touchmove:2,touchend:4,touchcancel:8},se="touchstart touchmove touchend touchcancel";function ue(){this.evTarget=se,this.targetIds={},U.apply(this,arguments)}function le(e,t){var n=C(e.touches),r=this.targetIds;if(3&t&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=C(e.changedTouches),s=[],u=this.target;if(o=n.filter(function(e){return E(e.target,u)}),1===t)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&t&&delete r[a[i].identifier],i++;return s.length?[T(o.concat(s),"identifier",!0),s]:void 0}m(ue,U,{handler:function(e){var t=ae[e.type],n=le.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:D,srcEvent:e})}});function ce(){U.apply(this,arguments);var e=g(this.handler,this);this.touch=new ue(this.manager,e),this.mouse=new $(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function he(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,de.call(this,t)):12&e&&de.call(this,t)}function de(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},2500)}}function fe(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}m(ce,U,{handler:function(e,t,n){var r=n.pointerType==D,i=n.pointerType==M;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)he.call(this,t,n);else if(i&&fe.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var pe=I(s.style,"touchAction"),ve=pe!==i,ye="compute",me="auto",ge="manipulation",_e="none",be="pan-x",we="pan-y",ke=function(){if(!ve)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(r){e[r]=!n||t.CSS.supports("touch-action",r)}),e}();function Ee(e,t){this.manager=e,this.set(t)}Ee.prototype={set:function(e){e==ye&&(e=this.compute()),ve&&this.manager.element.style&&ke[e]&&(this.manager.element.style[pe]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return f(this.manager.recognizers,function(t){_(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(e){if(S(e,_e))return _e;var t=S(e,be),n=S(e,we);if(t&&n)return _e;if(t||n)return t?be:we;if(S(e,ge))return ge;return me}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=S(r,_e)&&!ke[_e],o=S(r,we)&&!ke[we],a=S(r,be)&&!ke[be];if(i){var s=1===e.pointers.length,u=e.distance<2,l=e.deltaTime<250;if(s&&u&&l)return}if(!a||!o)return i||o&&6&n||a&&n&F?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var Se=32;function Ae(e){this.options=o({},this.defaults,e||{}),this.id=O++,this.manager=null,this.options.enable=b(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function xe(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Ce(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function Te(e,t){var n=t.manager;return n?n.get(e):e}function Ie(){Ae.apply(this,arguments)}function Oe(){Ie.apply(this,arguments),this.pX=null,this.pY=null}function Le(){Ie.apply(this,arguments)}function Pe(){Ae.apply(this,arguments),this._timer=null,this._input=null}function Re(){Ie.apply(this,arguments)}function Ne(){Ie.apply(this,arguments)}function De(){Ae.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Me(e,t){return(t=t||{}).recognizers=b(t.recognizers,Me.defaults.preset),new Fe(e,t)}Ae.prototype={defaults:{},set:function(e){return o(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(d(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Te(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return d(e,"dropRecognizeWith",this)||(e=Te(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(d(e,"requireFailure",this))return this;var t=this.requireFail;return-1===x(t,e=Te(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(d(e,"dropRequireFailure",this))return this;e=Te(e,this);var t=x(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+xe(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+xe(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=Se},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=o({},e);if(!_(this.options.enable,[this,t]))return this.reset(),void(this.state=Se);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},m(Ie,Ae,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(8&n||!i)?16|t:r||i?4&n?8|t:2&t?4|t:2:Se}}),m(Oe,Ie,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(we),e&F&&t.push(be),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,a=e.deltaY;return i&t.direction||(6&t.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return Ie.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Ce(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),m(Le,Ie,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),m(Pe,Ae,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[me]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime>t.time;if(this._input=e,!r||!n||12&e.eventType&&!i)this.reset();else if(1&e.eventType)this.reset(),this._timer=h(function(){this.state=8,this.tryEmit()},t.time,this);else if(4&e.eventType)return 8;return Se},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=c(),this.manager.emit(this.options.event,this._input)))}}),m(Re,Ie,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),m(Ne,Ie,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Oe.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:n&F&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&l(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Ce(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),m(De,Ae,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ge]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||Y(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=h(function(){this.state=8,this.tryEmit()},t.interval,this),2):8}return Se},failTimeout:function(){return this._timer=h(function(){this.state=Se},this.options.interval,this),Se},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Me.VERSION="2.0.7",Me.defaults={domEvents:!1,touchAction:ye,enable:!0,inputTarget:null,inputClass:null,preset:[[Re,{enable:!1}],[Le,{enable:!1},["rotate"]],[Ne,{direction:6}],[Oe,{direction:6},["swipe"]],[De],[De,{event:"doubletap",taps:2},["tap"]],[Pe]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Fe(e,t){var n;this.options=o({},Me.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(R?ne:N?ue:P?ce:$))(n,W),this.touchAction=new Ee(this,this.options.touchAction),Be(this,!0),f(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function Be(e,t){var n,r=e.element;r.style&&(f(e.options.cssProps,function(i,o){n=I(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""}),t||(e.oldCssProps={}))}Fe.prototype={set:function(e){return o(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(i=t.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(i=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Ae)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(d(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(d(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=x(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==i&&t!==i){var n=this.handlers;return f(A(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this}},off:function(e,t){if(e!==i){var n=this.handlers;return f(A(e),function(e){t?n[e]&&n[e].splice(x(n[e],t),1):delete n[e]}),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var r=n.createEvent("Event");r.initEvent(e,!0,!0),r.gesture=t,t.target.dispatchEvent(r)}(e,t);var r=this.handlers[e]&&this.handlers[e].slice();if(r&&r.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](t),i++}},destroy:function(){this.element&&Be(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},o(Me,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Se,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:F,DIRECTION_ALL:30,Manager:Fe,Input:U,TouchAction:Ee,TouchInput:ue,MouseInput:$,PointerEventInput:ne,TouchMouseInput:ce,SingleTouchInput:ie,Recognizer:Ae,AttrRecognizer:Ie,Tap:De,Pan:Oe,Swipe:Ne,Pinch:Le,Rotate:Re,Press:Pe,on:w,off:k,each:f,merge:y,extend:v,assign:o,inherit:m,bindFn:g,prefixed:I}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=Me,e.exports?e.exports=Me:t.Hammer=Me}(window,document)}(Ii);var Oi=function(){return R(function e(t,n,r){O(this,e),this.props={},this.firstUpdateStyle=!0,this.layoutCache=null,this.exitChildrenStackContext=!1,this.events={},this.mountedLayoutDispatch=!1,this.updatedZIndex=!1,this.id=n,this.pId=r,this.context=t,this.handleOnTouchStart=this.handleOnTouchStart.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.handleOnTouchCancel=this.handleOnTouchCancel.bind(this),this.handleOnTouchEnd=this.handleOnTouchEnd.bind(this),this.handleOnTouchMove=this.handleOnTouchMove.bind(this),this.handleOnLongClick=this.handleOnLongClick.bind(this)},[{key:"updateProperty",value:function(e,t){"function"!=typeof this[e]&&"style"!==e&&e in this&&this[e]!==t?this[e]=t:this.props[e]=t}},{key:"initHammer",value:function(){this.hammer||(this.hammer=new Ii.exports.Manager(this.dom,{inputClass:Ii.exports.TouchInput}))}},{key:"onClick",get:function(){return!!this.props[Tr.ON_CLICK]},set:function(e){if(this.props[Tr.ON_CLICK]=e,this.initHammer(),this.hammer.remove("tap"),this.hammer.off("tap",this.handleOnClick),e){var t=new Ii.exports.Tap({time:200});this.hammer.add(t),this.hammer.on("tap",this.handleOnClick)}}},{key:"onLongClick",get:function(){return!!this.props[Tr.ON_LONG_CLICK]},set:function(e){if(this.props[Tr.ON_LONG_CLICK]=e,this.initHammer(),this.hammer.remove("press"),this.hammer.off("press",this.handleOnLongClick),e){var t=new Ii.exports.Press({time:200});this.hammer.add(t),this.hammer.on("press",this.handleOnLongClick)}}},{key:"onTouchDown",get:function(){return this.props[Tr.ON_TOUCH_DOWN]},set:function(e){this.props[Tr.ON_TOUCH_DOWN]=e,e?this.dom.addEventListener("touchstart",this.handleOnTouchStart):this.dom.removeEventListener("touchstart",this.handleOnTouchStart)}},{key:"onTouchMove",get:function(){return this.props[Tr.ON_TOUCH_MOVE]},set:function(e){this.props[Tr.ON_TOUCH_MOVE]=e,e?this.dom.addEventListener("touchmove",this.handleOnTouchMove):this.dom.removeEventListener("touchmove",this.handleOnTouchMove)}},{key:"onTouchEnd",get:function(){return this.props[Tr.ON_TOUCH_END]},set:function(e){this.props[Tr.ON_TOUCH_END]=e,e?this.dom.addEventListener("touchend",this.handleOnTouchEnd):this.dom.removeEventListener("touchend",this.handleOnTouchEnd)}},{key:"onTouchCancel",get:function(){return this.props[Tr.ON_TOUCH_CANCEL]},set:function(e){this.props[Tr.ON_TOUCH_CANCEL]=e,e?this.dom.addEventListener("touchcancel",this.handleOnTouchCancel):this.dom.removeEventListener("touchcancel",this.handleOnTouchCancel)}},{key:"onLayout",get:function(){return this.props[Tr.ON_LAYOUT]},set:function(e){var t;this.props[Tr.ON_LAYOUT]=e,e?(this.resizeObserver||(this.resizeObserver=new Ci(this.handleReLayout.bind(this))),this.resizeObserver.observe(this.dom)):null===(t=this.resizeObserver)||void 0===t||t.disconnect()}},{key:"changeStackContext",value:function(e){var t;if(!e&&this.exitChildrenStackContext){var n=!1;null===(t=this.dom)||void 0===t||t.childNodes.forEach(function(e){"absolute"!==e.style.position&&"relative"!==e.style.position||(n=!0)}),n||(this.exitChildrenStackContext=!1,this.updateChildzIndex())}else e&&!this.exitChildrenStackContext&&(this.exitChildrenStackContext=!0,this.updateChildzIndex())}},{key:"updateChildzIndex",value:function(){var e,t=this;null===(e=this.dom)||void 0===e||e.childNodes.forEach(function(e){var n=t.context.getModuleByName("UIManagerModule").findViewById(e.id);t.exitChildrenStackContext&&void 0!==!n.props.style.zIndex&&n.updateSelfStackContext(),!t.exitChildrenStackContext&&n.updatedZIndex&&n.updateSelfStackContext(!1)})}},{key:"updateSelfStackContext",value:function(){if(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])return this.props.style.zIndex=0,Ur(this.dom,{zIndex:0}),void(this.updatedZIndex=!0);delete this.props.style.zIndex,Ur(this.dom,{zIndex:"auto"}),this.updatedZIndex=!1}},{key:"updateProps",value:function(e,t){this.firstUpdateStyle&&(t(this,{style:this.defaultStyle()}),this.firstUpdateStyle=!1),t(this,e)}},{key:"defaultStyle",value:function(){return{display:"flex",flexDirection:"column",overflow:"hidden",flexShrink:0,boxSizing:"border-box"}}},{key:"onAttachedToWindow",value:function(){this.props[Tr.ON_ATTACHED_TO_WINDOW]&&this.dispatchEvent("onAttachedToWindow",null)}},{key:"beforeMount",value:(n=l(h().mark(function e(t,n){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.index=n;case 1:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"beforeChildMount",value:(t=l(h().mark(function e(t,n){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}},e)})),function(e,n){return t.apply(this,arguments)})},{key:"mounted",value:function(){var e=this;this.onAttachedToWindow(),this.onLayout?this.context.getModuleByName("UIManagerModule").addAfterCreateAction(function(){e.mountedLayoutDispatch=!0;var t=e.dom.getBoundingClientRect(),n={x:t.x,y:t.y,width:t.width,height:t.height};t.width===e.dom.clientWidth&&t.height===e.dom.clientHeight||(n={x:e.dom.offsetLeft,y:e.dom.offsetTop,width:e.dom.clientWidth,height:e.dom.clientHeight}),e.dispatchEvent("onLayout",{layout:n,target:e.id})}):this.mountedLayoutDispatch=!0}},{key:"beforeChildRemove",value:function(e){}},{key:"beforeRemove",value:(e=l(h().mark(function e(){var t;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:null===(t=this.resizeObserver)||void 0===t||t.disconnect();case 1:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){this.dom=null,this.events={}}},{key:"handleReLayout",value:function(e){var t=s(e,1)[0];if(t&&this.mountedLayoutDispatch){var n=t.contentRect,r=n.left,i=n.top,o=n.width,a=n.height;(!this.layoutCache||this.layoutCache.width!==o||this.layoutCache.height!==a)&&this.dom&&this.dom.parentNode&&this.id&&document.getElementById(String(this.id))&&(this.layoutCache={x:r,y:i,width:o,height:a},this.dispatchEvent("onLayout",{layout:this.layoutCache,target:this.id}))}}},{key:"addEventListener",value:function(e,t){this.updateProperty(e,!0),this.events[e]=t}},{key:"removeEventListener",value:function(e){this.updateProperty(e,!1),this.events[e]=null}},{key:"dispatchEvent",value:function(e,t){var n=this.events[e];n&&n.resolve({id:this.id,currentId:this.id,type:e,params:t,eventPhase:Nr,stopPropagation:function(){}})}},{key:"handleOnLongClick",value:function(e){this.onLongClick&&(this.dispatchEvent(Tr.ON_LONG_CLICK,e),e.srcEvent.stopPropagation())}},{key:"handleOnClick",value:function(e){this.onClick&&(this.dispatchEvent(Tr.ON_CLICK,e),e.srcEvent.stopPropagation())}},{key:"handleOnTouchStart",value:function(e){this.onTouchDown&&(this.dispatchEvent("onTouchDown",Li(e,"onTouchDown",this.id)),e.stopPropagation())}},{key:"handleOnTouchMove",value:function(e){this.onTouchMove&&(this.dispatchEvent("onTouchMove",Li(e,"onTouchMove",this.id)),e.stopPropagation(),e.preventDefault())}},{key:"handleOnTouchCancel",value:function(e){this.onTouchCancel&&(this.dispatchEvent("onTouchCancel",Li(e,"onTouchCancel",this.id)),e.stopPropagation())}},{key:"handleOnTouchEnd",value:function(e){this.onTouchEnd&&(this.dispatchEvent("onTouchEnd",Li(e,"onTouchEnd",this.id)),e.stopPropagation())}}]);var e,t,n}();function Li(e,t,n){var r=e.changedTouches[0];return{name:t,id:n,page_x:Number(r.pageX),page_y:Number(r.pageY)}}var Pi,Ri=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).isLoadSuccess=!1,i.tintModeContainerDom=null,i.renderImgDom=null,i.tagName=vr.IMAGE,i.dom=document.createElement("img"),i.renderImgDom=i.dom,i.handleLoad=i.handleLoad.bind(i),i.init(),i}return Gn(t,e),R(t,[{key:"updateProps",value:function(e,t){if(this.firstUpdateStyle&&(t(this,{style:this.defaultStyle()}),this.firstUpdateStyle=!1),void 0!==e.style.tintColor){var n=Kn({},e);return n.tintColor=e.style.tintColor,delete n.style.tintColor,void t(this,n)}t(this,e)}},{key:"defaultStyle",value:function(){return{boxSizing:"border-box",zIndex:0}}},{key:"tintColor",get:function(){return this.props[Tr.TINY_COLOR]},set:function(e){var t,n;if(this.props[Tr.TINY_COLOR]=e,void 0!==e&&0!==e){if(null===this.tintModeContainerDom)return this.buildTintDomContainer(),void((null===(t=this.dom)||void 0===t?void 0:t.parentNode)&&this.imgDomChangeContainer(null===(n=this.dom)||void 0===n?void 0:n.parentNode,this.tintModeContainerDom));this.updateTintColor()}else Ur(this.dom,{filter:""})}},{key:"capInsets",get:function(){return this.props[Tr.CAP_INSETS]},set:function(e){this.props[Tr.CAP_INSETS]=e}},{key:"resizeMode",get:function(){return this.props[Tr.RESIZE_MODE]},set:function(e){e||(this.props[Tr.RESIZE_MODE]=Cr.CONTAIN),this.props[Tr.RESIZE_MODE]=e,this.renderImgDom&&e&&Ur(this.renderImgDom,{objectFit:Ni[e]})}},{key:"src",get:function(){var e=this.props[Tr.SOURCE];return e&&/^(hpfile):\/\//.test(e)&&e.indexOf("assets")>-1?e.replace("hpfile://./",""):null!=e?e:""},set:function(e){var t=this;if(!e||this.src!==e){if(this.props[Tr.SOURCE]=null!=e?e:"",e&&e!==this.props[Tr.DEFAULT_SOURCE]&&(this.isLoadSuccess=!1),this.renderImgDom&&!this.defaultSource)return this.renderImgDom.src=null!=e?e:"",void this.onLoadStart(null);if(e){var n=document.createElement("img");n.addEventListener("load",function(n){t.src===e&&t.handleLoad(n,e)}),n.src=e,this.onLoadStart(null)}}}},{key:"defaultSource",get:function(){return this.props[Tr.DEFAULT_SOURCE]},set:function(e){this.props[Tr.DEFAULT_SOURCE]=e,this.isLoadSuccess||(this.renderImgDom.src=e)}},{key:"onLoad",value:function(e){this.props[Tr.ON_LOAD]&&this.dispatchEvent(Tr.ON_LOAD,e)}},{key:"onLoadStart",value:function(e){this.props[Tr.ON_LOAD_START]&&this.dispatchEvent(Tr.ON_LOAD_START,e)}},{key:"onLoadEnd",value:function(e){this.props[Tr.ON_LOAD_END]&&this.dispatchEvent(Tr.ON_LOAD_END,e)}},{key:"onError",value:function(e){this.props[Tr.ON_ERROR]&&this.dispatchEvent(Tr.ON_ERROR,e)}},{key:"onProgress",value:function(e){this.props[Tr.ON_PROGRESS]&&this.dispatchEvent(Tr.ON_PROGRESS,e)}},{key:"mounted",value:function(){if(this.tintModeContainerDom&&this.dom!==this.tintModeContainerDom){var e=this.dom.parentNode;this.imgDomChangeContainer(e,this.tintModeContainerDom),this.updateTintColor()}}},{key:"init",value:function(){this.dom.addEventListener("load",this.handleLoad)}},{key:"handleLoad",value:function(e,t){var n,r,i;this.isLoadSuccess=!1;var o={width:0,height:0,url:null!=t?t:""},a=e.currentTarget;a&&(i=a,o.width=i.width,o.height=i.height),(!t&&(null===(n=this.renderImgDom)||void 0===n?void 0:n.src)===this.src||t===this.src)&&(o.url=this.src,this.onLoad(o),(null===(r=this.renderImgDom)||void 0===r?void 0:r.src)!==this.src&&(this.renderImgDom.src=this.src)),this.onLoadEnd(o)}},{key:"buildTintDomContainer",value:function(){this.tintModeContainerDom=document.createElement("div"),this.tintModeContainerDom.style.overflow="hidden",this.tintModeContainerDom.style.lineHeight="100%"}},{key:"imgDomChangeContainer",value:function(e,t){var n,r=this.findDomIndex();e.removeChild(this.dom),this.dom=this.tintModeContainerDom,t.appendChild(this.renderImgDom),e.insertBefore(this.dom,null!==(n=e.childNodes[r])&&void 0!==n?n:null),this.context.getModuleByName("UIManagerModule").defaultUpdateViewProps(this,this.props),this.imgDomFilterNoUseStyle()}},{key:"imgDomFilterNoUseStyle",value:function(){var e=this.props.style;if(e)for(var t=0,n=Object.keys(e);t<n.length;t++){var r=n[t];if(!jr(e,r))return;-1===r.indexOf("width")&&-1===r.indexOf("height")&&(this.renderImgDom.style[r]="",this.clearBorder())}}},{key:"clearBorder",value:function(){this.renderImgDom.style.borderStyle="",this.renderImgDom.style.borderTopStyle="",this.renderImgDom.style.borderLeftStyle="",this.renderImgDom.style.borderRightStyle="",this.renderImgDom.style.borderBottomStyle=""}},{key:"findDomIndex",value:function(){var e,t=this,n=0;return null===(e=this.dom)||void 0===e||e.parentNode.childNodes.forEach(function(e,r){e===t.dom&&(n=r)}),n}},{key:"updateTintColor",value:function(){var e=zr(this.tintColor);Ur(this.renderImgDom,{transform:"translateX(-100%)",filter:"drop-shadow(".concat(this.props.style.width,"px 0 ").concat(e,")")})}}])}(Oi),Ni=((Pi={})[Cr.CENTER]="none",Pi[Cr.CONTAIN]="contain",Pi[Cr.STRETCH]="fill",Pi[Cr.REPEAT]="none",Pi[Cr.COVER]="cover",Pi),Di={exports:{}},Mi={exports:{}},Fi={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Fi);var Bi={exports:{}};!function(e){var t=Fi.exports.default;e.exports=function(e,n){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,n||"default");if("object"!==t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(Bi),function(e){var t=Fi.exports.default,n=Bi.exports;e.exports=function(e){var r=n(e,"string");return"symbol"===t(r)?r:String(r)},e.exports.__esModule=!0,e.exports.default=e.exports}(Mi),function(e){var t=Mi.exports;e.exports=function(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(Di);var ji,Ui=Ti(Di.exports);var Wi="undefined"==typeof document?void 0:document,Vi=!!Wi&&"content"in Wi.createElement("template"),zi=!!Wi&&Wi.createRange&&"createContextualFragment"in Wi.createRange();function Hi(e){return e=e.trim(),Vi?function(e){var t=Wi.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(e):zi?function(e){return ji||(ji=Wi.createRange()).selectNode(Wi.body),ji.createContextualFragment(e).childNodes[0]}(e):function(e){var t=Wi.createElement("body");return t.innerHTML=e,t.childNodes[0]}(e)}function Gi(e,t){var n,r,i=e.nodeName,o=t.nodeName;return i===o||(n=i.charCodeAt(0),r=o.charCodeAt(0),n<=90&&r>=97?i===o.toUpperCase():r<=90&&n>=97&&o===i.toUpperCase())}function Yi(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var qi={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();"OPTGROUP"===r&&(r=(n=n.parentNode)&&n.nodeName.toUpperCase()),"SELECT"!==r||n.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}Yi(e,t,"selected")},INPUT:function(e,t){Yi(e,t,"checked"),Yi(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var i=r.nodeValue;if(i==n||!n&&i==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n,r,i=-1,o=0,a=e.firstChild;a;)if("OPTGROUP"===(r=a.nodeName&&a.nodeName.toUpperCase()))a=(n=a).firstChild;else{if("OPTION"===r){if(a.hasAttribute("selected")){i=o;break}o++}!(a=a.nextSibling)&&n&&(a=n.nextSibling,n=null)}e.selectedIndex=i}}};function Xi(){}function Zi(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var Ki,$i=function(e){return function(t,n,r){if(r||(r={}),"string"==typeof n)if("#document"===t.nodeName||"HTML"===t.nodeName||"BODY"===t.nodeName){var i=n;(n=Wi.createElement("html")).innerHTML=i}else n=Hi(n);var o=r.getNodeKey||Zi,a=r.onBeforeNodeAdded||Xi,s=r.onNodeAdded||Xi,u=r.onBeforeElUpdated||Xi,l=r.onElUpdated||Xi,c=r.onBeforeNodeDiscarded||Xi,h=r.onNodeDiscarded||Xi,d=r.onBeforeElChildrenUpdated||Xi,f=!0===r.childrenOnly,p=Object.create(null),v=[];function y(e){v.push(e)}function m(e,t){if(1===e.nodeType)for(var n=e.firstChild;n;){var r=void 0;t&&(r=o(n))?y(r):(h(n),n.firstChild&&m(n,t)),n=n.nextSibling}}function g(e,t,n){!1!==c(e)&&(t&&t.removeChild(e),h(e),m(e,n))}function _(e){s(e);for(var t=e.firstChild;t;){var n=t.nextSibling,r=o(t);if(r){var i=p[r];i&&Gi(t,i)?(t.parentNode.replaceChild(i,t),b(i,t)):_(t)}else _(t);t=n}}function b(t,n,r){var i=o(n);if(i&&delete p[i],!r){if(!1===u(t,n))return;if(e(t,n),l(t),!1===d(t,n))return}"TEXTAREA"!==t.nodeName?function(e,t){var n,r,i,s,u,l=t.firstChild,c=e.firstChild;e:for(;l;){for(s=l.nextSibling,n=o(l);c;){if(i=c.nextSibling,l.isSameNode&&l.isSameNode(c)){l=s,c=i;continue e}r=o(c);var h=c.nodeType,d=void 0;if(h===l.nodeType&&(1===h?(n?n!==r&&((u=p[n])?i===u?d=!1:(e.insertBefore(u,c),r?y(r):g(c,e,!0),c=u):d=!1):r&&(d=!1),(d=!1!==d&&Gi(c,l))&&b(c,l)):3!==h&&8!=h||(d=!0,c.nodeValue!==l.nodeValue&&(c.nodeValue=l.nodeValue))),d){l=s,c=i;continue e}r?y(r):g(c,e,!0),c=i}if(n&&(u=p[n])&&Gi(u,l))e.appendChild(u),b(u,l);else{var f=a(l);!1!==f&&(f&&(l=f),l.actualize&&(l=l.actualize(e.ownerDocument||Wi)),e.appendChild(l),_(l))}l=s,c=i}!function(e,t,n){for(;t;){var r=t.nextSibling;(n=o(t))?y(n):g(t,e,!0),t=r}}(e,c,r);var v=qi[e.nodeName];v&&v(e,t)}(t,n):qi.TEXTAREA(t,n)}!function e(t){if(1===t.nodeType||11===t.nodeType)for(var n=t.firstChild;n;){var r=o(n);r&&(p[r]=n),e(n),n=n.nextSibling}}(t);var w,k,E=t,S=E.nodeType,A=n.nodeType;if(!f)if(1===S)1===A?Gi(t,n)||(h(t),E=function(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}(t,(w=n.nodeName,(k=n.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==k?Wi.createElementNS(k,w):Wi.createElement(w)))):E=n;else if(3===S||8===S){if(A===S)return E.nodeValue!==n.nodeValue&&(E.nodeValue=n.nodeValue),E;E=n}if(E===n)h(t);else{if(n.isSameNode&&n.isSameNode(E))return;if(b(E,n,f),v)for(var x=0,C=v.length;x<C;x++){var T=p[v[x]];T&&g(T,T.parentNode,!1)}}return!f&&E!==t&&t.parentNode&&(E.actualize&&(E=E.actualize(t.ownerDocument||Wi)),t.parentNode.replaceChild(E,t)),E}}(function(e,t){var n,r,i,o,a=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var s=a.length-1;s>=0;s--)r=(n=a[s]).name,i=n.namespaceURI,o=n.value,i?(r=n.localName||r,e.getAttributeNS(i,r)!==o&&("xmlns"===n.prefix&&(r=n.name),e.setAttributeNS(i,r,o))):e.getAttribute(r)!==o&&e.setAttribute(r,o);for(var u=e.attributes,l=u.length-1;l>=0;l--)r=(n=u[l]).name,(i=n.namespaceURI)?(r=n.localName||r,t.hasAttributeNS(i,r)||e.removeAttributeNS(i,r)):t.hasAttribute(r)||e.removeAttribute(r)}}),Ji=function(){return R(function e(t){var n=t.itemCount,r=t.itemSizeGetter,i=t.estimatedItemSize;O(this,e),this._itemSizeGetter=r,this._itemCount=n,this._estimatedItemSize=i,this._itemSizeAndPositionData={},this._lastMeasuredIndex=-1},[{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getSizeAndPositionForIndex",value:function(e){if(e<0||e>=this._itemCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._itemCount));if(e>this._lastMeasuredIndex){for(var t=this.getSizeAndPositionOfLastMeasuredItem(),n=t.offset+t.size,r=this._lastMeasuredIndex+1;r<=e;r++){var i=this._itemSizeGetter({index:r});if(null==i||isNaN(i))throw Error("Invalid size returned for index ".concat(r," of value ").concat(i));this._itemSizeAndPositionData[r]={offset:n,size:i},n+=i}this._lastMeasuredIndex=e}return this._itemSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredItem",value:function(){return this._lastMeasuredIndex>=0?this._itemSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredItem();return e.offset+e.size+(this._itemCount-this._lastMeasuredIndex-1)*this._estimatedItemSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"start":t,r=e.containerSize,i=e.targetIndex;if(r<=0)return 0;var o,a=this.getSizeAndPositionForIndex(i),s=a.offset,u=s-r+a.size;switch(n){case"end":o=u;break;case"center":o=s-(r-a.size)/2;break;default:o=s}var l=this.getTotalSize();return Math.max(0,Math.min(l-r,o))}},{key:"getVisibleRange",value:function(e){var t=e.containerSize,n=e.offset,r=e.overscanCount;if(0===this.getTotalSize())return{};var i=n+t,o=this._findNearestItem(n),a=o,s=this.getSizeAndPositionForIndex(o);for(n=s.offset+s.size;n<i&&a<this._itemCount-1;)a++,n+=this.getSizeAndPositionForIndex(a).size;return r&&(o=Math.max(0,o-r),a=Math.min(a+r,this._itemCount)),{start:o,stop:a}}},{key:"resetItem",value:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)}},{key:"_binarySearch",value:function(e){for(var t,n,r=e.low,i=e.high,o=e.offset;r<=i;){if(t=r+Math.floor((i-r)/2),(n=this.getSizeAndPositionForIndex(t).offset)===o)return t;n<o?r=t+1:n>o&&(i=t-1)}if(r>0)return r-1}},{key:"_exponentialSearch",value:function(e){for(var t=e.index,n=e.offset,r=1;t<this._itemCount&&this.getSizeAndPositionForIndex(t).offset<n;)t+=r,r*=2;return this._binarySearch({high:Math.min(t,this._itemCount-1),low:Math.floor(t/2),offset:n})}},{key:"_findNearestItem",value:function(e){if(isNaN(e))throw Error("Invalid offset ".concat(e," specified"));e=Math.max(0,e);var t=this.getSizeAndPositionOfLastMeasuredItem(),n=Math.max(0,this._lastMeasuredIndex);return t.offset>=e?this._binarySearch({high:n,low:0,offset:e}):this._exponentialSearch({index:n,offset:e})}}])}(),Qi=function(){return R(function e(t,n){var r=this;O(this,e),Ui(this,"getRowHeight",function(e){var t=e.index,n=r.options.rowHeight;return"function"==typeof n?n(t):Array.isArray(n)?n[t]:n}),this.container=t,this.options=n,this.state={},this._initializeSizeAndPositionManager(n.rowCount),this.render=this.render.bind(this),this.handleScroll=this.handleScroll.bind(this),this.componentDidMount()},[{key:"componentDidMount",value:function(){var e=this,t=this.options,n=t.onMount,r=t.initialScrollTop,i=(t.initialIndex,t.height),o=r||0,a=this.inner=document.createElement("div"),s=this.content=document.createElement("div");a.setAttribute("style","position:relative; overflow:visible; width:100%; min-height:100%; will-change: transform;flex-shrink:0"),s.setAttribute("style","position:absolute; top:0; left:0;width:100%; overflow:visible;"),a.appendChild(s),this.container.appendChild(a),this.setState({offset:o,height:i},function(){o&&(e.container.scrollTop=o),e.container.addEventListener("scroll",e.handleScroll),"function"==typeof n&&n()})}},{key:"_initializeSizeAndPositionManager",value:function(e){this._sizeAndPositionManager=new Ji({itemCount:e,itemSizeGetter:this.getRowHeight,estimatedItemSize:this.options.estimatedRowHeight||100})}},{key:"setState",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.state=Object.assign(this.state,t),requestAnimationFrame(function(){e.render(),"function"==typeof n&&n()})}},{key:"resize",value:function(e,t){this.setState({height:e},t)}},{key:"handleScroll",value:function(e){var t=this.options.onScroll,n=this.container.scrollTop;this.setState({offset:n}),"function"==typeof t&&t(n,e)}},{key:"getRowOffset",value:function(e){return this._sizeAndPositionManager.getSizeAndPositionForIndex(e).offset}},{key:"getOffset",value:function(){var e;return null!==(e=this.state.offset)&&void 0!==e?e:0}},{key:"scrollToIndex",value:function(e,t,n){var r=this.state.height,i=this._sizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:r,targetIndex:e});this.container.scrollTo({top:i,behavior:t?"smooth":"none"})}},{key:"scrollTo",value:function(e,t){e<0||e>this._sizeAndPositionManager.getTotalSize()||this.container.scrollTo({top:e,behavior:t?"smooth":"none"})}},{key:"setRowCount",value:function(e){this._initializeSizeAndPositionManager(e),this.render()}},{key:"onRowsRendered",value:function(e){var t=this.options.onRowsRendered;"function"==typeof t&&t(e)}},{key:"destroy",value:function(){this.container.removeEventListener("scroll",this.handleScroll),this.container.innerHTML=""}},{key:"render",value:function(){for(var e=this.options,t=e.overScanCount,n=e.renderRow,r=this.state,i=r.height,o=r.offset,a=void 0===o?0:o,s=this._sizeAndPositionManager.getVisibleRange({containerSize:i,offset:a,overScanCount:t}),u=s.start,l=s.stop,c=document.createDocumentFragment(),h=u;h<=l;h++)c.appendChild(n(h));$i(this.content,c,{childrenOnly:!0,getNodeKey:function(e){return e.id}}),this.onRowsRendered({startIndex:u,stopIndex:l}),this.inner.style.height="".concat(this._sizeAndPositionManager.getTotalSize(),"px"),this.content.style.top="".concat(this.getRowOffset(u),"px")}}])}();function eo(e,t){var n=!1,r=!1,i=-1,o=null,a=function(){n=!1},s=function(){var e;n&&!r&&(null===(e=null==t?void 0:t.onEndSliding)||void 0===e||e.call(t),a())},u=function(){i=function(e,t,n,r,i,o,a,s){clearTimeout(r),!n&&t&&(null==a||a(o));return null==s||s(),setTimeout(i,100)}(0,r,n,i,s,t.getPosition(),null==t?void 0:t.onBeginDrag,null==t?void 0:t.onScroll),n=!0},l=function(e){r=!0,o=e},c=function(r){var i;if(!Ki||Ki===e){var a=t.scrollEnable(o,r);if(a&&t.needSimulatedScrolling){var s=function(e,t,n,r,i){var o=t.changedTouches[0],a=n.changedTouches[0],s=0,u=e.clientWidth-e.scrollWidth,l=0,c=e.clientHeight-e.scrollHeight,h=[r[0],r[1]];if(Math.abs(h[0]-(r[0]+o.pageX-a.pageX))<.6&&Math.abs(h[1]-(r[1]+o.pageY-a.pageY))<.6)return r;var d=y(r);d[0]+=o.pageX-a.pageX,d[1]+=o.pageY-a.pageY,d[0]>s&&(d[0]=s);d[0]<u&&(d[0]=u);d[1]>l&&(d[1]=l);d[1]<c&&(d[1]=c);return io(e,d),null==i||i(o,a),d}(e,r,o,t.getPosition(),null==t?void 0:t.onTouchMove);t.updatePosition(s),n||(n=!0,null===(i=t.onBeginDrag)||void 0===i||i.call(t,s))}a&&(r.stopPropagation(),Ki=e,o=r)}},h=function(){Ki=null,to(e,r,n,t.scrollEnable(o),t.getPosition()),r=!1,t.needSimulatedScrolling&&a()},d=function(){Ki=null,to(e,r,n,t.scrollEnable(o),t.getPosition(),null==t?void 0:t.onEndDrag,null==t?void 0:t.onBeginSliding),r=!1,t.needSimulatedScrolling&&a()};return e.addEventListener("scroll",u),e.addEventListener("touchstart",l),e.addEventListener("touchmove",c),e.addEventListener("touchcancel",h),e.addEventListener("touchend",d),function(){e.removeEventListener("scroll",u),e.removeEventListener("touchstart",l),e.removeEventListener("touchmove",c),e.removeEventListener("touchcancel",h),e.removeEventListener("touchend",d)}}function to(e,t,n,r,i,o,a){t&&r&&(null==o||o(i)),t&&n&&r&&(null==a||a())}function no(e,t){var n=e.changedTouches[0],r=t.changedTouches[0],i=[0,0];return i[0]+=n.pageX-r.pageX,i[1]+=n.pageY-r.pageY,i}function ro(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;Ur(e,{transition:"transform ".concat(n/1e3,"s")}),setTimeout(function(){io(e,t)},16),setTimeout(function(){Ur(e,{transition:""})},n+16)}function io(e,t){Ur(e,{transform:"translate(".concat(t[0],"px,").concat(t[1],"px)")})}function oo(e,t,n){var r=1e3/t,i=Date.now()-e>=r;return i&&(null==n||n()),i}function ao(e,t,n){var r=Math.round(n/e),i=e-t,o=Math.ceil(t/e),a=t-parseInt(String(t/e),10)*e;a=0!==a?a:e;var s=Math.abs(n)+e>(o-1)*e+a/2,u=r*e;return(u<i||n===i||s)&&(u=i),{newPageIndex:Math.abs(Math.round(u/e)),fromOffset:n,toOffset:u}}function so(e,t,n,r,i,o,a){return function(e,t,n,r,i){return new Promise(function(o){n.then(function(n){e&&(n!==r[0]&&ro(e,r,0),t(r,i),o(null))}).catch(function(e){throw e})})}(e,t,function(e,t,n,r,i,o){var a=o;return new Promise(function(s){(!o||o<=0)&&(a=1);var u=n[0]-r[0],l=Date.now(),c=y(n);ro(e,[r[0],0],a);var h=function(){var e=Date.now()-l;if(e>a)s(c[0]);else{window.requestAnimationFrame(h);var r=u*(e/a),o=[n[0]-r,n[1]];c=o,t(o,i)}};window.requestAnimationFrame(h)})}(e,t,n,r,o,i),r,a)}var uo=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).destroying=!1,i.initialListReadyFlag=!1,i.dirtyListItems=[],i.lastPosition=[0,0],i.renderChildrenTuple=[0,0],i.lastTimestamp=0,i.scrollCaptureState=!1,i.childData=[],i.checkTimer=null,i.stickyListViewItem=null,i.stickyContainer=null,i.tagName=vr.LIST,i.dom=document.createElement("div"),i.init(),i}return Gn(t,e),R(t,[{key:"root",get:function(){return this.rootElement||(this.rootElement=document.getElementsByTagName("body")[0]),this.rootElement}},{key:"defaultStyle",value:function(){return{display:"flex",flexDirection:"column",flexShrink:0,boxSizing:"border-box",overflow:"scroll"}}},{key:"overScrollEnabled",get:function(){return this.props[Tr.OVER_SCROLL_ENABLED]},set:function(e){this.props[Tr.OVER_SCROLL_ENABLED]=e}},{key:"initialListSize",get:function(){var e;return null!==(e=this.props[Tr.INITIAL_LIST_SIZE])&&void 0!==e?e:10},set:function(e){this.props[Tr.INITIAL_LIST_SIZE]=e}},{key:"initialContentOffset",get:function(){return this.props[Tr.INITIAL_CONTENT_OFFSET]},set:function(e){this.props[Tr.INITIAL_CONTENT_OFFSET]=e}},{key:"preloadItemNumber",get:function(){return this.props[Tr.OVER_SCROLL_ENABLED]},set:function(e){this.props[Tr.PRELOAD_ITEM_NUMBER]=e}},{key:"rowShouldSticky",get:function(){return this.props[Tr.ROW_SHOULD_STICKY]},set:function(e){this.props[Tr.ROW_SHOULD_STICKY]=e}},{key:"scrollEventThrottle",get:function(){return this.props[Tr.SCROLL_EVENT_THROTTLE]},set:function(e){this.props[Tr.SCROLL_EVENT_THROTTLE]=e}},{key:"scrollEnabled",get:function(){return this.props[Tr.SCROLL_ENABLED]},set:function(e){this.props[Tr.SCROLL_ENABLED]=e,Ur(this.dom,{overflow:this.scrollEnabled?"scroll":"hidden"})}},{key:"showScrollIndicator",get:function(){return this.props[Tr.SHOW_SCROLL_INDICATOR]},set:function(e){this.props[Tr.SHOW_SCROLL_INDICATOR]=e}},{key:"initialListReady",get:function(){return this.props[Tr.INITIAL_LIST_READY]},set:function(e){this.props[Tr.INITIAL_LIST_READY]=e}},{key:"onMomentumScrollBegin",value:function(e){this.props[Tr.ON_MOMENTUM_SCROLL_BEGIN]&&this.dispatchEvent(Tr.ON_MOMENTUM_SCROLL_BEGIN,e)}},{key:"onMomentumScrollEnd",value:function(e){this.props[Tr.ON_MOMENTUM_SCROLL_END]&&this.dispatchEvent(Tr.ON_MOMENTUM_SCROLL_END,e)}},{key:"onScroll",value:function(e){this.props[Tr.ON_SCROLL]&&this.dispatchEvent(Tr.ON_SCROLL,e)}},{key:"onScrollBeginDrag",value:function(e){this.props[Tr.ON_SCROLL_BEGIN_DRAG]&&this.dispatchEvent(Tr.ON_SCROLL_BEGIN_DRAG,e)}},{key:"onScrollEndDrag",value:function(e){this.props[Tr.ON_SCROLL_END_DRAG]&&this.dispatchEvent(Tr.ON_SCROLL_END_DRAG,e)}},{key:"onInitialListReady",value:function(){this.dispatchEvent(Tr.INITIAL_LIST_READY,null)}},{key:"onAppear",value:function(e){this.props[Tr.ON_APPEAR]&&this.dispatchEvent(Tr.ON_APPEAR,e)}},{key:"onDisappear",value:function(e){this.props[Tr.ON_DISAPPEAR]&&this.dispatchEvent(Tr.ON_DISAPPEAR,e)}},{key:"onWillAppear",value:function(e){this.props[Tr.ON_WILL_APPEAR]&&this.dispatchEvent(Tr.ON_WILL_APPEAR,e)}},{key:"onWillDisappear",value:function(e){this.props[Tr.ON_WILL_DISAPPEAR]&&this.dispatchEvent(Tr.ON_WILL_DISAPPEAR,e)}},{key:"onLoadMore",value:function(){this.props[Tr.ON_LOAD_MORE]&&this.dispatchEvent(Tr.ON_LOAD_MORE,null),this.props[Tr.ON_LOAD_MORE]&&this.dispatchEvent(Tr.ON_END_REACHED,null)}},{key:"scrollToContentOffset",value:function(e,t,n){this.virtualList.scrollTo(t,n)}},{key:"scrollToIndex",value:function(e,t,n){this.virtualList.scrollToIndex(t,n)}},{key:"beforeRemove",value:(i=l(h().mark(function e(){var n,r,i,o,a,s,u;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yn(t,"beforeRemove",this,3)([]);case 1:this.destroying=!0,null===(n=this.touchListenerRelease)||void 0===n||n.call(this),r=this.context.getModuleByName("UIManagerModule"),i=y(this.childData),o=qn(i),e.prev=2,o.s();case 3:if((a=o.n()).done){e.next=6;break}if(s=a.value,r.findViewById(s.id)){e.next=4;break}return e.abrupt("continue",5);case 4:return e.next=5,r.viewDelete(s);case 5:e.next=3;break;case 6:e.next=8;break;case 7:e.prev=7,u=e.catch(2),o.e(u);case 8:return e.prev=8,o.f(),e.finish(8);case 9:case"end":return e.stop()}},e,this,[[2,7,8,9]])})),function(){return i.apply(this,arguments)})},{key:"destroy",value:function(){Yn(t,"destroy",this,3)([])}},{key:"insertChild",value:function(e){(null==e?void 0:e.props.sticky)&&(this.stickyListViewItem=e),this.childData.push(e),e.addDirtyListener(this.handleListItemDirty.bind(this))}},{key:"removeChild",value:(r=l(h().mark(function e(t){var n,r,i=this;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.childData.findIndex(function(e){return e===t}),r=this.context.getModuleByName("UIManagerModule"),e.next=1,r.removeChild(this,t.id);case 1:this.childData.splice(n,1),this.destroying||requestAnimationFrame(function(){i.notifyDataSetChange()});case 2:case"end":return e.stop()}},e,this)})),function(e){return r.apply(this,arguments)})},{key:"mounted",value:function(){Yn(t,"mounted",this,3)([])}},{key:"endBatch",value:function(){var e=this;setTimeout(function(){var t,n;e.dom&&(e.virtualList||(e.virtualList=new Qi(e.dom,{height:null===(t=e.dom)||void 0===t?void 0:t.clientHeight,rowCount:e.childData.length,rowHeight:e.getChildHeight.bind(e),renderRow:e.getChildDom.bind(e),onRowsRendered:e.handleOnRowsRendered.bind(e),onScroll:e.handleScroll.bind(e),initialScrollTop:null!==(n=e.initialContentOffset)&&void 0!==n?n:0,overScanCount:2})),e.needCheckAllDataHeight(),e.notifyDataSetChange())},0)}},{key:"getChildHeight",value:function(e){var t,n,r;return this.childData[e]&&!(null===(t=this.childData[e])||void 0===t?void 0:t.height)&&(this.childData[e].height=this.getListItemNewHeight(this.childData[e])),null!==(r=null===(n=this.childData[e])||void 0===n?void 0:n.height)&&void 0!==r?r:0}},{key:"getChildDom",value:function(e){var t,n;return null!==(n=null===(t=this.childData[e])||void 0===t?void 0:t.dom)&&void 0!==n?n:null}},{key:"handleListItemDirty",value:function(e){this.dirtyListItems.push(e),this.whenFinishCheckDirtyChild()}},{key:"whenFinishCheckDirtyChild",value:function(){this.checkTimer&&clearTimeout(this.checkTimer),this.checkTimer=setTimeout(this.checkDirtyChild.bind(this),64)}},{key:"handleOnRowsRendered",value:function(e){var t=e.startIndex,n=e.stopIndex;this.needCheckChildVisible({startIndex:t,stopIndex:n})}},{key:"notifyDataSetChange",value:function(){this.virtualList.setRowCount(this.childData.length)}},{key:"init",value:function(){var e=this;this.props[Tr.OVER_SCROLL_ENABLED]=!0,this.props[Tr.INITIAL_LIST_SIZE]=10,this.props[Tr.INITIAL_LIST_READY]=!0,this.props[Tr.PRELOAD_ITEM_NUMBER]=1,this.props[Tr.SCROLL_EVENT_THROTTLE]=30,this.props[Tr.ON_LOAD_MORE]=!0,this.touchListenerRelease=eo(this.dom,{getPosition:function(){return e.lastPosition},updatePosition:this.updatePositionInfo.bind(this),scrollEnable:this.checkScrollEnable.bind(this),onBeginDrag:this.handleBeginDrag.bind(this),onEndDrag:this.handleEndDrag.bind(this),onBeginSliding:this.handleBeginSliding.bind(this),onEndSliding:this.handleEndSliding.bind(this)})}},{key:"moveStickyRowToContainer",value:function(){var e,t,n;if(0!==this.stickyListViewItem.dom.childNodes.length){if(null===this.stickyContainer){this.stickyContainer=document.createElement("div");var r=null!==(t=null===(e=this.dom)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==t?t:{y:0,x:0,width:0};Ur(this.stickyContainer,{position:"sticky",top:0,left:r.x,width:r.width,zIndex:0}),this.virtualList.inner.appendChild(this.stickyContainer)}var i=this.stickyListViewItem.dom.childNodes;Ur(this.stickyListViewItem.dom,{height:null===(n=this.stickyListViewItem)||void 0===n?void 0:n.height});var o,a=qn(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;this.stickyListViewItem.dom.removeChild(s),this.stickyContainer.appendChild(s)}}catch(e){a.e(e)}finally{a.f()}}}},{key:"removeStickyRowToContainer",value:function(){var e;if(0!==this.stickyContainer.childNodes.length){var t=this.stickyContainer.childNodes;Ur(this.stickyListViewItem.dom,{height:null===(e=this.stickyListViewItem)||void 0===e?void 0:e.height});var n,r=qn(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.stickyContainer.removeChild(i),this.stickyListViewItem.dom.appendChild(i),Ur(this.stickyListViewItem.dom,{height:"auto"})}}catch(e){r.e(e)}finally{r.f()}}}},{key:"needCheckChildVisible",value:function(e){var t=e.startIndex,n=e.stopIndex;t===this.renderChildrenTuple[0]&&n===this.renderChildrenTuple[1]||this.notifyVisibleChildrenChange(this.renderChildrenTuple,[t,n]),!this.initialListReadyFlag&&n>=this.initialListSize-1&&(this.onInitialListReady(),this.initialListReadyFlag=!0),this.renderChildrenTuple=[t,n]}},{key:"needCheckAllDataHeight",value:function(){for(var e=0;e<this.childData.length;e++){var t=this.childData[e];t.height||(t.height=this.getListItemNewHeight(t))}}},{key:"checkDirtyChild",value:function(){for(var e=0;e<this.dirtyListItems.length;e++){this.dirtyListItems[e].isDirty=!1}this.dirtyListItems=[],this.notifyDataSetChange(),clearTimeout(this.checkTimer),this.checkTimer=null}},{key:"getListItemNewHeight",value:function(e){return e.dom.parentNode?e.getItemHeight():this.measureListViewItemSize(e)}},{key:"notifyVisibleChildrenChange",value:function(e,t){for(var n=this,r=new Array(e[1]-e[0]+1),i=new Array(t[1]-t[0]+1),o=e[0];o<=e[1]&&0!==e[1];o++)r[o]=o;for(var a=t[0];a<=t[1];a++)i[a]=a;var s=r.filter(function(e){return i.indexOf(e)>-1}),u=r.filter(function(e){return-1===s.indexOf(e)}),l=i.filter(function(e){return-1===s.indexOf(e)});u.forEach(function(e){n.childVisibleChange(e,!1)}),l.forEach(function(e){n.childVisibleChange(e,!0,Object.keys(n.childData).length)})}},{key:"updatePositionInfo",value:function(e){this.lastPosition=e}},{key:"checkScrollEnable",value:function(e,t){return t&&e?(this.scrollCaptureState&&t||(this.scrollCaptureState=this.needCaptureTouch(e,t)),this.scrollCaptureState):this.scrollCaptureState}},{key:"needCaptureTouch",value:function(e,t){var n=no(t,e);return Math.abs(n[1])>5}},{key:"handleBeginDrag",value:function(){this.dom&&this.onScrollBeginDrag(this.buildScrollEvent())}},{key:"handleEndDrag",value:(n=l(h().mark(function e(){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.scrollCaptureState=!1,this.dom&&this.onScrollEndDrag(this.buildScrollEvent());case 1:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"handleScroll",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];window.requestAnimationFrame(this.listStickyCheck.bind(this)),this.dom&&(!t&&oo(this.lastTimestamp,this.scrollEventThrottle,function(){e.onScroll(e.buildScrollEvent()),e.lastTimestamp=Date.now()}),t&&this.onScroll(this.buildScrollEvent()))}},{key:"handleBeginSliding",value:function(){this.dom&&this.onMomentumScrollBegin(this.buildScrollEvent())}},{key:"handleEndSliding",value:function(){var e=this;this.dirtyListItems.length>0&&requestAnimationFrame(function(){e.checkDirtyChild()}),this.handleScroll(!0),this.dom&&this.onMomentumScrollEnd(this.buildScrollEvent())}},{key:"childVisibleChange",value:function(e,t,n){t&&(this.onAppear(e),this.handleEndReached(e,n)),t||this.onDisappear(e)}},{key:"handleEndReached",value:function(e,t){(this.preloadItemNumber&&e>=t-this.preloadItemNumber||e===t-1)&&this.onLoadMore()}},{key:"measureListViewItemSize",value:function(e){var t,n,r;Ur(e.dom,{visibility:"hidden",position:"absolute",zIndex:-99999}),null===(t=this.dom)||void 0===t||t.insertBefore(e.dom,null);var i=null!==(n=e.getItemHeight())&&void 0!==n?n:0;return null===(r=this.dom)||void 0===r||r.removeChild(e.dom),Ur(e.dom,{visibility:"visible",position:"static",zIndex:0}),i}},{key:"buildScrollEvent",value:function(){return{contentOffset:{x:0,y:this.virtualList.getOffset()}}}},{key:"listStickyCheck",value:function(){var e=this;if(this.stickyListViewItem){var t=this.childData.findIndex(function(t){return t===e.stickyListViewItem});if(-1!==t){var n=this.virtualList.getRowOffset(t);this.virtualList.getOffset()>n?this.moveStickyRowToContainer():this.stickyContainer&&this.stickyContainer.childNodes.length>0&&this.removeStickyRowToContainer()}}}}],[{key:"intersectionObserverElement",value:function(e,t){return new IntersectionObserver(t,{root:e,threshold:0})}}]);var n,r,i}(Oi),lo=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).height=0,i.isDirty=!1,i.dirtyListener=null,i.tagName=vr.LIST_ITEM,i.dom=document.createElement("div"),i.onLayout=!0,i}return Gn(t,e),R(t,[{key:"sticky",get:function(){return this.props[Tr.STICKY]},set:function(e){this.props[Tr.STICKY]=e}},{key:"addDirtyListener",value:function(e){this.dirtyListener=e}},{key:"mounted",value:function(){Yn(t,"mounted",this,3)([])}},{key:"getItemHeight",value:function(){var e,t;return null!==(t=null===(e=this.dom)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:0}},{key:"handleReLayout",value:function(e){var t,n,r=s(e,1)[0].contentRect.height;Math.round(r)===this.height&&Math.round(r)===(null===(t=this.dom)||void 0===t?void 0:t.clientHeight)||(this.height=Math.round(r),this.isDirty=!0,null===(n=this.dirtyListener)||void 0===n||n.call(this,this))}}])}(Oi);var co,ho=200;!function(e){e[e.ENTRY=0]="ENTRY",e[e.LEAVE=1]="LEAVE"}(co||(co={}));var fo={fade:{animation:{opacity:1},newState:{opacity:0,transition:"opacity ".concat(.2,"s")}},slide:{animation:{transform:"translate(0vw,0vh)"},newState:{transform:"translate(0vw,100vh)",transition:"transform ".concat(.2,"s")}},slide_fade:{animation:{transform:"translate(0vw,0vh)",opacity:1},newState:{transform:"translate(0vw,100vh)",opacity:0,transition:"transform ".concat(.2,"s, opacity ").concat(.2,"s")}},none:{animation:{},newState:{}}},po={fade:{animation:{opacity:0}},slide:{animation:{transform:"translate(0vw,100vh)"}},slide_fade:{animation:{transform:"translate(0vw,100vh)",opacity:0}},none:{animation:{},newState:{}}},vo=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).tagName=vr.MODAL,i.dom=document.createElement("div"),i.props[Tr.ANIMATED]=!0,i.onBackListener=function(){i.onOrientationChange(null)},i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{display:"flex",flexDirection:"column",overflow:" hidden",width:"100vw",height:"100vh",top:"0%",position:"fixed",boxSizing:"border-box"}}},{key:"updateProps",value:function(e,t){var n;this.firstUpdateStyle&&t(this,{style:this.defaultStyle()});var r=Kn({},e);(null===(n=e.style)||void 0===n?void 0:n.position)&&delete r.style.position,t(this,r)}},{key:"animated",get:function(){return this.props[Tr.ANIMATED]},set:function(e){this.props[Tr.ANIMATED]=e}},{key:"animationType",get:function(){return this.props[Tr.ANIMATION_TYPE]},set:function(e){this.props[Tr.ANIMATION_TYPE]=e}},{key:"supportedOrientations",get:function(){return this.props[Tr.SUPPORTED_ORIENTATIONS]},set:function(e){this.props[Tr.SUPPORTED_ORIENTATIONS]=e}},{key:"immersionStatusBar",get:function(){return this.props[Tr.IMMERSION_STATUS_BAR]},set:function(e){this.props[Tr.IMMERSION_STATUS_BAR]=e}},{key:"darkStatusBarText",get:function(){return this.props[Tr.DARK_STATUS_BAR_TEXT]},set:function(e){this.props[Tr.DARK_STATUS_BAR_TEXT]=e}},{key:"transparent",get:function(){return this.props[Tr.TRANSPARENT]},set:function(e){this.props[Tr.TRANSPARENT]=e,Ur(this.dom,{backgroundColor:this.props[Tr.TRANSPARENT]?"#ffffff00":"#fff"})}},{key:"onShow",value:function(e){this.props[Tr.ON_SHOW]&&this.dispatchEvent(Tr.ON_SHOW,e)}},{key:"onOrientationChange",value:function(e){this.props[Tr.ON_ORIENTATION_CHANGE]&&this.dispatchEvent(Tr.ON_ORIENTATION_CHANGE,e)}},{key:"onRequestClose",value:function(e){this.props[Tr.ON_ORIENTATION_CHANGE]&&this.dispatchEvent(Tr.ON_REQUEST_CLOSE,e)}},{key:"beforeChildMount",value:(i=l(h().mark(function e(n,r){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yn(t,"beforeChildMount",this,3)([n,r]);case 1:0===r&&n.dom&&(Ur(n.dom,{flex:"1",position:"static"}),delete n.dom.style.top,delete n.dom.style.left);case 2:case"end":return e.stop()}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"beforeMount",value:(r=l(h().mark(function e(n,r){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yn(t,"beforeMount",this,3)([n,r]);case 1:this.entryAnimationAction=this.runAnimation(co.ENTRY,r),this.context.getModuleByName("DeviceEventModule").setModuleListener(this.onBackListener);case 2:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"mounted",value:function(){var e;Yn(t,"mounted",this,3)([]),null===(e=this.entryAnimationAction)||void 0===e||e.call(this),this.onShow()}},{key:"beforeRemove",value:(n=l(h().mark(function e(){var n=this;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yn(t,"beforeRemove",this,3)([]);case 1:if(this.leaveAnimationAction=this.runAnimation(co.LEAVE,this.index),this.leaveAnimationAction){e.next=2;break}return e.abrupt("return");case 2:return e.next=3,new Promise(function(e){var t;null===(t=n.leaveAnimationAction)||void 0===t||t.call(n),setTimeout(function(){e(null)},ho)});case 3:this.context.getModuleByName("DeviceEventModule").removeModuleListener(this.onBackListener);case 4:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"runAnimation",value:function(e,n){var r=this;if(this.animated&&this.animationType!==Lr.None&&this.dom){var i=e===co.ENTRY?t.buildModalEntryAnimation(this.animationType):t.buildModalLeaveAnimation(this.animationType),o=i.animation,a=i.newState;return Ur(this.dom,Kn({zIndex:n},a)),function(){r.dom&&Ur(r.dom,o)}}}}],[{key:"buildModalEntryAnimation",value:function(e){return fo[e]}},{key:"buildModalLeaveAnimation",value:function(e){return po[e]}}]);var n,r,i}(Oi),yo=200,mo="cubic-bezier(0.645, 0.045, 0.355, 1)",go=[{threshold:[0,50],damp:1},{threshold:[50,100],damp:.6},{threshold:[100,Number.MAX_SAFE_INTEGER],damp:.2}],_o=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).tagName=vr.REFRESH,i.dom=document.createElement("div"),i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{display:"flex",flexDirection:"column",overflow:" hidden",boxSizing:"border-box",position:"relative"}}},{key:"bounceTime",get:function(){return this.props[Tr.BOUNCE_TIME]},set:function(e){this.props[Tr.BOUNCE_TIME]=e}},{key:"onRefresh",value:function(){this.props[Tr.ON_REFRESH]&&this.dispatchEvent(Tr.ON_REFRESH,null)}},{key:"refreshComplected",value:function(){var e;null===(e=this.pullRefresh)||void 0===e||e.finish()}},{key:"startRefresh",value:function(){var e;null===(e=this.pullRefresh)||void 0===e||e.start()}},{key:"beforeChildMount",value:(r=l(h().mark(function e(n,r){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yn(t,"beforeChildMount",this,3)([n,r]);case 1:n.tagName===vr.LIST&&(Ur(n.dom,{position:"relative",zIndex:2}),this.pullRefresh=new wo(n.dom,this.dom.childNodes[0],this.handlePull.bind(this)),this.pullRefresh.init());case 2:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"beforeRemove",value:(n=l(h().mark(function e(){var n;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yn(t,"beforeRemove",this,3)([]);case 1:null===(n=this.pullRefresh)||void 0===n||n.destroy();case 2:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"handlePull",value:function(){var e=this;this.props[Tr.ON_REFRESH]?this.onRefresh():setTimeout(function(){var t;null===(t=e.pullRefresh)||void 0===t||t.finish()},500)}}]);var n,r}(Oi),bo=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).tagName=vr.REFRESH_ITEM,i.dom=document.createElement("div"),i}return Gn(t,e),R(t)}(Oi),wo=function(){return R(function e(t,n,r){O(this,e),this.lastPosition=0,this.lastRefreshTime=Date.now(),this.startPosition=0,this.touchMove=0,this.moveLengthRecord=0,this.refreshStatus=!1,this.refreshHeadHeight=0,this.isPullFirst=!1,this.refreshContent=n,this.scrollContent=t,this.contentStyleCache=t.style,this.refreshStatus=!1,this.handleCallBack=r,this.handleTouchStart=this.handleTouchStart.bind(this),this.handlerTouchMove=this.handlerTouchMove.bind(this),this.handlerTouchEnd=this.handlerTouchEnd.bind(this)},[{key:"overScrollThreshold",get:function(){return this.refreshHeadHeight>55?this.refreshHeadHeight:55}},{key:"endYOffset",get:function(){var e;return 0-(null===(e=this.refreshContent)||void 0===e?void 0:e.clientHeight)}},{key:"init",value:function(){this.contentStyleCache=this.scrollContent.style,this.scrollContent.addEventListener("touchstart",this.handleTouchStart),this.scrollContent.addEventListener("touchmove",this.handlerTouchMove),this.scrollContent.addEventListener("touchend",this.handlerTouchEnd),this.resetRefreshContentTop()}},{key:"resetRefreshContentTop",value:function(){var e;So([this.refreshContent],{transform:ko(0,"".concat(null!==(e=-this.refreshContent.clientHeight)&&void 0!==e?e:0,"px"))})}},{key:"finish",value:function(){So([this.refreshContent],{transform:ko(0,"".concat(this.endYOffset,"px")),transition:Eo("transform","".concat(.2),mo)}),So([this.scrollContent],{transform:ko(0,0),transition:Eo("transform","".concat(.2),mo)})}},{key:"start",value:function(){var e=this;this.isPullFirst||this.handlePull(0),So([this.scrollContent,this.refreshContent],{transform:ko(0,"".concat(this.overScrollThreshold,"px")),transition:Eo("transform","".concat(.2),mo)}),this.moveLengthRecord=this.overScrollThreshold,this.refreshStatus=!0,setTimeout(function(){var t;null===(t=e.handleCallBack)||void 0===t||t.call(e)},yo)}},{key:"destroy",value:function(){this.scrollContent.removeEventListener("touchstart",this.handleTouchStart),this.scrollContent.removeEventListener("touchmove",this.handlerTouchMove),this.scrollContent.removeEventListener("touchend",this.handlerTouchEnd)}},{key:"handlePull",value:function(e){var t,n=function(e){for(var t=0,n=0;n<go.length;n++){var r=go[n];e<r.threshold[1]&&e>=r.threshold[0]&&(t+=(e-r.threshold[0])*r.damp),e>=r.threshold[1]&&(t+=(r.threshold[1]-r.threshold[0])*r.damp)}return t}(e);return this.moveLengthRecord>=0&&(this.isPullFirst=!0,Ur(this.scrollContent,{transform:ko(0,"".concat(n,"px"))}),!this.refreshContent||this.refreshContent.tagName!==vr.REFRESH_ITEM||void 0!==this.refreshContent.style.top&&""!==this.refreshContent.style.top||(this.refreshHeadHeight=this.refreshContent.clientHeight,Ur(this.refreshContent,{top:-this.refreshContent.clientHeight})),Ur(this.refreshContent,{transform:ko(0,"".concat(null!==(t=n-this.refreshContent.clientHeight)&&void 0!==t?t:0,"px"))}),this.refreshStatus=this.moveLengthRecord>=this.overScrollThreshold),n}},{key:"handleTouchStart",value:function(e){this.startPosition=e.touches[0].pageY,So([this.scrollContent,this.refreshContent],{transition:Eo("transform",0)})}},{key:"handlerTouchMove",value:function(e){this.scrollContent&&this.scrollContent.scrollTop>0||(this.lastPosition||(this.lastPosition=e.touches[0].pageY),Math.abs(e.touches[0].pageY-this.lastPosition)<1||Date.now()-this.lastRefreshTime<16||(this.lastRefreshTime=Date.now(),this.touchMove+=e.touches[0].pageY-this.lastPosition,this.lastPosition=e.touches[0].pageY,this.moveLengthRecord=this.handlePull(this.touchMove)))}},{key:"handlerTouchEnd",value:function(){var e,t,n=this;if(this.moveLengthRecord>0){if(So([this.scrollContent,this.refreshContent],{transition:Eo("transform","".concat(.2),mo)}),!this.refreshStatus)return this.finish(),void setTimeout(function(){n.moveLengthRecord=0,n.touchMove=0},yo);null===(e=this.handleCallBack)||void 0===e||e.call(this),So([this.scrollContent],{transform:ko(0,"".concat(this.overScrollThreshold,"px"))}),So([this.refreshContent],{transform:ko(0,"".concat(null!==(t=this.overScrollThreshold-this.refreshContent.clientHeight)&&void 0!==t?t:0,"px"))})}this.moveLengthRecord=0,this.touchMove=0,this.lastPosition=0}}])}();function ko(e,t){return"translate(".concat(e,", ").concat(t,")")}function Eo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ease-out";return"".concat(e," ").concat(t,"s ").concat(n)}function So(e,t){e.forEach(function(e){Ur(e,t)})}var Ao=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).lastPosition=[0,0],i.lastTimestamp=0,i.scrollCaptureState=!1,i.tagName=vr.SCROLL_VIEW,i.dom=document.createElement("div"),i[Tr.SCROLL_EVENT_THROTTLE]=30,i[Tr.SCROLL_ENABLED]=!0,i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{display:"flex",flexDirection:"column",overflowX:"hidden",overflowY:"scroll"}}},{key:"updateProps",value:function(e,t){this.firstUpdateStyle&&t(this,{style:this.defaultStyle()});var n=Kn({},e);e.style&&1===e.style.flexShrink&&1===e.style.flexGrow&&!e.style.flexBasis&&(delete n.style.flexShrink,delete n.style.flexGrow),t(this,n)}},{key:"scrollStyle",value:function(){var e=this.defaultStyle(),t=this.pagingEnabled?"visible":"scroll";return this.horizontal&&(e.flexDirection="row",Object.assign(e,{flexDirection:"row",overflowX:t,overflowY:"hidden"})),this.pagingEnabled&&Object.assign(e,{overflowY:t,overflowX:t}),this.scrollEnabled||Object.assign(e,{overflowY:"hidden",overflowX:"hidden"}),e}},{key:"bounces",get:function(){return this.props[Tr.BOUNCES]},set:function(e){this.props[Tr.BOUNCES]=e}},{key:"horizontal",get:function(){return this.props[Tr.HORIZONTAL]},set:function(e){this.props[Tr.HORIZONTAL]=e,Ur(this.dom,this.scrollStyle())}},{key:"pagingEnabled",get:function(){return this.props[Tr.PAGING_ENABLED]&&this.horizontal},set:function(e){this.props[Tr.PAGING_ENABLED]=e,Ur(this.dom,this.scrollStyle())}},{key:"scrollEventThrottle",get:function(){var e;return null!==(e=this.props[Tr.SCROLL_EVENT_THROTTLE])&&void 0!==e?e:30},set:function(e){this.props[Tr.SCROLL_EVENT_THROTTLE]=e}},{key:"scrollIndicatorInsets",get:function(){return this.props[Tr.SCROLL_INDICATOR_INSETS]},set:function(e){this.props[Tr.SCROLL_INDICATOR_INSETS]=e}},{key:"contentContainerStyle",get:function(){return this.props[Tr.CONTENT_CONTAINER_STYLE]},set:function(e){var t,n;this.props[Tr.CONTENT_CONTAINER_STYLE]=e,1===(null===(t=this.dom)||void 0===t?void 0:t.childNodes.length)&&Ur(null===(n=this.dom)||void 0===n?void 0:n.childNodes[0],this.contentContainerStyle)}},{key:"scrollEnabled",get:function(){return this.props[Tr.SCROLL_ENABLED]},set:function(e){this.props[Tr.SCROLL_ENABLED]=e,Ur(this.dom,this.scrollStyle())}},{key:"onMomentumScrollBegin",value:function(e){this.props[Tr.ON_MOMENTUM_SCROLL_BEGIN]&&this.dispatchEvent(Tr.ON_MOMENTUM_SCROLL_BEGIN,e)}},{key:"onMomentumScrollEnd",value:function(e){this.props[Tr.ON_MOMENTUM_SCROLL_END]&&this.dispatchEvent(Tr.ON_MOMENTUM_SCROLL_END,e)}},{key:"onScroll",value:function(e){this.props[Tr.ON_SCROLL]&&this.dispatchEvent(Tr.ON_SCROLL,e)}},{key:"onScrollBeginDrag",value:function(e){this.props[Tr.ON_SCROLL_BEGIN_DRAG]&&this.dispatchEvent(Tr.ON_SCROLL_BEGIN_DRAG,e)}},{key:"onScrollEndDrag",value:function(e){this.props[Tr.ON_SCROLL_END_DRAG]&&this.dispatchEvent(Tr.ON_SCROLL_END_DRAG,e)}},{key:"beforeMount",value:(o=l(h().mark(function e(n,r){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yn(t,"beforeMount",this,3)([n,r]);case 1:this.init();case 2:case"end":return e.stop()}},e,this)})),function(e,t){return o.apply(this,arguments)})},{key:"beforeChildMount",value:(i=l(h().mark(function e(t,n){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:0===n&&this.contentContainerStyle&&Ur(t.dom,this.contentContainerStyle);case 1:case"end":return e.stop()}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"beforeRemove",value:(r=l(h().mark(function e(){var n;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yn(t,"beforeRemove",this,3)([]);case 1:null===(n=this.touchListenerRelease)||void 0===n||n.call(this);case 2:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"scrollTo",value:function(e,t,n){var r;this.pagingEnabled?this.pagingModeScroll(e,n?100:1):null===(r=this.dom)||void 0===r||r.scrollTo({top:this.horizontal?0:t,left:this.horizontal?e:0,behavior:n?"smooth":"auto"})}},{key:"scrollToWithOptions",value:function(e){var t=e.x,n=e.y,r=e.duration;this.pagingEnabled?this.pagingModeScroll(t,r):this.scrollTo(t,n,!0)}},{key:"init",value:function(){var e=this;this.touchListenerRelease=eo(this.dom,{onBeginDrag:this.handleBeginDrag.bind(this),onEndDrag:this.handleEndDrag.bind(this),onScroll:this.handleScroll.bind(this),onTouchMove:this.handleTouchMove.bind(this),onBeginSliding:this.handleBeginSliding.bind(this),onEndSliding:this.handleEndSliding.bind(this),updatePosition:this.updatePositionInfo.bind(this),getPosition:function(){return e.lastPosition},needSimulatedScrolling:this.pagingEnabled,scrollEnable:this.checkScrollEnable.bind(this)})}},{key:"pagingModeScroll",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;this.onMomentumScrollBegin(this.buildScrollEvent(this.dom));var r=[-1*e,0];so(this.dom,function(e){t.updatePositionInfo(e),t.onScroll(t.buildScrollEvent(t.dom))},this.lastPosition,r,n),this.onMomentumScrollEnd(this.buildScrollEvent(this.dom))}},{key:"checkScrollEnable",value:function(e,t){return t?this.scrollCaptureState&&t?(this.pagingEnabled&&t.preventDefault(),this.scrollCaptureState):(this.scrollCaptureState=this.needCaptureTouch(e,t),this.scrollCaptureState&&this.pagingEnabled&&t.preventDefault(),this.scrollCaptureState):this.scrollCaptureState}},{key:"needCaptureTouch",value:function(e,t){var n=no(t,e);return!(!(Math.abs(n[0])>5&&this.horizontal||Math.abs(n[1])>5&&!this.horizontal)||!this.scrollEnabled)}},{key:"handleBeginDrag",value:function(){this.onScrollBeginDrag(this.buildScrollEvent(this.dom))}},{key:"handleEndDrag",value:(n=l(h().mark(function e(t){var n,r,i,o,a=this;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.scrollCaptureState=!1,this.onScrollEndDrag(this.buildScrollEvent(this.dom)),!this.pagingEnabled){e.next=2;break}return this.onMomentumScrollBegin(this.buildScrollEvent(this.dom)),n=this.scrollEndCalculate(t),r=n.toOffset,i=[r,t[1]],o=function(e){a.updatePositionInfo(e),a.onScroll(a.buildScrollEvent(a.dom))},e.next=1,so(this.dom,o,t,i,100);case 1:this.onMomentumScrollEnd(this.buildScrollEvent(this.dom));case 2:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"updatePositionInfo",value:function(e){this.lastPosition=e}},{key:"scrollEndCalculate",value:function(e){return ao(this.dom.clientWidth,this.dom.scrollWidth,e[0])}},{key:"handleTouchMove",value:function(){this.handleScroll()}},{key:"handleScroll",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.dom&&(!t&&oo(this.lastTimestamp,this.scrollEventThrottle,function(){e.onScroll(e.buildScrollEvent(e.dom)),e.lastTimestamp=Date.now()}),t&&this.onScroll(this.buildScrollEvent(this.dom)))}},{key:"handleBeginSliding",value:function(){this.onMomentumScrollBegin(this.buildScrollEvent(this.dom))}},{key:"handleEndSliding",value:function(){this.pagingEnabled||(this.handleScroll(),this.onMomentumScrollEnd(this.buildScrollEvent(this.dom)))}},{key:"buildScrollEvent",value:function(e){var t={contentInset:{right:0,top:0,left:0,bottom:0},contentOffset:{x:null==e?void 0:e.scrollLeft,y:null==e?void 0:e.scrollTop},contentSize:{width:null==e?void 0:e.clientWidth,height:null==e?void 0:e.clientHeight},layoutMeasurement:{width:null==e?void 0:e.clientWidth,height:null==e?void 0:e.clientHeight},zoomScale:1};return this.pagingEnabled&&(t.contentOffset={x:Math.abs(this.lastPosition[0]),y:Math.abs(this.lastPosition[1])}),t}}]);var n,r,i,o}(Oi),xo=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).tagName=vr.TEXT_INPUT,i.dom=document.createElement("input"),i.init(),i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return Kn(Kn({},Yn(t,"defaultStyle",this,3)([])),{},{outline:"none",fontFamily:""})}},{key:"updateProps",value:function(e,t){var n;this.firstUpdateStyle&&t(this,{style:this.defaultStyle()});var r=Kn({},e);(null===(n=null==e?void 0:e.style)||void 0===n?void 0:n.placeholderTextColor)&&(r.placeholderTextColor=zr(r.style.placeholderTextColor),delete r.style.placeholderTextColor),e.style&&Object.assign(r.style,this.borderStyleSupport(e.style)),t(this,r)}},{key:"borderStyleSupport",value:function(e){var t={};return e.borderTopWidth||e.borderBottomWidth||e.borderLeftWidth||e.borderRightWidth||(t={backgroundColor:"#ffffff00",border:"0px solid #000000",padding:"0px"}),t}},{key:"defaultValue",get:function(){var e;return null!==(e=this.props[Tr.DEFAULT_VALUE])&&void 0!==e?e:""},set:function(e){this.props[Tr.DEFAULT_VALUE]=e,this.value&&0!==this.value.length||!this.dom||(this.dom.value=e,this.onChangeText({text:this.dom.value}))}},{key:"editable",get:function(){return this.props[Tr.EDITABLE]},set:function(e){var t,n;this.props[Tr.EDITABLE]=e,e?null===(t=this.dom)||void 0===t||t.removeAttribute("disabled"):null===(n=this.dom)||void 0===n||n.setAttribute("disabled","disabled")}},{key:"keyboardType",get:function(){return this.props[Tr.KEY_BOARD_TYPE]},set:function(e){var t,n;switch(this.props[Tr.KEY_BOARD_TYPE]=e,e){case Ir.numeric:n="number";break;case Ir.password:n="password";break;case Ir.email:n="email";break;case Ir.phonePad:n="tel";break;default:n="text"}null===(t=this.dom)||void 0===t||t.setAttribute("type",n)}},{key:"maxLength",get:function(){return this.props[Tr.MAX_LENGTH]},set:function(e){var t;this.props[Tr.MAX_LENGTH]=e,null===(t=this.dom)||void 0===t||t.setAttribute("maxlength",String(e))}},{key:"multiline",get:function(){return this.props[Tr.MULTILINE]},set:function(e){var t,n;e&&"TEXTAREA"===(null===(t=this.dom)||void 0===t?void 0:t.tagName)||!e&&"INPUT"===(null===(n=this.dom)||void 0===n?void 0:n.tagName)||(this.props[Tr.MULTILINE]=e,this.changeToDomMode(e))}},{key:"numberOfLines",get:function(){return this.props[Tr.NUMBER_OF_LINES]},set:function(e){var t;this.props[Tr.NUMBER_OF_LINES]=e,null===(t=this.dom)||void 0===t||t.setAttribute("rows",String(e))}},{key:"placeholder",get:function(){return this.props[Tr.PLACEHOLDER]},set:function(e){var t;this.props[Tr.PLACEHOLDER]=e,null===(t=this.dom)||void 0===t||t.setAttribute("placeholder",e)}},{key:"placeholderTextColor",get:function(){return this.props[Tr.PLACEHOLDER_TEXT_COLOR]},set:function(e){var t,n;this.placeholderTextColorStyle||(this.placeholderTextColorStyle=(n=document.createElement("style"),document.head.appendChild(n),n),null===(t=this.dom)||void 0===t||t.setAttribute("class","k".concat(this.id))),this.props[Tr.PLACEHOLDER_TEXT_COLOR]=e;var r=this.placeholderTextColorStyle;!function(e,t){t.childNodes.length>0&&t.removeChild(t.childNodes[0]);t.appendChild(document.createTextNode(e))}(".k".concat(this.id,"::placeholder { color: ").concat(e," }"),r)}},{key:"returnKeyType",get:function(){return this.props[Tr.RETURN_KEY_TYPE]},set:function(e){var t;this.props[Tr.RETURN_KEY_TYPE]=e,null===(t=this.dom)||void 0===t||t.setAttribute("enterkeyhint",e)}},{key:"value",get:function(){return this.props[Tr.VALUE]},set:function(e){var t;this.props[Tr.VALUE]=e,null===(t=this.dom)||void 0===t||t.setAttribute("value",e)}},{key:"autoFocus",get:function(){return this.props[Tr.AUTO_FOCUS]},set:function(e){var t,n;this.props[Tr.AUTO_FOCUS]=e,this.props[Tr.AUTO_FOCUS]&&(null===(t=this.dom)||void 0===t||t.setAttribute("autofocus","true")),this.props[Tr.AUTO_FOCUS]&&(null===(n=this.dom)||void 0===n||n.removeAttribute("autofocus"))}},{key:"onBlur",value:function(e){this.props[Tr.ON_BLUR]&&this.dispatchEvent(Tr.ON_BLUR,e)}},{key:"onChangeText",value:function(e){this.props[Tr.ON_CHANGE_TEXT]&&this.dispatchEvent(Tr.ON_CHANGE_TEXT,e)}},{key:"onEndEditing",value:function(e){this.props[Tr.ON_END_EDITING]&&this.dispatchEvent(Tr.ON_END_EDITING,e)}},{key:"onSelectionChange",value:function(e){this.props[Tr.ON_SELECTION_CHANGE]&&this.dispatchEvent(Tr.ON_SELECTION_CHANGE,e)}},{key:"blurTextInput",value:function(){var e;null===(e=this.dom)||void 0===e||e.blur(),this.props[Tr.IS_FOCUSED]=!1}},{key:"focusTextInput",value:function(){var e;null===(e=this.dom)||void 0===e||e.focus(),this.props[Tr.IS_FOCUSED]=!0}},{key:"clear",value:function(){this.dom&&(this.dom.value="")}},{key:"getValue",value:function(e){var t,n;e.resolve({text:null!==(n=null===(t=this.dom)||void 0===t?void 0:t.value)&&void 0!==n?n:""})}},{key:"hideInputMethod",value:function(){var e;null===(e=this.dom)||void 0===e||e.blur(),this.props[Tr.IS_FOCUSED]=!1}},{key:"setValue",value:function(e){this.dom&&(this.dom.value=e)}},{key:"showInputMethod",value:function(){var e;null===(e=this.dom)||void 0===e||e.focus(),this.props[Tr.IS_FOCUSED]=!0}},{key:"isFocused",value:function(e){e.resolve({value:Boolean(this.props[Tr.IS_FOCUSED])})}},{key:"init",value:function(){document.addEventListener("selectionchange",this.handleSelection.bind(this)),this.dom.addEventListener("input",this.handleInput.bind(this)),this.dom.addEventListener("blur",this.handleBlur.bind(this)),this.dom.addEventListener("keypress",this.handleKeyPress.bind(this))}},{key:"changeToDomMode",value:(n=l(h().mark(function e(t){var n,r,i;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=this.context.getModuleByName("UIManagerModule"),i=!1,(null===(n=this.dom)||void 0===n?void 0:n.parentNode)&&(i=!0),i&&r.viewDelete(this),this.dom=t?document.createElement("textarea"):document.createElement("input"),this.init(),i?r.viewInit(this,this.props,this.index):r.updateViewProps(this,this.props);case 1:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"handleKeyPress",value:function(e){"Enter"!==e.code||this.multiline||this.onEndEditing(null)}},{key:"handleSelection",value:function(){var e,t,n=[0,0],r=window.getSelection();if(document.activeElement===this.dom&&this.dom&&r){var i=this.dom.value.indexOf(r.toString());if(i===n[0]&&n[1]===i+r.toString().length)return;n[0]=i,n[1]=i+r.toString().length,this.onSelectionChange((e=i,t=i+r.toString().length,{nativeEvent:{selection:{start:e,end:t}}}))}}},{key:"handleInput",value:function(){var e,t,n;0===(null===(e=this.value)||void 0===e?void 0:e.length)&&this.defaultValue&&(this.onChangeText({text:null===(t=this.dom)||void 0===t?void 0:t.value}),this.setValue(this.defaultValue)),this.onChangeText({text:null===(n=this.dom)||void 0===n?void 0:n.value})}},{key:"handleBlur",value:function(){this.onBlur(null)}}]);var n}(Oi);var Co=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).tagName=vr.VIEW,i.dom=document.createElement("div"),i}return Gn(t,e),R(t)}(Oi),To=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).pageIndex=0,i.scrollCaptureState=!1,i.lastPosition=[0,0],i.children=[],i.swipeRecognize=null,i.tagName=vr.VIEW_PAGER,i.dom=document.createElement("div"),i.init(),i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{display:"flex",flexDirection:"row",overflowX:"visible",overflowY:"visible",maxHeight:"100%",boxSizing:"border-box"}}},{key:"initialPage",get:function(){return this.props[Tr.INITIAL_PAGE]},set:function(e){this.props[Tr.INITIAL_PAGE]=e}},{key:"scrollEnabled",get:function(){return this.props[Tr.SCROLL_ENABLED]},set:function(e){this.props[Tr.SCROLL_ENABLED]=e}},{key:"onPageSelected",value:function(e){this.props[Tr.ON_PAGE_SELECTED]&&this.dispatchEvent(Tr.ON_PAGE_SELECTED,e)}},{key:"onPageScroll",value:function(e){this.props[Tr.ON_PAGE_SCROLL]&&this.dispatchEvent(Tr.ON_PAGE_SCROLL,e)}},{key:"onPageScrollStateChanged",value:function(e){this.props[Tr.ON_PAGE_SCROLL_STATE_CHANGED]&&this.dispatchEvent(Tr.ON_PAGE_SCROLL_STATE_CHANGED,e)}},{key:"setPage",value:function(e){this.scrollPage(e,!0)}},{key:"setPageWithoutAnimation",value:function(e){this.scrollPage(e,!1)}},{key:"beforeChildMount",value:(o=l(h().mark(function e(n,r){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yn(t,"beforeChildMount",this,3)([n,r]);case 1:n instanceof Oo&&this.children.push(n);case 2:case"end":return e.stop()}},e,this)})),function(e,t){return o.apply(this,arguments)})},{key:"beforeChildRemove",value:function(e){Yn(t,"beforeChildRemove",this,3)([e]),e instanceof Oo&&(this.children=this.children.filter(function(t){return t!==e}))}},{key:"beforeRemove",value:(i=l(h().mark(function e(){var n;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yn(t,"beforeRemove",this,3)([]);case 1:this.hammer.destroy(),null===(n=this.touchListenerRelease)||void 0===n||n.call(this);case 2:case"end":return e.stop()}},e,this)})),function(){return i.apply(this,arguments)})},{key:"endBatch",value:function(){0!==this.initialPage&&this.initialPage!==this.pageIndex&&this.scrollToPageByIndex(this.initialPage,!1)}},{key:"init",value:function(){var e=this;this.props[Tr.INITIAL_PAGE]=0,this.props[Tr.SCROLL_ENABLED]=!0,this.hammer=new Ii.exports.Manager(this.dom,{inputClass:Ii.exports.TouchInput,touchAction:"auto"});var t=new Ii.exports.Swipe;this.hammer.add(t),this.hammer.on("swipe",function(t){e.swipeRecognize=t,t.srcEvent.stopPropagation()}),this.touchListenerRelease=eo(this.dom,{onTouchMove:this.handleScroll.bind(this),onBeginDrag:this.handleBeginDrag.bind(this),onEndDrag:this.handleEndDrag.bind(this),updatePosition:this.updatePositionInfo.bind(this),getPosition:function(){return e.lastPosition},scrollEnable:this.checkScrollEnable.bind(this),needSimulatedScrolling:!0})}},{key:"checkScrollEnable",value:function(e,t){return t?this.scrollCaptureState&&t?(t.preventDefault(),this.scrollCaptureState):(this.scrollCaptureState=this.needCaptureTouch(e,t),this.scrollCaptureState&&t.preventDefault(),this.scrollCaptureState):this.scrollCaptureState}},{key:"needCaptureTouch",value:function(e,t){var n=no(t,e);return!!(Math.abs(n[0])>5&&this.scrollEnabled)}},{key:"handleScroll",value:function(){this.dom&&this.onPageScroll(function(e,t,n){var r=parseInt(String(Math.abs(n[0])/e),10),i=Math.abs(n[0])%e/e,o=t;r<t&&(o-=1);return{offset:Number(i.toFixed(3)),position:o}}(this.dom.clientWidth,this.pageIndex,this.lastPosition))}},{key:"handleBeginDrag",value:function(){this.swipeRecognize=null,this.onPageScrollStateChanged(Io(Rr.DRAG))}},{key:"handleEndDrag",value:(r=l(h().mark(function e(t){var n,r,i,o,a,s,u=this;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.scrollCaptureState=!1,this.onPageScrollStateChanged(Io(Rr.SETTL)),!this.swipeRecognize){e.next=1;break}return n=this.pageIndex,this.swipeRecognize.offsetDirection===Ii.exports.DIRECTION_RIGHT&&this.pageIndex>0?n-=1:this.swipeRecognize.offsetDirection===Ii.exports.DIRECTION_LEFT&&this.pageIndex<this.children.length-1&&(n+=1),this.scrollPage(n,!0),this.swipeRecognize=null,e.abrupt("return");case 1:return r=ao(this.dom.clientWidth,this.dom.scrollWidth,t[0]),i=r.toOffset,o=r.newPageIndex,a=[i,t[1]],s=function(e,t){u.updatePositionInfo(e,t),u.handleScroll()},e.next=2,so(this.dom,s,t,a,200,this.pageIndex,o);case 2:this.onPageSelected({position:o}),this.onPageScrollStateChanged(Io(Rr.IDLE));case 3:case"end":return e.stop()}},e,this)})),function(e){return r.apply(this,arguments)})},{key:"updatePositionInfo",value:function(e,t){void 0!==t&&(this.pageIndex=t),this.lastPosition=e}},{key:"scrollToPageByIndex",value:(n=l(h().mark(function e(t,n){var r,i,o,a,s=this;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.dom.clientWidth,i=y(this.lastPosition),o=[t*r*-1,this.lastPosition[1]],this.onPageScrollStateChanged(Io(Rr.SETTL)),a=function(e,t){s.updatePositionInfo(e,t),s.handleScroll()},e.next=1,so(this.dom,a,i,o,n?200:0,this.pageIndex,t);case 1:this.onPageSelected({position:t}),this.onPageScrollStateChanged(Io(Rr.IDLE));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"scrollPage",value:function(e,t){this.dom&&this.scrollToPageByIndex(e,t)}}]);var n,r,i,o}(Oi);function Io(e){return{pageScrollState:e}}var Oo=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).tagName=vr.VIEW_PAGER_ITEM,i.dom=document.createElement("div"),i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{flexShrink:0,display:"flex",boxSizing:"border-box",position:"static"}}},{key:"updateProps",value:function(e,t){var n=Kn({},e);e.style&&"absolute"===e.style.position&&delete n.style.position,Object.assign(n.style,this.defaultStyle()),t(this,n)}},{key:"beforeMount",value:(n=l(h().mark(function e(n,r){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yn(t,"beforeMount",this,3)([n,r]);case 1:Ur(this.dom,{width:"".concat(n.dom.clientWidth,"px")});case 2:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})}]);var n}(Oi),Lo=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).isMounted=!1,i.dom=document.createElement("iframe"),i.tagName=vr.WEB_VIEW,i.dom.onload=i.onLoadEnd.bind(i),i}return Gn(t,e),R(t,[{key:"source",get:function(){return this.props[Tr.SOURCE]},set:function(e){var t;this.props[Tr.SOURCE]=e,this.isMounted&&(this.onLoadStart(this.props[Tr.SOURCE]),this.dom.src=null!==(t=e.uri)&&void 0!==t?t:"",this.onLoad(this.props[Tr.SOURCE]))}},{key:"userAgent",get:function(){return this.props[Tr.USER_AGENT]},set:function(e){this.props[Tr.USER_AGENT]=e}},{key:"method",get:function(){return this.props[Tr.METHOD]},set:function(e){this.props[Tr.METHOD]=e}},{key:"onLoadStart",value:function(e){this.props[Tr.ON_LOAD_START]&&this.dispatchEvent(Tr.ON_LOAD_START,e)}},{key:"onLoad",value:function(e){this.props[Tr.ON_LOAD]&&this.dispatchEvent(Tr.ON_LOAD,e)}},{key:"onLoadEnd",value:function(){this.props[Tr.ON_LOAD_END]&&this.dispatchEvent(Tr.ON_LOAD_END,this.props[Tr.SOURCE])}},{key:"beforeMount",value:(n=l(h().mark(function e(n,r){var i;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yn(t,"beforeMount",this,3)([n,r]);case 1:this.props[Tr.SOURCE].uri&&(this.dom.src=null!==(i=this.props[Tr.SOURCE].uri)&&void 0!==i?i:""),this.dom.src&&this.onLoadStart(this.props[Tr.SOURCE]);case 2:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"mounted",value:function(){this.isMounted=!0,this.dom.src&&this.onLoad(this.props[Tr.SOURCE])}},{key:"style",get:function(){return this.props[Tr.STYLE]},set:function(e){this.props[Tr.STYLE]=e}}]);var n}(Oi),Po={head:{"text-overflow":"ellipsis",direction:"rtl"},clip:{"text-overflow":"clip"},middle:{"text-overflow":"ellipsis"},tail:{"text-overflow":"ellipsis"}},Ro=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t,[e,n,r])).tagName=vr.TEXT,i.dom=document.createElement("span"),i.props[Tr.ELLIPSIZE_MODE]=xr.TAIL,i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return Kn({boxSizing:"border-box",zIndex:0},Po[this.ellipsizeMode])}},{key:"numberOfLines",get:function(){return this.props[Tr.NUMBER_OF_LINES]},set:function(e){this.props[Tr.NUMBER_OF_LINES]=e,1===e?this.dom&&Ur(this.dom,{"white-space":"nowrap","word-break":"keep-all",display:"initial","-webkit-box-orient":"","-webkit-line-clamp":"",overflow:""}):this.dom&&Ur(this.dom,{"white-space":"normal","word-break":"break-all",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":"".concat(e),overflow:"hidden"})}},{key:"ellipsizeMode",get:function(){return this.props[Tr.ELLIPSIZE_MODE]},set:function(e){this.props[Tr.ELLIPSIZE_MODE]=e,this.dom&&e&&Ur(this.dom,Kn(Kn({},Po[e]),{},{overflow:"hidden","white-space":"nowrap"}))}},{key:"text",get:function(){return this.props[Tr.VALUE]},set:function(e){if(this.props[Tr.VALUE]=e,this.dom.childNodes.length>0){var t=null;return this.dom.childNodes.forEach(function(e){e instanceof Text&&(t=e)}),void(t&&t.textContent!==e&&(t.textContent=e))}var n=document.createTextNode(e);this.dom.childNodes.length>0&&this.dom.removeChild(this.dom.childNodes[0]),this.dom.appendChild(n)}}])}(Oi),No=Object.freeze({__proto__:null,Image:Ri,ListView:uo,Modal:vo,RefreshWrapper:_o,ScrollView:Ao,TextInput:xo,View:Co,ViewPager:To,WebView:Lo,Text:Ro,ListViewItem:lo,ViewPagerItem:Oo,RefreshWrapperItemView:bo,HippyWebView:Oi});Hippy.web={},Hippy.web.Engine=ni;var Do,Mo=function(e){function t(){var e;return O(this,t),(e=$n(this,t,arguments)).name="AnimationModule",e.animationPool={},e.animationSetPool={},e}return Gn(t,e),R(t,[{key:"createAnimation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"timing",n=arguments.length>2?arguments[2]:void 0;this.animationPool[e]||(t||(this.animationPool[e]=null),"timing"===t&&(this.animationPool[e]=new Uo(this.context,e,n,t)))}},{key:"createAnimationSet",value:function(e,t){this.animationSetPool[e]||(this.animationSetPool[e]=new Wo(this.context,e,t))}},{key:"updateAnimation",value:function(e,t){var n;this.isValidAnimationId(e)?null===(n=this.animationPool[e])||void 0===n||n.update(t):$r("hippy","animation update failed, animationId not find animation object",e)}},{key:"startAnimation",value:function(e){var t,n;this.isValidAnimationId(e)?(null===(t=this.animationSetPool[e])||void 0===t||t.start(),null===(n=this.animationPool[e])||void 0===n||n.start()):$r("hippy","animation start failed, animationId not find animation object",e)}},{key:"pauseAnimation",value:function(e){var t,n;this.isValidAnimationId(e)?(null===(t=this.animationSetPool[e])||void 0===t||t.stop(),null===(n=this.animationPool[e])||void 0===n||n.stop()):$r("hippy","animation stop failed, animationId not find animation object",e)}},{key:"resumeAnimation",value:function(e){var t,n;this.isValidAnimationId(e)?(null===(t=this.animationSetPool[e])||void 0===t||t.resume(),null===(n=this.animationPool[e])||void 0===n||n.resume()):$r("hippy","animation resume failed, animationId not find animation object",e)}},{key:"destroyAnimation",value:function(e){var t,n;this.isValidAnimationId(e)?(null===(t=this.animationSetPool[e])||void 0===t||t.destroy(),null===(n=this.animationPool[e])||void 0===n||n.destroy()):$r("hippy","animation destroy failed, animationId not find animation object",e)}},{key:"linkInitAnimation2Element",value:function(e,t,n){this.linkAnimation2Element(e,t,n)||this.animationPool[e].initAnimation(t.dom)}},{key:"linkAnimation2Element",value:function(e,t,n){return!this.animationPool[e]&&!this.animationSetPool[e]||(this.animationSetPool[e]?(this.linkAnimationSet2Element(e,t,n),!0):(this.linkAnimationCheck(t,n),this.animationPool[e].nodeId=t.id,this.animationPool[e].animationProperty=n,!1))}},{key:"linkAnimationSet2Element",value:function(e,t,n){this.animationSetPool[e]&&(this.animationSetPool[e].nodeId=t.id,this.animationSetPool[e].initAnimationSet(e,t,n))}},{key:"getAnimationStartValue",value:function(e){return this.animationPool[e]?this.animationPool[e].animationBeginValue:null}},{key:"findAnimation",value:function(e){return this.animationPool[e]}},{key:"addEventListener",value:function(e,t,n){var r,i;this.animationPool[e]&&(null===(r=this.animationPool[e])||void 0===r||r.addAnimationEventListener(t,n)),this.animationSetPool[e]&&(null===(i=this.animationSetPool[e])||void 0===i||i.addAnimationEventListener(t,n))}},{key:"removeEventListener",value:function(e,t,n){var r,i;this.animationPool[e]&&(null===(r=this.animationPool[e])||void 0===r||r.removeAnimationEventListener(t,n)),this.animationSetPool[e]&&(null===(i=this.animationSetPool[e])||void 0===i||i.removeAnimationEventListener(t,n))}},{key:"isValidAnimationId",value:function(e){return this.animationPool[e]||this.animationSetPool[e]}},{key:"linkAnimationCheck",value:function(e,t){for(var n=0,r=Object.keys(this.animationPool);n<r.length;n++){var i=r[n],o=this.animationPool[i];(null==o?void 0:o.hasLinkedView(e.id))&&o.refCssProperty===t&&"end"!==o.state&&!this.isAnimationSetChild(null==o?void 0:o.id)&&o.clearLinkNode()}}},{key:"isAnimationSetChild",value:function(e){for(var t=0,n=Object.keys(this.animationSetPool);t<n.length;t++){var r=n[t],i=this.animationSetPool[r],o=null==i?void 0:i.containAnimationId(e);if(o)return o}return!1}}])}(oi);!function(e){e.START="onHippyAnimationStart",e.END="onHippyAnimationEnd",e.CANCEL="onHippyAnimationCancel",e.REPEAT="onHippyAnimationRepeat"}(Do||(Do={}));var Fo={perspective:1,rotate:1,rotateX:1,rotateY:1,rotateZ:1,scale:1,scaleX:1,scaleY:1,translateX:1,translateY:1,skewX:1};function Bo(e){switch(e){case"animationstart":return Do.START;case"animationend":return Do.END;case"animationrepeat":return Do.REPEAT;case"animationcancel":return Do.CANCEL;default:return e}}var jo=function(){return R(function e(){O(this,e),this.events={}},[{key:"addAnimationEventListener",value:function(e,t){var n=Bo(e),r=this.events[n];(null==r?void 0:r.length)?r.push(t):this.events[n]=[t]}},{key:"removeAnimationEventListener",value:function(e,t){var n=Bo(e);if(t){var r=this.events[n];if(r){var i=[];r.forEach(function(e,n){e===t&&i.push(n)}),i&&i.forEach(function(e){delete r[e]})}else this.events[n]=[]}else this.events[n]=[]}},{key:"dispatchEvent",value:function(e){var t=this.events[e];(null==t?void 0:t.length)&&t.forEach(function(e){e.resolve(null)})}}])}(),Uo=function(e){function t(e,n,r,i){var o;return O(this,t),(o=$n(this,t)).refCssProperty=null,o.animationStamp=Date.now(),o.refNodeIds=new Set,o.domes={},o.animationState="wait",o.beginListener=[],o.endListener=[],o.cleared=!1,o.animationInfo=r,o.timeMode=i,o.id=n,o.context=e,o.handleAnimationEnd=o.handleAnimationEnd.bind(o),o.handleAnimationStart=o.handleAnimationStart.bind(o),o}return Gn(t,e),R(t,[{key:"state",get:function(){return this.animationState}},{key:"nodeId",set:function(e){this.refNodeIds.add(e)}},{key:"animationBeginValue",get:function(){return this.buildAnimationValue(this.animationInfo.startValue)}},{key:"animationEndValue",get:function(){return this.buildAnimationValue(this.animationInfo.toValue)}},{key:"animationTime",get:function(){return"".concat(this.animationInfo.duration/1e3,"s")}},{key:"delayTime",get:function(){return this.animationInfo.delay?"".concat(this.animationInfo.delay/1e3,"s"):"0s"}},{key:"animationUseTime",get:function(){return this.animationInfo.duration+(void 0!==this.animationInfo.delay?this.animationInfo.delay:0)}},{key:"animationName",get:function(){return"".concat(this.animationNamePrefix,"-").concat(this.animationStamp)}},{key:"animationNamePrefix",get:function(){return"hippy-keyframe-".concat(this.id)}},{key:"iteration",get:function(){return void 0!==this.animationInfo.repeatCount&&this.animationInfo.repeatCount<0?"infinite":this.animationInfo&&this.animationInfo.repeatCount?String(this.animationInfo.repeatCount):"1"}},{key:"animationProperty",set:function(e){if("string"!=typeof e){var t=s(Object.keys(e),1)[0];Fo[t]&&(this.refCssProperty=t)}else this.refCssProperty=e}},{key:"useForSetProperty",get:function(){return this.refCssProperty?Fo[this.refCssProperty]?"transform":this.refCssProperty.replace(/[A-Z]/g,function(e){return"-".concat(e.toLowerCase())}):""}},{key:"hasLinkedView",value:function(e){return this.refNodeIds.has(e)}},{key:"getDomByNodeId",value:function(e){if(this.domes[e])return this.domes[e];var t=document.getElementById(String(e));return t&&(this.domes[e]=t),t}},{key:"initAnimation",value:function(e){if(!this.cleared){var t=this.createAnimationKeyFrame(this.createAnimationBeginAndEndValue());"end"!==this.animationState&&"play"!==this.animationState||(t=this.createAnimationKeyFrame(this.createAnimationEndAndEndValue())),this.updateAnimationInfoToPageStyle(t);var n=Ho(this.animationTime,this.animationName,this.animationInfo.timingFunction,this.delayTime,"paused",this.iteration,"both");this.animationUpdate2Css(n,e)}}},{key:"start",value:function(){var e,t,n=this;if(!this.cleared){var r=this.createAnimationKeyFrame(this.createAnimationBeginAndEndValue());this.updateAnimationInfoToPageStyle(r),this.changeAnimationStatus("running"),this.animationState="play",setTimeout(function(){n.handleAnimationStart({animationName:n.animationName,elapsedTime:0,pseudoElement:""})},null!==(e=this.animationInfo.delay)&&void 0!==e?e:0),setTimeout(function(){n.handleAnimationEnd({animationName:n.animationName,elapsedTime:0,pseudoElement:""}),n.animationState="end"},(null!==(t=this.animationInfo.delay)&&void 0!==t?t:0)+this.animationInfo.duration)}}},{key:"stop",value:function(){this.changeAnimationStatus("paused")}},{key:"resume",value:function(){this.changeAnimationStatus("running")}},{key:"destroy",value:function(){this.changeAnimationStatus("paused"),this.batchUpdateCss(null)}},{key:"update",value:function(e){this.cleared=!1,this.animationState="wait",this.animationInfo=e,this.animationStamp=Date.now(),this.updateAnimationInfoToPageStyle(this.createAnimationKeyFrame(this.createAnimationBeginAndEndValue()));var t=Ho(this.animationTime,this.animationName,this.animationInfo.timingFunction,this.delayTime,"paused",this.iteration,"both");this.batchUpdateCss(t)}},{key:"addEventListener",value:function(e,t){switch(e){case"begin":this.beginListener.push(t);break;case"end":this.endListener.push(t)}}},{key:"clearLinkNode",value:function(){this.cleared=!0,this.batchUpdateCss(null)}},{key:"createAnimationBeginAndEndValue",value:function(){var e=this.buildCssValue(this.animationBeginValue),t=this.buildCssValue(this.animationEndValue),n={},r={};return n[this.useForSetProperty]=e,r[this.useForSetProperty]=t,{beginFrame:n,endFrame:r}}},{key:"createAnimationEndAndEndValue",value:function(){var e=this.buildCssValue(this.animationEndValue),t=e,n={},r={};return n[this.useForSetProperty]=e,r[this.useForSetProperty]=t,{beginFrame:n,endFrame:r}}},{key:"createAnimationKeyFrame",value:function(e){var t,n,r,i=e.beginFrame,o=e.endFrame,a=(t=i,n=o,r=this.animationName," @keyframes ".concat(r,"{\n from {").concat(Vo(t),"}\n to {").concat(Vo(n),"}\n }"));return{keyFrame:zo(this.animationName),keyFrameData:a}}},{key:"updateAnimationInfoToPageStyle",value:function(e){var t,n,r,i=e.keyFrame,o=e.keyFrameData;i.cssRule?(t=this.animationName,n=o,(r=zo(t)).styleSheet.rules.length&&r.styleSheet.deleteRule(0),r.styleSheet.insertRule(n)):function(e){var t=document.createElement("style");t.type="text/css",t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}(o)}},{key:"changeAnimationStatus",value:function(e){if(zo(this.animationName).cssRule){var t=Ho(this.animationTime,this.animationName,this.animationInfo.timingFunction,this.delayTime,e,this.iteration,"both");this.batchUpdateCss(t)}}},{key:"batchUpdateCss",value:function(e){var t=this;this.refNodeIds.forEach(function(n){var r=t.getDomByNodeId(n);r&&t.animationUpdate2Css(e,r)})}},{key:"animationUpdate2Css",value:function(e,t){var n,r=this,i=t;if(i){var o=i.style.animation?i.style.animation.split(","):[];if(o||null===e){var a=null!==(n=o.findIndex(function(e){return-1!==e.indexOf(r.animationNamePrefix)}))&&void 0!==n?n:-1;-1===a&&e&&o.push(e),-1!==a&&null!==e&&(o[a]=e),-1!==a&&null===e&&o.splice(a,1)}else(o=[]).push(e);Ur(i,{animation:o.join(",")})}}},{key:"buildCssValue",value:function(e){return"transform"===this.useForSetProperty?"".concat(this.refCssProperty,"(").concat(e,")"):e}},{key:"buildAnimationValue",value:function(e){var t="px";return this.animationInfo.valueType&&(t=this.animationInfo.valueType),"scale"!==this.refCssProperty&&"opacity"!==this.refCssProperty&&"color"!==this.refCssProperty&&"backgroundColor"!==this.refCssProperty||(t=""),"color"===this.refCssProperty||"backgroundColor"===this.refCssProperty?"".concat(zr(e)):"".concat(e).concat(t)}},{key:"handleAnimationStart",value:function(e){e.animationName===this.animationName&&this.dispatchEvent(Do.START),this.beginListener.forEach(function(e){e()})}},{key:"handleAnimationEnd",value:function(e){e.animationName===this.animationName&&this.dispatchEvent(Do.END),this.changeAnimationStatus("paused"),this.endListener.forEach(function(e){e()})}}])}(jo),Wo=function(e){function t(e,n,r){var i;return O(this,t),(i=$n(this,t)).refNodeIds=new Set,i.id=n,i.context=e,i.setOption=r,i.handleAnimationStart=i.handleAnimationStart.bind(i),i.handleAnimationEnd=i.handleAnimationEnd.bind(i),i}return Gn(t,e),R(t,[{key:"nodeId",set:function(e){this.refNodeIds.add(e)}},{key:"hasLinkedView",value:function(e){return this.refNodeIds.has(e)}},{key:"start",value:function(){for(var e=this,t=this.calculateAnimationTime(),n=function(){var t=e.setOption.children[r],n=e.context.getModuleByName("AnimationModule").findAnimation(t.animationId);if(0===r)return window.requestAnimationFrame(function(){n.start()}),1;var i=e.setOption.children[r-1],o=e.context.getModuleByName("AnimationModule").findAnimation(i.animationId);null==o||o.addEventListener("end",function(){o.destroy(),null==n||n.start()})},r=0;r<this.setOption.children.length;r++)n();var i=Math.max.apply(null,t);setTimeout(this.handleAnimationStart,0),setTimeout(this.handleAnimationEnd,i)}},{key:"stop",value:function(){}},{key:"resume",value:function(){}},{key:"destroy",value:function(){}},{key:"findFirstAnimation",value:function(){var e=s(this.setOption.children,1)[0];return this.context.getModuleByName("AnimationModule").findAnimation(e.animationId)}},{key:"initAnimationSet",value:function(e,t,n){var r=this.context.getModuleByName("AnimationModule");this.setOption.children.forEach(function(e,i){0!==i?r.linkAnimation2Element(e.animationId,t,n):r.linkInitAnimation2Element(e.animationId,t,n)})}},{key:"containAnimationId",value:function(e){return-1!==this.setOption.children.findIndex(function(t){return t.animationId===e})}},{key:"calculateAnimationTime",value:function(){for(var e,t,n=[],r=this.context.getModuleByName("AnimationModule"),i=0;i<this.setOption.children.length;i++){var o=this.setOption.children[i];0!==i?n[i]=n[i-1]+(null!==(t=null===(e=r.findAnimation(o.animationId))||void 0===e?void 0:e.animationUseTime)&&void 0!==t?t:0):n[i]=r.findAnimation(o.animationId).animationUseTime}return n}},{key:"handleAnimationStart",value:function(){this.dispatchEvent(Do.START)}},{key:"handleAnimationEnd",value:function(){this.dispatchEvent(Do.END)}}])}(jo);function Vo(e){for(var t="",n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];t+="".concat(i,":").concat(e[i])}return t}function zo(e){for(var t,n={},r=document.styleSheets,i=0;i<r.length;++i){var o=r[i];if((null===(t=o.cssRules[0])||void 0===t?void 0:t.name)===e){var a=s(o.cssRules,1)[0];n.cssRule=a,n.styleSheet=r[i],n.index=0}}return n}function Ho(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"linear",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"0s",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"running",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"1",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"forwards";return"".concat(e," ").concat(n," ").concat(r," ").concat(o," normal ").concat(a," ").concat(i," ").concat(t)}var Go=function(e){function t(){var e;return O(this,t),(e=$n(this,t,arguments)).name="ClipboardModule",e}return Gn(t,e),R(t,[{key:"getString",value:function(e){var t,n="";(null===(t=null===window||void 0===window?void 0:window.navigator)||void 0===t?void 0:t.clipboard)&&window.navigator.clipboard.readText().then(function(e){n=e},function(){$r("get clipboard failed")}).finally(function(){e.resolve(n)})}},{key:"setString",value:function(e){var t;if(null===(t=null===window||void 0===window?void 0:window.navigator)||void 0===t?void 0:t.clipboard)window.navigator.clipboard.writeText(e).then(null,function(){$r("set clipboard failed")});else if((null===document||void 0===document?void 0:document.queryCommandSupported)&&(null===document||void 0===document?void 0:document.queryCommandSupported("copy"))){var n=document.createElement("textarea");n.value=e,n.style.position="fixed",document.body.appendChild(n),n.select();try{document.execCommand("copy")}catch(e){$r("set clipboard failed")}finally{document.body.removeChild(n)}}}}])}(oi),Yo=function(e){function t(){var e;return O(this,t),(e=$n(this,t,arguments)).name="DeviceEventModule",e.listen=!1,e.moduleListener=[],e}return Gn(t,e),R(t,[{key:"invokeDefaultBackPressHandler",value:function(){var e=this;setTimeout(function(){var t,n;e.listen=!1,n=(null===(t=null===history||void 0===history?void 0:history.state)||void 0===t?void 0:t.target)===qo?-3:-2,history.go(n)},0)}},{key:"init",value:function(){}},{key:"setListenBackPress",value:function(e){this.moduleListener.length>0&&!e||(this.listen=e)}},{key:"setModuleListener",value:function(e){this.moduleListener.push(e),this.listen=!0}},{key:"removeModuleListener",value:function(e){this.moduleListener=this.moduleListener.filter(function(t){return t!==e})}},{key:"handleBack",value:function(){return!!this.listen&&(this.moduleListener.length>0?(this.moduleListener.reverse()[0](),!0):!!this.listen&&(this.context.sendEvent("hardwareBackPress",null),!0))}}])}(oi),qo="puppet";var Xo=function(e){function t(){var e;return O(this,t),(e=$n(this,t,arguments)).name="ImageLoaderModule",e}return Gn(t,e),R(t,[{key:"getSize",value:function(e,t){if(e){var n=new Image;n.onload=function(){t.resolve({width:n.width,height:n.height})},n.src=e}else t.reject("image url not support ".concat(e))}},{key:"prefetch",value:function(e){e&&((new Image).src=e)}},{key:"initialize",value:function(){}},{key:"destroy",value:function(){}}])}(oi),Zo=function(e){function t(e){var n;return O(this,t),(n=$n(this,t,[e])).name="NetInfo",n.handleOnlineChange=n.handleOnlineChange.bind(n),n}return Gn(t,e),R(t,[{key:"state",get:function(){var e="WIFI";return navigator.onLine||(e="NONE"),e}},{key:"getCurrentConnectivity",value:function(e){e.resolve({network_info:this.state})}},{key:"addListener",value:function(e){"networkStatusDidChange"===e&&(window.addEventListener("online",this.handleOnlineChange),window.addEventListener("offline",this.handleOnlineChange))}},{key:"removeListener",value:function(e){"networkStatusDidChange"===e&&(window.removeEventListener("online",this.handleOnlineChange),window.removeEventListener("offline",this.handleOnlineChange))}},{key:"destroy",value:function(){this.removeListener("change")}},{key:"handleOnlineChange",value:function(){this.context.sendEvent("networkStatusDidChange",{network_info:this.state})}}])}(oi),Ko=function(e){function t(){var e;return O(this,t),(e=$n(this,t,arguments)).name="network",e}return Gn(t,e),R(t,[{key:"fetch",value:function(e,t){e||t.reject("invalid request param");var r=e.url,i=e.method;r&&i||t.reject("no valid url for request");var o=e.redirect,a=e.body,s={redirect:o,headers:e.headers,method:i};"get"!==i.toLowerCase()&&(s.body=a),n.g.__fetch(r,s).then(function(){var e=l(h().mark(function e(n){var r,i,o,a,s,u;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=2;break}return e.next=1,n.text();case 1:r=e.sent,i={},o=qn(n.headers.keys());try{for(o.s();!(a=o.n()).done;)s=a.value,i[s]=n.headers.get(s)}catch(e){o.e(e)}finally{o.f()}return(u={statusCode:n.status,statusLine:n.statusText,respBody:r,respHeaders:i}).statusCode=n.status,t.resolve(u),e.abrupt("return");case 2:t.resolve("response null");case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),function(e){t.reject(e.toString())}).catch(function(e){t.reject(e.toString())})}},{key:"setCookie",value:function(e,t,n,r){n.split(";").forEach(function(e){document.cookie="".concat(e,"; expires=").concat(r,";domain=").concat(t)})}},{key:"getCookies",value:function(e){e.resolve(document.cookie)}},{key:"initialize",value:function(){}},{key:"destroy",value:function(){}}])}(oi),$o=function(e){function t(){var e;return O(this,t),(e=$n(this,t,arguments)).moduleName="StorageModule",e.STORE_PRX_KEY="hippy-storage-",e}return Gn(t,e),R(t,[{key:"getAllKeys",value:function(e){if(t.preCheck()){var n=window.__localStorage.getItem("".concat(this.STORE_PRX_KEY,"ALL-KEY"));try{n=JSON.stringify(n)}catch(e){throw"deserialize failed , getAllKeys()"}e.resolve(n)}else e.resolve("not support")}},{key:"multiGet",value:function(e,n){if(t.preCheck())if(!e||e.length<=0)n.reject("Invalid Key");else{var r=[];e.forEach(function(e){var t=window.__localStorage.getItem(e);if(t){try{t=JSON.stringify(t)}catch(e){throw"deserialize failed , getAllKeys()"}r.push([e,t])}}),n.resolve(r)}else n.reject("not support")}},{key:"multiSet",value:function(e,n){if(t.preCheck())if(!e||e.length<=0)n.reject("Invalid Key");else{for(var r=0;r<e.length;r++){var i=e[r];if(!i||2!==i.length||!i[0]||!i[1])return void n.reject("Invalid key or value");try{__localStorage.setItem(i[0],JSON.stringify(i[1]))}catch(e){return void n.reject("cant storage for key ${dataItem[0]} ")}}n.resolve("success")}else n.reject("not support")}},{key:"multiRemove",value:function(e,n){if(t.preCheck())if(!e||e.length<=0)n.reject("Invalid Key");else{for(var r=0;r<e.length;r++)window.__localStorage.removeItem(e[r]);n.resolve("success")}else n.reject("not support")}},{key:"initialize",value:function(){}},{key:"destroy",value:function(){}}],[{key:"preCheck",value:function(){return!!window.__localStorage||($r("not support localStorage"),!1)}}])}(oi),Jo=!1,Qo=function(e){function t(e){var n;return O(this,t),(n=$n(this,t,[e])).name="UIManagerModule",n.viewDictionary={},n.afterCreateAction=[],n.mode="sequential",n}return Gn(t,e),R(t,[{key:"init",value:function(){var e;!Jo&&((e=document.createElement("style")).type="text/css",e.innerHTML='*::-webkit-scrollbar {\n display: none;\n} img[src=""],img:not([src]){\n opacity: 0;\n visibility: hidden;\n }',document.getElementsByTagName("head")[0].appendChild(e)),Jo=!0}},{key:"createNode",value:(u=l(h().mark(function e(t,n){var r,i,o,a,u,l,c,d,f,p,v,y,m,g,_;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.createNodePreCheck(t),i=new Set,o=0;case 1:if(!(o<n.length)){e.next=9;break}if(a=s(n[o],1),u=a[0],l=u.id,c=u.pId,d=u.index,f=u.props,p=u.name){e.next=2;break}return $r("create component failed, tagName is ".concat(p)),e.abrupt("continue",8);case 2:if(v=ea(this.context,p,l,c)){e.next=3;break}return $r("create component failed, not support the component ".concat(p)),e.abrupt("continue",8);case 3:return e.prev=3,e.next=4,this.viewInit(v,f,d);case 4:e.next=6;break;case 5:e.prev=5,e.catch(3),Jr();case 6:if(!i.has(l)){e.next=7;break}return e.abrupt("continue",8);case 7:p!==vr.LIST&&p!==vr.VIEW_PAGER||i.add(l),(null===(r=this.findViewById(c))||void 0===r?void 0:r.tagName)===vr.LIST&&i.add(c);case 8:o++,e.next=1;break;case 9:y=qn(i);try{for(y.s();!(m=y.n()).done;)g=m.value,null==(_=this.findViewById(g))||_.endBatch()}catch(e){y.e(e)}finally{y.f()}this.afterCreateAction.forEach(function(e){return e()}),this.afterCreateAction=[];case 10:case"end":return e.stop()}},e,this,[[3,5]])})),function(e,t){return u.apply(this,arguments)})},{key:"deleteNode",value:(a=l(h().mark(function e(t,n){var r,i,o,a;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<n.length)){e.next=3;break}return i=s(n[r],1),o=i[0],a=this.findViewById(o.id),e.next=2,this.viewDelete(a);case 2:r++,e.next=1;break;case 3:case"end":return e.stop()}},e,this)})),function(e,t){return a.apply(this,arguments)})},{key:"updateNode",value:function(e,t){for(var n=0;n<t.length;n++){var r=s(t[n],1)[0],i=this.findViewById(r.id);(null==r?void 0:r.props)&&this.viewUpdate(i,r.props)}}},{key:"moveNode",value:(o=l(h().mark(function e(t,n){var r,i,o,a;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<n.length)){e.next=4;break}if(i=s(n[r],1),o=i[0],!(a=this.findViewById(o.id))){e.next=2;break}if(!this.findViewById(o.pId)||(null==a?void 0:a.pId)===o.pId){e.next=2;break}return e.next=2,this.viewDelete(a);case 2:return e.next=3,this.createNode(t,[n[r]]);case 3:r++,e.next=1;break;case 4:case"end":return e.stop()}},e,this)})),function(e,t){return o.apply(this,arguments)})},{key:"addEventListener",value:function(e,t,n){var r=this.findViewById(e);(null==r?void 0:r.addEventListener)&&r.addEventListener(t,n)}},{key:"removeEventListener",value:function(e,t){var n=this.findViewById(e);(null==n?void 0:n.removeEventListener)&&n.removeEventListener(t)}},{key:"callUIFunction",value:function(e,t){if(e&&!(e.length<3)){var n=s(e,3),r=n[0],i=n[1],o=n[2];r&&this.findViewById(r)&&function(e,t,n,r){var i=null!=n?n:[];if(t&&(null==e?void 0:e[t]))return void(null==e||e[t].apply(e,y(i).concat([r])));throw"call ui function failed,".concat(null==e?void 0:e.tagName," component not implement ").concat(t,"()")}(this.findViewById(r),i,o,t)}}},{key:"measureInWindow",value:function(e,t){var n,r=s(e,1)[0];if(r&&(null===(n=this.findViewById(r))||void 0===n?void 0:n.dom)){var i=this.findViewById(r);if(i.dom){var o=i.dom.getBoundingClientRect(),a=o.x,u=o.y,l=o.width,c=o.height,h=o.top,d=o.left,f=o.right,p=o.bottom;t.resolve({statusBarHeight:0,x:a,y:u,width:l,height:c,top:h,left:d,right:f,bottom:p})}}}},{key:"measureInAppWindow",value:function(e,t){this.measureInWindow(e,t)}},{key:"getBoundingClientRect",value:function(e,t){this.measureInWindow(e,t)}},{key:"findViewById",value:function(e){return this.viewDictionary[e]?this.viewDictionary[e]:null}},{key:"appendChild",value:function(e,t,n){var r;e.dom&&t.dom&&e.dom.insertBefore(t.dom,null!==(r=e.dom.childNodes[n])&&void 0!==r?r:null),this.viewDictionary[t.id]=t}},{key:"removeChild",value:(i=l(h().mark(function e(t,n){var r,i,o,a,s,u,l,c,d,f,p,v,y,m;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(u=this.findViewById(n),l=[],c=u.dom,d=document.createTreeWalker(u.dom,NodeFilter.SHOW_ALL,null);c;)c.id&&l.push(c.id),c=d.nextNode();f=qn(l.reverse()),e.prev=1,f.s();case 2:if((p=f.n()).done){e.next=7;break}if((v=p.value)!==n){e.next=3;break}return e.abrupt("continue",6);case 3:if((y=this.findViewById(v))&&y!==u){e.next=4;break}return e.abrupt("continue",6);case 4:return e.next=5,null===(r=y.beforeRemove)||void 0===r?void 0:r.call(y);case 5:null===(o=null===(i=this.findViewById(y.pId))||void 0===i?void 0:i.beforeChildRemove)||void 0===o||o.call(i,y),null===(a=y.destroy)||void 0===a||a.call(y),delete this.viewDictionary[y.id];case 6:e.next=2;break;case 7:e.next=9;break;case 8:e.prev=8,m=e.catch(1),f.e(m);case 9:return e.prev=9,f.f(),e.finish(9);case 10:(null==u?void 0:u.dom)&&t.dom&&!t.removeChild&&(null===(s=t.dom)||void 0===s||s.removeChild(u.dom)),delete this.viewDictionary[n];case 11:case"end":return e.stop()}},e,this,[[1,8,9,10]])})),function(e,t){return i.apply(this,arguments)})},{key:"defaultUpdateViewProps",value:function(e,t){var n,r,i,o,a,u=this;e.dom||"component update props process failed ,component's dom must be exited ".concat(null!==(n=e.tagName)&&void 0!==n?n:"");var l=Object.keys(t),c=function(e,t){var n={},r=0;return Object.keys(e).forEach(function(i){t[i]&&t[i]===e[i]||(n[i]=e[i],r+=1)}),Object.keys(e).concat(Object.keys(t)).filter(function(e){return!Object.keys(t).includes(e)}).forEach(function(i){e[i]||void 0===t[i]||(n[i]=null,r+=1)}),[n,r]}(t.style,null!==(i=null===(r=e.props)||void 0===r?void 0:r.style)&&void 0!==i?i:{}),h=s(c,2),d=h[0],f=h[1];if(t.style&&f>0){Ur(e.dom,d,function(t,n){u.animationProcess(t,n,e)});var p=this.findViewById(e.pId);!function(e,t,n){var r,i;"absolute"!==e.position||(null===(i=null===(r=null==n?void 0:n.props)||void 0===r?void 0:r.style)||void 0===i?void 0:i.position)||(null==n?void 0:n.defaultStyle().position)||Ur(n.dom,{position:"relative"}),"absolute"!==e.position||e.width||e.height||e.overflow||Ur(t.dom,{overflow:"visible"})}(d,e,p);var v={};Object.assign(v,t.style),null===(o=e.updateProperty)||void 0===o||o.call(e,"style",v),function(e,t,n){"absolute"===e.position||"relative"===e.position?(null==n||n.changeStackContext(!0),t.updateSelfStackContext(!0)):null===e.position?(null==n||n.changeStackContext(!1),t.updateSelfStackContext(!1)):(null==n?void 0:n.exitChildrenStackContext)&&null===e.zIndex&&t.updateSelfStackContext(!0)}(d,e,p)}for(var y=0,m=l;y<m.length;y++){var g=m[y];"style"!==g&&"attributes"!==g&&-1===g.indexOf("__bind__")&&(null===(a=e.updateProperty)||void 0===a||a.call(e,g,t[g]))}}},{key:"addAfterCreateAction",value:function(e){this.afterCreateAction.push(e)}},{key:"viewInit",value:(r=l(h().mark(function e(t,n,r){var i,o,a,s,u,l,c,d,f,p,v,y,m;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.dom){e.next=1;break}throw Error("component init process failed ,component's dom must be exit after component create ".concat(null!==(i=t.tagName)&&void 0!==i?i:""));case 1:if(t.dom.id=String(t.id),this.updateViewProps(t,n),(y=this.findViewById(t.pId))&&y.dom){e.next=2;break}return $r("component init process failed ,component's parent not exist or dom not exist, pid: ".concat(t.pId)),e.abrupt("return");case 2:return m=r,!y.insertChild&&void 0!==(null===(a=null===(o=y.dom)||void 0===o?void 0:o.childNodes)||void 0===a?void 0:a.length)&&r>(null===(u=null===(s=y.dom)||void 0===s?void 0:s.childNodes)||void 0===u?void 0:u.length)&&(m=null!==(d=null===(c=null===(l=y.dom)||void 0===l?void 0:l.childNodes)||void 0===c?void 0:c.length)&&void 0!==d?d:r),e.next=3,null===(f=t.beforeMount)||void 0===f?void 0:f.call(t,y,m);case 3:return e.next=4,null===(p=y.beforeChildMount)||void 0===p?void 0:p.call(y,t,m);case 4:y.insertChild?(y.insertChild(t,r),this.viewDictionary[t.id]=t):this.appendChild(y,t,m),null===(v=t.mounted)||void 0===v||v.call(t);case 5:case"end":return e.stop()}},e,this)})),function(e,t,n){return r.apply(this,arguments)})},{key:"viewDelete",value:(n=l(h().mark(function e(t){var n,r,i,o,a,s;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=t?this.findViewById(t.pId):null){e.next=1;break}return e.abrupt("return");case 1:return e.next=2,null===(r=(n=t).beforeRemove)||void 0===r?void 0:r.call(n);case 2:return e.next=3,null===(i=s.beforeChildRemove)||void 0===i?void 0:i.call(s,t);case 3:if(!s.removeChild){e.next=5;break}return e.next=4,s.removeChild(t);case 4:e.next=6;break;case 5:return e.next=6,this.removeChild(s,t.id);case 6:null===(a=(o=t).destroy)||void 0===a||a.call(o),delete this.viewDictionary[t.id];case 7:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"viewUpdate",value:function(e,t){e&&this.updateViewProps(e,t)}},{key:"updateViewProps",value:function(e,t){e.updateProps?e.updateProps(t,this.defaultUpdateViewProps.bind(this)):this.defaultUpdateViewProps(e,t)}},{key:"createNodePreCheck",value:function(e){var t,n,r=this;if(!this.rootDom){var i=s(document.getElementsByTagName("body"),1);this.rootDom=i[0]}if(!this.contentDom){var o=0;window.document.getElementById(null!=e?e:"")?this.contentDom=window.document.getElementById(e):(this.contentDom=(t=e,(n=window.document.createElement("div")).setAttribute("id",t),n.id=t,n),this.rootDom.appendChild(this.contentDom),o=this.rootDom.childNodes.length-1),this.contentDom.parentNode.childNodes.forEach(function(e,t){e===r.contentDom&&(o=t)}),Ur(this.contentDom,{height:"".concat(window.innerHeight,"px"),overflow:"hidden",display:"flex",width:"100vw",flexDirection:"column",position:"relative"}),this.viewDictionary[e]={id:e,pId:-1,index:o,props:{},dom:this.contentDom,tagName:"View"}}}},{key:"animationProcess",value:function(e,t,n){var r=this.context.getModuleByName("AnimationModule");if(r)if(t.animationId)r.linkInitAnimation2Element(t.animationId,n,e);else if("transform"===e){var i,o={},a="",s=qn(t);try{for(s.s();!(i=s.n()).done;)for(var u=i.value,l=0,c=Object.keys(u);l<c.length;l++){var h=c[l];u[h].animationId?r.linkInitAnimation2Element(u[h].animationId,n,h):a+="".concat(h,"(").concat(u[h]).concat(isNaN(u[h])||h.startsWith("scale")?"":"px",") ")}}catch(e){s.e(e)}finally{s.f()}a&&(o.transform=a,Ur(n.dom,o))}}}]);var n,r,i,o,a,u}(oi);function ea(e,t,n,r){if(e.engine.components[t])return new e.engine.components[t](e,n,r)}var ta=function(e){function t(){var e;return O(this,t),(e=$n(this,t,arguments)).name="websocket",e.webSocketConnections={},e.connections=0,e}return Gn(t,e),R(t,[{key:"connect",value:function(e,t){var n,r={code:-1,reason:""};if(!e)return r.reason="invalid connect param",void t.resolve(r);if(!e.url)return r.reason="no valid url for websocket",void t.resolve(r);var i=[];(null===(n=e.headers)||void 0===n?void 0:n["Sec-WebSocket-Protocol"])&&(i=null==e?void 0:e.headers["Sec-WebSocket-Protocol"].split(",")),this.connections+=1;var o=this.connections;this.webSocketConnections[o]=new na(o,e.url,i),this.webSocketConnections[o].connect(this.dispatchEvent.bind(this)),t.resolve({code:0,id:o})}},{key:"send",value:function(e){if(e&&e.id){var t=this.webSocketConnections[e.id];t&&(t.disconnected||e.data&&"string"==typeof e.data&&this.webSocketConnections[e.id].send(e.data))}}},{key:"close",value:function(e){e&&e.id&&this.webSocketConnections[e.id]&&!this.webSocketConnections[e.id].disconnected&&this.webSocketConnections[e.id].close(e.code,e.reason)}},{key:"dispatchEvent",value:function(e,t,n){this.context.sendEvent("hippyWebsocketEvents",Kn(Kn({},n),{},{id:e,type:t}))}},{key:"initialize",value:function(){}},{key:"destroy",value:function(){}}])}(oi),na=function(){return R(function e(t,n,r){O(this,e),this.id=t,this.protocols=r,this.url=n,this.handleSocketOpen=this.handleSocketOpen.bind(this),this.handleSocketMessage=this.handleSocketMessage.bind(this),this.handleSocketClose=this.handleSocketClose.bind(this),this.handleSocketError=this.handleSocketError.bind(this)},[{key:"disconnected",get:function(){return 1!==this.state}},{key:"connect",value:function(e){var t;this.connection||(this.connection=new window.__WebSocket(this.url,null!==(t=this.protocols)&&void 0!==t?t:[])),this.dispatchEvent=e,this.state=0,this.connection.addEventListener("open",this.handleSocketOpen),this.connection.addEventListener("message",this.handleSocketMessage),this.connection.addEventListener("close",this.handleSocketClose),this.connection.addEventListener("error",this.handleSocketError)}},{key:"handleSocketOpen",value:function(){this.state=1,this.dispatchEvent(this.id,"onOpen")}},{key:"handleSocketClose",value:function(){this.state=3,this.dispatchEvent(this.id,"onClose")}},{key:"handleSocketMessage",value:function(e){this.dispatchEvent(this.id,"onMessage",{data:e})}},{key:"handleSocketError",value:function(e){this.dispatchEvent(this.id,"onError",{reason:e.toString()})}},{key:"send",value:function(e){var t;null===(t=this.connection)||void 0===t||t.send(e)}},{key:"close",value:function(e,t){var n;null===(n=this.connection)||void 0===n||n.close(e,t),this.state=2,this.destroy()}},{key:"destroy",value:function(){var e,t,n,r;null===(e=this.connection)||void 0===e||e.removeEventListener("open",this.handleSocketOpen),null===(t=this.connection)||void 0===t||t.removeEventListener("message",this.handleSocketMessage),null===(n=this.connection)||void 0===n||n.removeEventListener("close",this.handleSocketClose),null===(r=this.connection)||void 0===r||r.removeEventListener("error",this.handleSocketError)}}])}(),ra={AnimationModule:Mo,ClipboardModule:Go,DeviceEventModule:Yo,ImageLoadModule:Xo,NetInfoModule:Zo,NetworkModule:Ko,StorageModule:$o,UIManagerModule:Qo,WebSocketModule:ta};function ia(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oa(e,t,n){return t=Vn(t),Wn(e,aa()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function aa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(aa=function(){return!!e})()}function sa(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ua(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ua(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function la(e,t){var n,r=(null==e?void 0:e.events)||{},i=function(e){if(!e||"string"!=typeof e)return[];var t=new Set([e]),n=e.startsWith("on")?e.slice(2):e;if(!n)return Array.from(t);var r=n.charAt(0).toLowerCase()+n.slice(1),i=n.toLowerCase(),o="on".concat(n.charAt(0).toUpperCase()).concat(n.slice(1).toLowerCase());return t.add(r),t.add(i),t.add(o),t.add(o.toLowerCase()),t.add("on".concat(r)),t.add("on".concat(i)),Array.from(t)}(t),o=sa(i);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(r[a])return{listener:r[a],matchedEventName:a}}}catch(e){o.e(e)}finally{o.f()}return{listener:null,matchedEventName:t}}ni.coreModules=ra,ni.coreComponents=No;var ca=function(e){function t(e,n,r){var i;return O(this,t),(i=oa(this,t,[e,n,r]))._originalDisplay=void 0,i}return Gn(t,e),R(t,[{key:"dispatchEvent",value:function(e,t){var n=la(this,e),r=n.listener,i=n.matchedEventName;if(r){var o={id:this.id,currentId:this.id,type:i,params:t,eventPhase:2,stopPropagation:function(){}};if("function"==typeof r.resolve)r.resolve(o);else if("function"==typeof r){var a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ia(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ia(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},o);t&&"object"==typeof t&&Object.assign(a,t),r(a)}return!0}return J(this.id,e,t||{})}},{key:"updateProperty",value:function(e,n){if("type"===e&&this.dom)if(null!=n&&""!==n){var r=String(n);this.dom.setAttribute("type",r),this.dom.setAttribute("data-template-type",r)}else this.dom.removeAttribute("type"),this.dom.removeAttribute("data-template-type");var i,o,a,s,u;this._handleCommonProperty(e,n)||(i=t,o="updateProperty",a=this,u=zn(Vn(1&(s=3)?i.prototype:i),o,a),2&s&&"function"==typeof u?function(e){return u.apply(a,e)}:u)([e,n])}},{key:"_handleCommonProperty",value:function(e,t){switch(e){case"visible":return this._setVisible(t),!0;case"visibility":return this._setVisibility(t),!0;case"autofocus":return!0===t||"true"===t||1===t||"1"===t?this.dom.setAttribute("autofocus","true"):this.dom.removeAttribute("autofocus"),!0;case"name":return this.props=this.props||{},this.props.name=t,t?this.dom.setAttribute("name",String(t)):this.dom.removeAttribute("name"),!0;case"showOnState":return null!=t?Array.isArray(t)?this.dom.setAttribute("showOnState",JSON.stringify(t)):this.dom.setAttribute("showOnState",String(t)):(this.dom.removeAttribute("showOnState"),this.dom.removeAttribute("showonstate")),!0;case"padding":case"margin":case"borderRadius":case"borderWidth":if("string"==typeof t&&t.includes(",")){var n=t.split(",").map(function(e){var t=parseFloat(e.trim());return isNaN(t)?e.trim():t+"px"});t=4===n.length?n[1]+" "+n[2]+" "+n[3]+" "+n[0]:n.join(" ")}else"number"==typeof t&&(t+="px");return null!=t&&(this.dom.style[e]=t),!0;default:return!1}}},{key:"_setVisible",value:function(e){if(!0===e)if(void 0!==this._originalDisplay)this.dom.style.display=this._originalDisplay;else{var t=this.dom.style;t.flexDirection||t.justifyContent||t.alignItems||t.flexWrap||t.flexGrow||t.flexShrink;t.display&&"none"!==t.display||(t.display="flex")}else{if(void 0===this._originalDisplay){var n=this.dom.style.display;n&&"none"!==n&&(this._originalDisplay=n)}this.dom.style.display="none"}}},{key:"_setVisibility",value:function(e){switch(e){case"visible":if(void 0!==this._originalDisplay)this.dom.style.display=this._originalDisplay;else{var t=this.dom.style;t.display&&"none"!==t.display||(t.display="flex")}this.dom.style.visibility="";break;case"invisible":this.dom.style.visibility="hidden";break;case"gone":if(void 0===this._originalDisplay){var n=this.dom.style.display;n&&"none"!==n&&(this._originalDisplay=n)}this.dom.style.display="none"}}},{key:"setVisible",value:function(e){this._setVisible(e)}},{key:"setVisibility",value:function(e){this._setVisibility(e)}}])}(Oi);function ha(e,t,n){return t=Vn(t),Wn(e,da()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function da(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(da=function(){return!!e})()}function fa(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var pa=function(e){function t(e,n,r){var i;return O(this,t),(i=ha(this,t,[e,n,r])).tagName="div",i.dom=document.createElement("div"),i._currentSid=null,i._bindDOMEvents(),i}return Gn(t,e),R(t,[{key:"onClick",get:function(){var e;return null===(e=this.props)||void 0===e?void 0:e.onClick},set:function(e){this.props=this.props||{},this.props.onClick=e}},{key:"_bindDOMEvents",value:function(){var e=this;this.dom.addEventListener("click",function(t){if(e.events&&e.events.onClick){if(e._clickHandled)return void(e._clickHandled=!1);e.dispatchEvent("onClick",{nativeEvent:t})}}),this.dom.addEventListener("focus",function(t){e.events&&e.events.onFocus&&e.dispatchEvent("onFocus",{isFocused:!0,nativeEvent:t})}),this.dom.addEventListener("blur",function(t){e.events&&e.events.onFocus&&e.dispatchEvent("onFocus",{isFocused:!1,nativeEvent:t})})}},{key:"markClickHandled",value:function(){this._clickHandled=!0}},{key:"updateProperty",value:function(e,n){if("sid"===e)return this._currentSid&&A(this._currentSid),this._currentSid=n,void(n?(S(n,this),this.dom.setAttribute("sid",String(n))):this.dom.removeAttribute("sid"));if("autoWidth"!==e&&"auto_width"!==e)if("flexStyle"!==e&&"flexstyle"!==e)if("layout"!==e)if("size"!==e)if("decoration"!==e)if("showIf"!==e&&"showif"!==e){if(["clipChildren","clipPadding"].includes(e))"clipChildren"===e&&(this.dom.style.overflow=!1===n?"visible":"hidden");else{var r=function(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()};if(["focusable","enableFocusBorder","canFocus","requestFocus","duplicateParentState","blockFocusDirections","blockfocusdirections","selected","nextFocusName","nextfocusname"].includes(e))null!=n?"showOnState"===e&&Array.isArray(n)?this.dom.setAttribute(e,JSON.stringify(n)):"nextFocusName"===e||"nextfocusname"===e?"object"==typeof n?this.dom.setAttribute("nextFocusName",JSON.stringify(n)):this.dom.setAttribute("nextFocusName",String(n)):this.dom.setAttribute(e.toLowerCase(),String(n)):this.dom.removeAttribute(e.toLowerCase());else if(["focusScale","focusBorderWidth","focusBorderColor","focusBorderRadius","focusBackgroundColor","focusColor"].includes(e))if(null!=n){var i="data-"+r(e);this.dom.setAttribute(i,String(n))}else{var o="data-"+r(e);this.dom.removeAttribute(o)}else{["focus-scale","focus-border-color","focus-border-width","focus-border-radius","focus-background-color","focus-color"].includes(e)?null!=n?this.dom.setAttribute("data-"+e,String(n)):this.dom.removeAttribute("data-"+e):("string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n),fa(t,"updateProperty",this,3)([e,n]))}}}else null!=n?this.dom.setAttribute("showIf",String(n)):(this.dom.removeAttribute("showIf"),this.dom.removeAttribute("showif"));else"string"==typeof n&&n.startsWith("${")?this.dom.setAttribute(e,n):this._applyDecoration(n);else"string"==typeof n&&n.startsWith("${")?this.dom.setAttribute(e,n):this._applySize(n);else"string"==typeof n&&n.startsWith("${")?this.dom.setAttribute(e,n):this._applyLayout(n);else"object"==typeof n&&null!==n?this._applyFlexStyle(n):"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n);else""===n||!!n?this.dom.setAttribute("autowidth",""):this.dom.removeAttribute("autowidth")}},{key:"_applyFlexStyle",value:function(e){var t=this;if(e&&"object"==typeof e){e=(0,Ke.II)(e);var n=["gap","rowGap","columnGap"],r=["flexDirection","justifyContent","alignItems","alignContent","flexWrap","flexGrow","flexShrink","flexBasis","order","alignSelf"];Object.keys(e).some(function(e){return r.includes(e)})&&!Object.keys(e).includes("display")&&(this.dom.style.display="flex"),Object.keys(e).forEach(function(r){if(!n.includes(r)){var i=e[r];if("backgroundImage"===r||"background"===r){var o=(0,Ke.yf)(r,i);o!==i&&(i=o)}if("number"==typeof i)["width","height","minWidth","minHeight","maxWidth","maxHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","top","left","right","bottom","borderRadius","borderWidth","fontSize","lineHeight","letterSpacing"].includes(r)&&(i+="px");try{"x"!==r&&"y"!==r&&(t.dom.style[r]=i)}catch(e){try{if("x"!==r&&"y"!==r){var a=r.replace(/([A-Z])/g,"-$1").toLowerCase();t.dom.style.setProperty(a,i)}}catch(e){}}}})}}},{key:"_applyLayout",value:function(e){if(e){if(Array.isArray(e)){var t=e[0],n=e[1],r=e[2],i=e[3];return null!=t&&(this.dom.style.left="number"==typeof t?"".concat(t,"px"):t),null!=n&&(this.dom.style.top="number"==typeof n?"".concat(n,"px"):n),null!=r&&(this.dom.style.width="number"==typeof r?"".concat(r,"px"):r),null!=i&&(this.dom.style.height="number"==typeof i?"".concat(i,"px"):i),void(void 0===t&&void 0===n||this.dom.style.position&&"relative"!==this.dom.style.position||(this.dom.style.position="absolute"))}if("object"==typeof e){var o=e.x,a=e.y,s=e.width,u=e.height;null!=o&&(this.dom.style.left="number"==typeof o?"".concat(o,"px"):o),null!=a&&(this.dom.style.top="number"==typeof a?"".concat(a,"px"):a),null!=s&&(this.dom.style.width="number"==typeof s?"".concat(s,"px"):s),null!=u&&(this.dom.style.height="number"==typeof u?"".concat(u,"px"):u),void 0===o&&void 0===a||this.dom.style.position&&"relative"!==this.dom.style.position||(this.dom.style.position="absolute")}}}},{key:"_applySize",value:function(e){if(e){if(Array.isArray(e)){var t=e[0],n=e[1];return null!=t&&(this.dom.style.width="number"==typeof t?"".concat(t,"px"):t),void(null!=n&&(this.dom.style.height="number"==typeof n?"".concat(n,"px"):n))}if("object"==typeof e){var r=e.width,i=e.height;null!=r&&(this.dom.style.width="number"==typeof r?"".concat(r,"px"):r),null!=i&&(this.dom.style.height="number"==typeof i?"".concat(i,"px"):i)}}}},{key:"_applyDecoration",value:function(e){if(e&&"object"==typeof e){var t=e.left,n=e.top,r=e.right,i=e.bottom;null!=t&&(this.dom.style.marginLeft="number"==typeof t?"".concat(t,"px"):t),null!=n&&(this.dom.style.marginTop="number"==typeof n?"".concat(n,"px"):n),null!=r&&(this.dom.style.marginRight="number"==typeof r?"".concat(r,"px"):r),null!=i&&(this.dom.style.marginBottom="number"==typeof i?"".concat(i,"px"):i)}}},{key:"requestFocus",value:function(e){var t=n.g.__TV_FOCUS_MANAGER__;t&&(null!=e?t.moveFocusFromElement(this.dom,e):t.focusElement(this.dom))}},{key:"requestFocusDirectly",value:function(e){var t=n.g.__TV_FOCUS_MANAGER__;t&&(null!=e?t.moveFocusFromElement(this.dom,e):t.focusElement(this.dom))}},{key:"requestChildFocus",value:function(e,t){var r=n.g.__TV_FOCUS_MANAGER__;if(r){var i=this.dom.children;if(e>=0&&e<i.length){var o=i[e];o&&(null!=t?r.moveFocusFromElement(o,t):r.focusElement(o))}}}},{key:"clearFocus",value:function(){var e=n.g.__TV_FOCUS_MANAGER__;e&&e.clearFocusFromElement(this.dom)}},{key:"setBlockFocusDirections",value:function(e){Array.isArray(e)&&this.dom.setAttribute("blockFocusDirections",JSON.stringify(e))}},{key:"setBlockFocusDirectionsOnFail",value:function(e){Array.isArray(e)&&this.dom.setAttribute("blockFocusDirectionsOnFail",JSON.stringify(e))}},{key:"changeAlpha",value:function(e){var t=Math.max(0,Math.min(1,Number(e)||1));this.dom.style.opacity=t}},{key:"setScale",value:function(e){var t=Number(e)||1;this.dom.style.transform=this.dom.style.transform?this.dom.style.transform.replace(/scale\([^)]*\)/,"scale(".concat(t,")")):"scale(".concat(t,")")}},{key:"setPosition",value:function(e,t){var n=Number(e)||0,r=Number(t)||0;this.dom.style.left="".concat(n,"px"),this.dom.style.top="".concat(r,"px")}},{key:"updateLayout",value:function(e){e&&"object"==typeof e&&(void 0!==e.width&&(this.dom.style.width="number"==typeof e.width?"".concat(e.width,"px"):e.width),void 0!==e.height&&(this.dom.style.height="number"==typeof e.height?"".concat(e.height,"px"):e.height),void 0!==e.x&&(this.dom.style.left="number"==typeof e.x?"".concat(e.x,"px"):e.x),void 0!==e.y&&(this.dom.style.top="number"==typeof e.y?"".concat(e.y,"px"):e.y))}},{key:"setBackGroundColor",value:function(e){var t=e;if("number"==typeof e){var n=(e>>24&255)/255,r=e>>8&255,i=255&e;t="rgba(".concat(e>>16&255,", ").concat(r,", ").concat(i,", ").concat(n,")")}this.dom.style.backgroundColor=t}},{key:"setBackgroundImage",value:function(e){if(e){var t=(0,Ke.pb)(e);this.dom.style.backgroundImage="url(".concat(t,")")}else this.dom.style.backgroundImage=""}},{key:"setSize",value:function(e,t){void 0!==e&&(this.dom.style.width="number"==typeof e?"".concat(e,"px"):e),void 0!==t&&(this.dom.style.height="number"==typeof t?"".concat(t,"px"):t)}},{key:"setTranslation",value:function(e,t){var n=Number(e)||0,r=Number(t)||0;this.dom.style.transform=this.dom.style.transform?this.dom.style.transform.replace(/translate\([^)]*\)/,"translate(".concat(n,"px, ").concat(r,"px)")):"translate(".concat(n,"px, ").concat(r,"px)")}},{key:"setInitFocus",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=n.g.__TV_FOCUS_MANAGER__;if(i){var o=function(){i.updateFocusableElements(),i.focusElement(t.dom)};r>0?setTimeout(o,r):requestAnimationFrame(o)}}},{key:"setAutoFocus",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.setInitFocus(e,t)}},{key:"mounted",value:function(){var e,r=this;null===(e=fa(t,"mounted",this,3))||void 0===e||e([]);var i=this.dom.getAttribute("requestFocus");"true"!==i&&"1"!==i&&""!==i||requestAnimationFrame(function(){var e=n.g.__TV_FOCUS_MANAGER__;e&&(e.updateFocusableElements(),e.focusElement(r.dom))})}},{key:"beforeUnmount",value:function(){this._currentSid&&(A(this._currentSid),this._currentSid=null)}},{key:"destroy",value:function(){var e;null===(e=this.beforeUnmount)||void 0===e||e.call(this)}}])}(ca);function va(e,t){var n;return n=function(e){function n(e,r,i){var o;return O(this,n),(o=ha(this,n,[e,r,i])).dom&&(o.dom.setAttribute("data-component-name",t),o._originalComponentName=t),o}return Gn(n,e),R(n)}(e),(0,p.A)(n,"componentName",t),n}function ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ma(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ya(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ya(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ga(e,t,n){return t=Vn(t),Wn(e,_a()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function _a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_a=function(){return!!e})()}function ba(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var wa=function(e){function t(e,n,r){var i;return O(this,t),(i=ga(this,t,[e,n,r])).dom.setAttribute("data-component-name","ESPageRootView"),i._originalComponentName="ESPageRootView",i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return ma(ma({},ba(t,"defaultStyle",this,1)?ba(t,"defaultStyle",this,3)([]):{}),{},{backgroundColor:"#000000"})}}])}(pa);function ka(e,t,n){return t=Vn(t),Wn(e,Ea()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Ea(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ea=function(){return!!e})()}(0,p.A)(wa,"componentName","ESPageRootView"),window.__HIPPY_COMPONENT_REGISTRY__=window.__HIPPY_COMPONENT_REGISTRY__||new Map;var Sa=function(e){function t(e,n,r){var i;return O(this,t),(i=ka(this,t,[e,n,r])).tagName="Text",i.dom=document.createElement("span"),i._textValue="",i._gravity=null,i._innerSpan=document.createElement("span"),i._innerSpan.className="qt-text-inner",i._innerSpan.style.cssText="\n font-size: inherit;\n line-height: inherit;\n letter-spacing: inherit;\n color: inherit;\n ",i.dom.appendChild(i._innerSpan),window.__HIPPY_COMPONENT_REGISTRY__.set(i.dom,i),i.dom.style.color="black",i._autoWidthObserver=null,i._autoWidthSyncRaf=0,i._autoWidthRetryCount=0,i._textAlignObserver=new MutationObserver(function(e){i.dom&&e.forEach(function(e){"attributes"===e.type&&"style"===e.attributeName&&i.dom&&i.dom.style&&i.dom.style.textAlign&&(i.dom.style.textAlign="")})}),i._textAlignObserver.observe(i.dom,{attributes:!0,attributeFilter:["style"]}),i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{boxSizing:"border-box",zIndex:0,display:"inline-block",color:"black"}}},{key:"updateProperty",value:function(e,n){if("textAlign"!==e&&"text-align"!==e)if("autoWidth"!==e&&"auto_width"!==e)if("autoHeight"!==e&&"auto_height"!==e)if("fontSize"!==e)if("textSize"!==e&&"textsize"!==e)if("flexStyle"!==e&&"flexstyle"!==e)if("ellipsizeMode"!==e)if("lines"!==e)if("gravity"!==e)if("typeface"!==e)if("textAlignVertical"!==e&&"text-align-vertical"!==e){var r,i,o,a,s;if(["duplicateParentState","focusable","showOnState","select"].includes(e))null!=n?"showOnState"===e&&Array.isArray(n)?this.dom.setAttribute(e,JSON.stringify(n)):this.dom.setAttribute(e,String(n)):this.dom.removeAttribute(e);else if("textColor"!==e&&"text-color"!==e)if(["textColor","focusColor","selectColor"].includes(e))if(null!=n){var u="data-"+e.replace(/([A-Z])/g,"-$1").toLowerCase();this.dom.setAttribute(u,String(n))}else{var l="data-"+e.replace(/([A-Z])/g,"-$1").toLowerCase();this.dom.removeAttribute(l)}else if(["text-color","focus-color","select-color"].includes(e))null!=n?this.dom.setAttribute("data-"+e,String(n)):this.dom.removeAttribute("data-"+e);else"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n),(r=t,i="updateProperty",o=this,s=zn(Vn(1&(a=3)?r.prototype:r),i,o),2&a&&"function"==typeof s?function(e){return s.apply(o,e)}:s)([e,n]);else this.setTextColor(n)}else this.setTextAlignVertical(n);else this.setTypeface(n);else this.setGravity(n);else this.setLines(n);else this.setEllipsizeMode(n);else"object"==typeof n&&null!==n?this._applyFlexStyle(n):"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n);else this.setTextSize(n);else this.setTextSize(n);else this.setAutoHeight(n);else this.setAutoWidth(n)}},{key:"text",get:function(){return this._textValue},set:function(e){this._textValue=e,this._updateTextNode(e)}},{key:"_updateTextNode",value:function(e){this._innerSpan&&(this._isSupportedRichText(e)?this._renderRichText(e):this._innerSpan.textContent=e||""),this._autoWidth&&this._scheduleAutoWidthSync(!0)}},{key:"_isSupportedRichText",value:function(e){return"string"==typeof e&&/<\/?(font|br)\b/i.test(e)}},{key:"_renderRichText",value:function(e){var t=this;if(this._innerSpan)try{var n=document.createElement("template");n.innerHTML=e||"";var r=document.createDocumentFragment();Array.from(n.content.childNodes).forEach(function(e){t._appendRichTextNode(e,r)}),this._innerSpan.replaceChildren(r)}catch(t){this._innerSpan.textContent=e||""}}},{key:"_appendRichTextNode",value:function(e,t){var n=this;if(e&&t)if(e.nodeType!==Node.TEXT_NODE){if(e.nodeType===Node.ELEMENT_NODE){var r=e.tagName.toLowerCase();if("br"!==r){var i=document.createElement("span");if("font"===r){var o=e.getAttribute("color");o&&(i.style.color=o)}Array.from(e.childNodes).forEach(function(e){n._appendRichTextNode(e,i)}),t.appendChild(i)}else t.appendChild(document.createElement("br"))}}else t.appendChild(document.createTextNode(e.textContent||""))}},{key:"setText",value:function(e){this.text=e}},{key:"setAutoWidth",value:function(e){this._autoWidth=""===e||!!e,this._autoWidth?(this._ensureAutoWidthObserver(),this.dom.setAttribute("autowidth",""),this.dom.style.width="auto",this.dom.style.minWidth="0",this.dom.style.display="inline-block",this._innerSpan&&(this._innerSpan.style.whiteSpace="nowrap"),this._scheduleAutoWidthSync(!0)):(this._teardownAutoWidthObserver(),this.dom.removeAttribute("autowidth"),this._autoWidthSyncRaf&&(cancelAnimationFrame(this._autoWidthSyncRaf),this._autoWidthSyncRaf=0),this.dom.style.width="",this.dom.style.display="")}},{key:"_ensureAutoWidthObserver",value:function(){var e=this;this._innerSpan&&(this._autoWidthObserver||(this._autoWidthObserver=new MutationObserver(function(){e._autoWidth&&e._scheduleAutoWidthSync(!0)}),this._autoWidthObserver.observe(this._innerSpan,{characterData:!0,childList:!0,subtree:!0})))}},{key:"_teardownAutoWidthObserver",value:function(){this._autoWidthObserver&&(this._autoWidthObserver.disconnect(),this._autoWidthObserver=null)}},{key:"_scheduleAutoWidthSync",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._autoWidth&&(t&&(this._autoWidthRetryCount=0),this._autoWidthSyncRaf&&cancelAnimationFrame(this._autoWidthSyncRaf),this._autoWidthSyncRaf=requestAnimationFrame(function(){e._autoWidthSyncRaf=0,e._syncWidthToParent()}))}},{key:"_syncWidthToParent",value:function(){var e=this;if(this._autoWidth){var t=this._innerSpan;if(t){var n=t.scrollWidth||t.offsetWidth;if(n<=0)this.dom&&this.dom.isConnected&&this._autoWidthRetryCount<5&&(this._autoWidthRetryCount++,this._scheduleAutoWidthSync(!1));else{this._autoWidthRetryCount=0,this.dom.style.width=n+"px",this.dom.style.minWidth=n+"px";for(var r=this.dom.parentElement;r;){if(r.hasAttribute&&(r.hasAttribute("autoWidth")||r.hasAttribute("autowidth"))){var i=window.getComputedStyle(r),o=n+(parseInt(i.paddingLeft)||0)+(parseInt(i.paddingRight)||0);r.style.width=o+"px",r.style.minWidth=o+"px",r.querySelectorAll("[autoWidth], [autowidth]").forEach(function(t){t!==e.dom&&(t.tagName&&"qt-text"===t.tagName.toLowerCase()||"absolute"===window.getComputedStyle(t).position&&(t.style.left="0",t.style.right="0",t.style.width="auto"))});break}r=r.parentElement}}}}}},{key:"setAutoHeight",value:function(e){this._autoHeight=""===e||!!e,this._autoHeight?(this.dom.style.height="auto",this.dom.style.minHeight="0"):this.dom.style.height=""}},{key:"setTextSize",value:function(e){var t=this._innerSpan||this.dom;if(t&&e){if("string"==typeof e&&e.startsWith("${")&&e.endsWith("}"))return void this.dom.setAttribute("fontSize",e);t.style.fontSize="number"==typeof e?e+"px":e,this._autoWidth&&this._scheduleAutoWidthSync(!0)}}},{key:"setFontSize",value:function(e){var t=this._innerSpan||this.dom;if(t&&e){if("string"==typeof e&&e.startsWith("${")&&e.endsWith("}"))return void this.dom.setAttribute("fontSize",e);t.style.fontSize="number"==typeof e?e+"px":e,this._autoWidth&&this._scheduleAutoWidthSync(!0)}}},{key:"setTextColor",value:function(e){var t=this._innerSpan||this.dom;if(t&&e)if("number"==typeof e){var n=e>>24&255,r=e>>16&255,i=e>>8&255,o=255&e;t.style.color="rgba(".concat(r,", ").concat(i,", ").concat(o,", ").concat(n/255,")")}else t.style.color=e}},{key:"setTypeface",value:function(e){var t=this._innerSpan||this.dom;if(t)if("string"==typeof e&&e.startsWith("${")&&e.endsWith("}"))this.dom.setAttribute("typeface",e);else switch(e){case"bold":t.style.fontWeight="bold";break;case"italic":t.style.fontStyle="italic";break;case"normal":t.style.fontWeight="normal",t.style.fontStyle="normal"}}},{key:"setGravity",value:function(e){if(this.dom&&e){this._gravity=e;var t=String(e).split("|").map(function(e){return e.trim()});this.dom.style.display="flex",this.dom.style.alignItems="stretch",this.dom.style.justifyContent="flex-start",this._innerSpan&&(this._innerSpan.style.display="inline",this._innerSpan.style.whiteSpace=""),t.includes("centerVertical")||t.includes("center")?this.dom.style.alignItems="center":t.includes("top")?this.dom.style.alignItems="flex-start":t.includes("bottom")&&(this.dom.style.alignItems="flex-end"),t.includes("centerHorizontal")||t.includes("center")?this.dom.style.justifyContent="center":t.includes("left")?this.dom.style.justifyContent="flex-start":t.includes("right")&&(this.dom.style.justifyContent="flex-end")}}},{key:"setTextAlignVertical",value:function(e){if(this.dom&&e)switch(this.dom.style.display="flex",this._textAlignVertical=e,String(e).toLowerCase()){case"center":default:this.dom.style.alignItems="center";break;case"top":this.dom.style.alignItems="flex-start";break;case"bottom":this.dom.style.alignItems="flex-end"}}},{key:"setEllipsizeMode",value:function(e){if(this.dom&&(this._ellipsizeMode=e,!(this._lines&&this._lines>1))){var t=this._innerSpan||this.dom;switch(t.style.overflow="hidden",t.style.whiteSpace="nowrap",t.style.webkitLineClamp="",t.style.display="inline-block",t.style.maxWidth="100%",this._gravity||this._textAlignVertical?(this.dom.style.display="flex",this.dom.style.overflow="hidden",this._textAlignVertical&&this.setTextAlignVertical(this._textAlignVertical)):(this.dom.style.display="inline-block",this.dom.style.overflow="hidden"),e){case 0:t.style.textOverflow="ellipsis",t.style.direction="rtl",t.style.textAlign="left";break;case 1:case 2:default:t.style.textOverflow="ellipsis",t.style.direction="ltr";break;case 3:this._enableMarquee()}}}},{key:"_enableMarquee",value:function(){var e=this;if(this.dom){var t=this._innerSpan||this.dom;t.style.textOverflow="clip",t.style.whiteSpace="nowrap",t.style.direction="ltr",t.style.overflow="visible",this.dom.style.display="flex",this.dom.style.overflow="hidden",this.dom.style.justifyContent="flex-start",this._textAlignVertical&&this.setTextAlignVertical(this._textAlignVertical);if(!document.querySelector("#qttext-marquee-style")){var n=document.createElement("style");n.id="qttext-marquee-style",n.textContent="\n @keyframes qttext-marquee {\n 0% { transform: translateX(0); }\n 100% { transform: translateX(-100%); }\n }\n ",document.head.appendChild(n)}t.style.display="inline-block",t.style.whiteSpace="nowrap",t.style.width="max-content",requestAnimationFrame(function(){var n=t.scrollWidth-e.dom.offsetWidth;if(n>0){var r=Math.max(n/50,3);t.style.animation="qttext-marquee ".concat(r,"s linear infinite")}else t.style.animation=""})}}},{key:"_wrapTextForMarquee",value:function(){}},{key:"setLines",value:function(e){if(this.dom){this._lines=e;var t=this._innerSpan||this.dom;e&&e>1?(t.style.display="-webkit-box",t.style.webkitLineClamp=String(e),t.style.webkitBoxOrient="vertical",t.style.overflow="hidden",t.style.whiteSpace="normal",t.style.textOverflow="ellipsis",t.style.maxWidth="100%",(this._gravity||this._textAlignVertical)&&(this.dom.style.display="flex",this._textAlignVertical&&this.setTextAlignVertical(this._textAlignVertical))):1===e&&(t.style.display="inline-block",t.style.whiteSpace="nowrap",t.style.overflow="hidden",t.style.webkitLineClamp="",(this._gravity||this._textAlignVertical)&&(this.dom.style.display="flex",this.dom.style.overflow="hidden",this._textAlignVertical&&this.setTextAlignVertical(this._textAlignVertical)),void 0!==this._ellipsizeMode&&this.setEllipsizeMode(this._ellipsizeMode))}}},{key:"_applyFlexStyle",value:function(e){var t=this;if(e&&"object"==typeof e){e=(0,Ke.II)(e);var n=this._innerSpan||this.dom;Object.keys(e).forEach(function(r){var i=e[r];"number"==typeof i&&(["width","height","minWidth","minHeight","maxWidth","maxHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","top","left","right","bottom","borderRadius","borderWidth","fontSize","lineHeight","letterSpacing"].includes(r)&&(i+="px"));if("fontSize"!==r)if("textColor"!==r&&"color"!==r)try{t.dom.style[r]=i}catch(e){try{var o=r.replace(/([A-Z])/g,"-$1").toLowerCase();t.dom.style.setProperty(o,i)}catch(e){}}else t.setTextColor(i);else n.style.fontSize=i})}}},{key:"destroy",value:function(){this._textAlignObserver&&(this._textAlignObserver.disconnect(),this._textAlignObserver=null),this._teardownAutoWidthObserver(),this.dom=null}}])}(ca);function Aa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xa(e,t,n){return t=Vn(t),Wn(e,Ca()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Ca(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ca=function(){return!!e})()}function Ta(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Ia=function(e){function t(e,n,r){var i;return O(this,t),(i=xa(this,t,[e,n,r])).tagName="img",i.dom=document.createElement("img"),i._resizeMode="fill",i._currentSrc="",i.dom.style.objectFit="fill",i.dom.style.display="block",i.dom.style.pointerEvents="none",i._layoutObserver=null,i._boundLoadHandler=null,i._boundErrorHandler=null,i._bindImageEvents(),E(n,i),i}return Gn(t,e),R(t,[{key:"_bindImageEvents",value:function(){var e=this;this._boundLoadHandler=function(t){e._emitLayout(),e._emitLoadEnd(!0,t)},this._boundErrorHandler=function(t){e._emitLoadEnd(!1,t)},this.dom.addEventListener("load",this._boundLoadHandler),this.dom.addEventListener("error",this._boundErrorHandler)}},{key:"src",get:function(){return this.dom.src},set:function(e){this._setSrc(e)}},{key:"source",set:function(e){this._setSrc(e)}},{key:"resizeMode",set:function(e){this._setResizeMode(e)}},{key:"updateProperty",value:function(e,n){switch(e){case"src":case"source":this._setSrc(n);break;case"resizeMode":this._setResizeMode(n);break;case"tintColor":this.dom.style.filter="drop-shadow(0 0 0 ".concat(n,")");break;case"style":if(n&&"object"==typeof n&&n.resizeMode){this._setResizeMode(n.resizeMode);var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Aa(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},n);delete r.resizeMode,Object.keys(r).length>0&&Ta(t,"updateProperty",this,3)([e,r])}else Ta(t,"updateProperty",this,3)([e,n]);break;default:"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n),Ta(t,"updateProperty",this,3)([e,n])}}},{key:"_setSrc",value:function(e){if(!e)return this.dom.src="",void(this.dom.style.backgroundImage="");var t="";if("string"==typeof e)if(e.startsWith("file://")){var n=e.slice(7);(n=n.replace(/^\/+/,"")).startsWith("./")&&(n=n.slice(2)),t="./"+n}else t=e.startsWith("assets/")?"./"+e:(e.startsWith("data:")||e.startsWith("http")||e.startsWith("/")||e.startsWith("."),e);else if("object"==typeof e&&e.uri)if((t=e.uri).startsWith("file://")){var r=t.slice(7);(r=r.replace(/^\/+/,"")).startsWith("./")&&(r=r.slice(2)),t="./"+r}else t.startsWith("assets/")&&(t="./"+t);t=(0,Ke.pb)(t),this._currentSrc=t,"repeat"===this._resizeMode?(this.dom.style.backgroundImage="url(".concat(t,")"),this.dom.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"):(this.dom.src=t,this.dom.style.backgroundImage=""),this._scheduleLayoutEmit()}},{key:"_setResizeMode",value:function(e){switch(this._resizeMode=e,this.dom.style.objectFit="",this.dom.style.objectPosition="",this.dom.style.backgroundSize="",this.dom.style.backgroundPosition="",this.dom.style.backgroundRepeat="",e){case"contain":this.dom.style.objectFit="contain";break;case"cover":default:this.dom.style.objectFit="cover";break;case"center":this.dom.style.objectFit="contain",this.dom.style.objectPosition="center center";break;case"origin":this.dom.style.objectFit="none",this.dom.style.objectPosition="left top";break;case"fitxy":case"stretch":this.dom.style.objectFit="fill";break;case"repeat":this._currentSrc&&(this.dom.style.backgroundImage="url(".concat(this._currentSrc,")"),this.dom.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"),this.dom.style.objectFit="none",this.dom.style.backgroundSize="auto",this.dom.style.backgroundPosition="left top",this.dom.style.backgroundRepeat="repeat"}}},{key:"_scheduleLayoutEmit",value:function(){var e=this;requestAnimationFrame(function(){return e._emitLayout()})}},{key:"_emitLayout",value:function(){if(this.dom){var e=this.dom.getBoundingClientRect(),t=Math.round(e.width||this.dom.offsetWidth||0),n=Math.round(e.height||this.dom.offsetHeight||0);if(!(t<=0&&n<=0)){var r={x:Math.round(e.left||0),y:Math.round(e.top||0),width:t,height:n};J(this.id,"onLayout",{layout:r})||this._dispatchCompatibleEvent(["layout","onLayout"],r)}}}},{key:"_emitLoadEnd",value:function(e,t){if(this.dom){var n={success:e,nativeEvent:t,width:this.dom.naturalWidth||this.dom.offsetWidth||0,height:this.dom.naturalHeight||this.dom.offsetHeight||0};J(this.id,"onLoadEnd",n)||this._dispatchCompatibleEvent(["loadEnd","loadend","onLoadEnd"],n)}}},{key:"_dispatchCompatibleEvent",value:function(e,t){var n=this;this.events&&e.forEach(function(e){n.events[e]&&n.dispatchEvent(e,t)})}},{key:"mounted",value:function(){var e,n=this;null===(e=Ta(t,"mounted",this,3))||void 0===e||e([]),this._scheduleLayoutEmit(),"undefined"!=typeof ResizeObserver&&(this._layoutObserver=new ResizeObserver(function(){n._emitLayout()}),this._layoutObserver.observe(this.dom))}},{key:"destroy",value:function(){var e;this._layoutObserver&&(this._layoutObserver.disconnect(),this._layoutObserver=null),this.dom&&this._boundLoadHandler&&(this.dom.removeEventListener("load",this._boundLoadHandler),this._boundLoadHandler=null),this.dom&&this._boundErrorHandler&&(this.dom.removeEventListener("error",this._boundErrorHandler),this._boundErrorHandler=null),null===(e=Ta(t,"destroy",this,3))||void 0===e||e([])}}])}(ca);function Oa(e,t,n){return t=Vn(t),Wn(e,La()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function La(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(La=function(){return!!e})()}window.__HIPPY_COMPONENT_REGISTRY__=window.__HIPPY_COMPONENT_REGISTRY__||new Map;var Pa=function(e){function t(e,n,r){var i;return O(this,t),(i=Oa(this,t,[e,n,r])).tagName="FastFlexView",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","QtFlexView"),i._listData=[],i._templateChildren=[],i._itemContainer=document.createElement("div"),i._itemContainer.className="flex-view-item-container",i._itemContainer.style.cssText="display: flex; flex-direction: row; flex-wrap: wrap; align-content: flex-start;",i.dom.style.cssText="\n display: flex;\n flex-direction: column;\n position: relative;\n box-sizing: border-box;\n ",E(n,i),window.__HIPPY_COMPONENT_REGISTRY__.set(i.dom,i),i._observer=new MutationObserver(function(e){e.forEach(function(e){"childList"===e.type&&e.addedNodes.forEach(function(e){e.nodeType===Node.ELEMENT_NODE&&i._processTemplateNode(e)})})}),i._observer.observe(i.dom,{childList:!0,subtree:!1}),i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{display:"flex",flexDirection:"column",position:"relative",boxSizing:"border-box"}}},{key:"updateProperty",value:function(e,n){var r,i,o,a,s,u=this;switch(e){case"list":if(this._pendingListValue=n,Array.isArray(n))this.dom.removeAttribute("list");else if("string"==typeof n){var l=e;this.dom.setAttribute(l,n)}Array.isArray(n)?this.setListData(n):requestAnimationFrame(function(){u.dom._qtListData&&Array.isArray(u.dom._qtListData)&&u.setListData(u.dom._qtListData)});break;case"flexStyle":"object"==typeof n&&null!==n?this._applyFlexStyle(n):"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n);break;case"layout":"string"==typeof n&&n.startsWith("${")?this.dom.setAttribute(e,n):this._updateLayout(n);break;case"clipChildren":!1===n&&(this.dom.style.overflow="visible");break;case"clipPadding":break;default:"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n),(r=t,i="updateProperty",o=this,s=zn(Vn(1&(a=3)?r.prototype:r),i,o),2&a&&"function"==typeof s?function(e){return s.apply(o,e)}:s)([e,n])}}},{key:"_processTemplateNode",value:function(e){var t=this,n=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!t._templateChildren.some(function(t){return t.dom===e})){var i=Ra(e),o={dom:e,tagName:e.tagName,component:n,id:r,type:i};t._templateChildren.push(o),e.setAttribute("data-template","true"),null!==o.type&&e.setAttribute("data-template-type",String(o.type)),e.style.display="none"}};if(null===Ra(e)&&e.querySelectorAll){var r=Array.from(e.querySelectorAll("[type], [data-template-type]"));if(r.length>0)return e.style.display="none",void r.forEach(function(e){return n(e)})}n(e)}},{key:"insertChild",value:function(e,t){var n=this;if(e&&e.dom){var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!n._templateChildren.some(function(t){return t.dom===e})){var i=Ra(e),o={dom:e,tagName:e.tagName,id:r,component:t,type:i};n._templateChildren.push(o),e.setAttribute("data-template","true"),null!=i&&e.setAttribute("data-template-type",String(i)),e.style.display="none"}};if(null===Ra(e.dom)&&e.dom.querySelectorAll){var i=Array.from(e.dom.querySelectorAll("[type], [data-template-type]"));i.length>0?(e.dom.style.display="none",i.forEach(function(e){return r(e)})):r(e.dom,e,e.id)}else r(e.dom,e,e.id);this.dom.contains(e.dom)||(this._itemContainer&&this.dom.contains(this._itemContainer)?this.dom.insertBefore(e.dom,this._itemContainer):this.dom.appendChild(e.dom))}}},{key:"setListData",value:function(e){var t=this;if(Array.isArray(e)&&1===e.length&&Array.isArray(e[0])&&(e=e[0]),Array.isArray(e)){this._listData=e,this._renderTimeout&&clearTimeout(this._renderTimeout);var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;t._templateChildren.length>0||e>=10?t._renderItems():t._renderTimeout=setTimeout(function(){return n(e+1)},50)};this._renderTimeout=setTimeout(function(){return n()},0)}}},{key:"_renderItems",value:function(){var e=this;this.dom.contains(this._itemContainer)||this.dom.appendChild(this._itemContainer),this._itemContainer.innerHTML="",0!==this._listData.length&&(this._templateChildren.forEach(function(e){e.dom&&(e.dom.style.display="none")}),0!==this._templateChildren.length?this._listData.forEach(function(t,n){var r=e._createItemFromData(t,n);r&&e._itemContainer.appendChild(r)}):this._listData.forEach(function(t,n){var r=document.createElement("div");r.setAttribute("data-index",n),r.style.cssText="width: 200px; height: 200px; margin: 10px; background: #444; display: flex; align-items: center; justify-content: center; border-radius: 8px;";var i=document.createElement("span");i.style.cssText="color: white; font-size: 14px;",i.textContent=t.text||t.title||t.name||"Item ".concat(n),r.appendChild(i),e._itemContainer.appendChild(r)}))}},{key:"_createItemFromData",value:function(e,t){var n=this,r=document.createElement("div");if(r.setAttribute("data-index",t),r.setAttribute("data-position",t),e&&e.decoration&&"object"==typeof e.decoration){var i=e.decoration;void 0!==i.top&&(r.style.marginTop=i.top+"px"),void 0!==i.left&&(r.style.marginLeft=i.left+"px"),void 0!==i.right&&(r.style.marginRight=i.right+"px"),void 0!==i.bottom&&(r.style.marginBottom=i.bottom+"px")}var o=void 0!==e.type?e.type:null,a=this._templateChildren.find(function(e){return e.type===o}),s=window.__QT_SHARED_TEMPLATES__,u=s&&null!=o?s.get(o):null;if(!a&&u&&u.dom&&(a=u),a||(a=this._templateChildren.find(function(e){return null===e.type})),!a&&s&&s.size>0){var l=s.values().next().value;l&&l.dom&&(a=l)}if(!a&&this._templateChildren.length>0&&(a=this._templateChildren[0]),a&&a.dom){var c=a.dom.cloneNode(!0);c.removeAttribute("data-template"),c.removeAttribute("id"),c.style.display="",c.style.position="relative",Na(c),a.component&&a.component.props&&this._bindComponentPropsToNode(c,a.component.props,e),this._bindDataToNode(c,e),Da(c),"absolute"===c.style.position&&(c.style.width&&(r.style.width=c.style.width),c.style.height&&(r.style.height=c.style.height)),r.appendChild(c)}return r._itemData=e,r._itemPosition=t,r.addEventListener("click",function(){n._dispatchItemClick(t,e)}),r}},{key:"_bindComponentPropsToNode",value:function(e,t,n){var r=this;t&&n&&Object.keys(t).forEach(function(i){var o=t[i];if("string"==typeof o&&o.startsWith("${")&&o.endsWith("}")){var a=(0,It.Hd)(o,n),s=i.toLowerCase();if("flexstyle"!==s&&"flexstyletemplate"!==s||!a||"object"!=typeof a||r._applyFlexStyleToElement(e,a),"textsize"===s&&void 0!==a){var u="number"==typeof a?a+"px":a;e.style.fontSize=u}"src"===s&&(a&&"object"==typeof a&&(void 0!==a.url?a=a.url:void 0!==a.uri?a=a.uri:void 0!==a.src&&(a=a.src)),"IMG"===e.tagName&&"string"==typeof a&&(e.src=a))}})}},{key:"_bindDataToNode",value:function(e,t){(0,It.bindTemplateDataToNode)(e,t)}},{key:"_applyFlexStyleToElement",value:function(e,t){if(t&&"object"==typeof t){t=(0,Ke.II)(t);var n=["gap","rowGap","columnGap"];Object.keys(t).forEach(function(r){if(!n.includes(r)){var i=t[r];if("number"==typeof i)["width","height","minWidth","minHeight","maxWidth","maxHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","top","left","right","bottom","borderRadius","borderWidth","fontSize","lineHeight","letterSpacing"].includes(r)&&(i+="px");try{e.style[r]=i}catch(t){try{var o=r.replace(/([A-Z])/g,"-$1").toLowerCase();e.style.setProperty(o,i)}catch(e){}}}})}}},{key:"_dispatchItemClick",value:function(e,t){this.dispatchEvent("onItemClick",{position:e,index:e,item:t})}},{key:"_updateLayout",value:function(e){if(Array.isArray(e)){var t=e[0],n=e[1],r=e[2],i=e[3];null!=t&&(this.dom.style.left="number"==typeof t?"".concat(t,"px"):t),null!=n&&(this.dom.style.top="number"==typeof n?"".concat(n,"px"):n),null!=r&&r>0&&(this.dom.style.width="number"==typeof r?"".concat(r,"px"):r),null!=i&&i>0&&(this.dom.style.height="number"==typeof i?"".concat(i,"px"):i),void 0===t&&void 0===n||this.dom.style.position&&"relative"!==this.dom.style.position||(this.dom.style.position="absolute")}else if("object"==typeof e&&null!==e){var o=e.x,a=e.y,s=e.width,u=e.height;null!=o&&(this.dom.style.left="number"==typeof o?"".concat(o,"px"):o),null!=a&&(this.dom.style.top="number"==typeof a?"".concat(a,"px"):a),null!=s&&s>0&&(this.dom.style.width="number"==typeof s?"".concat(s,"px"):s),null!=u&&u>0&&(this.dom.style.height="number"==typeof u?"".concat(u,"px"):u),void 0===o&&void 0===a||this.dom.style.position&&"relative"!==this.dom.style.position||(this.dom.style.position="absolute")}"H"===e||"H"===(null==e?void 0:e.direction)?this._itemContainer.style.flexDirection="row":Array.isArray(e)?(this._itemContainer.style.flexDirection="column",this._itemContainer.style.flexWrap="wrap"):(this._itemContainer.style.flexDirection="column",this._itemContainer.style.flexWrap="nowrap")}},{key:"_applyFlexStyle",value:function(e){var t=this;if(e&&"object"==typeof e){e=(0,Ke.II)(e);var n=["gap","rowGap","columnGap"];Object.keys(e).forEach(function(r){if(!n.includes(r)){var i=e[r];if("number"==typeof i)["width","height","minWidth","minHeight","maxWidth","maxHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","top","left","right","bottom","borderRadius","borderWidth","fontSize","lineHeight","letterSpacing"].includes(r)&&(i+="px");try{"x"!==r&&"y"!==r&&(t.dom.style[r]=i)}catch(e){try{if("x"!==r&&"y"!==r){var o=r.replace(/([A-Z])/g,"-$1").toLowerCase();t.dom.style.setProperty(o,i)}}catch(e){}}}})}}},{key:"addListData",value:function(e){var t=this;if(Array.isArray(e)){var n=this._listData.length;this._listData=this._listData.concat(e),e.forEach(function(e,r){var i=n+r,o=t._createItemFromData(e,i);o&&t._itemContainer.appendChild(o)})}}},{key:"clearData",value:function(){this._listData=[],this._itemContainer.innerHTML=""}}])}(ca);function Ra(e){var t,n=null!==(t=e.getAttribute("data-template-type"))&&void 0!==t?t:e.getAttribute("type");return null==n?null:isNaN(Number(n))?n:Number(n)}function Na(e){e&&e.nodeType===Node.ELEMENT_NODE&&("DIV"!==e.tagName||e.style.display||(e.style.display="flex"),e.style.boxSizing||(e.style.boxSizing="border-box"))}function Da(e){if(e&&e.nodeType===Node.ELEMENT_NODE&&!e.style.width&&!e.style.height){for(var t=0,n=0,r=0;r<e.children.length;r++){var i=e.children[r];if("absolute"===(i.style.position||(i.getAttribute("style")||"").includes("absolute")?"absolute":"")){var o=parseFloat(i.style.width)||0,a=parseFloat(i.style.height)||0;o>t&&(t=o),a>n&&(n=a)}}t>0&&(e.style.width=t+"px"),n>0&&(e.style.height=n+"px")}}function Ma(e,t){if(e&&(Array.isArray(t)&&1===t.length&&Array.isArray(t[0])&&(t=t[0]),Array.isArray(t))){for(var n=null,r=0,i=Array.from(e.children||[]);r<i.length;r++){var o=i[r];if(o.classList&&o.classList.contains("flex-view-item-container")){n=o;break}}n||((n=document.createElement("div")).className="flex-view-item-container",n.style.cssText="display: flex; flex-direction: row; flex-wrap: wrap; align-content: flex-start;",e.appendChild(n));var a=Array.from(e.children||[]).filter(function(e){return e!==n}),s=[];if(a.forEach(function(e){var t=Ra(e);if(null!==t)return e.setAttribute("data-template","true"),e.style.display="none",e.setAttribute("data-template-type",String(t)),void s.push({dom:e,type:t});var n=e.querySelectorAll?Array.from(e.querySelectorAll("[type], [data-template-type]")):[];if(n.length>0)return e.style.display="none",void n.forEach(function(e){var t=Ra(e);e.setAttribute("data-template","true"),e.style.display="none",null!==t&&e.setAttribute("data-template-type",String(t)),s.push({dom:e,type:t})});e.setAttribute("data-template","true"),e.style.display="none",s.push({dom:e,type:null})}),n.innerHTML="",0!==t.length){if(0===s.length){var u=window.__QT_SHARED_TEMPLATES__;if(u&&u.size>0){var l=Array.from(u.values()).filter(function(e){return e&&e.dom});l.length>0&&l.forEach(function(e){e.dom.setAttribute("data-template","true"),e.dom.style.display="none";var t=Ra(e.dom);null!==t&&e.dom.setAttribute("data-template-type",String(t)),s.push({dom:e.dom,type:t})})}}0!==s.length&&(t.forEach(function(e,t){var r=document.createElement("div");if(r.setAttribute("data-index",t),r.setAttribute("data-position",t),r._itemData=e,r._itemPosition=t,e&&e.decoration&&"object"==typeof e.decoration){var i=e.decoration;void 0!==i.top&&(r.style.marginTop=i.top+"px"),void 0!==i.left&&(r.style.marginLeft=i.left+"px"),void 0!==i.right&&(r.style.marginRight=i.right+"px"),void 0!==i.bottom&&(r.style.marginBottom=i.bottom+"px")}var o=e&&void 0!==e.type?e.type:null,a=s.find(function(e){return e.type===o});a||(a=s.find(function(e){return null===e.type})),a||(a=s[0]);var u,l,c=a.dom.cloneNode(!0);c.removeAttribute("data-template"),c.removeAttribute("id"),c.style.display="",c.style.position="relative",Na(c),u=c,l=e,(0,It.bindTemplateDataToNode)(u,l),Da(c),"absolute"===c.style.position&&(c.style.width&&(r.style.width=c.style.width),c.style.height&&(r.style.height=c.style.height)),r.appendChild(c),n.appendChild(r)}),requestAnimationFrame(function(){return(0,It.u6)(n)}))}}}function Fa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var Ba={enabled:!1,duration:300},ja=new Set;function Ua(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fa(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},Ba)}var Wa=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"setFadeEnabled",value:function(e){Ba.enabled=!0===e,ja.forEach(function(e){e&&"function"==typeof e.updateFadeConfig&&e.updateFadeConfig(Ba)});for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"setFadeDuration",value:function(e){Ba.duration="number"==typeof e?e:300,ja.forEach(function(e){e&&"function"==typeof e.updateFadeConfig&&e.updateFadeConfig(Ba)});for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"getFadeConfig",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,Ba)}},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=o.length,n=new Array(t),r=0;r<t;r++)n[r]=o[r];return(i=n&&n.length?n[n.length-1]:null)&&"function"==typeof i.resolve&&i.resolve(!0),e.abrupt("return",Promise.resolve(!0));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){}}]);var e}();new Wa;function Va(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return za(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?za(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function za(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ha(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ga(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ha(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ha(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ya(e,t,n){return t=Vn(t),Wn(e,qa()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function qa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qa=function(){return!!e})()}function Xa(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Za=function(e){function t(e,n,r){var i;return O(this,t),(i=Ya(this,t,[e,n,r])).tagName="FastListView",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","FastListView"),i._listData=[],i._templateChildren=[],i._singletonTemplates=[],i._horizontal=!1,i._spanCount=0,i._fadeConfig=Ua(),i._focusedIndex=-1,i._autofocusPosition=-1,i._itemContainer=document.createElement("div"),i._itemContainer.className="fast-list-item-container",i._itemContainer.style.cssText="display: flex; flex-direction: column; align-content: flex-start;",i.dom.appendChild(i._itemContainer),i.dom.style.cssText="overflow: auto; display: block;",i.dom.__fastListViewInstance=i,i._itemContainer.__fastListViewInstance=i,i._templateCaptured=!1,E(n,i),function(e){ja.add(e)}(i),i._observer=new MutationObserver(function(e){e.forEach(function(e){"childList"===e.type&&e.addedNodes.forEach(function(e){e!==i._itemContainer&&e.nodeType===Node.ELEMENT_NODE&&i._processTemplateNode(e)})})}),i._observer.observe(i.dom,{childList:!0,subtree:!1}),i}return Gn(t,e),R(t,[{key:"updateFadeConfig",value:function(e){this._fadeConfig=Ga({},e)}},{key:"defaultStyle",value:function(){return{display:"block",overflow:"auto",boxSizing:"border-box"}}},{key:"_processTemplateNode",value:function(e){var t=this;if(e&&e!==this._itemContainer&&e.nodeType===Node.ELEMENT_NODE){var n=function(e){var t,n=null!==(t=e.getAttribute("data-template-type"))&&void 0!==t?t:e.getAttribute("type");return null==n||""===n?null:isNaN(Number(n))?n:Number(n)},r=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=n(e);if(r)return t._singletonTemplates.some(function(t){return t.dom===e})||(t._singletonTemplates.push({dom:e,tagName:e.tagName,component:null,type:i}),e.setAttribute("data-singleton","true")),void(e.style.display="none");t._templateChildren.some(function(t){return t.dom===e})||(t._templateChildren.push({dom:e,tagName:e.tagName,component:null,type:i}),e.setAttribute("data-template","true"),null!==i&&e.setAttribute("data-template-type",String(i))),e.style.display="none"},i=e.hasAttribute&&e.hasAttribute("singleton"),o=n(e);if(!i&&null===o&&e.querySelectorAll){var a=Array.from(e.querySelectorAll("[type], [data-template-type], [singleton]"));if(a.length>0)return e.style.display="none",void a.forEach(function(e){r(e,e.hasAttribute("singleton"))})}i?r(e,!0):r(e)}}},{key:"_shouldDebugTailTemplate",value:function(e){return 1004===e||1002===e}},{key:"_isTailTemplate",value:function(e){return 1004===e||1002===e}},{key:"updateProperty",value:function(e,n){switch(e){case"clipChildren":this._clipChildren=!0===n||"true"===n||""===n,this._clipChildren?this.dom.style.overflow="auto":this.dom.style.overflow="visible",this._updateLayoutDirection();break;case"horizontal":this._horizontal=!0===n||"true"===n||""===n,this._horizontal?this.dom.setAttribute("horizontal",""):this.dom.removeAttribute("horizontal"),this._updateLayoutDirection();break;case"spanCount":case"span-count":this._spanCount=n>0?n:0,this._spanCount>0?this.dom.setAttribute("span-count",String(this._spanCount)):this.dom.removeAttribute("span-count"),this._updateLayoutDirection();break;case"listData":case"list-data":this.setListData(n);break;case"list":Array.isArray(n)?this.setListData(n):"string"==typeof n&&n.startsWith("${")?(this.dom.setAttribute("list",n),this._pendingListValue=n):this.setListData(n);break;case"autofocusPosition":case"autofocus-position":this._autofocusPosition=Number(n);break;default:"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n),Xa(t,"updateProperty",this,3)([e,n])}}},{key:"_updateLayoutDirection",value:function(){var e=!1===this._clipChildren?"visible":"auto",t=!1===this._clipChildren?"visible":"hidden";this._spanCount>0?(this._itemContainer.style.display="grid",this._itemContainer.style.gridTemplateColumns="repeat(".concat(this._spanCount,", 1fr)"),this._itemContainer.style.flexDirection="",this._itemContainer.style.flexWrap="",this._itemContainer.style.overflowX=t,this._itemContainer.style.overflowY=e):this._horizontal?(this._itemContainer.style.display="flex",this._itemContainer.style.flexDirection="row",this._itemContainer.style.flexWrap="nowrap",this._itemContainer.style.gridTemplateColumns="",this._itemContainer.style.overflowX=e,this._itemContainer.style.overflowY=t):(this._itemContainer.style.display="flex",this._itemContainer.style.flexDirection="column",this._itemContainer.style.flexWrap="nowrap",this._itemContainer.style.gridTemplateColumns="",this._itemContainer.style.overflowX=t,this._itemContainer.style.overflowY=e)}},{key:"_isSingleton",value:function(e){return!(!e.props||!e.props.singleton)||!!(e.dom&&e.dom.hasAttribute&&e.dom.hasAttribute("singleton"))}},{key:"insertChild",value:function(e,t){var n=this;if(e&&e.dom){if(e.pId&&e.pId!==this.id){var r=this._singletonTemplates.find(function(t){return t.component&&t.component.id===e.pId})||this._templateChildren.find(function(t){return t.component&&t.component.id===e.pId});if(r)return void(r.component&&r.component.insertChild&&r.component.insertChild(e,t))}if(this._isSingleton(e)){if(!this._singletonTemplates.some(function(t){return t.dom===e.dom})){var i=null;if(e.props&&void 0!==e.props.type)i=e.props.type;else if(e.dom.hasAttribute("type")){var o=e.dom.getAttribute("type");i=null!==o?isNaN(Number(o))?o:Number(o):null}this._singletonTemplates.push({dom:e.dom,tagName:e.tagName,id:e.id,component:e,type:i}),this._shouldDebugTailTemplate(i),e.dom.setAttribute("data-singleton","true")}e.dom.style.display="none"}else{if(!this._templateChildren.some(function(t){return t.dom===e.dom})){var a=null;if(e.props&&void 0!==e.props.type)a=e.props.type;else if(e.dom.hasAttribute("type")){var s=e.dom.getAttribute("type");a=null!==s?isNaN(Number(s))?s:Number(s):null}var u={dom:e.dom,tagName:e.tagName,id:e.id,component:e,type:a};this._templateChildren.push(u),this._shouldDebugTailTemplate(a),e.dom.setAttribute("data-template","true")}e.dom.style.display="none"}this.dom.contains(e.dom)||(this._itemContainer&&this.dom.contains(this._itemContainer)?this.dom.insertBefore(e.dom,this._itemContainer):this.dom.appendChild(e.dom)),this._listData.length>0&&!this._rerenderScheduled&&(this._rerenderScheduled=!0,requestAnimationFrame(function(){n._rerenderScheduled=!1,n._renderItems()}))}}},{key:"beforeChildMount",value:(r=l(c.mark(function e(n,r){var i,o,a,s,u,l;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.dom){e.next=4;break}if(!n.pId||n.pId===this.id){e.next=3;break}if(!(i=this._singletonTemplates.find(function(e){return e.component&&e.component.id===n.pId})||this._templateChildren.find(function(e){return e.component&&e.component.id===n.pId}))){e.next=3;break}if(!i.component||!i.component.beforeChildMount){e.next=1;break}return e.next=1,i.component.beforeChildMount(n,r);case 1:return e.next=2,Xa(t,"beforeChildMount",this,3)([n,r]);case 2:return e.abrupt("return");case 3:this._isSingleton(n)?(this._singletonTemplates.some(function(e){return e.dom===n.dom})||(o=null,n.props&&void 0!==n.props.type?o=n.props.type:n.dom.hasAttribute("type")&&(a=n.dom.getAttribute("type"),o=null!==a?isNaN(Number(a))?a:Number(a):null),this._singletonTemplates.push({dom:n.dom,tagName:n.tagName,id:n.id,component:n,type:o}),this._shouldDebugTailTemplate(o),n.dom.setAttribute("data-singleton","true")),n.dom.style.display="none"):(this._templateChildren.some(function(e){return e.dom===n.dom})||(s=null,n.props&&void 0!==n.props.type?s=n.props.type:n.dom.hasAttribute("type")&&(u=n.dom.getAttribute("type"),s=null!==u?isNaN(Number(u))?u:Number(u):null),l={dom:n.dom,tagName:n.tagName,id:n.id,component:n,type:s},this._templateChildren.push(l),this._shouldDebugTailTemplate(s),n.dom.setAttribute("data-template","true")),n.dom.style.display="none"),this.dom.contains(n.dom)||(this._itemContainer&&this.dom.contains(this._itemContainer)?this.dom.insertBefore(n.dom,this._itemContainer):this.dom.appendChild(n.dom));case 4:return e.next=5,Xa(t,"beforeChildMount",this,3)([n,r]);case 5:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"_captureTemplatesFromDOM",value:function(){this._templateCaptured=!0}},{key:"setListData",value:function(e){var t=this;if(Array.isArray(e)&&1===e.length&&Array.isArray(e[0])&&(e=e[0]),Array.isArray(e)){this._listData=e;var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;t._templateChildren.length>0||t._singletonTemplates.length>0||e>=10?t._renderItems():setTimeout(function(){return n(e+1)},50)};setTimeout(function(){return n()},0)}}},{key:"setListDataWithParams",value:function(e,t,n){if(Array.isArray(e)&&1===arguments.length){var r=s(e,3);e=r[0],t=r[1],n=r[2]}this.setListData(e)}},{key:"addListDataWithParams",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(Array.isArray(e)&&1===arguments.length){var n=s(e,2);e=n[0],t=n[1]}if(t>0&&this._listData.length>0){var r=Math.max(this._listData.length-t,0);this.deleteItem(r,this._listData.length-r)}this.addListData(e)}},{key:"deleteItemRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(Array.isArray(e)&&1===arguments.length){var n=s(e,2);e=n[0],t=n[1]}this.deleteItem(Number(e)||0,Number(t)||0)}},{key:"updateItemRange",value:function(e,t,n){var r;if(Array.isArray(e)&&1===arguments.length){var i=s(e,3);e=i[0],t=i[1],n=i[2]}var o=Number(e)||0,a=Number(t)||0,u=Array.isArray(n)?n:[];(r=this._listData).splice.apply(r,[o,a].concat(y(u))),this._renderItems()}},{key:"insertItemRange",value:function(e,t){var n;if(Array.isArray(e)&&1===arguments.length){var r=s(e,2);e=r[0],t=r[1]}var i=Number(e)||0,o=Array.isArray(t)?t:[];(n=this._listData).splice.apply(n,[i,0].concat(y(o))),this._renderItems()}},{key:"_renderItems",value:function(){var e=this;this._itemContainer.innerHTML="",this._templateChildren.forEach(function(e){e.dom&&(e.dom.style.display="none")});var t=new Set,r=[],i=[];if(this._singletonTemplates.forEach(function(n){var o=e._createSingletonItem(n,t);o&&(o.isTailTemplate?i.push(o.element):r.push(o.element))}),r.forEach(function(t){e._itemContainer.appendChild(t)}),0!==this._listData.length){if(this._listData.forEach(function(n,r){if(!t.has(n.type)){var i=e._createItemFromData(n,r);i&&e._itemContainer.appendChild(i)}}),i.forEach(function(t){e._itemContainer.appendChild(t)}),void 0!==this._selectedPosition&&this._selectedPosition>=0){var o=this._itemContainer.children;if(this._selectedPosition<o.length){var a=o[this._selectedPosition];if(a&&!a.hasAttribute("selected")){a.setAttribute("selected","true");for(var s=a.children,u=0;u<s.length;u++)s[u].setAttribute("selected","true");a.querySelectorAll("[duplicateparentstate]").forEach(function(e){e.setAttribute("selected","true")})}}}requestAnimationFrame(function(){var t=n.g.__TV_FOCUS_MANAGER__;t&&t.initShowOnStateForElement&&t.initShowOnStateForElement(e._itemContainer),e._autofocusPosition>=0&&e._listData.length>0&&e.requestFocus(e._autofocusPosition)})}}},{key:"_createSingletonItem",value:function(e,t){var n=this;if(null==e||!e.dom)return null;var r=null,i=-1;if(null!==e.type&&void 0!==e.type&&(i=this._listData.findIndex(function(t){return(null==t?void 0:t.type)===e.type}),r=i>=0?this._listData[i]:null),!r)return e.dom.style.display="none",null;e.dom.style.display="",null!==r.type&&void 0!==r.type?t.add(r.type):null!==e.type&&void 0!==e.type&&t.add(e.type),r.style&&this._applyStyleToElement(e.dom,r.style);var o=document.createElement("div");o.setAttribute("data-index",i),o.setAttribute("data-position",i),o._itemData=r,o._itemPosition=i,this._applyDecorationToElement(o,r.decoration||null);var a=this._isTailTemplate(e.type);if(this._spanCount>0&&a&&(o.style.gridColumn="1 / -1"),a);return o.appendChild(e.dom),o.addEventListener("click",function(e){var t=n._findNestedItemMeta(null==e?void 0:e.target,o);t&&t.itemData!==r&&r&&"object"==typeof r&&Array.isArray(r.itemList)?n._dispatchItemClick(t.position,t.itemData,i):n._dispatchItemClick(i,r)}),e.component&&"function"==typeof e.component.dispatchEvent&&requestAnimationFrame(function(){var t,n,o;e.component.dispatchEvent("bindItem",{pageIndex:null!==(t=r.pageIndex)&&void 0!==t?t:0,position:null!==(n=r.position)&&void 0!==n?n:i,index:null!==(o=r.position)&&void 0!==o?o:i,item:r})}),this.dispatchEvent("onBindItem",{position:i,index:i,item:r}),{element:o,isTailTemplate:a}}},{key:"_applyStyleToElement",value:function(e,t){t&&"object"==typeof t&&Object.keys(t).forEach(function(n){var r=t[n];"number"==typeof r&&(["width","height","minWidth","minHeight","maxWidth","maxHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","top","left","right","bottom","borderRadius","borderWidth"].includes(n)&&(r+="px"));e.style[n]=r})}},{key:"_applyDecorationToElement",value:function(e,t){e&&e.style&&(e.style.marginTop="",e.style.marginLeft="",e.style.marginRight="",e.style.marginBottom="",t&&"object"==typeof t&&(void 0!==t.top&&(e.style.marginTop=t.top+"px"),void 0!==t.left&&(e.style.marginLeft=t.left+"px"),void 0!==t.right&&(e.style.marginRight=t.right+"px"),void 0!==t.bottom&&(e.style.marginBottom=t.bottom+"px")))}},{key:"_createItemFromData",value:function(e,t){var n,r,i=this,o=document.createElement("div");o.setAttribute("data-index",t),o.setAttribute("data-position",t),o.__fastListViewInstance=this;var a=void 0!==e.type?e.type:null,s=this._templateChildren.find(function(e){return e.type===a}),u=window.__QT_SHARED_TEMPLATES__,l=u&&null!=a?u.get(a):null;if(!s&&l&&l.dom&&(s=l),s||(s=this._templateChildren.find(function(e){return null===e.type})),!s&&u&&u.size>0){var c=u.values().next().value;c&&c.dom&&(s=c)}if(!s&&this._templateChildren.length>0&&(s=this._templateChildren[0]),s&&s.dom){var h=s.dom.cloneNode(!0);h.removeAttribute("data-template"),h.removeAttribute("id"),h.style.position="relative",h.style.left="auto",h.style.top="auto",h.style.display="",s.component&&s.component.props&&this._bindComponentPropsToNode(h,s.component.props,e,{itemList:this._listData}),this._bindDataToNode(h,e,{itemList:this._listData}),o.appendChild(h),requestAnimationFrame(function(){i._processChildListData(o),(0,It.u6)(o)})}if(0===this._templateChildren.length){var d=e.text||e.title||e.name||"Item ".concat(t),f=document.createElement("span");f.textContent=d,f.style.cssText="color: white; font-size: 14px; padding: 5px; background: #333; margin: 5px; border-radius: 4px;",o.appendChild(f)}if(e.decoration){var p=e.decoration;void 0!==p.top&&(o.style.marginTop=p.top+"px"),void 0!==p.left&&(o.style.marginLeft=p.left+"px"),void 0!==p.right&&(o.style.marginRight=p.right+"px"),void 0!==p.bottom&&(o.style.marginBottom=p.bottom+"px")}var v=this._isTailTemplate(null!==(n=null===(r=s)||void 0===r?void 0:r.type)&&void 0!==n?n:a);return this._spanCount>0&&v&&(o.style.gridColumn="1 / -1"),o._itemData=e,o._itemPosition=t,o.addEventListener("click",function(n){var r=i._findNestedItemMeta(null==n?void 0:n.target,o);r&&r.itemData!==e&&e&&"object"==typeof e&&Array.isArray(e.itemList)?i._dispatchItemClick(r.position,r.itemData,t):i._dispatchItemClick(t,e)}),this.dispatchEvent("onBindItem",{position:t,index:t,item:e}),this._fadeConfig.enabled&&(o.style.opacity="0",o.style.transition="opacity ".concat(this._fadeConfig.duration,"ms ease-in-out"),requestAnimationFrame(function(){requestAnimationFrame(function(){o.style.opacity="1"})})),o}},{key:"_bindComponentPropsToNode",value:function(e,t,n){var r=this;if(t&&n){var i=Ga(Ga({},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),n);Object.keys(t).forEach(function(n){var o=t[n];if("string"==typeof o&&o.startsWith("${")&&o.endsWith("}")){var a=(0,It.Hd)(o,i),s=n.toLowerCase();if("list"===s||"listdata"===s){if(void 0!==a&&Array.isArray(a)||(a=(0,It.Hd)(o,i)),Array.isArray(a)){var u=window.__HIPPY_COMPONENT_REGISTRY__;if(u){var l=u.get(e);l&&"function"==typeof l.setListData?l.setListData(a):e._qtListData=a}else e._qtListData=a}return}if(("flexstyle"===s||"flexstyletemplate"===s)&&a&&"object"==typeof a){var c=window.__HIPPY_COMPONENT_REGISTRY__,h=c?c.get(e):null;h&&"function"==typeof h.updateProperty?h.updateProperty(n,a):r._applyFlexStyleToElement(e,a)}if(("textsize"===s||"fontsize"===s)&&void 0!==a){var d=window.__HIPPY_COMPONENT_REGISTRY__,f=d?d.get(e):null;if(f&&"function"==typeof f.updateProperty)f.updateProperty(n,a);else{var p="number"==typeof a?a+"px":a;e.style.fontSize=p}}if("src"===s){a&&"object"==typeof a&&(void 0!==a.url?a=a.url:void 0!==a.uri?a=a.uri:void 0!==a.src&&(a=a.src));var v=window.__HIPPY_COMPONENT_REGISTRY__,y=v?v.get(e):null;y&&"function"==typeof y.updateProperty?y.updateProperty(n,a):"IMG"===e.tagName&&"string"==typeof a&&(e.src=a)}}})}}},{key:"_bindDataToNode",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,It.bindTemplateDataToNode)(e,t,{scope:n,onListData:function(e,t){e._qtListData=t,e.setAttribute("data-has-list","true")}})}},{key:"_replacePlaceholders",value:function(e,t){return(0,It.vy)(e,t)}},{key:"_processChildListData",value:function(e){var t=function(e){if(e._qtListData){var n=window.__HIPPY_COMPONENT_REGISTRY__;if(n){var r=n.get(e);if(r&&"function"==typeof r.setListData)r.setListData(e._qtListData);else{var i,o,a,s=null===(i=e.getAttribute)||void 0===i?void 0:i.call(e,"data-component-name"),u=!(null===(o=e.querySelector)||void 0===o||!o.call(e,"[type], [data-template-type], [data-template], [data-singleton]"));"QtFlexView"===s?Ma(e,e._qtListData):("FastListView"===s||"ListView"===s||null!==(a=e.hasAttribute)&&void 0!==a&&a.call(e,"data-has-list")&&u)&&function(e,t){if(!e)return;Array.isArray(t)&&1===t.length&&Array.isArray(t[0])&&(t=t[0]);if(!Array.isArray(t))return;"none"===e.style.display&&(e.style.display="");var n=Array.from(e.children||[]).find(function(e){return e.classList&&e.classList.contains("fast-list-item-container")});n||((n=document.createElement("div")).className="fast-list-item-container",e.appendChild(n));!function(e,t){var n=e.hasAttribute("horizontal")||""===e.getAttribute("horizontal"),r=e.getAttribute("spanCount")||e.getAttribute("span-count")||"0",i=Number(r)||0;if(i>0)return t.style.display="grid",t.style.gridTemplateColumns="repeat(".concat(i,", 1fr)"),t.style.flexDirection="",t.style.flexWrap="",t.style.overflowX="hidden",void(t.style.overflowY="auto");if(t.style.display="flex",t.style.gridTemplateColumns="",n)return t.style.flexDirection="row",t.style.flexWrap="nowrap",t.style.overflowX="auto",void(t.style.overflowY="hidden");t.style.flexDirection="column",t.style.flexWrap="nowrap",t.style.overflowX="hidden",t.style.overflowY="auto"}(e,n);var r=function(e,t){if(e&&t&&t.decoration&&"object"==typeof t.decoration){var n=t.decoration;void 0!==n.top&&(e.style.marginTop=n.top+"px"),void 0!==n.left&&(e.style.marginLeft=n.left+"px"),void 0!==n.right&&(e.style.marginRight=n.right+"px"),void 0!==n.bottom&&(e.style.marginBottom=n.bottom+"px")}},i=function(e,t){var n=[],r=Array.from(e.children||[]).filter(function(e){return e!==t});return r.forEach(function(e){var t,r,i=Ka(e),o=(null===(t=e.hasAttribute)||void 0===t?void 0:t.call(e,"singleton"))||(null===(r=e.hasAttribute)||void 0===r?void 0:r.call(e,"data-singleton"));if(null!==i||o)return e.setAttribute(o?"data-singleton":"data-template","true"),null!==i&&e.setAttribute("data-template-type",String(i)),e.style.display="none",void n.push({dom:e,type:i,singleton:o});var a=e.querySelectorAll?Array.from(e.querySelectorAll("[type], [data-template-type], [singleton], [data-singleton]")):[];if(a.length>0)return e.style.display="none",void a.forEach(function(e){var t,r,i=Ka(e),o=(null===(t=e.hasAttribute)||void 0===t?void 0:t.call(e,"singleton"))||(null===(r=e.hasAttribute)||void 0===r?void 0:r.call(e,"data-singleton"));e.setAttribute(o?"data-singleton":"data-template","true"),null!==i&&e.setAttribute("data-template-type",String(i)),e.style.display="none",n.push({dom:e,type:i,singleton:o})});e.setAttribute("data-template","true"),e.style.display="none",n.push({dom:e,type:null,singleton:!1})}),n}(e,n),o=window.__QT_SHARED_TEMPLATES__;if(n.innerHTML="",0===t.length)return;var a=new Set,s=i.filter(function(e){return e.singleton}),u=i.filter(function(e){return!e.singleton}),l=[],c=[];s.forEach(function(e){var n=null,i=-1;if(null!==e.type&&void 0!==e.type?n=(i=t.findIndex(function(t){return(null==t?void 0:t.type)===e.type}))>=0?t[i]:null:(i=0,n=t[0]||null),n){var o=document.createElement("div");o.setAttribute("data-index",i),o.setAttribute("data-position",i),o._itemData=n,o._itemPosition=i,r(o,n);var s=1004===e.type||1002===e.type;spanCount>0&&s&&(o.style.gridColumn="1 / -1"),e.dom.style.display="",$a(e.dom,n,t),Na(e.dom),o.appendChild(e.dom),null!==n.type&&void 0!==n.type&&a.add(n.type),s?c.push(o):l.push(o)}else e.dom.style.display="none"}),l.forEach(function(e){n.appendChild(e)});var h=u.length>0?u:i;t.forEach(function(e,i){var s;if(!a.has(null==e?void 0:e.type)){var u=h.find(function(t){return t.type===(null==e?void 0:e.type)});if(!u&&o&&null!==(null==e?void 0:e.type)&&void 0!==(null==e?void 0:e.type)){var l=o.get(e.type);null!=l&&l.dom&&(u=l)}if(u||(u=h.find(function(e){return null===e.type})),!u&&o&&o.size>0){var c=o.values().next().value;null!=c&&c.dom&&(u=c)}if(u||(u=h[0]),null!==(s=u)&&void 0!==s&&s.dom){var d=document.createElement("div");d.setAttribute("data-index",i),d.setAttribute("data-position",i),d._itemData=e,d._itemPosition=i,r(d,e);var f=u.dom.cloneNode(!0);f.removeAttribute("data-template"),f.removeAttribute("data-singleton"),f.removeAttribute("id"),f.style.display="",f.style.position="relative",$a(f,e,t),Na(f),d.appendChild(f),n.appendChild(d)}}}),c.forEach(function(e){n.appendChild(e)}),requestAnimationFrame(function(){return(0,It.u6)(n)})}(e,e._qtListData)}}delete e._qtListData}e.children&&Array.from(e.children).forEach(function(e){return t(e)})};t(e)}},{key:"_findNestedItemMeta",value:function(e,t){var n=e;for(n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentElement);n&&n!==t;){if(void 0!==n._itemData&&void 0!==n._itemPosition)return{position:n._itemPosition,itemData:n._itemData};n=n.parentElement}return null}},{key:"_dispatchItemClick",value:function(e,t,n){var r={position:e,index:e,item:t};null!=n&&(r.parentPosition=n),this.dispatchEvent("onItemClick",r)}},{key:"_dispatchItemFocused",value:function(e,t,n){var r={position:e,index:e,item:t,hasFocus:!!n,isFocused:!!n};this.dispatchEvent("onItemFocused",r)}},{key:"notifyItemFocusChanged",value:function(e,t){if(e&&this._itemContainer){var n=this._itemContainer.children,r=n.length;if(0!==r){for(var i=-1,o=null,a=0;a<r;a++)if(n[a]===e||n[a].contains(e)){i=a,o=n[a];break}if(-1!==i){var s=this._listData[i];if(o&&s&&"object"==typeof s&&Array.isArray(s.itemList)){var u=this._findNestedItemMeta(e,o);if(u&&u.itemData){var l={position:u.position,index:u.position,item:u.itemData,hasFocus:!!t,isFocused:!!t,parentPosition:i};return void this.dispatchEvent("onItemfocused",l)}}if(t){if(this._focusedIndex===i)return;this._focusedIndex=i,this._selectedPosition!==i&&this.setSelectChildPosition(i,!1)}else{if(this._focusedIndex!==i)return;this._focusedIndex=-1}this._dispatchItemFocused(i,s,t)}}}}},{key:"addListData",value:function(e){var t=this;if(Array.isArray(e)){var n=this._listData.length;this._listData=this._listData.concat(e),e.forEach(function(e,r){var i=n+r,o=t._createItemFromData(e,i);o&&t._itemContainer.appendChild(o)})}}},{key:"updateItem",value:function(e,t){if(Array.isArray(e)&&1===arguments.length){var n=s(e,2);e=n[0],t=n[1]}if(e=Number(e),!(isNaN(e)||e<0||e>=this._listData.length)){this._listData[e]=Ga(Ga({},this._listData[e]),t);var r=this._itemContainer.children[e];if(r){var i=this._createItemFromData(this._listData[e],e);this._itemContainer.replaceChild(i,r)}}}},{key:"deleteItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(Array.isArray(e)&&1===arguments.length){var n=s(e,2);e=n[0],t=n[1]}if(e=Number(e),!(isNaN(e)||e<0)){this._listData.splice(e,t);for(var r=0;r<t;r++){var i=this._itemContainer.children[e];i&&this._itemContainer.removeChild(i)}Array.from(this._itemContainer.children).forEach(function(e,t){e.setAttribute("data-index",t),e.setAttribute("data-position",t),e._itemPosition=t})}}},{key:"clearData",value:function(){this._listData=[],this._itemContainer.innerHTML=""}},{key:"scrollToPosition",value:function(e,t){var n=this._itemContainer.children[e];n&&n.scrollIntoView({behavior:"smooth",block:"start"})}},{key:"requestFocus",value:function(e){var t=this._itemContainer.children;if(!(e<0||e>=t.length)){var r=t[e];if(r){var i=r.querySelector('[focusable="true"], [focusable="1"], [focusable]')||r,o=n.g.__TV_FOCUS_MANAGER__;o?(o.updateFocusableElements(),o._doFocusElement(i)):i.focus()}}}},{key:"setItemFocused",value:function(e){Array.isArray(e)&&1===arguments.length&&(e=e[0]),e=Number(e),Number.isFinite(e)&&(this._focusedIndex=e,this.setSelectChildPosition(e,!1),this.requestChildFocus(e))}},{key:"clearFocus",value:function(){this._focusedIndex=-1}},{key:"scrollToFocused",value:function(e){Array.isArray(e)&&1===arguments.length&&(e=e[0]),this.scrollToPosition(e),this.setItemFocused(e)}},{key:"scrollToTop",value:function(){this.dom&&(this.dom.scrollTop=0,this._itemContainer&&(this._itemContainer.scrollTop=0))}},{key:"pausePostTask",value:function(){}},{key:"resumePostTask",value:function(){}},{key:"clearPostTask",value:function(){}},{key:"requestChildFocus",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Array.isArray(e)&&(e=e[0]);var i=this._itemContainer.children;if(e<0||e>=i.length)return r<10&&0===i.length?void setTimeout(function(){return t.requestChildFocus(e,r+1)},100):void 0;var o=i[e];if(o){var a=o.querySelector('[focusable="true"], [focusable="1"], [focusable]')||o,s=n.g.__TV_FOCUS_MANAGER__;s?(s.updateFocusableElements(),s._doFocusElement(a)):a.focus()}}},{key:"setSelectChildPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=n.g.__TV_FOCUS_MANAGER__,i=function(e,t,n){var r;return e.getAttribute(t)||e.getAttribute("data-"+t)||(null===(r=window.getComputedStyle(e).getPropertyValue(n))||void 0===r?void 0:r.trim())};void 0!==this._selectedPosition&&this._selectedPosition>=0&&this._itemContainer.querySelectorAll('[selected="true"], [selected=""]').forEach(function(e){if(e.removeAttribute("selected"),!(e.classList.contains("focused")||r&&r.focusedElement===e)&&r){var t,n=null===(t=r.focusedElementOriginalStyles)||void 0===t?void 0:t.get(e),o=i(e,"select-background-color","--select-background-color");if(n&&void 0!==n.backgroundColor){var a=n.backgroundColor,s=a===o||a===(null==o?void 0:o.replace(/\s/g,""))||a===(null==o?void 0:o.replace("rgba","rgb").replace(/,([^,]+)\)$/,"$1)"))?"":a;e.style.backgroundColor=s}else e.style.backgroundColor="";r._removeDuplicateParentStateStyles(e)}});if(this._selectedPosition=e,e>=0){var o=this._itemContainer.children;if(e<o.length){var a=o[e];if(a){a.setAttribute("selected","true");for(var s=a.children,u=0;u<s.length;u++){s[u].setAttribute("selected","true")}if(a.querySelectorAll("[duplicateparentstate]").forEach(function(e){e.setAttribute("selected","true")}),r){r.focusedElement&&(a.contains(r.focusedElement)||r.focusedElement);for(var l=0;l<s.length;l++){var c=s[l];if(!(c.classList.contains("focused")||r.focusedElement===c)){var h=i(c,"select-background-color","--select-background-color");if(h){if(r.focusedElementOriginalStyles||(r.focusedElementOriginalStyles=new Map),!r.focusedElementOriginalStyles.has(c)){var d=c.style.backgroundColor,f=d===h||d===h.replace(/\s/g,"")||d===h.replace("rgba","rgb").replace(/,([^,]+)\)$/,"$1)")?"":d;r.focusedElementOriginalStyles.set(c,{backgroundColor:f})}c.style.backgroundColor=h}r.styler._applyDuplicateParentStateStyles(c,!1)}}}}}}t&&this.requestChildFocus(e)}},{key:"setSpanCount",value:function(e){e>0&&this._itemContainer.style.setProperty("--span-count",e)}},{key:"destroy",value:function(){!function(e){ja.delete(e)}(this),Xa(t,"destroy",this,1)&&Xa(t,"destroy",this,3)([])}},{key:"handleFocusNavigation",value:function(e,t){var n=this._itemContainer.children,r=n.length;if(0===r)return null;for(var i=null,o=-1,a=0;a<r;a++)if(n[a]===e||n[a].contains(e)){i=n[a],o=a;break}if(-1===o)return null;if(!this._isAtItemBoundary(i,e,t)){var s=this._handleInternalNavigation(i,e,t);if(s){var u=s.getAttribute("focusable");if("true"===u||"1"===u||""===u)return s}}var l=null,c=this._handleSpatialNavigation(e,t,n,r);if(c.element)return l=c.element,c.index,l;if(0===o&&("up"===t||"left"===t))return this._hasExternalFocusableInDirection(e,t)?(this._scrollToBoundary(t,e),null):(this._scrollToBoundary(t,e),e);if(o===r-1&&("down"===t||"right"===t))return this._hasExternalFocusableInDirection(e,t)?(this._scrollToBoundary(t,e),null):(this._scrollToBoundary(t,e),e);var h=this._spanCount>0;if(h){var d=this._handleGridNavigation(o,t,n,r);l=d.element,d.index}else{var f=this._handleListNavigation(o,t,n,r);l=f.element,f.index}return!l&&h?this._hasExternalFocusableInDirection(e,t)?null:e:l}},{key:"_hasExternalFocusableInDirection",value:function(e,t){var n,r=this.dom||this._itemContainer,i=r.getBoundingClientRect(),o=Va(document.querySelectorAll('[focusable="true"], [focusable="1"], [focusable], [data-focusable="true"]'));try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a!==e&&!r.contains(a)){var s=a.getAttribute("focusable");if("false"!==s&&"0"!==s){var u=a.getBoundingClientRect();if(0!==u.width||0!==u.height){var l={x:u.left+u.width/2,y:u.top+u.height/2};switch(t){case"up":if(l.y<i.top)return!0;break;case"down":if(l.y>i.bottom)return!0;break;case"left":if(l.x<i.left)return!0;break;case"right":if(l.x>i.right)return!0}}}}}}catch(e){o.e(e)}finally{o.f()}return!1}},{key:"_isAtItemBoundary",value:function(e,t,n){var r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),o=i.top-r.top,a=r.bottom-i.bottom,s=i.left-r.left,u=r.right-i.right;switch(n){case"up":return o<=10;case"down":return a<=10;case"left":return s<=10;case"right":return u<=10;default:return!1}}},{key:"updateBlockFocusDirections",value:function(e){if(e&&this._itemContainer&&(!e.hasAttribute||!e.hasAttribute("blockFocusDirections")&&!e.hasAttribute("blockfocusdirections"))){var t=this._itemContainer.children,n=t.length;if(0!==n)for(var r=0;r<n;r++)if(t[r]===e||t[r].contains(e)){0;break}}}},{key:"_scrollToBoundary",value:function(e,t){if(this.dom){var n=this._itemContainer?Array.from(this._itemContainer.children):[];if(0!==n.length&&t){for(var r=null,i=-1,o=0;o<n.length;o++)if(n[o]===t||n[o].contains(t)){r=n[o],i=o;break}if(-1!==i){var a=n.map(function(e){return{el:e,rect:e.getBoundingClientRect()}}).filter(function(e){return e.rect.width>0&&e.rect.height>0});if(0!==a.length){var s=r.getBoundingClientRect();if(this._horizontal){if("left"===e){var u=Math.min.apply(Math,y(a.map(function(e){return e.rect.left})));s.left<=u+20&&(this.dom.scrollLeft=0)}else if("right"===e){var l=Math.max.apply(Math,y(a.map(function(e){return e.rect.right})));s.right>=l-20&&(this.dom.scrollLeft=this.dom.scrollWidth)}}else if("up"===e){var c=Math.min.apply(Math,y(a.map(function(e){return e.rect.top})));s.top<=c+20&&(this.dom.scrollTop=0,this.dom.parentElement&&this.dom.parentElement.scrollTop>0&&(this.dom.parentElement.scrollTop=0))}else if("down"===e){var h=Math.max.apply(Math,y(a.map(function(e){return e.rect.bottom})));s.bottom>=h-20&&(this.dom.scrollTop=this.dom.scrollHeight)}}}}}}},{key:"_handleInternalNavigation",value:function(e,t,n){var r=e.querySelectorAll('[focusable="true"], [focusable="1"], [focusable], [data-focusable="true"], [data-focusable], [canfocus="true"], [canFocus="true"], .focusable, [tabindex="0"], [tabindex]');if(r.length<=1)return null;var i=Array.from(r).filter(function(e){var t=e.getAttribute("focusable");if("false"===t||"0"===t)return!1;var n=e.getAttribute("duplicateParentState");return"true"!==n&&""!==n&&!e.hasAttribute("duplicateparentstate")});if(i.length<=1)return null;for(var o=-1,a=0;a<i.length;a++)if(i[a]===t||i[a].contains(t)){o=a;break}if(-1===o)return null;var s=i.map(function(e){return{el:e,rect:e.getBoundingClientRect()}}),u=s[o].rect,l=null,c=1/0;return s.forEach(function(e,t){if(t!==o){var r=e.rect,i=1/0,a=!1;switch(n){case"up":r.bottom<=u.top&&(i=Math.abs(r.left-u.left)+(u.top-r.bottom),a=!0);break;case"down":r.top>=u.bottom&&(i=Math.abs(r.left-u.left)+(r.top-u.bottom),a=!0);break;case"left":r.right<=u.left&&(i=Math.abs(r.top-u.top)+(u.left-r.right),a=!0);break;case"right":r.left>=u.right&&(i=Math.abs(r.top-u.top)+(r.left-u.right),a=!0)}a&&i<c&&(c=i,l=e.el)}}),l}},{key:"_getFocusableInItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("true"===e.getAttribute("focusable"))return e;var n=e.querySelectorAll('[focusable="true"]');if(0===n.length)return e;if(1===n.length||!t)return n[0];var r=Array.from(n).map(function(e){return{el:e,rect:e.getBoundingClientRect()}}),i=r[0].el,o=null;return r.forEach(function(e){var n,r=e.rect;switch(t){case"up":n=r.bottom,(null===o||n>o)&&(o=n,i=e.el);break;case"down":n=r.top,(null===o||n<o)&&(o=n,i=e.el);break;case"left":n=r.right,(null===o||n>o)&&(o=n,i=e.el);break;case"right":n=r.left,(null===o||n<o)&&(o=n,i=e.el)}}),i}},{key:"_handleSpatialNavigation",value:function(e,t,n,r){if(!e)return{element:null,index:-1};for(var i=e.getBoundingClientRect(),o=i.left+i.width/2,a=i.top+i.height/2,s=null,u=-1,l=1/0,c=void 0!==this._selectedPosition&&this._selectedPosition>=0,h=0;h<r;h++){var d=n[h];if("none"!==d.style.display)if(c){var f=this._getFocusableInItem(d,t);if(!f||f===e)continue;if(f===d&&"true"!==d.getAttribute("focusable"))continue;var p=f.getBoundingClientRect();if(0===p.width&&0===p.height)continue;var v={x:p.left+p.width/2,y:p.top+p.height/2},y=v.x-o,m=v.y-a,g=!1,_=0,b=0;switch(t){case"up":g=m<-5,_=Math.abs(m),b=Math.abs(y);break;case"down":g=m>5,_=Math.abs(m),b=Math.abs(y);break;case"left":g=y<-5,_=Math.abs(y),b=Math.abs(m);break;case"right":g=y>5,_=Math.abs(y),b=Math.abs(m)}if(g){var w=h===this._selectedPosition;("left"===t||"right"===t)&&Math.abs(m)>p.height/2&&(b*=5),("up"===t||"down"===t)&&Math.abs(y)>p.width/2&&(b*=5);var k=_+.5*b;w&&(k-=1e3),k<l&&(l=k,s=f,u=h)}}else{var E=d.querySelectorAll('[focusable="true"]');0===E.length&&"true"===d.getAttribute("focusable")&&d!==e&&E.push(d);var S,A=Va(E);try{for(A.s();!(S=A.n()).done;){var x=S.value;if(x!==e){var C=x.getBoundingClientRect();if(0!==C.width||0!==C.height){var T={x:C.left+C.width/2,y:C.top+C.height/2},I=T.x-o,O=T.y-a,L=!1;switch(t){case"up":L=O<-5;break;case"down":L=O>5;break;case"left":L=I<-5;break;case"right":L=I>5}if(L){var P=Math.sqrt(I*I+O*O);P<l&&(l=P,s=x,u=h)}}}}}catch(e){A.e(e)}finally{A.f()}}}return{element:s,index:u}}},{key:"_handleGridNavigation",value:function(e,t,n,r){for(var i=this._spanCount,o=Math.floor(e/i),a=e%i,s=e;;){switch(t){case"up":o>0?(s-=i,o--):s=-1;break;case"down":o++,(s+=i)>=r&&(s=-1);break;case"left":a>0?(s-=1,a--):s=-1;break;case"right":a<i-1&&s+1<r?(s+=1,a++):s=-1}if(!(s>=0&&s<r))break;var u=this._getFocusableInItem(n[s],t);if(u!==n[s]||"true"===n[s].getAttribute("focusable"))return{element:u,index:s}}return{element:null,index:-1}}},{key:"_handleListNavigation",value:function(e,t,n,r){for(var i=e;;){if(this._horizontal)switch(t){case"left":i>0?i-=1:i=-1;break;case"right":i<r-1?i+=1:i=-1;break;default:i=-1}else switch(t){case"up":i>0?i-=1:i=-1;break;case"down":i<r-1?i+=1:i=-1;break;default:i=-1}if(!(i>=0&&i<r))break;var o=this._getFocusableInItem(n[i],t);if(o!==n[i]||"true"===n[i].getAttribute("focusable"))return{element:o,index:i}}return{element:null,index:-1}}},{key:"_extractValue",value:function(e,t){return(0,It.Hd)(e,t)}},{key:"_applyFlexStyleToElement",value:function(e,t){t&&"object"==typeof t&&(t=(0,Ke.II)(t),Object.keys(t).forEach(function(n){var r=t[n];"number"==typeof r&&(["width","height","minWidth","minHeight","maxWidth","maxHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","top","left","right","bottom","borderRadius","borderWidth","fontSize","lineHeight","letterSpacing","gap","rowGap","columnGap"].includes(n)&&(r+="px"));try{e.style[n]=r}catch(t){try{var i=n.replace(/([A-Z])/g,"-$1").toLowerCase();e.style.setProperty(i,r)}catch(e){}}}))}},{key:"updateChildzIndex",value:function(){var e=this;if(this.dom){var t=this.context.getModuleByName("UIManagerModule");this.dom.childNodes.forEach(function(n){var r,i=t.findViewById(n.id);i&&(e.exitChildrenStackContext&&void 0!==(null===(r=i.props)||void 0===r||null===(r=r.style)||void 0===r?void 0:r.zIndex)&&i.updateSelfStackContext(),!e.exitChildrenStackContext&&i.updatedZIndex&&i.updateSelfStackContext(!1))})}}}]);var r}(ca);function Ka(e){var t;if(!e||e.nodeType!==Node.ELEMENT_NODE)return null;var n=null!==(t=e.getAttribute("data-template-type"))&&void 0!==t?t:e.getAttribute("type");return null==n||""===n?null:isNaN(Number(n))?n:Number(n)}function $a(e,t,n){(0,It.bindTemplateDataToNode)(e,t,{scope:{itemList:n},onListData:function(e,t){e._qtListData=t,e.setAttribute("data-has-list","true")}})}function Ja(e,t,n){return t=Vn(t),Wn(e,Qa()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Qa(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qa=function(){return!!e})()}var es=function(e){function t(e,n,r){var i;return O(this,t),(i=Ja(this,t,[e,n,r])).tagName="div",i.dom=document.createElement("div"),i.spinner=document.createElement("div"),i.spinner.className="qt-loading-spinner",i.dom.appendChild(i.spinner),i._injectStyles(),i}return Gn(t,e),R(t,[{key:"_injectStyles",value:function(){var e="qt-loading-view-styles";if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.textContent="\n .qt-loading-spinner {\n width: 100%;\n height: 100%;\n border: 5px solid rgba(200, 200, 200, 0.3);\n border-top-color: #409eff;\n border-radius: 50%;\n animation: qt-loading-spin 0.8s linear infinite;\n box-sizing: border-box;\n }\n @keyframes qt-loading-spin {\n to {\n transform: rotate(360deg);\n }\n }\n ",document.head.appendChild(t)}}},{key:"updateProperty",value:function(e,n){var r,i,o,a,s;"color"===e?n&&(this.spinner.style.borderTopColor=n):(r=t,i="updateProperty",o=this,s=zn(Vn(1&(a=3)?r.prototype:r),i,o),2&a&&"function"==typeof s?function(e){return s.apply(o,e)}:s)([e,n])}}])}(ca);function ts(e,t,n){return t=Vn(t),Wn(e,ns()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function ns(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ns=function(){return!!e})()}var rs={alpha:"opacity",rotation:"rotate",rotationX:"rotateX",rotationY:"rotateY",rotationZ:"rotateZ",scaleX:"scaleX",scaleY:"scaleY",scaleZ:"scaleZ",translationX:"translateX",translationY:"translateY",translationZ:"translateZ"},is={1:"ease",2:"ease-in",3:"cubic-bezier(0.36, 0, 0.66, -0.56)",4:"cubic-bezier(0.68, -0.6, 0.32, 1.6)",5:"cubic-bezier(0.68, -0.55, 0.27, 1.55)",6:"ease-in-out",7:"ease-out",8:"linear",9:"cubic-bezier(0.34, 1.56, 0.64, 1)",10:"cubic-bezier(0.4, 0, 1, 1)",11:"cubic-bezier(0.4, 0, 0.2, 1)",12:"linear"},os=function(e){function t(e,n,r){var i;return O(this,t),(i=ts(this,t,[e,n,r])).tagName="AnimationViewComponent",i.dom=document.createElement("div"),i._animators=new Map,i._animatorSets=new Map,i._runningAnimations=new Map,i._pivotX=null,i._pivotY=null,i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{boxSizing:"border-box",zIndex:0,display:"block",position:"relative"}}},{key:"_getAnimationTarget",value:function(){return this.dom&&this.dom.children.length>0?this.dom.children[0]:this.dom}},{key:"setPivotX",value:function(e){var t=e[0];this._pivotX=t,this._updateTransformOrigin()}},{key:"setPivotY",value:function(e){var t=e[0];this._pivotY=t,this._updateTransformOrigin()}},{key:"resetPivot",value:function(e){this._pivotX=null,this._pivotY=null,this._updateTransformOrigin()}},{key:"_updateTransformOrigin",value:function(){var e=this._getAnimationTarget();null!==this._pivotX&&null!==this._pivotY?e.style.transformOrigin="".concat(this._pivotX,"px ").concat(this._pivotY,"px"):e.style.transformOrigin=""}},{key:"resetAnimators",value:function(e){this._animators.clear(),this._animatorSets.clear(),this.cancelAllAnimations()}},{key:"reset",value:function(e){this.resetAnimators(e)}},{key:"cancelAllAnimations",value:function(){this._runningAnimations.forEach(function(e){try{e.cancel()}catch(e){}}),this._runningAnimations.clear();var e=this._getAnimationTarget();e.style.transform="",e.style.opacity=""}},{key:"animator",value:function(e){var t,n=r(t=e)||v(t)||o(t)||a(),i=n[0],u=(n[1],n[2]),l=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}(n).slice(3),c=l.slice(0,-6),h=s(l.slice(-6),6),d=h[0],f=h[1],p=h[2],y=(h[3],h[4],{id:i,propertyName:u,values:c,duration:d,repeatMode:f,repeatCount:p,interpolator:h[5]});this._animators.set(i,y)}},{key:"animatorSet",value:function(e){var t=s(e,3),n=t[0],r=t[1],i=t[2];this._animatorSets.set(n,{id:n,duration:r,listenAnimator:i,animators:[],relationType:"together"})}},{key:"play",value:function(e){var t=s(e,2),n=t[0],r=t[1],i=this._animatorSets.get(n);i&&(i.animators=[{id:r,type:"play"}])}},{key:"playWith",value:function(e){var t=s(e,2),n=t[0],r=t[1],i=this._animatorSets.get(n);i&&i.animators.length>0&&i.animators.push({id:r,type:"with"})}},{key:"playBefore",value:function(e){var t=s(e,2),n=t[0],r=t[1],i=this._animatorSets.get(n);i&&i.animators.length>0&&i.animators.push({id:r,type:"before"})}},{key:"playAfter",value:function(e){var t=s(e,2),n=t[0],r=t[1],i=this._animatorSets.get(n);i&&i.animators.length>0&&i.animators.push({id:r,type:"after"})}},{key:"playSequentially",value:function(e){var t=e[0],n=e.slice(1),r=this._animatorSets.get(t);r&&(r.animators=n.map(function(e){return{id:e,type:"sequence"}}),r.relationType="sequence")}},{key:"playSequentially1",value:function(e){this.playSequentially([e[0],e[1]])}},{key:"playSequentially2",value:function(e){this.playSequentially([e[0],e[1],e[2]])}},{key:"playSequentially3",value:function(e){this.playSequentially([e[0],e[1],e[2],e[3]])}},{key:"playSequentially4",value:function(e){this.playSequentially([e[0],e[1],e[2],e[3],e[4]])}},{key:"playSequentially5",value:function(e){this.playSequentially([e[0],e[1],e[2],e[3],e[4],e[5]])}},{key:"playTogether",value:function(e){var t=e[0],n=e.slice(1),r=this._animatorSets.get(t);r&&(r.animators=n.map(function(e){return{id:e,type:"together"}}),r.relationType="together")}},{key:"playTogether1",value:function(e){this.playTogether([e[0],e[1]])}},{key:"playTogether2",value:function(e){this.playTogether([e[0],e[1],e[2]])}},{key:"playTogether3",value:function(e){this.playTogether([e[0],e[1],e[2],e[3]])}},{key:"playTogether4",value:function(e){this.playTogether([e[0],e[1],e[2],e[3],e[4]])}},{key:"playTogether5",value:function(e){this.playTogether([e[0],e[1],e[2],e[3],e[4],e[5]])}},{key:"start",value:function(e){var t=Array.isArray(e)?e[0]:e;this._startAnimation(t)}},{key:"startDelay",value:function(e){var t=this,n=e[0],r=e[1];setTimeout(function(){t._startAnimation(n)},r)}},{key:"pause",value:function(e){var t=e[0],n=this._runningAnimations.get(t);n&&n.pause()}},{key:"resume",value:function(e){var t=e[0],n=this._runningAnimations.get(t);n&&n.play()}},{key:"cancel",value:function(e){var t=e[0],n=this._runningAnimations.get(t);n&&(n.cancel(),this._runningAnimations.delete(t))}},{key:"reverse",value:function(e){var t=e[0],n=this._runningAnimations.get(t);n&&n.reverse()}},{key:"_startAnimation",value:function(e){var t=this._animatorSets.get(e);if(t)this._runAnimatorSet(t);else{var n=this._animators.get(e);n&&this._runAnimator(n)}}},{key:"_runAnimator",value:function(e){var t=this,n=this._getAnimationTarget(),r=e.propertyName,i=e.values,o=e.duration,a=e.repeatCount,s=e.interpolator,u=is[null==s?void 0:s.type]||"linear",l=-1===a?1/0:a||1,c=2===e.repeatMode?"alternate":"normal",h=this._buildKeyframes(r,i),d=n.animate(h,{duration:o,easing:u,iterations:l,direction:c,fill:"forwards"});this._runningAnimations.set(e.id,d),d.onfinish=function(){t._runningAnimations.delete(e.id)}}},{key:"_runAnimatorSet",value:function(e){var t=this,n=e.animators,r=e.relationType;"together"===r?n.forEach(function(e){var n=t._animators.get(e.id);n&&t._runAnimator(n)}):"sequence"===r&&this._runSequentially(n,0)}},{key:"_runSequentially",value:function(e,t){var n=this;if(!(t>=e.length)){var r=e[t],i=this._animators.get(r.id);if(i){var o=this._getAnimationTarget(),a=i.propertyName,s=i.values,u=i.duration,l=i.repeatCount,c=i.interpolator,h=is[null==c?void 0:c.type]||"linear",d=-1===l?1/0:l||1,f=2===i.repeatMode?"alternate":"normal",p=this._buildKeyframes(a,s),v=o.animate(p,{duration:u,easing:h,iterations:d,direction:f,fill:"forwards"});this._runningAnimations.set(i.id,v),v.onfinish=function(){n._runningAnimations.delete(i.id),n._runSequentially(e,t+1)}}else this._runSequentially(e,t+1)}}},{key:"_buildKeyframes",value:function(e,t){var n=rs[e]||e;if(0===t.length)return[];return["rotate","rotateX","rotateY","rotateZ","scaleX","scaleY","translateX","translateY"].includes(n)?t.map(function(e,r){1===t.length||t.length;var i={};switch(n){case"rotate":i.transform="rotate(".concat(e,"deg)");break;case"rotateX":i.transform="rotateX(".concat(e,"deg)");break;case"rotateY":i.transform="rotateY(".concat(e,"deg)");break;case"rotateZ":i.transform="rotateZ(".concat(e,"deg)");break;case"scaleX":i.transform="scaleX(".concat(e,")");break;case"scaleY":i.transform="scaleY(".concat(e,")");break;case"translateX":i.transform="translateX(".concat(e,"px)");break;case"translateY":i.transform="translateY(".concat(e,"px)")}return i}):"opacity"===n?t.map(function(e){return{opacity:e}}):t.map(function(e){return{[n]:e}})}},{key:"startAnimator",value:function(e){var t=Array.isArray(e)?e[0]:e;this._startAnimation(t)}},{key:"startAnimatorDelay",value:function(e){var t=this,n=Array.isArray(e)?e[0]:e,r=Array.isArray(e)?e[1]:0;setTimeout(function(){t._startAnimation(n)},r)}},{key:"pauseAnimator",value:function(e){var t=Array.isArray(e)?e[0]:e,n=this._runningAnimations.get(t);n&&n.pause()}},{key:"resumeAnimator",value:function(e){var t=Array.isArray(e)?e[0]:e,n=this._runningAnimations.get(t);n&&n.play()}},{key:"cancelAnimator",value:function(e){var t=Array.isArray(e)?e[0]:e,n=this._runningAnimations.get(t);n&&(n.cancel(),this._runningAnimations.delete(t))}},{key:"reverseAnimator",value:function(e){var t=Array.isArray(e)?e[0]:e,n=this._runningAnimations.get(t);n&&n.reverse()}},{key:"objectAnimator1",value:function(e){var t=s(e,10),n=t[0],r=(t[1],t[2]),i=t[3],o=t[4],a=t[5],u=t[6],l=(t[7],t[8],{id:n,propertyName:r,values:[i],duration:o,repeatMode:a,repeatCount:u,interpolator:t[9]});this._animators.set(n,l)}},{key:"objectAnimator2",value:function(e){var t=s(e,11),n=t[0],r=(t[1],t[2]),i=t[3],o=t[4],a=t[5],u=t[6],l=t[7],c=(t[8],t[9],{id:n,propertyName:r,values:[i,o],duration:a,repeatMode:u,repeatCount:l,interpolator:t[10]});this._animators.set(n,c)}},{key:"objectAnimator3",value:function(e){var t=s(e,12),n=t[0],r=(t[1],t[2]),i=t[3],o=t[4],a=t[5],u=t[6],l=t[7],c=t[8],h=(t[9],t[10],{id:n,propertyName:r,values:[i,o,a],duration:u,repeatMode:l,repeatCount:c,interpolator:t[11]});this._animators.set(n,h)}},{key:"objectAnimator4",value:function(e){var t=s(e,13),n=t[0],r=(t[1],t[2]),i=t[3],o=t[4],a=t[5],u=t[6],l=t[7],c=t[8],h=t[9],d=(t[10],t[11],{id:n,propertyName:r,values:[i,o,a,u],duration:l,repeatMode:c,repeatCount:h,interpolator:t[12]});this._animators.set(n,d)}},{key:"objectAnimator5",value:function(e){var t=s(e,14),n=t[0],r=(t[1],t[2]),i=t[3],o=t[4],a=t[5],u=t[6],l=t[7],c=t[8],h=t[9],d=t[10],f=(t[11],t[12],{id:n,propertyName:r,values:[i,o,a,u,l],duration:c,repeatMode:h,repeatCount:d,interpolator:t[13]});this._animators.set(n,f)}}])}(ca);function as(e,t,n){return t=Vn(t),Wn(e,ss()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function ss(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ss=function(){return!!e})()}var us=function(e){function t(e,n,r){var i;return O(this,t),(i=as(this,t,[e,n,r])).tagName="ESWebViewComponent",i.dom=document.createElement("div"),i._iframe=null,i._url=null,i._userAgent=null,i.dom.style.position="relative",i.dom.style.overflow="hidden",i.dom.setAttribute("data-component-name","QtWebView"),i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{boxSizing:"border-box",zIndex:0,display:"block",position:"relative",overflow:"hidden"}}},{key:"_getOrCreateIframe",value:function(){var e=this;return this._iframe||(this._iframe=document.createElement("iframe"),this._iframe.style.width="100%",this._iframe.style.height="100%",this._iframe.style.border="none",this._iframe.style.position="absolute",this._iframe.style.top="0",this._iframe.style.left="0",this._iframe.allow="autoplay; fullscreen; clipboard-write",this._iframe.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"),this.dom.appendChild(this._iframe),this._iframe.addEventListener("error",function(t){e._handleLoadError()}),this._iframe.addEventListener("load",function(){e._detectBlockedContent()}),this._iframe.setAttribute("tabindex","-1"),this._iframe.addEventListener("focus",function(t){setTimeout(function(){e._iframe&&(e._iframe.blur(),document.body.focus())},0)})),this._iframe}},{key:"_detectBlockedContent",value:function(){var e=this;this._iframe&&setTimeout(function(){if(e._iframe)try{var t,n=e._iframe.contentDocument||e._iframe.contentWindow.document,r=(null==n||null===(t=n.body)||void 0===t?void 0:t.innerHTML)||"",i=r.includes("ERR_CONNECTION")||r.includes("ERR_NAME_NOT_RESOLVED")||r.includes("拒绝了我们的连接请求")||r.includes("无法访问此网站"),o=r.includes("X-Frame-Options")||r.includes("refused to connect")||r.includes("blocked by")||r.includes("拒绝连接"),a=!n||!n.body||""===r||"<br>"===r||r.length<50;i?e._handleLoadError("无法连接到服务器,请检查网络或地址是否正确"):o?e._handleLoadError("该网站设置了安全策略,禁止在页面内嵌入显示"):a&&e._handleLoadError("页面内容为空")}catch(e){}},500)}},{key:"_handleLoadError",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"该网站设置了安全策略,禁止在页面内嵌入显示";this.dom.innerHTML='\n <div style="display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #fff; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif;">\n <div style="width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; margin-bottom: 30px;">\n <svg width="60" height="60" viewBox="0 0 24 24" fill="none" stroke="#ff6b6b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <circle cx="12" cy="12" r="10"></circle>\n <line x1="15" y1="9" x2="9" y2="15"></line>\n <line x1="9" y1="9" x2="15" y2="15"></line>\n </svg>\n </div>\n <div style="font-size: 28px; font-weight: 600; margin-bottom: 12px; color: #fff;">无法加载页面</div>\n <div style="font-size: 16px; color: #888; margin-bottom: 8px; text-align: center; max-width: 400px; line-height: 1.6;">\n '.concat(t,'\n </div>\n <div style="font-size: 14px; color: #666; margin-bottom: 30px; word-break: break-all; max-width: 500px; text-align: center;">\n ').concat(this._url||"",'\n </div>\n <div style="display: flex; gap: 16px;">\n <button id="webview-open-external" style="padding: 14px 28px; font-size: 16px; cursor: pointer; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 8px; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);">\n 在新窗口打开\n </button>\n <button id="webview-go-back" style="padding: 14px 28px; font-size: 16px; cursor: pointer; background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; transition: transform 0.2s, background 0.2s;">\n 返回上一页\n </button>\n </div>\n </div>\n ');var r=this.dom.querySelector("#webview-open-external");r&&this._url&&(r.addEventListener("mouseenter",function(){r.style.transform="translateY(-2px)",r.style.boxShadow="0 6px 20px rgba(102, 126, 234, 0.5)"}),r.addEventListener("mouseleave",function(){r.style.transform="translateY(0)",r.style.boxShadow="0 4px 15px rgba(102, 126, 234, 0.4)"}),r.addEventListener("click",function(){window.open(e._url,"_blank")}));var i=this.dom.querySelector("#webview-go-back");i&&(i.addEventListener("mouseenter",function(){i.style.background="rgba(255,255,255,0.15)"}),i.addEventListener("mouseleave",function(){i.style.background="rgba(255,255,255,0.1)"}),i.addEventListener("click",function(){var e=n.g.__ES_ROUTER__;e&&"function"==typeof e.back?e.back():window.history.back()}))}},{key:"updateProperty",value:function(e,n){var r,i,o,a,s;"url"!==e&&"source"!==e?"userAgent"!==e?(r=t,i="updateProperty",o=this,s=zn(Vn(1&(a=3)?r.prototype:r),i,o),2&a&&"function"==typeof s?function(e){return s.apply(o,e)}:s)([e,n]):this.setUserAgent([n]):"string"==typeof n?this.loadUrl([n]):n&&n.uri&&this.loadUrl([n.uri])}},{key:"_checkUrlReachable",value:(r=l(c.mark(function e(t){return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e){try{new URL(t),e(!0)}catch(t){e(!1)}}));case 1:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)})},{key:"loadUrl",value:function(e){var t=Array.isArray(e)?e[0]:e;this._url=t,this._loadTimeout&&(clearTimeout(this._loadTimeout),this._loadTimeout=null),this.dom.innerHTML="";try{new URL(t)}catch(e){return void this._handleLoadError("URL 格式无效")}this._showLoading(),this._getOrCreateIframe().src=t}},{key:"_showLoading",value:function(){this.dom.innerHTML='\n <div style="display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #fff; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, sans-serif;">\n <div style="width: 60px; height: 60px; border: 4px solid rgba(255,255,255,0.1); border-top-color: #667eea; border-radius: 50%; animation: spin 1s linear infinite;"></div>\n <div style="margin-top: 20px; font-size: 16px; color: #888;">正在加载...</div>\n <style>\n @keyframes spin {\n to { transform: rotate(360deg); }\n }\n </style>\n </div>\n '}},{key:"reload",value:function(e){this._iframe&&(this._iframe.src=this._iframe.src)}},{key:"clearCache",value:function(e){}},{key:"getUrl",value:function(){var e;return Promise.resolve((null===(e=this._iframe)||void 0===e?void 0:e.src)||this._url)}},{key:"getOriginalUrl",value:function(){return Promise.resolve(this._url)}},{key:"setLayerType",value:function(e){}},{key:"setIgnoreCA",value:function(e){}},{key:"getBackForwardList",value:function(){return Promise.resolve([])}},{key:"getCurrentIndexWithBackForwardList",value:function(){return Promise.resolve(0)}},{key:"getScreenStatus",value:function(){return Promise.resolve(0)}},{key:"autoClickPosition",value:function(e){var t=s(Array.isArray(e)?e:[e,0],2);t[0],t[1]}},{key:"disableImageDisplay",value:function(){}},{key:"enableImageDisplay",value:function(){}},{key:"stopLoading",value:function(){if(this._iframe){var e=this._iframe.src;this._iframe.removeAttribute("src"),this._iframe.src=e}}},{key:"clearView",value:function(){this._iframe&&(this._iframe.src="about:blank")}},{key:"setListenEvents",value:function(e){}},{key:"setIgnoreAllKeyEvent",value:function(e){}},{key:"evaluateJavascript",value:function(e){var t=Array.isArray(e)?e[0]:e;if(this._iframe&&this._iframe.contentWindow)try{var n=this._iframe.contentWindow.eval(t);return Promise.resolve(n)}catch(e){return Promise.resolve(null)}return Promise.resolve(null)}},{key:"setSniffingEnabled",value:function(e){}},{key:"setSniffingRule",value:function(e){}},{key:"resetSniffingRule",value:function(){}},{key:"setInterceptEnabled",value:function(e){}},{key:"setInterceptRule",value:function(e){}},{key:"resetInterceptRule",value:function(){}},{key:"shouldOverrideUrlLoading",value:function(e){}},{key:"setUserAgent",value:function(e){var t=Array.isArray(e)?e[0]:e;this._userAgent=t}},{key:"canGoBack",value:function(){return Promise.resolve(!1)}},{key:"goBack",value:function(){if(this._iframe)try{this._iframe.contentWindow.history.back()}catch(e){}}},{key:"canGoForward",value:function(){return Promise.resolve(!1)}},{key:"goForward",value:function(){if(this._iframe)try{this._iframe.contentWindow.history.forward()}catch(e){}}},{key:"canGoBackOrForward",value:function(e){return Promise.resolve(!1)}},{key:"goBackOrForward",value:function(e){var t=Array.isArray(e)?e[0]:e;if(this._iframe)try{this._iframe.contentWindow.history.go(t)}catch(e){}}},{key:"onResume",value:function(){}},{key:"onPause",value:function(){}},{key:"pauseTimers",value:function(){}},{key:"resumeTimers",value:function(){}},{key:"destroy",value:function(){this._loadTimeout&&(clearTimeout(this._loadTimeout),this._loadTimeout=null),this._iframe&&(this._iframe.src="about:blank",this._iframe.remove(),this._iframe=null)}},{key:"setJavaScriptEnabled",value:function(e){}},{key:"setPluginState",value:function(e){}},{key:"setJavaScriptCanOpenWindowsAutomatically",value:function(e){}},{key:"setUseWideViewPort",value:function(e){}},{key:"setLoadWithOverviewMode",value:function(e){}},{key:"setSupportZoom",value:function(e){}},{key:"setBuiltInZoomControls",value:function(e){}},{key:"setDisplayZoomControls",value:function(e){}},{key:"setAllowFileAccess",value:function(e){}},{key:"setDomStorageEnabled",value:function(e){}},{key:"setDatabaseEnabled",value:function(e){}},{key:"setAppCacheEnabled",value:function(e){}},{key:"setAppCachePath",value:function(e){}},{key:"setMediaPlaybackRequiresUserGesture",value:function(e){}},{key:"initJavaScriptInterface",value:function(){}},{key:"removeJavaScriptInterface",value:function(){}},{key:"initWebViewFocus",value:function(e){}}]);var r}(ca);function ls(e,t,n){return t=Vn(t),Wn(e,cs()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function cs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cs=function(){return!!e})()}function hs(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}window.__HIPPY_COMPONENT_REGISTRY__=window.__HIPPY_COMPONENT_REGISTRY__||new Map;var ds=null,fs=function(e){function t(e,n,r){var i;return O(this,t),(i=ls(this,t,[e,n,r])).tagName="QrCodeComponent",i.dom=document.createElement("div"),i.dom.style.display="block",window.__HIPPY_COMPONENT_REGISTRY__.set(i.dom,i),i._content="",i}return Gn(t,e),R(t,[{key:"_render",value:(r=l(c.mark(function e(){var t,r,i=this;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this._content&&this.dom){e.next=1;break}return e.abrupt("return");case 1:if(ds){e.next=5;break}return e.prev=2,e.next=3,n.e(659).then(n.t.bind(n,9659,19)).then(function(e){return e.default||e});case 3:ds=e.sent,e.next=5;break;case 4:return e.prev=4,e.catch(2),e.abrupt("return");case 5:t=this.dom.getBoundingClientRect(),r=Math.max(t.width||200,t.height||200),ds.toDataURL(this._content,{width:r,margin:2,color:{dark:"#000000",light:"#FFFFFF"}},function(e,t){if(!e){i.dom.innerHTML="";var n=document.createElement("img");n.src=t,n.style.width="100%",n.style.height="100%",n.style.display="block",i.dom.appendChild(n)}});case 6:case"end":return e.stop()}},e,this,[[2,4]])})),function(){return r.apply(this,arguments)})},{key:"updateProperty",value:function(e,n){"content"===e?(this._content=n||"",this._render()):hs(t,"updateProperty",this,3)([e,n])}},{key:"init",value:function(e){hs(t,"init",this,3)([e]),this._content=e.content||"",this._render()}}]);var r}(ca);function ps(e,t,n){return t=Vn(t),Wn(e,vs()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function vs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vs=function(){return!!e})()}function ys(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}window.__HIPPY_COMPONENT_REGISTRY__=window.__HIPPY_COMPONENT_REGISTRY__||new Map;var ms=function(e){function t(e,n,r){var i;return O(this,t),(i=ps(this,t,[e,n,r])).tagName="TVProgressBarViewComponent",i.dom=document.createElement("div"),i.dom.style.display="block",i.dom.style.position="relative",i.dom.style.overflow="hidden",window.__HIPPY_COMPONENT_REGISTRY__.set(i.dom,i),i._maxProgress=100,i._progress=0,i._secondaryProgress=0,i._cornerRadius=0,i._backgroundColor="#CCCCCC",i._progressColor="#FF0000",i._bgEl=null,i._secondaryEl=null,i._progressEl=null,i._initDOM(),i}return Gn(t,e),R(t,[{key:"_initDOM",value:function(){this._bgEl=document.createElement("div"),this._bgEl.style.position="absolute",this._bgEl.style.top="0",this._bgEl.style.left="0",this._bgEl.style.width="100%",this._bgEl.style.height="100%",this._bgEl.style.boxSizing="border-box",this.dom.appendChild(this._bgEl),this._secondaryEl=document.createElement("div"),this._secondaryEl.style.position="absolute",this._secondaryEl.style.top="0",this._secondaryEl.style.left="0",this._secondaryEl.style.height="100%",this._secondaryEl.style.boxSizing="border-box",this.dom.appendChild(this._secondaryEl),this._progressEl=document.createElement("div"),this._progressEl.style.position="absolute",this._progressEl.style.top="0",this._progressEl.style.left="0",this._progressEl.style.height="100%",this._progressEl.style.boxSizing="border-box",this.dom.appendChild(this._progressEl)}},{key:"_updateStyles",value:function(){var e=this._cornerRadius+"px";this._bgEl.style.backgroundColor=this._backgroundColor,this._bgEl.style.borderRadius=e;var t=this._secondaryProgress/this._maxProgress*100+"%";this._secondaryEl.style.width=t,this._secondaryEl.style.backgroundColor=this._parseColor(this._progressColor,.3),this._secondaryEl.style.borderRadius=e;var n=this._progress/this._maxProgress*100+"%";this._progressEl.style.width=n,this._applyProgressColor(),this._progressEl.style.borderRadius=e}},{key:"_parseColor",value:function(e,t){if("string"==typeof e){if(e.startsWith("#")){var n=e.slice(1),r=parseInt(n.substr(0,2),16),i=parseInt(n.substr(2,2),16),o=parseInt(n.substr(4,2),16);return"rgba(".concat(r,", ").concat(i,", ").concat(o,", ").concat(t,")")}return e}return e}},{key:"_applyProgressColor",value:function(){var e=this._progressColor;if(e&&"object"==typeof e&&e.startColor&&e.endColor){var t=e.type||0,n=(e.shape,e.startColor),r=e.endColor;this._progressEl.style.background=0===t?"linear-gradient(to right, ".concat(n,", ").concat(r,")"):"radial-gradient(circle, ".concat(n,", ").concat(r,")")}else if("string"==typeof e)this._progressEl.style.backgroundColor=e;else if("number"==typeof e){var i=(e>>24&255)/255,o=e>>16&255,a=e>>8&255,s=255&e;this._progressEl.style.backgroundColor="rgba(".concat(o,", ").concat(a,", ").concat(s,", ").concat(i,")")}}},{key:"updateProperty",value:function(e,n){switch(e){case"maxProgress":case"max-progress":this._maxProgress=n||100,this._updateStyles();break;case"progress":this._progress=n||0,this._updateStyles();break;case"secondaryProgress":case"secondary-progress":this._secondaryProgress=n||0,this._updateStyles();break;case"cornerRadius":case"corner-radius":this._cornerRadius=n||0,this._updateStyles();break;case"backgroundColor":case"background-color":this._backgroundColor=n||"#CCCCCC",this._updateStyles();break;case"color":this._progressColor=n,this._updateStyles();break;default:ys(t,"updateProperty",this,3)([e,n])}}},{key:"setMaxProgress",value:function(e){this._maxProgress=e[0]||100,this._updateStyles()}},{key:"setProgress",value:function(e){this._progress=e[0]||0,this._updateStyles()}},{key:"setSecondaryProgress",value:function(e){this._secondaryProgress=e[0]||0,this._updateStyles()}},{key:"setProgressColor",value:function(e){this._progressColor=e[0],this._updateStyles()}},{key:"setProgressDefaultColor",value:function(e){this._backgroundColor=e[0],this._updateStyles()}},{key:"init",value:function(e){ys(t,"init",this,3)([e]),void 0!==e.maxProgress&&(this._maxProgress=e.maxProgress),void 0!==e.progress&&(this._progress=e.progress),void 0!==e.secondaryProgress&&(this._secondaryProgress=e.secondaryProgress),void 0!==e.cornerRadius&&(this._cornerRadius=e.cornerRadius),void 0!==e.backgroundColor&&(this._backgroundColor=e.backgroundColor),void 0!==e.color&&(this._progressColor=e.color),this._updateStyles()}}])}(ca);function gs(e,t,n){return t=Vn(t),Wn(e,_s()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function _s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_s=function(){return!!e})()}function bs(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}window.__HIPPY_COMPONENT_REGISTRY__=window.__HIPPY_COMPONENT_REGISTRY__||new Map;var ws=function(e){function t(e,n,r){var i;return O(this,t),(i=gs(this,t,[e,n,r])).tagName="TVSeekBarViewComponent",i.dom=document.createElement("div"),i.dom.style.display="block",i.dom.style.position="relative",i.dom.style.cursor="pointer",window.__HIPPY_COMPONENT_REGISTRY__.set(i.dom,i),i._progress=0,i._maxProgress=100,i._minProgress=0,i._progressHeight=10,i._progressRadius=5,i._progressColor="#FF0000",i._progressDefaultColor="#CCCCCC",i._seekBarMode=0,i._gravity=1,i._leftProgress=0,i._rightProgress=100,i._thumbWidth=30,i._thumbHeight=30,i._thumbColor="#FFFFFF",i._trackEl=null,i._progressEl=null,i._thumbEl=null,i._leftThumbEl=null,i._rightThumbEl=null,i._isDragging=!1,i._draggingThumb=null,i._initDOM(),i._bindEvents(),i}return Gn(t,e),R(t,[{key:"_initDOM",value:function(){this._trackEl=document.createElement("div"),this._trackEl.style.position="absolute",this._trackEl.style.left="0",this._trackEl.style.width="100%",this._trackEl.style.boxSizing="border-box",this._trackEl.style.pointerEvents="none",this.dom.appendChild(this._trackEl),this._progressEl=document.createElement("div"),this._progressEl.style.position="absolute",this._progressEl.style.left="0",this._progressEl.style.boxSizing="border-box",this._progressEl.style.pointerEvents="none",this.dom.appendChild(this._progressEl),this._thumbEl=document.createElement("div"),this._thumbEl.style.position="absolute",this._thumbEl.style.boxSizing="border-box",this._thumbEl.style.borderRadius="50%",this._thumbEl.style.display="none",this._thumbEl.style.zIndex="10",this._thumbEl.style.pointerEvents="none",this.dom.appendChild(this._thumbEl),this._leftThumbEl=document.createElement("div"),this._leftThumbEl.style.position="absolute",this._leftThumbEl.style.boxSizing="border-box",this._leftThumbEl.style.borderRadius="50%",this._leftThumbEl.style.display="none",this._leftThumbEl.style.zIndex="10",this._leftThumbEl.style.pointerEvents="none",this.dom.appendChild(this._leftThumbEl),this._rightThumbEl=document.createElement("div"),this._rightThumbEl.style.position="absolute",this._rightThumbEl.style.boxSizing="border-box",this._rightThumbEl.style.borderRadius="50%",this._rightThumbEl.style.display="none",this._rightThumbEl.style.zIndex="10",this._rightThumbEl.style.pointerEvents="none",this.dom.appendChild(this._rightThumbEl)}},{key:"_bindEvents",value:function(){var e=this,t=function(t){e._isDragging&&e._handlePointerEvent(t)},n=function(){e._isDragging=!1,e._draggingThumb=null,document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n)};this.dom.addEventListener("pointerdown",function(r){e._isDragging=!0,e._handlePointerEvent(r),document.addEventListener("pointermove",t),document.addEventListener("pointerup",n)})}},{key:"_handlePointerEvent",value:function(e){var t=this.dom.getBoundingClientRect(),n=e.clientX-t.left,r=Math.max(0,Math.min(1,n/t.width));if(1===this._seekBarMode){var i=this._leftProgress/this._maxProgress,o=this._rightProgress/this._maxProgress;if(!this._draggingThumb){var a=Math.abs(r-i),s=Math.abs(r-o);this._draggingThumb=a<s?"left":"right"}"left"===this._draggingThumb?this._leftProgress=Math.min(r*this._maxProgress,this._rightProgress-1):this._rightProgress=Math.max(r*this._maxProgress,this._leftProgress+1)}else this._progress=r*this._maxProgress;this._updateStyles(),this._dispatchChangeEvent()}},{key:"_dispatchChangeEvent",value:function(){var e=new CustomEvent("onSeekBarChange",{detail:{progress:this._progress,leftProgress:this._leftProgress,rightProgress:this._rightProgress,fromUser:!0}});this.dom.dispatchEvent(e)}},{key:"_updateStyles",value:function(){if(this._trackEl&&this._progressEl){var e,t=this._progressHeight,n=this._progressRadius+"px",r=this.dom.getBoundingClientRect().height||200;if(e=0===this._gravity?0:2===this._gravity?r-t:(r-t)/2,this._trackEl.style.top=e+"px",this._trackEl.style.height=t+"px",this._trackEl.style.borderRadius=n,this._trackEl.style.backgroundColor=this._progressDefaultColor,this._progressEl.style.top=e+"px",this._progressEl.style.height=t+"px",this._progressEl.style.borderRadius=n,this._progressEl.style.backgroundColor=this._progressColor,1===this._seekBarMode){var i=this._leftProgress/this._maxProgress*100,o=this._rightProgress/this._maxProgress*100;this._progressEl.style.left=i+"%",this._progressEl.style.width=o-i+"%",this._thumbEl.style.display="none",this._leftThumbEl.style.display="block",this._leftThumbEl.style.width=this._thumbWidth+"px",this._leftThumbEl.style.height=this._thumbHeight+"px",this._leftThumbEl.style.backgroundColor=this._thumbColor,this._leftThumbEl.style.left="calc(".concat(i,"% - ").concat(this._thumbWidth/2,"px)"),this._leftThumbEl.style.top=e+t/2-this._thumbHeight/2+"px",this._rightThumbEl.style.display="block",this._rightThumbEl.style.width=this._thumbWidth+"px",this._rightThumbEl.style.height=this._thumbHeight+"px",this._rightThumbEl.style.backgroundColor=this._thumbColor,this._rightThumbEl.style.left="calc(".concat(o,"% - ").concat(this._thumbWidth/2,"px)"),this._rightThumbEl.style.top=e+t/2-this._thumbHeight/2+"px"}else{var a=Math.min(100,this._progress/this._maxProgress*100);this._progressEl.style.left="0",this._progressEl.style.width=a+"%",this._thumbEl.style.display="block",this._thumbEl.style.width=this._thumbWidth+"px",this._thumbEl.style.height=this._thumbHeight+"px",this._thumbEl.style.backgroundColor=this._thumbColor,this._thumbEl.style.left="calc(".concat(a,"% - ").concat(this._thumbWidth/2,"px)"),this._thumbEl.style.top=e+t/2-this._thumbHeight/2+"px",this._leftThumbEl.style.display="none",this._rightThumbEl.style.display="none"}}}},{key:"updateProperty",value:function(e,n){switch(e){case"progress":this._progress=n||0,this._updateStyles();break;case"maxProgress":case"max-progress":this._maxProgress=n||100,this._updateStyles();break;case"progressHeight":case"progress-height":this._progressHeight=n||10,this._updateStyles();break;case"progressRadius":case"progress-radius":this._progressRadius=n||5,this._updateStyles();break;case"progressColor":case"progress-color":this._progressColor=n||"#FF0000",this._updateStyles();break;case"progressDefaultColor":case"progress-default-color":this._progressDefaultColor=n||"#CCCCCC",this._updateStyles();break;case"seekBarMode":case"seek-bar-mode":this._seekBarMode=n||0,this._updateStyles();break;case"gravity":this._gravity=n||1,this._updateStyles();break;case"thumbWidth":case"thumb-width":this._thumbWidth=n||30,this._updateStyles();break;case"thumbHeight":case"thumb-height":this._thumbHeight=n||30,this._updateStyles();break;default:bs(t,"updateProperty",this,3)([e,n])}}},{key:"setProgress",value:function(e){var t=e[0];this._progress=t||0,1===this._seekBarMode&&(this._rightProgress=this._progress),this._updateStyles()}},{key:"setMaxProgress",value:function(e){this._maxProgress=e[0]||100,this._updateStyles()}},{key:"setProgressHeight",value:function(e){this._progressHeight=e[0]||10,this._updateStyles()}},{key:"setProgressRadius",value:function(e){this._progressRadius=e[0]||5,this._updateStyles()}},{key:"setProgressColor",value:function(e){this._progressColor=e[0]||"#FF0000",this._updateStyles()}},{key:"setProgressDefaultColor",value:function(e){this._progressDefaultColor=e[0]||"#CCCCCC",this._updateStyles()}},{key:"setSeekBarMode",value:function(e){this._seekBarMode=e[0]||0,this._updateStyles()}},{key:"setGravity",value:function(e){this._gravity=e[0]||1,this._updateStyles()}},{key:"setRangeProgress",value:function(e){this._leftProgress=e[0]||0,this._rightProgress=e[1]||100,this._updateStyles()}},{key:"setRange",value:function(e){this._minProgress=e[0]||0,this._maxProgress=e[1]||100,this._updateStyles()}},{key:"resetSeekbar",value:function(){this._progress=0,this._leftProgress=0,this._rightProgress=this._maxProgress,this._updateStyles()}},{key:"init",value:function(e){var n=this;bs(t,"init",this,3)([e]),void 0!==e.progress&&(this._progress=e.progress),void 0!==e.maxProgress&&(this._maxProgress=e.maxProgress),void 0!==e.progressHeight&&(this._progressHeight=e.progressHeight),void 0!==e.progressRadius&&(this._progressRadius=e.progressRadius),void 0!==e.progressColor&&(this._progressColor=e.progressColor),void 0!==e.progressDefaultColor&&(this._progressDefaultColor=e.progressDefaultColor),void 0!==e.seekBarMode&&(this._seekBarMode=e.seekBarMode),void 0!==e.gravity&&(this._gravity=e.gravity),requestAnimationFrame(function(){return n._updateStyles()})}}])}(ca);function ks(e,t,n){return t=Vn(t),Wn(e,Es()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Es(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Es=function(){return!!e})()}var Ss=function(e){function t(e,n,r){var i;return O(this,t),(i=ks(this,t,[e,n,r])).tagName="ItemFrameComponent",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","QtItemFrame"),i.dom.style.display="block",i.dom.style.position="relative",i.dom.style.boxSizing="border-box",E(n,i),i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{display:"block",position:"relative",boxSizing:"border-box"}}},{key:"updateProperty",value:function(e,n){if("focusable"!==e){if("focusScale"===e||"focusscale"===e)return this._focusScale="number"==typeof n?n:parseFloat(n)||1.1,this.dom.setAttribute("data-focus-scale",String(this._focusScale)),void(this._focusListenerAdded||this._setupFocusAnimation());var r,i,o,a,s;if("itemShowShimmer"!==e&&"itemshowshimmer"!==e)if("hideShadow"!==e&&"hideshadow"!==e)if("shimmerSize"!==e&&"shimmersize"!==e)if("flexStyle"!==e&&"flexstyle"!==e)if("layout"!==e)"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n),(r=t,i="updateProperty",o=this,s=zn(Vn(1&(a=3)?r.prototype:r),i,o),2&a&&"function"==typeof s?function(e){return s.apply(o,e)}:s)([e,n]);else"string"==typeof n&&n.startsWith("${")?this.dom.setAttribute(e,n):this._applyLayout(n);else"object"==typeof n&&null!==n?this._applyFlexStyle(n):"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n);else this.dom.setAttribute("data-shimmer-size",String(n));else this.dom.setAttribute("data-hide-shadow",String(n));else this.dom.setAttribute("data-show-shimmer",String(n))}else!0===n||"true"===n?(this.dom.setAttribute("tabindex","0"),this.dom.setAttribute("focusable","true"),this._focusable=!0):(this.dom.removeAttribute("tabindex"),this.dom.setAttribute("focusable","false"),this._focusable=!1)}},{key:"_setupFocusAnimation",value:function(){var e=this;this._focusListenerAdded=!0,this.dom.addEventListener("focus",function(){e._focusScale&&1!==e._focusScale&&(e.dom.style.transform="scale(".concat(e._focusScale,")"),e.dom.style.transition="transform 0.2s ease-out",e.dom.style.zIndex="10")}),this.dom.addEventListener("blur",function(){e.dom.style.transform="scale(1)",e.dom.style.zIndex=""})}},{key:"flexStyle",get:function(){return this.props.flexStyle},set:function(e){this.props.flexStyle=e,this._applyFlexStyle(e)}},{key:"_applyFlexStyle",value:function(e){var t=this;e&&"object"==typeof e&&(e=(0,Ke.II)(e),Object.keys(e).forEach(function(n){var r=e[n];"number"==typeof r&&(["width","height","minWidth","minHeight","maxWidth","maxHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","top","left","right","bottom","borderRadius","borderWidth","fontSize","lineHeight","letterSpacing","gap","rowGap","columnGap"].includes(n)&&(r+="px"));try{"x"!==n&&"y"!==n&&(t.dom.style[n]=r)}catch(e){try{if("x"!==n&&"y"!==n){var i=n.replace(/([A-Z])/g,"-$1").toLowerCase();t.dom.style.setProperty(i,r)}}catch(e){}}}))}},{key:"_applyLayout",value:function(e){if(e){if(Array.isArray(e)){var t=e[0],n=e[1],r=e[2],i=e[3];return null!=t&&(this.dom.style.left="number"==typeof t?"".concat(t,"px"):t),null!=n&&(this.dom.style.top="number"==typeof n?"".concat(n,"px"):n),null!=r&&(this.dom.style.width="number"==typeof r?"".concat(r,"px"):r),null!=i&&(this.dom.style.height="number"==typeof i?"".concat(i,"px"):i),void 0===t&&void 0===n||this.dom.style.position||(this.dom.style.position="absolute"),void(void 0===t&&void 0===n||"relative"!==this.dom.style.position||(this.dom.style.position="absolute"))}if("object"==typeof e){var o=e.x,a=e.y,s=e.width,u=e.height;null!=o&&(this.dom.style.left="number"==typeof o?"".concat(o,"px"):o),null!=a&&(this.dom.style.top="number"==typeof a?"".concat(a,"px"):a),null!=s&&(this.dom.style.width="number"==typeof s?"".concat(s,"px"):s),null!=u&&(this.dom.style.height="number"==typeof u?"".concat(u,"px"):u),void 0===o&&void 0===a||this.dom.style.position||(this.dom.style.position="absolute"),void 0===o&&void 0===a||"relative"!==this.dom.style.position||(this.dom.style.position="absolute")}}}}])}(ca);function As(e,t,n){return t=Vn(t),Wn(e,xs()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function xs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xs=function(){return!!e})()}function Cs(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Ts=function(e){function t(e,n,r){var i;return O(this,t),(i=As(this,t,[e,n,r])).tagName="ItemStoreView",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","QtItemStoreView"),i.dom.style.display="none",i.dom.style.position="relative",i.dom.style.boxSizing="border-box",i._templateChildren=[],E(n,i),i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{display:"none",position:"relative",boxSizing:"border-box"}}},{key:"getTemplateChildren",value:function(){return this._templateChildren}},{key:"addTemplateChild",value:function(e){if(e&&e.dom&&!this._templateChildren.some(function(t){return t.dom===e.dom})){var t=null;if(e.props&&void 0!==e.props.type)t=e.props.type;else if(e.dom.hasAttribute("type")){var n=e.dom.getAttribute("type");t=null!==n?isNaN(Number(n))?n:Number(n):null}if(this._templateChildren.push({dom:e.dom,tagName:e.tagName,component:e,type:t}),null!=t)((r=window).__QT_SHARED_TEMPLATES__||(r.__QT_SHARED_TEMPLATES__=new Map),r.__QT_SHARED_TEMPLATES__).set(t,{dom:e.dom,tagName:e.tagName,component:e,type:t});e.dom.setAttribute("data-template","true"),e.dom.setAttribute("data-shared-template","true"),e.dom.style.display="none"}var r}},{key:"beforeChildMount",value:(n=l(c.mark(function e(n,r){return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n&&n.dom&&this.addTemplateChild(n),e.next=1,Cs(t,"beforeChildMount",this,3)([n,r]);case 1:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"updateProperty",value:function(e,n){"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n),Cs(t,"updateProperty",this,3)([e,n])}}]);var n}(ca);function Is(e,t,n){return t=Vn(t),Wn(e,Os()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Os(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Os=function(){return!!e})()}function Ls(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Ps=function(e){function t(e,n,r){var i;return O(this,t),(i=Is(this,t,[e,n,r])).tagName="RippleViewComponent",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","QtRippleView"),i.dom.style.cssText="\n display: block;\n position: relative;\n box-sizing: border-box;\n overflow: hidden;\n ",i._isShowRipple=!1,i._rippleVisible="visible",i._color="#FF4E46",i._animationFrame=null,E(n,i),i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{display:"block",position:"relative",boxSizing:"border-box",overflow:"hidden"}}},{key:"updateProperty",value:function(e,n){var r=this;switch(e){case"isShowRipple":case"isshowripple":this._isShowRipple=!0===n||"true"===n,this._updateRippleAnimation();break;case"rippleVisible":case"ripplevisible":this._rippleVisible=n||"visible",this.dom.style.visibility=this._rippleVisible;break;case"color":this._color=n||"#FF4E46",this._updateRippleColor();break;case"delayLoad":case"delayload":n>0?setTimeout(function(){r._startRippleAnimation()},n):this._startRippleAnimation();break;default:Ls(t,"updateProperty",this,3)([e,n])}}},{key:"_updateRippleAnimation",value:function(){this._isShowRipple?this._startRippleAnimation():this._stopRippleAnimation()}},{key:"_updateRippleColor",value:function(){var e=this;this.dom.querySelectorAll(".ripple-circle").forEach(function(t){t.style.backgroundColor=e._color})}},{key:"_startRippleAnimation",value:function(){var e=this;if(this._isShowRipple){this._clearRipples();for(var t=this.dom.getBoundingClientRect(),n=Math.max(t.width,t.height),r=t.width/2,i=t.height/2,o=function(t){setTimeout(function(){e._isShowRipple&&e._createRippleCircle(r,i,n,t)},300*t)},a=0;a<3;a++)o(a)}}},{key:"_createRippleCircle",value:function(e,t,n,r){var i=this,o=document.createElement("div");o.className="ripple-circle",o.style.cssText="\n position: absolute;\n left: ".concat(e,"px;\n top: ").concat(t,"px;\n width: 0;\n height: 0;\n border-radius: 50%;\n background-color: ").concat(this._color,";\n opacity: 0.6;\n transform: translate(-50%, -50%);\n pointer-events: none;\n "),this.dom.appendChild(o);var a=0,s=1.5*n,u=1500+200*r,l=function(){if(i._isShowRipple)if((a+=s/u*16)<s){var e=.6*(1-a/s);o.style.width="".concat(a,"px"),o.style.height="".concat(a,"px"),o.style.opacity=e.toString(),i._animationFrame=requestAnimationFrame(l)}else o.style.width="0",o.style.height="0",o.style.opacity="0.6",a=0,i._animationFrame=requestAnimationFrame(l);else o.remove()};l()}},{key:"_stopRippleAnimation",value:function(){this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=null),this._clearRipples()}},{key:"_clearRipples",value:function(){this.dom.querySelectorAll(".ripple-circle").forEach(function(e){return e.remove()})}},{key:"destroy",value:function(){this._stopRippleAnimation(),Ls(t,"destroy",this,3)([])}}])}(ca);function Rs(e,t,n){return t=Vn(t),Wn(e,Ns()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Ns(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ns=function(){return!!e})()}function Ds(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Ms=function(e){function t(e,n,r){var i;return O(this,t),(i=Rs(this,t,[e,n,r])).tagName="FastItemView",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","QtItemView"),i.dom.style.cssText="\n display: block;\n position: relative;\n box-sizing: border-box;\n ",i.props={},E(n,i),i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{display:"block",position:"relative",boxSizing:"border-box"}}},{key:"insertChild",value:function(e,t){e&&e.dom&&!this.dom.contains(e.dom)&&this.dom.appendChild(e.dom)}},{key:"beforeChildMount",value:(n=l(c.mark(function e(n,r){return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n&&n.dom&&!this.dom.contains(n.dom)&&this.dom.appendChild(n.dom),e.next=1,Ds(t,"beforeChildMount",this,3)([n,r]);case 1:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"updateProperty",value:function(e,n){switch(e){case"singleton":this.props=this.props||{},this.props.singleton=!0,this.dom.setAttribute("singleton","true");break;case"type":this.props=this.props||{},this.props.type=n,this.dom.setAttribute("type",n);break;case"flexStyle":case"flexstyle":"object"==typeof n&&null!==n&&this._applyFlexStyle(n);break;default:Ds(t,"updateProperty",this,3)([e,n])}}},{key:"_applyFlexStyle",value:function(e){var t=this;e&&"object"==typeof e&&(e=(0,Ke.II)(e),Object.keys(e).forEach(function(n){var r=e[n];"number"==typeof r&&(["width","height","minWidth","minHeight","maxWidth","maxHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","top","left","right","bottom","borderRadius","borderWidth","fontSize","lineHeight","letterSpacing","gap","rowGap","columnGap"].includes(n)&&(r+="px"));try{t.dom.style[n]=r}catch(e){try{var i=n.replace(/([A-Z])/g,"-$1").toLowerCase();t.dom.style.setProperty(i,r)}catch(e){}}}))}}]);var n}(ca);function Fs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Bs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fs(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function js(e,t,n){return t=Vn(t),Wn(e,Us()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Us(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Us=function(){return!!e})()}var Ws=function(e){function t(e,n,r){var i;return O(this,t),(i=js(this,t,[e,n,r])).tagName="TabsView",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","TabsView"),E(n,i),i._instanceId=++t._instanceCount,i._tabData=null,i._currentPageIndex=0,i._pages=new Map,i._tabItems=[],i._loadedPageIndices=new Set,i._lastPageChangedIndex=-1,i._initialFocusToken=0,i._childrenByName=new Map,i._childrenContainer=i.dom,i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{boxSizing:"border-box",display:"flex",flexDirection:"column",width:"100%",height:"100%",position:"relative"}}},{key:"insertChild",value:function(e,t){if(e&&e.dom){var n,r=(null===(n=e.props)||void 0===n?void 0:n.name)||e.dom.getAttribute("name");r&&(this._childrenByName.set(r,e),"tabList"===r&&this._setupTabListListeners(e)),this._childrenContainer.appendChild(e.dom)}}},{key:"_setupTabListListeners",value:function(e){var t=this;if(e){var n=e.dispatchEvent.bind(e);e.dispatchEvent=function(e,r){if(n(e,r),("onItemFocused"===e||"onItemfocused"===e)&&r&&!0===r.hasFocus){var i=r.position;void 0!==i&&i!==t._currentPageIndex&&(t._currentPageIndex=i,t._focusIndex=i,t._syncTabSelectionState(i),t._syncContentCurrentPage(i),t._dispatchPageChanged(i),t._dispatchLoadPageData(i,!1))}if("onItemClick"===e){var o=null==r?void 0:r.position;void 0!==o&&o!==t._currentPageIndex&&(t._currentPageIndex=o,t._focusIndex=o,t._syncTabSelectionState(o),t._syncContentCurrentPage(o),t._dispatchPageChanged(o),t._dispatchLoadPageData(o,!1))}},this._boundHandleTabFocusIn=this._handleTabFocusIn.bind(this),e.dom.addEventListener("focusin",this._boundHandleTabFocusIn)}}},{key:"_handleTabFocusIn",value:function(e){var t=this.getChildByName("tabList");if(t){var n=t._itemContainer;if(n||(n=t.dom.querySelector(".flex-view-item-container")),n){for(var r=n.children,i=-1,o=0;o<r.length;o++)if(r[o]===e.target||r[o].contains(e.target)){i=o;break}-1!==i&&i!==this._currentPageIndex&&(this._currentPageIndex=i,this._focusIndex=i,this._syncTabSelectionState(i),this._syncContentCurrentPage(i),this._dispatchPageChanged(i),this._dispatchLoadPageData(i,!1))}}}},{key:"_syncContentCurrentPage",value:function(e){var t=this.getChildByName("content");t&&"function"==typeof t.setCurrentPage&&t.setCurrentPage(e)}},{key:"_getTabItemContainer",value:function(){var e=this.getChildByName("tabList");return e&&e.dom?e._itemContainer||e.dom.querySelector(".flex-view-item-container"):null}},{key:"_syncTabSelectionState",value:function(e){var t=this.getChildByName("tabList"),n=this._getTabItemContainer();if(!t||!n)return null;"function"==typeof t.setSelectChildPosition&&t.setSelectChildPosition(e,!1);var r=n.children;if(!r||e<0||e>=r.length)return null;Array.from(n.querySelectorAll('[autofocus="true"], [autofocus]')).forEach(function(e){e.removeAttribute("autofocus")});var i=r[e],o=i.querySelector('[focusable="true"], [focusable="1"], [focusable]')||i;return o.setAttribute("autofocus","true"),o}},{key:"removeChild",value:function(e){if(e&&e.dom){var t,n=(null===(t=e.props)||void 0===t?void 0:t.name)||e.dom.getAttribute("name");n&&this._childrenByName.delete(n),e.dom.parentNode===this._childrenContainer&&this._childrenContainer.removeChild(e.dom)}}},{key:"getChildByName",value:function(e){return this._childrenByName.get(e)}},{key:"updateProperty",value:function(e,n){switch(e){case"offscreenPageLimit":this._offscreenPageLimit=n;break;case"dataStrategy":this._dataStrategy=n;break;case"hideOnSingleTab":this._hideOnSingleTab=n,this._applyHideOnSingleTab();break;case"pageSwitchDelay":this._pageSwitchDelay=n;break;case"suspension":this._suspension=n;break;case"useSuspensionBg":this._useSuspensionBg=n;break;default:(r=t,i="updateProperty",o=this,s=zn(Vn(1&(a=3)?r.prototype:r),i,o),2&a&&"function"==typeof s?function(e){return s.apply(o,e)}:s)([e,n])}var r,i,o,a,s}},{key:"_applyHideOnSingleTab",value:function(){var e=this.getChildByName("tabList");if(e&&e.dom){var t=!0===this._hideOnSingleTab&&1===this._tabItems.length;e.dom.style.display=t?"none":""}}},{key:"setTabsData",value:function(){for(var e,t,n,r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=(o=Array.isArray(o[0])&&1===o.length?o[0]:o)[0]||{},u=o[1]||[];this._tabData=Bs(Bs({},s),{},{data:u}),this._tabItems=Array.isArray(u)?u:[],this._currentPageIndex=null!==(e=s.defaultIndex)&&void 0!==e?e:0;var l=null!==(t=null!==(n=s.defaultFocusIndex)&&void 0!==n?n:s.focusIndex)&&void 0!==t?t:this._currentPageIndex;this._focusIndex=Number.isFinite(l)&&l>=0?l:this._currentPageIndex;var c=this.getChildByName("tabList");c&&c.setListData&&c.setListData(u),this._applyHideOnSingleTab(),requestAnimationFrame(function(){var e=r.getChildByName("content");e&&"function"==typeof e.setCurrentPage&&e.setCurrentPage(r._currentPageIndex),r._dispatchPageChanged(r._currentPageIndex),r._dispatchLoadPageData(r._currentPageIndex,!1);var t=++r._initialFocusToken;setTimeout(function(){t===r._initialFocusToken&&r._setInitialTabFocus()},100)})}},{key:"_setInitialTabFocus",value:function(){var e=this.getChildByName("tabList");if(e&&e.dom){var t=this._focusIndex,r=this._getTabItemContainer();if(r){var i=r.children;if(i.length>0&&t>=0&&t<i.length){var o=this._syncTabSelectionState(t);return o.setAttribute("autofocus","true"),e.setSelectChildPosition&&e.setSelectChildPosition(t,!1),void(n.g.__TV_FOCUS_MANAGER__&&(n.g.__TV_FOCUS_MANAGER__.updateFocusableElements(),n.g.__TV_FOCUS_MANAGER__._doFocusElement(o)))}}var a=e.dom.querySelectorAll('[focusable="true"], [focusable="1"], [focusable]'),s=Array.from(a).filter(function(e){return"true"!==e.getAttribute("data-template")&&"none"!==e.style.display&&!e.closest('[data-template="true"]')});if(s.length>0&&t>=0&&t<s.length){var u=s[t];u.setAttribute("autofocus","true"),n.g.__TV_FOCUS_MANAGER__&&(n.g.__TV_FOCUS_MANAGER__.updateFocusableElements(),n.g.__TV_FOCUS_MANAGER__._doFocusElement(u))}}}},{key:"setPageData",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(t=Array.isArray(t[0])&&1===t.length?t[0]:t)[0],i=t[1]||{},o=t[2]||[],a=Bs(Bs({},i),{},{data:o});this._pages.set(r,a);var s=this.getChildByName("content");s&&s.setListData&&s.setListData(r,i,o)}},{key:"addPageData",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=(n=Array.isArray(n[0])&&1===n.length?n[0]:n)[0],o=n[1]||{},a=n[2]||[],s=null!==(e=o.deleteCount)&&void 0!==e?e:0,u=this._pages.get(i)||{data:[]},l=Array.isArray(u.data)?u.data:[];s>0&&l.splice(0,s),Array.isArray(a)?u.data=l.concat(a):u.data=l,this._pages.set(i,u);var c=this.getChildByName("content");c&&c.addListData&&c.addListData(i,o,a)}},{key:"updatePageData",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(t=Array.isArray(t[0])&&1===t.length?t[0]:t)[0],i=t[1]||[],o=t[2]||{};this.setPageData(r,o,i)}},{key:"_updatePageContent",value:function(e,t){}},{key:"setCurrentPage",value:function(e){if(Array.isArray(e)&&(e=e[0]),!(e<0||e>=this._tabItems.length)){this._currentPageIndex;this._currentPageIndex=e,this._focusIndex=e,this._initialFocusToken+=1,this._syncTabSelectionState(e);var t=this.getChildByName("content");t&&"function"==typeof t.setCurrentPage&&t.setCurrentPage(e),this._dispatchPageChanged(e),this._dispatchLoadPageData(e,!1)}}},{key:"getCurrentPage",value:function(){return Promise.resolve(this._currentPageIndex)}},{key:"requestTabFocus",value:function(e){Array.isArray(e)&&(e=e[0]),this._focusIndex=e,this.setCurrentPage(e);var t=this._syncTabSelectionState(e);t&&n.g.__TV_FOCUS_MANAGER__&&(n.g.__TV_FOCUS_MANAGER__.updateFocusableElements(),n.g.__TV_FOCUS_MANAGER__._doFocusElement(t))}},{key:"focusBackToTop",value:function(){}},{key:"requestNodeFocus",value:function(e){}},{key:"reloadAll",value:function(){this._dispatchLoadPageData(this._currentPageIndex,!1,!0)}},{key:"reloadPage",value:function(e){this._dispatchLoadPageData(e,!1,!0)}},{key:"invokeContentFunction",value:function(e,t,n){}},{key:"invokeContentFunctionDirect",value:function(e,t){}},{key:"contentScrollToFocus",value:function(e){}},{key:"updateChildNode",value:function(e,t,n,r){}},{key:"updateRootNode",value:function(e,t,n){}},{key:"updateItemMatched",value:function(e,t,n){}},{key:"blockRootFocus",value:function(){}},{key:"unBlockRootFocus",value:function(){}},{key:"translationLeft",value:function(){this._currentPageIndex>0&&this.setCurrentPage(this._currentPageIndex-1)}},{key:"translationRight",value:function(){this._currentPageIndex<this._tabItems.length-1&&this.setCurrentPage(this._currentPageIndex+1)}},{key:"destroy",value:function(){this._pages.clear(),this._tabItems=[],this._childrenByName.clear()}},{key:"cancelAll",value:function(){}},{key:"getRootNodeViewState",value:function(e,t,n){n&&n({viewState:{}})}},{key:"getChildNodeViewState",value:function(e,t,n,r,i){i&&i({viewState:{}})}},{key:"dispatchUIFunctionOnChildNode",value:function(e,t,n,r,i){}},{key:"_dispatchPageChanged",value:function(e){if(!(e<0||e>=this._tabItems.length)&&this._lastPageChangedIndex!==e){this._lastPageChangedIndex=e;var t={pageIndex:e,data:this._tabItems[e]||null};this.dispatchEvent("onPageChanged",t)}}},{key:"_dispatchLoadPageData",value:function(e,t){if(arguments.length>2&&void 0!==arguments[2]&&arguments[2]||!this._loadedPageIndices.has(e)){var n={pageIndex:e,itemCount:0,data:this._tabItems[e]||null,useDiff:!!t};this._loadedPageIndices.add(e),this.dispatchEvent("onLoadPageData",n)}}}])}(ca);function Vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vs(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Hs(e,t,n){return t=Vn(t),Wn(e,Gs()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Gs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gs=function(){return!!e})()}(0,p.A)(Ws,"_instanceCount",0);var Ys=function(e){function t(e,n,r){var i;return O(this,t),(i=Hs(this,t,[e,n,r])).tagName="RecyclerViewPager",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","RecyclerViewPager"),E(n,i),i._pages=new Map,i._currentIndex=0,i._direction="horizontal",i._contentView=null,i._childrenContainer=i.dom,i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{boxSizing:"border-box",display:"block",width:"100%",flex:"1",overflow:"hidden",position:"relative"}}},{key:"insertChild",value:function(e,t){e&&e.dom&&(this._contentView||(this._contentView=e,this._applyCurrentPageData()),this._childrenContainer.appendChild(e.dom))}},{key:"removeChild",value:function(e){e&&e.dom&&e.dom.parentNode===this._childrenContainer&&this._childrenContainer.removeChild(e.dom)}},{key:"updateProperty",value:function(e,n){switch(e){case"direction":this._direction=n||"horizontal";break;case"loadingItemType":this._loadingItemType=n;break;case"enableTransform":this._enableTransform=n;break;case"slidingEnable":this._slidingEnable=n;break;case"slidingMode":this._slidingMode=n;break;case"initTranslation":this._initTranslation=n;break;case"duration":this._duration=n;break;default:(r=t,i="updateProperty",o=this,s=zn(Vn(1&(a=3)?r.prototype:r),i,o),2&a&&"function"==typeof s?function(e){return s.apply(o,e)}:s)([e,n])}var r,i,o,a,s}},{key:"setCurrentPage",value:function(e){if(Array.isArray(e)&&1===e.length&&(e=e[0]),!(e<0)){this._currentIndex;this._currentIndex=e,this._applyCurrentPageData()}}},{key:"_applyCurrentPageData",value:function(){var e,t,r=this;if(this._contentView){var i=this._pages.get(this._currentIndex),o=i&&Array.isArray(i.data)?i.data:[],a=null===(e=this._contentView.dom)||void 0===e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"list");if(a&&a.includes("${")){var s=a.match(/^\$\{([^}]+)\}$/);if(s){var u=s[1],l={[u]:o};return void Promise.resolve().then(n.bind(n,814)).then(function(e){(0,e.bindTemplateDataToNode)(r._contentView.dom,l,{onListData:function(e,t){e._qtListData=t,r._contentView&&"function"==typeof r._contentView.setListData&&r._contentView.setListData(t)}})})}}"function"!=typeof this._contentView.setListData?"function"==typeof this._contentView.updateProperty&&this._contentView.updateProperty("listData",o):this._contentView.setListData(o)}}},{key:"setListData",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(t=Array.isArray(t[0])&&1===t.length?t[0]:t)[0],i=t[1]||{},o=t[2]||[];this._pages.set(r,zs(zs({},i),{},{data:o})),r===this._currentIndex&&this._applyCurrentPageData()}},{key:"addListData",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=(n=Array.isArray(n[0])&&1===n.length?n[0]:n)[0],o=n[1]||{},a=n[2]||[],s=null!==(e=o.deleteCount)&&void 0!==e?e:0,u=this._pages.get(i)||{data:[]},l=Array.isArray(u.data)?u.data:[];s>0&&l.splice(0,s),Array.isArray(a)?u.data=l.concat(a):u.data=l,this._pages.set(i,u),i===this._currentIndex&&this._applyCurrentPageData()}},{key:"setPageData",value:function(e,t){var n;this.setListData(e,{},null!==(n=null==t?void 0:t.data)&&void 0!==n?n:t)}},{key:"addPageData",value:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.addListData(e,{deleteCount:r},null!==(n=null==t?void 0:t.data)&&void 0!==n?n:t)}},{key:"updatePageData",value:function(e,t){this.setPageData(e,t)}},{key:"insertPageData",value:function(e,t,n){}},{key:"updateChildNode",value:function(e,t,n,r){}},{key:"updateRootNode",value:function(e,t,n){}},{key:"deleteItemRange",value:function(e,t){}},{key:"destroy",value:function(){this._pages.clear(),this._contentView=null}}])}(ca);function qs(e,t,n){return t=Vn(t),Wn(e,Xs()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Xs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Xs=function(){return!!e})()}function Zs(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Ks=function(e){function t(e,n,r){var i;return O(this,t),(i=qs(this,t,[e,n,r])).tagName="Modal",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","Modal"),i.dom.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 9999;\n ",E(n,i),i._visible=!0,i._transparent=!0,i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{position:"fixed",top:0,left:0,width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999}}},{key:"updateProperty",value:function(e,n){switch(e){case"transparent":this._transparent=n,this.dom.style.backgroundColor=n?"transparent":"rgba(0, 0, 0, 0.5)";break;case"immersionStatusBar":this._immersionStatusBar=n;break;case"visible":case"visibility":this._setVisible(n);break;default:Zs(t,"updateProperty",this,3)([e,n])}}},{key:"_setVisible",value:function(e){this._visible=e,e?(this.dom.style.display="flex",this.dispatchEvent("show",{})):this.dom.style.display="none"}},{key:"mounted",value:function(){var e,n=this;null===(e=Zs(t,"mounted",this,3))||void 0===e||e([]),!1!==this._visible&&requestAnimationFrame(function(){n.dispatchEvent("show",{})})}},{key:"_handleClickOutside",value:function(e){e.target===this.dom&&this.dispatchEvent("requestclose",{})}},{key:"show",value:function(){this._setVisible(!0)}},{key:"hide",value:function(){this._setVisible(!1)}},{key:"close",value:function(){this.dispatchEvent("requestclose",{})}}])}(ca);function $s(e,t,n){return t=Vn(t),Wn(e,Js()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Js(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Js=function(){return!!e})()}function Qs(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var eu=function(e){function t(e,n,r){var i;return O(this,t),(i=$s(this,t,[e,n,r])).tagName="ListView",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","ListView"),i.dom.__listViewInstance=i,E(n,i),i._horizontal=!1,i._horizontalExplicitlySet=!1,i._fadingEdgeLength=0,i._horizontalFadingEdgeEnabled=!1,i._verticalFadingEdgeEnabled=!1,i._clipChildren=!0,i._scrollEnabled=!0,i._listenBoundEvent=!1,i._selectedPosition=-1,i._styleFlexDirection="",i._children=[],i._startGradient=null,i._endGradient=null,i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{display:"flex",flexDirection:this._horizontal?"row":"column",flexShrink:0,boxSizing:"border-box",overflow:"hidden",position:"relative"}}},{key:"mounted",value:function(){var e=this;Qs(t,"mounted",this,3)([]),this._refreshRuntimeStyles(),requestAnimationFrame(function(){return e._refreshRuntimeStyles()})}},{key:"updateProperty",value:function(e,n){switch(e){case"horizontal":this._horizontalExplicitlySet=!0,this._horizontal=!0===n||"true"===n||1===n||"1"===n||""===n,this._reconcileLayoutDirection();break;case"flexDirection":this._styleFlexDirection=n||"",Qs(t,"updateProperty",this,3)([e,n]),this._reconcileLayoutDirection();break;case"fadingEdgeLength":this._fadingEdgeLength=n||0,this._updateFadingEdge();break;case"horizontalFadingEdgeEnabled":this._horizontalFadingEdgeEnabled=!!n,this._updateFadingEdge();break;case"verticalFadingEdgeEnabled":this._verticalFadingEdgeEnabled=!!n,this._updateFadingEdge();break;case"clipChildren":this._clipChildren=!1!==n,this._updateClipChildren();break;case"scrollEnabled":case"onScrollEnable":this._scrollEnabled=!1!==n,this._updateScrollEnabled();break;case"listenBoundEvent":this._listenBoundEvent=!0===n||"true"===n||1===n||"1"===n;break;default:"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n),Qs(t,"updateProperty",this,3)([e,n])}}},{key:"_updateLayoutDirection",value:function(){this._reconcileLayoutDirection(),this._updateFadingEdge()}},{key:"_reconcileLayoutDirection",value:function(){this.dom&&(this._styleFlexDirection?this.dom.style.flexDirection=this._styleFlexDirection:this._horizontalExplicitlySet&&(this.dom.style.flexDirection=this._horizontal?"row":"column"))}},{key:"_refreshRuntimeStyles",value:function(){this.dom&&(this._reconcileLayoutDirection(),this._updateFadingEdge(),this._updateClipChildren(),this._updateScrollEnabled())}},{key:"_updateClipChildren",value:function(){this.dom&&(this.dom.style.overflow=this._clipChildren?"hidden":"visible")}},{key:"_updateScrollEnabled",value:function(){this.dom&&(this.dom.style.overflow=this._scrollEnabled?"auto":"hidden")}},{key:"_updateFadingEdge",value:function(){if(this.dom&&(this._startGradient&&(this._startGradient.remove(),this._startGradient=null),this._endGradient&&(this._endGradient.remove(),this._endGradient=null),(this._horizontal?this._horizontalFadingEdgeEnabled:this._verticalFadingEdgeEnabled)&&!(this._fadingEdgeLength<=0))){var e=this._fadingEdgeLength;this._horizontal?(this._startGradient=document.createElement("div"),this._startGradient.style.cssText="\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: ".concat(e,"px;\n background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);\n pointer-events: none;\n z-index: 10;\n "),this.dom.appendChild(this._startGradient),this._endGradient=document.createElement("div"),this._endGradient.style.cssText="\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: ".concat(e,"px;\n background: linear-gradient(to left, rgba(0,0,0,0.3), transparent);\n pointer-events: none;\n z-index: 10;\n "),this.dom.appendChild(this._endGradient)):(this._startGradient=document.createElement("div"),this._startGradient.style.cssText="\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n height: ".concat(e,"px;\n background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);\n pointer-events: none;\n z-index: 10;\n "),this.dom.appendChild(this._startGradient),this._endGradient=document.createElement("div"),this._endGradient.style.cssText="\n position: absolute;\n left: 0;\n bottom: 0;\n right: 0;\n height: ".concat(e,"px;\n background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);\n pointer-events: none;\n z-index: 10;\n "),this.dom.appendChild(this._endGradient))}}},{key:"insertChild",value:function(e,t){if(e&&e.dom){var n="number"==typeof t&&t>=0&&t<this._children.length?this._children[t]:null;n&&n.dom&&n.dom.parentNode===this.dom?(this.dom.insertBefore(e.dom,n.dom),this._children.splice(t,0,e)):this._endGradient?(this.dom.insertBefore(e.dom,this._endGradient),this._children.push(e)):this._startGradient?(this.dom.insertBefore(e.dom,this._startGradient),this._children.push(e)):(this.dom.appendChild(e.dom),this._children.push(e)),this._syncChildPositions(),this._emitBoundEvent("bindItem",e)}}},{key:"removeChild",value:function(e){if(e&&e.dom&&e.dom.parentNode===this.dom){this._emitBoundEvent("unbindItem",e),this.dom.removeChild(e.dom);var t=this._children.indexOf(e);t>-1&&this._children.splice(t,1),this._syncChildPositions()}}},{key:"scrollToIndex",value:function(){var e=0,t=!0,n=0;arguments.length>=2&&"number"==typeof(arguments.length<=1?void 0:arguments[1])?(e=arguments.length<=1?void 0:arguments[1],t=!1!==(arguments.length<=2?void 0:arguments[2]),n=Number((arguments.length<=4?void 0:arguments[4])||0)):(e=Number((arguments.length<=0?void 0:arguments[0])||0),t=!1!==(arguments.length<=1?void 0:arguments[1]),n=Number((arguments.length<=2?void 0:arguments[2])||0));var r=this._children[e];if(r&&r.dom){var i=this._horizontal?r.dom.offsetLeft:r.dom.offsetTop;this.scrollToPosition(i,n,t)}}},{key:"scrollToPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this._horizontal?this.dom.scrollTo({left:e+t,behavior:n?"smooth":"auto"}):this.dom.scrollTo({top:e+t,behavior:n?"smooth":"auto"})}},{key:"requestFocus",value:function(e){return this.requestChildFocus(e)}},{key:"requestChildFocus",value:function(e){Array.isArray(e)&&(e=e[0]);var t=this._children[e];if(t&&t.dom){var r=this._findFocusableTarget(t.dom);if(r){this.scrollToIndex(e,!0);var i=n.g.__TV_FOCUS_MANAGER__;i&&"function"==typeof i._doFocusElement?i._doFocusElement(r):"function"==typeof r.focus&&r.focus()}}}},{key:"setSelectChildPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Array.isArray(e)&&(t=!0===e[1],e=e[0]);var n=Number(e);if(Number.isFinite(n)){this._clearSelectedState(),this._selectedPosition=n;var r=this._children[n];r&&r.dom&&(this._applySelectedState(r.dom),this.dispatchEvent("childSelect",{position:n,index:n,child:{index:n}})),t&&this.requestChildFocus(n)}}},{key:"_syncChildPositions",value:function(){this._children.forEach(function(e,t){e&&e.dom&&(e.dom.setAttribute("data-position",String(t)),e.dom.setAttribute("data-index",String(t)))})}},{key:"_emitBoundEvent",value:function(e,t){var n=this;if(this._listenBoundEvent&&t&&t.dom){var r=function(){var r=n._children.indexOf(t);r<0||n.dispatchEvent(e,{position:r,index:r})};"bindItem"!==e?r():requestAnimationFrame(r)}}},{key:"_findFocusableTarget",value:function(e){if(!e)return null;var t,n,r;return""===(r=null==(t=e)||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"focusable"))||"true"===r||"1"===r?e:e.querySelector('[autofocus="true"]')||e.querySelector('[focusable="true"], [focusable=""], [focusable="1"]')}},{key:"_clearSelectedState",value:function(){var e=this.dom.querySelectorAll('[selected="true"], [selected=""]'),t=n.g.__TV_FOCUS_MANAGER__;e.forEach(function(e){e.removeAttribute("selected")}),t&&"function"==typeof t._removeDuplicateParentStateStyles&&this._children.forEach(function(e){null!=e&&e.dom&&t._removeDuplicateParentStateStyles(e.dom)})}},{key:"_applySelectedState",value:function(e){e.setAttribute("selected","true"),Array.from(e.children||[]).forEach(function(e){e.setAttribute("selected","true")}),e.querySelectorAll("[duplicateparentstate], [duplicateParentState]").forEach(function(e){e.setAttribute("selected","true")})}},{key:"endBatch",value:function(){this._refreshRuntimeStyles()}},{key:"destroy",value:function(){this._startGradient&&(this._startGradient.remove(),this._startGradient=null),this._endGradient&&(this._endGradient.remove(),this._endGradient=null),this._children=[],Qs(t,"destroy",this,3)([])}}])}(ca),tu=function(e){function t(e,n,r){var i;return O(this,t),(i=$s(this,t,[e,n,r])).tagName="ListViewItem",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","ListViewItem"),E(n,i),i.height=0,i.isDirty=!1,i.dirtyListener=null,i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{display:"flex",flexShrink:0,boxSizing:"border-box"}}},{key:"updateProperty",value:function(e,n){switch(e){case"sticky":this._sticky=!!n,this._updateSticky();break;case"type":this._type=n;break;default:"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n),Qs(t,"updateProperty",this,3)([e,n])}}},{key:"_updateSticky",value:function(){this.dom&&(this._sticky?(this.dom.style.position="sticky",this.dom.style.top="0",this.dom.style.zIndex="100"):(this.dom.style.position="",this.dom.style.top="",this.dom.style.zIndex=""))}},{key:"addDirtyListener",value:function(e){this.dirtyListener=e}},{key:"getItemHeight",value:function(){var e;return(null===(e=this.dom)||void 0===e?void 0:e.clientHeight)||0}},{key:"endBatch",value:function(){}},{key:"mounted",value:function(){var e=this;Qs(t,"mounted",this,3)([]),requestAnimationFrame(function(){e.height=e.getItemHeight()})}},{key:"destroy",value:function(){this.dirtyListener=null,Qs(t,"destroy",this,3)([])}}])}(ca);function nu(e,t,n){return t=Vn(t),Wn(e,ru()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function ru(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ru=function(){return!!e})()}function iu(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var ou=function(e){function t(e,n,r){var i;return O(this,t),(i=nu(this,t,[e,n,r])).tagName="ESPlayMarkViewComponent",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","QtPlayMark"),i.dom.style.cssText="\n display: block;\n position: relative;\n box-sizing: border-box;\n overflow: hidden;\n ",i._markColor="#FF4E46",i._gap=2,i._showType=0,i._roundCorner=0,i._startColor=null,i._endColor=null,i._isSupportGradient=!1,i._animationFrame=null,i._bars=[],i._createBars(),E(n,i),i}return Gn(t,e),R(t,[{key:"defaultStyle",value:function(){return{display:"block",position:"relative",boxSizing:"border-box",overflow:"hidden"}}},{key:"_createBars",value:function(){for(var e=0;e<4;e++){var t=document.createElement("div");t.className="play-mark-bar",t.style.cssText="\n position: absolute;\n bottom: 0;\n background-color: ".concat(this._markColor,";\n border-radius: ").concat(this._roundCorner,"px;\n "),this.dom.appendChild(t),this._bars.push(t)}this._startAnimation()}},{key:"updateProperty",value:function(e,n){var r=this;switch(e){case"markColor":case"markcolor":this._markColor=n||"#FF4E46",this._updateMarkColor();break;case"gap":this._gap=void 0!==n?Number(n):2;break;case"showType":case"showtype":this._showType=void 0!==n?Number(n):0;break;case"roundCorner":case"roundcorner":this._roundCorner=void 0!==n?Number(n):0,this._bars.forEach(function(e){e.style.borderRadius="".concat(r._roundCorner,"px")});break;case"startColor":case"startcolor":this._startColor=n,this._updateMarkColor();break;case"endColor":case"endcolor":this._endColor=n,this._updateMarkColor();break;case"isSupportGradient":case"issupportgradient":this._isSupportGradient=!0===n||"true"===n,this._updateMarkColor();break;default:iu(t,"updateProperty",this,3)([e,n])}}},{key:"_getBarColor",value:function(){return this._isSupportGradient&&this._startColor&&this._endColor?this._startColor:this._markColor}},{key:"_updateMarkColor",value:function(){var e=this._getBarColor();this._bars.forEach(function(t){t.style.backgroundColor=e})}},{key:"_startAnimation",value:function(){var e=this,t=0,n=function(){var r=e.dom.getBoundingClientRect(),i=r.width||26,o=r.height||30,a=e._bars.length,s=e._gap*(a-1),u=Math.floor((i-s)/a),l=(t=(t+1)%60)/60*Math.PI*2;e._bars.forEach(function(t,n){var r=n/a*Math.PI*2,i=.2+.375*(Math.sin(2*l+r)+1),s=Math.max(4,o*i);t.style.width="".concat(u,"px"),t.style.height="".concat(s,"px"),t.style.left="".concat(n*(u+e._gap),"px")}),e._animationFrame=requestAnimationFrame(n)};n()}},{key:"destroy",value:function(){this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=null),this._bars=[],iu(t,"destroy",this,3)([])}}])}(ca);var au=["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#e74c3c","#f1c40f","#3498db","#2ecc71","#2c3e50","#bdc3c7","#ecf0f1","#95a5a6","#1abc9c","#e67e22","#9b59b6","#34495e","#27ae60","#c0392b","#f39c12","#2980b9"],su=["left","center","right","start","end"],uu=["top","hanging","middle","alphabetic","ideographic","bottom"],lu=["butt","round","square"],cu=["round","bevel","miter"],hu=["source-over","source-atop","source-in","source-out","destination-over","destination-atop","destination-in","destination-out","lighter","copy","xor"],du="undefined"!=typeof TextDecoder?new TextDecoder("utf-8"):null;function fu(e,t){var n=e.getUint16(t.offset,!0);t.offset+=2;var r=function(e,t,n){var r=e.subarray?e.subarray(t,t+n):new Uint8Array(e.slice(t,t+n));if(du)return du.decode(r);for(var i="",o=t+n;t<o;){var a=e[t++];if(a<128)i+=String.fromCharCode(a);else if(a<224)i+=String.fromCharCode((31&a)<<6|63&e[t++]);else if(a<240)i+=String.fromCharCode((15&a)<<12|(63&e[t++])<<6|63&e[t++]);else{var s=(7&a)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++];s-=65536,i+=String.fromCharCode(55296|s>>10,56320|1023&s)}}return i}(new Uint8Array(e.buffer),t.offset,n);return t.offset+=n,r}function pu(e,t){var n=e.getUint8(t.offset);return t.offset++,255===n?fu(e,t):n<au.length?au[n]:"#000000"}function vu(e,t,n){var r=e.getUint8(t.offset);t.offset++;for(var i=0;i<r;i++){var o=e.getInt16(t.offset,!0);t.offset+=2;var a=e.getInt16(t.offset,!0);t.offset+=2,n.push({method:"lineTo",params:[o,a]})}}function yu(e,t,n,r){switch(n){case 1:r.push({method:"beginPath",params:[]});break;case 2:r.push({method:"closePath",params:[]});break;case 3:var i=e.getInt16(t.offset,!0);t.offset+=2;var o=e.getInt16(t.offset,!0);t.offset+=2,r.push({method:"moveTo",params:[i,o]});break;case 4:i=e.getInt16(t.offset,!0);t.offset+=2;o=e.getInt16(t.offset,!0);t.offset+=2,r.push({method:"lineTo",params:[i,o]});break;case 5:i=e.getInt16(t.offset,!0);t.offset+=2;o=e.getInt16(t.offset,!0);t.offset+=2;var a=e.getInt16(t.offset,!0);t.offset+=2;var s=e.getInt16(t.offset,!0);t.offset+=2,r.push({method:"fillRect",params:[i,o,a,s]});break;case 6:i=e.getInt16(t.offset,!0);t.offset+=2;o=e.getInt16(t.offset,!0);t.offset+=2;a=e.getInt16(t.offset,!0);t.offset+=2;s=e.getInt16(t.offset,!0);t.offset+=2,r.push({method:"strokeRect",params:[i,o,a,s]});break;case 7:i=e.getInt16(t.offset,!0);t.offset+=2;o=e.getInt16(t.offset,!0);t.offset+=2;a=e.getInt16(t.offset,!0);t.offset+=2;s=e.getInt16(t.offset,!0);t.offset+=2,r.push({method:"clearRect",params:[i,o,a,s]});break;case 8:var u=fu(e,t);i=e.getInt16(t.offset,!0);t.offset+=2;o=e.getInt16(t.offset,!0);t.offset+=2;var l=e.getInt16(t.offset,!0);t.offset+=2,l>=0?r.push({method:"fillText",params:[u,i,o,l]}):r.push({method:"fillText",params:[u,i,o]});break;case 9:u=fu(e,t),i=e.getInt16(t.offset,!0);t.offset+=2;o=e.getInt16(t.offset,!0);t.offset+=2;l=e.getInt16(t.offset,!0);t.offset+=2,l>=0?r.push({method:"strokeText",params:[u,i,o,l]}):r.push({method:"strokeText",params:[u,i,o]});break;case 10:r.push({method:"fill",params:[]});break;case 11:r.push({method:"stroke",params:[]});break;case 12:r.push({method:"setFillStyle",params:[pu(e,t)]});break;case 13:r.push({method:"setStrokeStyle",params:[pu(e,t)]});break;case 14:var c=e.getUint8(t.offset)/255;t.offset++,r.push({method:"setGlobalAlpha",params:[c]});break;case 15:var h=e.getUint16(t.offset,!0)/100;t.offset+=2,r.push({method:"setLineWidth",params:[h]});break;case 16:r.push({method:"setFont",params:[fu(e,t)]});break;case 17:var d=e.getFloat32(t.offset,!0);t.offset+=4;var f=e.getFloat32(t.offset,!0);t.offset+=4;var p=e.getFloat32(t.offset,!0);t.offset+=4;var v=e.getFloat32(t.offset,!0);t.offset+=4;var y=e.getFloat32(t.offset,!0);t.offset+=4;var m=e.getUint8(t.offset);t.offset++,r.push({method:"arc",params:[d,f,p,v,y,1===m]});break;case 18:var g=e.getFloat32(t.offset,!0);t.offset+=4;var _=e.getFloat32(t.offset,!0);t.offset+=4;var b=e.getFloat32(t.offset,!0);t.offset+=4;var w=e.getFloat32(t.offset,!0);t.offset+=4;var k=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"arcTo",params:[g,_,b,w,k]});break;case 19:var E=e.getFloat32(t.offset,!0);t.offset+=4;var S=e.getFloat32(t.offset,!0);t.offset+=4;i=e.getFloat32(t.offset,!0);t.offset+=4;o=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"quadraticCurveTo",params:[E,S,i,o]});break;case 20:var A=e.getFloat32(t.offset,!0);t.offset+=4;var x=e.getFloat32(t.offset,!0);t.offset+=4;var C=e.getFloat32(t.offset,!0);t.offset+=4;var T=e.getFloat32(t.offset,!0);t.offset+=4;i=e.getFloat32(t.offset,!0);t.offset+=4;o=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"bezierCurveTo",params:[A,x,C,T,i,o]});break;case 21:i=e.getInt16(t.offset,!0);t.offset+=2;o=e.getInt16(t.offset,!0);t.offset+=2;a=e.getInt16(t.offset,!0);t.offset+=2;s=e.getInt16(t.offset,!0);t.offset+=2,r.push({method:"rect",params:[i,o,a,s]});break;case 22:r.push({method:"save",params:[]});break;case 23:r.push({method:"restore",params:[]});break;case 24:var I=e.getFloat32(t.offset,!0);t.offset+=4;var O=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"translate",params:[I,O]});break;case 25:var L=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"rotate",params:[L]});break;case 26:var P=e.getFloat32(t.offset,!0);t.offset+=4;var R=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"scale",params:[P,R]});break;case 27:var N=e.getFloat32(t.offset,!0);t.offset+=4;var D=e.getFloat32(t.offset,!0);t.offset+=4;var M=e.getFloat32(t.offset,!0);t.offset+=4;var F=e.getFloat32(t.offset,!0);t.offset+=4;var B=e.getFloat32(t.offset,!0);t.offset+=4;var j=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"setTransform",params:[N,D,M,F,B,j]});break;case 28:N=e.getFloat32(t.offset,!0);t.offset+=4;D=e.getFloat32(t.offset,!0);t.offset+=4;M=e.getFloat32(t.offset,!0);t.offset+=4;F=e.getFloat32(t.offset,!0);t.offset+=4;B=e.getFloat32(t.offset,!0);t.offset+=4;j=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"transform",params:[N,D,M,F,B,j]});break;case 29:var U=fu(e,t),W=e.getUint8(t.offset);if(t.offset++,3===W){P=e.getFloat32(t.offset,!0);t.offset+=4;R=e.getFloat32(t.offset,!0);t.offset+=4;var V=e.getFloat32(t.offset,!0);t.offset+=4;var z=e.getFloat32(t.offset,!0);t.offset+=4;var H=e.getFloat32(t.offset,!0);t.offset+=4;var G=e.getFloat32(t.offset,!0);t.offset+=4;var Y=e.getFloat32(t.offset,!0);t.offset+=4;var q=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"drawImage",params:[U,P,R,V,z,H,G,Y,q]})}else if(2===W){H=e.getFloat32(t.offset,!0);t.offset+=4;G=e.getFloat32(t.offset,!0);t.offset+=4;Y=e.getFloat32(t.offset,!0);t.offset+=4;q=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"drawImage",params:[U,H,G,Y,q]})}else{H=e.getFloat32(t.offset,!0);t.offset+=4;G=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"drawImage",params:[U,H,G]})}break;case 30:var X=e.getUint8(t.offset);t.offset++,r.push({method:"setTextAlign",params:[su[X]||"start"]});break;case 31:X=e.getUint8(t.offset);t.offset++,r.push({method:"setTextBaseline",params:[uu[X]||"alphabetic"]});break;case 32:r.push({method:"clip",params:[]});break;case 33:X=e.getUint8(t.offset);t.offset++,r.push({method:"lineCap",params:[lu[X]||"butt"]});break;case 34:X=e.getUint8(t.offset);t.offset++,r.push({method:"lineJoin",params:[cu[X]||"miter"]});break;case 35:var Z=e.getUint8(t.offset);t.offset++;for(var K=[],$=0;$<Z;$++)K.push(e.getUint16(t.offset,!0)/100),t.offset+=2;r.push({method:"setLineDash",params:[K]});break;case 36:var J=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"lineDashOffset",params:[J]});break;case 37:J=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"setShadowBlur",params:[J]});break;case 38:r.push({method:"setShadowColor",params:[pu(e,t)]});break;case 39:J=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"setShadowOffsetX",params:[J]});break;case 40:J=e.getFloat32(t.offset,!0);t.offset+=4,r.push({method:"setShadowOffsetY",params:[J]});break;case 41:X=e.getUint8(t.offset);t.offset++,r.push({method:"setGlobalCompositeOperation",params:[hu[X]||"source-over"]})}}function mu(e){return e>=48&&e<=57?e-48:e-55}function gu(e){var t=new DataView(e);if(t.byteLength<5)return[];if(80!==t.getUint8(0)||72!==t.getUint8(1)||1!==t.getUint8(2))return[];for(var n=t.getUint16(3,!0),r={offset:5},i=[],o=0;o<n&&!(r.offset>=t.byteLength);o++){var a=t.getUint8(r.offset);r.offset++,48===a?vu(t,r,i):yu(t,r,a,i)}return i}function _u(e){if(!e||0===e.length)return[];var t=e[0];if(t instanceof ArrayBuffer)return gu(t);if(t instanceof Uint8Array)return gu(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));if(Array.isArray(t)&&t.length>0&&"number"==typeof t[0]){for(var n=new Uint8Array(t.length),r=0;r<t.length;r++)n[r]=255&t[r];return gu(n.buffer)}if("string"==typeof t){if(t.length>=6&&t.length%2==0&&91!==t.charCodeAt(0)&&function(e){for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(!(n>=48&&n<=57||n>=65&&n<=70))return!1}return!0}(t))return gu(function(e){for(var t=e.length/2,n=new Uint8Array(t),r=0;r<t;r++)n[r]=mu(e.charCodeAt(2*r))<<4|mu(e.charCodeAt(2*r+1));return n.buffer}(t));if(80===t.charCodeAt(0)&&72===t.charCodeAt(1))return gu(function(e){for(var t=atob(e),n=new Uint8Array(t.length),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}(t));try{return JSON.parse(t)}catch(e){return[]}}return[]}function bu(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return wu(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wu(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function wu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ku(e,t,n){return t=Vn(t),Wn(e,Eu()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Eu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Eu=function(){return!!e})()}function Su(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Au={};var xu=function(e){function t(e,n,r){var i;return O(this,t),(i=ku(this,t,[e,n,r])).tagName="CanvasView2D",i.dom=document.createElement("canvas"),i.ctx=null,i._imageCache={},i._gradientCache={},i._pendingActions=[],i._readyEmitted=!1,function(e,t){Au[e]=t}(n,i),i}return Gn(t,e),R(t,[{key:"mounted",value:function(){Su(t,"mounted",this,3)([]),this.dom.width&&this.dom.height&&(this.ctx=this.dom.getContext("2d")),this._checkReady()}},{key:"_ensureContext",value:function(){return this.ctx||(this.ctx=this.dom.getContext("2d")),this.ctx}},{key:"updateProperty",value:function(e,n){return"width"===e?(this.dom.width=n,this._ensureContext(),void this._checkReady()):"height"===e?(this.dom.height=n,this._ensureContext(),void this._checkReady()):void Su(t,"updateProperty",this,3)([e,n])}},{key:"_checkReady",value:function(){var e=this;if(!this._readyEmitted&&this.dom.width>0&&this.dom.height>0){var t,n;this._readyEmitted=!0;var r=function(){e.dispatchEvent("onReady",{})},i=null===(t=this.context)||void 0===t||null===(n=t.getModuleByName)||void 0===n?void 0:n.call(t,"UIManagerModule");i&&"function"==typeof i.addAfterCreateAction?i.addAfterCreateAction(r):requestAnimationFrame(r)}}},{key:"fillStyle",value:function(e){var t=this._ensureContext();if(t){var n=Array.isArray(e)?e[0]:e;"string"==typeof n&&(n.startsWith("AC")?t.fillStyle=this._parseLinearGradient(n):n.startsWith("AD")?t.fillStyle=this._parseRadialGradient(n):t.fillStyle=n)}}},{key:"strokeStyle",value:function(e){var t=this._ensureContext();if(t){var n=Array.isArray(e)?e[0]:e;if("string"==typeof n)if(n.startsWith("NC")||n.startsWith("AC")){var r=n.startsWith("NC")?"AC"+n.slice(2):n;t.strokeStyle=this._parseLinearGradient(r)}else n.startsWith("AD")?t.strokeStyle=this._parseRadialGradient(n):t.strokeStyle=n}}},{key:"_parseLinearGradient",value:function(e){var t=this._ensureContext();if(!t)return"#000000";for(var n=e.slice(2).split(","),r=parseFloat(n[0]),i=parseFloat(n[1]),o=parseFloat(n[2]),a=parseFloat(n[3]),s=t.createLinearGradient(r,i,o,a),u=4;u<n.length;u+=2)s.addColorStop(parseFloat(n[u]),n[u+1]);return s}},{key:"_parseRadialGradient",value:function(e){var t=this._ensureContext();if(!t)return"#000000";for(var n=e.slice(2).split(","),r=parseFloat(n[0]),i=parseFloat(n[1]),o=parseFloat(n[2]),a=parseFloat(n[3]),s=parseFloat(n[4]),u=parseFloat(n[5]),l=t.createRadialGradient(r,i,o,a,s,u),c=6;c<n.length;c+=2)l.addColorStop(parseFloat(n[c]),n[c+1]);return l}},{key:"fillRect",value:function(e){var t=this._ensureContext();!t||!e||e.length<4||t.fillRect(e[0],e[1],e[2],e[3])}},{key:"strokeRect",value:function(e){var t=this._ensureContext();!t||!e||e.length<4||t.strokeRect(e[0],e[1],e[2],e[3])}},{key:"clearRect",value:function(e){var t=this._ensureContext();!t||!e||e.length<4||t.clearRect(e[0],e[1],e[2],e[3])}},{key:"fillText",value:function(e){var t=this._ensureContext();!t||!e||e.length<3||t.fillText(e[0],e[1],e[2])}},{key:"strokeText",value:function(e){var t=this._ensureContext();!t||!e||e.length<3||t.strokeText(e[0],e[1],e[2])}},{key:"font",value:function(e){var t=this._ensureContext();t&&e&&(t.font=Array.isArray(e)?e[0]:e)}},{key:"textAlign",value:function(e){var t=this._ensureContext();t&&e&&(t.textAlign=Array.isArray(e)?e[0]:e)}},{key:"textBaseline",value:function(e){var t=this._ensureContext();t&&e&&(t.textBaseline=Array.isArray(e)?e[0]:e)}},{key:"lineWidth",value:function(e){var t=this._ensureContext();t&&e&&(t.lineWidth=Array.isArray(e)?e[0]:e)}},{key:"lineCap",value:function(e){var t=this._ensureContext();t&&e&&(t.lineCap=Array.isArray(e)?e[0]:e)}},{key:"lineJoin",value:function(e){var t=this._ensureContext();t&&e&&(t.lineJoin=Array.isArray(e)?e[0]:e)}},{key:"setLineDash",value:function(e){var t=this._ensureContext();t&&e&&t.setLineDash(Array.isArray(e)?e:[e])}},{key:"lineDashOffset",value:function(e){var t=this._ensureContext();t&&e&&(t.lineDashOffset=Array.isArray(e)?e[0]:e)}},{key:"shadowBlur",value:function(e){var t=this._ensureContext();t&&e&&(t.shadowBlur=Array.isArray(e)?e[0]:e)}},{key:"shadowColor",value:function(e){var t=this._ensureContext();t&&e&&(t.shadowColor=Array.isArray(e)?e[0]:e)}},{key:"shadowOffsetX",value:function(e){var t=this._ensureContext();t&&e&&(t.shadowOffsetX=Array.isArray(e)?e[0]:e)}},{key:"shadowOffsetY",value:function(e){var t=this._ensureContext();t&&e&&(t.shadowOffsetY=Array.isArray(e)?e[0]:e)}},{key:"globalAlpha",value:function(e){var t=this._ensureContext();t&&e&&(t.globalAlpha=Array.isArray(e)?e[0]:e)}},{key:"globalCompositeOperation",value:function(e){var t=this._ensureContext();t&&e&&(t.globalCompositeOperation=Array.isArray(e)?e[0]:e)}},{key:"beginPath",value:function(e){var t=this._ensureContext();t&&t.beginPath()}},{key:"closePath",value:function(e){var t=this._ensureContext();t&&t.closePath()}},{key:"moveTo",value:function(e){var t=this._ensureContext();!t||!e||e.length<2||t.moveTo(e[0],e[1])}},{key:"lineTo",value:function(e){var t=this._ensureContext();!t||!e||e.length<2||t.lineTo(e[0],e[1])}},{key:"arc",value:function(e){var t=this._ensureContext();!t||!e||e.length<5||t.arc(e[0],e[1],e[2],e[3],e[4],e.length>5&&e[5])}},{key:"arcTo",value:function(e){var t=this._ensureContext();!t||!e||e.length<5||t.arcTo(e[0],e[1],e[2],e[3],e[4])}},{key:"quadraticCurveTo",value:function(e){var t=this._ensureContext();!t||!e||e.length<4||t.quadraticCurveTo(e[0],e[1],e[2],e[3])}},{key:"bezierCurveTo",value:function(e){var t=this._ensureContext();!t||!e||e.length<6||t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5])}},{key:"rect",value:function(e){var t=this._ensureContext();!t||!e||e.length<4||t.rect(e[0],e[1],e[2],e[3])}},{key:"fill",value:function(e){var t=this._ensureContext();t&&t.fill()}},{key:"stroke",value:function(e){var t=this._ensureContext();t&&t.stroke()}},{key:"clip",value:function(e){var t=this._ensureContext();t&&t.clip()}},{key:"save",value:function(e){var t=this._ensureContext();t&&t.save()}},{key:"restore",value:function(e){var t=this._ensureContext();t&&t.restore()}},{key:"translate",value:function(e){var t=this._ensureContext();!t||!e||e.length<2||t.translate(e[0],e[1])}},{key:"rotate",value:function(e){var t=this._ensureContext();t&&e&&t.rotate(Array.isArray(e)?e[0]:e)}},{key:"scale",value:function(e){var t=this._ensureContext();!t||!e||e.length<2||t.scale(e[0],e[1])}},{key:"transform",value:function(e){var t=this._ensureContext();!t||!e||e.length<6||t.transform(e[0],e[1],e[2],e[3],e[4],e[5])}},{key:"setTransform",value:function(e){var t=this._ensureContext();!t||!e||e.length<6||t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5])}},{key:"loadImage",value:function(e){var t=this,n=Array.isArray(e)?e[0]:e;if(!n)return{error:"No image source provided"};var r=this._imageCache[n];return r?{imageId:n,width:r.naturalWidth,height:r.naturalHeight}:new Promise(function(e){var r=new Image;r.crossOrigin="anonymous",r.onload=function(){t._imageCache[n]=r,e({imageId:n,width:r.naturalWidth,height:r.naturalHeight})},r.onerror=function(){e({error:"Failed to load image: "+n})},r.src=n})}},{key:"drawImage",value:function(e){var t=this;if(e&&!(e.length<3)){var n=e[0],r=this._imageCache[n];if(r)this._drawImageWithImg(r,e.slice(1));else{var i=new Image;i.onload=function(){t._imageCache[n]=i,t._drawImageWithImg(i,e.slice(1))},i.src=n}}}},{key:"_drawImageWithImg",value:function(e,t){var n=this._ensureContext();n&&(t.length>=8?n.drawImage(e,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]):t.length>=4?n.drawImage(e,t[0],t[1],t[2],t[3]):n.drawImage(e,t[0],t[1]))}},{key:"drawAction",value:function(e){var t=_u(e);if(t.length>0){var n,r=bu(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;this[i.method]&&this[i.method](i.params)}}catch(e){r.e(e)}finally{r.f()}}}},{key:"destoryView",value:function(e){this._imageCache={},this._gradientCache={}}},{key:"setVersion",value:function(e){}},{key:"setCurrentDensity",value:function(e){}},{key:"getContext2d",value:function(e){return this._ensureContext()}},{key:"createLinearGradient",value:function(e){}},{key:"createRadialGradient",value:function(e){}},{key:"createPattern",value:function(e){}},{key:"measureText",value:function(e){var t=this._ensureContext();if(!t||!e)return{width:0};var n=Array.isArray(e)?e[0]:e;return{width:t.measureText(n).width}}},{key:"setFillStyle",value:function(e){this.fillStyle(e)}},{key:"setStrokeStyle",value:function(e){this.strokeStyle(e)}},{key:"setLineWidth",value:function(e){this.lineWidth(e)}},{key:"setFont",value:function(e){this.font(e)}},{key:"setTextAlign",value:function(e){this.textAlign(e)}},{key:"setTextBaseline",value:function(e){this.textBaseline(e)}},{key:"setShadowBlur",value:function(e){this.shadowBlur(e)}},{key:"setShadowColor",value:function(e){this.shadowColor(e)}},{key:"setShadowOffsetX",value:function(e){this.shadowOffsetX(e)}},{key:"setShadowOffsetY",value:function(e){this.shadowOffsetY(e)}},{key:"setGlobalAlpha",value:function(e){this.globalAlpha(e)}},{key:"setGlobalCompositeOperation",value:function(e){this.globalCompositeOperation(e)}},{key:"beforeUnmount",value:function(){this._imageCache={},this._gradientCache={},delete Au[this.id],Su(t,"beforeUnmount",this,3)([])}}])}(ca),Cu=1,Tu=function(){return R(function e(){O(this,e),this._shaders={},this._programs={},this._buffers={},this._textures={},this._framebuffers={},this._renderbuffers={},this._uniformLocations={},this._attribLocations={},this._nextFakeLocId=1e6,this._fakeToRealLoc={}},[{key:"createShader",value:function(e){var t=Cu++;return this._shaders[t]={id:t,type:e,compiled:!1,source:"",glShader:null},t}},{key:"getShader",value:function(e){return this._shaders[e]||null}},{key:"getGLShader",value:function(e){var t=this._shaders[e];return t?t.glShader:null}},{key:"setGLShader",value:function(e,t){var n=this._shaders[e];n&&(n.glShader=t)}},{key:"setShaderSource",value:function(e,t){var n=this._shaders[e];n&&(n.source=t)}},{key:"setShaderCompiled",value:function(e,t){var n=this._shaders[e];n&&(n.compiled=t)}},{key:"deleteShader",value:function(e){delete this._shaders[e]}},{key:"createProgram",value:function(){var e=Cu++;return this._programs[e]={id:e,linked:!1,shaders:[],glProgram:null},e}},{key:"getProgram",value:function(e){return this._programs[e]||null}},{key:"getGLProgram",value:function(e){var t=this._programs[e];return t?t.glProgram:null}},{key:"setGLProgram",value:function(e,t){var n=this._programs[e];n&&(n.glProgram=t)}},{key:"attachShader",value:function(e,t){var n=this._programs[e];n&&n.shaders.push(t)}},{key:"setProgramLinked",value:function(e,t){var n=this._programs[e];n&&(n.linked=t)}},{key:"deleteProgram",value:function(e){delete this._programs[e]}},{key:"createBuffer",value:function(){var e=Cu++;return this._buffers[e]={id:e,glBuffer:null},e}},{key:"deleteBuffer",value:function(e){delete this._buffers[e]}},{key:"getBuffer",value:function(e){return this._buffers[e]||null}},{key:"getGLBuffer",value:function(e){var t=this._buffers[e];return t?t.glBuffer:null}},{key:"setGLBuffer",value:function(e,t){var n=this._buffers[e];n&&(n.glBuffer=t)}},{key:"createTexture",value:function(){var e=Cu++;return this._textures[e]={id:e,glTexture:null},e}},{key:"deleteTexture",value:function(e){delete this._textures[e]}},{key:"getTexture",value:function(e){return this._textures[e]||null}},{key:"getGLTexture",value:function(e){var t=this._textures[e];return t?t.glTexture:null}},{key:"setGLTexture",value:function(e,t){var n=this._textures[e];n&&(n.glTexture=t)}},{key:"createFramebuffer",value:function(){var e=Cu++;return this._framebuffers[e]={id:e,glFramebuffer:null},e}},{key:"deleteFramebuffer",value:function(e){delete this._framebuffers[e]}},{key:"getFramebuffer",value:function(e){return this._framebuffers[e]||null}},{key:"getGLFramebuffer",value:function(e){var t=this._framebuffers[e];return t?t.glFramebuffer:null}},{key:"setGLFramebuffer",value:function(e,t){var n=this._framebuffers[e];n&&(n.glFramebuffer=t)}},{key:"createRenderbuffer",value:function(){var e=Cu++;return this._renderbuffers[e]={id:e,glRenderbuffer:null},e}},{key:"deleteRenderbuffer",value:function(e){delete this._renderbuffers[e]}},{key:"getRenderbuffer",value:function(e){return this._renderbuffers[e]||null}},{key:"getGLRenderbuffer",value:function(e){var t=this._renderbuffers[e];return t?t.glRenderbuffer:null}},{key:"setGLRenderbuffer",value:function(e,t){var n=this._renderbuffers[e];n&&(n.glRenderbuffer=t)}},{key:"storeUniformLocation",value:function(e,t,n){this._uniformLocations[e+":"+t]=n}},{key:"getUniformLocation",value:function(e,t){var n=this._uniformLocations[e+":"+t];return void 0!==n?n:-1}},{key:"storeAttribLocation",value:function(e,t,n){this._attribLocations[e+":"+t]=n}},{key:"getAttribLocation",value:function(e,t){var n=this._attribLocations[e+":"+t];return void 0!==n?n:-1}},{key:"generateFakeLocId",value:function(){return this._nextFakeLocId++}},{key:"storeRealUniformLocation",value:function(e,t){this._fakeToRealLoc[e]=t}},{key:"getRealUniformLocation",value:function(e){return void 0!==this._fakeToRealLoc[e]?this._fakeToRealLoc[e]:e}},{key:"reset",value:function(){this._shaders={},this._programs={},this._buffers={},this._textures={},this._framebuffers={},this._renderbuffers={},this._uniformLocations={},this._attribLocations={},this._fakeToRealLoc={}}}])}(),Iu={VIEWPORT:1,SCISSOR:2,CLEAR_COLOR:3,CLEAR_DEPTH:4,CLEAR_STENCIL:5,CLEAR:6,ENABLE:7,DISABLE:8,CULL_FACE:9,FRONT_FACE:10,DEPTH_FUNC:11,DEPTH_MASK:12,DEPTH_RANGE:13,BLEND_FUNC:14,BLEND_FUNC_SEPARATE:15,BLEND_EQUATION:16,BLEND_EQUATION_SEPARATE:17,BLEND_COLOR:18,COLOR_MASK:19,LINE_WIDTH:20,STENCIL_FUNC:21,STENCIL_OP:22,STENCIL_MASK:23,POLYGON_OFFSET:24,SAMPLE_COVERAGE:25,USE_PROGRAM:32,BIND_BUFFER:48,BIND_BUFFER_BASE:49,BIND_BUFFER_RANGE:50,BIND_TEXTURE:64,ACTIVE_TEXTURE:65,TEX_PARAMETERI:66,TEX_PARAMETERF:67,GENERATE_MIPMAP:68,PIXEL_STOREI:69,BIND_FRAMEBUFFER:80,BIND_RENDERBUFFER:81,FRAMEBUFFER_TEXTURE2D:82,RENDERBUFFER_STORAGE:83,UNIFORM1I:96,UNIFORM2I:97,UNIFORM3I:98,UNIFORM4I:99,UNIFORM1F:100,UNIFORM2F:101,UNIFORM3F:102,UNIFORM4F:103,UNIFORM1IV:104,UNIFORM2IV:105,UNIFORM3IV:106,UNIFORM4IV:107,UNIFORM1FV:108,UNIFORM2FV:109,UNIFORM3FV:110,UNIFORM4FV:111,UNIFORM_MATRIX2FV:112,UNIFORM_MATRIX3FV:113,UNIFORM_MATRIX4FV:114,ENABLE_VERTEX_ATTRIB_ARRAY:128,DISABLE_VERTEX_ATTRIB_ARRAY:129,VERTEX_ATTRIB_POINTER:130,VERTEX_ATTRIB_DIVISOR:131,DRAW_ARRAYS:144,DRAW_ELEMENTS:145,DRAW_ARRAYS_INSTANCED:146,DRAW_ELEMENTS_INSTANCED:147,READ_BUFFER:160,BLIT_FRAMEBUFFER:161,TEX_STORAGE_3D:162,TEX_IMAGE_3D:163,TEX_SUB_IMAGE_3D:164,DRAW_RANGE_ELEMENTS:165,FLUSH:240,FINISH:241},Ou=function(){return R(function e(t,n){O(this,e),this._gl=t,this._objectManager=n},[{key:"decode",value:function(e){if(e&&!(e.byteLength<5)){var t=new DataView(e instanceof ArrayBuffer?e:e.buffer);if(!(t.byteLength<5)){var n=t.getUint8(0),r=t.getUint8(1);if(87===n&&71===r)if(1===t.getUint8(2)){for(var i=t.getUint16(3,!0),o=5,a=0;a<i&&o<t.byteLength&&!(o>=t.byteLength);a++){var s=t.getUint8(o++);for(this._opName(s);0!==this._gl.getError(););o=this._decodeCommand(s,t,o);this._gl.getError()}this._gl.getError()}}}}},{key:"_glErrorName",value:function(e){return{1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"CONTEXT_LOST_WEBGL"}[e]||"UNKNOWN"}},{key:"_opName",value:function(e){var t=Object.entries(Iu).find(function(t){return s(t,2)[1]===e});return t?t[0]:"UNKNOWN"}},{key:"_decodeCommand",value:function(e,t,n){var r=this._gl,i=this._objectManager;switch(e){case Iu.VIEWPORT:var o=t.getInt32(n,!0);n+=4;var a=t.getInt32(n,!0);n+=4;var s=t.getInt32(n,!0);n+=4;var u=t.getInt32(n,!0);return n+=4,r.viewport(o,a,s,u),n;case Iu.SCISSOR:var l=t.getInt32(n,!0);n+=4;var c=t.getInt32(n,!0);n+=4;var h=t.getInt32(n,!0);n+=4;var d=t.getInt32(n,!0);return n+=4,r.scissor(l,c,h,d),n;case Iu.CLEAR_COLOR:var f=t.getFloat32(n,!0);n+=4;var p=t.getFloat32(n,!0);n+=4;var v=t.getFloat32(n,!0);n+=4;var y=t.getFloat32(n,!0);return n+=4,r.clearColor(f,p,v,y),n;case Iu.CLEAR_DEPTH:var m=t.getFloat32(n,!0);return n+=4,r.clearDepth(m),n;case Iu.CLEAR_STENCIL:var g=t.getInt32(n,!0);return n+=4,r.clearStencil(g),n;case Iu.CLEAR:var _=t.getInt32(n,!0);return n+=4,r.clear(_),n;case Iu.ENABLE:var b=t.getInt32(n,!0);return n+=4,r.enable(b),n;case Iu.DISABLE:var w=t.getInt32(n,!0);return n+=4,r.disable(w),n;case Iu.CULL_FACE:var k=t.getInt32(n,!0);return n+=4,r.cullFace(k),n;case Iu.FRONT_FACE:var E=t.getInt32(n,!0);return n+=4,r.frontFace(E),n;case Iu.DEPTH_FUNC:var S=t.getInt32(n,!0);return n+=4,r.depthFunc(S),n;case Iu.DEPTH_MASK:var A=0!==t.getUint8(n);return n+=1,r.depthMask(A),n;case Iu.DEPTH_RANGE:var x=t.getFloat32(n,!0);n+=4;var C=t.getFloat32(n,!0);return n+=4,r.depthRange(x,C),n;case Iu.BLEND_FUNC:var T=t.getInt32(n,!0);n+=4;var I=t.getInt32(n,!0);return n+=4,r.blendFunc(T,I),n;case Iu.BLEND_FUNC_SEPARATE:var O=t.getInt32(n,!0);n+=4;var L=t.getInt32(n,!0);n+=4;var P=t.getInt32(n,!0);n+=4;var R=t.getInt32(n,!0);return n+=4,r.blendFuncSeparate(O,L,P,R),n;case Iu.BLEND_EQUATION:var N=t.getInt32(n,!0);return n+=4,r.blendEquation(N),n;case Iu.BLEND_EQUATION_SEPARATE:var D=t.getInt32(n,!0);n+=4;var M=t.getInt32(n,!0);return n+=4,r.blendEquationSeparate(D,M),n;case Iu.BLEND_COLOR:var F=t.getFloat32(n,!0);n+=4;var B=t.getFloat32(n,!0);n+=4;var j=t.getFloat32(n,!0);n+=4;var U=t.getFloat32(n,!0);return n+=4,r.blendColor(F,B,j,U),n;case Iu.COLOR_MASK:var W=0!==t.getUint8(n);n+=1;var V=0!==t.getUint8(n);n+=1;var z=0!==t.getUint8(n);n+=1;var H=0!==t.getUint8(n);return n+=1,r.colorMask(W,V,z,H),n;case Iu.LINE_WIDTH:var G=t.getFloat32(n,!0);return n+=4,r.lineWidth(G),n;case Iu.STENCIL_FUNC:var Y=t.getInt32(n,!0);n+=4;var q=t.getInt32(n,!0);n+=4;var X=t.getInt32(n,!0);return n+=4,r.stencilFunc(Y,q,X),n;case Iu.STENCIL_OP:var Z=t.getInt32(n,!0);n+=4;var K=t.getInt32(n,!0);n+=4;var $=t.getInt32(n,!0);return n+=4,r.stencilOp(Z,K,$),n;case Iu.STENCIL_MASK:var J=t.getInt32(n,!0);return n+=4,r.stencilMask(J),n;case Iu.POLYGON_OFFSET:var Q=t.getFloat32(n,!0);n+=4;var ee=t.getFloat32(n,!0);return n+=4,r.polygonOffset(Q,ee),n;case Iu.SAMPLE_COVERAGE:var te=t.getFloat32(n,!0);n+=4;var ne=0!==t.getUint8(n);return n+=1,r.sampleCoverage(te,ne),n;case Iu.USE_PROGRAM:var re=t.getInt32(n,!0);n+=4;var ie=i?i.getGLProgram(re):null;return ie&&this._gl.getProgramParameter(ie,this._gl.LINK_STATUS),r.useProgram(ie||re),n;case Iu.BIND_BUFFER:var oe=t.getInt32(n,!0);n+=4;var ae=t.getInt32(n,!0);n+=4;var se=i?i.getGLBuffer(ae):null;return r.bindBuffer(oe,se||ae),n;case Iu.BIND_BUFFER_BASE:t.getInt32(n,!0);n+=4;t.getInt32(n,!0);n+=4;t.getInt32(n,!0);return n+=4;case Iu.BIND_BUFFER_RANGE:return n+=20;case Iu.BIND_TEXTURE:var ue=t.getInt32(n,!0);n+=4;var le=t.getInt32(n,!0);n+=4;var ce=i?i.getGLTexture(le):null;return r.bindTexture(ue,ce||le),n;case Iu.ACTIVE_TEXTURE:var he=t.getInt32(n,!0);return n+=4,r.activeTexture(he),n;case Iu.TEX_PARAMETERI:var de=t.getInt32(n,!0);n+=4;var fe=t.getInt32(n,!0);n+=4;var pe=t.getInt32(n,!0);return n+=4,r.texParameteri(de,fe,pe),n;case Iu.TEX_PARAMETERF:var ve=t.getInt32(n,!0);n+=4;var ye=t.getInt32(n,!0);n+=4;var me=t.getFloat32(n,!0);return n+=4,r.texParameterf(ve,ye,me),n;case Iu.GENERATE_MIPMAP:var ge=t.getInt32(n,!0);return n+=4,r.generateMipmap(ge),n;case Iu.PIXEL_STOREI:var _e=t.getInt32(n,!0);n+=4;var be=t.getInt32(n,!0);return n+=4,r.pixelStorei(_e,be),n;case Iu.UNIFORM1I:var we=t.getInt32(n,!0);n+=4;var ke=t.getInt32(n,!0);n+=4;var Ee=i?i.getRealUniformLocation(we):we;return r.uniform1i(Ee,ke),n;case Iu.UNIFORM2I:var Se=t.getInt32(n,!0);n+=4;var Ae=t.getInt32(n,!0);n+=4;var xe=t.getInt32(n,!0);n+=4;var Ce=i?i.getRealUniformLocation(Se):Se;return r.uniform2i(Ce,Ae,xe),n;case Iu.UNIFORM3I:var Te=t.getInt32(n,!0);n+=4;var Ie=t.getInt32(n,!0);n+=4;var Oe=t.getInt32(n,!0);n+=4;var Le=t.getInt32(n,!0);n+=4;var Pe=i?i.getRealUniformLocation(Te):Te;return r.uniform3i(Pe,Ie,Oe,Le),n;case Iu.UNIFORM4I:var Re=t.getInt32(n,!0);n+=4;var Ne=t.getInt32(n,!0);n+=4;var De=t.getInt32(n,!0);n+=4;var Me=t.getInt32(n,!0);n+=4;var Fe=t.getInt32(n,!0);n+=4;var Be=i?i.getRealUniformLocation(Re):Re;return r.uniform4i(Be,Ne,De,Me,Fe),n;case Iu.UNIFORM1F:var je=t.getInt32(n,!0);n+=4;var Ue=t.getFloat32(n,!0);n+=4;var We=i?i.getRealUniformLocation(je):je;return r.uniform1f(We,Ue),n;case Iu.UNIFORM2F:var Ve=t.getInt32(n,!0);n+=4;var ze=t.getFloat32(n,!0);n+=4;var He=t.getFloat32(n,!0);n+=4;var Ge=i?i.getRealUniformLocation(Ve):Ve;return r.uniform2f(Ge,ze,He),n;case Iu.UNIFORM3F:var Ye=t.getInt32(n,!0);n+=4;var qe=t.getFloat32(n,!0);n+=4;var Xe=t.getFloat32(n,!0);n+=4;var Ze=t.getFloat32(n,!0);n+=4;var Ke=i?i.getRealUniformLocation(Ye):Ye;return r.uniform3f(Ke,qe,Xe,Ze),n;case Iu.UNIFORM4F:var $e=t.getInt32(n,!0);n+=4;var Je=t.getFloat32(n,!0);n+=4;var Qe=t.getFloat32(n,!0);n+=4;var et=t.getFloat32(n,!0);n+=4;var tt=t.getFloat32(n,!0);n+=4;var nt=i?i.getRealUniformLocation($e):$e;return r.uniform4f(nt,Je,Qe,et,tt),n;case Iu.UNIFORM1IV:var rt=t.getInt32(n,!0);n+=4;var it=t.getInt32(n,!0);n+=4;for(var ot=i?i.getRealUniformLocation(rt):rt,at=new Int32Array(it),st=0;st<it;st++)at[st]=t.getInt32(n,!0),n+=4;return r.uniform1iv(ot,at),n;case Iu.UNIFORM2IV:var ut=t.getInt32(n,!0);n+=4;var lt=t.getInt32(n,!0);n+=4;for(var ct=i?i.getRealUniformLocation(ut):ut,ht=new Int32Array(2*lt),dt=0;dt<2*lt;dt++)ht[dt]=t.getInt32(n,!0),n+=4;return r.uniform2iv(ct,ht),n;case Iu.UNIFORM3IV:var ft=t.getInt32(n,!0);n+=4;var pt=t.getInt32(n,!0);n+=4;for(var vt=i?i.getRealUniformLocation(ft):ft,yt=new Int32Array(3*pt),mt=0;mt<3*pt;mt++)yt[mt]=t.getInt32(n,!0),n+=4;return r.uniform3iv(vt,yt),n;case Iu.UNIFORM4IV:var gt=t.getInt32(n,!0);n+=4;var _t=t.getInt32(n,!0);n+=4;for(var bt=i?i.getRealUniformLocation(gt):gt,wt=new Int32Array(4*_t),kt=0;kt<4*_t;kt++)wt[kt]=t.getInt32(n,!0),n+=4;return r.uniform4iv(bt,wt),n;case Iu.UNIFORM1FV:var Et=t.getInt32(n,!0);n+=4;var St=t.getInt32(n,!0);n+=4;for(var At=i?i.getRealUniformLocation(Et):Et,xt=new Float32Array(St),Ct=0;Ct<St;Ct++)xt[Ct]=t.getFloat32(n,!0),n+=4;return r.uniform1fv(At,xt),n;case Iu.UNIFORM2FV:var Tt=t.getInt32(n,!0);n+=4;var It=t.getInt32(n,!0);n+=4;for(var Ot=i?i.getRealUniformLocation(Tt):Tt,Lt=new Float32Array(2*It),Pt=0;Pt<2*It;Pt++)Lt[Pt]=t.getFloat32(n,!0),n+=4;return r.uniform2fv(Ot,Lt),n;case Iu.UNIFORM3FV:var Rt=t.getInt32(n,!0);n+=4;var Nt=t.getInt32(n,!0);n+=4;for(var Dt=i?i.getRealUniformLocation(Rt):Rt,Mt=new Float32Array(3*Nt),Ft=0;Ft<3*Nt;Ft++)Mt[Ft]=t.getFloat32(n,!0),n+=4;return r.uniform3fv(Dt,Mt),n;case Iu.UNIFORM4FV:var Bt=t.getInt32(n,!0);n+=4;var jt=t.getInt32(n,!0);n+=4;for(var Ut=i?i.getRealUniformLocation(Bt):Bt,Wt=new Float32Array(4*jt),Vt=0;Vt<4*jt;Vt++)Wt[Vt]=t.getFloat32(n,!0),n+=4;return r.uniform4fv(Ut,Wt),n;case Iu.UNIFORM_MATRIX2FV:var zt=t.getInt32(n,!0);n+=4;var Ht=0!==t.getUint8(n);n+=1;for(var Gt=i?i.getRealUniformLocation(zt):zt,Yt=new Float32Array(4),qt=0;qt<4;qt++)Yt[qt]=t.getFloat32(n,!0),n+=4;return r.uniformMatrix2fv(Gt,Ht,Yt),n;case Iu.UNIFORM_MATRIX3FV:var Xt=t.getInt32(n,!0);n+=4;var Zt=0!==t.getUint8(n);n+=1;for(var Kt=i?i.getRealUniformLocation(Xt):Xt,$t=new Float32Array(9),Jt=0;Jt<9;Jt++)$t[Jt]=t.getFloat32(n,!0),n+=4;return r.uniformMatrix3fv(Kt,Zt,$t),n;case Iu.UNIFORM_MATRIX4FV:var Qt=t.getInt32(n,!0);n+=4;var en=0!==t.getUint8(n);n+=1;for(var tn=i?i.getRealUniformLocation(Qt):Qt,nn=new Float32Array(16),rn=0;rn<16;rn++)nn[rn]=t.getFloat32(n,!0),n+=4;return r.uniformMatrix4fv(tn,en,nn),n;case Iu.ENABLE_VERTEX_ATTRIB_ARRAY:var on=t.getInt32(n,!0);return n+=4,r.enableVertexAttribArray(on),n;case Iu.DISABLE_VERTEX_ATTRIB_ARRAY:var an=t.getInt32(n,!0);return n+=4,r.disableVertexAttribArray(an),n;case Iu.VERTEX_ATTRIB_POINTER:var sn=t.getInt32(n,!0);n+=4;var un=t.getInt32(n,!0);n+=4;var ln=t.getInt32(n,!0);n+=4;var cn=0!==t.getUint8(n);n+=1;var hn=t.getInt32(n,!0);n+=4;var dn=t.getInt32(n,!0);return n+=4,r.vertexAttribPointer(sn,un,ln,cn,hn,dn),n;case Iu.VERTEX_ATTRIB_DIVISOR:return n+=8;case Iu.DRAW_ARRAYS:var fn=t.getInt32(n,!0);n+=4;var pn=t.getInt32(n,!0);n+=4;var vn=t.getInt32(n,!0);n+=4;this._gl.getParameter(this._gl.CURRENT_PROGRAM),this._gl.getParameter(this._gl.ARRAY_BUFFER_BINDING),this._gl.isContextLost();return r.drawArrays(fn,pn,vn),n;case Iu.DRAW_ELEMENTS:var yn=t.getInt32(n,!0);n+=4;var mn=t.getInt32(n,!0);n+=4;var gn=t.getInt32(n,!0);n+=4;var _n=t.getInt32(n,!0);return n+=4,r.drawElements(yn,mn,gn,_n),n;case Iu.DRAW_ARRAYS_INSTANCED:return n+=16;case Iu.DRAW_ELEMENTS_INSTANCED:return n+=20;case Iu.BIND_FRAMEBUFFER:var bn=t.getInt32(n,!0);n+=4;var wn=t.getInt32(n,!0);n+=4;var kn=i?i.getGLFramebuffer(wn):null;return r.bindFramebuffer(bn,kn||wn),n;case Iu.BIND_RENDERBUFFER:var En=t.getInt32(n,!0);n+=4;var Sn=t.getInt32(n,!0);n+=4;var An=i?i.getGLRenderbuffer(Sn):null;return r.bindRenderbuffer(En,An||Sn),n;case Iu.FRAMEBUFFER_TEXTURE2D:var xn=t.getInt32(n,!0);n+=4;var Cn=t.getInt32(n,!0);n+=4;var Tn=t.getInt32(n,!0);n+=4;var In=t.getInt32(n,!0);n+=4;var On=t.getInt32(n,!0);n+=4;var Ln=i?i.getGLTexture(In):null;return r.framebufferTexture2D(xn,Cn,Tn,Ln||In,On),n;case Iu.RENDERBUFFER_STORAGE:var Pn=t.getInt32(n,!0);n+=4;var Rn=t.getInt32(n,!0);n+=4;var Nn=t.getInt32(n,!0);n+=4;var Dn=t.getInt32(n,!0);return n+=4,r.renderbufferStorage(Pn,Rn,Nn,Dn),n;case Iu.READ_BUFFER:case Iu.TEX_STORAGE_3D:case Iu.TEX_IMAGE_3D:case Iu.TEX_SUB_IMAGE_3D:case Iu.BLIT_FRAMEBUFFER:case Iu.DRAW_RANGE_ELEMENTS:return n;case Iu.FLUSH:return r.flush(),n;case Iu.FINISH:return r.finish(),n;default:return n}}}])}();function Lu(e,t,n){return t=Vn(t),Wn(e,Pu()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Pu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pu=function(){return!!e})()}function Ru(e,t,n,r){var i=zn(Vn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Nu=function(e){function t(e,n,r){var i;return O(this,t),(i=Lu(this,t,[e,n,r])).tagName="WebGLComponent",i._sid=n,i.dom=document.createElement("canvas"),E(n,i),i._glCtx=null,i._objectManager=null,i._decoder=null,i._width=0,i._height=0,i._animFrameId=null,i._readyEmitted=!1,i}return Gn(t,e),R(t,[{key:"mounted",value:function(){Ru(t,"mounted",this,3)([]),this._ensureSize(),this._initGL(),this._checkReady()}},{key:"unmounted",value:function(){this._stopAnimLoop(),Ru(t,"unmounted",this,3)([])}},{key:"_checkReady",value:function(){var e,t,n=this;if(!this._readyEmitted&&!(!this._glCtx||this._width<=0||this._height<=0)){this._readyEmitted=!0;var r=function(){n.dispatchEvent("onReady",{})},i=null===(e=this.context)||void 0===e||null===(t=e.getModuleByName)||void 0===t?void 0:t.call(e,"UIManagerModule");i&&"function"==typeof i.addAfterCreateAction?i.addAfterCreateAction(r):requestAnimationFrame(r)}}},{key:"_ensureSize",value:function(){this._width>0&&this._height>0&&(this.dom.width=this._width,this.dom.height=this._height)}},{key:"_initGL",value:function(){if(!this._glCtx){var e={alpha:!0,antialias:!0,depth:!0,stencil:!0,premultipliedAlpha:!1};this._glCtx=this.dom.getContext("webgl",e)||this.dom.getContext("experimental-webgl",e),this._glCtx&&(this._objectManager=new Tu,this._decoder=new Ou(this._glCtx,this._objectManager))}}},{key:"updateProperty",value:function(e,n){return"width"===e?(this._width=n,void this._ensureSize()):"height"===e?(this._height=n,void this._ensureSize()):void Ru(t,"updateProperty",this,3)([e,n])}},{key:"_getGL",value:function(){return this._glCtx||this._initGL(),this._glCtx}},{key:"_getOM",value:function(){return this._objectManager||this._initGL(),this._objectManager}},{key:"getContext",value:function(e){return this._getGL()}},{key:"createShader",value:function(e){var t=e&&e[0],n=this._getGL(),r=this._getOM(),i=n.createShader(t),o=r.createShader(t);return r.setGLShader(o,i),{shaderId:o}}},{key:"shaderSource",value:function(e){var t=e&&e[0],n=e&&e[1],r=this._getGL(),i=this._getOM(),o=i.getGLShader(t);return o&&r.shaderSource(o,n),i.setShaderSource(t,n),null}},{key:"compileShader",value:function(e){var t=e&&e[0],n=this._getGL(),r=this._getOM(),i=r.getGLShader(t);return i&&n.compileShader(i),r.setShaderCompiled(t,!0),null}},{key:"getShaderParameter",value:function(e){var t=e&&e[0],n=e&&e[1],r=this._getGL(),i=this._getOM().getGLShader(t);return i?{value:r.getShaderParameter(i,n)?1:0}:{value:1}}},{key:"getShaderInfoLog",value:function(e){var t=e&&e[0],n=this._getGL(),r=this._getOM().getGLShader(t);return r?{log:n.getShaderInfoLog(r)||""}:{log:""}}},{key:"deleteShader",value:function(e){var t=e&&e[0],n=this._getGL(),r=this._getOM(),i=r.getGLShader(t);return i&&n.deleteShader(i),r.deleteShader(t),null}},{key:"createProgram",value:function(e){var t=this._getGL(),n=this._getOM(),r=t.createProgram(),i=n.createProgram();return n.setGLProgram(i,r),{programId:i}}},{key:"attachShader",value:function(e){var t=e&&e[0],n=e&&e[1],r=this._getGL(),i=this._getOM(),o=i.getGLProgram(t),a=i.getGLShader(n);return o&&a&&r.attachShader(o,a),i.attachShader(t,n),null}},{key:"linkProgram",value:function(e){var t=e&&e[0],n=this._getGL(),r=this._getOM(),i=r.getGLProgram(t);return i&&n.linkProgram(i),r.setProgramLinked(t,!0),null}},{key:"getProgramParameter",value:function(e){var t=e&&e[0],n=e&&e[1],r=this._getGL(),i=this._getOM().getGLProgram(t);return i?{value:r.getProgramParameter(i,n)?1:0}:{value:1}}},{key:"getProgramInfoLog",value:function(e){var t=e&&e[0],n=this._getGL(),r=this._getOM().getGLProgram(t);return r?{log:n.getProgramInfoLog(r)||""}:{log:""}}},{key:"deleteProgram",value:function(e){var t=e&&e[0],n=this._getGL(),r=this._getOM(),i=r.getGLProgram(t);return i&&n.deleteProgram(i),r.deleteProgram(t),null}},{key:"getAttribLocation",value:function(e){var t=e&&e[0],n=e&&e[1],r=this._getGL(),i=this._getOM(),o=i.getGLProgram(t);if(o&&n){var a=r.getAttribLocation(o,n);return i.storeAttribLocation(t,n,a),{location:a}}return{location:-1}}},{key:"getUniformLocation",value:function(e){var t=e&&e[0],n=e&&e[1],r=this._getGL(),i=this._getOM(),o=i.getGLProgram(t);if(o&&n){var a=r.getUniformLocation(o,n);if(null!==a){var s=i.generateFakeLocId();return i.storeRealUniformLocation(s,a),i.storeUniformLocation(t,n,s),{location:s}}}return{location:-1}}},{key:"createBuffer",value:function(e){var t=this._getGL(),n=this._getOM(),r=t.createBuffer(),i=n.createBuffer();return n.setGLBuffer(i,r),{bufferId:i}}},{key:"bindBuffer",value:function(e){var t=e&&e[0],n=e&&e[1],r=this._getGL(),i=this._getOM().getGLBuffer(n);return r.bindBuffer(t,i||null),null}},{key:"bufferData",value:function(e){var t=e&&e[0],n=e&&e[1],r=e&&e[2],i=this._getGL();if(i){var o=n instanceof Array?new Float32Array(n):n;i.bufferData(t,o,r)}return null}},{key:"bufferSubData",value:function(e){var t=e&&e[0],n=e&&e[1],r=e&&e[2],i=this._getGL();if(i){var o=r instanceof Array?new Float32Array(r):r;i.bufferSubData(t,n,o)}return null}},{key:"deleteBuffer",value:function(e){var t=e&&e[0],n=this._getGL(),r=this._getOM(),i=r.getGLBuffer(t);return i&&n.deleteBuffer(i),r.deleteBuffer(t),null}},{key:"createTexture",value:function(e){var t=this._getGL(),n=this._getOM(),r=t.createTexture(),i=n.createTexture();return n.setGLTexture(i,r),{textureId:i}}},{key:"deleteTexture",value:function(e){var t=e&&e[0],n=this._getGL(),r=this._getOM(),i=r.getGLTexture(t);return i&&n.deleteTexture(i),r.deleteTexture(t),null}},{key:"texImage2D",value:function(e){var t=e&&e[0],n=e&&e[1],r=e&&e[2],i=e&&e[3],o=e&&e[4],a=e&&e[5],s=e&&e[6],u=e&&e[7],l=e&&e[8],c=this._getGL();return c&&(l&&l instanceof Array?c.texImage2D(t,n,r,i,o,a,s,u,new Uint8Array(l)):c.texImage2D(t,n,r,i,o,a,s,u,null)),null}},{key:"texSubImage2D",value:function(e){var t=e&&e[0],n=e&&e[1],r=e&&e[2],i=e&&e[3],o=e&&e[4],a=e&&e[5],s=e&&e[6],u=e&&e[7],l=e&&e[8],c=this._getGL();if(c&&l){var h=l instanceof Array?new Uint8Array(l):l;c.texSubImage2D(t,n,r,i,o,a,s,u,h)}return null}},{key:"createFramebuffer",value:function(e){var t=this._getGL(),n=this._getOM(),r=t.createFramebuffer(),i=n.createFramebuffer();return n.setGLFramebuffer(i,r),{framebufferId:i}}},{key:"deleteFramebuffer",value:function(e){var t=e&&e[0],n=this._getGL(),r=this._getOM(),i=r.getGLFramebuffer(t);return i&&n.deleteFramebuffer(i),r.deleteFramebuffer(t),null}},{key:"createRenderbuffer",value:function(e){var t=this._getGL(),n=this._getOM(),r=t.createRenderbuffer(),i=n.createRenderbuffer();return n.setGLRenderbuffer(i,r),{renderbufferId:i}}},{key:"deleteRenderbuffer",value:function(e){var t=e&&e[0],n=this._getGL(),r=this._getOM(),i=r.getGLRenderbuffer(t);return i&&n.deleteRenderbuffer(i),r.deleteRenderbuffer(t),null}},{key:"readPixels",value:function(e){return{pixels:""}}},{key:"setGLVersion",value:function(e){return null}},{key:"createVertexArray",value:function(e){return{vertexArrayId:0}}},{key:"deleteVertexArray",value:function(e){return null}},{key:"getObjectManager",value:function(){return this._objectManager}},{key:"flushCommands",value:function(e){if(this._decoder&&e){var t=Array.isArray(e[0])?e[0]:e;if(Array.isArray(t)&&0!==t.length){var n=new Uint8Array(t);this._decoder.decode(n)}}}},{key:"setAnimationLoop",value:function(e){!!e&&e[0]?this._startAnimLoop():this._stopAnimLoop()}},{key:"_startAnimLoop",value:function(){var e=this;if(!this._animFrameId){var t=function(){e._animFrameId=requestAnimationFrame(t)};this._animFrameId=requestAnimationFrame(t)}}},{key:"_stopAnimLoop",value:function(){this._animFrameId&&(cancelAnimationFrame(this._animFrameId),this._animFrameId=null)}},{key:"callFunction",value:function(e,t){"flushCommands"===e?this.flushCommands(t?t[0]:null):"setAnimationLoop"===e&&this.setAnimationLoop(t?t[0]:[!1])}}])}(ca);function Du(e,t,n){return t=Vn(t),Wn(e,Mu()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Mu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mu=function(){return!!e})()}var Fu=function(e){function t(e,n,r){var i;return O(this,t),(i=Du(this,t,[e,n,r])).tagName="TransitionImageComponent",i.dom=document.createElement("div"),i.dom.style.cssText="\n display: block;\n background-size: cover;\n background-position: center;\n background-repeat: no-repeat;\n ",i._transitionDuration=300,i._currentSrc="",E(n,i),i}return Gn(t,e),R(t,[{key:"updateProperty",value:function(e,n){switch(e){case"src":case"source":this._setSrc(n);break;case"transitionDuration":case"transition-duration":this._transitionDuration="number"==typeof n?n:parseInt(n)||300;break;case"resizeMode":this._setResizeMode(n);break;default:(r=t,i="updateProperty",o=this,s=zn(Vn(1&(a=3)?r.prototype:r),i,o),2&a&&"function"==typeof s?function(e){return s.apply(o,e)}:s)([e,n])}var r,i,o,a,s}},{key:"_setSrc",value:function(e){if(!e)return this.dom.style.backgroundImage="",void(this._currentSrc="");var t="";return"string"==typeof e?t=e:"object"==typeof e&&e.uri&&(t=e.uri),(t=(0,Ke.pb)(t))!==this._currentSrc?this._currentSrc?void this._transitionToImage(t):(this.dom.style.backgroundImage="url(".concat(t,")"),void(this._currentSrc=t)):void 0}},{key:"_transitionToImage",value:function(e){var t=this,n=new Image;n.onload=function(){t.dom.style.transition="opacity ".concat(t._transitionDuration/2,"ms ease-out"),t.dom.style.opacity="0",setTimeout(function(){t.dom.style.backgroundImage="url(".concat(e,")"),t._currentSrc=e,t.dom.style.transition="opacity ".concat(t._transitionDuration/2,"ms ease-in"),t.dom.style.opacity="1",setTimeout(function(){t.dom.style.transition=""},t._transitionDuration/2)},t._transitionDuration/2)},n.onerror=function(){},n.src=e}},{key:"_setResizeMode",value:function(e){var t={contain:"contain",cover:"cover",fill:"100% 100%",center:"auto",origin:"auto"}[e]||"cover";this.dom.style.backgroundSize=t}},{key:"setNextImage",value:function(e){var t=Array.isArray(e)?e[0]:e;t&&t!==this._currentSrc&&this._transitionToImage(t)}},{key:"setNextColor",value:function(e){var t=this,n=Array.isArray(e)?e[0]:e,r=this._formatColor(n);this.dom.style.transition="opacity ".concat(this._transitionDuration/2,"ms ease-out"),this.dom.style.opacity="0",setTimeout(function(){t.dom.style.backgroundImage="",t.dom.style.backgroundColor=r,t._currentSrc="",t.dom.style.transition="opacity ".concat(t._transitionDuration/2,"ms ease-in"),t.dom.style.opacity="1",setTimeout(function(){t.dom.style.transition=""},t._transitionDuration/2)},this._transitionDuration/2)}},{key:"setTransitionTime",value:function(e){var t=Array.isArray(e)?e[0]:e;this._transitionDuration="number"==typeof t?t:parseInt(t)||300}},{key:"_formatColor",value:function(e){if("number"==typeof e){var t=(e>>24&255)/255,n=e>>8&255,r=255&e;return"rgba(".concat(e>>16&255,", ").concat(n,", ").concat(r,", ").concat(t,")")}return e}}])}(ca),Bu=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"getDeviceInfo",value:(v=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,{}));case 1:case"end":return e.stop()}},e)})),function(){return v.apply(this,arguments)})},{key:"getESSDKInfo",value:(p=l(c.mark(function e(){var t,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t={eskit_ver_code:3,runtimePath:"/"},n.g.__ES_LAST_SDK_INFO__=t,r=a.length,i=new Array(r),o=0;o<r;o++)i[o]=a[o];return e.abrupt("return",N(i,t));case 1:case"end":return e.stop()}},e)})),function(){return p.apply(this,arguments)})},{key:"getESSDKVersionCode",value:(f=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,3));case 1:case"end":return e.stop()}},e)})),function(){return f.apply(this,arguments)})},{key:"getESSDKVersionName",value:(d=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"web"));case 1:case"end":return e.stop()}},e)})),function(){return d.apply(this,arguments)})},{key:"getESPackageName",value:(h=l(c.mark(function e(){var t,n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=globalThis,n=t&&t.__CONFIG__&&t.__CONFIG__.packageName?t.__CONFIG__.packageName:"web",r=a.length,i=new Array(r),o=0;o<r;o++)i[o]=a[o];return e.abrupt("return",N(i,n));case 1:case"end":return e.stop()}},e)})),function(){return h.apply(this,arguments)})},{key:"getESMiniProgramPath",value:(u=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,""));case 1:case"end":return e.stop()}},e)})),function(){return u.apply(this,arguments)})},{key:"getESAppFilePath",value:(s=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,""));case 1:case"end":return e.stop()}},e)})),function(){return s.apply(this,arguments)})},{key:"getESAppRuntimePath",value:(a=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"/"));case 1:case"end":return e.stop()}},e)})),function(){return a.apply(this,arguments)})},{key:"getSupportSchemes",value:(o=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,[]));case 1:case"end":return e.stop()}},e)})),function(){return o.apply(this,arguments)})},{key:"sendESNativeMapEventTop",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"sendESNativeArrayEventTop",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"sendESNativeMapEventAll",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"sendESNativeArrayEventAll",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"launchESPageByArgs",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"launchESPage",value:(i=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,null));case 1:case"end":return e.stop()}},e)})),function(){return i.apply(this,arguments)})},{key:"launchNativeApp",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"launchNativeAppWithPackage",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"finish",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"finishAll",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"isModuleRegistered",value:(r=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,!0));case 1:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)})},{key:"isComponentRegistered",value:(t=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,!1));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){}}]);var e,t,r,i,o,a,s,u,h,d,f,p,v}();function ju(){var e=globalThis;return e&&e.__localStorage||e&&e.localStorage||null}function Uu(e){return Wu.apply(this,arguments)}function Wu(){return(Wu=l(c.mark(function e(t){var n,r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((n=ju())&&n.getItem){e.next=1;break}return e.abrupt("return",null);case 1:if(!(r=n.getItem(t))||"function"!=typeof r.then){e.next=3;break}return e.next=2,r;case 2:i=e.sent,e.next=4;break;case 3:i=r;case 4:return e.abrupt("return",i);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Vu(e,t){return zu.apply(this,arguments)}function zu(){return(zu=l(c.mark(function e(t,n){var r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((r=ju())&&r.setItem){e.next=1;break}return e.abrupt("return",!1);case 1:if(!(i=r.setItem(t,n))||"function"!=typeof i.then){e.next=2;break}return e.next=2,i;case 2:return e.abrupt("return",!0);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Hu=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal",this._name=""},[{key:"_key",value:function(e){return this._name?"".concat(this._name,":").concat(e):e}},{key:"initSharedPreferences",value:(d=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(this._name=String(null!=t?t:""),n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,!0));case 1:case"end":return e.stop()}},e,this)})),function(e){return d.apply(this,arguments)})},{key:"initESSharedPreferences",value:(h=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(this._name=String(null!=t?t:""),n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,!0));case 1:case"end":return e.stop()}},e,this)})),function(e){return h.apply(this,arguments)})},{key:"getBoolean",value:(u=l(c.mark(function e(t,n){var r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Uu(this._key(String(t)));case 1:for(r=e.sent,i=s.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=s[a];if(null!=r){e.next=2;break}return e.abrupt("return",N(o,!!n));case 2:if("true"!==r){e.next=3;break}return e.abrupt("return",N(o,!0));case 3:if("false"!==r){e.next=4;break}return e.abrupt("return",N(o,!1));case 4:if("1"!==r){e.next=5;break}return e.abrupt("return",N(o,!0));case 5:if("0"!==r){e.next=6;break}return e.abrupt("return",N(o,!1));case 6:return e.abrupt("return",N(o,!!n));case 7:case"end":return e.stop()}},e,this)})),function(e,t){return u.apply(this,arguments)})},{key:"putBoolean",value:(s=l(c.mark(function e(t,n){var r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Vu(this._key(String(t)),n?"true":"false");case 1:for(r=e.sent,i=s.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=s[a];return e.abrupt("return",N(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return s.apply(this,arguments)})},{key:"getInt",value:(a=l(c.mark(function e(t,n){var r,i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Uu(this._key(String(t)));case 1:for(r=e.sent,i=u.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=u[a];if(null!=r&&""!==r){e.next=2;break}return e.abrupt("return",N(o,Number(n)||0));case 2:return s=Number.parseInt(String(r),10),e.abrupt("return",N(o,Number.isFinite(s)?s:Number(n)||0));case 3:case"end":return e.stop()}},e,this)})),function(e,t){return a.apply(this,arguments)})},{key:"putInt",value:(o=l(c.mark(function e(t,n){var r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Vu(this._key(String(t)),String(0|Number(n)));case 1:for(r=e.sent,i=s.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=s[a];return e.abrupt("return",N(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return o.apply(this,arguments)})},{key:"getLong",value:(i=l(c.mark(function e(t,n){var r,i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Uu(this._key(String(t)));case 1:for(r=e.sent,i=u.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=u[a];if(null!=r&&""!==r){e.next=2;break}return e.abrupt("return",N(o,Number(n)||0));case 2:return s=Number.parseInt(String(r),10),e.abrupt("return",N(o,Number.isFinite(s)?s:Number(n)||0));case 3:case"end":return e.stop()}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"putLong",value:(r=l(c.mark(function e(t,n){var r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Vu(this._key(String(t)),String(Math.trunc(Number(n))));case 1:for(r=e.sent,i=s.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=s[a];return e.abrupt("return",N(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"getString",value:(n=l(c.mark(function e(t,n){var r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Uu(this._key(String(t)));case 1:for(r=e.sent,i=s.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=s[a];return e.abrupt("return",N(o,String(null==r?null!=n?n:"":r)));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"putString",value:(t=l(c.mark(function e(t,n){var r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Vu(this._key(String(t)),String(null!=n?n:""));case 1:for(r=e.sent,i=s.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=s[a];return e.abrupt("return",N(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,n){return t.apply(this,arguments)})},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){}}]);var e,t,n,r,i,o,a,s,u,h,d}(),Gu=window.__PROXY_BASE__||("localhost"===location.hostname||"127.0.0.1"===location.hostname?"http://localhost:3001":location.origin);function Yu(e,t){return qu.apply(this,arguments)}function qu(){return(qu=l(c.mark(function e(t,n){var r,i,o;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return Date.now(),Date.now(),e.next=1,Xu(t,n);case 1:return r=e.sent,Date.now(),e.next=2,Ku(r.packageUrl);case 2:return i=e.sent,Date.now(),o=zt(new Uint8Array(i)),Array.from(o.slice(0,4)).map(function(e){return String.fromCharCode(e)}).join(""),e.abrupt("return",o);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Xu(e,t){return Zu.apply(this,arguments)}function Zu(){return(Zu=l(c.mark(function e(t,n){var r,i,o,a,s,u,l,h,d,f,p,v;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return Date.now(),e.next=1,vn;case 1:return Date.now(),r=JSON.stringify({packageName:t,version:n}),i=(new TextEncoder).encode(r),o=Ht(i),a="".concat(Gu,"/api/app/resolve"),e.next=2,Ju("POST",a,{body:o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength),headers:{"Content-Type":"application/octet-stream"}});case 2:if(!((s=e.sent).status<200||s.status>=300)){e.next=3;break}u="Server error: ".concat(s.status);try{l=new Uint8Array(s.data),h=Wt(l),d=JSON.parse((new TextDecoder).decode(h)),u=d.error||u}catch(e){}throw new Error(u);case 3:if(Date.now(),f=new Uint8Array(s.data),p=Wt(f),(v=JSON.parse((new TextDecoder).decode(p))).packageUrl){e.next=4;break}throw new Error("Invalid response: missing packageUrl");case 4:return e.abrupt("return",{packageUrl:v.packageUrl,packageMd5:v.packageMd5||""});case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ku(e){return $u.apply(this,arguments)}function $u(){return($u=l(c.mark(function e(t){var n,r,i,o;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=Date.now(),e.prev=1,e.next=2,Ju("GET",t,{timeout:6e4});case 2:if(!((r=e.sent).status<200||r.status>=300)){e.next=3;break}throw new Error("COS download failed: ".concat(r.status));case 3:return i=r.data,r.headers["content-length"],((Date.now()-n)/1e3).toFixed(1),e.abrupt("return",i);case 4:if(e.prev=4,!(o=e.catch(1)).message||!o.message.includes("XHR timeout")&&!o.message.includes("timeout")){e.next=5;break}throw new Error("ZIP download timeout");case 5:throw o;case 6:case"end":return e.stop()}},e,null,[[1,4]])}))).apply(this,arguments)}function Ju(e,t){return Qu.apply(this,arguments)}function Qu(){return Qu=l(c.mark(function e(t,n){var r,i,o,a,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=(r=u.length>2&&void 0!==u[2]?u[2]:{}).body,o=r.headers,a=r.timeout,e.abrupt("return",new Promise(function(e,r){var u=new XMLHttpRequest;if(u.open(t,n,!0),u.responseType="arraybuffer",a&&(u.timeout=a),o)for(var l=0,c=Object.entries(o);l<c.length;l++){var h=s(c[l],2),d=h[0],f=h[1];u.setRequestHeader(d,f)}u.onload=function(){var t={},n=u.getAllResponseHeaders();n&&n.trim().split("\n").forEach(function(e){var n=e.indexOf(":");if(n>0){var r=e.slice(0,n).trim(),i=e.slice(n+1).trim();t[r.toLowerCase()]=i}}),e({status:u.status,statusText:u.statusText,data:u.response,headers:t})},u.onerror=function(){r(new Error("XHR error: ".concat(n)))},u.ontimeout=function(){r(new Error("XHR timeout: ".concat(n)))},u.send(i||null)}));case 1:case"end":return e.stop()}},e)})),Qu.apply(this,arguments)}function el(){var e=window.__ES_CLIENT_ID__;if(e)return e;var t="web-"+Date.now().toString(36)+"-"+Math.random().toString(36).substring(2,10);return window.__ES_CLIENT_ID__=t,t}function tl(e){if(!e||0===e.length)return null;var t=e[e.length-1];return t&&"function"==typeof t.resolve?t:null}var nl=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"init",value:(r=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)})},{key:"destroy",value:function(){}},{key:"killSelf",value:function(){}},{key:"getVisiblePageSize",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,{width:window.innerWidth,height:window.innerHeight})}},{key:"getAllStartParams",value:function(){for(var e=window.__DEEP_LINK_PARAMS__,t=e?JSON.stringify(e):"{}",n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=tl(r);return o&&o.resolve(t),t}},{key:"setPageTag",value:function(e){}},{key:"setPageLimit",value:function(e){}},{key:"storeData",value:function(e,t){}},{key:"getDiskSize",value:(n=l(c.mark(function e(){var t,n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=0,n=0,e.prev=1,!navigator.storage||!navigator.storage.estimate){e.next=3;break}return e.next=2,navigator.storage.estimate();case 2:r=e.sent,t=r.quota||0,n=(r.quota||0)-(r.usage||0);case 3:e.next=5;break;case 4:e.prev=4,e.catch(1);case 5:for(i=s.length,o=new Array(i),a=0;a<i;a++)o[a]=s[a];return e.abrupt("return",N(o,{total:t,available:n}));case 6:case"end":return e.stop()}},e,null,[[1,4]])})),function(){return n.apply(this,arguments)})},{key:"getSupportSchemes",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,["esapp://action/start"])}},{key:"launchEsPage",value:function(e){return this.launchNativeApp(e)}},{key:"finish",value:function(){}},{key:"finishAll",value:function(){}},{key:"launchNativeApp",value:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if("string"==typeof e)try{t=JSON.parse(e)}catch(e){var o=tl(r);return o&&o.resolve(null),N(r,null)}else t=e||{};var a=t.packageName||t.es_pkg;if(!a){var s=tl(r);return s&&s.resolve(null),N(r,null)}var u=t.args||t.uri;return this._performCrossAppLaunch(a,u,r),N(r,null)}},{key:"_performCrossAppLaunch",value:(t=l(c.mark(function e(t,n){var r,i,o,a,s,u,l,h=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n){if("string"==typeof n)try{r=JSON.parse(n)}catch(e){r={uri:n}}else r=n;sessionStorage.setItem("__CROSS_APP_ARGS__",JSON.stringify(r))}return e.next=1,Yu(t);case 1:return i=e.sent,e.next=2,this._extractAndSaveZip(i,t);case 2:(o=new URL(window.location.href)).searchParams.set("crossApp","1"),o.searchParams.delete("zip"),o.searchParams.delete("zipUrl"),o.searchParams.delete("bundle"),window.location.href=o.toString(),e.next=4;break;case 3:for(e.prev=3,e.catch(0),a=h.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=h[u];(l=tl(s))&&l.resolve(null);case 4:case"end":return e.stop()}},e,this,[[0,3]])})),function(e,n){return t.apply(this,arguments)})},{key:"_extractAndSaveZip",value:(e=l(c.mark(function e(t,n){var r,i,o,a,s,u,l;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,new Promise(function(e,t){if(window.JSZip)e(window.JSZip);else{var n=document.createElement("script");n.src="https://cdn.jsdelivr.net/npm/jszip@3.10.1/dist/jszip.min.js",n.onload=function(){return e(window.JSZip)},n.onerror=function(){return t(new Error("Failed to load JSZip"))},document.head.appendChild(n)}});case 1:if(r=e.sent,t&&0!==t.byteLength){e.next=2;break}throw new Error("Empty ZIP data");case 2:return e.next=3,r.loadAsync(t);case 3:return i=e.sent,o={},a=null,s=[],i.forEach(function(e,t){t.dir||e.includes("__MACOSX/")||e.split("/").pop().startsWith("._")||e.endsWith(".DS_Store")||s.push(t.async("uint8array").then(function(t){for(var n="",r=0;r<t.length;r++)n+=String.fromCharCode(t[r]);o[e]=btoa(n)}))}),e.next=4,Promise.all(s);case 4:if(u=Object.keys(o),(a=u.find(function(e){return e.endsWith("index.bundle")}))||(a=u.find(function(e){return e.endsWith("index.android.js")})),a||(a=u.find(function(e){return e.match(/index\.(android|hippy)\.js$/)})),a||(a=u.find(function(e){return e.endsWith(".bundle")})),a||(a=u.find(function(e){return e.endsWith(".js")})),a){e.next=5;break}throw new Error("No bundle entry found in ZIP");case 5:return e.next=6,this._openZipDB();case 6:return l=e.sent,e.next=7,new Promise(function(e,t){var r=l.transaction("files","readwrite");r.objectStore("files").put({files:o,entryFile:a,zipName:n,timestamp:Date.now()},"zip-data"),r.oncomplete=function(){return e()},r.onerror=function(){return t(r.error)}});case 7:case 8:case"end":return e.stop()}},e,this)})),function(t,n){return e.apply(this,arguments)})},{key:"_openZipDB",value:function(){return new Promise(function(e,t){var n=indexedDB.open("quicktvui-zip-cache",1);n.onerror=function(){return t(n.error)},n.onsuccess=function(){return e(n.result)},n.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains("files")||t.createObjectStore("files")}})}},{key:"executeNativeCmd",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=tl(r);return o&&o.resolve(null),N(r,null)}},{key:"launchNativeAppWithPackage",value:function(e){}},{key:"sendBroadcast",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=tl(n);return i&&i.resolve(!0),N(n,!0)}},{key:"startService",value:function(e){}},{key:"getSdkInfo",value:function(){return this.getDeviceInfo.apply(this,arguments)}},{key:"getDeviceInfo",value:function(){for(var e=function(){var e=navigator.userAgent,t="unknown",n="unknown",r="";if(/Windows/i.test(e)){n="windows";var i=e.match(/Windows NT (\d+\.?\d*)/);r=i?i[1]:""}else if(/Mac/i.test(e)){n="mac";var o=e.match(/Mac OS X (\d+[._]\d+[._]?\d*)/);r=o?o[1].replace(/_/g,"."):""}else if(/Linux/i.test(e))n="linux";else if(/Android/i.test(e)){n="android";var a=e.match(/Android (\d+\.?\d*\.?\d*)/);r=a?a[1]:""}else if(/iOS|iPhone|iPad/i.test(e)){n="ios";var s=e.match(/OS (\d+_\d+_?\d*)/);r=s?s[1].replace(/_/g,"."):""}return/Chrome/i.test(e)&&!/Edge|Edg/i.test(e)?t="chrome":/Safari/i.test(e)&&!/Chrome/i.test(e)?t="safari":/Firefox/i.test(e)?t="firefox":/Edge|Edg/i.test(e)&&(t="edge"),{browser:t,os:n,osVersion:r}}(),t=e.browser,n=e.os,r=e.osVersion,i={cid:el(),deviceType:"web",deviceModel:t,deviceBrand:"web",osName:n,osVersion:r,screenWidth:window.screen.width||0,screenHeight:window.screen.height||0,screenDensity:window.devicePixelRatio||1,platform:"web",device_name:t,device_ip:"127.0.0.1"},o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return N(a,i)}},{key:"getESId",value:function(){for(var e=el(),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,e)}},{key:"isAppInstalled",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,!1)}},{key:"isAppSystem",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,{singleData:!1,isSystem:!1})}},{key:"getAppInfo",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,{})}},{key:"getAppList",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,{system:[],user:[]})}},{key:"getAutoStartAppList",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,[])}},{key:"setAutoStartAppSwitch",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return N(r,!1)}},{key:"sendNativeEvent",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=tl(r);return o&&o.resolve(null),N(r,null)}},{key:"sendRemoteEvent",value:function(e,t){}},{key:"suspendLoadingView",value:function(e){}},{key:"unSuspendLoadingView",value:function(){}},{key:"getPropString",value:function(e,t){for(var n="string"==typeof t?t:"",r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return N(i,n)}},{key:"getPropInt",value:function(e,t){for(var n="number"==typeof t?t:0,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return N(i,n)}},{key:"getPropLong",value:function(e,t){for(var n="number"==typeof t?t:0,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return N(i,n)}},{key:"getPropBoolean",value:function(e,t){for(var n="boolean"==typeof t&&t,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return N(i,n)}},{key:"getApplicationMetaData",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,{})}},{key:"getApplicationMetaDataWithPackage",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,{})}},{key:"getActivityMetaData",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,{})}},{key:"getActivityMetaDataWithPackage",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return N(r,{})}},{key:"getReceiverMetaData",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,{})}},{key:"getReceiverMetaDataWithPackage",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return N(r,{})}},{key:"getProviderMetaData",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,{})}},{key:"getProviderMetaDataWithPackage",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return N(r,{})}},{key:"getServiceMetaData",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,{})}},{key:"getServiceMetaDataWithPackage",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return N(r,{})}},{key:"getPackageJson",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,{})}},{key:"getMemoryInfo",value:function(){var e,t=0;navigator.deviceMemory&&(t=1024*navigator.deviceMemory*1024*1024),e=t>0?Math.floor(.4*t):0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return N(r,{max:t,available:e})}},{key:"isNetworkAvailable",value:function(){for(var e="undefined"==typeof navigator||navigator.onLine,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,{singleData:e})}},{key:"isNetworkConnected",value:function(){for(var e="undefined"==typeof navigator||navigator.onLine,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,{singleData:e})}},{key:"isNetworkAvailableByDns",value:function(e){for(var t="undefined"==typeof navigator||navigator.onLine,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return N(r,{singleData:t})}},{key:"isNetworkAvailableByPing",value:function(e){for(var t="undefined"==typeof navigator||navigator.onLine,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return N(r,{singleData:t})}},{key:"isESComponentRegistered",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,!1)}},{key:"isESModuleRegistered",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,!1)}},{key:"getWsInfo",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,{enable:!1,ip:"127.0.0.1",port:0,host:""})}},{key:"callReflect",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,null)}},{key:"isShowPolicy",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,!1)}},{key:"onRouteTo",value:function(e){}}]);var e,t,n,r}();function rl(){var e=globalThis;return e&&e.__localStorage||e&&e.localStorage||null}function il(e){return ol.apply(this,arguments)}function ol(){return(ol=l(c.mark(function e(t){var n,r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((n=rl())&&n.getItem){e.next=1;break}return e.abrupt("return",null);case 1:if(!(r=n.getItem(t))||"function"!=typeof r.then){e.next=3;break}return e.next=2,r;case 2:i=e.sent,e.next=4;break;case 3:i=r;case 4:return e.abrupt("return",i);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function al(e,t){return sl.apply(this,arguments)}function sl(){return(sl=l(c.mark(function e(t,n){var r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((r=rl())&&r.setItem){e.next=1;break}return e.abrupt("return",!1);case 1:if(!(i=r.setItem(t,n))||"function"!=typeof i.then){e.next=2;break}return e.next=2,i;case 2:return e.abrupt("return",!0);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var ul=function(){return R(function e(t){O(this,e),this.context=t,this.name="AndroidSharedPreferencesModule",this.mode="normal",this._name=""},[{key:"_key",value:function(e){return this._name?"".concat(this._name,":").concat(e):e}},{key:"initSharedPreferences",value:(d=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(this._name=String(null!=t?t:""),n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,!0));case 1:case"end":return e.stop()}},e,this)})),function(e){return d.apply(this,arguments)})},{key:"initESSharedPreferences",value:(h=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(this._name=String(null!=t?t:""),n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,!0));case 1:case"end":return e.stop()}},e,this)})),function(e){return h.apply(this,arguments)})},{key:"getBoolean",value:(u=l(c.mark(function e(t,n){var r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,il(this._key(String(t)));case 1:for(r=e.sent,i=s.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=s[a];if(null!=r){e.next=2;break}return e.abrupt("return",N(o,!!n));case 2:if("true"!==r){e.next=3;break}return e.abrupt("return",N(o,!0));case 3:if("false"!==r){e.next=4;break}return e.abrupt("return",N(o,!1));case 4:if("1"!==r){e.next=5;break}return e.abrupt("return",N(o,!0));case 5:if("0"!==r){e.next=6;break}return e.abrupt("return",N(o,!1));case 6:return e.abrupt("return",N(o,!!n));case 7:case"end":return e.stop()}},e,this)})),function(e,t){return u.apply(this,arguments)})},{key:"putBoolean",value:(s=l(c.mark(function e(t,n){var r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,al(this._key(String(t)),n?"true":"false");case 1:for(r=e.sent,i=s.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=s[a];return e.abrupt("return",N(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return s.apply(this,arguments)})},{key:"getInt",value:(a=l(c.mark(function e(t,n){var r,i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,il(this._key(String(t)));case 1:for(r=e.sent,i=u.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=u[a];if(null!=r&&""!==r){e.next=2;break}return e.abrupt("return",N(o,Number(n)||0));case 2:return s=Number.parseInt(String(r),10),e.abrupt("return",N(o,Number.isFinite(s)?s:Number(n)||0));case 3:case"end":return e.stop()}},e,this)})),function(e,t){return a.apply(this,arguments)})},{key:"putInt",value:(o=l(c.mark(function e(t,n){var r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,al(this._key(String(t)),String(0|Number(n)));case 1:for(r=e.sent,i=s.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=s[a];return e.abrupt("return",N(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return o.apply(this,arguments)})},{key:"getLong",value:(i=l(c.mark(function e(t,n){var r,i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,il(this._key(String(t)));case 1:for(r=e.sent,i=u.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=u[a];if(null!=r&&""!==r){e.next=2;break}return e.abrupt("return",N(o,Number(n)||0));case 2:return s=Number.parseInt(String(r),10),e.abrupt("return",N(o,Number.isFinite(s)?s:Number(n)||0));case 3:case"end":return e.stop()}},e,this)})),function(e,t){return i.apply(this,arguments)})},{key:"putLong",value:(r=l(c.mark(function e(t,n){var r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,al(this._key(String(t)),String(Math.trunc(Number(n))));case 1:for(r=e.sent,i=s.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=s[a];return e.abrupt("return",N(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"getString",value:(n=l(c.mark(function e(t,n){var r,i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,il(this._key(String(t)));case 1:for(r=e.sent,""!==(i=String(null==r?null!=n?n:"":r))||"pluginFileBrowser.pkg"!==t&&"pluginAliDrive.pkg"!==t&&"pluginXYDrive.pkg"!==t&&"pluginWebdav.pkg"!==t&&"pluginImagequality.pkg"!==t||(i="installSuccess"),o=u.length,a=new Array(o>2?o-2:0),s=2;s<o;s++)a[s-2]=u[s];return e.abrupt("return",N(a,i));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"putString",value:(t=l(c.mark(function e(t,n){var r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,al(this._key(String(t)),String(null!=n?n:""));case 1:for(r=e.sent,i=s.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=s[a];return e.abrupt("return",N(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,n){return t.apply(this,arguments)})},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){}}]);var e,t,n,r,i,o,a,s,u,h,d}(),ll=null;function cl(){var e=globalThis;return e&&e.__CONFIG__&&e.__CONFIG__.packageName?e.__CONFIG__.packageName:"web"}function hl(){return ll||(ll={versionCode:1e4,versionName:"1.0.0",packageName:cl(),channel:"web"}),ll}var dl=function(){return R(function e(t){O(this,e),this.context=t,this.name="AndroidDevelopModule"},[{key:"init",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t&&t.length?t[t.length-1]:null,i=hl();return r&&"function"==typeof r.resolve&&r.resolve(i),i}},{key:"destroy",value:function(){ll=null}},{key:"getDevelop",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t&&t.length?t[t.length-1]:null,i=hl();return r&&"function"==typeof r.resolve&&r.resolve(i),Promise.resolve(i)}},{key:"getPackageName",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t&&t.length?t[t.length-1]:null,i=cl();return r&&"function"==typeof r.resolve&&r.resolve(i),i}},{key:"getVersionName",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t&&t.length?t[t.length-1]:null,i=hl().versionName;return r&&"function"==typeof r.resolve&&r.resolve(i),i}},{key:"getVersionCode",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t&&t.length?t[t.length-1]:null,i=hl().versionCode;return r&&"function"==typeof r.resolve&&r.resolve(i),i}},{key:"getChannel",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t&&t.length?t[t.length-1]:null,i=hl().channel;return r&&"function"==typeof r.resolve&&r.resolve(i),i}},{key:"getVendor",value:function(){return this.getChannel.apply(this,arguments)}}])}(),fl=function(){return R(function e(){O(this,e),this.name="AndroidDeviceModule"},[{key:"destroy",value:function(){}},{key:"init",value:(k=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return k.apply(this,arguments)})},{key:"getAndroidDevice",value:(w=l(c.mark(function e(){var t,n,r,i,o,a,s,u,l,h,d,f,p=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=this._getScreenInfo(),n=this._generateDeviceId(),r="web",i=this._getBrowserInfo(),e.next=1,this._getLocalIP();case 1:for(o=e.sent,a=this._generateMAC(),s=this._estimateTotalMemoryMB(),u=this._estimateAvailMemoryMB(),l={deviceId:n,deviceType:r,ipAddress:o,ethMac:"",wifiMac:a,totalMemory:s,availableMemory:u,screenWidth:t.width,screenHeight:t.height,resolution:"".concat(t.width,"x").concat(t.height),density:String(t.density),densityDpi:String(t.densityDpi),scaledDensity:String(t.scaledDensity),buildModel:i,buildBrand:"Web",buildDevice:"Browser",buildBoard:"Web",buildProduct:"quicktvui-web",buildHardware:"Web",buildManufacturer:"quicktvui",buildSerial:"",buildTags:"",buildId:"",buildTime:"",buildType:"",buildUser:"",buildBootloader:"",buildDisplay:"",buildFingerPrint:"",buildVersionIncremental:"",buildVersionBaseOS:"",buildVersionCodeName:"",buildVersionSecurityPatch:"",buildVersionPreviewSDKInt:0,buildVersionSDKInt:0,buildVersionRelease:"Web"},h=p.length,d=new Array(h),f=0;f<h;f++)d[f]=p[f];return e.abrupt("return",N(d,l));case 2:case"end":return e.stop()}},e,this)})),function(){return w.apply(this,arguments)})},{key:"getEthMac",value:(b=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,""));case 1:case"end":return e.stop()}},e)})),function(){return b.apply(this,arguments)})},{key:"getWifiMac",value:(_=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this._generateMAC()));case 1:case"end":return e.stop()}},e,this)})),function(){return _.apply(this,arguments)})},{key:"getTotalMemory",value:(g=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this._estimateTotalMemoryMB()));case 1:case"end":return e.stop()}},e,this)})),function(){return g.apply(this,arguments)})},{key:"getAvailableMemory",value:(m=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this._estimateAvailMemoryMB()));case 1:case"end":return e.stop()}},e,this)})),function(){return m.apply(this,arguments)})},{key:"getScreenWidth",value:(y=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this._getScreenInfo().width));case 1:case"end":return e.stop()}},e,this)})),function(){return y.apply(this,arguments)})},{key:"getScreenHeight",value:(v=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this._getScreenInfo().height));case 1:case"end":return e.stop()}},e,this)})),function(){return v.apply(this,arguments)})},{key:"getResolution",value:(p=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=this._getScreenInfo(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,"".concat(t.width,"x").concat(t.height)));case 1:case"end":return e.stop()}},e,this)})),function(){return p.apply(this,arguments)})},{key:"getDensity",value:(f=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this._getScreenInfo().density));case 1:case"end":return e.stop()}},e,this)})),function(){return f.apply(this,arguments)})},{key:"getDensityDpi",value:(d=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this._getScreenInfo().densityDpi));case 1:case"end":return e.stop()}},e,this)})),function(){return d.apply(this,arguments)})},{key:"getScaledDensity",value:(h=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this._getScreenInfo().scaledDensity));case 1:case"end":return e.stop()}},e,this)})),function(){return h.apply(this,arguments)})},{key:"getBuildVersionRelease",value:(u=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return u.apply(this,arguments)})},{key:"getBuildModel",value:(s=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this._getBrowserInfo()));case 1:case"end":return e.stop()}},e,this)})),function(){return s.apply(this,arguments)})},{key:"getBuildBrand",value:(a=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return a.apply(this,arguments)})},{key:"getBuildDevice",value:(o=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"Browser"));case 1:case"end":return e.stop()}},e)})),function(){return o.apply(this,arguments)})},{key:"getBuildBoard",value:(i=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return i.apply(this,arguments)})},{key:"getBuildProduct",value:(r=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"quicktvui-web"));case 1:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)})},{key:"getBuildHardware",value:(n=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"getBuildManufacturer",value:(t=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"quicktvui"));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"_getScreenInfo",value:function(){if("undefined"==typeof window)return{width:1920,height:1080,density:1,densityDpi:160,scaledDensity:1};var e=window.devicePixelRatio||1;return{width:1920,height:1080,density:e,densityDpi:Math.round(160*e),scaledDensity:e}}},{key:"_generateDeviceId",value:function(){if("undefined"!=typeof localStorage){var e=localStorage.getItem("__ES_DEVICE_ID__");return e||(e="web-"+Math.random().toString(36).substring(2,15),localStorage.setItem("__ES_DEVICE_ID__",e)),e}return"web-"+Math.random().toString(36).substring(2,15)}},{key:"_generateMAC",value:function(){for(var e="0123456789ABCDEF",t="",n=0;n<6;n++)n>0&&(t+=":"),t+=e.charAt(Math.floor(16*Math.random())),t+=e.charAt(Math.floor(16*Math.random()));return t}},{key:"_getLocalIP",value:(e=l(c.mark(function e(){return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return","");case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"_estimateTotalMemory",value:function(){return"undefined"!=typeof performance&&performance.memory&&performance.memory.jsHeapSizeLimit||1073741824}},{key:"_estimateTotalMemoryMB",value:function(){return 4096}},{key:"_estimateAvailMemory",value:function(){if("undefined"!=typeof performance&&performance.memory){var e=performance.memory.jsHeapSizeLimit||1073741824,t=performance.memory.usedJSHeapSize||0;return Math.max(0,e-t)}return 536870912}},{key:"_estimateAvailMemoryMB",value:function(){return 2048}},{key:"_getBrowserInfo",value:function(){if("undefined"==typeof navigator)return"Unknown Browser";var e=navigator.userAgent,t="Unknown Browser";e.indexOf("Firefox")>-1?t="Firefox":e.indexOf("Edg")>-1?t="Edge":e.indexOf("Chrome")>-1?t="Chrome":e.indexOf("Safari")>-1?t="Safari":(e.indexOf("Opera")>-1||e.indexOf("OPR")>-1)&&(t="Opera");var n=e.match(/(Firefox|Chrome|Safari|Edg|OPR)\/(\d+)/);return n?"".concat(n[1]," ").concat(n[2]):t}}]);var e,t,n,r,i,o,a,s,u,h,d,f,p,v,y,m,g,_,b,w,k}(),pl=(new fl,0),vl=1,yl=9,ml=1,gl=3;function _l(){if("undefined"==typeof navigator||!navigator.connection)return yl;var e=navigator.connection,t=e.type||e.effectiveType;return"wifi"===t?vl:"cellular"===t||"2g"===t||"3g"===t||"4g"===t?pl:"ethernet"===t?yl:e.effectiveType&&["4g","3g","2g","slow-2g"].includes(e.effectiveType)?pl:yl}function bl(){return"undefined"==typeof navigator||navigator.onLine}function wl(){if("undefined"==typeof navigator||!navigator.connection)return{downlink:10,effectiveType:"4g",rtt:50,saveData:!1};var e=navigator.connection;return{downlink:e.downlink||10,effectiveType:e.effectiveType||"4g",rtt:e.rtt||50,saveData:e.saveData||!1}}var kl=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"getActiveNetworkInfo",value:(n=l(c.mark(function e(){var t,n,r,i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=bl(),n=_l(),r=wl(),i={type:n,typeName:this._getTypeName(n),subtype:0,state:t?gl:ml,extraInfo:"",isAvailable:t,isConnected:t,isConnectedOrConnecting:t,isFailover:!1,isRoaming:!1,detailedState:t?1:0,describeContents:0,downlink:r.downlink,effectiveType:r.effectiveType,rtt:r.rtt,saveData:r.saveData},o=u.length,a=new Array(o),s=0;s<o;s++)a[s]=u[s];return e.abrupt("return",N(a,i));case 1:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"getWifiInfo",value:(t=l(c.mark(function e(){var t,n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=_l(),n=wl(),r={ssid:"",strength:t===vl?Math.round(n.downlink/10*100):0},i=s.length,o=new Array(i),a=0;a<i;a++)o[a]=s[a];return e.abrupt("return",N(o,r));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"_getTypeName",value:function(e){switch(e){case vl:return"WIFI";case pl:return"MOBILE";case yl:return"ETHERNET";default:return"UNKNOWN"}}},{key:"destroy",value:function(){}},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})}]);var e,t,n}(),El=(new kl,function(){return R(function e(t){O(this,e),this.context=t,this.name="WebSocketModule",this.mode="normal",this._connected=!1},[{key:"_getBuiltInModule",value:function(){return this.context.getModuleByName("websocket")}},{key:"initHandler",value:(a=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,{code:0}));case 1:case"end":return e.stop()}},e)})),function(){return a.apply(this,arguments)})},{key:"connect",value:(o=l(c.mark(function e(){var t,n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=s.length,n=new Array(t),r=0;r<t;r++)n[r]=s[r];if(i=n[0]||{},o=n[n.length-1],i.url){e.next=1;break}return e.abrupt("return",N(n,{code:-1}));case 1:if(a=this._getBuiltInModule()){e.next=2;break}return e.abrupt("return",N(n,{code:-1}));case 2:a.connect({url:i.url},o);case 3:case"end":return e.stop()}},e,this)})),function(){return o.apply(this,arguments)})},{key:"disconnect",value:(i=l(c.mark(function e(){var t,n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=a.length,n=new Array(t),r=0;r<t;r++)n[r]=a[r];return i=n[0]||{},(o=this._getBuiltInModule())&&i.id&&o.close({id:i.id}),e.abrupt("return",N(n,{code:0}));case 1:case"end":return e.stop()}},e,this)})),function(){return i.apply(this,arguments)})},{key:"sendPing",value:(r=l(c.mark(function e(){var t,n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=a.length,n=new Array(t),r=0;r<t;r++)n[r]=a[r];if(i=n[0]||{},!((o=this._getBuiltInModule())&&i.id&&i.data)){e.next=1;break}return o.send({id:i.id,data:i.data}),e.abrupt("return",N(n,{code:0}));case 1:return e.abrupt("return",N(n,{code:-1}));case 2:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"isConnected",value:(n=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,{code:this._connected?0:-1}));case 1:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"getExitMessage",value:(t=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,{code:0,data:"[]"}));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=this,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(this.context.subscribe("hippyWebsocketEvents",function(e){var t=e||{},n=t.type,r=t.id;switch(n){case"onOpen":i._connected=!0,G("WebSocketEvents",{type:"connect",id:r});break;case"onMessage":var o,a=null===(o=e.data)||void 0===o?void 0:o.data;G("WebSocketEvents",{type:"onMessage",id:r,data:"string"==typeof a?a:JSON.stringify(a||"")});break;case"onClose":i._connected=!1,G("WebSocketEvents",{type:"disconnect",id:r,data:{reason:"Connection closed"}});break;case"onError":i._connected=!1,G("WebSocketEvents",{type:"connect_error",id:r,data:{reason:e.reason||"Connection error"}})}}),t=o.length,n=new Array(t),r=0;r<t;r++)n[r]=o[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){this._connected=!1}}]);var e,t,n,r,i,o,a}()),Sl=null,Al=[],xl=!1,Cl=0,Tl="";function Il(){if(!Sl){(Sl=document.createElement("div")).id="__es_toast_container__",Sl.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 99998;\n ";var e=document.getElementById("main-container");if(e)e.appendChild(Sl);else{var t=document.getElementById("app");t?t.appendChild(Sl):(Sl.style.position="fixed",document.body.appendChild(Sl))}}return Sl}function Ol(e,t){var n=Date.now();if(!(e===Tl&&n-Cl<100)){Cl=n,Tl=e;Il();Al.push({message:e,duration:t}),Ll()}}function Ll(){if(!xl&&0!==Al.length){xl=!0;var e=Al.shift(),t=e.message,n=e.duration,r=document.createElement("div");r.className="__es_toast__",r.textContent=t,r.style.cssText="\n position: absolute;\n bottom: 100px;\n left: 50%;\n transform: translateX(-50%);\n background-color: rgba(0, 0, 0, 0.85);\n color: #ffffff;\n padding: 16px 32px;\n border-radius: 12px;\n font-size: 24px;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n max-width: 80%;\n text-align: center;\n z-index: 99999;\n pointer-events: none;\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);\n",Il().appendChild(r),r.offsetHeight,r.style.opacity="1",setTimeout(function(){r.style.opacity="0",setTimeout(function(){r.parentNode&&r.parentNode.removeChild(r),xl=!1,Ll()},200)},n)}}var Pl=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"showToast",value:function(e){"string"!=typeof e&&(e=String(e)),Ol(e,2e3)}},{key:"showLongToast",value:function(e){"string"!=typeof e&&(e=String(e)),Ol(e,3500)}},{key:"showShortToast",value:function(e){"string"!=typeof e&&(e=String(e)),Ol(e,2e3)}},{key:"destroy",value:function(){Sl&&Sl.parentNode&&(Sl.parentNode.removeChild(Sl),Sl=null),Al=[],xl=!1}},{key:"init",value:function(){return Promise.resolve(!0)}}])}(),Rl=(new Pl,"quicktvui_device_id");function Nl(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function Dl(){return Ml.apply(this,arguments)}function Ml(){return(Ml=l(c.mark(function e(){var t,n;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,localStorage.getItem(Rl);case 1:if(!(t=e.sent)){e.next=2;break}return e.abrupt("return",t);case 2:e.next=4;break;case 3:e.prev=3,e.catch(0);case 4:n=Nl();try{localStorage.setItem(Rl,n)}catch(e){}return e.abrupt("return",n);case 5:case"end":return e.stop()}},e,null,[[0,3]])}))).apply(this,arguments)}function Fl(){var e=navigator.userAgent,t="unknown",n="unknown",r="";if(/Windows/i.test(e)){n="windows";var i=e.match(/Windows NT (\d+\.?\d*)/);r=i?i[1]:""}else if(/Mac/i.test(e)){n="mac";var o=e.match(/Mac OS X (\d+[._]\d+[._]?\d*)/);r=o?o[1].replace(/_/g,"."):""}else if(/Linux/i.test(e))n="linux";else if(/Android/i.test(e)){n="android";var a=e.match(/Android (\d+\.?\d*\.?\d*)/);r=a?a[1]:""}else if(/iOS|iPhone|iPad/i.test(e)){n="ios";var s=e.match(/OS (\d+_\d+_?\d*)/);r=s?s[1].replace(/_/g,"."):""}return/Chrome/i.test(e)&&!/Edge|Edg/i.test(e)?t="chrome":/Safari/i.test(e)&&!/Chrome/i.test(e)?t="safari":/Firefox/i.test(e)?t="firefox":/Edge|Edg/i.test(e)&&(t="edge"),{browser:t,os:n,osVersion:r}}var Bl=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal",this._deviceId=null},[{key:"_getDeviceId",value:(i=l(c.mark(function e(){return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this._deviceId){e.next=2;break}return e.next=1,Dl();case 1:this._deviceId=e.sent;case 2:return e.abrupt("return",this._deviceId);case 3:case"end":return e.stop()}},e,this)})),function(){return i.apply(this,arguments)})},{key:"getRuntimeDeviceId",value:(r=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this._getDeviceId();case 1:for(t=e.sent,n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,t));case 2:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"getRuntimeDeviceType",value:(n=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"web"));case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"getRuntimeDeviceInfo",value:(t=l(c.mark(function e(){var t,n,r,i,o,a,s,u,l,h=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=Fl(),n=t.browser,r=t.os,i=t.osVersion,e.next=1,this._getDeviceId();case 1:for(o=e.sent,a={deviceId:o,deviceSerial:o,deviceType:"web",deviceModel:n,deviceBrand:"web",osName:r,osVersion:i,osApiLevel:"",screenWidth:window.screen.width||0,screenHeight:window.screen.height||0,screenDensity:window.devicePixelRatio||1,appVersion:"",appVersionCode:0,networkType:"unknown",platform:"web"},s=h.length,u=new Array(s),l=0;l<s;l++)u[l]=h[l];return e.abrupt("return",N(u,a));case 2:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"destroy",value:function(){}},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})}]);var e,t,n,r,i}(),jl=(new Bl,function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal",this.enabled=!0},[{key:"init",value:(t=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"destroy",value:function(){}},{key:"v",value:function(e){var t;if(this.enabled){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=console).log.apply(t,["[V][".concat(e,"]")].concat(r))}}},{key:"d",value:function(e){var t;if(this.enabled){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=console).debug.apply(t,["[D][".concat(e,"]")].concat(r))}}},{key:"i",value:function(e){var t;if(this.enabled){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=console).info.apply(t,["[I][".concat(e,"]")].concat(r))}}},{key:"w",value:function(e){var t;if(this.enabled){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=console).warn.apply(t,["[W][".concat(e,"]")].concat(r))}}},{key:"e",value:function(e){var t;if(this.enabled){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=console).error.apply(t,["[E][".concat(e,"]")].concat(r))}}},{key:"f",value:function(e){var t;if(this.enabled){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=console).error.apply(t,["[F][".concat(e,"]")].concat(r))}}},{key:"getEsInfo",value:(e=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t={version:"web",platform:"web"},n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,t));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"setEnabled",value:function(e){this.enabled=e}},{key:"isEnabled",value:function(){return this.enabled}}]);var e,t}());var Ul={cornerRadius:0,cornerEnabled:!1,borderColor:"#FFFFFF",borderColorEnabled:!1,borderWidth:2,borderWidthEnabled:!1,borderInset:0,borderInsetEnabled:!1,innerBorderEnabled:!0,focusScale:1};function Wl(){var e=n.g.__TV_FOCUS_MANAGER__;e&&"function"==typeof e.updateFocusConfig&&e.updateFocusConfig(Ul)}var Vl=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"setDefaultFocusBorderCorner",value:function(e){Ul.cornerRadius="number"==typeof e?e:0,Ul.cornerEnabled=!0,Wl();for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"setDefaultFocusBorderColor",value:function(e){Ul.borderColor=e||"#FFFFFF",Ul.borderColorEnabled=!0,Wl();for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"setDefaultFocusBorderWidth",value:function(e){Ul.borderWidth="number"==typeof e?e:2,Ul.borderWidthEnabled=!0,Wl();for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"setFocusBorderInsetValue",value:function(e){Ul.borderInset="number"==typeof e?e:0,Ul.borderInsetEnabled=!0,Wl();for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"setDefaultFocusInnerBorderEnable",value:function(e){Ul.innerBorderEnabled=!0===e,Wl();for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"setDefaultPlaceholderFocusScale",value:function(e){Ul.focusScale="number"==typeof e?e:1,Wl();for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,null)}},{key:"getFocusConfig",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,Ul)}},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=o.length,n=new Array(t),r=0;r<t;r++)n[r]=o[r];return(i=n&&n.length?n[n.length-1]:null)&&"function"==typeof i.resolve&&i.resolve(!0),e.abrupt("return",Promise.resolve(!0));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){}}]);var e}();new Vl;function zl(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return e?{effectiveType:e.effectiveType||"unknown",type:e.type||"unknown",downlink:e.downlink||0,rtt:e.rtt||0,saveData:e.saveData||!1}:{effectiveType:"unknown",type:"unknown",downlink:0,rtt:0,saveData:!1}}var Hl=null;function Gl(){return Hl||(Hl=function(){var e=navigator.userAgent,t=navigator.platform,n="unknown",r="";/Chrome\/(\d+\.?\d*)/i.test(e)&&!/Edge|Edg/i.test(e)?(n="Chrome",r=RegExp.$1):/Safari\/(\d+\.?\d*)/i.test(e)&&!/Chrome/i.test(e)?(n="Safari",r=RegExp.$1):/Firefox\/(\d+\.?\d*)/i.test(e)?(n="Firefox",r=RegExp.$1):/Edge?\/(\d+\.?\d*)/i.test(e)&&(n="Edge",r=RegExp.$1);var i="unknown",o="";if(/Windows NT (\d+\.?\d*)/i.test(e))i="Windows",o=RegExp.$1;else if(/Mac OS X (\d+[._]\d+[._]?\d*)/i.test(e))i="macOS",o=RegExp.$1.replace(/_/g,".");else if(/Android (\d+\.?\d*\.?\d*)/i.test(e))i="Android",o=RegExp.$1;else if(/iOS|iPhone OS|iPad/i.test(e)){i="iOS";var a=e.match(/OS (\d+_\d+_?\d*)/i);a&&(o=a[1].replace(/_/g,"."))}else/Linux/i.test(e)&&(i="Linux");return{browser:n,browserVersion:r,os:i,osVersion:o,platform:t,screenWidth:window.screen.width||0,screenHeight:window.screen.height||0,devicePixelRatio:window.devicePixelRatio||1,colorDepth:window.screen.colorDepth||24,cpuCores:navigator.hardwareConcurrency||4,memory:navigator.deviceMemory||4,ua:e}}()),Hl}var Yl=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"getDeviceBrand",value:(X=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(Gl(),t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return X.apply(this,arguments)})},{key:"getDeviceModel",value:(q=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Gl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,t.browser||"Browser"));case 1:case"end":return e.stop()}},e)})),function(){return q.apply(this,arguments)})},{key:"getDeviceCpu",value:(Y=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Gl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,"".concat(t.cpuCores," cores")));case 1:case"end":return e.stop()}},e)})),function(){return Y.apply(this,arguments)})},{key:"getDeviceCpuCores",value:(G=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Gl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,t.cpuCores));case 1:case"end":return e.stop()}},e)})),function(){return G.apply(this,arguments)})},{key:"getDeviceMemory",value:(H=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Gl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,t.memory));case 1:case"end":return e.stop()}},e)})),function(){return H.apply(this,arguments)})},{key:"getDeviceStorage",value:(z=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=o.length,n=new Array(t),r=0;r<t;r++)n[r]=o[r];if(!navigator.storage||!navigator.storage.estimate){e.next=4;break}return e.prev=1,e.next=2,navigator.storage.estimate();case 2:return i=e.sent,e.abrupt("return",N(n,i.quota||0));case 3:e.prev=3,e.catch(1);case 4:return e.abrupt("return",N(n,0));case 5:case"end":return e.stop()}},e,null,[[1,3]])})),function(){return z.apply(this,arguments)})},{key:"getDeviceResolution",value:(V=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Gl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,"".concat(t.screenWidth,"x").concat(t.screenHeight)));case 1:case"end":return e.stop()}},e)})),function(){return V.apply(this,arguments)})},{key:"getDevice5G",value:(W=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(zl(),t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,!1));case 1:case"end":return e.stop()}},e)})),function(){return W.apply(this,arguments)})},{key:"getDeviceLinkSpeed",value:(U=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=zl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,t.downlink));case 1:case"end":return e.stop()}},e)})),function(){return U.apply(this,arguments)})},{key:"getDeviceManufacture",value:(j=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return j.apply(this,arguments)})},{key:"getDeviceBoard",value:(B=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return B.apply(this,arguments)})},{key:"getDevicePlatform",value:(F=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Gl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,t.platform||"Web"));case 1:case"end":return e.stop()}},e)})),function(){return F.apply(this,arguments)})},{key:"getDeviceHard",value:(M=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return M.apply(this,arguments)})},{key:"getDeviceArchitecture",value:(P=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Gl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];if(!/arm|aarch64/i.test(t.ua)){e.next=1;break}return e.abrupt("return",N(r,"arm64"));case 1:if(!/x86_64|amd64/i.test(t.ua)){e.next=2;break}return e.abrupt("return",N(r,"x86_64"));case 2:return e.abrupt("return",N(r,"unknown"));case 3:case"end":return e.stop()}},e)})),function(){return P.apply(this,arguments)})},{key:"getDeviceClockSpeed",value:(L=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,0));case 1:case"end":return e.stop()}},e)})),function(){return L.apply(this,arguments)})},{key:"getDeviceAndroidVersion",value:(I=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Gl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];if("Android"!==t.os){e.next=1;break}return e.abrupt("return",N(r,t.osVersion));case 1:return e.abrupt("return",N(r,""));case 2:case"end":return e.stop()}},e)})),function(){return I.apply(this,arguments)})},{key:"getDeviceApiVersion",value:(T=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,0));case 1:case"end":return e.stop()}},e)})),function(){return T.apply(this,arguments)})},{key:"getDeviceAndroidId",value:(C=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,""));case 1:case"end":return e.stop()}},e)})),function(){return C.apply(this,arguments)})},{key:"getDeviceBuildId",value:(x=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"web"));case 1:case"end":return e.stop()}},e)})),function(){return x.apply(this,arguments)})},{key:"getDeviceRoot",value:(A=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,!1));case 1:case"end":return e.stop()}},e)})),function(){return A.apply(this,arguments)})},{key:"getDeviceFreeStore",value:(S=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=o.length,n=new Array(t),r=0;r<t;r++)n[r]=o[r];if(!navigator.storage||!navigator.storage.estimate){e.next=4;break}return e.prev=1,e.next=2,navigator.storage.estimate();case 2:return i=e.sent,e.abrupt("return",N(n,(i.quota||0)-(i.usage||0)));case 3:e.prev=3,e.catch(1);case 4:return e.abrupt("return",N(n,0));case 5:case"end":return e.stop()}},e,null,[[1,3]])})),function(){return S.apply(this,arguments)})},{key:"getNetworkState",value:(E=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=zl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,{connected:navigator.onLine,type:t.effectiveType}));case 1:case"end":return e.stop()}},e)})),function(){return E.apply(this,arguments)})},{key:"getNetworkType",value:(k=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=zl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,t.effectiveType));case 1:case"end":return e.stop()}},e)})),function(){return k.apply(this,arguments)})},{key:"getSSID",value:(w=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,""));case 1:case"end":return e.stop()}},e)})),function(){return w.apply(this,arguments)})},{key:"getMac",value:(b=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,""));case 1:case"end":return e.stop()}},e)})),function(){return b.apply(this,arguments)})},{key:"getIp",value:(_=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,""));case 1:case"end":return e.stop()}},e)})),function(){return _.apply(this,arguments)})},{key:"getDeviceDns",value:(g=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,""));case 1:case"end":return e.stop()}},e)})),function(){return g.apply(this,arguments)})},{key:"getWifiVersion",value:(m=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,""));case 1:case"end":return e.stop()}},e)})),function(){return m.apply(this,arguments)})},{key:"getDisplayInformation",value:(y=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Gl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,{width:t.screenWidth,height:t.screenHeight,density:t.devicePixelRatio,colorDepth:t.colorDepth}));case 1:case"end":return e.stop()}},e)})),function(){return y.apply(this,arguments)})},{key:"getGpuInfo",value:(v=l(c.mark(function e(){var t,n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=s.length,n=new Array(t),r=0;r<t;r++)n[r]=s[r];if(e.prev=1,i=document.createElement("canvas"),!(o=i.getContext("webgl")||i.getContext("experimental-webgl"))){e.next=2;break}if(!(a=o.getExtension("WEBGL_debug_renderer_info"))){e.next=2;break}return e.abrupt("return",N(n,{vendor:o.getParameter(a.UNMASKED_VENDOR_WEBGL),renderer:o.getParameter(a.UNMASKED_RENDERER_WEBGL)}));case 2:e.next=4;break;case 3:e.prev=3,e.catch(1);case 4:return e.abrupt("return",N(n,{vendor:"unknown",renderer:"unknown"}));case 5:case"end":return e.stop()}},e,null,[[1,3]])})),function(){return v.apply(this,arguments)})},{key:"getBaseInfo",value:(p=l(c.mark(function e(){var t,n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Gl(),n=zl(),r=a.length,i=new Array(r),o=0;o<r;o++)i[o]=a[o];return e.abrupt("return",N(i,{brand:"Web",model:t.browser,os:t.os,osVersion:t.osVersion,platform:t.platform,screenWidth:t.screenWidth,screenHeight:t.screenHeight,density:t.devicePixelRatio,cpuCores:t.cpuCores,memory:t.memory,networkType:n.effectiveType}));case 1:case"end":return e.stop()}},e)})),function(){return p.apply(this,arguments)})},{key:"getSystemInfo",value:(f=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Gl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,{os:t.os,osVersion:t.osVersion,browser:t.browser,browserVersion:t.browserVersion,platform:t.platform,language:navigator.language,userAgent:t.ua}));case 1:case"end":return e.stop()}},e)})),function(){return f.apply(this,arguments)})},{key:"getCpuInfo",value:(d=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Gl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,{cores:t.cpuCores,memory:t.memory}));case 1:case"end":return e.stop()}},e)})),function(){return d.apply(this,arguments)})},{key:"getAndroidInfo",value:(h=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,null));case 1:case"end":return e.stop()}},e)})),function(){return h.apply(this,arguments)})},{key:"getStoreInfo",value:(u=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=o.length,n=new Array(t),r=0;r<t;r++)n[r]=o[r];if(!navigator.storage||!navigator.storage.estimate){e.next=4;break}return e.prev=1,e.next=2,navigator.storage.estimate();case 2:return i=e.sent,e.abrupt("return",N(n,{total:i.quota||0,used:i.usage||0,free:(i.quota||0)-(i.usage||0)}));case 3:e.prev=3,e.catch(1);case 4:return e.abrupt("return",N(n,{total:0,used:0,free:0}));case 5:case"end":return e.stop()}},e,null,[[1,3]])})),function(){return u.apply(this,arguments)})},{key:"getNetInfo",value:(s=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=zl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,{online:navigator.onLine,type:t.effectiveType,downlink:t.downlink,rtt:t.rtt,saveData:t.saveData}));case 1:case"end":return e.stop()}},e)})),function(){return s.apply(this,arguments)})},{key:"getOutIp",value:(a=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,""));case 1:case"end":return e.stop()}},e)})),function(){return a.apply(this,arguments)})},{key:"getUsbInfo",value:(o=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,[]));case 1:case"end":return e.stop()}},e)})),function(){return o.apply(this,arguments)})},{key:"getBluetoothInfo",value:(i=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t="bluetooth"in navigator;for(n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,{available:t,devices:[]}));case 1:case"end":return e.stop()}},e)})),function(){return i.apply(this,arguments)})},{key:"permissionHandler",value:(r=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,{granted:!0}));case 1:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)})},{key:"getNetworkProtocol",value:(n=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"https:"===location.protocol?"https":"http"));case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"getNetworkSpeed",value:(t=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=zl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,t.downlink));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){}}]);var e,t,n,r,i,o,a,s,u,h,d,f,p,v,y,m,g,_,b,w,k,E,S,A,x,C,T,I,L,P,M,F,B,j,U,W,V,z,H,G,Y,q,X}();new Yl;function ql(e,t){return e&&e.packageName?"".concat("es_group_data_").concat(e.packageName,"_").concat(t):null}function Xl(e,t,n){var r=ql(e,t);if(!r)return Promise.resolve(n);try{var i=localStorage.getItem(r);if(i&&""!==i){var o=JSON.parse(i);if(o&&void 0!==o.data)return Promise.resolve(o.data)}}catch(e){}return Promise.resolve(n)}function Zl(e,t,n,r,i){var o=ql(e,t);if(!o)return Promise.resolve(!1);try{var a={mode:r||0,type:i,secretKey:(null==e?void 0:e.secretKey)||"",data:n};return localStorage.setItem(o,JSON.stringify(a)),Promise.resolve(!0)}catch(e){return Promise.resolve(!1)}}var Kl=0,$l=1,Jl=3,Ql=4,ec=5,tc=6,nc=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"getBoolean",value:(p=l(c.mark(function e(t,n,r){var i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Xl(t,n,r);case 1:for(i=e.sent,o=u.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=u[s];return e.abrupt("return",N(a,i));case 2:case"end":return e.stop()}},e)})),function(e,t,n){return p.apply(this,arguments)})},{key:"putBoolean",value:(f=l(c.mark(function e(t,n,r,i){var o,a,s,u,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Zl(t,n,r,i,Ql);case 1:for(o=e.sent,a=l.length,s=new Array(a>4?a-4:0),u=4;u<a;u++)s[u-4]=l[u];return e.abrupt("return",N(s,o));case 2:case"end":return e.stop()}},e)})),function(e,t,n,r){return f.apply(this,arguments)})},{key:"getInt",value:(d=l(c.mark(function e(t,n,r){var i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Xl(t,n,r);case 1:for(i=e.sent,o=u.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=u[s];return e.abrupt("return",N(a,i));case 2:case"end":return e.stop()}},e)})),function(e,t,n){return d.apply(this,arguments)})},{key:"putInt",value:(h=l(c.mark(function e(t,n,r,i){var o,a,s,u,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Zl(t,n,r,i,Kl);case 1:for(o=e.sent,a=l.length,s=new Array(a>4?a-4:0),u=4;u<a;u++)s[u-4]=l[u];return e.abrupt("return",N(s,o));case 2:case"end":return e.stop()}},e)})),function(e,t,n,r){return h.apply(this,arguments)})},{key:"getLong",value:(u=l(c.mark(function e(t,n,r){var i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Xl(t,n,r);case 1:for(i=e.sent,o=u.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=u[s];return e.abrupt("return",N(a,i));case 2:case"end":return e.stop()}},e)})),function(e,t,n){return u.apply(this,arguments)})},{key:"putLong",value:(s=l(c.mark(function e(t,n,r,i){var o,a,s,u,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Zl(t,n,r,i,$l);case 1:for(o=e.sent,a=l.length,s=new Array(a>4?a-4:0),u=4;u<a;u++)s[u-4]=l[u];return e.abrupt("return",N(s,o));case 2:case"end":return e.stop()}},e)})),function(e,t,n,r){return s.apply(this,arguments)})},{key:"getString",value:(a=l(c.mark(function e(t,n,r){var i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Xl(t,n,r);case 1:for(i=e.sent,o=u.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=u[s];return e.abrupt("return",N(a,i));case 2:case"end":return e.stop()}},e)})),function(e,t,n){return a.apply(this,arguments)})},{key:"putString",value:(o=l(c.mark(function e(t,n,r,i){var o,a,s,u,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Zl(t,n,r,i,Jl);case 1:for(o=e.sent,a=l.length,s=new Array(a>4?a-4:0),u=4;u<a;u++)s[u-4]=l[u];return e.abrupt("return",N(s,o));case 2:case"end":return e.stop()}},e)})),function(e,t,n,r){return o.apply(this,arguments)})},{key:"getArray",value:(i=l(c.mark(function e(t,n,r){var i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Xl(t,n,r);case 1:for(i=e.sent,o=u.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=u[s];return e.abrupt("return",N(a,i));case 2:case"end":return e.stop()}},e)})),function(e,t,n){return i.apply(this,arguments)})},{key:"putArray",value:(r=l(c.mark(function e(t,n,r,i){var o,a,s,u,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Zl(t,n,r,i,tc);case 1:for(o=e.sent,a=l.length,s=new Array(a>4?a-4:0),u=4;u<a;u++)s[u-4]=l[u];return e.abrupt("return",N(s,o));case 2:case"end":return e.stop()}},e)})),function(e,t,n,i){return r.apply(this,arguments)})},{key:"getMap",value:(n=l(c.mark(function e(t,n,r){var i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Xl(t,n,r);case 1:for(i=e.sent,o=u.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=u[s];return e.abrupt("return",N(a,i));case 2:case"end":return e.stop()}},e)})),function(e,t,r){return n.apply(this,arguments)})},{key:"putMap",value:(t=l(c.mark(function e(t,n,r,i){var o,a,s,u,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Zl(t,n,r,i,ec);case 1:for(o=e.sent,a=l.length,s=new Array(a>4?a-4:0),u=4;u<a;u++)s[u-4]=l[u];return e.abrupt("return",N(s,o));case 2:case"end":return e.stop()}},e)})),function(e,n,r,i){return t.apply(this,arguments)})},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){}}]);var e,t,n,r,i,o,a,s,u,h,d,f,p}(),rc=(new nc,function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.userId="",this.level=0,this.enabled=!0},[{key:"init",value:(o=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return o.apply(this,arguments)})},{key:"destroy",value:function(){}},{key:"setUserId",value:function(e){this.userId=e}},{key:"initLog",value:(i=l(c.mark(function e(t,n,r){var i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(this.level=n,i=s.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=s[a];return e.abrupt("return",N(o,!0));case 1:case"end":return e.stop()}},e,this)})),function(e,t,n){return i.apply(this,arguments)})},{key:"setLevel",value:(r=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(this.level=t,n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,!0));case 1:case"end":return e.stop()}},e,this)})),function(e){return r.apply(this,arguments)})},{key:"v",value:function(e){var t;if(this.enabled&&!(this.level>0)){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=console).log.apply(t,["[V][".concat(e,"]")].concat(r))}}},{key:"d",value:function(e){var t;if(this.enabled&&!(this.level>1)){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=console).debug.apply(t,["[D][".concat(e,"]")].concat(r))}}},{key:"i",value:function(e){var t;if(this.enabled&&!(this.level>2)){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=console).info.apply(t,["[I][".concat(e,"]")].concat(r))}}},{key:"w",value:function(e){var t;if(this.enabled&&!(this.level>3)){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=console).warn.apply(t,["[W][".concat(e,"]")].concat(r))}}},{key:"e",value:function(e){var t;if(this.enabled&&!(this.level>4)){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=console).error.apply(t,["[E][".concat(e,"]")].concat(r))}}},{key:"flush",value:function(){}},{key:"getVersion",value:(n=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,"web-1.0.0"));case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"upLoad",value:function(e){}},{key:"detectTask",value:function(){}},{key:"getSendFilePath",value:(t=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,""));case 1:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})},{key:"getAllFileInfo",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,[]));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})}]);var e,t,n,r,i,o}()),ic=0,oc=1,ac=2,sc=3,uc=4,lc=5,cc=8,hc=-100,dc=15,fc={[ic]:12,[oc]:10,[ac]:10,[sc]:12,[uc]:14,[lc]:10,[cc]:8},pc=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal",this._volumes=new Map,this._maxVolumes=new Map,this._muted=new Map,this._focusListener=null,this._currentFocus=hc;for(var n=0,r=Object.entries(fc);n<r.length;n++){var i=s(r[n],2),o=i[0],a=i[1],u="string"==typeof o?parseInt(o,10):o;this._volumes.set(u,a),this._maxVolumes.set(u,dc),this._muted.set(u,!1)}},[{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){this._volumes.clear(),this._maxVolumes.clear(),this._muted.clear(),this._focusListener=null}},{key:"requestAudioFocus",value:function(){var e,t=this,n=arguments.length>0?(e=arguments.length-1)<0||arguments.length<=e?void 0:arguments[e]:null;try{if(this._focusListener&&this._currentFocus!==hc)try{this._focusListener(-1)}catch(e){}this._focusListener=function(e){t._currentFocus=e,n&&"function"==typeof n.resolve&&n.resolve(e)},this._currentFocus=1,n&&"function"==typeof n.resolve&&n.resolve(1)}catch(e){n&&"function"==typeof n.reject&&n.reject(e.message)}}},{key:"abandonAudioFocus",value:function(){var e,t=arguments.length>0?(e=arguments.length-1)<0||arguments.length<=e?void 0:arguments[e]:null;try{if(this._focusListener){try{this._focusListener(-1)}catch(e){}this._focusListener=null}this._currentFocus=hc,t&&"function"==typeof t.resolve&&t.resolve(1)}catch(e){t&&"function"==typeof t.reject&&t.reject(e.message)}}},{key:"getStreamVoiceCallMaxVolume",value:function(){for(var e=this._maxVolumes.get(ic)||dc,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,e)}},{key:"getStreamVoiceCallVolume",value:function(){for(var e=this._volumes.get(ic)||0,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,e)}},{key:"getStreamSystemMaxVolume",value:function(){for(var e=this._maxVolumes.get(oc)||dc,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,e)}},{key:"getStreamSystemVolume",value:function(){for(var e=this._volumes.get(oc)||0,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,e)}},{key:"getStreamRingMaxVolume",value:function(){for(var e=this._maxVolumes.get(ac)||dc,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,e)}},{key:"getStreamRingVolume",value:function(){for(var e=this._volumes.get(ac)||0,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,e)}},{key:"getStreamMusicMaxVolume",value:function(){for(var e=this._maxVolumes.get(sc)||dc,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,e)}},{key:"getStreamMusicVolume",value:function(){for(var e=this._volumes.get(sc)||0,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,e)}},{key:"getStreamAlarmMaxVolume",value:function(){for(var e=this._maxVolumes.get(uc)||dc,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,e)}},{key:"getStreamAlarmVolume",value:function(){for(var e=this._volumes.get(uc)||0,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(n,e)}},{key:"getStreamMaxVolume",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.length>=2&&"number"==typeof t[0]?t[0]:sc;return N(t,this._maxVolumes.get(r)||dc)}},{key:"getStreamVolume",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.length>=2&&"number"==typeof t[0]?t[0]:sc;return N(t,this._volumes.get(r)||0)}},{key:"_parseEsArray",value:function(e){return Array.isArray(e)?e:[e]}},{key:"adjustStreamVolume",value:function(){var e=this._parseEsArray(arguments.length<=0?void 0:arguments[0]),t=null!=e[0]?e[0]:sc,n=null!=e[1]?e[1]:0;null!=e[2]&&e[2];if(!this._muted.get(t)){var r=this._volumes.get(t)||0,i=this._maxVolumes.get(t)||dc;1===n?r=Math.min(r+1,i):-1===n&&(r=Math.max(r-1,0)),this._volumes.set(t,r)}}},{key:"setStreamVolume",value:function(){var e=this._parseEsArray(arguments.length<=0?void 0:arguments[0]),t=null!=e[0]?e[0]:sc,n=null!=e[1]?e[1]:0,r=(null!=e[2]&&e[2],this._maxVolumes.get(t)||dc);this._volumes.set(t,Math.max(0,Math.min(n,r)))}},{key:"setStreamMute",value:function(){var e=this._parseEsArray(arguments.length<=0?void 0:arguments[0]),t=null!=e[0]?e[0]:sc,n=null!=e[1]&&!!e[1];this._muted.set(t,n)}}]);var e}(),vc=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.audioElement=null,this.looping=!1,this.playRate=1,this.leftVolume=1,this.rightVolume=1,this.currentUrl=""},[{key:"init",value:(u=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return u.apply(this,arguments)})},{key:"destroy",value:function(){this.audioElement&&(this.audioElement.pause(),this.audioElement.src="",this.audioElement=null)}},{key:"_getOrCreateAudioElement",value:function(){return this.audioElement||(this.audioElement=new Audio,this.audioElement.loop=this.looping),this.audioElement}},{key:"initMediaPlayer",value:function(e){this.looping=e,this._getOrCreateAudioElement().loop=e}},{key:"play",value:function(e){var t=this._getOrCreateAudioElement();this.currentUrl=e,t.src=e,t.play().catch(function(e){})}},{key:"start",value:function(){var e=this._getOrCreateAudioElement();e.src&&e.play().catch(function(e){})}},{key:"pause",value:function(){this._getOrCreateAudioElement().pause()}},{key:"resume",value:function(){this._getOrCreateAudioElement().play().catch(function(e){})}},{key:"seekTo",value:function(e){this._getOrCreateAudioElement().currentTime=e/1e3}},{key:"stop",value:function(){var e=this._getOrCreateAudioElement();e.pause(),e.currentTime=0}},{key:"setPlayRate",value:function(e){this._getOrCreateAudioElement().playbackRate=e,this.playRate=e}},{key:"setVolume",value:function(e){this._getOrCreateAudioElement().volume=e,this.leftVolume=e,this.rightVolume=e}},{key:"setLeftRightVolume",value:function(e,t){var n=(e+t)/2;this._getOrCreateAudioElement().volume=n,this.leftVolume=e,this.rightVolume=t}},{key:"reset",value:function(){var e=this._getOrCreateAudioElement();e.pause(),e.currentTime=0,e.src="",this.currentUrl=""}},{key:"release",value:function(){this.destroy()}},{key:"isPlaying",value:(s=l(c.mark(function e(){var t,n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=this._getOrCreateAudioElement(),n=!t.paused&&t.currentTime>0,r=a.length,i=new Array(r),o=0;o<r;o++)i[o]=a[o];return e.abrupt("return",N(i,n));case 1:case"end":return e.stop()}},e,this)})),function(){return s.apply(this,arguments)})},{key:"isPaused",value:(a=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=this._getOrCreateAudioElement(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,t.paused));case 1:case"end":return e.stop()}},e,this)})),function(){return a.apply(this,arguments)})},{key:"getDuration",value:(o=l(c.mark(function e(){var t,n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=this._getOrCreateAudioElement(),n=t.duration?1e3*t.duration:0,r=a.length,i=new Array(r),o=0;o<r;o++)i[o]=a[o];return e.abrupt("return",N(i,n));case 1:case"end":return e.stop()}},e,this)})),function(){return o.apply(this,arguments)})},{key:"getCurrentPosition",value:(i=l(c.mark(function e(){var t,n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=this._getOrCreateAudioElement(),n=t.currentTime?1e3*t.currentTime:0,r=a.length,i=new Array(r),o=0;o<r;o++)i[o]=a[o];return e.abrupt("return",N(i,n));case 1:case"end":return e.stop()}},e,this)})),function(){return i.apply(this,arguments)})},{key:"getBufferPercentage",value:(r=l(c.mark(function e(){var t,n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=this._getOrCreateAudioElement(),n=s.length,r=new Array(n),i=0;i<n;i++)r[i]=s[i];if(!(t.buffered.length>0&&t.duration>0)){e.next=1;break}return o=t.buffered.end(t.buffered.length-1),a=o/t.duration*100,e.abrupt("return",N(r,a));case 1:return e.abrupt("return",N(r,0));case 2:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"getCurrentPlayRate",value:(n=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this.playRate));case 1:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"getLeftVolume",value:(t=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this.leftVolume));case 1:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"getRightVolume",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this.rightVolume));case 1:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})},{key:"changeToFullScreen",value:function(e){}},{key:"requestPlayerViewLayout",value:function(){}},{key:"requestViewLayout",value:function(){}},{key:"setPlayerSize",value:function(e,t){}},{key:"setPlayerDimension",value:function(e,t,n,r,i){}},{key:"setDefinition",value:function(e){}},{key:"setDecode",value:function(e){}},{key:"setAspectRatio",value:function(e){}}]);var e,t,n,r,i,o,a,s,u}(),yc=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.playerType=1,this.mediaCodec=!0},[{key:"init",value:(n=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"destroy",value:function(){}},{key:"setPlayerType",value:function(e){this.playerType=e}},{key:"getPlayerType",value:(t=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this.playerType));case 1:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"setMediaCodec",value:function(e){this.mediaCodec=e}},{key:"getMediaCodec",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,this.mediaCodec));case 1:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})}]);var e,t,n}(),mc=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.storageListeners=[]},[{key:"init",value:(o=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return o.apply(this,arguments)})},{key:"destroy",value:function(){this.unregisterExtraStorageReceiver()}},{key:"registerExtraStorageReceiver",value:function(){}},{key:"unregisterExtraStorageReceiver",value:function(){this.storageListeners=[]}},{key:"installApkByPath",value:(i=l(c.mark(function e(t,n){var r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(r=a.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=a[o];return e.abrupt("return",N(i,!1));case 1:case"end":return e.stop()}},e)})),function(e,t){return i.apply(this,arguments)})},{key:"copyFile2Disk",value:(r=l(c.mark(function e(t,n){var r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(r=a.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=a[o];return e.abrupt("return",N(i,!1));case 1:case"end":return e.stop()}},e)})),function(e,t){return r.apply(this,arguments)})},{key:"getAppVersionCodeByPkgName",value:(n=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,-1));case 1:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"getUsbDevices",value:(t=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,[]));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"requestUsbPermission",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,!1));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})}]);var e,t,n,r,i,o}(),gc=new Map,_c=new Map,bc=function(){return R(function e(t){O(this,e),this.context=t},[{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"getCanvasInfo",value:function(e,t,n){return{version:"1.0.0",type:"2d",supportWebGL:!0,supportBitmapRenderer:!0}}},{key:"loadImage",value:function(e,t,n){var r=t&&t[0];if(!r)return{error:"No image source provided"};var i="image_"+Date.now()+"_"+Math.random().toString(36).slice(2);return new Promise(function(e){var t=new Image;t.crossOrigin="anonymous",t.onload=function(){gc.set(i,t),e({imageId:i,width:t.naturalWidth,height:t.naturalHeight})},t.onerror=function(){e({error:"Failed to load image: "+r})},t.src=r})}},{key:"createCanvas",value:function(e,t,n){var r=t&&t[0]||800,i=t&&t[1]||600,o="canvas_"+Date.now(),a=document.createElement("canvas");return a.width=r,a.height=i,_c.set(o,a),{canvasId:o,width:r,height:i}}},{key:"toDataURL",value:function(e,t,n){var r=t&&t[0],i=t&&t[1]||"image/png",o=t&&t[2]||1,a=_c.get(r);if(!a)return{error:"Canvas not found: "+r};try{return{dataURL:a.toDataURL(i,o)}}catch(e){return{error:e.message}}}},{key:"releaseImage",value:function(e,t,n){var r=t&&t[0];return r&&gc.delete(r),{success:!0}}},{key:"releaseCanvas",value:function(e,t,n){var r=t&&t[0];return r&&_c.delete(r),{success:!0}}}]);var e}();function wc(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return kc(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function kc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}(0,p.A)(bc,"name","CanvasModule");var Ec={"eskit.plugin.ali.drive":"pluginAliDrive.pkg","eskit.plugin.xiaoyou.drive":"pluginXYDrive.pkg","eskit.plugin.webdav.server":"pluginWebdav.pkg","eskit.plugin.file.browse":"pluginFileBrowser.pkg","eskit.plugin.imagequality":"pluginImagequality.pkg"};function Sc(){var e=globalThis;return e&&e.__localStorage||e&&e.localStorage||null}function Ac(e,t){return xc.apply(this,arguments)}function xc(){return(xc=l(c.mark(function e(t,n){var r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((r=Sc())&&r.setItem){e.next=1;break}return e.abrupt("return",!1);case 1:if(!(i=r.setItem(t,n))||"function"!=typeof i.then){e.next=2;break}return e.next=2,i;case 2:return e.abrupt("return",!0);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Cc=function(){return R(function e(t){O(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"install",value:(t=l(c.mark(function e(t){var n,r,i,o,a,s,u,l,h,d=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=d.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=d[i];if(Array.isArray(t)){e.next=1;break}return e.abrupt("return",N(r,null));case 1:o=wc(t),e.prev=2,o.s();case 3:if((a=o.n()).done){e.next=8;break}if(s=a.value,u=s&&s.pkg){e.next=4;break}return e.abrupt("continue",7);case 4:if(!(l=Ec[u])){e.next=6;break}return e.next=5,Ac(l,"installSuccess");case 5:e.next=7;break;case 6:case 7:e.next=3;break;case 8:e.next=10;break;case 9:e.prev=9,h=e.catch(2),o.e(h);case 10:return e.prev=10,o.f(),e.finish(10);case 11:return e.abrupt("return",N(r,null));case 12:case"end":return e.stop()}},e,null,[[2,9,10,11]])})),function(e){return t.apply(this,arguments)})},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){}}]);var e,t}(),Tc=function(){return R(function e(t){O(this,e),this.context=t,this.name="EsWebdavServerModule",this.mode="normal"},[{key:"setUDiskPermission",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n)}},{key:"getUDiskList",value:(r=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t={id:"local_storage",tryWriteStatus:!0,totalSize:137438953472,availableSize:68719476736},n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,[t]));case 1:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)})},{key:"tryWriteProbe",value:(n=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,"/web/mock/storage"));case 1:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"setSaveRoot",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n)}},{key:"getSpaceInfo",value:(t=l(c.mark(function e(t){var n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=o.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=o[i];return e.abrupt("return",N(r,{totalSize:137438953472,availableSize:68719476736}));case 1:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})},{key:"isCloudDrive",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n)}},{key:"startServer",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n)}},{key:"stopServer",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t)}},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,!0));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){}}]);var e,t,n,r}(),Ic=function(){return R(function e(t){O(this,e),this.context=t,this.name="ESFileBrowseModule",this.mode="normal",this._zoomType=0,this._scrollRatio=3,this._pptPageMode=!0,this._gotoHistory=!1},[{key:"init",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t&&t.length?t[t.length-1]:null;r&&"function"==typeof r.resolve&&r.resolve(!0)}},{key:"initFileBrowse",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n)}},{key:"canOpenFileExt",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,!1)}},{key:"openFile",value:function(e,t){}},{key:"openApkFile",value:function(e){}},{key:"openOtherFile",value:function(e,t){}},{key:"setDefaultZoomType",value:function(e){this._zoomType=e}},{key:"setScrollRatio",value:function(e){this._scrollRatio=e}},{key:"setPPTPageMode",value:function(e){this._pptPageMode=e}},{key:"gotoHistory",value:function(e){this._gotoHistory=e}}])}(),Oc=function(){return R(function e(t){O(this,e),this.context=t,this.name="AndroidPermissionModule",this.mode="normal"},[{key:"init",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t&&t.length?t[t.length-1]:null;r&&"function"==typeof r.resolve&&r.resolve(!0)}},{key:"isPermissionsGranted",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,{granted:!0,grantedList:e,deniedList:[],deniedForeverList:[]})}},{key:"isPermissionsGrantedReverse",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n&&n.length?n[n.length-1]:null;return i&&"function"==typeof i.reject&&i.reject({granted:!0,grantedList:e}),{granted:!0,grantedList:e}}},{key:"requestPermissions",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,{granted:!0,grantedList:e,deniedList:[],deniedForeverList:[]})}},{key:"requestPermissionsReverse",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n&&n.length?n[n.length-1]:null;return i&&"function"==typeof i.reject&&i.reject({granted:!0,grantedList:e}),{granted:!0,grantedList:e}}},{key:"requestPermissionListPromise",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return N(n,{granted:!0,grantedList:e})}},{key:"getEsInfo",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(t,{ES_PROP_INFO_VERSION:1,ES_PROP_INFO_ESKIT_VERSION:1})}}])}();function Lc(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Pc=["authorization"],Rc=["authorization"];function Nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nc(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Mc(){var e=globalThis.__CONFIG__||{};return e.requestBaseUrl||e.apiBaseUrl||globalThis.__XY_API_BASE__||"https://xypan.net"}function Fc(e){var t=(null==e?void 0:e.authorization)||"";return t||""}function Bc(e){var t=Object.entries(e||{}).filter(function(e){var t=s(e,2)[1];return null!=t&&""!==t});return 0===t.length?"":"?"+t.map(function(e){var t=s(e,2),n=t[0],r=t[1];return"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r))}).join("&")}function jc(e,t){return Uc.apply(this,arguments)}function Uc(){return(Uc=l(c.mark(function e(t,n){var r,i,o,a,s,u,l,h,d,f,p,v,y,m;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Mc(),i=Fc(n),o=Dc({"Content-Type":"application/json"},i?{Authorization:i.startsWith("Bearer ")?i:"Bearer ".concat(i)}:{}),a={listFiles:{path:"/file",method:"GET"},getThumbnailUrl:{path:"/file/thumb",method:"GET"},getFileInfo:{path:"/file/info",method:"GET"},deleteFiles:{path:"/file",method:"DELETE"},createDownloadUrl:{path:"/file/url",method:"POST"},createDirectLinks:{path:"/file/source",method:"PUT"},startDownload:{path:"/file/url",method:"POST"},getStorageCapacity:{path:"/user/capacity",method:"GET"}}[t]){e.next=1;break}return e.abrupt("return",{code:-1,msg:"Unknown method: ".concat(t)});case 1:return s="/api/v4".concat(a.path),u="".concat(r).concat(s),l=null,"GET"===a.method?((h=n||{}).authorization,d=Lc(h,Pc),u+=Bc(d)):((f=n||{}).authorization,p=Lc(f,Rc),l=JSON.stringify(p)),e.prev=2,e.next=3,fetch(u,{method:a.method,headers:o,body:l});case 3:if((v=e.sent).ok){e.next=4;break}return e.abrupt("return",{code:-1,msg:"HTTP ".concat(v.status,": ").concat(v.statusText)});case 4:return e.next=5,v.json();case 5:return y=e.sent,e.abrupt("return",y);case 6:return e.prev=6,m=e.catch(2),e.abrupt("return",{code:-1,msg:String(m)});case 7:case"end":return e.stop()}},e,null,[[2,6]])}))).apply(this,arguments)}function Wc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Vc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wc(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zc(e){var t=Math.floor(Date.now()/1e3);try{return Hc(e,t)}catch(e){}try{return Hc(e,t-1e3)}catch(e){}try{return Hc(e,t+1e3)}catch(e){}return""}function Hc(e,t){var n=t=Math.floor(t/1e3),r=[];if(0===e.length)return"";for(;t>0;)r.push(t%10),t=Math.floor(t/10);var i=Array.from(e),o=Array.from(e),a=!1;o.length%2==0&&(a=!0);for(var s=(o.length-1)%r.length,u=o.length,l=0;l<u;l++){var c=i.length-1-l;a?c+=r[s]*s:c=2*s*r[s]-c,c<0&&(c*=-1),c%=o.length,i[i.length-1-l]=o[c];var h=o[i.length-1-l],d=o[c];o[c]=h,o[i.length-1-l]=d,o=o.slice(0,o.length-1),a=!a,--s<0&&(s=r.length-1)}var f=i.join(""),p=f.split("|");if(p.length<1||p[0]!==n.toString())throw new Error("Invalid time flow string");return f.slice(p[0].length+1)}var Gc=function(){return R(function e(t){O(this,e),this.context=t,this.name="XyFileModule",this.mode="normal"},[{key:"listFiles",value:(s=l(c.mark(function e(t){var n,r,i,o,a,s,u,l,h=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,jc("listFiles",t);case 1:for(r=e.sent,i=(null==r?void 0:r.data)||{},o=Array.isArray(i.files)?i.files:[],a=o.map(function(e){return{id:e.id||"",name:e.name||"",type:1===e.type?"dir":"file",size:e.size||0,created_at:e.created_at||"",updated_at:e.updated_at||"",path:e.path||"",raw_json:JSON.stringify(e)}}),s=h.length,u=new Array(s>1?s-1:0),l=1;l<s;l++)u[l-1]=h[l];return e.abrupt("return",N(u,{code:null!==(n=null==r?void 0:r.code)&&void 0!==n?n:0,files:a,msg:null==r?void 0:r.msg}));case 2:case"end":return e.stop()}},e)})),function(e){return s.apply(this,arguments)})},{key:"getThumbnailUrl",value:(a=l(c.mark(function e(t){var n,r,i,o,a,s,u,l,h=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,jc("getThumbnailUrl",t);case 1:for(i=e.sent,o=(null==i||null===(n=i.data)||void 0===n?void 0:n.url)||"",a=zc(o)||o,s=h.length,u=new Array(s>1?s-1:0),l=1;l<s;l++)u[l-1]=h[l];return e.abrupt("return",N(u,{code:null!==(r=null==i?void 0:i.code)&&void 0!==r?r:0,decoded_url:a,msg:null==i?void 0:i.msg}));case 2:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)})},{key:"getFileInfo",value:(o=l(c.mark(function e(t){var n,r,i,o,a,s,u,l,h,d,f,p,v=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,jc("getFileInfo",t);case 1:for(l=e.sent,h=(null==l?void 0:l.data)||{},d=v.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=v[p];return e.abrupt("return",N(f,{code:null!==(n=null==l?void 0:l.code)&&void 0!==n?n:0,name:null!==(r=h.name)&&void 0!==r?r:"",size:null!==(i=h.size)&&void 0!==i?i:0,type:1===h.type?"dir":"file",id:null!==(o=h.id)&&void 0!==o?o:"",path:null!==(a=h.path)&&void 0!==a?a:"",created_at:null!==(s=h.created_at)&&void 0!==s?s:"",updated_at:null!==(u=h.updated_at)&&void 0!==u?u:"",msg:null==l?void 0:l.msg}));case 2:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)})},{key:"_denormalizeUriParams",value:function(e){var t=Vc({},e);if("string"==typeof t.uris)try{var n=JSON.parse(t.uris);Array.isArray(n)&&(t.uris=n)}catch(e){}delete t.uri,delete t.uris_count;for(var r=0,i=Object.keys(t);r<i.length;r++){var o=i[r];/^uri_\d+$/.test(o)&&delete t[o]}return t}},{key:"deleteFiles",value:(i=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,jc("deleteFiles",this._denormalizeUriParams(Vc(Vc({},t),{},{skip_soft_delete:!0})));case 1:for(r=e.sent,i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];return e.abrupt("return",N(o,{code:null!==(n=null==r?void 0:r.code)&&void 0!==n?n:0,msg:null==r?void 0:r.msg}));case 2:case"end":return e.stop()}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"createDownloadUrl",value:(r=l(c.mark(function e(t){var n,r,i,o,a,s,u,l,h=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,jc("createDownloadUrl",this._denormalizeUriParams(t));case 1:for(i=e.sent,o=(null==i?void 0:i.data)||{},a=Array.isArray(o.urls)?o.urls.map(function(e){return{url:e.url||"",raw_json:JSON.stringify(e)}}):[],s=h.length,u=new Array(s>1?s-1:0),l=1;l<s;l++)u[l-1]=h[l];return e.abrupt("return",N(u,{code:null!==(n=null==i?void 0:i.code)&&void 0!==n?n:0,url:(null===(r=a[0])||void 0===r?void 0:r.url)||"",urls:a,urls_count:a.length,msg:null==i?void 0:i.msg}));case 2:case"end":return e.stop()}},e,this)})),function(e){return r.apply(this,arguments)})},{key:"createDirectLinks",value:(n=l(c.mark(function e(t){var n,r,i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,jc("createDirectLinks",this._denormalizeUriParams(t));case 1:for(r=e.sent,i=(null==r?void 0:r.data)||[],o=u.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=u[s];return e.abrupt("return",N(a,{code:null!==(n=null==r?void 0:r.code)&&void 0!==n?n:0,links:Array.isArray(i)?i.map(function(e){return e.link||""}):[],msg:null==r?void 0:r.msg}));case 2:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"getStorageCapacity",value:(t=l(c.mark(function e(t){var n,r,i,o,a,s,u,l,h,d=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,jc("getStorageCapacity",t);case 1:for(a=e.sent,s=(null==a?void 0:a.data)||{},u=d.length,l=new Array(u>1?u-1:0),h=1;h<u;h++)l[h-1]=d[h];return e.abrupt("return",N(l,{code:null!==(n=null==a?void 0:a.code)&&void 0!==n?n:0,total:null!==(r=s.total)&&void 0!==r?r:0,used:null!==(i=s.used)&&void 0!==i?i:0,storage_pack_total:null!==(o=s.storage_pack_total)&&void 0!==o?o:0,msg:null==a?void 0:a.msg}));case 2:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){}}]);var e,t,n,r,i,o,a,s}();function Yc(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return qc(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function qc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Xc=new Map,Zc=0;function Kc(e){var t,n=(null===(t=globalThis.qt)||void 0===t?void 0:t.eventBus)||null;n&&"function"==typeof n.emit&&n.emit("OnXyFileDownloadEvent",e)}function $c(e,t,n){var r=Xc.get(e);if(r){var i=0;r.progress=0,r.status="downloading",Kc({task_id:e,uri:r.uri,url:t,name:n||"",status:"downloading",action:"started",progress:0,downloaded_size:0,total_size:r.totalSize}),r.timer=setInterval(function(){var o=Xc.get(e);o&&"paused"!==o.status&&"stopped"!==o.status&&((i+=15*Math.random()+5)>=100?(i=100,clearInterval(r.timer),r.timer=null,r.status="success",r.progress=100,Kc({task_id:e,uri:r.uri,url:t,name:n||"",status:"success",action:"success",progress:100,downloaded_size:r.totalSize,total_size:r.totalSize,local_path:"/web/downloads/".concat(n||e),local_uri:"/web/downloads/".concat(n||e)})):(r.progress=Math.round(i),Kc({task_id:e,uri:r.uri,url:t,name:n||"",status:"downloading",action:"progress",progress:r.progress,downloaded_size:Math.round(r.totalSize*i/100),total_size:r.totalSize})))},800)}}var Jc=function(){return R(function e(t){O(this,e),this.context=t,this.name="XyFileDownloadModule",this.mode="normal"},[{key:"startDownload",value:(o=l(c.mark(function e(t){var n,r,i,o,a,s,u,l,h,d,f=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o="web_xy_".concat(++Zc,"_").concat(Date.now()),Xc.set(o,{task_id:o,uri:(null==t?void 0:t.uri)||"",url:(null==t?void 0:t.url)||"",name:(null==t?void 0:t.name)||"",status:"accepted",progress:0,totalSize:52428800,timer:null,localPath:""}),e.next=1,jc("startDownload",t);case 1:for(a=e.sent,s=(null==a||null===(n=a.data)||void 0===n?void 0:n.url)||(null==t?void 0:t.url)||"",u=(null==t||null===(r=t.uri)||void 0===r?void 0:r.split("/").pop())||"file_".concat(o),$c(o,s,u),l=f.length,h=new Array(l>1?l-1:0),d=1;d<l;d++)h[d-1]=f[d];return e.abrupt("return",N(h,{code:null!==(i=null==a?void 0:a.code)&&void 0!==i?i:0,task_id:o,msg:null==a?void 0:a.msg}));case 2:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)})},{key:"pauseDownload",value:(i=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for((n=null==t?void 0:t.task_id)&&Xc.has(n)&&((r=Xc.get(n)).status="paused",r.timer&&(clearInterval(r.timer),r.timer=null),Kc({task_id:n,status:"paused",action:"paused",progress:r.progress})),i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];return e.abrupt("return",N(o,{code:0}));case 1:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)})},{key:"stopDownload",value:(r=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for((n=null==t?void 0:t.task_id)&&Xc.has(n)&&((r=Xc.get(n)).status="stopped",r.timer&&(clearInterval(r.timer),r.timer=null),Kc({task_id:n,status:"stopped",action:"stopped",progress:r.progress})),i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];return e.abrupt("return",N(o,{code:0}));case 1:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)})},{key:"getCurrentTask",value:(n=l(c.mark(function e(t){var n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=null==t?void 0:t.task_id,r=n?Xc.get(n):null,i=s.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=s[a];if(r){e.next=1;break}return e.abrupt("return",N(o,{code:0,has_task:!1}));case 1:return e.abrupt("return",N(o,{code:0,has_task:!0,task_id:r.task_id,uri:r.uri,url:r.url,name:r.name,status:r.status,progress:r.progress,local_path:r.localPath}));case 2:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"getDownloadTasks",value:(t=l(c.mark(function e(){var t,n,r,i,o,a,s,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=[],n=Yc(Xc.values());try{for(n.s();!(r=n.n()).done;)"success"!==(i=r.value).status&&"stopped"!==i.status&&t.push({task_id:i.task_id,uri:i.uri,url:i.url,name:i.name,status:i.status,progress:i.progress})}catch(e){n.e(e)}finally{n.f()}for(o=u.length,a=new Array(o),s=0;s<o;s++)a[s]=u[s];return e.abrupt("return",N(a,{code:0,count:t.length,tasks:JSON.stringify(t)}));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){var e,t=Yc(Xc.values());try{for(t.s();!(e=t.n()).done;){var n=e.value;n.timer&&clearInterval(n.timer)}}catch(e){t.e(e)}finally{t.f()}Xc.clear()}}]);var e,t,n,r,i,o}();const Qc={modules:{XyFileModule:Gc,XyFileDownloadModule:Jc},namespaces:["xiaoyou.drive"]};var eh=0,th=2,nh=3,rh=4,ih=[],oh=function(){return R(function e(){O(this,e),this._started=!1,this._channel=null,this._localIp="127.0.0.1",this._localPort=38838,this._clientConnected=!1,this._clientInfo={ip:"",port:0}},[{key:"_resolveLocalIp",value:(t=l(c.mark(function e(){var t,n;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=window.location.hostname)||"localhost"===t||"127.0.0.1"===t||"0.0.0.0"===t){e.next=1;break}return this._localIp=t,e.abrupt("return");case 1:return e.prev=1,e.next=2,new Promise(function(e){var t=new RTCPeerConnection({iceServers:[]});t.createDataChannel(""),t.onicecandidate=function(n){if(!n.candidate)return t.close(),void e(null);var r=n.candidate.candidate.match(/(\d+\.\d+\.\d+\.\d+)/);if(r){var i=r[1];(i.startsWith("192.")||i.startsWith("10.")||i.startsWith("172."))&&(t.close(),e(i))}},t.createOffer().then(function(e){return t.setLocalDescription(e)}).catch(function(){}),setTimeout(function(){t.close(),e(null)},3e3)});case 2:(n=e.sent)&&(this._localIp=n),e.next=4;break;case 3:e.prev=3,e.catch(1);case 4:case"end":return e.stop()}},e,this,[[1,3]])})),function(){return t.apply(this,arguments)})},{key:"start",value:(e=l(c.mark(function e(t){var n=this;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._started){e.next=1;break}return e.abrupt("return");case 1:return e.next=2,this._resolveLocalIp();case 2:try{this._channel=new BroadcastChannel("es-xy-ws"),this._channel.onmessage=function(e){var r=e.data;r&&"connect"===r.type?(n._clientConnected=!0,n._clientInfo={ip:r.ip||"",port:r.port||0},t&&t({status:th,ip:n._clientInfo.ip,port:String(n._clientInfo.port)})):r&&"disconnect"===r.type?(n._clientConnected=!1,n._clientInfo={ip:"",port:0},t&&t({status:nh})):r&&"message"===r.type&&G("OnXyWebSocketMessage",r.payload||"")},this._started=!0,t&&t({status:eh,ip:this._localIp,port:String(this._localPort)})}catch(e){t&&t({status:rh,msg:e.message})}case 3:case"end":return e.stop()}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"stop",value:function(){this._started&&(this._channel&&(this._channel.close(),this._channel=null),this._started=!1,this._clientConnected=!1,this._clientInfo={ip:"",port:0})}},{key:"getAddress",value:function(){return{ip:this._localIp,port:String(this._localPort)}}},{key:"getClientInfo",value:function(){return this._clientInfo}},{key:"sendMessage",value:function(e){ih.length>=200&&ih.shift(),ih.push({time:Date.now(),msg:e}),this._channel&&this._channel.postMessage({type:"message",payload:e}),window.dispatchEvent(new CustomEvent("esXyMessage",{detail:e}))}},{key:"getMessageBuffer",value:function(){return[].concat(ih)}},{key:"isStarted",value:function(){return this._started}},{key:"hasClient",value:function(){return this._clientConnected}}]);var e,t}(),ah=null;var sh=50,uh=function(){return R(function e(t){O(this,e),this.context=t,this.name="EsXyNativeModule",this.mode="normal",this._server=(ah||(ah=new oh),ah)},[{key:"init",value:(d=l(c.mark(function e(){var t=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.startXyWxServer.apply(this,t);case 1:case"end":return e.stop()}},e,this)})),function(){return d.apply(this,arguments)})},{key:"startXyWxServer",value:(h=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this._server.start(function(e){G("OnWebSocketStatusListener",e)});case 1:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,{code:0}));case 2:case"end":return e.stop()}},e,this)})),function(){return h.apply(this,arguments)})},{key:"stopXyWxServer",value:(u=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(this._server.stop(),G("OnWebSocketStatusListener",{status:nh}),t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,{code:0}));case 1:case"end":return e.stop()}},e,this)})),function(){return u.apply(this,arguments)})},{key:"getXyWsAddress",value:(s=l(c.mark(function e(){var t,n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=this._server.getAddress(),n={ip:t.ip,port:t.port},r=a.length,i=new Array(r),o=0;o<r;o++)i[o]=a[o];return e.abrupt("return",N(i,n));case 1:case"end":return e.stop()}},e,this)})),function(){return s.apply(this,arguments)})},{key:"getClientInfo",value:(a=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=this._server.getClientInfo(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,{ip:t.ip||"",port:t.port||0}));case 1:case"end":return e.stop()}},e,this)})),function(){return a.apply(this,arguments)})},{key:"sendMessage",value:(o=l(c.mark(function e(){var t,n,r,i,o,a=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=a.length,n=new Array(t),r=0;r<t;r++)n[r]=a[r];return i=n[0]||{},o="string"==typeof i?i:JSON.stringify(i),this._server.sendMessage(o),e.abrupt("return",N(n,{code:0}));case 1:case"end":return e.stop()}},e,this)})),function(){return o.apply(this,arguments)})},{key:"sendKeyEvent",value:(i=l(c.mark(function e(){var t,n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=s.length,n=new Array(t),r=0;r<t;r++)n[r]=s[r];return i=n[0]||{},(o="number"==typeof i?i:i.keyCode||0)&&(a={19:"ArrowUp",20:"ArrowDown",21:"ArrowLeft",22:"ArrowRight",23:"Enter",66:"Enter",67:"Backspace",4:"Escape",82:"ContextMenu",85:"MediaPlayPause",86:"MediaStop",87:"MediaTrackNext",88:"MediaTrackPrevious",89:"MediaRewind",90:"MediaFastForward",24:"VolumeUp",25:"VolumeDown"}[o]||"")&&(document.dispatchEvent(new KeyboardEvent("keydown",{key:a,keyCode:o,code:a,bubbles:!0,cancelable:!0})),document.dispatchEvent(new KeyboardEvent("keyup",{key:a,keyCode:o,code:a,bubbles:!0,cancelable:!0}))),e.abrupt("return",N(n,{code:0}));case 1:case"end":return e.stop()}},e)})),function(){return i.apply(this,arguments)})},{key:"volumeUp",value:(r=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=o.length,n=new Array(t),r=0;r<t;r++)n[r]=o[r];return"boolean"==typeof(i=n[0]||{})||i.isShowUI,sh=Math.min(sh+5,100),this._dispatchVolumeEvent(sh),e.abrupt("return",N(n,{code:0}));case 1:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"volumeDown",value:(n=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=o.length,n=new Array(t),r=0;r<t;r++)n[r]=o[r];return"boolean"==typeof(i=n[0]||{})||i.isShowUI,sh=Math.max(sh-5,0),this._dispatchVolumeEvent(sh),e.abrupt("return",N(n,{code:0}));case 1:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"getCurrentVolume",value:(t=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,sh));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"getMaxVolume",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",N(n,100));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"_dispatchVolumeEvent",value:function(e){window.dispatchEvent(new CustomEvent("esXyVolumeChanged",{detail:{volume:e,maxVolume:100}}))}},{key:"destroy",value:function(){this._server&&this._server.stop()}}]);var e,t,n,r,i,o,a,s,u,h,d}();const lh={modules:{EsXyNativeModule:uh},namespaces:[]};function ch(){return new Promise(function(e){try{var t=new RTCPeerConnection({iceServers:[]});t.createDataChannel("");var n=!1;t.onicecandidate=function(r){if(!n){if(!r.candidate)return t.close(),void(n||(n=!0,e(null)));var i=r.candidate.candidate.match(/(\d+\.\d+\.\d+\.\d+)/);if(i){var o=i[1];(o.startsWith("192.")||o.startsWith("10.")||o.startsWith("172."))&&(n=!0,t.close(),e(o))}}},t.createOffer().then(function(e){return t.setLocalDescription(e)}).catch(function(){}),setTimeout(function(){n||(n=!0,t.close(),e(null))},3e3)}catch(t){e(null)}})}function hh(){return dh.apply(this,arguments)}function dh(){return(dh=l(c.mark(function e(){var t,n;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,ch();case 1:if(!(t=e.sent)){e.next=2;break}return e.abrupt("return",t);case 2:if(!(n=window.location.hostname)||"localhost"===n||"127.0.0.1"===n||"0.0.0.0"===n){e.next=3;break}return e.abrupt("return",n);case 3:return e.abrupt("return","127.0.0.1");case 4:return e.prev=4,e.catch(0),e.abrupt("return","127.0.0.1");case 5:case"end":return e.stop()}},e,null,[[0,4]])}))).apply(this,arguments)}function fh(e){switch(e){case"android.hardware.camera":case"android.hardware.microphone":return!(!navigator.mediaDevices||"function"!=typeof navigator.mediaDevices.enumerateDevices);case"android.hardware.location.gps":return"geolocation"in navigator;case"android.hardware.wifi":return!(!navigator.connection||!navigator.connection.type);default:return!1}}var ph=function(){return R(function e(t){O(this,e),this.context=t,this.name="EsIPAddressModule",this.mode="normal"},[{key:"getLocalIp",value:(n=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,hh();case 1:for(t=e.sent,n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,t));case 2:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"isHasPermission",value:(t=l(c.mark(function e(){var t,n,r,i,o,a,s=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=s.length,n=new Array(t),r=0;r<t;r++)n[r]=s[r];return i=n[0]||{},o="string"==typeof i?i:i.permissionStr||"",a=fh(o),e.abrupt("return",N(n,a));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){}}]);var e,t,n}();const vh={modules:{EsIPAddressModule:ph},namespaces:[]};var yh="quicktvui_device_id";function mh(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function gh(){return _h.apply(this,arguments)}function _h(){return(_h=l(c.mark(function e(){var t,n;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,localStorage.getItem(yh);case 1:if(!(t=e.sent)){e.next=2;break}return e.abrupt("return",t);case 2:e.next=4;break;case 3:e.prev=3,e.catch(0);case 4:n=mh();try{localStorage.setItem(yh,n)}catch(e){}return e.abrupt("return",n);case 5:case"end":return e.stop()}},e,null,[[0,3]])}))).apply(this,arguments)}var bh=function(){return R(function e(t){O(this,e),this.context=t,this.name="DeviceDumModule",this.mode="normal"},[{key:"getDeviceDum",value:(t=l(c.mark(function e(){var t,n,r,i,o=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,gh();case 1:for(t=e.sent,n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",N(r,t));case 2:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"init",value:(e=l(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",D(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){}}]);var e,t}();var wh=[Qc,lh,vh,{modules:{DeviceDumModule:bh},namespaces:[]}],kh={},Eh=new Set;function Sh(e,t,n){return t=Vn(t),Wn(e,Ah()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Ah(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ah=function(){return!!e})()}wh.forEach(function(e){Object.assign(kh,e.modules||{}),(e.namespaces||[]).forEach(function(e){return Eh.add(e)})});var xh=function(e){function t(e,n,r){var i;return O(this,t),(i=Sh(this,t,[e,n,r])).tagName="text-v2",i}return Gn(t,e),R(t,[{key:"updateProperty",value:function(e,n){switch(e){case"fontPath":this._fontPath=n;break;case"fontWeight":this.dom&&(this.dom.style.fontWeight=n);break;case"fontStyle":this.dom&&(this.dom.style.fontStyle=n);break;case"letterSpacing":this.dom&&(this.dom.style.letterSpacing="number"==typeof n?"".concat(n,"px"):n);break;case"lineHeight":this.dom&&(this.dom.style.lineHeight="number"==typeof n?"".concat(n,"px"):n);break;case"textDecoration":this.dom&&(this.dom.style.textDecoration=n);break;case"textShadow":this.dom&&(this.dom.style.textShadow=n);break;default:(r=t,i="updateProperty",o=this,s=zn(Vn(1&(a=3)?r.prototype:r),i,o),2&a&&"function"==typeof s?function(e){return s.apply(o,e)}:s)([e,n])}var r,i,o,a,s}}])}(Sa);function Ch(e,t,n){return t=Vn(t),Wn(e,Th()?Reflect.construct(t,n||[],Vn(e).constructor):t.apply(e,n))}function Th(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Th=function(){return!!e})()}var Ih={ES_PLAYER_STATE_IDLE:0,ES_PLAYER_STATE_PREPARING:1,ES_PLAYER_STATE_PREPARED:2,ES_PLAYER_STATE_BUFFER_START:3,ES_PLAYER_STATE_BUFFER_END:4,ES_PLAYER_STATE_PLAYING:5,ES_PLAYER_STATE_SEEK_START:6,ES_PLAYER_STATE_SEEK_COMPLETED:7,ES_PLAYER_STATE_PAUSED:8,ES_PLAYER_STATE_RESUMED:9,ES_PLAYER_STATE_BEFORE_STOP:10,ES_PLAYER_STATE_STOP:11,ES_PLAYER_STATE_PLAYBACK_COMPLETED:12,ES_PLAYER_STATE_ERROR:13,ES_PLAYER_STATE_VIDEO_SIZE_CHANGED:14,ES_PLAYER_STATE_PLAYER_VIEW_CHANGED:15,ES_PLAYER_STATE_AD_START:16,ES_PLAYER_STATE_AD_END:17,ES_PLAYER_STATE_AD_SKIP:18,ES_PLAYER_STATE_AD_PAUSED:19,ES_PLAYER_STATE_AUTHORIZED:20,ES_PLAYER_STATE_SET_PLAY_RATE_SUCCESS:21,ES_PLAYER_STATE_SET_PLAY_RATE_ERROR:22,ES_PLAYER_STATE_AD_RESUMED:23,ES_PLAYER_STATE_AD_LOADED:24,ES_PLAYER_STATE_AD_TIME:25,ES_PLAYER_STATE_PLAYER_INITIALIZED:26,ES_PLAYER_STATE_TIMED_TEXT_CHANGED:27,ES_PLAYER_STATE_PLAYER_CLICKABLE:28,ES_PLAYER_STATE_INITIALIZE_SUCCESS:29,ES_PLAYER_STATE_INITIALIZE_ERROR:30},Oh=function(e){function t(e,n,r){var i;return O(this,t),(i=Ch(this,t,[e,n,r])).tagName="IJKPlayerComponent",i.dom=document.createElement("video"),i.dom.setAttribute("data-component-name","IJKPlayerComponent"),i.dom.id=String(n),i.dom.style.cssText="\n width: 100%;\n height: 100%;\n object-fit: contain;\n background: #000;\n ",i.dom.playsInline=!0,i._playerState=Ih.ES_PLAYER_STATE_IDLE,i._url="",i._volume=1,i._muted=!1,i._loop=!1,i._playbackRate=1,i._aspectRatio=0,i._positionListeners=[],i._destroyed=!1,i._progressCallback=null,i._durationCallback=null,i._bufferPercentCallback=null,i._isSeeking=!1,i._isBuffering=!1,i._playerType=1,i._decode=0,i._autoPlay=!0,E(n,i),i._bindVideoEvents(),i}return Gn(t,e),R(t,[{key:"_bindVideoEvents",value:function(){var e=this,t=this.dom;t.addEventListener("play",function(){e._playerState=Ih.ES_PLAYER_STATE_PLAYING,e._dispatchPlayerStatusChanged()}),t.addEventListener("pause",function(){e._playerState=Ih.ES_PLAYER_STATE_PAUSED,e._dispatchPlayerStatusChanged()}),t.addEventListener("ended",function(){e._playerState=Ih.ES_PLAYER_STATE_COMPLETED,e._dispatchPlayerStatusChanged(),e._dispatchEvent("onPlayerCompleted")}),t.addEventListener("error",function(t){var n,r;e._playerState=Ih.ES_PLAYER_STATE_ERROR,e._dispatchEvent("onPlayerError",{errorCode:(null===(n=t.target.error)||void 0===n?void 0:n.code)||-1,errorMessage:(null===(r=t.target.error)||void 0===r?void 0:r.message)||"Video error"}),e._dispatchPlayerStatusChanged()}),t.addEventListener("loadedmetadata",function(){e._playerState=Ih.ES_PLAYER_STATE_PREPARED,e._dispatchPlayerStatusChanged(),e._dispatchAspectRatioChanged(),e._dispatchEvent("onPlayerPrepared"),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Ih.ES_PLAYER_STATE_VIDEO_SIZE_CHANGED,playerState:Ih.ES_PLAYER_STATE_VIDEO_SIZE_CHANGED,playerWidth:t.videoWidth||0,playerHeight:t.videoHeight||0}),!1!==e._autoPlay&&t.play().catch(function(){})}),t.addEventListener("canplay",function(){}),t.addEventListener("loadstart",function(){}),t.addEventListener("canplaythrough",function(){}),t.addEventListener("loadstart",function(){}),t.addEventListener("progress",function(){}),t.addEventListener("canplay",function(){e._playerState<Ih.ES_PLAYER_STATE_PREPARED&&(e._playerState=Ih.ES_PLAYER_STATE_PREPARED,e._dispatchPlayerStatusChanged())}),t.addEventListener("timeupdate",function(){e._dispatchPositionChanged()}),t.addEventListener("volumechange",function(){var n=t.volume;e._dispatchEvent("onPlayerVolumeChanged",{leftVolume:n,rightVolume:n}),e._dispatchEvent("onPlayerLeftVolumeChanged",n),e._dispatchEvent("onPlayerRightVolumeChanged",n)}),t.addEventListener("ratechange",function(){e._dispatchEvent("onPlayerPlayRateChanged",{playRate:t.playbackRate.toString()}),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Ih.ES_PLAYER_STATE_SET_PLAY_RATE_SUCCESS,playerState:Ih.ES_PLAYER_STATE_SET_PLAY_RATE_SUCCESS})}),t.addEventListener("waiting",function(){e._dispatchEvent("onPlayerBufferStart"),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Ih.ES_PLAYER_STATE_BUFFER_START,playerState:Ih.ES_PLAYER_STATE_BUFFER_START})}),t.addEventListener("canplaythrough",function(){e._dispatchEvent("onPlayerBufferEnd"),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Ih.ES_PLAYER_STATE_BUFFER_END,playerState:Ih.ES_PLAYER_STATE_BUFFER_END})}),t.addEventListener("playing",function(){e._dispatchEvent("onPlayerResumed"),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Ih.ES_PLAYER_STATE_RESUMED,playerState:Ih.ES_PLAYER_STATE_RESUMED})}),t.addEventListener("seeking",function(){e._dispatchEvent("onPlayerSeekStart"),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Ih.ES_PLAYER_STATE_SEEK_START,playerState:Ih.ES_PLAYER_STATE_SEEK_START})}),t.addEventListener("seeked",function(){e._dispatchEvent("onPlayerSeekCompleted"),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Ih.ES_PLAYER_STATE_SEEK_COMPLETED,playerState:Ih.ES_PLAYER_STATE_SEEK_COMPLETED})}),t.addEventListener("durationchange",function(){var n=Math.floor(1e3*t.duration);if(e._durationCallback)try{e._durationCallback(n)}catch(e){}}),t.addEventListener("progress",function(){if(t.buffered.length>0){var n=t.buffered.end(t.buffered.length-1),r=t.duration;if(r>0){var i=n/r*100;if(e._bufferPercentCallback)try{e._bufferPercentCallback(i)}catch(e){}}}}),t.addEventListener("loadstart",function(){e._playerState=Ih.ES_PLAYER_STATE_PREPARING,e._dispatchEvent("onPlayerPreparing"),e._dispatchPlayerStatusChanged()})}},{key:"_dispatchPlayerStatusChanged",value:function(){if(this.dom){var e={playerStatus:this._playerState,playerState:this._playerState,playerWidth:this.dom.videoWidth||0,playerHeight:this.dom.videoHeight||0};this._dispatchEvent("onPlayerStatusChanged",e)}}},{key:"_dispatchPositionChanged",value:function(){if(this.dom){var e=Math.floor(1e3*this.dom.currentTime);if(this._progressCallback)try{this._progressCallback(e)}catch(e){}}}},{key:"_dispatchAspectRatioChanged",value:function(){if(this.dom){var e=this.dom.videoWidth,t=this.dom.videoHeight;if(e&&t){var n=[0,1,2,3,4];this._dispatchEvent("onPlayerAspectRatioListChanged",n),this._dispatchEvent("onAllAspectRatioChanged",{aspectRatioList:n}),this._dispatchEvent("onPlayerAspectRatioChanged",{aspectRatio:0})}}}},{key:"_dispatchEvent",value:function(e,t){if(!this._destroyed&&this.events)if(this.events[e])this.dispatchEvent(e,t);else for(var n=e.toLowerCase(),r=Object.keys(this.events),i=0;i<r.length;i++){var o=r[i];if(o&&o.toLowerCase()===n&&this.events[o])return void this.dispatchEvent(o,t)}}},{key:"updateProperty",value:function(e,n){if("sid"===e)return this._currentSid&&A(this._currentSid),this._currentSid=n,void(n?(S(n,this),this.dom.setAttribute("sid",String(n))):this.dom.removeAttribute("sid"));switch(e){case"src":this._url=n;break;case"muted":this.dom.muted=n;break;case"loop":this.dom.loop=n,this._loop=n;break;case"volume":this.dom.volume=Math.max(0,Math.min(1,n));break;case"playbackRate":this.dom.playbackRate=n;break;default:(r=t,i="updateProperty",o=this,s=zn(Vn(1&(a=3)?r.prototype:r),i,o),2&a&&"function"==typeof s?function(e){return s.apply(o,e)}:s)([e,n])}var r,i,o,a,s}},{key:"init",value:function(){this._playerState=Ih.ES_PLAYER_STATE_INITIALIZED,this._dispatchPlayerStatusChanged()}},{key:"play",value:function(e){var t=s(e,9),n=t[0],r=t[1],i=t[2],o=(t[3],t[4],t[5],t[6],t[7]);t[8];if(n){var a=Rn(n);this._originalUrl=n,this._url=a,this._autoPlay=!1!==(null==o?void 0:o.autoPlay),this.dom.src=a;var u=void 0!==i?parseFloat(i):1;this.dom.volume=Math.max(0,Math.min(1,u)),void 0!==(null==o?void 0:o.loop)&&(this.dom.loop=o.loop),this._setAspectRatio(r||0),this._playerState=Ih.ES_PLAYER_STATE_PREPARING,this._dispatchPlayerStatusChanged(),this.dom.load()}}},{key:"start",value:function(e){var t=s(e,1)[0];t&&t>0&&(this.dom.currentTime=t/1e3),this.dom.play().catch(function(e){})}},{key:"pause",value:function(){this.dom.pause()}},{key:"resume",value:function(){this.dom.play().catch(function(){})}},{key:"seekTo",value:function(e){var t=s(e,1)[0];void 0!==t&&(this.dom.currentTime=t/1e3)}},{key:"stop",value:function(){this.dom.pause(),this.dom.currentTime=0,this._playerState=Ih.ES_PLAYER_STATE_STOPPED,this._dispatchPlayerStatusChanged()}},{key:"release",value:function(){this._destroyed=!0,this.dom.pause(),this.dom.src="",this._playerState=Ih.ES_PLAYER_STATE_RELEASED,this._currentSid&&(A(this._currentSid),this._currentSid=null)}},{key:"getCurrentPosition",value:function(){return Math.floor(1e3*this.dom.currentTime)}},{key:"getDuration",value:function(){return Math.floor(1e3*this.dom.duration)||0}},{key:"setVolume",value:function(e){var t=s(e,1)[0];this.dom.volume=Math.max(0,Math.min(1,parseFloat(t)||1))}},{key:"setLeftVolume",value:function(e){var t=s(e,1)[0];this.dom.volume=Math.max(0,Math.min(1,parseFloat(t)||1))}},{key:"setRightVolume",value:function(e){var t=s(e,1)[0];this.dom.volume=Math.max(0,Math.min(1,parseFloat(t)||1))}},{key:"setLeftRightVolume",value:function(e){var t=s(e,2),n=t[0],r=t[1],i=((parseFloat(n)||1)+(parseFloat(r)||1))/2;this.dom.volume=Math.max(0,Math.min(1,i))}},{key:"getLeftVolume",value:function(){return this.dom.volume}},{key:"getRightVolume",value:function(){return this.dom.volume}},{key:"setPlayRate",value:function(e){var t=s(e,1)[0];this.dom.playbackRate=parseFloat(t)||1}},{key:"setAspectRatio",value:function(e){var t=s(e,1)[0];this._setAspectRatio(t)}},{key:"_setAspectRatio",value:function(e){this.dom.style.objectFit={0:"contain",1:"contain",2:"contain",3:"contain",4:"cover"}[e]||"contain",this._aspectRatio=e}},{key:"setPlayerSize",value:function(e){var t=s(e,2),n=t[0],r=t[1];n&&(this.dom.style.width="number"==typeof n?"".concat(n,"px"):n),r&&(this.dom.style.height="number"==typeof r?"".concat(r,"px"):r)}},{key:"setSize",value:function(e){var t=s(e,2),n=t[0],r=t[1];this.setPlayerSize([n,r])}},{key:"updateLayout",value:function(e){var t=s(e,4),n=t[0],r=t[1],i=t[2],o=t[3];n&&(this.dom.style.width="number"==typeof n?"".concat(n,"px"):n),r&&(this.dom.style.height="number"==typeof r?"".concat(r,"px"):r),void 0!==i&&(this.dom.style.left="".concat(i,"px")),void 0!==o&&(this.dom.style.top="".concat(o,"px"))}},{key:"isStopped",value:function(){return this._playerState===Ih.ES_PLAYER_STATE_STOPPED}},{key:"startPositionListener",value:function(){}},{key:"stopPositionListener",value:function(){}},{key:"getTrackInfo",value:function(e){s(e,1)[0];for(var t=this.dom.textTracks||[],n=[],r=0;r<t.length;r++)n.push({index:r,type:t[r].kind,label:t[r].label,language:t[r].language});return n}},{key:"selectTrack",value:function(e){var t=s(e,1)[0],n=this.dom.textTracks;n&&n[t]&&(n[t].mode="showing")}},{key:"deselectTrack",value:function(e){var t=s(e,1)[0],n=this.dom.textTracks;n&&n[t]&&(n[t].mode="disabled")}},{key:"getMediaMeta",value:function(){return{duration:1e3*this.dom.duration,width:this.dom.videoWidth,height:this.dom.videoHeight}}},{key:"setDefinition",value:function(e){s(e,1)[0]}},{key:"setM3U8Definition",value:function(e){s(e,1)[0]}},{key:"getM3U8DefinitionInfo",value:function(){return[]}},{key:"getBitRate",value:function(){return 0}},{key:"getTcpSpeed",value:function(){return 0}},{key:"getVideoDecoder",value:function(){return"html5"}},{key:"getCdnInfo",value:function(){return{}}},{key:"setUsingHardwareDecoder",value:function(e){}},{key:"setPlayerType",value:function(e){this._playerType=e}},{key:"setOptionLong",value:function(e,t,n){}},{key:"setOptionString",value:function(e,t,n){}},{key:"setCacheInfo",value:function(e){}},{key:"setDecode",value:function(e){this._decode=e}},{key:"requestLayout",value:function(){this.dom.offsetHeight}},{key:"invalidate",value:function(){this.requestLayout()}},{key:"clickPlayerView",value:function(){}},{key:"changeToFullScreen",value:function(e){}},{key:"requestPlayerViewLayout",value:function(){}},{key:"requestCustomSizeLayout",value:function(e){}},{key:"requestCustomLayout",value:function(){}},{key:"setPlayerDimension",value:function(e){}},{key:"setDefaultPlayerWidth",value:function(e){}},{key:"setDefaultPlayerHeight",value:function(e){}},{key:"setFullPlayerWidth",value:function(e){}},{key:"setFullPlayerHeight",value:function(e){}},{key:"getEsInfo",value:function(){return{platform:"web",playerType:"html5"}}},{key:"getComponentInfo",value:function(){var e={isSupportDynamicallyLoadedSo:!1,isSupportAsyncInit:!0,platform:"web",playerType:"html5"};return this._dispatchEvent("onPlayerComponentInfo",e),e}},{key:"initComponent",value:function(){this._dispatchEvent("onPlayerStatusChanged",{playerStatus:Ih.ES_PLAYER_STATE_PLAYER_INITIALIZED,playerState:Ih.ES_PLAYER_STATE_PLAYER_INITIALIZED}),this._dispatchEvent("onPlayerStatusChanged",{playerStatus:Ih.ES_PLAYER_STATE_INITIALIZE_SUCCESS,playerState:Ih.ES_PLAYER_STATE_INITIALIZE_SUCCESS})}},{key:"setProgressCallback",value:function(e){this._progressCallback=e}},{key:"setDurationCallback",value:function(e){this._durationCallback=e}},{key:"setBufferPercentCallback",value:function(e){this._bufferPercentCallback=e}},{key:"getPlayerState",value:function(){return this._playerState}},{key:"getVideoWidth",value:function(){return this.dom.videoWidth||0}},{key:"getVideoHeight",value:function(){return this.dom.videoHeight||0}},{key:"isPlaying",value:function(){return!this.dom.paused&&!this.dom.ended}},{key:"getPlayRate",value:function(){return this.dom.playbackRate||1}},{key:"getAspectRatio",value:function(){return this._aspectRatio}},{key:"getPlayerType",value:function(){return this._playerType}},{key:"getDecode",value:function(){return this._decode}},{key:"setMute",value:function(e){this.dom.muted=e,this._muted=e}},{key:"isMuted",value:function(){return this.dom.muted}},{key:"getUrl",value:function(){return this._url}},{key:"setLooping",value:function(e){this.dom.loop=e,this._loop=e}},{key:"isLooping",value:function(){return this.dom.loop}},{key:"getAspectRatioList",value:function(){return[0,1,2,3,4]}},{key:"getPlayRateList",value:function(){return[.5,.75,1,1.25,1.5,1.75,2,2.5]}},{key:"getDecodeList",value:function(){return[0,1]}},{key:"dispatchPlayerInfo",value:function(e){this._dispatchEvent("onPlayerInfo",e)}},{key:"setCache",value:function(e){}},{key:"getVideoCachedDuration",value:function(){return this.dom.buffered.length>0?Math.floor(1e3*this.dom.buffered.end(0)):0}},{key:"getAudioCachedDuration",value:function(){return this.getVideoCachedDuration()}},{key:"getVideoCachedBytes",value:function(){return 0}},{key:"getAudioCachedBytes",value:function(){return 0}},{key:"getVideoCachedPackets",value:function(){return 0}},{key:"getAudioCachedPackets",value:function(){return 0}},{key:"getTcpSpeed2",value:function(){return 0}},{key:"getBitRate2",value:function(){return 0}},{key:"getDropFrameRate",value:function(){return 0}},{key:"getVideoDecodeFramesPerSecond",value:function(){return 0}},{key:"getVideoOutputFramesPerSecond",value:function(){return 0}}])}(Oi);function Lh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ph(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lh(Object(n),!0).forEach(function(t){(0,p.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Rh=va(pa,"View"),Nh=va(Sa,"Text"),Dh={View:Rh,Text:Nh,Image:va(Ia,"Image"),ListView:eu,ListViewItem:tu,ScrollView:va(pa,"ScrollView"),TextInput:va(pa,"TextInput"),WebView:us,ViewPager:va(pa,"ViewPager"),FastListView:Za,TextView:Nh,ESPageRouterView:va(pa,"ESPageRouterView"),ESPageRootView:wa,ESSlotRootView:va(pa,"ESSlotRootView"),ESSlotView:va(pa,"ESSlotView"),LoadingViewComponent:es,AnimationViewComponent:os,ESWebViewComponent:us,ESX5WebViewComponent:us,QrCodeComponent:fs,TVProgressBarViewComponent:ms,TVSeekBarViewComponent:ws,TVListViewComponent:Za,ItemFrameComponent:Ss,ItemStoreView:Ts,RippleViewComponent:Ps,FastFlexView:Pa,FastItemView:Ms,TabsView:Ws,RecyclerViewPager:Ys,Modal:Ks,TextV2Component:xh,TransitionImageComponent:Fu,IJKPlayerComponent:Oh,ESPlayMarkViewComponent:ou,CanvasView2D:xu,CanvasComponent:xu,WebGLComponent:Nu};function Mh(e){var t=window.__DEEP_LINK_PARAMS__;delete window.__DEEP_LINK_PARAMS__;var n=t||{business:I,data:{}};e.start({id:"app",name:I,params:n})}n.g.__ORIGINAL_FETCH__=n.g.fetch.bind(n.g);var Fh="files";function Bh(){return new Promise(function(e,t){var n=indexedDB.open("quicktvui-zip-cache",1);n.onerror=function(){return t(n.error)},n.onsuccess=function(){return e(n.result)},n.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains(Fh)||t.createObjectStore(Fh)}})}function jh(e,t,n){return Uh.apply(this,arguments)}function Uh(){return(Uh=l(h().mark(function e(t,n,r){var i;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Bh();case 1:return i=e.sent,e.abrupt("return",new Promise(function(e,o){var a=i.transaction(Fh,"readwrite");a.objectStore(Fh).put({files:t,entryFile:n,zipName:r,timestamp:Date.now()},"zip-data"),a.oncomplete=function(){return e()},a.onerror=function(){return o(a.error)}}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Wh(){return Vh.apply(this,arguments)}function Vh(){return(Vh=l(h().mark(function e(){var t;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Bh();case 1:return t=e.sent,e.abrupt("return",new Promise(function(e,n){var r=t.transaction(Fh,"readonly").objectStore(Fh).get("zip-data");r.onsuccess=function(){return e(r.result)},r.onerror=function(){return n(r.error)}}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}function zh(){return Hh.apply(this,arguments)}function Hh(){return(Hh=l(h().mark(function e(){var t;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Bh();case 1:return t=e.sent,e.abrupt("return",new Promise(function(e,n){var r=t.transaction(Fh,"readwrite");r.objectStore(Fh).delete("zip-data"),r.oncomplete=function(){return e()},r.onerror=function(){return n(r.error)}}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var Gh={files:new Map,entryFile:null,zipName:null,baseDir:"",loadFromData(e){var t=this;if(this.files.clear(),e&&e.files){Object.entries(e.files).forEach(function(e){for(var n=s(e,2),r=n[0],i=n[1],o=atob(i),a=new Uint8Array(o.length),u=0;u<o.length;u++)a[u]=o.charCodeAt(u);t.files.set(r,a),t.files.set("/"+r,a)}),this.entryFile=e.entryFile,this.zipName=e.zipName,this.baseDir=this.entryFile?this.entryFile.substring(0,this.entryFile.lastIndexOf("/")):"";Array.from(this.files.keys()).filter(function(e){return!e.startsWith("/")}).slice(0,10);window.__VIRTUAL_FS__=this}},set(e,t){var n=e.replace(/^\//,"");this.files.set(n,t),this.files.set("/"+n,t)},get(e){var t=e.replace(/^\//,""),n=this.files.get(t)||this.files.get("/"+t);if(n)return n;if(this.baseDir){var r=this.baseDir+"/"+t;if(n=this.files.get(r)||this.files.get("/"+r))return n}return null},has(e){return null!==this.get(e)},list(){var e=new Set;return this.files.forEach(function(t,n){n.startsWith("/")||e.add(n)}),Array.from(e).sort()},clear(){this.files.clear(),this.entryFile=null,this.zipName=null,this.baseDir=""}};function Yh(){return qh.apply(this,arguments)}function qh(){return(qh=l(h().mark(function e(){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",f());case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Xh(e){return!e.includes("__MACOSX/")&&(!e.split("/").pop().startsWith("._")&&(!e.endsWith(".DS_Store")&&!e.toLowerCase().endsWith(".thumbs.db")))}function Zh(e){return Kh.apply(this,arguments)}function Kh(){return(Kh=l(h().mark(function e(t){var n,r,i,o,a,s,u;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yh();case 1:return n=e.sent,e.next=2,n.loadAsync(t);case 2:return r=e.sent,i={},o=[],r.forEach(function(e,t){if(!t.dir)if(Xh(e)){var n=t.async("uint8array").then(function(t){for(var n="",r=0;r<t.length;r++)n+=String.fromCharCode(t[r]);i[e]=btoa(n)});o.push(n)}else 0}),e.next=3,Promise.all(o);case 3:if(a=Object.keys(i),(s=a.find(function(e){return e.endsWith("index.bundle")}))||(s=a.find(function(e){return e.endsWith("index.android.js")})),s||(s=a.find(function(e){return e.match(/index\.(android|hippy)\.js$/)})),s||(s=a.find(function(e){return e.endsWith(".bundle")})),s||(s=a.find(function(e){return e.endsWith(".js")})),s){e.next=4;break}throw new Error("No bundle entry found in ZIP");case 4:return e.next=5,jh(i,s,t.name);case 5:(u=new URL(window.location.href)).searchParams.set("zip","1"),u.searchParams.delete("bundle"),u.searchParams.delete("zipUrl"),window.location.href=u.toString();case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}function $h(e,t){return Jh.apply(this,arguments)}function Jh(){return Jh=l(h().mark(function e(t,n){var r,i,o,a,s,u,l,c,d,f,p,v,y,m,g,_,b=arguments;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=b.length>2&&void 0!==b[2]&&b[2],e.next=1,Yh();case 1:return i=e.sent,o=t,r&&((a=new URL(t)).searchParams.set("_t",Date.now().toString()),o=a.toString()),n&&n(0,"正在下载 ZIP 包..."),e.next=2,new Promise(function(e,t){var r=new XMLHttpRequest;r.open("GET",o,!0),r.responseType="arraybuffer",r.onprogress=function(e){if(e.lengthComputable&&n){var t=Math.floor(e.loaded/e.total*30);n(t,"正在下载... ".concat(Math.floor(e.loaded/1024),"KB / ").concat(Math.floor(e.total/1024),"KB"))}},r.onload=function(){r.status>=200&&r.status<300?e(r.response):t(new Error("下载失败: HTTP ".concat(r.status)))},r.onerror=function(){t(new Error("网络请求失败,请检查网络连接或服务器 CORS 配置"))},r.ontimeout=function(){t(new Error("请求超时"))},r.send()});case 2:s=e.sent,u="remote-bundle.zip";try{l=new URL(t),c=l.pathname,(d=c.split("/").pop())&&d.endsWith(".zip")&&(u=d)}catch(e){}return n&&n(50,"正在解压 ZIP 包..."),e.next=3,i.loadAsync(s);case 3:return f=e.sent,p={},v=0,y=Object.keys(f.files).filter(function(e){return!f.files[e].dir&&Xh(e)}).length,m=[],f.forEach(function(e,t){t.dir||(Xh(e)?m.push(t.async("uint8array").then(function(t){for(var r="",i=0;i<t.length;i++)r+=String.fromCharCode(t[i]);if(p[e]=btoa(r),v++,n){var o=50+Math.floor(v/y*40);n(o,"正在解压... (".concat(v,"/").concat(y,")"))}})):0)}),e.next=4,Promise.all(m);case 4:if(n&&n(95,"正在保存到缓存..."),g=Object.keys(p),(_=g.find(function(e){return e.endsWith("index.bundle")}))||(_=g.find(function(e){return e.endsWith("index.android.js")})),_||(_=g.find(function(e){return e.match(/index\.(android|hippy)\.js$/)})),_||(_=g.find(function(e){return e.endsWith(".bundle")})),_||(_=g.find(function(e){return e.endsWith(".js")})),_){e.next=5;break}throw new Error("ZIP 包中未找到有效的入口文件 (index.bundle 或 index.android.js)");case 5:return e.next=6,jh(p,_,u);case 6:n&&n(100,"准备加载..."),Gh.loadFromData({files:p,entryFile:_,zipName:u});case 7:case"end":return e.stop()}},e)})),Jh.apply(this,arguments)}function Qh(e){return{js:"application/javascript",json:"application/json",css:"text/css",html:"text/html",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf",mp3:"audio/mpeg",mp4:"video/mp4"}[e.split(".").pop().toLowerCase()]||"application/octet-stream"}function ed(e){return td.apply(this,arguments)}function td(){return(td=l(h().mark(function e(t){var n,r,i,o,a;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Gh.get(t)){e.next=1;break}throw new Error("File not found in VirtualFS: ".concat(t));case 1:return r=(new TextDecoder).decode(n),i=id(),a=Dd(o=i+r,"3.0.1")?Md(o):o,e.abrupt("return",new Promise(function(e,t){try{var n=document.createElement("script");n.textContent=a,document.body.appendChild(n),e()}catch(e){t(e)}}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var nd="";function rd(e){nd=function(e){if(!e)return"";try{var t=new URL(e,window.location.href),n=t.pathname.replace(/[^/]+$/,"");return n=n.replace(/\/bundles-dev\//,"/"),"".concat(t.origin).concat(n)}catch(e){return""}}(e)}function id(){var e=JSON.stringify(Gh&&Gh.baseDir?"/":nd||"/");return"(function(){var p=".concat(e,';if(typeof __webpack_require__!=="undefined"){__webpack_require__.p=p;}if(typeof __webpack_public_path__!=="undefined"){__webpack_public_path__=p;}})();')}function od(e){return"string"==typeof e&&/\$\{[^}]+\}/.test(e)}function ad(e){if(od(e))return e;var t=function(e){if(!nd||"string"!=typeof e||!e)return e;if(od(e))return e;if(/^(blob:|data:|javascript:|about:)/i.test(e))return e;if(/^https?:\/\//i.test(e))return e;try{var t=new URL(e,window.location.href);if(t.origin!==window.location.origin)return e;if(t.pathname.startsWith("/proxy/"))return e;var n=t.pathname.startsWith("/")?t.pathname.slice(1):t.pathname;if(!n)return e;var r=nd.replace(/^https?:\/\/[^/]+/,"");return n.startsWith(r.replace(/^\//,""))?e:"".concat(nd).concat(n).concat(t.search).concat(t.hash)}catch(t){var i=e.replace(/^\//,"");if(!i)return e;var o=nd.replace(/^https?:\/\/[^/]+/,"");return i.startsWith(o.replace(/^\//,""))?e:"".concat(nd).concat(i)}}(e);return t}if("undefined"==typeof localStorage){var sd={};n.g.localStorage={getItem:function(e){return sd[e]||null},setItem:function(e,t){sd[e]=String(t)},removeItem:function(e){delete sd[e]},clear:function(){Object.keys(sd).forEach(function(e){return delete sd[e]})}}}function ud(e){return"string"!=typeof e?e:e.startsWith("hpfile://")?e.replace(/^hpfile:\/\/\.?\//,"/").replace(/^hpfile:\/\//,"/"):/https?:\/\/[^/:]+:38989\//.test(e)?e.replace(/https?:\/\/[^/:]+:38989\/[a-f0-9]{32}\//,"/bundles-dev/").replace(/https?:\/\/[^/:]+:38989\//,"/bundles-dev/"):e}function ld(e,t){var n=Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype,"textContent")||Object.getOwnPropertyDescriptor(Element.prototype,"textContent")||Object.getOwnPropertyDescriptor(Node.prototype,"textContent");n&&n.set?n.set.call(e,t):e.textContent=t}var cd=Element.prototype.setAttribute;Element.prototype.setAttribute=function(e,t){var n=e.toLowerCase();if("SCRIPT"===this.tagName&&"src"===n){if(Gh){var r=t;try{r=new URL(t,window.location.origin).pathname}catch(e){}var i=r.replace(/^\//,""),o=Gh.baseDir?Gh.baseDir+"/"+i:i;if(Gh.has(o)){var a=Gh.get(o);return ld(this,(new TextDecoder).decode(a)),void(this._virtualSrc=t)}if(Gh.has(i)){var s=Gh.get(i);return ld(this,(new TextDecoder).decode(s)),void(this._virtualSrc=t)}}var u=ad(t);if(u!==t)return cd.call(this,e,u)}if("IMG"===this.tagName&&"src"===n){var l=ud(t);if(Gh){var c=l.replace(/^\//,""),h=Gh.baseDir?Gh.baseDir+"/"+c:c;if(Gh.has(h)){var d=Gh.get(h),f=new Blob([d],{type:Qh(h)}),p=URL.createObjectURL(f);return cd.call(this,e,p)}}if(Gh&&Gh.has(l)){var v=Gh.get(l),y=new Blob([v],{type:Qh(l)}),m=URL.createObjectURL(y);return cd.call(this,e,m)}var g=ad(l);if(g!==l)return cd.call(this,e,g);if(l!==t)return cd.call(this,e,l)}if("style"===n&&"string"==typeof t){var _=vd(t);if(_!==t)return cd.call(this,e,_)}if("src"===n||"href"===n||"data-src"===n){var b=ad(ud(t));if(b!==t)return cd.call(this,e,b)}return cd.call(this,e,t)};var hd=document.createElement.bind(document);document.createElement=function(e,t){var n=hd(e,t);if("script"===e.toLowerCase()){var r=Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype,"src"),i=Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype,"textContent");if(!r||!i)return n;var o=r.get,a=r.set;i.set;n.__vfsContent=null,Object.defineProperty(n,"src",{get:()=>null!==n.__vfsContent?"":o.call(n),set(e){var t=e.replace(/^\//,"");if(Gh){var r=Gh.baseDir?Gh.baseDir+"/"+t:t;if(Gh.has(r)){var i=Gh.get(r);return void(n.__vfsContent=(new TextDecoder).decode(i))}}if(Gh&&Gh.has(t)){var o=Gh.get(t);n.__vfsContent=(new TextDecoder).decode(o)}else a.call(n,e)},configurable:!0,enumerable:!0})}return n},new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){var t=e&&"SCRIPT"===e.tagName?e.src||e.getAttribute&&e.getAttribute("src"):"";if("SCRIPT"===e.tagName&&t&&Gh){var n=t;try{n=new URL(t,window.location.origin).pathname}catch(e){}var r=n.replace(/^\//,""),i=Gh.baseDir?Gh.baseDir+"/"+r:r;if(Gh.has(i)){var o=Gh.get(i),a=(new TextDecoder).decode(o);e.removeAttribute("src"),e.textContent=a,setTimeout(function(){return e.dispatchEvent(new Event("load"))},0)}else if(Gh.has(r)){var s=Gh.get(r),u=(new TextDecoder).decode(s);e.removeAttribute("src"),e.textContent=u,setTimeout(function(){return e.dispatchEvent(new Event("load"))},0)}}if(t&&!Gh){var l=ad(t);l!==t&&(e.src=l)}})})}).observe(document.documentElement,{childList:!0,subtree:!0});var dd=Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype,"src");if(dd){var fd=dd.get,pd=dd.set;Object.defineProperty(HTMLScriptElement.prototype,"src",{get(){return this._virtualSrc?this._virtualSrc:fd.call(this)},set(e){var t=this,n=ad(ud(e));if(Gh&&Gh.has&&Gh.has(n)){this._virtualSrc=n;var r=Gh.get(n);return ld(this,(new TextDecoder).decode(r)),setTimeout(function(){return t.dispatchEvent(new Event("load"))},0),n}if(Gh){var i=n.replace(/^\//,""),o=Gh.baseDir?Gh.baseDir+"/"+i:i;if(Gh.has(o)){this._virtualSrc=o;var a=Gh.get(o);return ld(this,(new TextDecoder).decode(a)),setTimeout(function(){return t.dispatchEvent(new Event("load"))},0),o}}return pd.call(this,n)},configurable:!0,enumerable:!0})}function vd(e){if("string"!=typeof e)return e;if(e.startsWith("hpfile://")){var t=e.replace(/^hpfile:\/\/\.?\//,"/").replace(/^hpfile:\/\//,"/");if(Gh&&t.startsWith("/assets/")){var n=t.replace(/^\//,""),r=Gh.baseDir?Gh.baseDir+"/"+n:n;if(Gh.has(r)){var i=Gh.get(r),o=new Blob([i],{type:Qh(r)}),a=URL.createObjectURL(o);return"url(".concat(a,")")}}if(Gh&&Gh.has(t)){var s=Gh.get(t),u=new Blob([s],{type:Qh(t)}),l=URL.createObjectURL(u);return"url(".concat(l,")")}return"url(".concat(ad(t),")")}return e.replace(/url\(['"]?(hpfile:\/\/[^'")\s]+)['"]?\)/gi,function(e,t){var n=t.replace(/^hpfile:\/\/\.?\//,"/").replace(/^hpfile:\/\//,"/");if(Gh&&n.startsWith("/assets/")){var r=n.replace(/^\//,""),i=Gh.baseDir?Gh.baseDir+"/"+r:r;if(Gh.has(i)){var o=Gh.get(i),a=new Blob([o],{type:Qh(i)}),s=URL.createObjectURL(a);return"url(".concat(s,")")}}if(Gh&&Gh.has(n)){var u=Gh.get(n),l=new Blob([u],{type:Qh(n)}),c=URL.createObjectURL(l);return"url(".concat(c,")")}return"url(".concat(ad(n),")")})}var yd=Object.getOwnPropertyDescriptor(CSSStyleDeclaration.prototype,"cssText");if(yd&&yd.set){var md=yd.set;Object.defineProperty(CSSStyleDeclaration.prototype,"cssText",{get:yd.get,set(e){var t=vd(e);return md.call(this,t)},configurable:!0})}var gd=CSSStyleDeclaration.prototype.setProperty;CSSStyleDeclaration.prototype.setProperty=function(e,t,n){var r=e.toLowerCase();if("background-image"===r||"background"===r){var i=vd(t);return gd.call(this,e,i,n)}return gd.call(this,e,t,n)};var _d=Object.getOwnPropertyDescriptor(CSSStyleDeclaration.prototype,"backgroundImage");if(_d&&_d.set){var bd=_d.set;Object.defineProperty(CSSStyleDeclaration.prototype,"backgroundImage",{get:_d.get,set(e){var t=vd(e);return bd.call(this,t)},configurable:!0})}var wd=Object.getOwnPropertyDescriptor(CSSStyleDeclaration.prototype,"background");if(wd&&wd.set){var kd=wd.set;Object.defineProperty(CSSStyleDeclaration.prototype,"background",{get:wd.get,set(e){var t=vd(e);return kd.call(this,t)},configurable:!0})}var Ed=Object.getOwnPropertyDescriptor(HTMLImageElement.prototype,"src");if(Ed){var Sd=Ed.get,Ad=Ed.set;Object.defineProperty(HTMLImageElement.prototype,"src",{get(){return Sd.call(this)},set(e){var t=ad(ud(e));if(Gh&&t.startsWith("/assets/")){var n=t.replace(/^\//,""),r=Gh.baseDir?Gh.baseDir+"/"+n:n;if(Gh.has(r)){var i=Gh.get(r),o=new Blob([i],{type:Qh(r)}),a=URL.createObjectURL(o);return Ad.call(this,a)}}if(Gh&&Gh.has(t)){var s=Gh.get(t),u=new Blob([s],{type:Qh(t)}),l=URL.createObjectURL(u);return Ad.call(this,l)}return Ad.call(this,t)},configurable:!0,enumerable:!0})}var xd=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"src");if(xd){var Cd=xd.get,Td=xd.set;Object.defineProperty(HTMLMediaElement.prototype,"src",{get(){return Cd.call(this)},set(e){if("string"==typeof e&&/^https?:\/\//i.test(e))return Td.call(this,e);if("string"==typeof e&&e.startsWith("//"))return Td.call(this,e);var t=ad(ud(e));if(Gh&&t.startsWith("/assets/")){var n=t.replace(/^\//,""),r=Gh.baseDir?Gh.baseDir+"/"+n:n;if(Gh.has(r)){var i=Gh.get(r),o=new Blob([i],{type:Qh(r)}),a=URL.createObjectURL(o);return Td.call(this,a)}}if(Gh&&t.startsWith("/")&&Gh.has(t)){var s=Gh.get(t),u=new Blob([s],{type:Qh(t)}),l=URL.createObjectURL(u);return Td.call(this,l)}return Td.call(this,t)},configurable:!0,enumerable:!0})}if("undefined"!=typeof fetch){var Id=n.g.fetch;n.g.fetch=function(e,t){var n=e;"string"==typeof e?n=e:e instanceof Request&&(n=e.url);var r=ud(n);if(Gh&&r.startsWith("/")){if(r.startsWith("/assets/")){var i=r.replace(/^\//,""),o=Gh.baseDir?Gh.baseDir+"/"+i:i;if(Gh.has(o)){var a=Gh.get(o);return Promise.resolve(new Response(a,{status:200,headers:{"Content-Type":Qh(o)}}))}}if(Gh.has(r)){var s=Gh.get(r);return Promise.resolve(new Response(s,{status:200,headers:{"Content-Type":Qh(r)}}))}}return r!==n&&("string"==typeof e?e=r:e instanceof Request&&(e=new Request(r,t))),Id(e,t)}}n.g.__ES_LAST_SDK_INFO__={eskit_ver_code:2.8},n.g.__ES_APP_READY__=!0,globalThis.__nativeLocalStorage=Mn,globalThis.__localStorage=Bn,Object.defineProperty(window,"localStorage",{value:Bn,writable:!1,configurable:!0}),Nn(),n.g.__WEB_COMPONENTS__=n.g.__WEB_COMPONENTS__||{},n.g.__WEB_COMPONENTS__.IJKPlayerComponent=Oh,function(){if(n.g.Hippy||(n.g.Hippy={}),!n.g.Hippy.SceneBuilder){var e=function(e){return e&&"string"==typeof e?e.startsWith("on")?e:"on".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)):e};n.g.Hippy.SceneBuilder=function(t){var r=this;this.rootViewId=t,this.create=function(e){n.g.Hippy.bridge.callNative("UIManagerModule","createNode",r.rootViewId,e)},this.update=function(e){n.g.Hippy.bridge.callNative("UIManagerModule","updateNode",r.rootViewId,e)},this.delete=function(e){n.g.Hippy.bridge.callNative("UIManagerModule","deleteNode",r.rootViewId,e)},this.move=function(e){n.g.Hippy.bridge.callNative("UIManagerModule","moveNode",r.rootViewId,e)},this.build=function(){},this.addEventListener=function(t,r,i){var o=e(r);n.g.Hippy.bridge.callNative("UIManagerModule","addEventListener",t,o,i)},this.removeEventListener=function(t,r,i){n.g.Hippy.bridge.callNative("UIManagerModule","removeEventListener",t,e(r),i)}}}}();var Od=ni.create({modules:Ph({ESModule:Bu,ESLocalStorageModule:Hu,EsNativeModule:nl,AndroidSharedPreferencesModule:ul,AndroidDevelopModule:dl,AndroidDeviceModule:fl,AndroidNetworkModule:kl,WebSocketModule:El,AndroidAudioModule:pc,AndroidFileModule:Ue,ESToastModule:Pl,RuntimeDeviceModule:Bl,ESIJKAudioPlayerModule:ye,ESSoundPoolAudioPlayerModule:Ce,ESLogModule:jl,FastListModule:Wa,FocusModule:Vl,ESDeviceInfoModule:Yl,ESGroupDataModule:nc,ESDownloadModule:Ze,ESHLogModule:rc,ESAndroidAudioPlayerModule:vc,ESPlayerIJKModule:yc,BoxInstallModule:mc,CanvasModule:bc,ESPluginModule:Cc,EsWebdavServerModule:Tc,ESFileBrowseModule:Ic,AndroidPermissionModule:Oc},kh),components:Dh});!function(e){var t,r,i;if(t=Object.prototype.toString,Object.prototype.toString=function(){var e=t.call(this);return"[object AsyncFunction]"===e||"[object GeneratorFunction]"===e?"[object Function]":e},function(e){m=e}(e),function(e){if(!ut){var t=n.g.hippyCallNatives;if("function"==typeof t){var r=new Set(["initSharedPreferences","initESSharedPreferences","getBoolean","putBoolean","getInt","putInt","getLong","putLong","getString","putString","getItem","setItem"]),i=new Set(["getESDeviceInfo","getESSDKInfo","getESSDKVersionCode","getESSDKVersionName","getESPackageName","getESAppFilePath","getESAppRuntimePath","getSupportSchemes","launchESPageByArgs","launchESPage","launchNativeApp","launchNativeAppWithPackage","finish","finishAll","isModuleRegistered","isComponentRegistered"]),o=new Set(["getDevelop","getPackageName","getVersionName","getVersionCode","getChannel","getVendor"]);n.g.hippyCallNatives=function(a,u,l,c){var h;if("ExtendModule"!==a||"callUIFunction"!==u){if("ESIJKAudioPlayerModule"===a){var d,f=null===(d=n.g.__WEB_MODULES__)||void 0===d?void 0:d.ESIJKAudioPlayerModule;if(f&&"function"==typeof f[u]){var p=f[u].apply(f,[l].concat(y(c||[])));return p&&"function"==typeof p.catch?p.catch(function(e){}):p}}if("ESSoundPoolAudioPlayerModule"===a||"ESSoundPoolPlayerModule"===a){var v,m=null===(v=n.g.__WEB_MODULES__)||void 0===v?void 0:v.ESSoundPoolAudioPlayerModule;if(m&&"function"==typeof m[u]){var g={resolve:function(e){var t,r=null===(t=n.g.__GLOBAL__)||void 0===t||null===(t=t.moduleCallList)||void 0===t?void 0:t[l];r&&"function"==typeof r.cb&&(r.cb(e),0!==r.type&&1!==r.type||delete n.g.__GLOBAL__.moduleCallList[l])},reject:function(e){var t,r=null===(t=n.g.__GLOBAL__)||void 0===t||null===(t=t.moduleCallList)||void 0===t?void 0:t[l];r&&"function"==typeof r.reject&&(r.reject(e),0!==r.type&&1!==r.type||delete n.g.__GLOBAL__.moduleCallList[l])}},_=m[u].apply(m,y(c||[]).concat([g]));return _&&"function"==typeof _.catch?_.catch(function(e){}):_}}if("AndroidFileModule"!==a){if("ESDownloadModule"!==a){if(null==e||null===(h=e.modules)||void 0===h||!h[a]){if(r.has(u))return t("ESLocalStorageModule",u,l,c);if(i.has(u))return t("ESModule",u,l,c);if(o.has(u))return t("AndroidDevelopModule",u,l,c)}if("UIManagerModule"===a&&("createNode"===u||"updateNode"===u||"deleteNode"===u)){var b=s(c||[],2),k=b[0],E=b[1];if(Array.isArray(E)){var S=E.map(function(e){return Array.isArray(e)?e:[e,null]});return t(a,u,l,[k,S])}}return t(a,u,l,c)}var A,C,T=(null==e||null===(A=e.modules)||void 0===A?void 0:A.ESDownloadModule)||(null===(C=n.g.__WEB_MODULES__)||void 0===C?void 0:C.ESDownloadModule);if(T&&"function"==typeof T[u]){var I={resolve:function(e){var t,r=null===(t=n.g.__GLOBAL__)||void 0===t||null===(t=t.moduleCallList)||void 0===t?void 0:t[l];r&&"function"==typeof r.cb&&(r.cb(e),0!==r.type&&1!==r.type||delete n.g.__GLOBAL__.moduleCallList[l])},reject:function(e){var t,r=null===(t=n.g.__GLOBAL__)||void 0===t||null===(t=t.moduleCallList)||void 0===t?void 0:t[l];r&&"function"==typeof r.reject&&(r.reject(e),0!==r.type&&1!==r.type||delete n.g.__GLOBAL__.moduleCallList[l])}},O=T[u].apply(T,y(c||[]).concat([I]));return O&&"function"==typeof O.catch?O.catch(function(e){}):O}}else{var L,P,R=(null==e||null===(L=e.modules)||void 0===L?void 0:L.AndroidFileModule)||(null===(P=n.g.__WEB_MODULES__)||void 0===P?void 0:P.AndroidFileModule);if(R&&"function"==typeof R[u]){var N={resolve:function(e){var t,r=null===(t=n.g.__GLOBAL__)||void 0===t||null===(t=t.moduleCallList)||void 0===t?void 0:t[l];r&&"function"==typeof r.cb&&(r.cb(e),0!==r.type&&1!==r.type||delete n.g.__GLOBAL__.moduleCallList[l])},reject:function(e){var t,r=null===(t=n.g.__GLOBAL__)||void 0===t||null===(t=t.moduleCallList)||void 0===t?void 0:t[l];r&&"function"==typeof r.reject&&(r.reject(e),0!==r.type&&1!==r.type||delete n.g.__GLOBAL__.moduleCallList[l])}},D=R[u].apply(R,y(c||[]).concat([N]));return D&&"function"==typeof D.catch?D.catch(function(e){}):D}}}else{var M=s(c||[],3),F=M[0],B=M[1],j=M[2];if(!F||!B)return;var U=x(F);if(U&&"function"==typeof U[B])try{return U[B].apply(U,y(j||[]))}catch(e){}else U||w(F,B,j||[],null)}},ut=!0}}}(e),function(){var e;if(!st){var t=null===(e=n.g.Hippy)||void 0===e?void 0:e.bridge;if(t&&t.callNative){var r=t.callNative.bind(t);t.callNative=function(e,t){for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];if("ESIJKAudioPlayerModule"===e){var u,l=null===(u=n.g.__WEB_MODULES__)||void 0===u?void 0:u.ESIJKAudioPlayerModule;if(l&&"function"==typeof l[t]){var c=l[t].apply(l,[-1].concat(o));return c&&"function"==typeof c.catch?c.catch(function(e){}):c}}if("ESSoundPoolAudioPlayerModule"===e||"ESSoundPoolPlayerModule"===e){var h,d=null===(h=n.g.__WEB_MODULES__)||void 0===h?void 0:h.ESSoundPoolAudioPlayerModule;if(d&&"function"==typeof d[t]){var f=d[t].apply(d,o);return f&&"function"==typeof f.catch?f.catch(function(e){}):f}}if("AndroidFileModule"===e){var p,v=null===(p=n.g.__WEB_MODULES__)||void 0===p?void 0:p.AndroidFileModule;if(v&&"function"==typeof v[t]){var y=v[t].apply(v,o);return y&&"function"==typeof y.catch?y.catch(function(e){}):y}}if("ESDownloadModule"===e){var m,g=null===(m=n.g.__WEB_MODULES__)||void 0===m?void 0:m.ESDownloadModule;if(g&&"function"==typeof g[t]){var _=g[t].apply(g,o);return _&&"function"==typeof _.catch?_.catch(function(e){}):_}}if("UIManagerModule"===e){if("addEventListener"===t){var b=o[0],k=o[1],E=o[2],S=x(b);return void(S&&S.addEventListener&&S.addEventListener(k,E))}if("removeEventListener"===t){var A=o[0],I=o[1],O=o[2],L=x(A);return void(L&&L.removeEventListener&&L.removeEventListener(I,O))}if("callUIFunction"===t){var P,R,N,D;if(Array.isArray(o[0])){var M=o[0],F=o[1],B=s(M||[],3);P=B[0],R=B[1],N=B[2],D=F}else P=o[0],R=o[1],N=o[2],D=o[3];var j=x(P);if(j&&"function"==typeof j[R])try{var U=j[R](N);return U&&"function"==typeof U.then?U.then(function(e){return D&&"function"==typeof D&&D(e),e}).catch(function(e){D&&"function"==typeof D&&D({error:e.message})}):(D&&"function"==typeof D&&D(U),U)}catch(e){}else j||w(P,R,[N],D);return}if("createNode"===t){var W=o[0],V=o[1];if(Array.isArray(V)){var z=!1;if(V.forEach(function(e){var t=e;Array.isArray(e)&&(t=e[0]),t&&"ESPageRootView"===t.name&&(z=!0)}),z){var H=n.g.__TV_FOCUS_MANAGER__;H&&"function"==typeof H.saveCurrentPageFocus&&H.saveCurrentPageFocus()}var Y=V.map(function(e){var t=e,n=null;return Array.isArray(e)&&(t=e[0],n=e[1]),t&&"object"==typeof t&&(t.name||(t.name="View"),t.props&&t.props.style&&(t.props.style=(0,Ke.II)(t.props.style)),at||"app"!==t.pId&&t.pId!==W||(at=t.id,t.props&&(t.props.style=t.props.style||{},t.props.style.width=C,t.props.style.height=T,delete t.props.style.flex))),Array.isArray(e)?[t,n]:t});return tt(Y),r(e,t,W,Y)}}if("updateNode"===t){var q=o[0],X=o[1];if(Array.isArray(X)){var Z=X.map(function(e){var t=e,n=null;return Array.isArray(e)&&(t=e[0],n=e[1]),t&&"object"==typeof t&&(t.name||(t.name="View"),t.props&&t.props.style&&(t.props.style=(0,Ke.II)(t.props.style)),at&&t.id===at&&t.props&&(t.props.style=t.props.style||{},t.props.style.width=C,t.props.style.height=T,delete t.props.style.flex)),[t,n]});return tt(Z),r(e,t,q,Z)}}if("deleteNode"===t){var K=o[0],$=o[1];if(Array.isArray($)){var J=$.map(function(e){return Array.isArray(e)?e:[e]});return J.forEach(function(e){var t=e;if(Array.isArray(e)&&(t=e[0]),t&&"object"==typeof t&&"ESPageRootView"===t.name){var r=n.g.__TV_FOCUS_MANAGER__;r&&"function"==typeof r.restorePreviousPageFocus&&setTimeout(function(){r.restorePreviousPageFocus()},50)}}),r(e,t,K,J)}}}if("ESNetworkSpeedModule"===e&&He&&"function"==typeof He[t])He[t].apply(He,o);else{if("ESPluginModule"!==e)return r.apply(void 0,[e,t].concat(o));if("install"===t){var Q=Array.isArray(o[0])?o[0][0]:o[0];return void G("onESPluginStateChanged",{success:!0,pkg:null==Q?void 0:Q.pkg,status:1003,msg:"Plugin installed successfully (web)"})}}},st=!0}}}(),lt(),r=n.g.Hippy.document.callUIFunction.bind(n.g.Hippy.document),i=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:10,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:50,s=x(e);if(s&&"function"==typeof s[t])try{var u=s[t](n);if(!u||"function"!=typeof u.then)return r&&"function"==typeof r&&r(u),u;u.then(function(e){r&&"function"==typeof r&&r(e)}).catch(function(e){r&&"function"==typeof r&&r({error:e.message})})}catch(e){}else o>0&&setTimeout(function(){i(e,t,n,r,o-1,a)},a)},n.g.Hippy.document.callUIFunction=function(e,t,n,o){var a,s,u,l;Array.isArray(e)&&"function"==typeof t?(a=e[0],s=e[1],u=e[2],l=t):(a=e,s=t,u=n,l=o);var c=x(a);if(c&&"function"==typeof c[s])try{var h=c[s](u);return h&&"function"==typeof h.then?h.then(function(e){return l&&"function"==typeof l&&l(e),e}).catch(function(e){l&&"function"==typeof l&&l({error:e.message})}):(l&&"function"==typeof l&&l(h),h)}catch(e){}else if(!c)return void i(a,s,u,l);return r(a,s,u,l)},ct(),ht(),function(e){var t,n,r=null===(t=e.context)||void 0===t||null===(n=t.getModuleByName)||void 0===n?void 0:n.call(t,"HippyWeb");if(r&&r.setElementStyle&&!r._setElementStylePatched){var i=r.setElementStyle.bind(r);r.setElementStyle=function(e,t){var n=mt(e,t),r=(0,Ke.Zd)(n),o=(0,Ke.II)(r);i(e,o)},r._setElementStylePatched=!0}}(e),gt(),_t||(_t=new MutationObserver(function(){return gt()})).observe(document.head,{childList:!0,subtree:!0}),!bt(e)){var o=function(){bt(e)||requestAnimationFrame(o)};requestAnimationFrame(o)}}(Od);var Ld=new Ut;n.g.__TV_FOCUS_MANAGER__=Ld;var Pd=document.createElement("style");Pd.id="web-runtime-css",Pd.textContent='\n #app, #app * { align-items: flex-start; }\n [style*="align-items"] { align-items: var(--align-items, center) !important; }\n',document.head.appendChild(Pd);var Rd=new URLSearchParams(window.location.search),Nd=Rd.get("args");if(Nd)try{window.__DEEP_LINK_PARAMS__=JSON.parse(Nd)}catch(e){window.__DEEP_LINK_PARAMS__={}}function Dd(e,t){var n=function(e){var t=e.match(/es3[-_]?router[\/@:]\s*(\d+\.\d+\.\d+)/);return t?t[1]:null}(e);if(!n)return!1;for(var r=n.split(".").map(Number),i=t.split(".").map(Number),o=0;o<3;o++){if(r[o]<i[o])return!0;if(r[o]>i[o])return!1}return!1}function Md(e){var t=e.replace(/push\(routerHistory\.location\)\.catch\(\s*\(err\)\s*=>\s*\{[\s\S]*?warn[\s\S]*?\}\s*\);/g,"void 0");return t!==e&&e.length>0||(t=(t=(t=t.replace(/&&\(\w+=!0x0,\w+(?:\[[\w$.]+\(\w+\)\])?\(\w+(?:\[[\w$.]+\(\w+\)\])?\)(?:\[[\w$.]+\(\w+\)\])?\(\w+=>\{(?:0x0;?)?\}\)\)/g,"&&void 0")).replace(/[\w$]+\([\w$]+\.location\)\.catch\(.*?\{[^}]{0,5}\}\s*\)(?:\s*\))?/g,"void 0")).replace(/[\w$]+\([\w$]+\[[\w$]+\(\w+\)\]\)\.catch\(.*?\{[^}]{0,5}\}\s*\)(?:\s*\))?/g,"void 0"))!==e&&e.length,t}function Fd(e){return Bd.apply(this,arguments)}function Bd(){return(Bd=l(h().mark(function e(t){var n,r,i;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,fetch(t);case 1:if((n=e.sent).ok){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=3,n.text();case 3:return r=e.sent,Dd(r=id()+r,"3.0.1")&&(r=Md(r)),(i=document.createElement("script")).textContent=r,document.body.appendChild(i),e.abrupt("return",!0);case 4:return e.prev=4,e.catch(0),e.abrupt("return",!1);case 5:case"end":return e.stop()}},e,null,[[0,4]])}))).apply(this,arguments)}function jd(e){return Ud.apply(this,arguments)}function Ud(){return(Ud=l(h().mark(function e(t){var n,r,i,o,a,s;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,fetch(t);case 1:if((n=e.sent).ok){e.next=2;break}throw new Error("Fetch failed: "+n.status);case 2:return e.next=3,n.text();case 3:return r=e.sent,i=Dd(r,"3.0.1")?Md(r):r,o=id()+i,a=new Blob([o],{type:"application/javascript"}),s=URL.createObjectURL(a),e.abrupt("return",new Promise(function(e,t){var n=document.createElement("script");n.src=s,n.onload=function(){URL.revokeObjectURL(s),e()},n.onerror=function(e){URL.revokeObjectURL(s),t(e)},document.body.appendChild(n)}));case 4:return e.prev=4,e.catch(0),e.abrupt("return",new Promise(function(e,n){var r=document.createElement("script");r.src=t,r.onload=function(){e()},r.onerror=function(e){n(e)},document.body.appendChild(r)}));case 5:case"end":return e.stop()}},e,null,[[0,4]])}))).apply(this,arguments)}function Wd(e){return Vd.apply(this,arguments)}function Vd(){return Vd=l(h().mark(function e(t){var r,i,o,a,s,u,l,c;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,rd(t),o=!1,!t.endsWith("index.android.js")){e.next=3;break}return a=t.replace("index.android.js","vendor.android.js"),e.next=2,Fd(a);case 2:o=e.sent,e.next=4;break;case 3:t.endsWith("index.bundle");case 4:return o||(s=id(),(u=document.createElement("script")).textContent=s,document.body.appendChild(u)),e.next=5,jd(t);case 5:if(l=null===(r=n.g.__GLOBAL__)||void 0===r||null===(r=r.jsModuleList)||void 0===r?void 0:r.EventDispatcher,0!==(c=Object.keys((null===(i=n.g.__GLOBAL__)||void 0===i?void 0:i.appRegister)||{})).length){e.next=6;break}return e.abrupt("return");case 6:c.includes(I)?I:c[0],Mh(Od),l&&(n.g.__GLOBAL__=n.g.__GLOBAL__||{},n.g.__GLOBAL__.jsModuleList=n.g.__GLOBAL__.jsModuleList||{},n.g.__GLOBAL__.jsModuleList.EventDispatcher=l),e.next=8;break;case 7:e.prev=7,e.catch(1);case 8:case"end":return e.stop()}},e,null,[[1,7]])})),Vd.apply(this,arguments)}function zd(){return Hd.apply(this,arguments)}function Hd(){return(Hd=l(h().mark(function e(){var t,r,i,o,a,s,u,l,c,d,f,p;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i=Gh.entryFile){e.next=1;break}throw new Error("No entry file in ZIP cache");case 1:if((o=document.getElementById("bundle-info"))&&(o.textContent="Loading: "+Gh.zipName),a=i.substring(0,i.lastIndexOf("/")),s=a?"".concat(a,"/vendor.android.js"):"vendor.android.js",!Gh.has(s)){e.next=3;break}return e.next=2,ed(s);case 2:e.next=4;break;case 3:if(u=Gh.list(),!(l=u.find(function(e){return e.endsWith("vendor.android.js")}))){e.next=4;break}return e.next=4,ed(l);case 4:return e.next=5,ed(i);case 5:return e.next=6,new Promise(function(e){return setTimeout(e,100)});case 6:if(c=null===(t=n.g.__GLOBAL__)||void 0===t||null===(t=t.jsModuleList)||void 0===t?void 0:t.EventDispatcher,0!==(d=Object.keys((null===(r=n.g.__GLOBAL__)||void 0===r?void 0:r.appRegister)||{})).length){e.next=7;break}return e.abrupt("return");case 7:d.includes(I)?I:d[0],Mh(Od),c&&(n.g.__GLOBAL__=n.g.__GLOBAL__||{},n.g.__GLOBAL__.jsModuleList=n.g.__GLOBAL__.jsModuleList||{},n.g.__GLOBAL__.jsModuleList.EventDispatcher=c),o&&(o.textContent="Running: "+Gh.zipName),e.next=9;break;case 8:e.prev=8,p=e.catch(0),(f=document.getElementById("bundle-info"))&&(f.textContent="Error: "+p.message);case 9:case"end":return e.stop()}},e,null,[[0,8]])}))).apply(this,arguments)}function Gd(e,t){return Yd.apply(this,arguments)}function Yd(){return Yd=l(h().mark(function e(t,n){var r,i,o,a,s,u,l,c=arguments;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(r=c.length>2&&void 0!==c[2]?c[2]:"")?"[Web Runtime][".concat(r,"]"):"[Web Runtime]",e.next=1,Yh();case 1:return i=e.sent,e.next=2,i.loadAsync(t);case 2:return o=e.sent,a={},s=[],o.forEach(function(e,t){t.dir||Xh(e)&&s.push(t.async("uint8array").then(function(t){for(var n="",r=0;r<t.length;r++)n+=String.fromCharCode(t[r]);a[e]=btoa(n)}))}),e.next=3,Promise.all(s);case 3:if(u=Object.keys(a),(l=u.find(function(e){return e.endsWith("index.bundle")}))||(l=u.find(function(e){return e.endsWith("index.android.js")})),l||(l=u.find(function(e){return e.match(/index\.(android|hippy)\.js$/)})),l||(l=u.find(function(e){return e.endsWith(".bundle")})),l||(l=u.find(function(e){return e.endsWith(".js")})),l){e.next=4;break}throw new Error("ZIP 包中未找到有效的入口文件 (index.bundle 或 index.android.js)");case 4:return e.next=5,zh();case 5:return Gh.loadFromData({files:a,entryFile:l,zipName:n}),e.next=6,zd();case 6:case"end":return e.stop()}},e)})),Yd.apply(this,arguments)}n.g.__GLOBAL__=n.g.__GLOBAL__||{},n.g.__GLOBAL__.appRegister=new Proxy({},{set:(e,t,n)=>(e[t]=n,!0),get:(e,t)=>e[t]}),window.addEventListener("zip-file-selected",function(){var e=l(h().mark(function e(t){var n,r,i;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.detail.file,r=document.getElementById("bundle-info"),e.prev=1,r&&(r.textContent="Extracting "+n.name+"..."),e.next=2,Zh(n);case 2:e.next=4;break;case 3:e.prev=3,i=e.catch(1),r&&(r.textContent="Error: "+i.message);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}()),window.addEventListener("directory-dropped",function(){var e=l(h().mark(function e(t){var n,r,i,o,a,s,u;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.detail,r=n.files,i=n.entryFile,o=n.name,a=document.getElementById("bundle-info"),e.prev=1,a&&(a.textContent="正在保存 "+Object.keys(r).length+" 个文件..."),e.next=2,jh(r,i,o);case 2:return e.next=3,Wh();case 3:e.sent,a&&(a.textContent="保存完成,正在加载..."),(s=new URL(window.location.href)).searchParams.set("zip","1"),s.searchParams.delete("bundle"),window.location.href=s.toString(),e.next=5;break;case 4:e.prev=4,u=e.catch(1),a&&(a.textContent="Error: "+u.message);case 5:case"end":return e.stop()}},e,null,[[1,4]])}));return function(t){return e.apply(this,arguments)}}());var qd="1"===Rd.get("zip"),Xd="1"===Rd.get("crossApp"),Zd=Rd.get("es_pkg"),Kd=Rd.get("ver"),$d=Rd.get("bundle"),Jd=Rd.get("zipUrl");function Qd(){return(Qd=l(h().mark(function e(){var t,n,r,i,o,a,s,u,l,c,d;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=document.getElementById("bundle-info"),!Xd){e.next=5;break}if(n=sessionStorage.getItem("__CROSS_APP_ARGS__")){try{window.__DEEP_LINK_PARAMS__=JSON.parse(n)}catch(e){}sessionStorage.removeItem("__CROSS_APP_ARGS__")}return e.next=1,Wh();case 1:if(!(r=e.sent)){e.next=3;break}return Gh.loadFromData(r),e.next=2,zd();case 2:e.next=4;break;case 3:t&&(t.textContent="Error: No app cache found. Please relaunch."),(i=new URL(window.location.href)).searchParams.delete("crossApp"),window.location.replace(i.toString());case 4:return(o=new URL(window.location.href)).searchParams.delete("crossApp"),window.history.replaceState({},"",o.toString()),e.abrupt("return");case 5:if(!Zd){e.next=11;break}return t&&(t.textContent="正在解析快应用: "+Zd+"..."),e.prev=6,e.next=7,Yu(Zd,Kd||void 0);case 7:return a=e.sent,t&&(t.textContent="正在解压: "+Zd+"..."),e.next=8,Gd(a,Zd+".zip","es_pkg");case 8:t&&(t.textContent="运行中: "+Zd),e.next=10;break;case 9:e.prev=9,c=e.catch(6),t&&(t.textContent="Error: "+c.message);case 10:return e.abrupt("return");case 11:if(!qd){e.next=16;break}return e.next=12,Wh();case 12:if(!(s=e.sent)){e.next=14;break}return Gh.loadFromData(s),e.next=13,zd();case 13:e.next=15;break;case 14:t&&(t.textContent="No ZIP cache found. Please upload a ZIP file."),(u=new URL(window.location.href)).searchParams.delete("zip"),window.location.replace(u.toString());case 15:e.next=28;break;case 16:if(!Jd){e.next=23;break}return e.next=17,zh();case 17:return l=Rd.has("_force"),window.__LOADING_OVERLAY__&&(window.__LOADING_OVERLAY__.show(),window.__LOADING_OVERLAY__.update(0,"准备下载...")),e.prev=18,e.next=19,$h(Jd,function(e,n){t&&(t.textContent=n),window.__LOADING_OVERLAY__&&window.__LOADING_OVERLAY__.update(e,n)},l);case 19:return window.__LOADING_OVERLAY__&&window.__LOADING_OVERLAY__.update(100,"加载完成"),e.next=20,zd();case 20:window.__LOADING_OVERLAY__&&window.__LOADING_OVERLAY__.hide(),e.next=22;break;case 21:e.prev=21,d=e.catch(18),t&&(t.textContent="下载失败: "+d.message),window.__LOADING_OVERLAY__&&window.__LOADING_OVERLAY__.hide();case 22:e.next=28;break;case 23:if(!$d){e.next=26;break}return e.next=24,zh();case 24:return e.next=25,Wd($d);case 25:e.next=28;break;case 26:return e.next=27,zh();case 27:t&&(t.textContent="请上传 ZIP 包开始预览");case 28:case"end":return e.stop()}},e,null,[[6,9],[18,21]])}))).apply(this,arguments)}!function(){Qd.apply(this,arguments)}()},3087(e,t,n){"use strict";e.exports=n.p+"860dbbc52c94ebd83844.wasm"},9603(){},7679(){},79(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},1794(e,t,n){var r=n(9313);function i(){var t,n,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.toStringTag||"@@toStringTag";function u(e,i,o,a){var s=i&&i.prototype instanceof c?i:c,u=Object.create(s.prototype);return r(u,"_invoke",function(e,r,i){var o,a,s,u=0,c=i||[],h=!1,d={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,d.n=n,l}};function f(e,r){for(a=e,s=r,n=0;!h&&u&&!i&&n<c.length;n++){var i,o=c[n],f=d.p,p=o[2];e>3?(i=p===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=f&&((i=e<2&&f<o[1])?(a=0,d.v=r,d.n=o[1]):f<p&&(i=e<3||o[0]>r||r>p)&&(o[4]=e,o[5]=r,d.n=p,a=0))}if(i||e>1)return l;throw h=!0,r}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(h&&1===c&&f(c,p),a=c,s=p;(n=a<2?t:s)||!h;){o||(a?a<3?(a>1&&(d.n=-1),f(a,s)):d.n=s:d.v=s);try{if(u=2,o){if(a||(i="next"),n=o[i]){if(!(n=n.call(o,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=o.return)&&n.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((n=(h=d.n<0)?s:e.call(r,d))!==l)break}catch(e){o=t,a=1,s=e}finally{u=1}}return{value:n,done:h}}}(e,o,a),!0),u}var l={};function c(){}function h(){}function d(){}n=Object.getPrototypeOf;var f=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),p=d.prototype=c.prototype=Object.create(f);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,r(e,s,"GeneratorFunction")),e.prototype=Object.create(p),e}return h.prototype=d,r(p,"constructor",d),r(d,"constructor",h),h.displayName="GeneratorFunction",r(d,s,"GeneratorFunction"),r(p),r(p,s,"Generator"),r(p,a,function(){return this}),r(p,"toString",function(){return"[object Generator]"}),(e.exports=i=function(){return{w:u,m:v}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},4408(e,t,n){var r=n(3404);e.exports=function(e,t,n,i,o){var a=r(e,t,n,i,o);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},3404(e,t,n){var r=n(1794),i=n(1666);e.exports=function(e,t,n,o,a){return new i(r().w(e,t,n,o),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},1666(e,t,n){var r=n(79),i=n(9313);e.exports=function e(t,n){function o(e,i,a,s){try{var u=t[e](i),l=u.value;return l instanceof r?n.resolve(l.v).then(function(e){o("next",e,a,s)},function(e){o("throw",e,a,s)}):n.resolve(l).then(function(e){u.value=e,a(u)},function(e){return o("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,t,r){function i(){return new n(function(t,n){o(e,r,t,n)})}return a=a?a.then(i,i):i()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},9313(e){function t(n,r,i,o){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,i){function o(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[n]=r:(o("next",0),o("throw",1),o("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},394(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},7740(e,t,n){var r=n(79),i=n(1794),o=n(4408),a=n(3404),s=n(1666),u=n(394),l=n(5036);function c(){"use strict";var t=i(),n=t.m(c),h=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function d(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function p(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,f[e],t)},delegateYield:function(e,i,o){return t.resultName=i,n(r.d,l(e),o)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=c=function(){return{wrap:function(e,n,r,i){return t.w(p(e),n,r,i&&i.reverse())},isGeneratorFunction:d,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:s,async:function(e,t,n,r,i){return(d(t)?a:o)(p(e),t,n,r,i)},keys:u,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports},5036(e,t,n){var r=n(6611).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},6611(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},715(e,t,n){var r=n(7740)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},6298(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(6517);function i(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},6517(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(553);function i(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=(0,r.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.A)(t)?t:t+""}},553(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},1824(e,t,n){"use strict";n.d(t,{II:()=>c,Zd:()=>h,pb:()=>a,yf:()=>u});var r=n(6298);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e){return"string"!=typeof e?e:e.replace(/^hpfile:\/\/\.?\//,"/").replace(/^hpfile:\/\//,"/")}function s(e){if("string"!=typeof e)return e;var t=a(e);if(!t.startsWith("/assets/"))return t;var n=window.__VIRTUAL_FS__;if(!n||"function"!=typeof n.get)return t;var r=window.__WEB_VFS_BLOB_URL_CACHE__=window.__WEB_VFS_BLOB_URL_CACHE__||new Map;if(r.has(t))return r.get(t);var i=n.get(t);if(!i)return t;var o,s=URL.createObjectURL(new Blob([i],{type:(o=t,{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml"}[String(o).split(".").pop().toLowerCase()]||"application/octet-stream")}));return r.set(t,s),s}function u(e,t){if("string"!=typeof t)return t;var n=String(e).toLowerCase();if("backgroundimage"!==n&&"background-image"!==n&&"background"!==n)return t;var r=t.trim();if(!r)return t;if(/url\(/i.test(r))return function(e){return e.replace(/url\(\s*(['"]?)([^'")\s]+)\1\s*\)/gi,function(e,t,n){var r=s(n);return r===n?e:"url(".concat(r,")")})}(r);var i=s(r);return i!==r?"url(".concat(i,")"):t}var l=["boxShadowOffset","shadowOffset","boxShadowOffsetX","shadowOffsetX","boxShadowOffsetY","shadowOffsetY","boxShadowRadius","shadowRadius","boxShadowSpread","shadowSpread","boxShadowColor","shadowColor","boxShadowOpacity","shadowOpacity"];function c(e){if(!e||"object"!=typeof e)return e;var t=function(e){var t=0,n=0,r=0,i=0,o="#000",a=1,s=!1,u=void 0;if(Object.prototype.hasOwnProperty.call(e,"boxShadowOffset")?(u=e.boxShadowOffset,s=!0):Object.prototype.hasOwnProperty.call(e,"shadowOffset")&&(u=e.shadowOffset,s=!0),null!=u)if("string"==typeof u){var l=String(u).trim().split(/\s+/);l[0]&&(t=parseFloat(l[0])||0),l[1]&&(n=parseFloat(l[1])||0)}else"object"==typeof u&&(void 0!==u.x&&null!==u.x&&(t=parseFloat(u.x)||0),void 0!==u.y&&null!==u.y&&(n=parseFloat(u.y)||0));Object.prototype.hasOwnProperty.call(e,"boxShadowOffsetX")?(t=parseFloat(e.boxShadowOffsetX)||0,s=!0):Object.prototype.hasOwnProperty.call(e,"shadowOffsetX")&&(t=parseFloat(e.shadowOffsetX)||0,s=!0),Object.prototype.hasOwnProperty.call(e,"boxShadowOffsetY")?(n=parseFloat(e.boxShadowOffsetY)||0,s=!0):Object.prototype.hasOwnProperty.call(e,"shadowOffsetY")&&(n=parseFloat(e.shadowOffsetY)||0,s=!0),Object.prototype.hasOwnProperty.call(e,"boxShadowRadius")?(r=parseFloat(e.boxShadowRadius)||0,s=!0):Object.prototype.hasOwnProperty.call(e,"shadowRadius")&&(r=parseFloat(e.shadowRadius)||0,s=!0),Object.prototype.hasOwnProperty.call(e,"boxShadowSpread")?(i=parseFloat(e.boxShadowSpread)||0,s=!0):Object.prototype.hasOwnProperty.call(e,"shadowSpread")&&(i=parseFloat(e.shadowSpread)||0,s=!0),Object.prototype.hasOwnProperty.call(e,"boxShadowColor")?(o=e.boxShadowColor,s=!0):Object.prototype.hasOwnProperty.call(e,"shadowColor")&&(o=e.shadowColor,s=!0);var c=void 0;return Object.prototype.hasOwnProperty.call(e,"boxShadowOpacity")?(c=e.boxShadowOpacity,s=!0):Object.prototype.hasOwnProperty.call(e,"shadowOpacity")&&(c=e.shadowOpacity,s=!0),null!=c&&(a=parseFloat(c),isNaN(a)&&(a=1),a=Math.max(0,Math.min(1,a))),{shadowFound:s,offsetX:t,offsetY:n,blurRadius:r,spreadRadius:i,color:o,opacity:a}}(e),n=t.shadowFound,r=t.offsetX,i=t.offsetY,a=t.blurRadius,s=t.spreadRadius,u=t.color,c=t.opacity;if(!n)return e;var h=u;c<1&&(h=function(e,t){if(null==t||t>=1)return e;if(t=Math.max(0,Math.min(1,t)),"number"==typeof e){var n=function(e){var t=(e>>24&255)/255,n=e>>8&255,r=255&e;return"rgba(".concat(e>>16&255,",").concat(n,",").concat(r,",").concat(t,")")}(e);return n.replace(/rgba\(([^,]+,[^,]+,[^,]+)[^)]*\)/,"rgba($1,".concat(t,")"))}if("string"!=typeof e)return e;if(e.startsWith("rgba("))return e.replace(/rgba\(([^,]+,[^,]+,[^,]+)[^)]*\)/,"rgba($1,".concat(t,")"));if(e.startsWith("rgb("))return e.replace(/rgb\(([^)]+)\)/,"rgba($1,".concat(t,")"));if(e.startsWith("#")){var r,i,o,a=e.slice(1);if(3===a.length)r=parseInt(a[0]+a[0],16),i=parseInt(a[1]+a[1],16),o=parseInt(a[2]+a[2],16);else{if(6!==a.length)return e;r=parseInt(a.slice(0,2),16),i=parseInt(a.slice(2,4),16),o=parseInt(a.slice(4,6),16)}return"rgba(".concat(r,",").concat(i,",").concat(o,",").concat(t,")")}return e}(u,c));var d="".concat(r,"px ").concat(i,"px ").concat(a,"px ").concat(s,"px ").concat(h),f=o({},e);return l.forEach(function(e){return delete f[e]}),f.boxShadow=d,f}function h(e){if(!e||"object"!=typeof e)return e;var t=e;return["backgroundImage","background","background-image"].forEach(function(n){if(Object.prototype.hasOwnProperty.call(e,n)){var r=u(n,e[n]);r!==e[n]&&(t===e&&(t=o({},e)),t[n]=r)}}),t}},814(e,t,n){"use strict";n.d(t,{Hd:()=>u,bindTemplateDataToNode:()=>_,u6:()=>g,vy:()=>l});var r=n(6298),i=n(1824);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e,t){return e.split(".").reduce(function(e,t){return e&&void 0!==e[t]?e[t]:void 0},t)}function u(e,t){if(!e||!t)return e;var n=String(e).match(/^\$\{([^}]+)\}$/);return n?s(n[1],t):e}function l(e,t){return e&&t?String(e).replace(/\$\{([^}]+)\}/g,function(e,n){var r=s(n,t);return void 0!==r?String(r):e}):e}function c(e,t){if(t&&"object"==typeof t){t=(0,i.II)(t);var n=["flexDirection","justifyContent","alignItems","alignContent","flexWrap","flexGrow","flexShrink","flexBasis","order","alignSelf"];Object.keys(t).some(function(e){return n.includes(e)})&&!Object.keys(t).includes("display")&&(e.style.display="flex"),Object.keys(t).forEach(function(n){var r=t[n];("backgroundImage"!==n&&"background"!==n||(r=(0,i.yf)(n,r)),"number"==typeof r)&&(["width","height","minWidth","minHeight","maxWidth","maxHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","top","left","right","bottom","borderRadius","borderWidth","fontSize","lineHeight","letterSpacing","gap","rowGap","columnGap"].includes(n)&&(r+="px"));try{"x"!==n&&"y"!==n&&(e.style[n]=r)}catch(t){try{if("x"!==n&&"y"!==n){var o=n.replace(/([A-Z])/g,"-$1").toLowerCase();e.style.setProperty(o,r)}}catch(e){}}})}}function h(e,t){if(t){if(Array.isArray(t)){var n=t[0],r=t[1],i=t[2],o=t[3],a=e.style.position||"",s=""===a||"absolute"===a||"fixed"===a||"relative"===a;return s&&null!=n&&(e.style.left="number"==typeof n?"".concat(n,"px"):n),s&&null!=r&&(e.style.top="number"==typeof r?"".concat(r,"px"):r),null!=i&&(e.style.width="number"==typeof i?"".concat(i,"px"):i),null!=o&&(e.style.height="number"==typeof o?"".concat(o,"px"):o),void(!s||void 0===n&&void 0===r||e.style.position&&"relative"!==e.style.position||(e.style.position="absolute"))}if("object"==typeof t){var u=t.x,l=t.y,c=t.width,h=t.height,d=e.style.position||"",f=""===d||"absolute"===d||"fixed"===d||"relative"===d;f&&null!=u&&(e.style.left="number"==typeof u?"".concat(u,"px"):u),f&&null!=l&&(e.style.top="number"==typeof l?"".concat(l,"px"):l),null!=c&&(e.style.width="number"==typeof c?"".concat(c,"px"):c),null!=h&&(e.style.height="number"==typeof h?"".concat(h,"px"):h),!f||void 0===u&&void 0===l||e.style.position&&"relative"!==e.style.position||(e.style.position="absolute")}}}function d(e,t){if(t&&"object"==typeof t){var n=t.left,r=t.top,i=t.right,o=t.bottom;null!=n&&(e.style.marginLeft="number"==typeof n?"".concat(n,"px"):n),null!=r&&(e.style.marginTop="number"==typeof r?"".concat(r,"px"):r),null!=i&&(e.style.marginRight="number"==typeof i?"".concat(i,"px"):i),null!=o&&(e.style.marginBottom="number"==typeof o?"".concat(o,"px"):o)}}function f(e,t){if(t){if(Array.isArray(t)){var n=t[0],r=t[1];return null!=n&&(e.style.width="number"==typeof n?"".concat(n,"px"):n),void(null!=r&&(e.style.height="number"==typeof r?"".concat(r,"px"):r))}if("object"==typeof t){var i=t.width,o=t.height;null!=i&&(e.style.width="number"==typeof i?"".concat(i,"px"):i),null!=o&&(e.style.height="number"==typeof o?"".concat(o,"px"):o)}}}function p(e){var t=window.__HIPPY_COMPONENT_REGISTRY__;return t&&t.get(e)||null}function v(e,t){var n=String(e).match(/^\$\{([^}]+)\}$/);return n?{isPure:!0,value:s(n[1],t)}:{isPure:!1,value:l(e,t)}}function y(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return null;var t=e.children;if(!t||0===t.length)return null;for(var n=0,r=Array.from(t);n<r.length;n++){var i=r[n];if(i.classList&&i.classList.contains("qt-text-inner"))return i}return null}function m(e){if(e&&e.nodeType===Node.ELEMENT_NODE&&(!e.hasAttribute||e.hasAttribute("autoWidth")||e.hasAttribute("autowidth"))){var t=y(e);if(t){var n=t.scrollWidth||t.offsetWidth;if(!(n<=0)){e.style.width=n+"px",e.style.minWidth=n+"px";for(var r=e.parentElement;r;){if(r.hasAttribute&&(r.hasAttribute("autoWidth")||r.hasAttribute("autowidth"))){var i=window.getComputedStyle(r),o=n+(parseInt(i.paddingLeft)||0)+(parseInt(i.paddingRight)||0);r.style.width=o+"px",r.style.minWidth=o+"px",r.querySelectorAll("[autoWidth], [autowidth]").forEach(function(t){t!==e&&(y(t)||"absolute"===window.getComputedStyle(t).position&&(t.style.left="0",t.style.right="0",t.style.width="auto"))});break}r=r.parentElement}}}}}function g(e){e&&e.nodeType===Node.ELEMENT_NODE&&e.querySelector&&e.querySelectorAll("[autoWidth], [autowidth]").forEach(function(e){y(e)&&m(e)})}function _(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t){var i=a(a({},r.scope||{}),t);if(e.nodeType!==Node.TEXT_NODE){if(e.nodeType===Node.ELEMENT_NODE){for(var o=0,y=Array.from(e.childNodes);o<y.length;o++){var g=y[o];g.nodeType===Node.TEXT_NODE&&g.textContent&&g.textContent.includes("${")&&_(g,i,r)}var b=p(e),w=!0,k=null!==(n=e.getAttribute("data-template-type"))&&void 0!==n?n:e.getAttribute("type");if(null!=k&&""!==k){var E=String(k);if(E.includes("${")&&(E=String(l(E,i))),E!==(void 0!==i.type&&null!==i.type?String(i.type):null))return e.style.display="none",void e.setAttribute("data-type-match","false");"none"===e.style.display&&"false"===e.getAttribute("data-type-match")&&e.style.removeProperty("display"),e.setAttribute("data-type-match","true")}Array.from(e.attributes).map(function(e){return"".concat(e.name,'="').concat(e.value,'"')}).join(", ");var S=e.getAttribute("showIf")||e.getAttribute("showif");S&&(e.setAttribute("data-showif-expr",S),e.removeAttribute("showIf"),e.removeAttribute("showif"));var A=e.getAttribute("data-showif-expr");if(A){var x=function(e,t){if(!e)return!0;var n=e.match(/^\$\{([^}]+)\}$/);if(!n)return!!e;var r=n[1].trim();if(r.includes("==")){var i=r.split("==").map(function(e){return e.trim()});if(2===i.length){var o=s(i[0],t),a=i[1].trim();if("true"===a)return!0===o;if("false"===a)return!1===o}}return!!s(r,t)}(A,i),C=!1===x?"false":"true";if(e.getAttribute("data-showif-result")!==C){if(e.setAttribute("data-showif-result",C),!1===x)return e.style.display="none",void(b&&"function"==typeof b.setVisible&&b.setVisible(!1));"none"===e.style.display&&e.style.removeProperty("display"),b&&"function"==typeof b.setVisible&&b.setVisible(!0)}else if(!1===x)return}for(var T=0,I=Array.from(e.attributes);T<I.length;T++){var O=I[T],L=O.value;if(L&&"string"==typeof L&&L.includes("${")){var P=O.name.toLowerCase(),R=v(L,i);if("list"!==P&&"listdata"!==P)if("flexstyle"!==P)if("layout"!==P)if("decoration"!==P)if("size"!==P)if("textsize"!==P&&"fontsize"!==P){var N=R.isPure?void 0!==R.value?String(R.value):L:R.value;b&&("text"===P&&"function"==typeof b.setText?b.setText(N):"function"==typeof b.updateProperty&&b.updateProperty(O.name,N)),e.setAttribute(O.name,N)}else{var D=R.isPure?R.value:u(L,i);if(void 0!==D){if(b&&"function"==typeof b.updateProperty)b.updateProperty(O.name,D);else{var M="number"==typeof D?D+"px":D;e.style.fontSize=M}e.removeAttribute(O.name)}}else{var F=R.isPure?R.value:u(L,i);null!=F&&(b&&"function"==typeof b.updateProperty?b.updateProperty(O.name,F):f(e,F),e.removeAttribute(O.name))}else{var B=R.isPure?R.value:u(L,i);B&&"object"==typeof B&&(b&&"function"==typeof b.updateProperty?b.updateProperty(O.name,B):d(e,B),e.removeAttribute(O.name))}else{var j=R.isPure?R.value:u(L,i);null!=j&&(b&&"function"==typeof b.updateProperty?b.updateProperty(O.name,j):h(e,j),e.removeAttribute(O.name))}else{var U=R.isPure?R.value:u(L,i);U&&"object"==typeof U&&(b&&"function"==typeof b.updateProperty?b.updateProperty(O.name,U):c(e,U),e.removeAttribute(O.name))}else{var W=R.isPure?R.value:u(L,i);Array.isArray(W)?("function"==typeof r.onListData&&r.onListData(e,W,O.name),w=!1,e.removeAttribute(O.name)):(b&&"function"==typeof b.updateProperty&&b.updateProperty(O.name,W),void 0===W?e.setAttribute(O.name,L):e.setAttribute(O.name,String(W)))}}}if(e.style&&e.style.cssText&&e.style.cssText.includes("${")&&(e.style.cssText=l(e.style.cssText,i),m(e)),"IMG"===e.tagName&&e.getAttribute("src")){var V=e.getAttribute("src"),z=function(e){if(!e||"string"!=typeof e)return e;if(e.startsWith("file://")){var t=e.slice(7);return(t=t.replace(/^\/+/,"")).startsWith("./")&&(t=t.slice(2)),"./"+t}return e.startsWith("assets/")?"./"+e:e}(V.includes("${")?l(V,i):V);z!==V&&(b&&"function"==typeof b.updateProperty&&b.updateProperty("src",z),e.setAttribute("src",z),e.src=z)}w&&Array.from(e.childNodes).forEach(function(e){_(e,i,r)})}}else{var H=e.textContent;if(H&&H.includes("${")){var G=l(H,i);if(G!==H){var Y=e.parentElement,q=Y&&Y.classList&&Y.classList.contains("qt-text-inner")?function(e){for(var t=e&&e.nodeType===Node.TEXT_NODE?e.parentElement:e;t;){var n=p(t);if(n)return n;t=t.parentElement}return null}(e):null;q&&"function"==typeof q.setText?q.setText(G):(e.textContent=G,Y&&Y.classList&&Y.classList.contains("qt-text-inner")&&m(Y.parentElement))}}}}}}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}},r=!0;try{i[e].call(n.exports,n,n.exports,a),r=!1}finally{r&&delete o[e]}return n.exports}a.m=i,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);a.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>o[e]=()=>n[e]);return o.default=()=>n,a.d(i,o),i},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,n)=>(a.f[n](e,t),t),[])),a.u=e=>"web-runtime.f4243c246d9c84993074.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="@quicktvui/web-runtime:",a.l=(e,t,i,o)=>{if(n[e])n[e].push(t);else{var s,u;if(void 0!==i)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var h=l[c];if(h.getAttribute("src")==e||h.getAttribute("data-webpack")==r+i){s=h;break}}s||(u=!0,(s=document.createElement("script")).charset="utf-8",a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",r+i),s.src=e),n[e]=[t];var d=(t,r)=>{s.onerror=s.onload=null,clearTimeout(f);var i=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach(e=>e(r)),t)return t(r)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),u&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{a.b="undefined"!=typeof document&&document.baseURI||self.location.href;var e={57:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise((n,i)=>r=e[t]=[n,i]);n.push(r[2]=i);var o=a.p+a.u(t),s=new Error;a.l(o,n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",s.name="ChunkLoadError",s.type=i,s.request=o,r[1](s)}},"chunk-"+t,t)}};var t=(t,n)=>{var r,i,[o,s,u]=n,l=0;if(o.some(t=>0!==e[t])){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);if(u)u(a)}for(t&&t(n);l<o.length;l++)i=o[l],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=(0,eval)("this").webpackChunk_quicktvui_web_runtime=(0,eval)("this").webpackChunk_quicktvui_web_runtime||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),a(6011);a(2649)})();
|