@quicktvui/web-cli 3.1.0 → 3.1.2
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.
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see web-runtime.600135453542ce1e4bff.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e,t,n,r,i={11(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",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=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 T(r||[]);return i(a,"_invoke",{value:x(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var h="suspendedStart",f="suspendedYield",p="executing",v="completed",y={};function m(){}function g(){}function b(){}var _={};u(_,a,function(){return this});var w=Object.getPrototypeOf,E=w&&w(w(I([])));E&&E!==n&&r.call(E,a)&&(_=E);var k=b.prototype=m.prototype=Object.create(_);function S(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function A(e,t){function n(i,o,a,s){var l=d(e[i],e,o);if("throw"!==l.type){var u=l.arg,c=u.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){u.value=e,a(u)},function(e){return n("throw",e,a,s)})}s(l.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=h;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 l=C(s,r);if(l){if(l===y)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var u=d(e,n,r);if("normal"===u.type){if(i=r.done?v:f,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.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=d(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 L(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 P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function I(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=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"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,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},S(A.prototype),u(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(k),u(k,l,"Generator"),u(k,a,function(){return this}),u(k,"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=I,T.prototype={constructor:T,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(P),!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 l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)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),P(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;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(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)}},991(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=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||o(e,t)||a()}function l(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function u(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){l(o,r,i,a,s,"next",e)}function s(e){l(o,r,i,a,s,"throw",e)}a(void 0)})}}var c=n(715),d=n.n(c),h=null,f=new Map,p=new Map;function v(){return h}function y(e,t){f.set(e,t),console.log("[Web Renderer] Registered component:",e,t.constructor.name)}function m(e,t){var n;e&&"string"==typeof e&&(p.set(e,t),console.log("[Web Renderer] Registered component by sid:",e,(null===(n=t.constructor)||void 0===n?void 0:n.name)||t.tagName))}function g(e){p.has(e)&&(p.delete(e),console.log("[Web Renderer] Unregistered component by sid:",e))}function b(e){if("string"==typeof e)return t=e,p.has(t)?p.get(t):null;var t;if(f.has(e))return f.get(e);if(!h)return null;try{var n,r,i=null===(n=h.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){console.error("[Web Renderer] Error finding component:",e)}return null}var _=n(298);function w(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function E(e){return function(e){if(Array.isArray(e))return i(e)}(e)||w(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 k=1920,S=1080,A="EsApp";function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var C=n(517);function L(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,C.A)(r.key),r)}}function P(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function T(e,t){var n=e&&e.length?e[e.length-1]:null;return n&&"function"==typeof n.resolve&&n.resolve(t),t}function I(e){var t=e&&e.length?e[e.length-1]:null;return t&&"function"==typeof t.resolve&&t.resolve(!0),Promise.resolve(!0)}var O=function(){return P(function e(){x(this,e),this.name="AndroidDeviceModule"},[{key:"getAndroidDevice",value:(w=u(c.mark(function e(){var t,n,r,i,o,a,s,l,u,d,h,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(),l=this._estimateAvailMemoryMB(),u={deviceId:n,deviceType:r,ipAddress:o,ethMac:"",wifiMac:a,totalMemory:s,availableMemory:l,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"},d=p.length,h=new Array(d),f=0;f<d;f++)h[f]=p[f];return e.abrupt("return",T(h,u));case 2:case"end":return e.stop()}},e,this)})),function(){return w.apply(this,arguments)})},{key:"getEthMac",value:(_=u(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",T(n,""));case 1:case"end":return e.stop()}},e)})),function(){return _.apply(this,arguments)})},{key:"getWifiMac",value:(b=u(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",T(n,this._generateMAC()));case 1:case"end":return e.stop()}},e,this)})),function(){return b.apply(this,arguments)})},{key:"getTotalMemory",value:(g=u(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",T(n,this._estimateTotalMemoryMB()));case 1:case"end":return e.stop()}},e,this)})),function(){return g.apply(this,arguments)})},{key:"getAvailableMemory",value:(m=u(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",T(n,this._estimateAvailMemoryMB()));case 1:case"end":return e.stop()}},e,this)})),function(){return m.apply(this,arguments)})},{key:"getScreenWidth",value:(y=u(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",T(n,this._getScreenInfo().width));case 1:case"end":return e.stop()}},e,this)})),function(){return y.apply(this,arguments)})},{key:"getScreenHeight",value:(v=u(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",T(n,this._getScreenInfo().height));case 1:case"end":return e.stop()}},e,this)})),function(){return v.apply(this,arguments)})},{key:"getResolution",value:(p=u(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",T(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=u(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",T(n,this._getScreenInfo().density));case 1:case"end":return e.stop()}},e,this)})),function(){return f.apply(this,arguments)})},{key:"getDensityDpi",value:(h=u(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",T(n,this._getScreenInfo().densityDpi));case 1:case"end":return e.stop()}},e,this)})),function(){return h.apply(this,arguments)})},{key:"getScaledDensity",value:(d=u(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",T(n,this._getScreenInfo().scaledDensity));case 1:case"end":return e.stop()}},e,this)})),function(){return d.apply(this,arguments)})},{key:"getBuildVersionRelease",value:(l=u(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",T(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return l.apply(this,arguments)})},{key:"getBuildModel",value:(s=u(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",T(n,this._getBrowserInfo()));case 1:case"end":return e.stop()}},e,this)})),function(){return s.apply(this,arguments)})},{key:"getBuildBrand",value:(a=u(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",T(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return a.apply(this,arguments)})},{key:"getBuildDevice",value:(o=u(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",T(n,"Browser"));case 1:case"end":return e.stop()}},e)})),function(){return o.apply(this,arguments)})},{key:"getBuildBoard",value:(i=u(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",T(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return i.apply(this,arguments)})},{key:"getBuildProduct",value:(r=u(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",T(n,"quicktvui-web"));case 1:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)})},{key:"getBuildHardware",value:(n=u(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",T(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"getBuildManufacturer",value:(t=u(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",T(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=u(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,l,d,h,f,p,v,y,m,g,b,_,w}(),R=new O,N=0,D=1,M=9,F=1,V=3;function B(){if("undefined"==typeof navigator||!navigator.connection)return M;var e=navigator.connection,t=e.type||e.effectiveType;return"wifi"===t?D:"cellular"===t||"2g"===t||"3g"===t||"4g"===t?N:"ethernet"===t?M:e.effectiveType&&["4g","3g","2g","slow-2g"].includes(e.effectiveType)?N:M}function W(){return"undefined"==typeof navigator||navigator.onLine}function j(){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 H=function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"getActiveNetworkInfo",value:(n=u(c.mark(function e(){var t,n,r,i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=W(),n=B(),r=j(),i={type:n,typeName:this._getTypeName(n),subtype:0,state:t?V:F,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=l.length,a=new Array(o),s=0;s<o;s++)a[s]=l[s];return e.abrupt("return",T(a,i));case 1:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"getWifiInfo",value:(t=u(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=B(),n=j(),r={ssid:"",strength:t===D?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",T(o,r));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"_getTypeName",value:function(e){switch(e){case D:return"WIFI";case N:return"MOBILE";case M:return"ETHERNET";default:return"UNKNOWN"}}},{key:"destroy",value:function(){}},{key:"init",value:(e=u(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",I(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})}]);var e,t,n}(),U=new H,z="quicktvui_device_id";function G(){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 Y(){return q.apply(this,arguments)}function q(){return(q=u(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(z);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=G();try{localStorage.setItem(z,n)}catch(e){}return e.abrupt("return",n);case 5:case"end":return e.stop()}},e,null,[[0,3]])}))).apply(this,arguments)}function Q(){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 K=function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.mode="normal",this._deviceId=null},[{key:"_getDeviceId",value:(i=u(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,Y();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=u(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 console.log("[RuntimeDeviceModule] getRuntimeDeviceId called, deviceId:",t,"args:",r),e.abrupt("return",T(r,t));case 2:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"getRuntimeDeviceType",value:(n=u(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",T(n,"web"));case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"getRuntimeDeviceInfo",value:(t=u(c.mark(function e(){var t,n,r,i,o,a,s,l,u,d=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=Q(),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=d.length,l=new Array(s),u=0;u<s;u++)l[u]=d[u];return e.abrupt("return",T(l,a));case 2:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"destroy",value:function(){}},{key:"init",value:(e=u(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",I(n));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})}]);var e,t,n,r,i}(),X=new K;function Z(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 J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $(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 ee(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)?ee(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 ee(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 te(){try{var e,t=null===(e=n.g.__GLOBAL__)||void 0===e?void 0:e.jsModuleList;return t&&t.EventDispatcher?t.EventDispatcher:(console.warn("[NativeEventDispatcher] EventDispatcher not available in jsModuleList"),null)}catch(e){return console.error("[NativeEventDispatcher] Error getting EventDispatcher:",e),null}}function ne(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 re=new Set(["onLoadPageData","onPageChanged"]),ie=new Map;function oe(e,t){var n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return re.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=ie.get(n);if(ie.set(n,r),i&&r-i<=32)return!0;var o,a=$(ie.entries());try{for(a.s();!(o=a.n()).done;){var l=s(o.value,2),u=l[0];r-l[1]>128&&ie.delete(u)}}catch(e){a.e(e)}finally{a.f()}return!1}function ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=te();if(!n)return!1;try{return n.receiveNativeEvent([e,t]),!0}catch(t){return console.error('[NativeEventDispatcher] Error sending event "'.concat(e,'":'),t),!1}}function se(){return ae("hardwareBackPress",null)}function le(e){return ae("DispatchKeyEvent",e)}function ue(e){return le(J(J({},e),{},{action:0}))}function ce(e){return le(J(J({},e),{},{action:1}))}function de(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=te();if(!r||"function"!=typeof r.receiveNativeGesture)return!1;if("number"!=typeof e||!t)return!1;try{return r.receiveNativeGesture(J({id:e,name:t},n)),!0}catch(e){return console.error('[NativeEventDispatcher] Error sending native gesture "'.concat(t,'":'),e),!1}}function he(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=te();return!(!r||"number"!=typeof e||!t)&&("function"==typeof r.receiveNativeGesture?de(e,t,n):ae(t,J({id:e,currentId:e},n)))}function fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=te();if(!r)return!1;if("number"!=typeof e||!t)return!1;if(oe(e,t,n))return console.log("[NativeEventDispatcher] Skip duplicate ui component event:",t,"targetNodeId:",e,"pageIndex:",null==n?void 0:n.pageIndex),!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:ne(t),params:n,eventPhase:2}}(e,t,n),{stopPropagation(){}}),!0)}catch(e){return console.error('[NativeEventDispatcher] Error sending ui component event "'.concat(t,'":'),e),!1}}var pe=0,ve=1,ye=2,me=3,ge=4,be=5,_e=6,we=7,Ee=8,ke=9,Se=10,Ae=11,xe=12,Ce=13,Le=26,Pe=29,Te=new(function(){return P(function e(){x(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=pe;e.addEventListener("play",function(){r!==be&&(r=be,ae("onESAudioPlayerStatusChanged",{playerStatus:be,playerState:be}))}),e.addEventListener("playing",function(){r!==be&&(r=be,ae("onESAudioPlayerStatusChanged",{playerStatus:be,playerState:be}))}),e.addEventListener("pause",function(){r=Ee,ae("onESAudioPlayerStatusChanged",{playerStatus:Ee,playerState:Ee})}),e.addEventListener("ended",function(){r=xe,n=!0,ae("onESAudioPlayerStatusChanged",{playerStatus:xe,playerState:xe})}),e.addEventListener("error",function(e){var t,n;r=Ce,ae("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=ve,ae("onESAudioPlayerStatusChanged",{playerStatus:ve,playerState:ve})}),e.addEventListener("canplay",function(){n||(n=!0,r=ye,ae("onESAudioPlayerStatusChanged",{playerStatus:ye,playerState:ye}))}),e.addEventListener("waiting",function(){ae("onESAudioPlayerStatusChanged",{playerStatus:me,playerState:me})}),e.addEventListener("canplaythrough",function(){ae("onESAudioPlayerStatusChanged",{playerStatus:ge,playerState:ge})}),e.addEventListener("durationchange",function(){e.duration&&!isNaN(e.duration)&&ae("onESAudioPlayerInfo",{what:1,extra:Math.floor(1e3*e.duration)})}),e.addEventListener("ratechange",function(){ae("onESAudioPlayRateChanged",{playRate:e.playbackRate})}),e.addEventListener("seeking",function(){ae("onESAudioPlayerStatusChanged",{playerStatus:_e,playerState:_e})}),e.addEventListener("seeked",function(){ae("onESAudioPlayerStatusChanged",{playerStatus:we,playerState:we})}),e.addEventListener("volumechange",function(){ae("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()}}])}()),Ie=function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"init",value:(l=u(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(ae("onESAudioPlayerStatusChanged",{playerStatus:Le,playerState:Le}),ae("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",I(n));case 1:case"end":return e.stop()}},e)})),function(){return l.apply(this,arguments)})},{key:"initMediaPlayer",value:function(){ae("onESAudioPlayerStatusChanged",{playerStatus:Le,playerState:Le}),ae("onESAudioPlayerStatusChanged",{playerStatus:Pe,playerState:Pe});for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(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];console.log("[ESIJKAudioPlayerModule] play called with id:",e,"params:",n);var i,o=Te.getInstance(e),a=n||[],s="",l=!0;if(a.length>0){var u=a[0];"string"==typeof u?s=u:Array.isArray(u)&&"string"==typeof u[0]?s=u[0]:"object"!=typeof u||null===u||Array.isArray(u)||(s=u.url||u.src||u.uri||"",l=!1!==u.autoplay)}if(console.log("[ESIJKAudioPlayerModule] parsed url:",s,"autoplay:",l),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 console.log("[ESIJKAudioPlayerModule] File exists in VirtualFS, skipping URL inference:",e),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),console.log("[ESIJKAudioPlayerModule] final url:",s),o.src=s,o.load()}return l&&o.src&&o.play().catch(function(e){console.warn("[ESIJKAudioPlayerModule] play error:",e),ae("onESAudioPlayerError",{errorCode:-1,errorMessage:e.message||"Play error"})}),T(a,null)}},{key:"start",value:function(e){var t=Te.getInstance(e);t.src&&t.play().catch(function(e){console.warn("[ESIJKAudioPlayerModule] start error:",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 T(r,null)}},{key:"pause",value:function(e){Te.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 T(n,null)}},{key:"resume",value:function(e){Te.getInstance(e).play().catch(function(e){console.warn("[ESIJKAudioPlayerModule] resume error:",e)}),ae("onESAudioPlayerStatusChanged",{playerStatus:ke,playerState:ke});for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return T(n,null)}},{key:"seekTo",value:function(e,t){var n=Te.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 T(i,null)}},{key:"stop",value:function(e){var t=Te.getInstance(e);ae("onESAudioPlayerStatusChanged",{playerStatus:Se,playerState:Se}),t.pause(),t.currentTime=0,ae("onESAudioPlayerStatusChanged",{playerStatus:Ae,playerState:Ae});for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return T(r,null)}},{key:"setPlayRate",value:function(e,t){var n=Te.getInstance(e);n.playbackRate=Number(t)||1,ae("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 T(i,null)}},{key:"setVolume",value:function(e,t){Te.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 T(r,null)}},{key:"setLeftRightVolume",value:function(e,t,n){var r=Te.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 T(a,null)}},{key:"reset",value:function(e){var t=Te.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 T(r,null)}},{key:"release",value:function(e){Te.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 T(n,null)}},{key:"isPlaying",value:(s=u(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=Te.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",T(o,r));case 1:case"end":return e.stop()}},e)})),function(e){return s.apply(this,arguments)})},{key:"isPaused",value:(a=u(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=Te.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",T(o,r));case 1:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)})},{key:"getDuration",value:(o=u(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=Te.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",T(o,r));case 1:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)})},{key:"getCurrentPosition",value:(i=u(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=Te.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",T(o,r));case 1:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)})},{key:"getBufferPercentage",value:(r=u(c.mark(function e(t){var n,r,i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=Te.getInstance(t),r=l.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=l[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",T(i,s));case 1:return e.abrupt("return",T(i,0));case 2:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)})},{key:"getCurrentPlayRate",value:(n=u(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=Te.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",T(i,n.playbackRate||1));case 1:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"getLeftVolume",value:(t=u(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=Te.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",T(i,n.volume));case 1:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})},{key:"getRightVolume",value:(e=u(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=Te.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",T(i,n.volume));case 1:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)})},{key:"destroy",value:function(){Te.clearAll()}}]);var e,t,n,r,i,o,a,s,l}(),Oe="files",Re=null;function Ne(){return new Promise(function(e,t){if(Re)e(Re);else{var n=indexedDB.open("es_vfs_db",1);n.onerror=function(){t(n.error)},n.onsuccess=function(){Re=n.result,e(Re)},n.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains(Oe)||t.createObjectStore(Oe,{keyPath:"path"})}}})}function De(e){return Me.apply(this,arguments)}function Me(){return(Me=u(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,Ne();case 1:return n=e.sent,e.abrupt("return",new Promise(function(e,r){var i=n.transaction([Oe],"readonly").objectStore(Oe).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 Fe(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 console.log("[ESSoundPoolAudioPlayerModule] File exists in VirtualFS, skipping URL inference:",e),null}return"".concat(window.location.origin).concat(e)}function Ve(e){return"string"!=typeof e?e:e.startsWith("/data:")?e.slice(1):e.startsWith("file://")?e.slice(7)||"/":e.startsWith("//")?e.replace(/^\/+/,"/"):e}function Be(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:(console.warn("[ESSoundPoolAudioPlayerModule] EventDispatcher not available in jsModuleList"),null)}catch(e){return console.error("[ESSoundPoolAudioPlayerModule] Error getting EventDispatcher:",e),null}}();if(!r)return console.warn("[ESSoundPoolAudioPlayerModule] EventDispatcher not available"),!1;try{return console.log("[ESSoundPoolAudioPlayerModule] Sending event via EventDispatcher: ".concat(e),t),r.receiveNativeEvent([e,t]),!0}catch(t){return console.error('[ESSoundPoolAudioPlayerModule] Error sending event "'.concat(e,'":'),t),!1}}var We=function(){return P(function e(){x(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,console.log("[ESSoundPoolAudioPlayerModule] Initialized with config:",this.config)}},{key:"load",value:(t=u(c.mark(function e(t){var n,r,i,o,a=this;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.nextSoundID++,i=t,t&&t.startsWith("/")&&t.includes("data:")&&(i=t.substring(t.indexOf("data:"))),console.log("[ESSoundPoolAudioPlayerModule] Loading sound: soundID=".concat(r,", url=").concat(null===(n=i)||void 0===n?void 0:n.substring(0,60),"...")),(o=new Audio).preload="auto",e.abrupt("return",new Promise(function(e,t){var n=function(){o.removeEventListener("canplaythrough",n),o.removeEventListener("error",s),a.sounds.set(r,{url:i,audio:o}),console.log("[ESSoundPoolAudioPlayerModule] Sound loaded: soundID=".concat(r)),e(r),setTimeout(function(){Be("onESSoundPoolLoadComplete",{status:0,sampleId:r})},0)},s=function(e){var i,a;o.removeEventListener("canplaythrough",n),o.removeEventListener("error",s),console.error("[ESSoundPoolAudioPlayerModule] Load error: soundID=".concat(r),e),Be("onESSoundPoolLoadError",{soundID:r,errorCode:(null===(i=e.target)||void 0===i||null===(i=i.error)||void 0===i?void 0:i.code)||-1,errorMessage:(null===(a=e.target)||void 0===a||null===(a=a.error)||void 0===a?void 0:a.message)||"Load error"}),t(e)};o.addEventListener("canplaythrough",n),o.addEventListener("error",s),o.src=i,o.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),console.log("[ESSoundPoolAudioPlayerModule] Sound unloaded: soundID=".concat(e)))}},{key:"play",value:(e=u(c.mark(function e(t,n,r,i,o,a){var s,l,u,d,h,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 console.error("[ESSoundPoolAudioPlayerModule] Sound not found: soundID=".concat(t)),e.abrupt("return",Promise.reject(new Error("Sound not found")));case 1:return l=this.nextStreamID++,console.log("[ESSoundPoolAudioPlayerModule] Playing: soundID=".concat(t,", streamID=").concat(l)),(u=new Audio).src=s.url,u.preload="auto",d=((n||1)+(r||1))/2,u.volume=Math.max(0,Math.min(1,d)),u.playbackRate=a||1,u.loop=-1===o||!0===o,this.streams.set(l,{soundID:t,audio:u}),u.addEventListener("ended",function(){console.log("[ESSoundPoolAudioPlayerModule] Stream ended: streamID=".concat(l)),f.streams.delete(l),Be("onESSoundPoolPlayComplete",{streamID:l,soundID:t})}),u.addEventListener("error",function(e){var n,r;console.error("[ESSoundPoolAudioPlayerModule] Play error: streamID=".concat(l),e),f.streams.delete(l),Be("onESSoundPoolPlayError",{streamID:l,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,u.play();case 3:return console.log("[ESSoundPoolAudioPlayerModule] Playing success: streamID=".concat(l,", soundID=").concat(t)),e.abrupt("return",l);case 4:throw e.prev=4,h=e.catch(2),console.error("[ESSoundPoolAudioPlayerModule] Play failed: streamID=".concat(l),h),this.streams.delete(l),h;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(),console.log("[ESSoundPoolAudioPlayerModule] Stream paused: streamID=".concat(e)))}},{key:"autoPause",value:function(){this.streams.forEach(function(e){e.audio.pause()}),console.log("[ESSoundPoolAudioPlayerModule] All streams paused")}},{key:"resume",value:function(e){var t=this.streams.get(e);t&&t.audio.paused&&(t.audio.play().catch(function(t){console.error("[ESSoundPoolAudioPlayerModule] Resume failed: streamID=".concat(e),t)}),console.log("[ESSoundPoolAudioPlayerModule] Stream resumed: streamID=".concat(e)))}},{key:"autoResume",value:function(){this.streams.forEach(function(e){e.audio.paused&&e.audio.play().catch(function(e){console.error("[ESSoundPoolAudioPlayerModule] Resume failed",e)})}),console.log("[ESSoundPoolAudioPlayerModule] All streams resumed")}},{key:"stop",value:function(e){var t=this.streams.get(e);t&&(t.audio.pause(),t.audio.currentTime=0,this.streams.delete(e),console.log("[ESSoundPoolAudioPlayerModule] Stream stopped: streamID=".concat(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){console.log("[ESSoundPoolAudioPlayerModule] Set priority: streamID=".concat(e,", priority=").concat(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,console.log("[ESSoundPoolAudioPlayerModule] All resources released")}}]);var e,t}(),je=new We,He=function(){return P(function e(t){x(this,e),this.context=t},[{key:"init",value:function(){console.log("[ESSoundPoolAudioPlayerModule] Module initialized");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){je.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 T(a,!0)}},{key:"load",value:(i=u(c.mark(function e(t){var r,i,o,a,s,l,u,d,h,f,p,v,y,m,g,b,_,w,E,k,S,A,x=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(r=x.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=x[o];if(e.prev=1,(a=Ve(t))!==t&&console.log("[ESSoundPoolAudioPlayerModule] Normalized load path:",t,"->",a),!a||!a.startsWith("data:")){e.next=3;break}return console.log("[ESSoundPoolAudioPlayerModule] Using base64 data URL directly"),e.next=2,je.load(a);case 2:return s=e.sent,e.abrupt("return",T(i,s));case 3:if(!a||!a.startsWith("http://")&&!a.startsWith("https://")){e.next=5;break}return console.log("[ESSoundPoolAudioPlayerModule] Using HTTP URL directly:",a),e.next=4,je.load(a);case 4:return l=e.sent,e.abrupt("return",T(i,l));case 5:if(!n.g.__WEB_FILE_URL_MAP__||!n.g.__WEB_FILE_URL_MAP__.has(a)){e.next=7;break}return u=n.g.__WEB_FILE_URL_MAP__.get(a),console.log("[ESSoundPoolAudioPlayerModule] Using mapped URL:",a,"->",u),e.next=6,je.load(u);case 6:return d=e.sent,e.abrupt("return",T(i,d));case 7:if(!(h=Fe(a))){e.next=9;break}return console.log("[ESSoundPoolAudioPlayerModule] Using inferred asset URL:",a,"->",h),e.next=8,je.load(h);case 8:return f=e.sent,e.abrupt("return",T(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 console.log("[ESSoundPoolAudioPlayerModule] Loading from VirtualFS:",a,"->",y),g=new Blob([m],{type:"audio/mpeg"}),b=URL.createObjectURL(g),e.next=10,je.load(b);case 10:return _=e.sent,e.abrupt("return",T(i,_));case 11:return e.next=12,De(a);case 12:if(w=e.sent){e.next=13;break}return console.error("[ESSoundPoolAudioPlayerModule] File not found:",a),e.abrupt("return",T(i,-1));case 13:return E=new Blob([w]),k=URL.createObjectURL(E),console.log("[ESSoundPoolAudioPlayerModule] load from IndexedDB VFS, blob URL:",k),e.next=14,je.load(k);case 14:return S=e.sent,e.abrupt("return",T(i,S));case 15:return e.prev=15,A=e.catch(1),console.error("[ESSoundPoolAudioPlayerModule] load error:",A),e.abrupt("return",T(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){je.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 T(n,null)}},{key:"play",value:(r=u(c.mark(function e(t,n,r,i,o,a){var s,l,u,d,h,f=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(s=f.length,l=new Array(s>6?s-6:0),u=6;u<s;u++)l[u-6]=f[u];return e.prev=1,e.next=2,je.play(t,n,r,i,o,a);case 2:return d=e.sent,e.abrupt("return",T(l,d));case 3:return e.prev=3,h=e.catch(1),console.error("[ESSoundPoolAudioPlayerModule] play error:",h),e.abrupt("return",T(l,-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){je.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 T(n,null)}},{key:"autoPause",value:function(){je.autoPause();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(t,null)}},{key:"resume",value:function(e){je.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 T(n,null)}},{key:"autoResume",value:function(){je.autoResume();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(t,null)}},{key:"stop",value:function(e){je.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 T(n,null)}},{key:"setVolume",value:function(e,t,n){je.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 T(i,null)}},{key:"setRate",value:function(e,t){je.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 T(r,null)}},{key:"setPriority",value:function(e,t){je.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 T(r,null)}},{key:"setLoop",value:function(e,t){je.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 T(r,null)}},{key:"release",value:function(){je.release();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(t,null)}},{key:"playLocalFile",value:(t=u(c.mark(function e(t){var r,i,o,a,s,l,u,d,h,f,p,v,y,m,g,b,_,w,E,k,S,A,x,C,L,P,I,O,R=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(console.log("[ESSoundPoolAudioPlayerModule] playLocalFile:",t),r=R.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=R[o];if(e.prev=1,(a=Ve(t))!==t&&console.log("[ESSoundPoolAudioPlayerModule] Normalized local path:",t,"->",a),!a||!a.startsWith("data:")){e.next=4;break}return console.log("[ESSoundPoolAudioPlayerModule] Using base64 data URL directly"),e.next=2,je.load(a);case 2:return s=e.sent,e.next=3,je.play(s,1,1,0,0,1);case 3:return l=e.sent,e.abrupt("return",T(i,l));case 4:if(!a||!a.startsWith("http://")&&!a.startsWith("https://")){e.next=7;break}return console.log("[ESSoundPoolAudioPlayerModule] Using HTTP URL directly:",a),e.next=5,je.load(a);case 5:return u=e.sent,e.next=6,je.play(u,1,1,0,0,1);case 6:return d=e.sent,e.abrupt("return",T(i,d));case 7:if(!n.g.__WEB_FILE_URL_MAP__||!n.g.__WEB_FILE_URL_MAP__.has(a)){e.next=10;break}return h=n.g.__WEB_FILE_URL_MAP__.get(a),console.log("[ESSoundPoolAudioPlayerModule] Using mapped URL:",a,"->",h),e.next=8,je.load(h);case 8:return f=e.sent,e.next=9,je.play(f,1,1,0,0,1);case 9:return p=e.sent,e.abrupt("return",T(i,p));case 10:if(!(v=Fe(a))){e.next=13;break}return console.log("[ESSoundPoolAudioPlayerModule] Using inferred asset URL:",a,"->",v),e.next=11,je.load(v);case 11:return y=e.sent,e.next=12,je.play(y,1,1,0,0,1);case 12:return m=e.sent,e.abrupt("return",T(i,m));case 13:if(!(g=window.__VIRTUAL_FS__)||!g.get){e.next=16;break}if(b=a.replace(/^\//,""),_=g.baseDir?g.baseDir+"/"+b:b,(w=g.get(_))||(w=g.get(a)),w||(w=g.get(b)),!w){e.next=16;break}return console.log("[ESSoundPoolAudioPlayerModule] playLocalFile from VirtualFS:",a,"->",_),E=new Blob([w],{type:"audio/mpeg"}),k=URL.createObjectURL(E),e.next=14,je.load(k);case 14:return S=e.sent,e.next=15,je.play(S,1,1,0,0,1);case 15:return A=e.sent,e.abrupt("return",T(i,A));case 16:return e.next=17,De(a);case 17:if(x=e.sent){e.next=18;break}return console.error("[ESSoundPoolAudioPlayerModule] File not found in VFS:",a),e.abrupt("return",T(i,-1));case 18:return C=new Blob([x]),L=URL.createObjectURL(C),console.log("[ESSoundPoolAudioPlayerModule] playLocalFile from IndexedDB VFS, Blob URL:",L),e.next=19,je.load(L);case 19:return P=e.sent,e.next=20,je.play(P,1,1,0,0,1);case 20:return I=e.sent,e.abrupt("return",T(i,I));case 21:return e.prev=21,O=e.catch(1),console.error("[ESSoundPoolAudioPlayerModule] playLocalFile error:",O),e.abrupt("return",T(i,-1));case 22:case"end":return e.stop()}},e,null,[[1,21]])})),function(e){return t.apply(this,arguments)})},{key:"playNetworkFile",value:(e=u(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(console.log("[ESSoundPoolAudioPlayerModule] playNetworkFile downloadInfo:",t),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 console.error("[ESSoundPoolAudioPlayerModule] playNetworkFile: no valid path in downloadInfo",t),e.abrupt("return",T(i,-1));case 1:return console.log("[ESSoundPoolAudioPlayerModule] playNetworkFile filePath:",n),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(){je.release()}}]);var e,t,r,i}(),Ue="files",ze=null;function Ge(){return window.__VIRTUAL_FS__||null}function Ye(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 console.log("[AndroidFileModule] File exists in VirtualFS, skipping URL inference:",e),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 qe(e){return null==e?0:"string"==typeof e?e.length:"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.length?e.length:0}function Qe(){return new Promise(function(e,t){if(ze)e(ze);else{var n=indexedDB.open("es_vfs_db",1);n.onerror=function(){t(n.error)},n.onsuccess=function(){ze=n.result,e(ze)},n.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains(Ue)||t.createObjectStore(Ue,{keyPath:"path"})}}})}function Ke(e){return Xe.apply(this,arguments)}function Xe(){return(Xe=u(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,Qe();case 1:return n=e.sent,e.next=2,new Promise(function(e,r){var i=n.transaction([Ue],"readonly").objectStore(Ue).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 Ze(e){return Je.apply(this,arguments)}function Je(){return(Je=u(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=Ye(t))){e.next=1;break}return e.abrupt("return",{exists:!0,length:n.length,source:"map"});case 1:if(!(r=Ge())||!r.has(t)){e.next=2;break}return i=r.get(t),e.abrupt("return",{exists:!0,length:qe(i),source:"virtual-fs"});case 2:return e.next=3,Ke(t);case 3:if(!(o=e.sent)){e.next=4;break}return e.abrupt("return",{exists:!0,length:qe(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 $e(e){return"string"==typeof e&&e.startsWith("data:")}var et=new Map,tt=function(){return P(function e(t){x(this,e),(0,_.A)(this,"name","AndroidFileModule"),this.context=t},[{key:"init",value:function(){console.log("[AndroidFileModule] Module initialized");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:(B=u(c.mark(function e(t){var n,r,i,o,a,s,l,u,d,h=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("[AndroidFileModule] newESFile called with params:","object"==typeof t?null===(n=JSON.stringify(t))||void 0===n||null===(r=n.substring)||void 0===r?void 0:r.call(n,0,100):t),i=String((null==t?void 0:t.pathname)||(null==t?void 0:t.id)||""),o=$e(i),a={id:i,path:i,exists:o,isDirectory:!1,isFile:o,length:o?i.length:0,lastModified:Date.now()},o){e.next=2;break}return e.next=1,Ze(i);case 1:s=e.sent,a.exists=s.exists,a.isFile=s.exists,a.length=s.length;case 2:for(et.set(i,a),l=h.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=h[d];return e.abrupt("return",T(u,i));case 3:case"end":return e.stop()}},e)})),function(e){return B.apply(this,arguments)})},{key:"newFile",value:(V=u(c.mark(function e(t){var n,r,i,o,a,s,l,u,d,h=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i="",i=String("object"==typeof t&&null!==t?t.pathname||t.path||"":t||""),console.log("[AndroidFileModule] newFile called with pathname:",(null===(n=i)||void 0===n||null===(r=n.substring)||void 0===r?void 0:r.call(n,0,50))||i),o=$e(i),a={id:i,path:i,exists:o,isDirectory:!1,isFile:o,length:o?i.length:0,lastModified:Date.now()},o){e.next=2;break}return e.next=1,Ze(i);case 1:s=e.sent,a.exists=s.exists,a.isFile=s.exists,a.length=s.length,"map"===s.source&&console.log("[AndroidFileModule] newFile: path has mapped URL:",i);case 2:for(et.set(i,a),l=h.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=h[d];return e.abrupt("return",T(u,i));case 3:case"end":return e.stop()}},e)})),function(e){return V.apply(this,arguments)})},{key:"newAbsolutePathFile",value:(F=u(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(r=String(t||""),console.log("[AndroidFileModule] newAbsolutePathFile called with pathname:",(null==r||null===(n=r.substring)||void 0===n?void 0:n.call(r,0,50))||r),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",this.newFile.apply(this,[r].concat(o)));case 1:case"end":return e.stop()}},e,this)})),function(e){return F.apply(this,arguments)})},{key:"getPath",value:(M=u(c.mark(function e(t){var n,r,i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(i="","object"==typeof t&&null!==t?i=String(t.id||t.path||""):null!=t&&(i=String(t)),console.log("[AndroidFileModule] getPath called for:",(null===(n=i)||void 0===n||null===(r=n.substring)||void 0===r?void 0:r.call(n,0,50))||i),o=l.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=l[s];return e.abrupt("return",T(a,i));case 1:case"end":return e.stop()}},e)})),function(e){return M.apply(this,arguments)})},{key:"isAbsolute",value:(D=u(c.mark(function e(t){var n,r,i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(i="","object"==typeof t&&null!==t?i=String(t.id||""):null!=t&&(i=String(t)),console.log("[AndroidFileModule] isAbsolute called for:",(null===(n=i)||void 0===n||null===(r=n.substring)||void 0===r?void 0:r.call(n,0,50))||i),o=l.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=l[s];if(!$e(i)){e.next=1;break}return e.abrupt("return",T(a,!0));case 1:return e.abrupt("return",T(a,i.startsWith("/")));case 2:case"end":return e.stop()}},e)})),function(e){return D.apply(this,arguments)})},{key:"isDirectory",value:(N=u(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)||"",console.log("[AndroidFileModule] isDirectory called for:",n),r=et.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",T(o,(null==r?void 0:r.isDirectory)||!1));case 1:case"end":return e.stop()}},e)})),function(e){return N.apply(this,arguments)})},{key:"canRead",value:(R=u(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)||"",console.log("[AndroidFileModule] canRead called for:",n),e.next=1,Ze(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",T(o,r.exists));case 2:case"end":return e.stop()}},e)})),function(e){return R.apply(this,arguments)})},{key:"canWrite",value:(O=u(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)||"",console.log("[AndroidFileModule] canWrite called for:",n),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",T(i,!0));case 1:case"end":return e.stop()}},e)})),function(e){return O.apply(this,arguments)})},{key:"exists",value:(I=u(c.mark(function e(t){var n,r,i,o,a,s,l,u,d=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(i="","object"==typeof t&&null!==t?i=String(t.id||t.path||""):null!=t&&(i=String(t)),console.log("[AndroidFileModule] exists called for:",(null===(n=i)||void 0===n||null===(r=n.substring)||void 0===r?void 0:r.call(n,0,50))||i),o=d.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=d[s];if(!$e(i)){e.next=1;break}return console.log("[AndroidFileModule] Data URL detected, returning true"),e.abrupt("return",T(a,!0));case 1:if(!Ye(i)){e.next=2;break}return console.log("[AndroidFileModule] Path has mapped URL, returning true:",i),e.abrupt("return",T(a,!0));case 2:if(!(l=et.get(i))){e.next=3;break}return e.abrupt("return",T(a,l.exists));case 3:return e.next=4,Ze(i);case 4:return(u=e.sent).exists&&et.set(i,{id:i,path:i,exists:!0,isDirectory:!1,isFile:!0,length:u.length,lastModified:Date.now()}),e.abrupt("return",T(a,u.exists));case 5:case"end":return e.stop()}},e)})),function(e){return I.apply(this,arguments)})},{key:"length",value:(L=u(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)||"",console.log("[AndroidFileModule] length called for:",n),e.next=1,Ze(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",T(o,r.length));case 2:case"end":return e.stop()}},e)})),function(e){return L.apply(this,arguments)})},{key:"createNewFile",value:(C=u(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)||"",console.log("[AndroidFileModule] createNewFile called for:",n),r=Ge(),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",T(o,!0));case 1:return e.abrupt("return",T(o,!1));case 2:case"end":return e.stop()}},e)})),function(e){return C.apply(this,arguments)})},{key:"deleteOnExit",value:(A=u(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)||"",console.log("[AndroidFileModule] deleteOnExit called for:",n),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",T(i,!0));case 1:case"end":return e.stop()}},e)})),function(e){return A.apply(this,arguments)})},{key:"delete",value:(S=u(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)||"",console.log("[AndroidFileModule] delete called for:",n),r=Ge(),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),et.delete(n),e.abrupt("return",T(o,!0));case 1:return e.abrupt("return",T(o,!1));case 2:case"end":return e.stop()}},e)})),function(e){return S.apply(this,arguments)})},{key:"list",value:(k=u(c.mark(function e(t){var n,r,i,o,a,s,l,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(n=(null==t?void 0:t.id)||"",console.log("[AndroidFileModule] list called for:",n),r=Ge(),i=u.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=u[a];if(!r){e.next=1;break}return s=r.list(),l=s.filter(function(e){return e.startsWith(n)}),e.abrupt("return",T(o,l));case 1:return e.abrupt("return",T(o,[]));case 2:case"end":return e.stop()}},e)})),function(e){return k.apply(this,arguments)})},{key:"mkdir",value:(E=u(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)||"",console.log("[AndroidFileModule] mkdir called for:",n),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",T(i,!0));case 1:case"end":return e.stop()}},e)})),function(e){return E.apply(this,arguments)})},{key:"mkdirs",value:(w=u(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)||"",console.log("[AndroidFileModule] mkdirs called for:",n),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",T(i,!0));case 1:case"end":return e.stop()}},e)})),function(e){return w.apply(this,arguments)})},{key:"renameTo",value:(b=u(c.mark(function e(t){var n,r,i,o,a,s,l,u=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)||"",console.log("[AndroidFileModule] renameTo called from:",n,"to:",r),i=Ge(),o=u.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=u[s];if(!i){e.next=1;break}if(!(l=i.get(n))){e.next=1;break}return i.set(r,l),i.files.delete(n),i.files.delete("/"+n),e.abrupt("return",T(a,!0));case 1:return e.abrupt("return",T(a,!1));case 2:case"end":return e.stop()}},e)})),function(e){return b.apply(this,arguments)})},{key:"setLastModified",value:(g=u(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)||"",console.log("[AndroidFileModule] setLastModified called for:",n),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",T(i,!0));case 1:case"end":return e.stop()}},e)})),function(e){return g.apply(this,arguments)})},{key:"setReadOnly",value:(m=u(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)||"",console.log("[AndroidFileModule] setReadOnly called for:",n),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",T(i,!0));case 1:case"end":return e.stop()}},e)})),function(e){return m.apply(this,arguments)})},{key:"setWritable",value:(y=u(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)||"",console.log("[AndroidFileModule] setWritable called for:",n),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",T(i,!0));case 1:case"end":return e.stop()}},e)})),function(e){return y.apply(this,arguments)})},{key:"lastModified",value:(v=u(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)||"",console.log("[AndroidFileModule] lastModified called for:",n),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",T(i,Date.now()));case 1:case"end":return e.stop()}},e)})),function(e){return v.apply(this,arguments)})},{key:"getName",value:(p=u(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)||"",console.log("[AndroidFileModule] getName called for:",n),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",T(o,r[r.length-1]||""));case 1:case"end":return e.stop()}},e)})),function(e){return p.apply(this,arguments)})},{key:"getParent",value:(f=u(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)||"",console.log("[AndroidFileModule] getParent called for:",n),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",T(o,n.substring(0,r)));case 1:return e.abrupt("return",T(o,""));case 2:case"end":return e.stop()}},e)})),function(e){return f.apply(this,arguments)})},{key:"getParentFile",value:(h=u(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)||"",console.log("[AndroidFileModule] getParentFile called for:",n),e.next=1,this.getParent(t);case 1:if(!(r=e.sent)){e.next=2;break}return e.abrupt("return",this.newESFile({id:r}));case 2:for(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",T(o,null));case 3:case"end":return e.stop()}},e,this)})),function(e){return h.apply(this,arguments)})},{key:"getAbsolutePath",value:(d=u(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)||"",console.log("[AndroidFileModule] getAbsolutePath called for:",n),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",T(i,n));case 1:case"end":return e.stop()}},e)})),function(e){return d.apply(this,arguments)})},{key:"getAbsoluteFile",value:(l=u(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)||"",console.log("[AndroidFileModule] getAbsoluteFile called for:",n),e.abrupt("return",this.newESFile({id:n}));case 1:case"end":return e.stop()}},e,this)})),function(e){return l.apply(this,arguments)})},{key:"getCanonicalPath",value:(s=u(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)||"",console.log("[AndroidFileModule] getCanonicalPath called for:",n),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",T(i,n));case 1:case"end":return e.stop()}},e)})),function(e){return s.apply(this,arguments)})},{key:"getCanonicalFile",value:(a=u(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)||"",console.log("[AndroidFileModule] getCanonicalFile called for:",n),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=u(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)||"",console.log("[AndroidFileModule] toURL called for:",n),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",T(i,"file://"+n));case 1:case"end":return e.stop()}},e)})),function(e){return o.apply(this,arguments)})},{key:"toURI",value:(i=u(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)||"",console.log("[AndroidFileModule] toURI called for:",n),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",T(i,"file://"+n));case 1:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)})},{key:"getFreeSpace",value:(r=u(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)||"",console.log("[AndroidFileModule] getFreeSpace called for:",n),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",T(i,1073741824));case 1:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)})},{key:"getTotalSpace",value:(n=u(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)||"",console.log("[AndroidFileModule] getTotalSpace called for:",n),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",T(i,10737418240));case 1:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"getUsableSpace",value:(t=u(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)||"",console.log("[AndroidFileModule] getUsableSpace called for:",n),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",T(i,5368709120));case 1:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})},{key:"compareTo",value:(e=u(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)||"",console.log("[AndroidFileModule] compareTo called for:",n,"vs:",r),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",T(o,n.localeCompare(r)));case 1:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)})},{key:"destroy",value:function(){console.log("[AndroidFileModule] Module destroyed"),et.clear()}}]);var e,t,n,r,i,o,a,s,l,d,h,f,p,v,y,m,g,b,w,E,k,S,A,C,L,I,O,R,N,D,M,F,V,B}(),nt=null,rt=!1;function it(){var e;ae("NetSpeed",{speedKbps:e=Math.floor(5e3*Math.random())+100,speedMbps:(e/1024).toFixed(2)})}var ot=new(function(){return P(function e(t){x(this,e),this.context=t,this.name="ESNetworkSpeedModule"},[{key:"showNetSpeed",value:function(){rt?console.log("[ESNetworkSpeedModule] Already running"):(rt=!0,console.log("[ESNetworkSpeedModule] Starting network speed display"),it(),nt=setInterval(function(){it()},500))}},{key:"stopNetSpeed",value:function(){rt?(console.log("[ESNetworkSpeedModule] Stopping network speed display"),nt&&(clearInterval(nt),nt=null),rt=!1):console.log("[ESNetworkSpeedModule] Not running")}},{key:"isShowing",value:function(){return rt}},{key:"destroy",value:function(){this.stopNetSpeed()}},{key:"init",value:function(){return Promise.resolve(!0)}}])}());function at(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 st(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)?st(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 st(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 lt(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 ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lt(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 ct,dt=function(){return P(function e(t){x(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),console.log("[ESDownloadModule] initDownload: cacheDir=",this._downloadCacheDir,"interval=",this._progressThrottleInterval);for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return T(r,!0)}},{key:"initDownloadPath",value:function(e,t){this._downloadCacheDir=e||"/vfs",this._progressThrottleInterval=t||500,console.log("[ESDownloadModule] initDownloadPath:",this._downloadCacheDir);for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return T(r,!0)}},{key:"download",value:(t=u(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(console.log("[ESDownloadModule] download:",t),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",T(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=u(c.mark(function e(t){var r,i,o,a,s,l,u,d,h=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=h.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=h[s];if(null!=r&&i){e.next=1;break}return console.error("[ESDownloadModule] start: missing id or url",t),e.abrupt("return",T(a,!1));case 1:return console.log("[ESDownloadModule] start download:",r,i),l=(null==t?void 0:t.fileName)||this._extractFileName(i),u=this._downloadCacheDir+"/"+l,d=ut({id:r,url:i,fileName:l,filePath:u,fileLength:0,downloadLength:0,status:"pending"},t),this._downloads.set(r,d),n.g.__WEB_FILE_URL_MAP__.set(u,i),console.log("[ESDownloadModule] Mapped local path to URL:",u,"->",i),this._notifyListener("onDownloadStart",d),d.status="completed",this._notifyListener("onDownloadSuccess",d),e.abrupt("return",T(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;console.log("[ESDownloadModule] stop:",t);var 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 T(i,!0)}},{key:"cancel",value:function(e){var t=null==e?void 0:e.id;console.log("[ESDownloadModule] cancel:",t);var 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 T(i,!0)}},{key:"registerDownloadListener",value:function(e,t){console.log("[ESDownloadModule] registerDownloadListener:",e),this._listeners.set(e,t)}},{key:"unregisterDownloadListener",value:function(e){console.log("[ESDownloadModule] unregisterDownloadListener:",e),this._listeners.delete(e)}},{key:"addListener",value:function(e,t){return console.log("[ESDownloadModule] addListener:",e),this._listeners.set(e,t),!0}},{key:"removeListener",value:function(e){if(console.log("[ESDownloadModule] removeListener:",e),this._listeners.has(e))return this._listeners.delete(e),!0;var t,n=at(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(t){console.error("[ESDownloadModule] listener ".concat(e," error:"),t)}})}},{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 I(t)}},{key:"destroy",value:function(){this._downloads.clear(),this._listeners.clear()}}]);var e,t}(),ht=n(824);function ft(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 pt=new Ie(null),vt=new He(null),yt=new tt(null),mt=new dt(null);n.g.__WEB_MODULES__||(n.g.__WEB_MODULES__={}),n.g.__WEB_MODULES__.ESIJKAudioPlayerModule=pt,n.g.__WEB_MODULES__.ESSoundPoolAudioPlayerModule=vt,n.g.__WEB_MODULES__.ESSoundPoolPlayerModule=vt,n.g.__WEB_MODULES__.AndroidFileModule=yt,n.g.__WEB_MODULES__.ESNetworkSpeedModule=ot,n.g.__WEB_MODULES__.ESDownloadModule=mt,console.log("[Web Renderer] __WEB_MODULES__ initialized:",Object.keys(n.g.__WEB_MODULES__)),console.log("[Web Renderer] AndroidFileModule instance:",!!yt,null==yt||null===(ct=yt.constructor)||void 0===ct?void 0:ct.name);var gt=null,bt=!1,_t=!1;function wt(){void 0!==n.g.Hippy&&n.g.Hippy.device?(n.g.Hippy.device.window={width:k,height:S,scale:1,fontScale:1,statusBarHeight:0,navigatorBarHeight:0},n.g.Hippy.device.screen={width:k,height:S,scale:1,fontScale:1,statusBarHeight:0,navigatorBarHeight:0},n.g.Hippy.device.pixelRatio=1,console.log("[Web Renderer] Overridden Hippy.device dimensions to",k,"x",S)):setTimeout(wt,10)}function Et(){var e=document.getElementById("app");e?(e.style.width=k+"px",e.style.height=S+"px",console.log("[Web Renderer] Fixed #app container style to",k,"x",S),new MutationObserver(function(){e.style.width===k+"px"&&e.style.height===S+"px"||(e.style.width=k+"px",e.style.height=S+"px")}).observe(e,{attributes:!0,attributeFilter:["style"]})):setTimeout(Et,10)}var kt=["focusColor","focusBackgroundColor","focusTextColor","focusBorderColor","focusBorderWidth","focusBorderRadius","focusOpacity","focusScale","selectColor","selectBackgroundColor"],St=["focusBorderWidth","focusBorderRadius","focusOpacity","focusScale"];function At(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 xt={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 Ct(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),l=parseInt(i,16);return"rgba(".concat(a,", ").concat(s,", ").concat(l,", ").concat(o,")")}if(/^#[0-9A-Fa-f]{4}$/.test(e)){var u=e.substring(1,2)+e.substring(1,2),c=e.substring(2,3)+e.substring(2,3),d=e.substring(3,4)+e.substring(3,4),h=e.substring(4,5)+e.substring(4,5),f=parseInt(u,16)/255,p=parseInt(c,16),v=parseInt(d,16),y=parseInt(h,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,l=e.cornerRadii8,u="";if(1===o){var c=e.gradientRadius||"farthest-corner";u="radial-gradient(circle ".concat(c,", ").concat(r.join(", "),")")}else{u="linear-gradient(".concat(xt[i]||"to right",", ").concat(r.join(", "),")")}var d="";return l&&8===l.length?d="".concat(l[0],"px ").concat(l[2],"px ").concat(l[4],"px ").concat(l[6],"px / ").concat(l[1],"px ").concat(l[3],"px ").concat(l[5],"px ").concat(l[7],"px"):s&&4===s.length?d="".concat(s[0],"px ").concat(s[1],"px ").concat(s[2],"px ").concat(s[3],"px"):null!=a&&(d="".concat(a,"px")),{background:u,borderRadius:d}}function Lt(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?ft(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ft(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=Ct(r);i&&(n.background=i.background,i.borderRadius&&(n.borderRadius=i.borderRadius)),delete n.gradientBackground}return kt.forEach(function(r){var i,o=r.replace(/([A-Z])/g,"-$1").toLowerCase(),a=t[r]||t[o];void 0!==a&&(i=St.includes(r)?a:"number"==typeof a?At(a):a,e.setAttribute("data-"+o,String(i)),delete n[r],delete n[o])}),n}function Pt(){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 Tt=null;function It(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,ht.Zd)(Lt(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&&kt.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=St.includes(n)?o:"number"==typeof o?At(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 l=r.findViewById(t.pId);if(l&&l.dom){if(i(t,n),a(t.dom,(null==n?void 0:n.className)||(null==n?void 0:n.class)),s(t.dom,n),null!=n&&n.gradientBackground){var u=Ct(n.gradientBackground);u&&(t.dom.style.background=u.background,u.borderRadius&&(t.dom.style.borderRadius=u.borderRadius))}}else{console.log("[UIManagerModule] defaultUpdateViewProps: parent or parent.dom is null, using safe update");Object.keys(n);if(n.style){var c=e.context.getModuleByName("HippyWeb");null!=c&&c.setElementStyle?c.setElementStyle(t.dom,n.style):Object.assign(t.dom.style,(0,ht.Zd)(n.style))}}}else console.warn("[UIManagerModule] defaultUpdateViewProps: view.dom is null, skipping")},r._addEventListenerPatched=!0,console.log("[Web Renderer] Patched UIManagerModule methods for debugging and safety"),!0}return!1}function Ot(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 Rt(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 Nt(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 Dt(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 Mt(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)?Mt(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 Mt(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 Ft(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 Vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ft(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ft(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Bt=function(){return P(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x(this,e),this.options=Vt({useDistanceBasedNavigation:!0,crossDistanceWeight:.5,directionalAngleThreshold:60,blockedDirectionalAngleThreshold:40,directionalAngleOffset:20},t)},[{key:"setOptions",value:function(e){this.options=Vt(Vt({},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,l=(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)),u=new Set;return n.forEach(function(c){if(c!==e&&c&&document.body.contains(c)){var d=window.getComputedStyle(c);if("none"!==d.display&&"hidden"!==d.visibility){var h=r._findParentList(c);if(!h||h===e||u.has(h)){if(!h||!u.has(h)){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,b=0,_=0;switch(t){case"up":if(m>=0)return void console.log("[TVFocus] Candidate rejected by angle limit (not in forward direction) - tag: ".concat(c.tagName,", direction: up, dy: ").concat(m.toFixed(1)));g=!0,b=Math.max(0,i.top-f.bottom),_=Math.abs(y);break;case"down":if(m<=0)return void console.log("[TVFocus] Candidate rejected by angle limit (not in forward direction) - tag: ".concat(c.tagName,", direction: down, dy: ").concat(m.toFixed(1)));g=!0,b=Math.max(0,f.top-i.bottom),_=Math.abs(y);break;case"left":if(y>=0)return void console.log("[TVFocus] Candidate rejected by angle limit (not in forward direction) - tag: ".concat(c.tagName,", direction: left, dx: ").concat(y.toFixed(1)));g=!0,b=Math.max(0,i.left-f.right),_=Math.abs(m);break;case"right":if(y<=0)return void console.log("[TVFocus] Candidate rejected by angle limit (not in forward direction) - tag: ".concat(c.tagName,", direction: right, dx: ").concat(y.toFixed(1)));g=!0,b=Math.max(0,f.left-i.right),_=Math.abs(m)}var w=c.getAttribute("selected"),E=c.hasAttribute("selected")&&"false"!==w,k=null!==c.querySelector('[selected="true"]'),S=E||k;if(g&&!S&&r._exceedsDirectionalAngle(t,y,m,l)){var A=l?r.options.blockedDirectionalAngleThreshold:r.options.directionalAngleThreshold;console.log("[TVFocus] Candidate rejected by >".concat(A," degree angle limit - tag: ").concat(c.tagName,", dx: ").concat(y.toFixed(1),", dy: ").concat(m.toFixed(1))),g=!1}if(g){for(var x=!1,C=e.parentElement;C&&C!==document.body;){var L=C.getAttribute("blockFocusDirections")||C.getAttribute("blockfocusdirections");if(L){var P=[];try{P=JSON.parse(L.replace(/'/g,'"')),Array.isArray(P)||(P=[])}catch(e){P=L.split(",").map(function(e){return e.trim().toLowerCase()}).filter(function(e){return e})}if(P.some(function(e){return e.toLowerCase()===t.toLowerCase()})&&!C.contains(c)){x=!0;break}}C=C.parentElement}if(x)return void console.log("[TVFocus] Candidate rejected by container blockFocusDirections - tag: ".concat(c.tagName,", id: ").concat(c.id));var T=!1,I=0;if("left"===t||"right"===t){var O=Math.max(0,Math.min(f.bottom,i.bottom)-Math.max(f.top,i.top));T=O>0,I=O/Math.min(f.height,i.height),_*=T?1-.9*I:50}else if("up"===t||"down"===t){var R=Math.max(0,Math.min(f.right,i.right)-Math.max(f.left,i.left));T=R>0,I=R/Math.min(f.width,i.width),_*=T?1-.9*I:50}var N=Nt(e,c),D=b+_+(T?0:1e4)+(N<=1?-500:N<=2?-200:N<=3?-50:0)+(S?-1e3:0);console.log("[TVFocus] Candidate - tag: ".concat(c.tagName,", id: ").concat(c.id,', selectedAttr: "').concat(w,'", hasSelectedChild: ').concat(k,", selected: ").concat(S,", dx: ").concat(y.toFixed(1),", dy: ").concat(m.toFixed(1),", primary: ").concat(b.toFixed(1),", cross: ").concat(_.toFixed(1),", overlap: ").concat(T,", ancestorDepth: ").concat(N,", distance: ").concat(D.toFixed(1))),D<s&&(s=D,a=c)}}}}else{u.add(h);var M=r._evaluateListCandidate(h,e,i,o,t,l,n);M&&M.distance<s&&(s=M.distance,a=M.targetElement,!0)}}}}),a?console.log("[TVFocus] Best candidate found for direction ".concat(t,", distance: ").concat(s.toFixed(1)),a):console.log("[TVFocus] No candidate found for direction ".concat(t)),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),l=this.options.directionalAngleOffset;return"left"===e||"right"===e?o>i*s+l:i>o*s+l}},{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 l=String(o).toLowerCase();if(a.some(function(e){return e.toLowerCase()===l})&&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 l=a[t];if(!l)return null;var u=this._findElementByName(l,n);return u&&(n.includes(u)||r(),n.includes(u))?u: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=Dt(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,l=o.getBoundingClientRect(),u=l.width>0&&l.height>0;if(s&&u){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=Dt(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,l=Dt(t);try{for(l.s();!(s=l.n()).done;){var u=s.value;if(e.contains(u))return u}}catch(e){l.e(e)}finally{l.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 console.log("[TVFocus] _getListTargetElement: found selected element in list:",e.getAttribute("data-component-name")),a}if(i){var s=this._findNearestElementInList(e,i,t,n);if(s)return console.log("[TVFocus] _getListTargetElement: found nearest element in list:",e.getAttribute("data-component-name")),s}var l=e.querySelector(".fast-list-item-container")||e.querySelector(".flex-view-item-container")||e,u=null==l||null===(r=l.children)||void 0===r?void 0:r[0];if(u){var c=this._findFocusableInElement(u,n);if(c)return console.log("[TVFocus] _getListTargetElement: found first item in list:",e.getAttribute("data-component-name")),c}var d,h=Dt(n);try{for(h.s();!(d=h.n()).done;){var f=d.value;if(e.contains(f)&&f!==e)return console.log("[TVFocus] _getListTargetElement: found focusable element in list:",e.getAttribute("data-component-name")),f}}catch(e){h.e(e)}finally{h.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,l=null,u=1/0,c=Dt(r);try{for(c.s();!(i=c.n()).done;){var d=i.value;if(d!==t&&e.contains(d)){var h=d.getBoundingClientRect();if(0!==h.width||0!==h.height){var f={x:h.left+h.width/2,y:h.top+h.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<u&&(u=p,l=d)}}}}catch(e){c.e(e)}finally{c.f()}return l}},{key:"_findFocusableInElement",value:function(e,t){if(!e)return null;if(t.includes(e))return e;var n,r=Dt(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 l=s.left+s.width/2,u=s.top+s.height/2,c=l-r.x,d=u-r.y,h=!1,f=0,p=0;switch(i){case"up":if(d>=0)return console.log("[TVFocus] List candidate rejected by angle limit - list: ".concat(e.getAttribute("data-component-name"),", dy: ").concat(d.toFixed(1))),null;h=!0,f=Math.max(0,n.top-s.bottom),p=Math.abs(c);break;case"down":if(d<=0)return console.log("[TVFocus] List candidate rejected by angle limit - list: ".concat(e.getAttribute("data-component-name"),", dy: ").concat(d.toFixed(1))),null;h=!0,f=Math.max(0,s.top-n.bottom),p=Math.abs(c);break;case"left":if(c>=0)return console.log("[TVFocus] List candidate rejected by angle limit - list: ".concat(e.getAttribute("data-component-name"),", dx: ").concat(c.toFixed(1))),null;h=!0,f=Math.max(0,n.left-s.right),p=Math.abs(d);break;case"right":if(c<=0)return console.log("[TVFocus] List candidate rejected by angle limit - list: ".concat(e.getAttribute("data-component-name"),", dx: ").concat(c.toFixed(1))),null;h=!0,f=Math.max(0,s.left-n.right),p=Math.abs(d)}var v=e.getAttribute("selected"),y=e.hasAttribute("selected")&&"false"!==v,m=null!==e.querySelector('[selected="true"]'),g=y||m;if(h&&!g&&this._exceedsDirectionalAngle(i,c,d,o)){var b=o?this.options.blockedDirectionalAngleThreshold:this.options.directionalAngleThreshold;return console.log("[TVFocus] List candidate rejected by >".concat(b," degree angle limit - list: ").concat(e.getAttribute("data-component-name"),", dx: ").concat(c.toFixed(1),", dy: ").concat(d.toFixed(1))),null}var _=!1,w=0;if("left"===i||"right"===i){var E=Math.max(0,Math.min(s.bottom,n.bottom)-Math.max(s.top,n.top));_=E>0,w=E/Math.min(s.height,n.height),p*=_?1-.9*w:50}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,w=k/Math.min(s.width,n.width),p*=_?1-.9*w:50}var S=Nt(t,e),A=f+p+(_?0:1e4)+(S<=1?-500:S<=2?-200:S<=3?-50:0)+(g?-1e3:0),x=this._getListTargetElement(e,i,a,t);return x?x===t?(console.log("[TVFocus] List candidate rejected because target resolves to current element - list: ".concat(e.getAttribute("data-component-name"))),null):(console.log("[TVFocus] List candidate - list: ".concat(e.getAttribute("data-component-name"),", selected: ").concat(g,", dx: ").concat(c.toFixed(1),", dy: ").concat(d.toFixed(1),", primary: ").concat(f.toFixed(1),", cross: ").concat(p.toFixed(1),", overlap: ").concat(_,", distance: ").concat(A.toFixed(1),", target: ").concat(x.tagName)),{distance:A,targetElement:x}):(console.log("[TVFocus] List candidate has no focusable target - list: ".concat(e.getAttribute("data-component-name"))),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}}}])}(),Wt=n(814);function jt(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 Ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jt(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ut=function(){return P(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x(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=Ht(Ht({},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,l,u=window.getComputedStyle(e),c=u.borderRadius,d=this.defaultFocusStyle.border.cornerRadius||8;if(c&&"none"!==c&&"0px"!==c){var h=c.match(/^(\d+(?:\.\d+)?)(px)?/);h&&(d=parseFloat(h[1]))}var f={enableBorder:!1,borderColor:this.defaultFocusStyle.border.color,borderWidth:this.defaultFocusStyle.border.width,borderRadius:d,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=u.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=u.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 b=e.getAttribute("focusborderwidth")||e.getAttribute("data-focus-border-width")||(null===(r=u.getPropertyValue("--focus-border-width"))||void 0===r?void 0:r.trim());if(b){var _=parseFloat(b);!isNaN(_)&&_>=0&&(f.borderWidth=_)}var w=e.getAttribute("focusbordercolor")||e.getAttribute("data-focus-border-color")||(null===(i=u.getPropertyValue("--focus-border-color"))||void 0===i?void 0:i.trim());w&&(f.borderColor=w);var E=e.getAttribute("data-focus-border");E&&(f.enableBorder="true"===E);var k=e.getAttribute("data-focus-background-color")||(null===(o=u.getPropertyValue("--focus-background-color"))||void 0===o?void 0:o.trim())||(null===(a=u.getPropertyValue("--focus-background"))||void 0===a?void 0:a.trim());k&&(f.focusBackgroundColor=k);var S=e.getAttribute("data-focus-color")||(null===(s=u.getPropertyValue("--focus-color"))||void 0===s?void 0:s.trim());S&&(f.focusColor=S);var A=e.getAttribute("data-select-color")||(null===(l=u.getPropertyValue("--select-color"))||void 0===l?void 0:l.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,Wt.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,Wt.u6)(e)})}},{key:"_applyDuplicateParentStateStyles",value:function(e){var t,n,r=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=e.querySelectorAll("[duplicateparentstate]");console.log("[TVFocusManager] _applyDuplicateParentStateStyles: parentElement:",null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"data-component-name"),"text:",null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"text"),"hasFocus:",i,"children count:",o.length),o.forEach(function(t){var n,o,a=t.getAttribute("duplicateparentstate");if("false"!==a&&"0"!==a){console.log("[TVFocusManager] _applyDuplicateParentStateStyles: processing child:",null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"data-component-name"),"text:",null===(o=t.getAttribute)||void 0===o?void 0:o.call(t,"text"));var s,l,u=window.getComputedStyle(t),c=function(e){var n;return t.getAttribute("data-"+e)||(null===(n=u.getPropertyValue("--"+e))||void 0===n?void 0:n.trim())},d=c("focus-color")||c("focus-text-color"),h=c("focus-background-color"),f=c("focus-border-radius"),p=c("focus-scale"),v=c("focus-border-width"),y=c("focus-border-color"),m=c("select-color"),g=c("select-background-color"),b=e.hasAttribute("select")&&"false"!==e.getAttribute("select")||e.hasAttribute("selected")&&"false"!==e.getAttribute("selected");if(b)console.log("[TVFocusManager] _applyDuplicateParentStateStyles: parentElement is selected:",null===(s=e.getAttribute)||void 0===s?void 0:s.call(e,"data-component-name"),"text:",null===(l=e.getAttribute)||void 0===l?void 0:l.call(e,"text"));var _=i?d:b&&m?m:null,w=i?h:b&&g?g:null,E=t.getAttribute("enablefocusborder"),k="true"===E||"1"===E||""===E;if(i&&!r.focusedElementOriginalStyles.has(t)){var S=window.getComputedStyle(t),A={backgroundColor:t.style.backgroundColor||S.backgroundColor,color:t.style.color||S.color,borderRadius:t.style.borderRadius,transform:t.style.transform,zIndex:t.style.zIndex,transition:t.style.transition,outline:t.style.outline,outlineOffset:t.style.outlineOffset};r.focusedElementOriginalStyles.set(t,A),console.log("[TVFocusManager] _applyDuplicateParentStateStyles: saving original styles for focus state - color:",A.color,"bg:",A.backgroundColor)}if(!i&&b&&!r.focusedElementOriginalStyles.has(t)){var x=window.getComputedStyle(t),C={backgroundColor:t.style.backgroundColor||x.backgroundColor,color:t.style.color||x.color};r.focusedElementOriginalStyles.set(t,C),console.log("[TVFocusManager] _applyDuplicateParentStateStyles: saving original styles for select state - color:",C.color,"bg:",C.backgroundColor)}if(t.style.transition=r.defaultFocusStyle.transition,w&&(t.style.backgroundColor=w),_)t.style.color=_;else if(i){var L=r.focusedElementOriginalStyles.get(t);L&&void 0!==L.color&&(t.style.color=L.color)}if(f){var P=parseFloat(f);!isNaN(P)&&P>=0&&(t.style.borderRadius=P+"px")}if(p){var T=parseFloat(p);!isNaN(T)&&T>0&&1!==T&&(t.style.transform="scale(".concat(T,")"),t.style.zIndex="10")}if(k&&i){var I=v?parseFloat(v):3,O=y||"#FFFFFF",R=f?parseFloat(f):8;t.style.outline="".concat(I,"px solid ").concat(O),t.style.outlineOffset="0px",t.style.borderRadius=R+"px"}if(t.classList.add("focused-child"),r.showOnStateManager){var N=r.showOnStateManager.shouldShowOnState(t,"focused");if(null!==N){var D=t.style.display;if(r.focusedElementOriginalStyles.has(t))r.focusedElementOriginalStyles.get(t).display=D;else r.focusedElementOriginalStyles.set(t,{display:D});t.style.display=N?"":"none"}}}})}},{key:"_removeDuplicateParentStateStyles",value:function(e){var t=this;e.querySelectorAll("[duplicateparentstate]").forEach(function(n){var r,i,o=n.getAttribute("duplicateparentstate");if("false"!==o&&"0"!==o){var a=t.focusedElementOriginalStyles.get(n);if(console.log("[TVFocusManager] _removeDuplicateParentStateStyles: child:",null===(r=n.getAttribute)||void 0===r?void 0:r.call(n,"data-component-name"),"text:",null===(i=n.getAttribute)||void 0===i?void 0:i.call(n,"text"),"originalStyles:",a),a&&(n.style.backgroundColor=a.backgroundColor,n.style.color=a.color,n.style.borderRadius=a.borderRadius,n.style.transform=a.transform,n.style.zIndex=a.zIndex,n.style.transition=a.transition,n.style.outline=a.outline,n.style.outlineOffset=a.outlineOffset),n.classList.remove("focused-child"),t.showOnStateManager){var s=t.showOnStateManager.shouldShowOnState(n,"normal");null!==s&&(n.style.display=s?"":"none")}if(e.hasAttribute("select")&&"false"!==e.getAttribute("select")||e.hasAttribute("selected")&&"false"!==e.getAttribute("selected")){var l,u,c=window.getComputedStyle(n),d=n.getAttribute("selectColor")||n.getAttribute("select-color")||n.getAttribute("data-select-color")||(null===(l=c.getPropertyValue("--select-color"))||void 0===l?void 0:l.trim()),h=n.getAttribute("selectBackgroundColor")||n.getAttribute("select-background-color")||n.getAttribute("data-select-background-color")||(null===(u=c.getPropertyValue("--select-background-color"))||void 0===u?void 0:u.trim());h&&(n.style.backgroundColor=h),d&&(n.style.color=d)}}})}},{key:"clearOriginalStyles",value:function(){this.focusedElementOriginalStyles.clear()}},{key:"deleteOriginalStyles",value:function(e){this.focusedElementOriginalStyles.delete(e)}}])}(),zt=function(){return P(function e(){x(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:"updateShowOnStateVisibility",value:function(e,t){var n=this,r=this.shouldShowOnState(e,t);null!==r&&(r?(e.style.display="",e.style.visibility=""):e.style.display="none"),this.getShowOnStateElements(e).forEach(function(e){var r=n.shouldShowOnState(e,t);null!==r&&(r?(e.style.display="",e.style.visibility=""):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?(e.style.display="",e.style.visibility=""):e.style.display="none")}},{key:"initShowOnStateForElement",value:function(e){var t=this;if(e){var n=this.getShowOnStateElements(e,!0);console.log("[TVFocusManager] initShowOnStateForElement found",n.length,"elements with showOnState"),n.forEach(function(e){var n=t.resolveShowOnStateState(e);t._updateShowOnStateVisibilityForElement(e,n)})}}}])}(),Gt=function(){return P(function e(){x(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 l=t?t(e):null;if(l){var u=l.id;if(u)return'[id="'.concat(u,'"] [data-index="').concat(o,'"]')}return'[data-index="'.concat(o,'"]')}for(var c=[],d=e;d&&d!==document.body;){var h=d.tagName.toLowerCase();if(d.id){h='[id="'.concat(d.id,'"]'),c.unshift(h);break}var f=d.getAttribute("data-position"),p=d.getAttribute("data-index");if(null!==f){h='[data-position="'.concat(f,'"]'),c.unshift(h);break}if(null!==p){h='[data-index="'.concat(p,'"]'),c.unshift(h);break}if(d.className&&"string"==typeof d.className){var v=d.className.split(" ").filter(function(e){return e&&!e.includes(":")});v.length>0&&(h+=".".concat(v[0]))}var y=d.parentElement;if(y){var m=Array.from(y.children).filter(function(e){return e.tagName===d.tagName});if(m.length>1){var g=m.indexOf(d)+1;h+=":nth-child(".concat(g,")")}}c.unshift(h),d=d.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),console.log("[TVFocusManager] 保存 FastListView 焦点,容器ID:",o.containerId,"位置:",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),console.log("[TVFocusManager] 保存当前页面焦点到 PageRootView,选择器:",a)}else console.log("[TVFocusManager] saveCurrentPageFocus: 未找到 PageRootView")}else console.log("[TVFocusManager] saveCurrentPageFocus: 当前没有焦点元素")}},{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){console.log("[TVFocusManager] 检测到 FastListView 焦点信息,容器ID:",o,"位置:",a);var s=document.getElementById(o);if(s&&s.__fastListViewInstance){var l=s.__fastListViewInstance,u=parseInt(a);return setTimeout(function(){l.requestChildFocus(u)},100),!0}}var c=i.getAttribute("data-last-focus-selector");if(!c)return console.log("[TVFocusManager] PageRootView 没有保存的焦点状态"),!1;console.log("[TVFocusManager] 从 PageRootView 恢复焦点,选择器:",c),t();var d=document.querySelector(c);if(d&&r.includes(d))return n(d),!0;var h=c.match(/\[data-position="(\d+)"\]/),f=c.match(/\[data-index="(\d+)"\]/),p=c.match(/\[id="([^"]+)"\]/);if((h||f)&&p){var v=h?parseInt(h[1]):parseInt(f[1]),y=p[1];console.log("[TVFocusManager] 尝试通过 FastListView 恢复焦点,容器:",y,"位置:",v);var m=document.getElementById(y);if(m&&m.__fastListViewInstance){var g=m.__fastListViewInstance;return setTimeout(function(){g.requestChildFocus(v)},100),!0}}return console.log("[TVFocusManager] 无法找到元素:",c),!1}},{key:"clearHistory",value:function(){this.focusHistory=[]}}])}(),Yt=function(){return P(function e(){x(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?(console.log("[TVFocus] FastListView handled navigation:",t),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){var n,r,i,o,a;if(e){if(console.log("[TVFocusManager] _maybeNotifyFastListItemFocusChanged, element:",null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"data-component-name"),"hasFocus:",t,"data-position:",null===(r=e.getAttribute)||void 0===r?void 0:r.call(e,"data-position"),"data-index:",null===(i=e.getAttribute)||void 0===i?void 0:i.call(e,"data-index")),console.log("[TVFocusManager] element.__fastListViewInstance:",!!e.__fastListViewInstance,"parent:",null===(o=e.parentElement)||void 0===o||null===(a=o.getAttribute)||void 0===a?void 0:a.call(o,"data-component-name")),e.__fastListViewInstance){var s,l=e.__fastListViewInstance;if(console.log("[TVFocusManager] Found __fastListViewInstance on element itself, itemContainer children:",null===(s=l._itemContainer)||void 0===s||null===(s=s.children)||void 0===s?void 0:s.length),l&&"function"==typeof l.notifyItemFocusChanged)return void l.notifyItemFocusChanged(e,t)}var u=e.parentElement;if(u&&u.__fastListViewInstance){var c,d=u.__fastListViewInstance;if(console.log("[TVFocusManager] Found __fastListViewInstance on direct parent, itemContainer children:",null===(c=d._itemContainer)||void 0===c||null===(c=c.children)||void 0===c?void 0:c.length),d&&"function"==typeof d.notifyItemFocusChanged)return void d.notifyItemFocusChanged(u,t)}for(var h=null;u;){if(u.__fastListViewInstance){var f,p,v,y,m,g;h=u.__fastListViewInstance,console.log("[TVFocusManager] Found __fastListViewInstance on parent:",null===(f=(p=u).getAttribute)||void 0===f?void 0:f.call(p,"data-component-name"),"itemContainer children:",null===(v=h._itemContainer)||void 0===v||null===(v=v.children)||void 0===v?void 0:v.length);var b=h._itemContainer;if(b&&(b===e||b.contains(e))){console.log("[TVFocusManager] element is in itemContainer, using this FastListView");break}var _=null!==(y=null===(m=e.getAttribute)||void 0===m?void 0:m.call(e,"data-position"))&&void 0!==y?y:null===(g=e.getAttribute)||void 0===g?void 0:g.call(e,"data-index");if(null!=_){var w,E=Number(_),k=null==b||null===(w=b.children)||void 0===w?void 0:w[E];if(k&&(k===e||k.contains(e))){console.log("[TVFocusManager] element matched by data-position, using this FastListView");break}}console.log("[TVFocusManager] element NOT in itemContainer, continuing search..."),h=null}u=u.parentElement}h&&"function"==typeof h.notifyItemFocusChanged?(console.log("[TVFocusManager] Calling notifyItemFocusChanged"),h.notifyItemFocusChanged(e,t)):console.log("[TVFocusManager] No FastListView found for element")}}},{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 qt(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 Qt(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)?Qt(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 Qt(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 Kt(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 Xt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Zt=function(){return P(function e(){x(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 Bt(this.options),this.styler=new Ut,this.showOnStateManager=new zt,this.stateManager=new Gt,this.fastListHandler=new Yt,this.styler.setShowOnStateManager(this.showOnStateManager)}},{key:"setOptions",value:function(e){this.options=Xt(Xt({},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=qt(t);try{var i=function(){var t=n.value;"childList"===t.type&&t.addedNodes.length>0&&setTimeout(function(){var n,r=qt(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]'),l=s.length-1;l>=0;l--){var u=s[l],c=window.getComputedStyle(u);if("none"!==c.display&&"hidden"!==c.visibility)return u}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,l=2*window.innerWidth,u=o.top<s&&o.bottom>-s&&o.left<l&&o.right>-l;return a&&u});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||(console.log("[TVFocusManager] focusedElement 不在当前页面,清除焦点"),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=Ot(e);ue(t)||this._callCurrentPageMethod("onKeyDown",t)}},{key:"_dispatchPageKeyUp",value:function(e){var t=Ot(e);ce(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(t){return console.error("[TVFocus] ".concat(e," rejected:"),t)})}catch(t){console.error("[TVFocus] ".concat(e," threw:"),t)}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 console.warn("[TVFocus] Current focused element no longer in DOM, refreshing focusable elements"),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=b(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){console.log("[TVFocus] _scrollToCenter called for element:",e.tagName,e.className);var t=this._findScrollContainer(e);if(console.log("[TVFocus] _scrollToCenter scrollContainer:",null==t?void 0:t.tagName,null==t?void 0:t.getAttribute("data-component-name")),!t)return console.log("[TVFocus] _scrollToCenter: no scrollContainer, using scrollIntoView"),void e.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.scrollHeight>t.clientHeight,o=t.scrollWidth>t.clientWidth;if(console.log("[TVFocus] _scrollToCenter dimensions:","scrollHeight=",t.scrollHeight,"clientHeight=",t.clientHeight,"scrollWidth=",t.scrollWidth,"clientWidth=",t.clientWidth,"isVerticalScroll=",i,"isHorizontalScroll=",o),i){var a=n.top-r.top+t.scrollTop,s=n.height,l=r.height,u=a-(l-s)/2,c=t.scrollHeight-l,d=Math.max(0,Math.min(u,c));console.log("[TVFocus] _scrollToCenter vertical:","elementTop=",a,"containerHeight=",l,"targetScrollTop=",u,"currentScrollTop=",t.scrollTop,"maxScrollTop=",c),t.scrollTo({top:d,behavior:"smooth"})}if(o){var h=n.left-r.left+t.scrollLeft,f=n.width,p=r.width,v=h-(p-f)/2,y=t.scrollWidth-p,m=Math.max(0,Math.min(v,y));console.log("[TVFocus] _scrollToCenter horizontal:","elementLeft=",h,"containerWidth=",p,"targetScrollLeft=",v,"currentScrollLeft=",t.scrollLeft,"maxScrollLeft=",y),t.scrollTo({left:m,behavior:"smooth"})}}}},{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,console.log("[TVFocus] _findScrollContainer: found",i,"scrollHeight=",t.scrollHeight,"clientHeight=",t.clientHeight)),!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 l=n.querySelector(".fast-list-item-container");if(l){var u=window.getComputedStyle(l),c=u.overflowY,d=u.overflowX,h=("auto"===c||"scroll"===c)&&l.scrollHeight>l.clientHeight,f=("auto"===d||"scroll"===d)&&l.scrollWidth>l.clientWidth;if(console.log("[TVFocus] _findScrollContainer: itemContainer check","overflowY=",c,"overflowX=",d,"scrollHeight=",l.scrollHeight,"clientHeight=",l.clientHeight,"hasVerticalScroll=",h,"hasHorizontalScroll=",f),h||f)return l}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(console.log("[TVFocus] _findScrollContainer: fastListView check","overflowY=",v,"overflowX=",y,"hasVerticalScroll=",m,"hasHorizontalScroll=",g),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(){console.log("[TVFocusManager] restorePreviousPageFocus 被调用"),this.clearFocus(),this.updateFocusableElements(),this._restoreFocusFromPageRootView()?console.log("[TVFocusManager] 成功恢复上一个页面的焦点"):this.focusableElements.length>0&&(console.log("[TVFocusManager] 没有保存的焦点,聚焦第一个元素"),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=b(r);return i&&"function"==typeof i.markClickHandled&&i.markClickHandled(),he(r,"onClick",{nativeEvent:t||{target:e,currentTarget:n}}),!0}n=n.parentElement}return!1}},{key:"clickFocused",value:function(){if(console.log("[TVFocusManager] clickFocused 被调用"),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||(console.log("[TVFocusManager] 使用原生 click 方法"),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){console.log("[TVFocusManager] dispatchBackPressed called - emitting hardwareBackPress event"),se()}},{key:"_directionNumberToName",value:function(e){return Rt(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=Rt(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 Jt(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 $t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}(0,_.A)(Zt,"FOCUS_DIRECTION",{BACKWARD:1,FORWARD:2,LEFT:17,UP:33,RIGHT:66,DOWN:130});var en="undefined"!=typeof window&&window.__BUNDLE_CONFIG__&&!0===window.__BUNDLE_CONFIG__.watch,tn="undefined"!=typeof window&&window.__BUNDLE_CONFIG__&&!0===window.__BUNDLE_CONFIG__.watch;function nn(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 rn=({NODE_ENV:"production"}.VUE_APP_PROXY_DOMAINS||"").split(",").map(function(e){return e.trim()}).filter(Boolean),on=[/api\./i,/-api\./i,/\.api\./i,/qcloudimg\./i,/cdnott\./i,/baidu\./i].concat(E(rn.map(function(e){return new RegExp(e.replace(/\./g,"\\."),"i")})));function an(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&&(!!tn||on.some(function(e){return e.test(t.hostname)}))}catch(e){return!1}}function sn(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())),i="".concat(window.location.origin).concat(r);return console.log("[AutoProxy] proxy url generated:",{originalUrl:e,normalizedUrl:t,proxyUrl:i,origin:window.location.origin}),i}catch(t){return console.warn("[AutoProxy] failed to build proxy url:",{url:e,error:t}),e}}function ln(e){return en&&an(e)?sn(e):e}function un(){if(en){console.log("[AutoProxy] Initializing..."),tn?console.log("[AutoProxy] Mode: proxy ALL cross-origin requests (web-cli dev)"):console.log("[AutoProxy] Mode: pattern-matched proxy",on.map(function(e){return e.toString()}));var e=window.fetch;window.fetch=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="string"==typeof t?t:t.url;if("string"==typeof r&&r.startsWith("hpfile://")){var i=r.replace(/^hpfile:\/\/\.?\//,"/").replace(/^hpfile:\/\//,"/");if(console.log("[AutoProxy] fetch hpfile:// converted:",r,"->",i),window.__VIRTUAL_FS__&&window.__VIRTUAL_FS__.has(i)){var o=window.__VIRTUAL_FS__.get(i),a=new Blob([o],{type:nn(i)});return console.log("[AutoProxy] fetch loading from VirtualFS:",i),Promise.resolve(new Response(a,{status:200,headers:{"Content-Type":nn(i)}}))}"string"==typeof t?t=i:t instanceof Request&&(t=new Request(i,n))}if(an(r)){var s=sn(r);"string"==typeof t?t=s:t instanceof Request&&(t=new Request(s,{method:t.method,headers:t.headers,body:t.body,mode:"cors",credentials:t.credentials,cache:t.cache,redirect:t.redirect,referrer:t.referrer,integrity:t.integrity}))}return e.call(this,t,n)};var t=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(e,n,r,i,o){return an(n)&&(n=sn(n)),t.call(this,e,n,!1!==r,i,o)};var n=Object.getOwnPropertyDescriptor(HTMLImageElement.prototype,"src");n&&n.set&&Object.defineProperty(HTMLImageElement.prototype,"src",$t($t({},n),{},{set(e){if("string"==typeof e&&e.startsWith("hpfile://")){var t=e.replace(/^hpfile:\/\/\.?\//,"/").replace(/^hpfile:\/\//,"/");if(console.log("[AutoProxy] hpfile:// converted:",e,"->",t),window.__VIRTUAL_FS__&&window.__VIRTUAL_FS__.has(t)){var r=window.__VIRTUAL_FS__.get(t),i=new Blob([r],{type:nn(t)}),o=URL.createObjectURL(i);return console.log("[AutoProxy] Loading from VirtualFS:",t),n.set.call(this,o)}return n.set.call(this,t)}if(/https?:\/\/[^/:]+:38989\//.test(e)){var a=e.replace(/https?:\/\/[^/:]+:38989\//,"./");return console.log("[AutoProxy] 38989 port URL converted:",e,"->",a),n.set.call(this,a)}var s=an(e)?sn(e):e;return n.set.call(this,s)}})),console.log("[AutoProxy] Initialized successfully")}else console.log("[AutoProxy] Disabled (not development mode)")}var cn=window.localStorage,dn=new Map,hn={getItem:e=>new Promise(function(t){setTimeout(function(){try{var n=cn.getItem(e);t(n)}catch(e){console.warn("[AsyncLocalStorage] getItem error:",e),t(null)}},0)}),setItem:(e,t)=>new Promise(function(n,r){setTimeout(function(){try{var i=cn.getItem(e);cn.setItem(e,t),fn(e,i,t),n()}catch(e){console.warn("[AsyncLocalStorage] setItem error:",e),r(e)}},0)}),removeItem:e=>new Promise(function(t){setTimeout(function(){try{var n=cn.getItem(e);cn.removeItem(e),fn(e,n,null),t()}catch(e){console.warn("[AsyncLocalStorage] removeItem error:",e),t()}},0)}),clear:()=>new Promise(function(e){setTimeout(function(){try{cn.clear(),e()}catch(t){console.warn("[AsyncLocalStorage] clear error:",t),e()}},0)}),key:e=>new Promise(function(t){setTimeout(function(){try{t(cn.key(e))}catch(e){console.warn("[AsyncLocalStorage] key error:",e),t(null)}},0)}),multiGet:e=>new Promise(function(t){setTimeout(function(){try{var n=e.map(function(e){return[e,cn.getItem(e)]});t(n)}catch(n){console.warn("[AsyncLocalStorage] multiGet error:",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=cn.getItem(n);cn.setItem(n,r),fn(n,i,r)}),t()}catch(e){console.warn("[AsyncLocalStorage] multiSet error:",e),n(e)}},0)}),multiRemove:e=>new Promise(function(t){setTimeout(function(){try{e.forEach(function(e){var t=cn.getItem(e);cn.removeItem(e),fn(e,t,null)}),t()}catch(e){console.warn("[AsyncLocalStorage] multiRemove error:",e),t()}},0)}),get length(){return cn.length},addChangeListener(e){var t=Date.now()+Math.random();return dn.set(t,e),function(){return dn.delete(t)}}};function fn(e,t,n){dn.forEach(function(r){try{r(e,n,t)}catch(e){console.warn("[AsyncLocalStorage] listener error:",e)}})}var pn=n(553);function vn(e,t){if(t&&("object"==(0,pn.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 yn(e){return yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yn(e)}function mn(){return mn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=yn(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}},mn.apply(null,arguments)}function gn(e,t){return gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gn(e,t)}function bn(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&&gn(e,t)}function _n(e,t,n,r){var i=mn(yn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function wn(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 En(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)?En(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 En(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 kn(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 Sn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kn(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function An(e,t,n){return t=yn(t),vn(e,xn()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function xn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xn=function(){return!!e})()}var Cn=function(){return"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}},Ln=Cn(),Pn={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"},Tn={click:"onClick",longclick:"onLongClick",pressin:"onPressIn",pressout:"onPressOut",touchstart:"onTouchDown",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},In={changetext:"onChangeText",keyboardwillhide:"onKeyboardWillHide",keyboardwillshow:"onKeyboardWillShow",contentsizechange:"onContentSizeChange",endediting:"onEndEditing"},On={pageselected:"onPageSelected",pagescroll:"onPageScroll",statechanged:"onStateChanged",pagescrollstatechanged:"onPageScrollStateChanged"};function Rn(e){return Pn[e]?Pn[e]:function(e){return!!Tn[e]}(e)?Tn[e]:function(e){return!!In[e]}(e)?In[e]:function(e){return!!On[e]}(e)?On[e]:function(e){return e.startsWith("on")?e:"on".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))}(e)}var Nn=function(){return P(function e(t){x(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,Rn(t),n)}},{key:"removeEventListener",value:function(e,t,n){Hippy.bridge.callNative("UIManagerModule","removeEventListener",e,Rn(t),n)}}])}(),Dn="AnimationModule",Mn=function(){return P(function e(t){x(this,e),this.id=t},[{key:"getId",value:function(){return this.id}},{key:"start",value:function(){Hippy.bridge.callNative(Dn,"startAnimation",this.id)}},{key:"pause",value:function(){Hippy.bridge.callNative(Dn,"pauseAnimation",this.id)}},{key:"resume",value:function(){Hippy.bridge.callNative(Dn,"resumeAnimation",this.id)}},{key:"destroy",value:function(){Hippy.bridge.callNative(Dn,"destroyAnimation",this.id)}},{key:"updateAnimation",value:function(e){Hippy.bridge.callNative(Dn,"destroyAnimation",this.id,e)}},{key:"addEventListener",value:function(e,t){Hippy.bridge.callNative(Dn,"addEventListener",this.id,e,t)}},{key:"removeEventListener",value:function(e,t){Hippy.bridge.callNative(Dn,"removeEventListener",this.id,e,t)}}])}(),Fn=function(e){function t(e){return x(this,t),An(this,t,[Hippy.bridge.callNativeWithCallbackId(Dn,"createAnimation",!0,e.mode,e)])}return bn(t,e),P(t)}(Mn),Vn=function(e){function t(e){var n=e.children,r=e.repeatCount;return x(this,t),An(this,t,[Hippy.bridge.callNativeWithCallbackId(Dn,"createAnimationSet",!0,{children:n,repeatCount:r})])}return bn(t,e),P(t)}(Mn),Bn={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 Wn={OS:"web",Platform:{OS:"android",Localization:void 0},Dimensions:Sn({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}}())},jn=function(){return P(function e(t){var n=this;x(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]}}])}(),Hn=function(){return P(function e(t){x(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 Un,zn=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},Gn=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},Yn=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){console.error(e)}else"uncaughtException"===e&&n[0]&&console.error(n[0].toString())},qn=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},Qn={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 qn(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)},Kn=["measureInWindow","measureInAppWindow","getBoundingClientRect"],Xn={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){Kn.includes(t)?Hippy.bridge.callNative("UIManagerModule",t,[e,n],r):Hippy.bridge.callNative("UIManagerModule","callUIFunction",[e,t,n],r)}},Zn={country:"",language:"",direction:0},Jn={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 l=0,u=3;u<t.length;u+=1)"function"==typeof t[u]&&0===l?(l+=1,__GLOBAL__.moduleCallList[a]={cb:t[u],type:o?1:2}):s.push(t[u]);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]}},$n=Cn();"undefined"!=typeof window&&(window.global=$n),$n.Hippy={},$n.__GLOBAL__={},$n.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 l=__GLOBAL__.moduleCallList[o.callId];0!==o.result&&"function"==typeof l.reject?l.reject(o.params):l.cb(o.params),0!==l.type&&1!==l.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 u=__GLOBAL__.jsModuleList[o.moduleName];u&&"function"==typeof u[o.methodName]?u[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},$n.__ISHIPPY__=!0,$n.__GLOBAL__.globalEventHandle={},$n.__GLOBAL__.jsModuleList={Dimensions:Bn},$n.__HIPPYNATIVEGLOBAL__=Wn,$n.HippyDealloc=function(){Hippy&&Hippy.emit("dealloc")},$n.__Headers=$n.Headers,$n.Headers=jn,$n.__Response=$n.Response,$n.Response=Hn,$n.__fetch=$n.fetch,$n.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 jn)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 jn(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 Hn(n);e(r)}else t(n)}).catch(function(e){t(e)})})},$n.__WebSocket=$n.WebSocket,$n.getTurboModule=function(e){var t=Hippy.web.engine.modules[e];return null==t&&console.warn("Turbo module: ".concat(e," is not found")),t},$n.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=Jn,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=zn,Hippy.off=Gn,Hippy.emit=Yn,Hippy.asyncStorage=Qn,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=Xn,Hippy.device.platform={OS:__HIPPYNATIVEGLOBAL__.Platform.OS,Localization:__HIPPYNATIVEGLOBAL__.Platform.Localization||Zn},Hippy.SceneBuilder=Nn,Hippy.Animation=Fn,Hippy.AnimationSet=Vn,$n.__localStorage=$n.localStorage,Object.defineProperty($n,"localStorage",{value:Hippy.asyncStorage}),$n.turboPromise=Hippy.turboPromise,Object.defineProperty($n.console,"reportUncaughtException",{value:function(e){if(e&&e instanceof Error)throw e}}),$n.addEventListener("unhandledrejection",function(e){$n.Hippy.emit("unhandledRejection",null==e?void 0:e.reason,null==e?void 0:e.promise)}),Bn.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"}(Un||(Un={}));var er,tr,nr,rr,ir,or,ar,sr,lr=2;!function(e){e.HEAD="head",e.clip="clip",e.MIDDLE="middle",e.TAIL="tail"}(er||(er={})),function(e){e.COVER="cover",e.CONTAIN="contain",e.STRETCH="stretch",e.REPEAT="repeat",e.CENTER="center"}(tr||(tr={})),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"}(nr||(nr={})),function(e){e.default="default",e.numeric="numeric",e.password="password",e.email="email",e.phonePad="phone-pad"}(rr||(rr={})),function(e){e.done="done",e.go="go",e.next="next",e.search="search",e.send="send"}(ir||(ir={})),function(e){e.Slide="slide",e.Fade="fade",e.SlideFade="slide_fade",e.None="none"}(or||(or={})),function(e){e.Portrait="portrait",e.PortraitUpsideDown="portrait-upside-down",e.Landscape="landscape",e.LandscapeLeft="landscape-left",e.LandscapeRight="landscape-right"}(ar||(ar={})),function(e){e.IDLE="idle",e.DRAG="dragging",e.SETTL="settling"}(sr||(sr={}));var ur="marginVertical",cr="marginHorizontal",dr="paddingVertical",hr="paddingHorizontal";function fr(e,t){return e&&Object.prototype.hasOwnProperty.call(e,t)}function pr(e,t,n){if(null!==t){for(var r,i,o,a,s={},l={},u={},c=0,d=Object.keys(t);c<d.length;c++){var h=d[c];if(fr(t,h))if(-1===h.indexOf("shadow"))if(-1===h.indexOf("textShadow"))if(!gr(h)||isNaN(t[h]))if(vr(h,t[h])&&n)n(h,t[h],e);else if(kr(h)&&"span"===e.tagName){var f=Er(t[h]);yr(e,h,f),yr(e,"line-height",f)}else{if(br(h,t[h]))yr(e,h,Er(t[h]));else _r(h)?yr(e,h,parseInt(t[h],10)):(wr(h)&&(u[h]=t[h]),yr(e,h,t[h]))}else yr(e,h,mr(t[h]));else l[h]=t[h];else s[h]=t[h]}!function(e,t){t.borderStyle||Sr(e,t);!t.borderStyle||t.borderWidth||t.borderTopWidth||t.borderLeftWidth||t.borderRightWidth||t.borderBottomWidth?!t.borderStyle&&t.borderWidth?yr(e,"borderStyle","solid"):t.borderStyle&&!t.borderWidth&&(t.borderTopWidth||t.borderLeftWidth||t.borderRightWidth||t.borderBottomWidth)&&(yr(e,"borderStyle","none"),Sr(e,t)):yr(e,"borderStyle","none");void 0!==t[ur]&&(yr(e,"marginTop",Er(t[ur])),yr(e,"marginBottom",Er(t[ur])));void 0!==t[cr]&&(yr(e,"marginLeft",Er(t[cr])),yr(e,"marginRight",Er(t[cr])));void 0!==t[dr]&&(yr(e,"paddingTop",Er(t[dr])),yr(e,"paddingBottom",Er(t[dr])));void 0!==t[hr]&&(yr(e,"paddingLeft",Er(t[hr])),yr(e,"paddingRight",Er(t[hr])))}(e,t),s.shadowRadius&&yr(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(mr(r.shadowColor))),(l.textShadowColor||l.textShadowOffset||l.textShadowOffsetX||l.textShadowOffsetY)&&yr(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(mr(e.textShadowColor))}(l)),function(e,t){for(var n,r=function(){var r=o[i];if("backgroundImage"===r)return yr(t,r,"url(".concat(e.backgroundImage,")")),1;if("backgroundSize"===r&&"contain"===e.backgroundSize?yr(t,r,"100% 100%"):"backgroundSize"===r&&yr(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(mr(e.color)).concat(e.ratio>=0?" ".concat(100*e.ratio,"%"):"")}),yr(t,"background","linear-gradient(".concat(s,")"))}},i=0,o=Object.keys(e);i<o.length;i++)r();Object.keys(e).length>0&&yr(t,"backgroundRepeat","no-repeat")}(u,e)}}function vr(e,t){return!!fr(t,"animationId")||(!("transform"!==e||!Array.isArray(t))||void 0)}function yr(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 mr(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 gr(e){return e.endsWith("Color")||e.endsWith("color")}function br(e,t){return!(isNaN(t)||e.startsWith("flex")||e.startsWith("zIndex")||e.startsWith("-webkit")||e.startsWith("z-index")||e.startsWith("opacity"))}function _r(e){return e.startsWith("zIndex")||e.startsWith("z-index")}function wr(e){return e.startsWith("background")||e.startsWith("linearGradient")}function Er(e){return isNaN(e)?e:"".concat(e,"px")}function kr(e){return e.startsWith("fontSize")}function Sr(e,t){t.borderTopWidth&&yr(e,"borderTopStyle","solid"),t.borderLeftWidth&&yr(e,"borderLeftStyle","solid"),t.borderRightWidth&&yr(e,"borderRightStyle","solid"),t.borderBottomWidth&&yr(e,"borderBottomStyle","solid")}function Ar(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]}var xr=function(){},Cr=function(){return P(function e(t){x(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]}}])}(),Lr=function(){return P(function e(){x(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 Pr(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=wn(e);try{for(o.s();!(i=o.n()).done;){r(i.value)}}catch(e){o.e(e)}finally{o.f()}})}var Tr=function(){function e(t){x(this,e),this.modules={},this.components={},this.eventBus=new Lr,this.pendingQueue={},this.pendingModules={},this.context=new Cr(this);var n=t||{},r=n.modules,i=n.components;this.registerCore(),this.registerModules(r),this.registerComponents(i),Ln.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 P(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("destoryInstance",this.instance.id)}},{key:"pause",value:function(){hippyBridge("pauseInstance")}},{key:"resume",value:function(){hippyBridge("resumeInstance")}},{key:"load",value:function(e){return Pr(e)}},{key:"invokeModuleMethod",value:(n=u(d().mark(function e(t,n,r){var i,o,a,s,l=arguments;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>3&&void 0!==l[3]?l[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=u(d().mark(function e(t,n,r){var i,o,a,s,l,u,c=arguments;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=c.length>3&&void 0!==c[3]?c[3]:[],o=this.modules[t],a=null!=r?Ir(t,n,r):void 0,s=[].concat(E(i),[a]),l=o[n],e.prev=1,e.next=2,l.apply(o,s);case 2:e.next=4;break;case 3:e.prev=3,u=e.catch(1),console.error(u);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}();Tr.coreModules={};var Ir=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})}}},Or=P(function e(){x(this,e),this.name=""}),Rr=function(e){function t(e){var n;return x(this,t),(n=An(this,t)).mode="normal",n.context=e,n}return bn(t,e),P(t,[{key:"init",value:function(){}}])}(Or),Nr=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}()}(),Dr="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Mr=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")(),Fr="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Mr):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)};var Vr=["top","right","bottom","left","width","height","size","weight"],Br="undefined"!=typeof MutationObserver,Wr=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(){Fr(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(){Dr&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Br?(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(){Dr&&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;Vr.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}(),jr=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},Hr=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||Mr},Ur=Kr(0,0,0,0);function zr(e){return parseFloat(e)||0}function Gr(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+zr(e["border-"+n+"-width"])},0)}function Yr(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Ur;var r=Hr(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]=zr(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=zr(r.width),l=zr(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=Gr(r,"left","right")+o),Math.round(l+a)!==n&&(l-=Gr(r,"top","bottom")+a)),!function(e){return e===Hr(e).document.documentElement}(e)){var u=Math.round(s+o)-t,c=Math.round(l+a)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(c)&&(l-=c)}return Kr(i.left,i.top,s,l)}var qr="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof Hr(e).SVGGraphicsElement}:function(e){return e instanceof Hr(e).SVGElement&&"function"==typeof e.getBBox};function Qr(e){return Dr?qr(e)?function(e){var t=e.getBBox();return Kr(0,0,t.width,t.height)}(e):Yr(e):Ur}function Kr(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Xr=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Kr(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Qr(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}(),Zr=function(e,t){var n,r,i,o,a,s,l,u=(r=(n=t).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),jr(l,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),l);jr(this,{target:e,contentRect:u})},Jr=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new Nr,"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 Hr(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new Xr(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 Hr(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 Zr(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}(),$r="undefined"!=typeof WeakMap?new WeakMap:new Nr,ei=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=Wr.getInstance(),r=new Jr(t,n,this);$r.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){ei.prototype[e]=function(){var t;return(t=$r.get(this))[e].apply(t,arguments)}});var ti=void 0!==Mr.ResizeObserver?Mr.ResizeObserver:ei;function ni(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ri,ii={exports:{}};ri=ii,function(e,t,n,r){var i,o=["","webkit","Moz","MS","ms","o"],a=t.createElement("div"),s=Math.round,l=Math.abs,u=Date.now;function c(e,t,n){return setTimeout(m(e,n),t)}function d(e,t,n){return!!Array.isArray(e)&&(h(e,n[t],n),!0)}function h(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==r)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function f(t,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=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,i,r),t.apply(this,arguments)}}i="function"!=typeof Object.assign?function(e){if(e===r||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==r&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:Object.assign;var p=f(function(e,t,n){for(var i=Object.keys(t),o=0;o<i.length;)(!n||n&&e[i[o]]===r)&&(e[i[o]]=t[i[o]]),o++;return e},"extend","Use `assign`."),v=f(function(e,t){return p(e,t,!0)},"merge","Use `assign`.");function y(e,t,n){var r,o=t.prototype;(r=e.prototype=Object.create(o)).constructor=e,r._super=o,n&&i(r,n)}function m(e,t){return function(){return e.apply(t,arguments)}}function g(e,t){return"function"==typeof e?e.apply(t&&t[0]||r,t):e}function b(e,t){return e===r?t:e}function _(e,t,n){h(S(t),function(t){e.addEventListener(t,n,!1)})}function w(e,t,n){h(S(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 k(e,t){return e.indexOf(t)>-1}function S(e){return e.trim().split(/\s+/g)}function A(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 x(e){return Array.prototype.slice.call(e,0)}function C(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];A(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 L(e,t){for(var n,i,a=t[0].toUpperCase()+t.slice(1),s=0;s<o.length;){if((i=(n=o[s])?n+a:t)in e)return i;s++}return r}var P=1;function T(t){var n=t.ownerDocument||t;return n.defaultView||n.parentWindow||e}var I="ontouchstart"in e,O=L(e,"PointerEvent")!==r,R=I&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),N="touch",D="mouse",M=24,F=["x","y"],V=["clientX","clientY"];function B(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){g(e.options.enable,[e])&&n.handler(t)},this.init()}function W(e,t,n){var i=n.pointers.length,o=n.changedPointers.length,a=1&t&&i-o===0,s=12&t&&i-o===0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,i=t.pointers,o=i.length;n.firstInput||(n.firstInput=j(t)),o>1&&!n.firstMultiple?n.firstMultiple=j(t):1===o&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,c=s?s.center:a.center,d=t.center=H(i);t.timeStamp=u(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=Y(c,d),t.distance=G(c,d),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=z(t.deltaX,t.deltaY);var h,f,p=U(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=p.x,t.overallVelocityY=p.y,t.overallVelocity=l(p.x)>l(p.y)?p.x:p.y,t.scale=s?(h=s.pointers,G((f=i)[0],f[1],V)/G(h[0],h[1],V)):1,t.rotation=s?function(e,t){return Y(t[1],t[0],V)+Y(e[1],e[0],V)}(s.pointers,i):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,i,o,a,s=e.lastInterval||t,u=t.timeStamp-s.timeStamp;if(8!=t.eventType&&(u>25||s.velocity===r)){var c=t.deltaX-s.deltaX,d=t.deltaY-s.deltaY,h=U(u,c,d);i=h.x,o=h.y,n=l(h.x)>l(h.y)?h.x:h.y,a=z(c,d),e.lastInterval=t}else n=s.velocity,i=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=i,t.velocityY=o,t.direction=a}(n,t);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 j(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:s(e.pointers[n].clientX),clientY:s(e.pointers[n].clientY)},n++;return{timeStamp:u(),pointers:t,center:H(t),deltaX:e.deltaX,deltaY:e.deltaY}}function H(e){var t=e.length;if(1===t)return{x:s(e[0].clientX),y:s(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:s(n/t),y:s(r/t)}}function U(e,t,n){return{x:t/e||0,y:n/e||0}}function z(e,t){return e===t?1:l(e)>=l(t)?e<0?2:4:t<0?8:16}function G(e,t,n){n||(n=F);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Y(e,t,n){n||(n=F);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}B.prototype={handler:function(){},init:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(T(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(T(this.element),this.evWin,this.domHandler)}};var q={mousedown:1,mousemove:2,mouseup:4},Q="mousedown",K="mousemove mouseup";function X(){this.evEl=Q,this.evWin=K,this.pressed=!1,B.apply(this,arguments)}y(X,B,{handler:function(e){var t=q[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:D,srcEvent:e}))}});var Z={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},J={2:N,3:"pen",4:D,5:"kinect"},$="pointerdown",ee="pointermove pointerup pointercancel";function te(){this.evEl=$,this.evWin=ee,B.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}e.MSPointerEvent&&!e.PointerEvent&&($="MSPointerDown",ee="MSPointerMove MSPointerUp MSPointerCancel"),y(te,B,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Z[r],o=J[e.pointerType]||e.pointerType,a=o==N,s=A(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 ne={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function re(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,B.apply(this,arguments)}function ie(e,t){var n=x(e.touches),r=x(e.changedTouches);return 12&t&&(n=C(n.concat(r),"identifier",!0)),[n,r]}y(re,B,{handler:function(e){var t=ne[e.type];if(1===t&&(this.started=!0),this.started){var n=ie.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:N,srcEvent:e})}}});var oe={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ae="touchstart touchmove touchend touchcancel";function se(){this.evTarget=ae,this.targetIds={},B.apply(this,arguments)}function le(e,t){var n=x(e.touches),r=this.targetIds;if(3&t&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=x(e.changedTouches),s=[],l=this.target;if(o=n.filter(function(e){return E(e.target,l)}),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?[C(o.concat(s),"identifier",!0),s]:void 0}function ue(){B.apply(this,arguments);var e=m(this.handler,this);this.touch=new se(this.manager,e),this.mouse=new X(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function ce(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 he(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}y(se,B,{handler:function(e){var t=oe[e.type],n=le.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:N,srcEvent:e})}}),y(ue,B,{handler:function(e,t,n){var r=n.pointerType==N,i=n.pointerType==D;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)ce.call(this,t,n);else if(i&&he.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var fe=L(a.style,"touchAction"),pe=fe!==r,ve="compute",ye="auto",me="manipulation",ge="none",be="pan-x",_e="pan-y",we=function(){if(!pe)return!1;var t={},n=e.CSS&&e.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(r){t[r]=!n||e.CSS.supports("touch-action",r)}),t}();function Ee(e,t){this.manager=e,this.set(t)}Ee.prototype={set:function(e){e==ve&&(e=this.compute()),pe&&this.manager.element.style&&we[e]&&(this.manager.element.style[fe]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return h(this.manager.recognizers,function(t){g(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(e){if(k(e,ge))return ge;var t=k(e,be),n=k(e,_e);return t&&n?ge:t||n?t?be:_e:k(e,me)?me:ye}(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=k(r,ge)&&!we[ge],o=k(r,_e)&&!we[_e],a=k(r,be)&&!we[be];if(i){var s=1===e.pointers.length,l=e.distance<2,u=e.deltaTime<250;if(s&&l&&u)return}if(!a||!o)return i||o&&6&n||a&&n&M?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var ke=32;function Se(e){this.options=i({},this.defaults,e||{}),this.id=P++,this.manager=null,this.options.enable=b(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Ae(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function xe(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function Ce(e,t){var n=t.manager;return n?n.get(e):e}function Le(){Se.apply(this,arguments)}function Pe(){Le.apply(this,arguments),this.pX=null,this.pY=null}function Te(){Le.apply(this,arguments)}function Ie(){Se.apply(this,arguments),this._timer=null,this._input=null}function Oe(){Le.apply(this,arguments)}function Re(){Le.apply(this,arguments)}function Ne(){Se.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function De(e,t){return(t=t||{}).recognizers=b(t.recognizers,De.defaults.preset),new Me(e,t)}function Me(e,t){var n;this.options=i({},De.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||(O?te:R?se:I?ue:X))(n,W),this.touchAction=new Ee(this,this.options.touchAction),Fe(this,!0),h(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 Fe(e,t){var n,r=e.element;r.style&&(h(e.options.cssProps,function(i,o){n=L(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""}),t||(e.oldCssProps={}))}Se.prototype={defaults:{},set:function(e){return i(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=Ce(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return d(e,"dropRecognizeWith",this)||(e=Ce(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(d(e,"requireFailure",this))return this;var t=this.requireFail;return-1===A(t,e=Ce(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(d(e,"dropRequireFailure",this))return this;e=Ce(e,this);var t=A(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+Ae(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+Ae(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=ke},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=i({},e);if(!g(this.options.enable,[this,t]))return this.reset(),void(this.state=ke);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},y(Le,Se,{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:ke}}),y(Pe,Le,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(_e),e&M&&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 Le.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=xe(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),y(Te,Le,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ge]},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)}}),y(Ie,Se,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ye]},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=c(function(){this.state=8,this.tryEmit()},t.time,this);else if(4&e.eventType)return 8;return ke},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=u(),this.manager.emit(this.options.event,this._input)))}}),y(Oe,Le,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ge]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),y(Re,Le,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Pe.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&M&&(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=xe(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),y(Ne,Se,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},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.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||G(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=c(function(){this.state=8,this.tryEmit()},t.interval,this),2):8}return ke},failTimeout:function(){return this._timer=c(function(){this.state=ke},this.options.interval,this),ke},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),De.VERSION="2.0.7",De.defaults={domEvents:!1,touchAction:ve,enable:!0,inputTarget:null,inputClass:null,preset:[[Oe,{enable:!1}],[Te,{enable:!1},["rotate"]],[Re,{direction:6}],[Pe,{direction:6},["swipe"]],[Ne],[Ne,{event:"doubletap",taps:2},["tap"]],[Ie]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Me.prototype={set:function(e){return i(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 Se)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=A(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==r&&t!==r){var n=this.handlers;return h(S(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this}},off:function(e,t){if(e!==r){var n=this.handlers;return h(S(e),function(e){t?n[e]&&n[e].splice(A(n[e],t),1):delete n[e]}),this}},emit:function(e,n){this.options.domEvents&&function(e,n){var r=t.createEvent("Event");r.initEvent(e,!0,!0),r.gesture=n,n.target.dispatchEvent(r)}(e,n);var r=this.handlers[e]&&this.handlers[e].slice();if(r&&r.length){n.type=e,n.preventDefault=function(){n.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](n),i++}},destroy:function(){this.element&&Fe(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},i(De,{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:ke,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:M,DIRECTION_ALL:30,Manager:Me,Input:B,TouchAction:Ee,TouchInput:se,MouseInput:X,PointerEventInput:te,TouchMouseInput:ue,SingleTouchInput:re,Recognizer:Se,AttrRecognizer:Le,Tap:Ne,Pan:Pe,Swipe:Re,Pinch:Te,Rotate:Oe,Press:Ie,on:_,off:w,each:h,merge:v,extend:p,assign:i,inherit:y,bindFn:m,prefixed:L}),(void 0!==e?e:"undefined"!=typeof self?self:{}).Hammer=De,ri.exports?ri.exports=De:e.Hammer=De}(window,document);var oi=function(){return P(function e(t,n,r){x(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[nr.ON_CLICK]},set:function(e){if(this.props[nr.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[nr.ON_LONG_CLICK]},set:function(e){if(this.props[nr.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[nr.ON_TOUCH_DOWN]},set:function(e){this.props[nr.ON_TOUCH_DOWN]=e,e?this.dom.addEventListener("touchstart",this.handleOnTouchStart):this.dom.removeEventListener("touchstart",this.handleOnTouchStart)}},{key:"onTouchMove",get:function(){return this.props[nr.ON_TOUCH_MOVE]},set:function(e){this.props[nr.ON_TOUCH_MOVE]=e,e?this.dom.addEventListener("touchmove",this.handleOnTouchMove):this.dom.removeEventListener("touchmove",this.handleOnTouchMove)}},{key:"onTouchEnd",get:function(){return this.props[nr.ON_TOUCH_END]},set:function(e){this.props[nr.ON_TOUCH_END]=e,e?this.dom.addEventListener("touchend",this.handleOnTouchEnd):this.dom.removeEventListener("touchend",this.handleOnTouchEnd)}},{key:"onTouchCancel",get:function(){return this.props[nr.ON_TOUCH_CANCEL]},set:function(e){this.props[nr.ON_TOUCH_CANCEL]=e,e?this.dom.addEventListener("touchcancel",this.handleOnTouchCancel):this.dom.removeEventListener("touchcancel",this.handleOnTouchCancel)}},{key:"onLayout",get:function(){return this.props[nr.ON_LAYOUT]},set:function(e){var t;this.props[nr.ON_LAYOUT]=e,e?(this.resizeObserver||(this.resizeObserver=new ti(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,pr(this.dom,{zIndex:0}),void(this.updatedZIndex=!0);delete this.props.style.zIndex,pr(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[nr.ON_ATTACHED_TO_WINDOW]&&this.dispatchEvent("onAttachedToWindow",null)}},{key:"beforeMount",value:(n=u(d().mark(function e(t,n){return d().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=u(d().mark(function e(t,n){return d().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=u(d().mark(function e(){var t;return d().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:lr,stopPropagation:function(){}})}},{key:"handleOnLongClick",value:function(e){this.onLongClick&&(this.dispatchEvent(nr.ON_LONG_CLICK,e),e.srcEvent.stopPropagation())}},{key:"handleOnClick",value:function(e){this.onClick&&(this.dispatchEvent(nr.ON_CLICK,e),e.srcEvent.stopPropagation())}},{key:"handleOnTouchStart",value:function(e){this.onTouchDown&&(this.dispatchEvent("onTouchDown",ai(e,"onTouchDown",this.id)),e.stopPropagation())}},{key:"handleOnTouchMove",value:function(e){this.onTouchMove&&(this.dispatchEvent("onTouchMove",ai(e,"onTouchMove",this.id)),e.stopPropagation(),e.preventDefault())}},{key:"handleOnTouchCancel",value:function(e){this.onTouchCancel&&(this.dispatchEvent("onTouchCancel",ai(e,"onTouchCancel",this.id)),e.stopPropagation())}},{key:"handleOnTouchEnd",value:function(e){this.onTouchEnd&&(this.dispatchEvent("onTouchEnd",ai(e,"onTouchEnd",this.id)),e.stopPropagation())}}]);var e,t,n}();function ai(e,t,n){var r=e.changedTouches[0];return{name:t,id:n,page_x:Number(r.pageX),page_y:Number(r.pageY)}}var si,li=function(e){function t(e,n,r){var i;return x(this,t),(i=An(this,t,[e,n,r])).isLoadSuccess=!1,i.tintModeContainerDom=null,i.renderImgDom=null,i.tagName=Un.IMAGE,i.dom=document.createElement("img"),i.renderImgDom=i.dom,i.handleLoad=i.handleLoad.bind(i),i.init(),i}return bn(t,e),P(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=Sn({},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[nr.TINY_COLOR]},set:function(e){var t,n;if(this.props[nr.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 pr(this.dom,{filter:""})}},{key:"capInsets",get:function(){return this.props[nr.CAP_INSETS]},set:function(e){this.props[nr.CAP_INSETS]=e}},{key:"resizeMode",get:function(){return this.props[nr.RESIZE_MODE]},set:function(e){e||(this.props[nr.RESIZE_MODE]=tr.CONTAIN),this.props[nr.RESIZE_MODE]=e,this.renderImgDom&&e&&pr(this.renderImgDom,{objectFit:ui[e]})}},{key:"src",get:function(){var e=this.props[nr.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[nr.SOURCE]=null!=e?e:"",e&&e!==this.props[nr.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[nr.DEFAULT_SOURCE]},set:function(e){this.props[nr.DEFAULT_SOURCE]=e,this.isLoadSuccess||(this.renderImgDom.src=e)}},{key:"onLoad",value:function(e){this.props[nr.ON_LOAD]&&this.dispatchEvent(nr.ON_LOAD,e)}},{key:"onLoadStart",value:function(e){this.props[nr.ON_LOAD_START]&&this.dispatchEvent(nr.ON_LOAD_START,e)}},{key:"onLoadEnd",value:function(e){this.props[nr.ON_LOAD_END]&&this.dispatchEvent(nr.ON_LOAD_END,e)}},{key:"onError",value:function(e){this.props[nr.ON_ERROR]&&this.dispatchEvent(nr.ON_ERROR,e)}},{key:"onProgress",value:function(e){this.props[nr.ON_PROGRESS]&&this.dispatchEvent(nr.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(!fr(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=mr(this.tintColor);pr(this.renderImgDom,{transform:"translateX(-100%)",filter:"drop-shadow(".concat(this.props.style.width,"px 0 ").concat(e,")")})}}])}(oi),ui=((si={})[tr.CENTER]="none",si[tr.CONTAIN]="contain",si[tr.STRETCH]="fill",si[tr.REPEAT]="none",si[tr.COVER]="cover",si),ci={exports:{}},di={exports:{}},hi={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}(hi);var fi={exports:{}};!function(e){var t=hi.exports.default;e.exports=function(e,n){if("object"!=t(e)||!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}(fi),function(e){var t=hi.exports.default,n=fi.exports;e.exports=function(e){var r=n(e,"string");return"symbol"==t(r)?r:r+""},e.exports.__esModule=!0,e.exports.default=e.exports}(di),function(e){var t=di.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}(ci);var pi,vi=ni(ci.exports);var yi="undefined"==typeof document?void 0:document,mi=!!yi&&"content"in yi.createElement("template"),gi=!!yi&&yi.createRange&&"createContextualFragment"in yi.createRange();function bi(e){return e=e.trim(),mi?function(e){var t=yi.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(e):gi?function(e){return pi||(pi=yi.createRange()).selectNode(yi.body),pi.createContextualFragment(e).childNodes[0]}(e):function(e){var t=yi.createElement("body");return t.innerHTML=e,t.childNodes[0]}(e)}function _i(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 wi(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Ei={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)}wi(e,t,"selected")},INPUT:function(e,t){wi(e,t,"checked"),wi(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 ki(){}function Si(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var Ai,xi=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=yi.createElement("html")).innerHTML=i}else n=bi(n);var o=r.getNodeKey||Si,a=r.onBeforeNodeAdded||ki,s=r.onNodeAdded||ki,l=r.onBeforeElUpdated||ki,u=r.onElUpdated||ki,c=r.onBeforeNodeDiscarded||ki,d=r.onNodeDiscarded||ki,h=r.onBeforeElChildrenUpdated||ki,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):(d(n),n.firstChild&&m(n,t)),n=n.nextSibling}}function g(e,t,n){!1!==c(e)&&(t&&t.removeChild(e),d(e),m(e,n))}function b(e){s(e);for(var t=e.firstChild;t;){var n=t.nextSibling,r=o(t);if(r){var i=p[r];i&&_i(t,i)?(t.parentNode.replaceChild(i,t),_(i,t)):b(t)}else b(t);t=n}}function _(t,n,r){var i=o(n);if(i&&delete p[i],!r){if(!1===l(t,n))return;if(e(t,n),u(t),!1===h(t,n))return}"TEXTAREA"!==t.nodeName?function(e,t){var n,r,i,s,l,u=t.firstChild,c=e.firstChild;e:for(;u;){for(s=u.nextSibling,n=o(u);c;){if(i=c.nextSibling,u.isSameNode&&u.isSameNode(c)){u=s,c=i;continue e}r=o(c);var d=c.nodeType,h=void 0;if(d===u.nodeType&&(1===d?(n?n!==r&&((l=p[n])?i===l?h=!1:(e.insertBefore(l,c),r?y(r):g(c,e,!0),c=l):h=!1):r&&(h=!1),(h=!1!==h&&_i(c,u))&&_(c,u)):3!==d&&8!=d||(h=!0,c.nodeValue!==u.nodeValue&&(c.nodeValue=u.nodeValue))),h){u=s,c=i;continue e}r?y(r):g(c,e,!0),c=i}if(n&&(l=p[n])&&_i(l,u))e.appendChild(l),_(l,u);else{var f=a(u);!1!==f&&(f&&(u=f),u.actualize&&(u=u.actualize(e.ownerDocument||yi)),e.appendChild(u),b(u))}u=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=Ei[e.nodeName];v&&v(e,t)}(t,n):Ei.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,E,k=t,S=k.nodeType,A=n.nodeType;if(!f)if(1===S)1===A?_i(t,n)||(d(t),k=function(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}(t,(w=n.nodeName,(E=n.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==E?yi.createElementNS(E,w):yi.createElement(w)))):k=n;else if(3===S||8===S){if(A===S)return k.nodeValue!==n.nodeValue&&(k.nodeValue=n.nodeValue),k;k=n}if(k===n)d(t);else{if(n.isSameNode&&n.isSameNode(k))return;if(_(k,n,f),v)for(var x=0,C=v.length;x<C;x++){var L=p[v[x]];L&&g(L,L.parentNode,!1)}}return!f&&k!==t&&t.parentNode&&(k.actualize&&(k=k.actualize(t.ownerDocument||yi)),t.parentNode.replaceChild(k,t)),k}}(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 l=e.attributes,u=l.length-1;u>=0;u--)r=(n=l[u]).name,(i=n.namespaceURI)?(r=n.localName||r,t.hasAttributeNS(i,r)||e.removeAttributeNS(i,r)):t.hasAttribute(r)||e.removeAttribute(r)}}),Ci=function(){return P(function e(t){var n=t.itemCount,r=t.itemSizeGetter,i=t.estimatedItemSize;x(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,l=s-r+a.size;switch(n){case"end":o=l;break;case"center":o=s-(r-a.size)/2;break;default:o=s}var u=this.getTotalSize();return Math.max(0,Math.min(u-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})}}])}(),Li=function(){return P(function e(t,n){var r=this;x(this,e),vi(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 Ci({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}),l=s.start,u=s.stop,c=document.createDocumentFragment(),d=l;d<=u;d++)c.appendChild(n(d));xi(this.content,c,{childrenOnly:!0,getNodeKey:function(e){return e.id}}),this.onRowsRendered({startIndex:l,stopIndex:u}),this.inner.style.height="".concat(this._sizeAndPositionManager.getTotalSize(),"px"),this.content.style.top="".concat(this.getRowOffset(l),"px")}}])}();function Pi(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())},l=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},u=function(e){r=!0,o=e},c=function(r){var i;if(!Ai||Ai===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,l=e.clientWidth-e.scrollWidth,u=0,c=e.clientHeight-e.scrollHeight,d=[r[0],r[1]];if(Math.abs(d[0]-(r[0]+o.pageX-a.pageX))<.6&&Math.abs(d[1]-(r[1]+o.pageY-a.pageY))<.6)return r;var h=E(r);h[0]+=o.pageX-a.pageX,h[1]+=o.pageY-a.pageY,h[0]>s&&(h[0]=s);h[0]<l&&(h[0]=l);h[1]>u&&(h[1]=u);h[1]<c&&(h[1]=c);return Ri(e,h),null==i||i(o,a),h}(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(),Ai=e,o=r)}},d=function(){Ai=null,Ti(e,r,n,t.scrollEnable(o),t.getPosition()),r=!1,t.needSimulatedScrolling&&a()},h=function(){Ai=null,Ti(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",l),e.addEventListener("touchstart",u),e.addEventListener("touchmove",c),e.addEventListener("touchcancel",d),e.addEventListener("touchend",h),function(){e.removeEventListener("scroll",l),e.removeEventListener("touchstart",u),e.removeEventListener("touchmove",c),e.removeEventListener("touchcancel",d),e.removeEventListener("touchend",h)}}function Ti(e,t,n,r,i,o,a){t&&r&&(null==o||o(i)),t&&n&&r&&(null==a||a())}function Ii(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 Oi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;pr(e,{transition:"transform ".concat(n/1e3,"s")}),setTimeout(function(){Ri(e,t)},16),setTimeout(function(){pr(e,{transition:""})},n+16)}function Ri(e,t){pr(e,{transform:"translate(".concat(t[0],"px,").concat(t[1],"px)")})}function Ni(e,t,n){var r=1e3/t,i=Date.now()-e>=r;return i&&(null==n||n()),i}function Di(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,l=r*e;return(l<i||n===i||s)&&(l=i),{newPageIndex:Math.abs(Math.round(l/e)),fromOffset:n,toOffset:l}}function Mi(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]&&Oi(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 l=n[0]-r[0],u=Date.now(),c=E(n);Oi(e,[r[0],0],a);var d=function(){var e=Date.now()-u;if(e>a)s(c[0]);else{window.requestAnimationFrame(d);var r=l*(e/a),o=[n[0]-r,n[1]];c=o,t(o,i)}};window.requestAnimationFrame(d)})}(e,t,n,r,o,i),r,a)}var Fi=function(e){function t(e,n,r){var i;return x(this,t),(i=An(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=Un.LIST,i.dom=document.createElement("div"),i.init(),i}return bn(t,e),P(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[nr.OVER_SCROLL_ENABLED]},set:function(e){this.props[nr.OVER_SCROLL_ENABLED]=e}},{key:"initialListSize",get:function(){var e;return null!==(e=this.props[nr.INITIAL_LIST_SIZE])&&void 0!==e?e:10},set:function(e){this.props[nr.INITIAL_LIST_SIZE]=e}},{key:"initialContentOffset",get:function(){return this.props[nr.INITIAL_CONTENT_OFFSET]},set:function(e){this.props[nr.INITIAL_CONTENT_OFFSET]=e}},{key:"preloadItemNumber",get:function(){return this.props[nr.OVER_SCROLL_ENABLED]},set:function(e){this.props[nr.PRELOAD_ITEM_NUMBER]=e}},{key:"rowShouldSticky",get:function(){return this.props[nr.ROW_SHOULD_STICKY]},set:function(e){this.props[nr.ROW_SHOULD_STICKY]=e}},{key:"scrollEventThrottle",get:function(){return this.props[nr.SCROLL_EVENT_THROTTLE]},set:function(e){this.props[nr.SCROLL_EVENT_THROTTLE]=e}},{key:"scrollEnabled",get:function(){return this.props[nr.SCROLL_ENABLED]},set:function(e){this.props[nr.SCROLL_ENABLED]=e,pr(this.dom,{overflow:this.scrollEnabled?"scroll":"hidden"})}},{key:"showScrollIndicator",get:function(){return this.props[nr.SHOW_SCROLL_INDICATOR]},set:function(e){this.props[nr.SHOW_SCROLL_INDICATOR]=e}},{key:"initialListReady",get:function(){return this.props[nr.INITIAL_LIST_READY]},set:function(e){this.props[nr.INITIAL_LIST_READY]=e}},{key:"onMomentumScrollBegin",value:function(e){this.props[nr.ON_MOMENTUM_SCROLL_BEGIN]&&this.dispatchEvent(nr.ON_MOMENTUM_SCROLL_BEGIN,e)}},{key:"onMomentumScrollEnd",value:function(e){this.props[nr.ON_MOMENTUM_SCROLL_END]&&this.dispatchEvent(nr.ON_MOMENTUM_SCROLL_END,e)}},{key:"onScroll",value:function(e){this.props[nr.ON_SCROLL]&&this.dispatchEvent(nr.ON_SCROLL,e)}},{key:"onScrollBeginDrag",value:function(e){this.props[nr.ON_SCROLL_BEGIN_DRAG]&&this.dispatchEvent(nr.ON_SCROLL_BEGIN_DRAG,e)}},{key:"onScrollEndDrag",value:function(e){this.props[nr.ON_SCROLL_END_DRAG]&&this.dispatchEvent(nr.ON_SCROLL_END_DRAG,e)}},{key:"onInitialListReady",value:function(){this.dispatchEvent(nr.INITIAL_LIST_READY,null)}},{key:"onAppear",value:function(e){this.props[nr.ON_APPEAR]&&this.dispatchEvent(nr.ON_APPEAR,e)}},{key:"onDisappear",value:function(e){this.props[nr.ON_DISAPPEAR]&&this.dispatchEvent(nr.ON_DISAPPEAR,e)}},{key:"onWillAppear",value:function(e){this.props[nr.ON_WILL_APPEAR]&&this.dispatchEvent(nr.ON_WILL_APPEAR,e)}},{key:"onWillDisappear",value:function(e){this.props[nr.ON_WILL_DISAPPEAR]&&this.dispatchEvent(nr.ON_WILL_DISAPPEAR,e)}},{key:"onLoadMore",value:function(){this.props[nr.ON_LOAD_MORE]&&this.dispatchEvent(nr.ON_LOAD_MORE,null),this.props[nr.ON_LOAD_MORE]&&this.dispatchEvent(nr.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=u(d().mark(function e(){var n,r,i,o,a,s,l;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_n(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=E(this.childData),o=wn(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,l=e.catch(2),o.e(l);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(){_n(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=u(d().mark(function e(t){var n,r,i=this;return d().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(){_n(t,"mounted",this,3)([])}},{key:"endBatch",value:function(){var e=this;setTimeout(function(){var t,n;e.dom&&(e.virtualList||(e.virtualList=new Li(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[nr.OVER_SCROLL_ENABLED]=!0,this.props[nr.INITIAL_LIST_SIZE]=10,this.props[nr.INITIAL_LIST_READY]=!0,this.props[nr.PRELOAD_ITEM_NUMBER]=1,this.props[nr.SCROLL_EVENT_THROTTLE]=30,this.props[nr.ON_LOAD_MORE]=!0,this.touchListenerRelease=Pi(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};pr(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;pr(this.stickyListViewItem.dom,{height:null===(n=this.stickyListViewItem)||void 0===n?void 0:n.height});var o,a=wn(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;pr(this.stickyListViewItem.dom,{height:null===(e=this.stickyListViewItem)||void 0===e?void 0:e.height});var n,r=wn(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.stickyContainer.removeChild(i),this.stickyListViewItem.dom.appendChild(i),pr(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}),l=r.filter(function(e){return-1===s.indexOf(e)}),u=i.filter(function(e){return-1===s.indexOf(e)});l.forEach(function(e){n.childVisibleChange(e,!1)}),u.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=Ii(t,e);return Math.abs(n[1])>5}},{key:"handleBeginDrag",value:function(){this.dom&&this.onScrollBeginDrag(this.buildScrollEvent())}},{key:"handleEndDrag",value:(n=u(d().mark(function e(){return d().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&&Ni(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;pr(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),pr(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),Vi=function(e){function t(e,n,r){var i;return x(this,t),(i=An(this,t,[e,n,r])).height=0,i.isDirty=!1,i.dirtyListener=null,i.tagName=Un.LIST_ITEM,i.dom=document.createElement("div"),i.onLayout=!0,i}return bn(t,e),P(t,[{key:"sticky",get:function(){return this.props[nr.STICKY]},set:function(e){this.props[nr.STICKY]=e}},{key:"addDirtyListener",value:function(e){this.dirtyListener=e}},{key:"mounted",value:function(){_n(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 Bi,Wi=200;!function(e){e[e.ENTRY=0]="ENTRY",e[e.LEAVE=1]="LEAVE"}(Bi||(Bi={}));var ji={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:{}}},Hi={fade:{animation:{opacity:0}},slide:{animation:{transform:"translate(0vw,100vh)"}},slide_fade:{animation:{transform:"translate(0vw,100vh)",opacity:0}},none:{animation:{},newState:{}}},Ui=function(e){function t(e,n,r){var i;return x(this,t),(i=An(this,t,[e,n,r])).tagName=Un.MODAL,i.dom=document.createElement("div"),i.props[nr.ANIMATED]=!0,i.onBackListener=function(){i.onOrientationChange(null)},i}return bn(t,e),P(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=Sn({},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[nr.ANIMATED]},set:function(e){this.props[nr.ANIMATED]=e}},{key:"animationType",get:function(){return this.props[nr.ANIMATION_TYPE]},set:function(e){this.props[nr.ANIMATION_TYPE]=e}},{key:"supportedOrientations",get:function(){return this.props[nr.SUPPORTED_ORIENTATIONS]},set:function(e){this.props[nr.SUPPORTED_ORIENTATIONS]=e}},{key:"immersionStatusBar",get:function(){return this.props[nr.IMMERSION_STATUS_BAR]},set:function(e){this.props[nr.IMMERSION_STATUS_BAR]=e}},{key:"darkStatusBarText",get:function(){return this.props[nr.DARK_STATUS_BAR_TEXT]},set:function(e){this.props[nr.DARK_STATUS_BAR_TEXT]=e}},{key:"transparent",get:function(){return this.props[nr.TRANSPARENT]},set:function(e){this.props[nr.TRANSPARENT]=e,pr(this.dom,{backgroundColor:this.props[nr.TRANSPARENT]?"#ffffff00":"#fff"})}},{key:"onShow",value:function(e){this.props[nr.ON_SHOW]&&this.dispatchEvent(nr.ON_SHOW,e)}},{key:"onOrientationChange",value:function(e){this.props[nr.ON_ORIENTATION_CHANGE]&&this.dispatchEvent(nr.ON_ORIENTATION_CHANGE,e)}},{key:"onRequestClose",value:function(e){this.props[nr.ON_ORIENTATION_CHANGE]&&this.dispatchEvent(nr.ON_REQUEST_CLOSE,e)}},{key:"beforeChildMount",value:(i=u(d().mark(function e(n,r){return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_n(t,"beforeChildMount",this,3)([n,r]);case 1:0===r&&n.dom&&(pr(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=u(d().mark(function e(n,r){return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_n(t,"beforeMount",this,3)([n,r]);case 1:this.entryAnimationAction=this.runAnimation(Bi.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;_n(t,"mounted",this,3)([]),null===(e=this.entryAnimationAction)||void 0===e||e.call(this),this.onShow()}},{key:"beforeRemove",value:(n=u(d().mark(function e(){var n=this;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_n(t,"beforeRemove",this,3)([]);case 1:if(this.leaveAnimationAction=this.runAnimation(Bi.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)},Wi)});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!==or.None&&this.dom){var i=e===Bi.ENTRY?t.buildModalEntryAnimation(this.animationType):t.buildModalLeaveAnimation(this.animationType),o=i.animation,a=i.newState;return pr(this.dom,Sn({zIndex:n},a)),function(){r.dom&&pr(r.dom,o)}}}}],[{key:"buildModalEntryAnimation",value:function(e){return ji[e]}},{key:"buildModalLeaveAnimation",value:function(e){return Hi[e]}}]);var n,r,i}(oi),zi=200,Gi="cubic-bezier(0.645, 0.045, 0.355, 1)",Yi=[{threshold:[0,50],damp:1},{threshold:[50,100],damp:.6},{threshold:[100,Number.MAX_SAFE_INTEGER],damp:.2}],qi=function(e){function t(e,n,r){var i;return x(this,t),(i=An(this,t,[e,n,r])).tagName=Un.REFRESH,i.dom=document.createElement("div"),i}return bn(t,e),P(t,[{key:"defaultStyle",value:function(){return{display:"flex",flexDirection:"column",overflow:" hidden",boxSizing:"border-box",position:"relative"}}},{key:"bounceTime",get:function(){return this.props[nr.BOUNCE_TIME]},set:function(e){this.props[nr.BOUNCE_TIME]=e}},{key:"onRefresh",value:function(){this.props[nr.ON_REFRESH]&&this.dispatchEvent(nr.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=u(d().mark(function e(n,r){return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_n(t,"beforeChildMount",this,3)([n,r]);case 1:n.tagName===Un.LIST&&(pr(n.dom,{position:"relative",zIndex:2}),this.pullRefresh=new Ki(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=u(d().mark(function e(){var n;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_n(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[nr.ON_REFRESH]?this.onRefresh():setTimeout(function(){var t;null===(t=e.pullRefresh)||void 0===t||t.finish()},500)}}]);var n,r}(oi),Qi=function(e){function t(e,n,r){var i;return x(this,t),(i=An(this,t,[e,n,r])).tagName=Un.REFRESH_ITEM,i.dom=document.createElement("div"),i}return bn(t,e),P(t)}(oi),Ki=function(){return P(function e(t,n,r){x(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;Ji([this.refreshContent],{transform:Xi(0,"".concat(null!==(e=-this.refreshContent.clientHeight)&&void 0!==e?e:0,"px"))})}},{key:"finish",value:function(){Ji([this.refreshContent],{transform:Xi(0,"".concat(this.endYOffset,"px")),transition:Zi("transform","".concat(.2),Gi)}),Ji([this.scrollContent],{transform:Xi(0,0),transition:Zi("transform","".concat(.2),Gi)})}},{key:"start",value:function(){var e=this;this.isPullFirst||this.handlePull(0),Ji([this.scrollContent,this.refreshContent],{transform:Xi(0,"".concat(this.overScrollThreshold,"px")),transition:Zi("transform","".concat(.2),Gi)}),this.moveLengthRecord=this.overScrollThreshold,this.refreshStatus=!0,setTimeout(function(){var t;null===(t=e.handleCallBack)||void 0===t||t.call(e)},zi)}},{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<Yi.length;n++){var r=Yi[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,pr(this.scrollContent,{transform:Xi(0,"".concat(n,"px"))}),!this.refreshContent||this.refreshContent.tagName!==Un.REFRESH_ITEM||void 0!==this.refreshContent.style.top&&""!==this.refreshContent.style.top||(this.refreshHeadHeight=this.refreshContent.clientHeight,pr(this.refreshContent,{top:-this.refreshContent.clientHeight})),pr(this.refreshContent,{transform:Xi(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,Ji([this.scrollContent,this.refreshContent],{transition:Zi("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(Ji([this.scrollContent,this.refreshContent],{transition:Zi("transform","".concat(.2),Gi)}),!this.refreshStatus)return this.finish(),void setTimeout(function(){n.moveLengthRecord=0,n.touchMove=0},zi);null===(e=this.handleCallBack)||void 0===e||e.call(this),Ji([this.scrollContent],{transform:Xi(0,"".concat(this.overScrollThreshold,"px"))}),Ji([this.refreshContent],{transform:Xi(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 Xi(e,t){return"translate(".concat(e,", ").concat(t,")")}function Zi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ease-out";return"".concat(e," ").concat(t,"s ").concat(n)}function Ji(e,t){e.forEach(function(e){pr(e,t)})}var $i=function(e){function t(e,n,r){var i;return x(this,t),(i=An(this,t,[e,n,r])).lastPosition=[0,0],i.lastTimestamp=0,i.scrollCaptureState=!1,i.tagName=Un.SCROLL_VIEW,i.dom=document.createElement("div"),i[nr.SCROLL_EVENT_THROTTLE]=30,i[nr.SCROLL_ENABLED]=!0,i}return bn(t,e),P(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=Sn({},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[nr.BOUNCES]},set:function(e){this.props[nr.BOUNCES]=e}},{key:"horizontal",get:function(){return this.props[nr.HORIZONTAL]},set:function(e){this.props[nr.HORIZONTAL]=e,pr(this.dom,this.scrollStyle())}},{key:"pagingEnabled",get:function(){return this.props[nr.PAGING_ENABLED]&&this.horizontal},set:function(e){this.props[nr.PAGING_ENABLED]=e,pr(this.dom,this.scrollStyle())}},{key:"scrollEventThrottle",get:function(){var e;return null!==(e=this.props[nr.SCROLL_EVENT_THROTTLE])&&void 0!==e?e:30},set:function(e){this.props[nr.SCROLL_EVENT_THROTTLE]=e}},{key:"scrollIndicatorInsets",get:function(){return this.props[nr.SCROLL_INDICATOR_INSETS]},set:function(e){this.props[nr.SCROLL_INDICATOR_INSETS]=e}},{key:"contentContainerStyle",get:function(){return this.props[nr.CONTENT_CONTAINER_STYLE]},set:function(e){var t,n;this.props[nr.CONTENT_CONTAINER_STYLE]=e,1===(null===(t=this.dom)||void 0===t?void 0:t.childNodes.length)&&pr(null===(n=this.dom)||void 0===n?void 0:n.childNodes[0],this.contentContainerStyle)}},{key:"scrollEnabled",get:function(){return this.props[nr.SCROLL_ENABLED]},set:function(e){this.props[nr.SCROLL_ENABLED]=e,pr(this.dom,this.scrollStyle())}},{key:"onMomentumScrollBegin",value:function(e){this.props[nr.ON_MOMENTUM_SCROLL_BEGIN]&&this.dispatchEvent(nr.ON_MOMENTUM_SCROLL_BEGIN,e)}},{key:"onMomentumScrollEnd",value:function(e){this.props[nr.ON_MOMENTUM_SCROLL_END]&&this.dispatchEvent(nr.ON_MOMENTUM_SCROLL_END,e)}},{key:"onScroll",value:function(e){this.props[nr.ON_SCROLL]&&this.dispatchEvent(nr.ON_SCROLL,e)}},{key:"onScrollBeginDrag",value:function(e){this.props[nr.ON_SCROLL_BEGIN_DRAG]&&this.dispatchEvent(nr.ON_SCROLL_BEGIN_DRAG,e)}},{key:"onScrollEndDrag",value:function(e){this.props[nr.ON_SCROLL_END_DRAG]&&this.dispatchEvent(nr.ON_SCROLL_END_DRAG,e)}},{key:"beforeMount",value:(o=u(d().mark(function e(n,r){return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_n(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=u(d().mark(function e(t,n){return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:0===n&&this.contentContainerStyle&&pr(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=u(d().mark(function e(){var n;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_n(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=Pi(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];Mi(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=Ii(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=u(d().mark(function e(t){var n,r,i,o,a=this;return d().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,Mi(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 Di(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&&Ni(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),eo=function(e){function t(e,n,r){var i;return x(this,t),(i=An(this,t,[e,n,r])).tagName=Un.TEXT_INPUT,i.dom=document.createElement("input"),i.init(),i}return bn(t,e),P(t,[{key:"defaultStyle",value:function(){return Sn(Sn({},_n(t,"defaultStyle",this,3)([])),{},{outline:"none",fontFamily:""})}},{key:"updateProps",value:function(e,t){var n;this.firstUpdateStyle&&t(this,{style:this.defaultStyle()});var r=Sn({},e);(null===(n=null==e?void 0:e.style)||void 0===n?void 0:n.placeholderTextColor)&&(r.placeholderTextColor=mr(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[nr.DEFAULT_VALUE])&&void 0!==e?e:""},set:function(e){this.props[nr.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[nr.EDITABLE]},set:function(e){var t,n;this.props[nr.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[nr.KEY_BOARD_TYPE]},set:function(e){var t,n;switch(this.props[nr.KEY_BOARD_TYPE]=e,e){case rr.numeric:n="number";break;case rr.password:n="password";break;case rr.email:n="email";break;case rr.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[nr.MAX_LENGTH]},set:function(e){var t;this.props[nr.MAX_LENGTH]=e,null===(t=this.dom)||void 0===t||t.setAttribute("maxlength",String(e))}},{key:"multiline",get:function(){return this.props[nr.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[nr.MULTILINE]=e,this.changeToDomMode(e))}},{key:"numberOfLines",get:function(){return this.props[nr.NUMBER_OF_LINES]},set:function(e){var t;this.props[nr.NUMBER_OF_LINES]=e,null===(t=this.dom)||void 0===t||t.setAttribute("rows",String(e))}},{key:"placeholder",get:function(){return this.props[nr.PLACEHOLDER]},set:function(e){var t;this.props[nr.PLACEHOLDER]=e,null===(t=this.dom)||void 0===t||t.setAttribute("placeholder",e)}},{key:"placeholderTextColor",get:function(){return this.props[nr.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[nr.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[nr.RETURN_KEY_TYPE]},set:function(e){var t;this.props[nr.RETURN_KEY_TYPE]=e,null===(t=this.dom)||void 0===t||t.setAttribute("enterkeyhint",e)}},{key:"value",get:function(){return this.props[nr.VALUE]},set:function(e){var t;this.props[nr.VALUE]=e,null===(t=this.dom)||void 0===t||t.setAttribute("value",e)}},{key:"autoFocus",get:function(){return this.props[nr.AUTO_FOCUS]},set:function(e){var t,n;this.props[nr.AUTO_FOCUS]=e,this.props[nr.AUTO_FOCUS]&&(null===(t=this.dom)||void 0===t||t.setAttribute("autofocus","true")),this.props[nr.AUTO_FOCUS]&&(null===(n=this.dom)||void 0===n||n.removeAttribute("autofocus"))}},{key:"onBlur",value:function(e){this.props[nr.ON_BLUR]&&this.dispatchEvent(nr.ON_BLUR,e)}},{key:"onChangeText",value:function(e){this.props[nr.ON_CHANGE_TEXT]&&this.dispatchEvent(nr.ON_CHANGE_TEXT,e)}},{key:"onEndEditing",value:function(e){this.props[nr.ON_END_EDITING]&&this.dispatchEvent(nr.ON_END_EDITING,e)}},{key:"onSelectionChange",value:function(e){this.props[nr.ON_SELECTION_CHANGE]&&this.dispatchEvent(nr.ON_SELECTION_CHANGE,e)}},{key:"blurTextInput",value:function(){var e;null===(e=this.dom)||void 0===e||e.blur(),this.props[nr.IS_FOCUSED]=!1}},{key:"focusTextInput",value:function(){var e;null===(e=this.dom)||void 0===e||e.focus(),this.props[nr.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[nr.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[nr.IS_FOCUSED]=!0}},{key:"isFocused",value:function(e){e.resolve({value:Boolean(this.props[nr.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=u(d().mark(function e(t){var n,r,i;return d().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 to=function(e){function t(e,n,r){var i;return x(this,t),(i=An(this,t,[e,n,r])).tagName=Un.VIEW,i.dom=document.createElement("div"),i}return bn(t,e),P(t)}(oi),no=function(e){function t(e,n,r){var i;return x(this,t),(i=An(this,t,[e,n,r])).pageIndex=0,i.scrollCaptureState=!1,i.lastPosition=[0,0],i.children=[],i.swipeRecognize=null,i.tagName=Un.VIEW_PAGER,i.dom=document.createElement("div"),i.init(),i}return bn(t,e),P(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[nr.INITIAL_PAGE]},set:function(e){this.props[nr.INITIAL_PAGE]=e}},{key:"scrollEnabled",get:function(){return this.props[nr.SCROLL_ENABLED]},set:function(e){this.props[nr.SCROLL_ENABLED]=e}},{key:"onPageSelected",value:function(e){this.props[nr.ON_PAGE_SELECTED]&&this.dispatchEvent(nr.ON_PAGE_SELECTED,e)}},{key:"onPageScroll",value:function(e){this.props[nr.ON_PAGE_SCROLL]&&this.dispatchEvent(nr.ON_PAGE_SCROLL,e)}},{key:"onPageScrollStateChanged",value:function(e){this.props[nr.ON_PAGE_SCROLL_STATE_CHANGED]&&this.dispatchEvent(nr.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=u(d().mark(function e(n,r){return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_n(t,"beforeChildMount",this,3)([n,r]);case 1:n instanceof io&&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){_n(t,"beforeChildRemove",this,3)([e]),e instanceof io&&(this.children=this.children.filter(function(t){return t!==e}))}},{key:"beforeRemove",value:(i=u(d().mark(function e(){var n;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_n(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[nr.INITIAL_PAGE]=0,this.props[nr.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=Pi(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=Ii(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(ro(sr.DRAG))}},{key:"handleEndDrag",value:(r=u(d().mark(function e(t){var n,r,i,o,a,s,l=this;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.scrollCaptureState=!1,this.onPageScrollStateChanged(ro(sr.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=Di(this.dom.clientWidth,this.dom.scrollWidth,t[0]),i=r.toOffset,o=r.newPageIndex,a=[i,t[1]],s=function(e,t){l.updatePositionInfo(e,t),l.handleScroll()},e.next=2,Mi(this.dom,s,t,a,200,this.pageIndex,o);case 2:this.onPageSelected({position:o}),this.onPageScrollStateChanged(ro(sr.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=u(d().mark(function e(t,n){var r,i,o,a,s=this;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.dom.clientWidth,i=E(this.lastPosition),o=[t*r*-1,this.lastPosition[1]],this.onPageScrollStateChanged(ro(sr.SETTL)),a=function(e,t){s.updatePositionInfo(e,t),s.handleScroll()},e.next=1,Mi(this.dom,a,i,o,n?200:0,this.pageIndex,t);case 1:this.onPageSelected({position:t}),this.onPageScrollStateChanged(ro(sr.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 ro(e){return{pageScrollState:e}}var io=function(e){function t(e,n,r){var i;return x(this,t),(i=An(this,t,[e,n,r])).tagName=Un.VIEW_PAGER_ITEM,i.dom=document.createElement("div"),i}return bn(t,e),P(t,[{key:"defaultStyle",value:function(){return{flexShrink:0,display:"flex",boxSizing:"border-box",position:"static"}}},{key:"updateProps",value:function(e,t){var n=Sn({},e);e.style&&"absolute"===e.style.position&&delete n.style.position,Object.assign(n.style,this.defaultStyle()),t(this,n)}},{key:"beforeMount",value:(n=u(d().mark(function e(n,r){return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_n(t,"beforeMount",this,3)([n,r]);case 1:pr(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),oo=function(e){function t(e,n,r){var i;return x(this,t),(i=An(this,t,[e,n,r])).isMounted=!1,i.dom=document.createElement("iframe"),i.tagName=Un.WEB_VIEW,i.dom.onload=i.onLoadEnd.bind(i),i}return bn(t,e),P(t,[{key:"source",get:function(){return this.props[nr.SOURCE]},set:function(e){var t;this.props[nr.SOURCE]=e,this.isMounted&&(this.onLoadStart(this.props[nr.SOURCE]),this.dom.src=null!==(t=e.uri)&&void 0!==t?t:"",this.onLoad(this.props[nr.SOURCE]))}},{key:"userAgent",get:function(){return this.props[nr.USER_AGENT]},set:function(e){this.props[nr.USER_AGENT]=e}},{key:"method",get:function(){return this.props[nr.METHOD]},set:function(e){this.props[nr.METHOD]=e}},{key:"onLoadStart",value:function(e){this.props[nr.ON_LOAD_START]&&this.dispatchEvent(nr.ON_LOAD_START,e)}},{key:"onLoad",value:function(e){this.props[nr.ON_LOAD]&&this.dispatchEvent(nr.ON_LOAD,e)}},{key:"onLoadEnd",value:function(){this.props[nr.ON_LOAD_END]&&this.dispatchEvent(nr.ON_LOAD_END,this.props[nr.SOURCE])}},{key:"beforeMount",value:(n=u(d().mark(function e(n,r){var i;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,_n(t,"beforeMount",this,3)([n,r]);case 1:this.props[nr.SOURCE].uri&&(this.dom.src=null!==(i=this.props[nr.SOURCE].uri)&&void 0!==i?i:""),this.dom.src&&this.onLoadStart(this.props[nr.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[nr.SOURCE])}},{key:"style",get:function(){return this.props[nr.STYLE]},set:function(e){this.props[nr.STYLE]=e}}]);var n}(oi),ao={head:{"text-overflow":"ellipsis",direction:"rtl"},clip:{"text-overflow":"clip"},middle:{"text-overflow":"ellipsis"},tail:{"text-overflow":"ellipsis"}},so=function(e){function t(e,n,r){var i;return x(this,t),(i=An(this,t,[e,n,r])).tagName=Un.TEXT,i.dom=document.createElement("span"),i.props[nr.ELLIPSIZE_MODE]=er.TAIL,i}return bn(t,e),P(t,[{key:"defaultStyle",value:function(){return Sn({boxSizing:"border-box",zIndex:0},ao[this.ellipsizeMode])}},{key:"numberOfLines",get:function(){return this.props[nr.NUMBER_OF_LINES]},set:function(e){this.props[nr.NUMBER_OF_LINES]=e,1===e?this.dom&&pr(this.dom,{"white-space":"nowrap","word-break":"keep-all",display:"initial","-webkit-box-orient":"","-webkit-line-clamp":"",overflow:""}):this.dom&&pr(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[nr.ELLIPSIZE_MODE]},set:function(e){this.props[nr.ELLIPSIZE_MODE]=e,this.dom&&e&&pr(this.dom,Sn(Sn({},ao[e]),{},{overflow:"hidden","white-space":"nowrap"}))}},{key:"text",get:function(){return this.props[nr.VALUE]},set:function(e){if(this.props[nr.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),lo=Object.freeze({__proto__:null,Image:li,ListView:Fi,Modal:Ui,RefreshWrapper:qi,ScrollView:$i,TextInput:eo,View:to,ViewPager:no,WebView:oo,Text:so,ListViewItem:Vi,ViewPagerItem:io,RefreshWrapperItemView:Qi,HippyWebView:oi});Hippy.web={},Hippy.web.Engine=Tr;var uo,co=function(e){function t(){var e;return x(this,t),(e=An(this,t,arguments)).name="AnimationModule",e.animationPool={},e.animationSetPool={},e}return bn(t,e),P(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 vo(this.context,e,n,t)))}},{key:"createAnimationSet",value:function(e,t){this.animationSetPool[e]||(this.animationSetPool[e]=new yo(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):Ar("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()):Ar("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()):Ar("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()):Ar("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()):Ar("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}}])}(Rr);!function(e){e.START="onHippyAnimationStart",e.END="onHippyAnimationEnd",e.CANCEL="onHippyAnimationCancel",e.REPEAT="onHippyAnimationRepeat"}(uo||(uo={}));var ho={perspective:1,rotate:1,rotateX:1,rotateY:1,rotateZ:1,scale:1,scaleX:1,scaleY:1,translateX:1,translateY:1,skewX:1};function fo(e){switch(e){case"animationstart":return uo.START;case"animationend":return uo.END;case"animationrepeat":return uo.REPEAT;case"animationcancel":return uo.CANCEL;default:return e}}var po=function(){return P(function e(){x(this,e),this.events={}},[{key:"addAnimationEventListener",value:function(e,t){var n=fo(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=fo(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)})}}])}(),vo=function(e){function t(e,n,r,i){var o;return x(this,t),(o=An(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 bn(t,e),P(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];ho[t]&&(this.refCssProperty=t)}else this.refCssProperty=e}},{key:"useForSetProperty",get:function(){return this.refCssProperty?ho[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=bo(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=bo(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(mo(t),"}\n to {").concat(mo(n),"}\n }"));return{keyFrame:go(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=go(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(go(this.animationName).cssRule){var t=bo(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);pr(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(mr(e)):"".concat(e).concat(t)}},{key:"handleAnimationStart",value:function(e){e.animationName===this.animationName&&this.dispatchEvent(uo.START),this.beginListener.forEach(function(e){e()})}},{key:"handleAnimationEnd",value:function(e){e.animationName===this.animationName&&this.dispatchEvent(uo.END),this.changeAnimationStatus("paused"),this.endListener.forEach(function(e){e()})}}])}(po),yo=function(e){function t(e,n,r){var i;return x(this,t),(i=An(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 bn(t,e),P(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(uo.START)}},{key:"handleAnimationEnd",value:function(){this.dispatchEvent(uo.END)}}])}(po);function mo(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 go(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 bo(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 _o=function(e){function t(){var e;return x(this,t),(e=An(this,t,arguments)).name="ClipboardModule",e}return bn(t,e),P(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(){Ar("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(){Ar("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){Ar("set clipboard failed")}finally{document.body.removeChild(n)}}}}])}(Rr),wo=function(e){function t(){var e;return x(this,t),(e=An(this,t,arguments)).name="DeviceEventModule",e.listen=!1,e.moduleListener=[],e}return bn(t,e),P(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)===Eo?-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))}}])}(Rr),Eo="puppet";var ko=function(e){function t(){var e;return x(this,t),(e=An(this,t,arguments)).name="ImageLoaderModule",e}return bn(t,e),P(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(){}}])}(Rr),So=function(e){function t(e){var n;return x(this,t),(n=An(this,t,[e])).name="NetInfo",n.handleOnlineChange=n.handleOnlineChange.bind(n),n}return bn(t,e),P(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})}}])}(Rr),Ao=function(e){function t(){var e;return x(this,t),(e=An(this,t,arguments)).name="network",e}return bn(t,e),P(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=u(d().mark(function e(n){var r,i,o,a,s,l;return d().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=wn(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(l={statusCode:n.status,statusLine:n.statusText,respBody:r,respHeaders:i}).statusCode=n.status,t.resolve(l),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(){}}])}(Rr),xo=function(e){function t(){var e;return x(this,t),(e=An(this,t,arguments)).moduleName="StorageModule",e.STORE_PRX_KEY="hippy-storage-",e}return bn(t,e),P(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||(Ar("not support localStorage"),!1)}}])}(Rr),Co=!1,Lo=function(e){function t(e){var n;return x(this,t),(n=An(this,t,[e])).name="UIManagerModule",n.viewDictionary={},n.afterCreateAction=[],n.mode="sequential",n}return bn(t,e),P(t,[{key:"init",value:function(){var e;!Co&&((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)),Co=!0}},{key:"createNode",value:(l=u(d().mark(function e(t,n){var r,i,o,a,l,u,c,h,f,p,v,y,m,g,b;return d().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),l=a[0],u=l.id,c=l.pId,h=l.index,f=l.props,p=l.name){e.next=2;break}return Ar("create component failed, tagName is ".concat(p)),e.abrupt("continue",8);case 2:if(v=Po(this.context,p,u,c)){e.next=3;break}return Ar("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,h);case 4:e.next=6;break;case 5:e.prev=5,e.catch(3),xr();case 6:if(!i.has(u)){e.next=7;break}return e.abrupt("continue",8);case 7:p!==Un.LIST&&p!==Un.VIEW_PAGER||i.add(u),(null===(r=this.findViewById(c))||void 0===r?void 0:r.tagName)===Un.LIST&&i.add(c);case 8:o++,e.next=1;break;case 9:y=wn(i);try{for(y.s();!(m=y.n()).done;)g=m.value,null==(b=this.findViewById(g))||b.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 l.apply(this,arguments)})},{key:"deleteNode",value:(a=u(d().mark(function e(t,n){var r,i,o,a;return d().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=u(d().mark(function e(t,n){var r,i,o,a;return d().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,E(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,l=o.y,u=o.width,c=o.height,d=o.top,h=o.left,f=o.right,p=o.bottom;t.resolve({statusBarHeight:0,x:a,y:l,width:u,height:c,top:d,left:h,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=u(d().mark(function e(t,n){var r,i,o,a,s,l,u,c,h,f,p,v,y,m;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(l=this.findViewById(n),u=[],c=l.dom,h=document.createTreeWalker(l.dom,NodeFilter.SHOW_ALL,null);c;)c.id&&u.push(c.id),c=h.nextNode();f=wn(u.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!==l){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==l?void 0:l.dom)&&t.dom&&!t.removeChild&&(null===(s=t.dom)||void 0===s||s.removeChild(l.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,l=this;e.dom||"component update props process failed ,component's dom must be exited ".concat(null!==(n=e.tagName)&&void 0!==n?n:"");var u=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:{}),d=s(c,2),h=d[0],f=d[1];if(t.style&&f>0){pr(e.dom,h,function(t,n){l.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)||pr(n.dom,{position:"relative"}),"absolute"!==e.position||e.width||e.height||e.overflow||pr(t.dom,{overflow:"visible"})}(h,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)}(h,e,p)}for(var y=0,m=u;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=u(d().mark(function e(t,n,r){var i,o,a,s,l,u,c,h,f,p,v,y,m;return d().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 Ar("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===(l=null===(s=y.dom)||void 0===s?void 0:s.childNodes)||void 0===l?void 0:l.length)&&(m=null!==(h=null===(c=null===(u=y.dom)||void 0===u?void 0:u.childNodes)||void 0===c?void 0:c.length)&&void 0!==h?h: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=u(d().mark(function e(t){var n,r,i,o,a,s;return d().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)}),pr(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=wn(t);try{for(s.s();!(i=s.n()).done;)for(var l=i.value,u=0,c=Object.keys(l);u<c.length;u++){var d=c[u];l[d].animationId?r.linkInitAnimation2Element(l[d].animationId,n,d):a+="".concat(d,"(").concat(l[d]).concat(isNaN(l[d])||d.startsWith("scale")?"":"px",") ")}}catch(e){s.e(e)}finally{s.f()}a&&(o.transform=a,pr(n.dom,o))}}}]);var n,r,i,o,a,l}(Rr);function Po(e,t,n,r){if(e.engine.components[t])return new e.engine.components[t](e,n,r)}var To=function(e){function t(){var e;return x(this,t),(e=An(this,t,arguments)).name="websocket",e.webSocketConnections={},e.connections=0,e}return bn(t,e),P(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 Io(o,e.url,i),this.webSocketConnections[o].connect(this.dispatchEvent.bind(this)),t.resolve({code:0,id:o})}},{key:"send",value:function(e){e&&e.id&&this.webSocketConnections[e.id]&&this.webSocketConnections[e.id].disconnected&&(!e.data||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",Sn(Sn({},n),{},{id:e,type:t}))}},{key:"initialize",value:function(){}},{key:"destroy",value:function(){}}])}(Rr),Io=function(){return P(function e(t,n,r){x(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)}}])}(),Oo={AnimationModule:co,ClipboardModule:_o,DeviceEventModule:wo,ImageLoadModule:ko,NetInfoModule:So,NetworkModule:Ao,StorageModule:xo,UIManagerModule:Lo,WebSocketModule:To};function Ro(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 No(e,t,n){return t=yn(t),vn(e,Do()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function Do(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Do=function(){return!!e})()}function Mo(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 Fo(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)?Fo(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 Fo(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 Vo(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=Mo(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}}Tr.coreModules=Oo,Tr.coreComponents=lo;var Bo=function(e){function t(e,n,r){var i;return x(this,t),(i=No(this,t,[e,n,r]))._originalDisplay=void 0,i}return bn(t,e),P(t,[{key:"dispatchEvent",value:function(e,t){var n=Vo(this,e),r=n.listener,i=n.matchedEventName;if(console.log("[QtBaseComponent] dispatchEvent called, eventName:",e,"matchedEventName:",i,"id:",this.id,"hasListener:",!!r),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?Ro(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ro(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}console.log("[QtBaseComponent] no listener in events, calling sendUIComponentEvent");var s=fe(this.id,e,t||{});return console.log("[QtBaseComponent] sendUIComponentEvent result:",s),s}},{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,l;this._handleCommonProperty(e,n)||(i=t,o="updateProperty",a=this,l=mn(yn(1&(s=3)?i.prototype:i),o,a),2&s&&"function"==typeof l?function(e){return l.apply(a,e)}:l)([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;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 Wo(e,t,n){return t=yn(t),vn(e,jo()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function jo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jo=function(){return!!e})()}function Ho(e,t,n,r){var i=mn(yn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Uo=function(e){function t(e,n,r){var i;return x(this,t),(i=Wo(this,t,[e,n,r])).tagName="div",i.dom=document.createElement("div"),i._currentSid=null,i._bindDOMEvents(),i}return bn(t,e),P(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&&g(this._currentSid),this._currentSid=n,void(n?(m(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),Ho(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){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,ht.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,l=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!=l&&(this.dom.style.height="number"==typeof l?"".concat(l,"px"):l),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):console.warn("[QtView] TVFocusManager not available for requestFocus")}},{key:"requestFocusDirectly",value:function(e){var t=n.g.__TV_FOCUS_MANAGER__;t?null!=e?t.moveFocusFromElement(this.dom,e):t.focusElement(this.dom):console.warn("[QtView] TVFocusManager not available for requestFocusDirectly")}},{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))}}else console.warn("[QtView] TVFocusManager not available for requestChildFocus")}},{key:"clearFocus",value:function(){var e=n.g.__TV_FOCUS_MANAGER__;e?e.clearFocusFromElement(this.dom):console.warn("[QtView] TVFocusManager not available for clearFocus")}},{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,console.log("[QtView] changeAlpha:",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,")"),console.log("[QtView] setScale:",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"),console.log("[QtView] setPosition:",n,r)}},{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),console.log("[QtView] updateLayout:",e))}},{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,console.log("[QtView] setBackGroundColor:",t)}},{key:"setBackgroundImage",value:function(e){if(console.log("[QtView] setBackgroundImage called with:",e,"type:",typeof e),e){var t=(0,ht.pb)(e);this.dom.style.backgroundImage="url(".concat(t,")"),console.log("[QtView] Set backgroundImage to:",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),console.log("[QtView] setSize:",e,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)"),console.log("[QtView] setTranslation:",n,r)}},{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),console.log("[QtView] setInitFocus:",e,r)}else console.warn("[QtView] TVFocusManager not available for setInitFocus")}},{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=Ho(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&&(g(this._currentSid),this._currentSid=null)}},{key:"destroy",value:function(){var e;null===(e=this.beforeUnmount)||void 0===e||e.call(this)}}])}(Bo);function zo(e,t){var n;return n=function(e){function n(e,r,i){var o;return x(this,n),(o=Wo(this,n,[e,r,i])).dom&&(o.dom.setAttribute("data-component-name",t),o._originalComponentName=t),o}return bn(n,e),P(n)}(e),(0,_.A)(n,"componentName",t),n}function Go(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 Yo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Go(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Go(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qo(e,t,n){return t=yn(t),vn(e,Qo()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function Qo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qo=function(){return!!e})()}function Ko(e,t,n,r){var i=mn(yn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Xo=function(e){function t(e,n,r){var i;return x(this,t),(i=qo(this,t,[e,n,r])).dom.setAttribute("data-component-name","ESPageRootView"),i._originalComponentName="ESPageRootView",i}return bn(t,e),P(t,[{key:"defaultStyle",value:function(){return Yo(Yo({},Ko(t,"defaultStyle",this,1)?Ko(t,"defaultStyle",this,3)([]):{}),{},{backgroundColor:"#000000"})}}])}(Uo);function Zo(e,t,n){return t=yn(t),vn(e,Jo()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function Jo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jo=function(){return!!e})()}(0,_.A)(Xo,"componentName","ESPageRootView"),window.__HIPPY_COMPONENT_REGISTRY__=window.__HIPPY_COMPONENT_REGISTRY__||new Map;var $o=function(e){function t(e,n,r){var i;return x(this,t),(i=Zo(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 bn(t,e),P(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("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)?(console.log("[QtText] Setting showOnState (array):",n,"->",JSON.stringify(n)),this.dom.setAttribute(e,JSON.stringify(n))):(console.log("[QtText] Setting attribute:",e,"=",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 l="data-"+e.replace(/([A-Z])/g,"-$1").toLowerCase();this.dom.setAttribute(l,String(n))}else{var u="data-"+e.replace(/([A-Z])/g,"-$1").toLowerCase();this.dom.removeAttribute(u)}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=mn(yn(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.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){console.log("[QtText] _updateTextNode:",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){console.warn("[QtText] rich text render failed, fallback to plain text",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:"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){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}}])}(Bo);function ea(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 ta(e,t,n){return t=yn(t),vn(e,na()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function na(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(na=function(){return!!e})()}function ra(e,t,n,r){var i=mn(yn(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 x(this,t),(i=ta(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._layoutObserver=null,i._boundLoadHandler=null,i._boundErrorHandler=null,i._bindImageEvents(),y(n,i),i}return bn(t,e),P(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?ea(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ea(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},n);delete r.resizeMode,Object.keys(r).length>0&&ra(t,"updateProperty",this,3)([e,r])}else ra(t,"updateProperty",this,3)([e,n]);break;default:"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n),ra(t,"updateProperty",this,3)([e,n])}}},{key:"_setSrc",value:function(e){if(console.log("[QtImage] _setSrc called with:",e,"type:",typeof e),!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,ht.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(),console.log("[QtImage] Set dom.src to:",this.dom.src)}},{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};fe(this.id,"onLayout",{layout:r})||this._dispatchCompatibleEvent(["layout","onLayout"],r)}}else console.warn("[QtImage] _emitLayout called but dom is null, component may be destroyed")}},{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};fe(this.id,"onLoadEnd",n)||this._dispatchCompatibleEvent(["loadEnd","loadend","onLoadEnd"],n)}else console.warn("[QtImage] _emitLoadEnd called but dom is null, component may be destroyed")}},{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=ra(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=ra(t,"destroy",this,3))||void 0===e||e([])}}])}(Bo);function oa(e,t,n){return t=yn(t),vn(e,aa()?Reflect.construct(t,n||[],yn(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})()}window.__HIPPY_COMPONENT_REGISTRY__=window.__HIPPY_COMPONENT_REGISTRY__||new Map;var sa=function(e){function t(e,n,r){var i;return x(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 ",y(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 bn(t,e),P(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,l=this;switch(e){case"list":if(console.log("[QtFlexView] updateProperty list:",n,"isArray:",Array.isArray(n)),this._pendingListValue=n,Array.isArray(n))this.dom.removeAttribute("list");else if("string"==typeof n){var u=e;this.dom.setAttribute(u,n)}Array.isArray(n)?this.setListData(n):requestAnimationFrame(function(){console.log("[QtFlexView] Checking dom._qtListData:",l.dom._qtListData),l.dom._qtListData&&Array.isArray(l.dom._qtListData)&&l.setListData(l.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=mn(yn(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;console.log("[QtFlexView] _processTemplateNode:",e.tagName,e.getAttribute("data-component-name"));var 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=la(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",console.log("[QtFlexView] Template captured, total:",t._templateChildren.length)}};if(null===la(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=la(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===la(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(console.log("[QtFlexView] setListData:",e,"isArray:",Array.isArray(e)),Array.isArray(e)&&1===e.length&&Array.isArray(e[0])&&(e=e[0]),Array.isArray(e)){this._listData=e,console.log("[QtFlexView] _listData set:",this._listData.length,"items, templates:",this._templateChildren.length),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)}else console.log("[QtFlexView] setListData: not array, returning")}},{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__,l=s&&null!=o?s.get(o):null;if(!a&&l&&l.dom&&(a=l),a||(a=this._templateChildren.find(function(e){return null===e.type})),!a&&s&&s.size>0){var u=s.values().next().value;u&&u.dom&&(a=u)}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",ua(c),a.component&&a.component.props&&this._bindComponentPropsToNode(c,a.component.props,e),this._bindDataToNode(c,e),ca(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,Wt.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 l="number"==typeof a?a+"px":a;e.style.fontSize=l}"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,Wt.bindTemplateDataToNode)(e,t)}},{key:"_applyFlexStyleToElement",value:function(e,t){if(t&&"object"==typeof 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,l=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!=l&&l>0&&(this.dom.style.height="number"==typeof l?"".concat(l,"px"):l),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){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=""}}])}(Bo);function la(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 ua(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 ca(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 da(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=la(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=la(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 l=window.__QT_SHARED_TEMPLATES__;if(l&&l.size>0){var u=Array.from(l.values()).filter(function(e){return e&&e.dom});u.length>0&&u.forEach(function(e){e.dom.setAttribute("data-template","true"),e.dom.style.display="none";var t=la(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 l,u,c=a.dom.cloneNode(!0);c.removeAttribute("data-template"),c.removeAttribute("id"),c.style.display="",c.style.position="relative",ua(c),l=c,u=e,(0,Wt.bindTemplateDataToNode)(l,u),ca(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,Wt.u6)(n)}))}}}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}var fa={enabled:!1,duration:300},pa=new Set;function va(){return function(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,_.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}({},fa)}var ya=function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"setFadeEnabled",value:function(e){fa.enabled=!0===e,console.log("[FastListModule] setFadeEnabled:",fa.enabled),pa.forEach(function(e){e&&"function"==typeof e.updateFadeConfig&&e.updateFadeConfig(fa)});for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return T(n,null)}},{key:"setFadeDuration",value:function(e){fa.duration="number"==typeof e?e:300,console.log("[FastListModule] setFadeDuration:",fa.duration),pa.forEach(function(e){e&&"function"==typeof e.updateFadeConfig&&e.updateFadeConfig(fa)});for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return T(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 T(t,fa)}},{key:"init",value:(e=u(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 ya;function ma(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 ga(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)?ga(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 ga(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 ba(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?ba(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ba(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wa(e,t,n){return t=yn(t),vn(e,Ea()?Reflect.construct(t,n||[],yn(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})()}function ka(e,t,n,r){var i=mn(yn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Sa=function(e){function t(e,n,r){var i,o;return x(this,t),(i=wa(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=va(),i._focusedIndex=-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,y(n,i),o=i,pa.add(o),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 bn(t,e),P(t,[{key:"updateFadeConfig",value:function(e){this._fadeConfig=_a({},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;default:"string"==typeof n&&n.startsWith("${")&&this.dom.setAttribute(e,n),ka(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)&&console.log("[QtFastListView] register singleton template",{type:i,id:e.id,tagName:e.tagName}),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 l={dom:e.dom,tagName:e.tagName,id:e.id,component:e,type:a};this._templateChildren.push(l),this._shouldDebugTailTemplate(a)&&console.log("[QtFastListView] register template",{type:a,id:e.id,tagName:e.tagName}),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=u(c.mark(function e(n,r){var i,o,a,s,l,u,d,h,f,p;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("[QtFastListView] beforeChildMount called, child:",null==n||null===(i=n.dom)||void 0===i||null===(o=i.getAttribute)||void 0===o?void 0:o.call(i,"data-component-name"),"type:",null==n||null===(a=n.dom)||void 0===a||null===(s=a.getAttribute)||void 0===s?void 0:s.call(a,"type")),!n||!n.dom){e.next=4;break}if(!n.pId||n.pId===this.id){e.next=3;break}if(!(l=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(!l.component||!l.component.beforeChildMount){e.next=1;break}return e.next=1,l.component.beforeChildMount(n,r);case 1:return e.next=2,ka(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})||(u=null,n.props&&void 0!==n.props.type?u=n.props.type:n.dom.hasAttribute("type")&&(d=n.dom.getAttribute("type"),u=null!==d?isNaN(Number(d))?d:Number(d):null),this._singletonTemplates.push({dom:n.dom,tagName:n.tagName,id:n.id,component:n,type:u}),this._shouldDebugTailTemplate(u)&&console.log("[QtFastListView] beforeChildMount singleton template",{type:u,id:n.id,tagName:n.tagName}),n.dom.setAttribute("data-singleton","true")),n.dom.style.display="none"):(this._templateChildren.some(function(e){return e.dom===n.dom})||(h=null,n.props&&void 0!==n.props.type?h=n.props.type:n.dom.hasAttribute("type")&&(f=n.dom.getAttribute("type"),h=null!==f?isNaN(Number(f))?f:Number(f):null),p={dom:n.dom,tagName:n.tagName,id:n.id,component:n,type:h},this._templateChildren.push(p),this._shouldDebugTailTemplate(h)&&console.log("[QtFastListView] beforeChildMount template",{type:h,id:n.id,tagName:n.tagName}),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,ka(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,n,r,i=this;if(console.log("[QtFastListView] setListData called, data length:",null===(t=e)||void 0===t?void 0:t.length,"this.dom:",null===(n=(r=this.dom).getAttribute)||void 0===n?void 0:n.call(r,"data-component-name")),Array.isArray(e)&&1===e.length&&Array.isArray(e[0])&&(e=e[0]),Array.isArray(e)){this._listData=e;var o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;console.log("[QtFastListView] tryRender, attempts:",e,"templateChildren:",i._templateChildren.length,"singletonTemplates:",i._singletonTemplates.length),i._templateChildren.length>0||i._singletonTemplates.length>0||e>=10?(console.log("[QtFastListView] calling _renderItems"),i._renderItems()):setTimeout(function(){return o(e+1)},50)};setTimeout(function(){return o()},0)}else console.log("[QtFastListView] setListData: data is not array, returning")}},{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,l=Array.isArray(n)?n:[];(r=this._listData).splice.apply(r,[o,a].concat(E(l))),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(E(o))),this._renderItems()}},{key:"_renderItems",value:function(){var e,t,r=this;this._itemContainer.innerHTML="",this._templateChildren.forEach(function(e){e.dom&&(e.dom.style.display="none")});var i=new Set,o=[],a=[];if(this._singletonTemplates.forEach(function(e){var t=r._createSingletonItem(e,i);t&&(t.isTailTemplate?a.push(t.element):o.push(t.element))}),o.forEach(function(e){r._itemContainer.appendChild(e)}),0!==this._listData.length){if(this._listData.forEach(function(e,t){if(!i.has(e.type)){var n=r._createItemFromData(e,t);n&&r._itemContainer.appendChild(n)}}),a.forEach(function(e){r._itemContainer.appendChild(e)}),console.log("[QtFastListView] _renderItems complete, itemContainer children:",this._itemContainer.children.length,"dom:",null===(e=(t=this.dom).getAttribute)||void 0===e?void 0:e.call(t,"data-component-name")),void 0!==this._selectedPosition&&this._selectedPosition>=0){console.log("[QtFastListView] _renderItems: restoring selected state for position:",this._selectedPosition);var s=this._itemContainer.children;if(this._selectedPosition<s.length){var l=s[this._selectedPosition];if(l&&!l.hasAttribute("selected")){l.setAttribute("selected","true");for(var u=l.children,c=0;c<u.length;c++)u[c].setAttribute("selected","true");l.querySelectorAll("[duplicateparentstate]").forEach(function(e){e.setAttribute("selected","true")}),console.log("[QtFastListView] _renderItems: selected attribute set on position",this._selectedPosition)}}}requestAnimationFrame(function(){var e=n.g.__TV_FOCUS_MANAGER__;e&&e.initShowOnStateForElement&&e.initShowOnStateForElement(r._itemContainer)})}}},{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,s,l=this._isTailTemplate(e.type);(this._spanCount>0&&l&&(o.style.gridColumn="1 / -1"),l)&&console.log("[QtFastListView] create singleton tail item",{itemType:null!==(a=null!==(s=r.type)&&void 0!==s?s:e.type)&&void 0!==a?a:null,position:i,spanCount:this._spanCount,gridColumn:o.style.gridColumn||"",decoration:r.decoration||null});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})}),{element:o,isTailTemplate:l}}},{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}),l=window.__QT_SHARED_TEMPLATES__,u=l&&null!=a?l.get(a):null;if(!s&&u&&u.dom&&(s=u),s||(s=this._templateChildren.find(function(e){return null===e.type})),!s&&l&&l.size>0){var c=l.values().next().value;c&&c.dom&&(s=c)}if(!s&&this._templateChildren.length>0&&(s=this._templateChildren[0]),s&&s.dom){var d=s.dom.cloneNode(!0);d.removeAttribute("data-template"),d.removeAttribute("id"),d.style.position="relative",d.style.left="auto",d.style.top="auto",d.style.display="",s.component&&s.component.props&&this._bindComponentPropsToNode(d,s.component.props,e,{itemList:this._listData}),this._bindDataToNode(d,e,{itemList:this._listData}),o.appendChild(d),requestAnimationFrame(function(){i._processChildListData(o),(0,Wt.u6)(o)})}if(0===this._templateChildren.length){var h=e.text||e.title||e.name||"Item ".concat(t),f=document.createElement("span");f.textContent=h,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"),v&&console.log("[QtFastListView] create tail item",{itemType:a,position:t,spanCount:this._spanCount,gridColumn:o.style.gridColumn||"",decoration:e.decoration||null}),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._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=_a(_a({},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,Wt.Hd)(o,i),s=n.toLowerCase();if("list"===s||"listdata"===s){if(console.log("[QtFastListView] Processing list prop, value:",o,"resolvedValue from itemData:",a),void 0!==a&&Array.isArray(a)||(a=(0,Wt.Hd)(o,i),console.log("[QtFastListView] resolvedValue from combinedData:",a)),Array.isArray(a)){var l=window.__HIPPY_COMPONENT_REGISTRY__;if(console.log("[QtFastListView] Looking for component, registry size:",null==l?void 0:l.size),l){var u,c=l.get(e);console.log("[QtFastListView] Found component by node:",null==c||null===(u=c.constructor)||void 0===u?void 0:u.name),c&&"function"==typeof c.setListData?(console.log("[QtFastListView] Calling setListData on component with",a.length,"items"),c.setListData(a)):(e._qtListData=a,console.log("[QtFastListView] Set node._qtListData as fallback"))}else e._qtListData=a}return}if(("flexstyle"===s||"flexstyletemplate"===s)&&a&&"object"==typeof a){var d=window.__HIPPY_COMPONENT_REGISTRY__,h=d?d.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 f=window.__HIPPY_COMPONENT_REGISTRY__,p=f?f.get(e):null;if(p&&"function"==typeof p.updateProperty)p.updateProperty(n,a);else{var v="number"==typeof a?a+"px":a;e.style.fontSize=v}}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 y=window.__HIPPY_COMPONENT_REGISTRY__,m=y?y.get(e):null;m&&"function"==typeof m.updateProperty?m.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,Wt.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,Wt.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"),l=!(null===(o=e.querySelector)||void 0===o||!o.call(e,"[type], [data-template-type], [data-template], [data-singleton]"));"QtFlexView"===s?da(e,e._qtListData):("FastListView"===s||"ListView"===s||null!==(a=e.hasAttribute)&&void 0!==a&&a.call(e,"data-has-list")&&l)&&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=Aa(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=Aa(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}),l=i.filter(function(e){return!e.singleton}),u=[],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="",xa(e.dom,n,t),ua(e.dom),o.appendChild(e.dom),null!==n.type&&void 0!==n.type&&a.add(n.type),s?c.push(o):u.push(o)}else e.dom.style.display="none"}),u.forEach(function(e){n.appendChild(e)});var d=l.length>0?l:i;t.forEach(function(e,i){var s;if(!a.has(null==e?void 0:e.type)){var l=d.find(function(t){return t.type===(null==e?void 0:e.type)});if(!l&&o&&null!==(null==e?void 0:e.type)&&void 0!==(null==e?void 0:e.type)){var u=o.get(e.type);null!=u&&u.dom&&(l=u)}if(l||(l=d.find(function(e){return null===e.type})),!l&&o&&o.size>0){var c=o.values().next().value;null!=c&&c.dom&&(l=c)}if(l||(l=d[0]),null!==(s=l)&&void 0!==s&&s.dom){var h=document.createElement("div");h.setAttribute("data-index",i),h.setAttribute("data-position",i),h._itemData=e,h._itemPosition=i,r(h,e);var f=l.dom.cloneNode(!0);f.removeAttribute("data-template"),f.removeAttribute("data-singleton"),f.removeAttribute("id"),f.style.display="",f.style.position="relative",xa(f,e,t),ua(f),h.appendChild(f),n.appendChild(h)}}}),c.forEach(function(e){n.appendChild(e)}),requestAnimationFrame(function(){return(0,Wt.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){var n,r,i;if(console.log("[QtFastListView] notifyItemFocusChanged called, hasFocus:",t,"element:",null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"data-component-name"),"this.dom:",null===(r=this.dom)||void 0===r||null===(i=r.getAttribute)||void 0===i?void 0:i.call(r,"data-component-name")),e&&this._itemContainer){var o=this._itemContainer.children,a=o.length;if(console.log("[QtFastListView] itemCount:",a,"itemContainer:",this._itemContainer.className),0!==a){for(var s=-1,l=null,u=0;u<a;u++)if(o[u]===e||o[u].contains(e)){s=u,l=o[u];break}if(console.log("[QtFastListView] currentIndex:",s,"focusedIndex:",this._focusedIndex,"selectedPosition:",this._selectedPosition),-1!==s){var c=this._listData[s];if(l&&c&&"object"==typeof c&&Array.isArray(c.itemList)){var d=this._findNestedItemMeta(e,l);if(d&&d.itemData){var h={position:d.position,index:d.position,item:d.itemData,hasFocus:!!t,isFocused:!!t,parentPosition:s};return void this.dispatchEvent("onItemfocused",h)}}if(t){if(this._focusedIndex===s)return;this._focusedIndex=s,this._selectedPosition!==s&&(console.log("[QtFastListView] calling setSelectChildPosition for index:",s),this.setSelectChildPosition(s,!1))}else{if(this._focusedIndex!==s)return;this._focusedIndex=-1}this._dispatchItemFocused(s,c,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(!(e<0||e>=this._listData.length)){this._listData[e]=_a(_a({},this._listData[e]),t);var n=this._itemContainer.children[e];if(n){var r=this._createItemFromData(this._listData[e],e);this._itemContainer.replaceChild(r,n)}}}},{key:"deleteItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._listData.splice(e,t);for(var n=0;n<t;n++){var r=this._itemContainer.children[e];r&&this._itemContainer.removeChild(r)}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){console.log("[QtFastListView] requestFocus called with position:",e);var t=this._itemContainer.children;if(e<0||e>=t.length)console.warn("[QtFastListView] requestFocus: invalid position",e,"items count:",t.length);else{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(),console.log("[QtFastListView] requestFocus: focused item at position",e)}else console.warn("[QtFastListView] requestFocus: no item at position",e)}}},{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,r,i=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Array.isArray(e)&&(e=e[0]),console.log("[QtFastListView] requestChildFocus called with position:",e,"retry:",o,"this.dom:",null===(t=this.dom)||void 0===t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"data-component-name"));var a=this._itemContainer.children;if(console.log("[QtFastListView] requestChildFocus: items.length:",a.length),e<0||e>=a.length)return o<10&&0===a.length?(console.log("[QtFastListView] requestChildFocus: items not ready, retrying..."),void setTimeout(function(){return i.requestChildFocus(e,o+1)},100)):void console.warn("[QtFastListView] requestChildFocus: invalid position",e,"items count:",a.length);var s=a[e];if(s){var l=s.querySelector('[focusable="true"], [focusable="1"], [focusable]')||s,u=n.g.__TV_FOCUS_MANAGER__;u?(u.updateFocusableElements(),u._doFocusElement(l)):l.focus(),console.log("[QtFastListView] requestChildFocus: focused item at position",e)}else console.warn("[QtFastListView] requestChildFocus: no item at position",e)}},{key:"setSelectChildPosition",value:function(e){var t,r,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];console.log("[QtFastListView] setSelectChildPosition called with position:",e,"this.dom:",null===(t=this.dom)||void 0===t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"data-component-name"));var o=n.g.__TV_FOCUS_MANAGER__,a=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())};if(void 0!==this._selectedPosition&&this._selectedPosition>=0){console.log("[QtFastListView] setSelectChildPosition: clearing previous selected position:",this._selectedPosition);var s=this._itemContainer.querySelectorAll('[selected="true"], [selected=""]');console.log("[QtFastListView] setSelectChildPosition: found",s.length,"items with selected attribute"),s.forEach(function(e){var t,n;if(console.log("[QtFastListView] setSelectChildPosition: removing selected from:",null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"data-component-name"),"text:",null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"text")),e.removeAttribute("selected"),!(e.classList.contains("focused")||o&&o.focusedElement===e)&&o){var r,i=null===(r=o.focusedElementOriginalStyles)||void 0===r?void 0:r.get(e),s=a(e,"select-background-color","--select-background-color");if(i&&void 0!==i.backgroundColor){var l=i.backgroundColor,u=l===s||l===(null==s?void 0:s.replace(/\s/g,""))||l===(null==s?void 0:s.replace("rgba","rgb").replace(/,([^,]+)\)$/,"$1)")),c=u?"":l;console.log("[QtFastListView] setSelectChildPosition: restoring background color to:",c,"savedBg:",l,"selectBg:",s,"isSelectColor:",u),e.style.backgroundColor=c}else console.log("[QtFastListView] setSelectChildPosition: clearing background color"),e.style.backgroundColor="";o._removeDuplicateParentStateStyles(e)}})}if(this._selectedPosition=e,e>=0){var l=this._itemContainer.children;if(console.log("[QtFastListView] setSelectChildPosition: items.length:",l.length,"position:",e),console.log("[QtFastListView] setSelectChildPosition: items[position]:",l[e]),console.log("[QtFastListView] setSelectChildPosition: items[0]:",l[0]),e<l.length){var u,c=l[e];if(console.log("[QtFastListView] setSelectChildPosition: item:",c,"tagName:",null==c?void 0:c.tagName,"children:",null==c||null===(u=c.children)||void 0===u?void 0:u.length),c){c.setAttribute("selected","true");for(var d=c.children,h=0;h<d.length;h++){var f,p;console.log("[QtFastListView] setSelectChildPosition: setting selected on child:",h,null===(f=(p=d[h]).getAttribute)||void 0===f?void 0:f.call(p,"data-component-name")),d[h].setAttribute("selected","true")}if(c.querySelectorAll("[duplicateparentstate]").forEach(function(e){e.setAttribute("selected","true")}),console.log("[QtFastListView] setSelectChildPosition: set selected on position",e),o){o.focusedElement&&(c.contains(o.focusedElement)||o.focusedElement);for(var v=0;v<d.length;v++){var y=d[v];if(!(y.classList.contains("focused")||o.focusedElement===y)){var m=a(y,"select-background-color","--select-background-color");if(m){var g;if(o.focusedElementOriginalStyles||(o.focusedElementOriginalStyles=new Map),!o.focusedElementOriginalStyles.has(y)){var b=y.style.backgroundColor,_=b===m||b===m.replace(/\s/g,"")||b===m.replace("rgba","rgb").replace(/,([^,]+)\)$/,"$1)"),w=_?"":b;console.log("[QtFastListView] setSelectChildPosition: saving original background color:",w,"currentBg:",b,"selectBg:",m,"isSelectColor:",_),o.focusedElementOriginalStyles.set(y,{backgroundColor:w})}console.log("[QtFastListView] setSelectChildPosition: setting select background color:",m,"for child:",null===(g=y.getAttribute)||void 0===g?void 0:g.call(y,"data-component-name")),y.style.backgroundColor=m}o.styler._applyDuplicateParentStateStyles(y,!1)}}}}}}i&&this.requestChildFocus(e)}},{key:"setSpanCount",value:function(e){e>0&&this._itemContainer.style.setProperty("--span-count",e)}},{key:"destroy",value:function(){var e;e=this,pa.delete(e),ka(t,"destroy",this,1)&&ka(t,"destroy",this,3)([])}},{key:"handleFocusNavigation",value:function(e,t){console.log("[QtFastListView] handleFocusNavigation called:",{direction:t,currentElement:e});var n=this._itemContainer.children,r=n.length;if(console.log("[QtFastListView] items:",{itemCount:r}),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(console.log("[QtFastListView] currentIndex:",o),-1===o)return null;var s=this._isAtItemBoundary(i,e,t);if(console.log("[QtFastListView] isAtItemBoundary:",s),!s){var l=this._handleInternalNavigation(i,e,t);if(console.log("[QtFastListView] internalNext:",!!l),l){var u=l.getAttribute("focusable");if("true"===u||"1"===u||""===u)return console.log("[QtFastListView] 内部导航成功"),l}}var c=null,d=-1,h=this._handleSpatialNavigation(e,t,n,r);if(h.element)return c=h.element,d=h.index,console.log("[QtFastListView] 外部导航找到:",{nextIndex:d,hasElement:!!c}),c;if(0===o&&("up"===t||"left"===t))return console.log("[QtFastListView] 在第一个 item 边界,让全局导航接管"),this._scrollToBoundary(t,e),null;if(o===r-1&&("down"===t||"right"===t))return console.log("[QtFastListView] 在最后一个 item 边界,让全局导航接管"),this._scrollToBoundary(t,e),null;if(this._spanCount>0){var f=this._handleGridNavigation(o,t,n,r);c=f.element,d=f.index}else{var p=this._handleListNavigation(o,t,n,r);c=p.element,d=p.index}return console.log("[QtFastListView] navigation result:",{nextIndex:d,hasElement:!!c}),c}},{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,l=r.right-i.right;switch(n){case"up":return o<=10;case"down":return a<=10;case"left":return s<=10;case"right":return l<=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 l=Math.min.apply(Math,E(a.map(function(e){return e.rect.left})));s.left<=l+20&&(this.dom.scrollLeft=0)}else if("right"===e){var u=Math.max.apply(Math,E(a.map(function(e){return e.rect.right})));s.right>=u-20&&(this.dom.scrollLeft=this.dom.scrollWidth)}}else if("up"===e){var c=Math.min.apply(Math,E(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 d=Math.max.apply(Math,E(a.map(function(e){return e.rect.bottom})));s.bottom>=d-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;console.log("[QtFastListView] _handleInternalNavigation: found",i.length,"focusables, currentFocusIndex=",o,"direction=",n);var s=i.map(function(e){return{el:e,rect:e.getBoundingClientRect()}}),l=s[o].rect,u=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<=l.top&&(i=Math.abs(r.left-l.left)+(l.top-r.bottom),a=!0);break;case"down":r.top>=l.bottom&&(i=Math.abs(r.left-l.left)+(r.top-l.bottom),a=!0);break;case"left":r.right<=l.left&&(i=Math.abs(r.top-l.top)+(l.left-r.right),a=!0);break;case"right":r.left>=l.right&&(i=Math.abs(r.top-l.top)+(r.left-l.right),a=!0)}a&&i<c&&(c=i,u=e.el)}}),u&&console.log("[QtFastListView] _handleInternalNavigation: found nextElement=",u.tagName,u.className,"focusable=",u.getAttribute("focusable")),u}},{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};var i=e.getBoundingClientRect(),o={x:i.left+i.width/2,y:i.top+i.height/2};console.log("[QtFastListView] SpatialNav start - Current Focus Center: (".concat(o.x,", ").concat(o.y,"), direction: ").concat(t));for(var a=null,s=-1,l=1/0,u=void 0!==this._selectedPosition&&this._selectedPosition>=0,c=0;c<r;c++){var d=n[c];if("none"!==d.style.display)if(u){var h=this._getFocusableInItem(d,t);if(!h||h===e)continue;if(h===d&&"true"!==d.getAttribute("focusable"))continue;var f=h.getBoundingClientRect();if(0===f.width&&0===f.height)continue;var p={x:f.left+f.width/2,y:f.top+f.height/2},v=p.x-o.x,y=p.y-o.y,m=!1,g=0,b=0;switch(t){case"up":m=y<-5,g=Math.abs(y),b=Math.abs(v);break;case"down":m=y>5,g=Math.abs(y),b=Math.abs(v);break;case"left":m=v<-5,g=Math.abs(v),b=Math.abs(y);break;case"right":m=v>5,g=Math.abs(v),b=Math.abs(y)}if(m){var _=c===this._selectedPosition;("left"===t||"right"===t)&&Math.abs(y)>f.height/2&&(b*=5),("up"===t||"down"===t)&&Math.abs(v)>f.width/2&&(b*=5);var w=g+.5*b;_&&(w-=1e3),console.log("[QtFastListView] SpatialNav candidate (selected mode) - Index: ".concat(c,", dx: ").concat(v.toFixed(0),", dy: ").concat(y.toFixed(0),", distance: ").concat(w.toFixed(0))),w<l&&(l=w,a=h,s=c)}}else{var E=d.querySelectorAll('[focusable="true"]');0===E.length&&"true"===d.getAttribute("focusable")&&d!==e&&E.push(d);var k,S=ma(E);try{for(S.s();!(k=S.n()).done;){var A=k.value;if(A!==e){var x=A.getBoundingClientRect();if(0!==x.width||0!==x.height){var C={x:x.left+x.width/2,y:x.top+x.height/2},L=C.x-o.x,P=C.y-o.y,T=!1;switch(t){case"up":T=P<-5;break;case"down":T=P>5;break;case"left":T=L<-5;break;case"right":T=L>5}if(T){var I=Math.sqrt(L*L+P*P);console.log("[QtFastListView] SpatialNav candidate (nearest mode) - Index: ".concat(c,", dx: ").concat(L.toFixed(0),", dy: ").concat(P.toFixed(0),", distance: ").concat(I.toFixed(0))),I<l&&(l=I,a=A,s=c)}}}}}catch(e){S.e(e)}finally{S.f()}}}return a?console.log("[QtFastListView] SpatialNav success - Best Index: ".concat(s,", distance: ").concat(l)):console.log("[QtFastListView] SpatialNav failed - No candidate found for direction ".concat(t)),{element:a,index:s}}},{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 l=this._getFocusableInItem(n[s],t);if(l!==n[s]||"true"===n[s].getAttribute("focusable"))return{element:l,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,Wt.Hd)(e,t)}},{key:"_applyFlexStyleToElement",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","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}(Bo);function Aa(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 xa(e,t,n){(0,Wt.bindTemplateDataToNode)(e,t,{scope:{itemList:n},onListData:function(e,t){e._qtListData=t,e.setAttribute("data-has-list","true")}})}function Ca(e,t,n){return t=yn(t),vn(e,La()?Reflect.construct(t,n||[],yn(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})()}var Pa=function(e){function t(e,n,r){var i;return x(this,t),(i=Ca(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 bn(t,e),P(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=mn(yn(1&(a=3)?r.prototype:r),i,o),2&a&&"function"==typeof s?function(e){return s.apply(o,e)}:s)([e,n])}}])}(Bo);function Ta(e,t,n){return t=yn(t),vn(e,Ia()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function Ia(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ia=function(){return!!e})()}var Oa={alpha:"opacity",rotation:"rotate",rotationX:"rotateX",rotationY:"rotateY",rotationZ:"rotateZ",scaleX:"scaleX",scaleY:"scaleY",scaleZ:"scaleZ",translationX:"translateX",translationY:"translateY",translationZ:"translateZ"},Ra={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"},Na=function(e){function t(e,n,r){var i;return x(this,t),(i=Ta(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 bn(t,e),P(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)||w(t)||o(t)||a(),i=n[0],l=n[1],u=n[2],c=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),d=c.slice(0,-6),h=s(c.slice(-6),6),f=h[0],p=h[1],v=h[2],y=(h[3],h[4],h[5]);console.log("[QtAnimationView] animator called:",{id:i,valueType:l,propertyName:u,values:d,duration:f,repeatMode:p,repeatCount:v,interpolator:y});var m={id:i,propertyName:u,values:d,duration:f,repeatMode:p,repeatCount:v,interpolator:y};this._animators.set(i,m)}},{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;console.log("[QtAnimationView] start called with animatorId:",t),console.log("[QtAnimationView] available animators:",Array.from(this._animators.keys())),console.log("[QtAnimationView] available animatorSets:",Array.from(this._animatorSets.keys())),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;console.log("[QtAnimationView] _runAnimator called with config:",e);var n=this._getAnimationTarget();console.log("[QtAnimationView] animation target:",n);var r=e.propertyName,i=e.values,o=e.duration,a=e.repeatCount,s=e.interpolator,l=Ra[null==s?void 0:s.type]||"linear",u=-1===a?1/0:a||1,c=2===e.repeatMode?"alternate":"normal",d=this._buildKeyframes(r,i);console.log("[QtAnimationView] keyframes:",d);var h=n.animate(d,{duration:o,easing:l,iterations:u,direction:c,fill:"forwards"});console.log("[QtAnimationView] animation created:",h),this._runningAnimations.set(e.id,h),h.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,l=i.duration,u=i.repeatCount,c=i.interpolator,d=Ra[null==c?void 0:c.type]||"linear",h=-1===u?1/0:u||1,f=2===i.repeatMode?"alternate":"normal",p=this._buildKeyframes(a,s),v=o.animate(p,{duration:l,easing:d,iterations:h,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=Oa[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],l=t[6],u=(t[7],t[8],{id:n,propertyName:r,values:[i],duration:o,repeatMode:a,repeatCount:l,interpolator:t[9]});console.log("[QtAnimationView] objectAnimator1:",u),this._animators.set(n,u)}},{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],l=t[6],u=t[7],c=(t[8],t[9],{id:n,propertyName:r,values:[i,o],duration:a,repeatMode:l,repeatCount:u,interpolator:t[10]});console.log("[QtAnimationView] objectAnimator2:",c),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],l=t[6],u=t[7],c=t[8],d=(t[9],t[10],{id:n,propertyName:r,values:[i,o,a],duration:l,repeatMode:u,repeatCount:c,interpolator:t[11]});this._animators.set(n,d)}},{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],l=t[6],u=t[7],c=t[8],d=t[9],h=(t[10],t[11],{id:n,propertyName:r,values:[i,o,a,l],duration:u,repeatMode:c,repeatCount:d,interpolator:t[12]});this._animators.set(n,h)}},{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],l=t[6],u=t[7],c=t[8],d=t[9],h=t[10],f=(t[11],t[12],{id:n,propertyName:r,values:[i,o,a,l,u],duration:c,repeatMode:d,repeatCount:h,interpolator:t[13]});this._animators.set(n,f)}}])}(Bo);function Da(e,t,n){return t=yn(t),vn(e,Ma()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function Ma(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ma=function(){return!!e})()}console.log("[QtWebView] Module loaded");var Fa=function(e){function t(e,n,r){var i;return x(this,t),(i=Da(this,t,[e,n,r])).tagName="ESWebViewComponent",i.dom=document.createElement("div"),i._iframe=null,i._url=null,i._userAgent=null,console.log("[QtWebView] constructor called, id:",n),i.dom.style.position="relative",i.dom.style.overflow="hidden",i.dom.setAttribute("data-component-name","QtWebView"),i}return bn(t,e),P(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){console.error("[QtWebView] iframe error:",t),e._handleLoadError()}),this._iframe.addEventListener("load",function(){console.log("[QtWebView] iframe loaded"),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)||"";console.log("[QtWebView] _detectBlockedContent - bodyContent length:",r.length);var 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;console.log("[QtWebView] _detectBlockedContent - isConnectionError:",i,"isBlockedError:",o,"isEmpty:",a),i?(console.log("[QtWebView] Detected connection error"),e._handleLoadError("无法连接到服务器,请检查网络或地址是否正确")):o?(console.log("[QtWebView] Detected blocked content"),e._handleLoadError("该网站设置了安全策略,禁止在页面内嵌入显示")):a&&(console.log("[QtWebView] Detected empty content"),e._handleLoadError("页面内容为空"))}catch(e){console.log("[QtWebView] Cross-origin page loaded successfully")}},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=mn(yn(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=u(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){console.log("[QtWebView] Invalid URL format:",t.message),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;console.log("[QtWebView] loadUrl:",t),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){console.log("[QtWebView] clearCache called (no-op in web)")}},{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){console.log("[QtWebView] setLayerType called (no-op in web)")}},{key:"setIgnoreCA",value:function(e){console.log("[QtWebView] setIgnoreCA called (no-op in web)")}},{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),n=t[0],r=t[1];console.log("[QtWebView] autoClickPosition:",n,r)}},{key:"disableImageDisplay",value:function(){console.log("[QtWebView] disableImageDisplay (no-op in web)")}},{key:"enableImageDisplay",value:function(){console.log("[QtWebView] enableImageDisplay (no-op in web)")}},{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){console.log("[QtWebView] setListenEvents:",e)}},{key:"setIgnoreAllKeyEvent",value:function(e){console.log("[QtWebView] setIgnoreAllKeyEvent:",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 console.error("[QtWebView] evaluateJavascript error:",e),Promise.resolve(null)}return Promise.resolve(null)}},{key:"setSniffingEnabled",value:function(e){console.log("[QtWebView] setSniffingEnabled (no-op in web)")}},{key:"setSniffingRule",value:function(e){console.log("[QtWebView] setSniffingRule (no-op in web)")}},{key:"resetSniffingRule",value:function(){console.log("[QtWebView] resetSniffingRule (no-op in web)")}},{key:"setInterceptEnabled",value:function(e){console.log("[QtWebView] setInterceptEnabled (no-op in web)")}},{key:"setInterceptRule",value:function(e){console.log("[QtWebView] setInterceptRule (no-op in web)")}},{key:"resetInterceptRule",value:function(){console.log("[QtWebView] resetInterceptRule (no-op in web)")}},{key:"shouldOverrideUrlLoading",value:function(e){console.log("[QtWebView] shouldOverrideUrlLoading:",e)}},{key:"setUserAgent",value:function(e){var t=Array.isArray(e)?e[0]:e;this._userAgent=t,console.log("[QtWebView] setUserAgent (limited support in web):",t)}},{key:"canGoBack",value:function(){return Promise.resolve(!1)}},{key:"goBack",value:function(){if(this._iframe)try{this._iframe.contentWindow.history.back()}catch(e){console.error("[QtWebView] goBack error:",e)}}},{key:"canGoForward",value:function(){return Promise.resolve(!1)}},{key:"goForward",value:function(){if(this._iframe)try{this._iframe.contentWindow.history.forward()}catch(e){console.error("[QtWebView] goForward error:",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){console.error("[QtWebView] goBackOrForward error:",e)}}},{key:"onResume",value:function(){console.log("[QtWebView] onResume")}},{key:"onPause",value:function(){console.log("[QtWebView] onPause")}},{key:"pauseTimers",value:function(){console.log("[QtWebView] pauseTimers (no-op in web)")}},{key:"resumeTimers",value:function(){console.log("[QtWebView] resumeTimers (no-op in web)")}},{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){console.log("[QtWebView] setJavaScriptEnabled (always enabled in web)")}},{key:"setPluginState",value:function(e){console.log("[QtWebView] setPluginState (no-op in web)")}},{key:"setJavaScriptCanOpenWindowsAutomatically",value:function(e){console.log("[QtWebView] setJavaScriptCanOpenWindowsAutomatically (no-op in web)")}},{key:"setUseWideViewPort",value:function(e){console.log("[QtWebView] setUseWideViewPort (no-op in web)")}},{key:"setLoadWithOverviewMode",value:function(e){console.log("[QtWebView] setLoadWithOverviewMode (no-op in web)")}},{key:"setSupportZoom",value:function(e){console.log("[QtWebView] setSupportZoom (no-op in web)")}},{key:"setBuiltInZoomControls",value:function(e){console.log("[QtWebView] setBuiltInZoomControls (no-op in web)")}},{key:"setDisplayZoomControls",value:function(e){console.log("[QtWebView] setDisplayZoomControls (no-op in web)")}},{key:"setAllowFileAccess",value:function(e){console.log("[QtWebView] setAllowFileAccess (no-op in web)")}},{key:"setDomStorageEnabled",value:function(e){console.log("[QtWebView] setDomStorageEnabled (always enabled in web)")}},{key:"setDatabaseEnabled",value:function(e){console.log("[QtWebView] setDatabaseEnabled (no-op in web)")}},{key:"setAppCacheEnabled",value:function(e){console.log("[QtWebView] setAppCacheEnabled (no-op in web)")}},{key:"setAppCachePath",value:function(e){console.log("[QtWebView] setAppCachePath (no-op in web)")}},{key:"setMediaPlaybackRequiresUserGesture",value:function(e){console.log("[QtWebView] setMediaPlaybackRequiresUserGesture (no-op in web)")}},{key:"initJavaScriptInterface",value:function(){console.log("[QtWebView] initJavaScriptInterface (no-op in web)")}},{key:"removeJavaScriptInterface",value:function(){console.log("[QtWebView] removeJavaScriptInterface (no-op in web)")}},{key:"initWebViewFocus",value:function(e){console.log("[QtWebView] initWebViewFocus (no-op in web)")}}]);var r}(Bo);function Va(e,t,n){return t=yn(t),vn(e,Ba()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function Ba(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ba=function(){return!!e})()}function Wa(e,t,n,r){var i=mn(yn(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 ja=null,Ha=function(e){function t(e,n,r){var i;return x(this,t),(i=Va(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 bn(t,e),P(t,[{key:"_render",value:(r=u(c.mark(function e(){var t,r,i,o=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(ja){e.next=5;break}return e.prev=2,e.next=3,n.e(659).then(n.t.bind(n,659,19)).then(function(e){return e.default||e});case 3:ja=e.sent,e.next=5;break;case 4:return e.prev=4,i=e.catch(2),console.error("[QtQRCode] Failed to load qrcode library:",i),e.abrupt("return");case 5:t=this.dom.getBoundingClientRect(),r=Math.max(t.width||200,t.height||200),ja.toDataURL(this._content,{width:r,margin:2,color:{dark:"#000000",light:"#FFFFFF"}},function(e,t){if(e)console.error("[QtQRCode] Error:",e);else{o.dom.innerHTML="";var n=document.createElement("img");n.src=t,n.style.width="100%",n.style.height="100%",n.style.display="block",o.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()):Wa(t,"updateProperty",this,3)([e,n])}},{key:"init",value:function(e){Wa(t,"init",this,3)([e]),this._content=e.content||"",this._render()}}]);var r}(Bo);function Ua(e,t,n){return t=yn(t),vn(e,za()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function za(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(za=function(){return!!e})()}function Ga(e,t,n,r){var i=mn(yn(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 Ya=function(e){function t(e,n,r){var i;return x(this,t),(i=Ua(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 bn(t,e),P(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:Ga(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){Ga(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()}}])}(Bo);function qa(e,t,n){return t=yn(t),vn(e,Qa()?Reflect.construct(t,n||[],yn(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 Ka(e,t,n,r){var i=mn(yn(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 Xa=function(e){function t(e,n,r){var i;return x(this,t),(i=qa(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 bn(t,e),P(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(),i=r.height||200;if(console.log("[QtSeekBar] _updateStyles - containerHeight:",i,"rect:",r.width,"x",r.height),e=0===this._gravity?0:2===this._gravity?i-t:(i-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 o=this._leftProgress/this._maxProgress*100,a=this._rightProgress/this._maxProgress*100;console.log("[QtSeekBar] _updateStyles RANGE mode - leftPercent:",o,"rightPercent:",a),this._progressEl.style.left=o+"%",this._progressEl.style.width=a-o+"%",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(o,"% - ").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(a,"% - ").concat(this._thumbWidth/2,"px)"),this._rightThumbEl.style.top=e+t/2-this._thumbHeight/2+"px"}else{var s=Math.min(100,this._progress/this._maxProgress*100);console.log("[QtSeekBar] _updateStyles - progress:",this._progress,"maxProgress:",this._maxProgress,"percent:",s),this._progressEl.style.left="0",this._progressEl.style.width=s+"%",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(s,"% - ").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"}}else console.warn("[QtSeekBar] _updateStyles called before DOM elements ready")}},{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:Ka(t,"updateProperty",this,3)([e,n])}}},{key:"setProgress",value:function(e){var t=e[0];console.log("[QtSeekBar] setProgress called with:",t,"params:",e),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;Ka(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()})}}])}(Bo);function Za(e,t,n){return t=yn(t),vn(e,Ja()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function Ja(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ja=function(){return!!e})()}var $a=function(e){function t(e,n,r){var i;return x(this,t),(i=Za(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",y(n,i),i}return bn(t,e),P(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=mn(yn(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&&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,l=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!=l&&(this.dom.style.height="number"==typeof l?"".concat(l,"px"):l),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")}}}}])}(Bo);function es(e,t,n){return t=yn(t),vn(e,ts()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function ts(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ts=function(){return!!e})()}function ns(e,t,n,r){var i=mn(yn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var rs=function(e){function t(e,n,r){var i;return x(this,t),(i=es(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=[],y(n,i),i}return bn(t,e),P(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=u(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,ns(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),ns(t,"updateProperty",this,3)([e,n])}}]);var n}(Bo);function is(e,t,n){return t=yn(t),vn(e,os()?Reflect.construct(t,n||[],yn(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 as(e,t,n,r){var i=mn(yn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var ss=function(e){function t(e,n,r){var i;return x(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,y(n,i),i}return bn(t,e),P(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:as(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,l=1500+200*r,u=function(){if(i._isShowRipple)if((a+=s/l*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(u)}else o.style.width="0",o.style.height="0",o.style.opacity="0.6",a=0,i._animationFrame=requestAnimationFrame(u);else o.remove()};u()}},{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(),as(t,"destroy",this,3)([])}}])}(Bo);function ls(e,t,n){return t=yn(t),vn(e,us()?Reflect.construct(t,n||[],yn(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})()}function cs(e,t,n,r){var i=mn(yn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var ds=function(e){function t(e,n,r){var i;return x(this,t),(i=ls(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={},y(n,i),i}return bn(t,e),P(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=u(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,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){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:cs(t,"updateProperty",this,3)([e,n])}}},{key:"_applyFlexStyle",value:function(e){var t=this;e&&"object"==typeof 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}(Bo);function hs(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 fs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hs(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ps(e,t,n){return t=yn(t),vn(e,vs()?Reflect.construct(t,n||[],yn(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})()}var ys=function(e){function t(e,n,r){var i;return x(this,t),(i=ps(this,t,[e,n,r])).tagName="TabsView",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","TabsView"),y(n,i),i._instanceId=++t._instanceCount,console.log("[TabsView] constructor, instanceId:",i._instanceId),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 bn(t,e),P(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&&(console.log("[TabsView] insertChild with name:",r,e.tagName),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),console.log("[TabsView] intercepted event from tabList:",e,r),("onItemFocused"===e||"onItemfocused"===e)&&r&&!0===r.hasFocus){var i=r.position;void 0!==i&&i!==t._currentPageIndex&&(console.log("[TabsView] tab focus changed to:",i),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&&(console.log("[TabsView] tab clicked, switching to:",o),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),console.log("[TabsView] tabList listeners setup complete")}}},{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&&(console.log("[TabsView] DOM focus changed to tab:",i),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=mn(yn(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":"",console.log("[TabsView] _applyHideOnSingleTab:",t,"tabCount:",this._tabItems.length)}}},{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]||{},l=o[1]||[];this._tabData=fs(fs({},s),{},{data:l}),this._tabItems=Array.isArray(l)?l:[],this._currentPageIndex=null!==(e=s.defaultIndex)&&void 0!==e?e:0;var u=null!==(t=null!==(n=s.defaultFocusIndex)&&void 0!==n?n:s.focusIndex)&&void 0!==t?t:this._currentPageIndex;this._focusIndex=Number.isFinite(u)&&u>=0?u:this._currentPageIndex,console.log("[TabsView] setTabsData:",s,l,"tabList:",this._childrenByName.get("tabList"),"defaultFocusIndex:",s.defaultFocusIndex,"_focusIndex:",this._focusIndex);var c=this.getChildByName("tabList");c&&c.setListData&&(console.log("[TabsView] calling tabList.setListData with:",l),c.setListData(l)),this._applyHideOnSingleTab(),requestAnimationFrame(function(){console.log("[TabsView] Dispatching events after setTabsData, events:",r.events);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():console.log("[TabsView] _setInitialTabFocus skipped due to stale token",{initialFocusToken:t,currentToken:r._initialFocusToken})},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(console.log("[TabsView] _setInitialTabFocus: itemContainer found, children:",i.length),i.length>0&&t>=0&&t<i.length){var o=this._syncTabSelectionState(t);return console.log("[TabsView] _setInitialTabFocus: setting focus to rendered item index",t,o),o.setAttribute("autofocus","true"),e.setSelectChildPosition&&(console.log("[TabsView] _setInitialTabFocus: setting selected position to",t),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(console.log("[TabsView] _setInitialTabFocus: fallback, focusableItems:",s.length),s.length>0&&t>=0&&t<s.length){var l=s[t];console.log("[TabsView] _setInitialTabFocus: setting focus to index",t,l),l.setAttribute("autofocus","true"),n.g.__TV_FOCUS_MANAGER__&&(n.g.__TV_FOCUS_MANAGER__.updateFocusableElements(),n.g.__TV_FOCUS_MANAGER__._doFocusElement(l))}else console.log("[TabsView] _setInitialTabFocus: no focusable items found or invalid index",t,s.length)}else console.log("[TabsView] _setInitialTabFocus: tabList not found")}},{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=fs(fs({},i),{},{data:o});this._pages.set(r,a),console.log("[TabsView] setPageData:",r,i,o,"content:",this._childrenByName.get("content"));var s=this.getChildByName("content");s&&s.setListData&&(console.log("[TabsView] calling content.setListData with:",r,i,o),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,l=this._pages.get(i)||{data:[]},u=Array.isArray(l.data)?l.data:[];s>0&&u.splice(0,s),Array.isArray(a)?l.data=u.concat(a):l.data=u,this._pages.set(i,l);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){console.log("[TabsView] updatePageContent:",e,t)}},{key:"setCurrentPage",value:function(e){if(console.log("[TabsView] setCurrentPage:",e),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(){console.log("[TabsView] focusBackToTop")}},{key:"requestNodeFocus",value:function(e){console.log("[TabsView] requestNodeFocus:",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){console.log("[TabsView] invokeContentFunction:",e,t,n)}},{key:"invokeContentFunctionDirect",value:function(e,t){console.log("[TabsView] invokeContentFunctionDirect:",e,t)}},{key:"contentScrollToFocus",value:function(e){console.log("[TabsView] contentScrollToFocus:",e)}},{key:"updateChildNode",value:function(e,t,n,r){console.log("[TabsView] updateChildNode:",e,t,n)}},{key:"updateRootNode",value:function(e,t,n){console.log("[TabsView] updateRootNode:",e,t)}},{key:"updateItemMatched",value:function(e,t,n){console.log("[TabsView] updateItemMatched:",e,t)}},{key:"blockRootFocus",value:function(){console.log("[TabsView] blockRootFocus")}},{key:"unBlockRootFocus",value:function(){console.log("[TabsView] unBlockRootFocus")}},{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){console.log("[TabsView] dispatchUIFunctionOnChildNode")}},{key:"_dispatchPageChanged",value:function(e){if(e<0||e>=this._tabItems.length)console.log("[TabsView] _dispatchPageChanged: invalid pageIndex",e,"tabItems length:",this._tabItems.length,"instanceId:",this._instanceId);else if(this._lastPageChangedIndex!==e){this._lastPageChangedIndex=e;var t={pageIndex:e,data:this._tabItems[e]||null};console.log("[TabsView] _dispatchPageChanged, pageIndex:",e,"instanceId:",this._instanceId,"events:",this.events),this.dispatchEvent("onPageChanged",t)}else console.log("[TabsView] _dispatchPageChanged: skipping duplicate page changed for index",e,"instanceId:",this._instanceId)}},{key:"_dispatchLoadPageData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n||!this._loadedPageIndices.has(e)){var r={pageIndex:e,itemCount:0,data:this._tabItems[e]||null,useDiff:!!t};console.log("[TabsView] _dispatchLoadPageData, instanceId:",this._instanceId,"pageIndex:",e,"force:",n,"alreadyLoaded:",this._loadedPageIndices.has(e),"loadedIndices:",Array.from(this._loadedPageIndices)),this._loadedPageIndices.add(e),this.dispatchEvent("onLoadPageData",r)}else console.log("[TabsView] _dispatchLoadPageData: skipping already loaded page",e,"instanceId:",this._instanceId)}}])}(Bo);function ms(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 gs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ms(Object(n),!0).forEach(function(t){(0,_.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ms(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bs(e,t,n){return t=yn(t),vn(e,_s()?Reflect.construct(t,n||[],yn(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})()}(0,_.A)(ys,"_instanceCount",0);var ws=function(e){function t(e,n,r){var i;return x(this,t),(i=bs(this,t,[e,n,r])).tagName="RecyclerViewPager",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","RecyclerViewPager"),y(n,i),i._pages=new Map,i._currentIndex=0,i._direction="horizontal",i._contentView=null,i._childrenContainer=i.dom,i}return bn(t,e),P(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=mn(yn(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 l=s[1],u={[l]:o};return void Promise.resolve().then(n.bind(n,814)).then(function(e){(0,e.bindTemplateDataToNode)(r._contentView.dom,u,{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,gs(gs({},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,l=this._pages.get(i)||{data:[]},u=Array.isArray(l.data)?l.data:[];s>0&&u.splice(0,s),Array.isArray(a)?l.data=u.concat(a):l.data=u,this._pages.set(i,l),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){console.log("[ViewPager] insertPageData:",e,t)}},{key:"updateChildNode",value:function(e,t,n,r){console.log("[ViewPager] updateChildNode:",e,t,n)}},{key:"updateRootNode",value:function(e,t,n){console.log("[ViewPager] updateRootNode:",e,t)}},{key:"deleteItemRange",value:function(e,t){console.log("[ViewPager] deleteItemRange:",e,t)}},{key:"destroy",value:function(){this._pages.clear(),this._contentView=null}}])}(Bo);function Es(e,t,n){return t=yn(t),vn(e,ks()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function ks(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ks=function(){return!!e})()}function Ss(e,t,n,r){var i=mn(yn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var As=function(e){function t(e,n,r){var i;return x(this,t),(i=Es(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 ",y(n,i),i._visible=!0,i._transparent=!0,i}return bn(t,e),P(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:Ss(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=Ss(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",{})}}])}(Bo);function xs(e,t,n){return t=yn(t),vn(e,Cs()?Reflect.construct(t,n||[],yn(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 Ls(e,t,n,r){var i=mn(yn(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 x(this,t),(i=xs(this,t,[e,n,r])).tagName="ListView",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","ListView"),i.dom.__listViewInstance=i,y(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="row",i._children=[],i._startGradient=null,i._endGradient=null,i}return bn(t,e),P(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;Ls(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,this._reconcileLayoutDirection();break;case"flexDirection":this._styleFlexDirection=n||"",Ls(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),Ls(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=[],Ls(t,"destroy",this,3)([])}}])}(Bo),Ts=function(e){function t(e,n,r){var i;return x(this,t),(i=xs(this,t,[e,n,r])).tagName="ListViewItem",i.dom=document.createElement("div"),i.dom.setAttribute("data-component-name","ListViewItem"),y(n,i),i.height=0,i.isDirty=!1,i.dirtyListener=null,i}return bn(t,e),P(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),Ls(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;Ls(t,"mounted",this,3)([]),requestAnimationFrame(function(){e.height=e.getItemHeight()})}},{key:"destroy",value:function(){this.dirtyListener=null,Ls(t,"destroy",this,3)([])}}])}(Bo);function Is(e,t,n){return t=yn(t),vn(e,Os()?Reflect.construct(t,n||[],yn(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 Rs(e,t,n,r){var i=mn(yn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Ns=function(e){function t(e,n,r){var i;return x(this,t),(i=Is(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(),y(n,i),i}return bn(t,e),P(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:Rs(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),l=Math.floor((i-s)/a),u=(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*u+r)+1),s=Math.max(4,o*i);t.style.width="".concat(l,"px"),t.style.height="".concat(s,"px"),t.style.left="".concat(n*(l+e._gap),"px")}),e._animationFrame=requestAnimationFrame(n)};n()}},{key:"destroy",value:function(){this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=null),this._bars=[],Rs(t,"destroy",this,3)([])}}])}(Bo);function Ds(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 Ms(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)?Ms(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 Ms(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 Fs(e,t,n){return t=yn(t),vn(e,Vs()?Reflect.construct(t,n||[],yn(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 Bs(e,t,n,r){var i=mn(yn(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}var Ws={};var js=function(e){function t(e,n,r){var i;return x(this,t),(i=Fs(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){Ws[e]=t}(n,i),i}return bn(t,e),P(t,[{key:"mounted",value:function(){Bs(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 Bs(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),l=4;l<n.length;l+=2)s.addColorStop(parseFloat(n[l]),n[l+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]),l=parseFloat(n[5]),u=t.createRadialGradient(r,i,o,a,s,l),c=6;c<n.length;c+=2)u.addColorStop(parseFloat(n[c]),n[c+1]);return u}},{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=Array.isArray(e)?e[0]:e;return t?{imageId:t,width:0,height:0}:{error:"No image source provided"}}},{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){if(e&&e.length>0&&"string"==typeof e[0])try{var t=JSON.parse(e[0]);if(Array.isArray(t)){var n,r=Ds(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()}}}catch(e){}}},{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 Ws[this.id],Bs(t,"beforeUnmount",this,3)([])}}])}(Bo);function Hs(e,t,n){return t=yn(t),vn(e,Us()?Reflect.construct(t,n||[],yn(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 zs=function(e){function t(e,n,r){var i;return x(this,t),(i=Hs(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="",y(n,i),i}return bn(t,e),P(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=mn(yn(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,ht.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(){console.warn("[QtTransitionImage] Image load failed:",e)},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}}])}(Bo),Gs=function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"getDeviceInfo",value:(v=u(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",T(n,{}));case 1:case"end":return e.stop()}},e)})),function(){return v.apply(this,arguments)})},{key:"getESSDKInfo",value:(p=u(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:2.8,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",T(i,t));case 1:case"end":return e.stop()}},e)})),function(){return p.apply(this,arguments)})},{key:"getESSDKVersionCode",value:(f=u(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",T(n,2.8));case 1:case"end":return e.stop()}},e)})),function(){return f.apply(this,arguments)})},{key:"getESSDKVersionName",value:(h=u(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",T(n,"web"));case 1:case"end":return e.stop()}},e)})),function(){return h.apply(this,arguments)})},{key:"getESPackageName",value:(d=u(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",T(i,n));case 1:case"end":return e.stop()}},e)})),function(){return d.apply(this,arguments)})},{key:"getESMiniProgramPath",value:(l=u(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",T(n,""));case 1:case"end":return e.stop()}},e)})),function(){return l.apply(this,arguments)})},{key:"getESAppFilePath",value:(s=u(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",T(n,""));case 1:case"end":return e.stop()}},e)})),function(){return s.apply(this,arguments)})},{key:"getESAppRuntimePath",value:(a=u(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",T(n,"/"));case 1:case"end":return e.stop()}},e)})),function(){return a.apply(this,arguments)})},{key:"getSupportSchemes",value:(o=u(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",T(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 T(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 T(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 T(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 T(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 T(t,null)}},{key:"launchESPage",value:(i=u(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",T(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 T(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 T(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 T(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 T(t,null)}},{key:"isModuleRegistered",value:(r=u(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",T(n,!1));case 1:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)})},{key:"isComponentRegistered",value:(t=u(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",T(n,!1));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"init",value:(e=u(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",I(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,l,d,h,f,p,v}();function Ys(){var e=globalThis;return e&&e.__localStorage||e&&e.localStorage||null}function qs(e){return Qs.apply(this,arguments)}function Qs(){return(Qs=u(c.mark(function e(t){var n,r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((n=Ys())&&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 Ks(e,t){return Xs.apply(this,arguments)}function Xs(){return(Xs=u(c.mark(function e(t,n){var r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((r=Ys())&&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 Zs=function(){return P(function e(t){x(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:(h=u(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",T(r,!0));case 1:case"end":return e.stop()}},e,this)})),function(e){return h.apply(this,arguments)})},{key:"initESSharedPreferences",value:(d=u(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",T(r,!0));case 1:case"end":return e.stop()}},e,this)})),function(e){return d.apply(this,arguments)})},{key:"getBoolean",value:(l=u(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,qs(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",T(o,!!n));case 2:if("true"!==r){e.next=3;break}return e.abrupt("return",T(o,!0));case 3:if("false"!==r){e.next=4;break}return e.abrupt("return",T(o,!1));case 4:if("1"!==r){e.next=5;break}return e.abrupt("return",T(o,!0));case 5:if("0"!==r){e.next=6;break}return e.abrupt("return",T(o,!1));case 6:return e.abrupt("return",T(o,!!n));case 7:case"end":return e.stop()}},e,this)})),function(e,t){return l.apply(this,arguments)})},{key:"putBoolean",value:(s=u(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,Ks(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",T(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return s.apply(this,arguments)})},{key:"getInt",value:(a=u(c.mark(function e(t,n){var r,i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,qs(this._key(String(t)));case 1:for(r=e.sent,i=l.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=l[a];if(null!=r&&""!==r){e.next=2;break}return e.abrupt("return",T(o,Number(n)||0));case 2:return s=Number.parseInt(String(r),10),e.abrupt("return",T(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=u(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,Ks(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",T(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return o.apply(this,arguments)})},{key:"getLong",value:(i=u(c.mark(function e(t,n){var r,i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,qs(this._key(String(t)));case 1:for(r=e.sent,i=l.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=l[a];if(null!=r&&""!==r){e.next=2;break}return e.abrupt("return",T(o,Number(n)||0));case 2:return s=Number.parseInt(String(r),10),e.abrupt("return",T(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=u(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,Ks(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",T(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"getString",value:(n=u(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,qs(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",T(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=u(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,Ks(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",T(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,n){return t.apply(this,arguments)})},{key:"init",value:(e=u(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",I(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,l,d,h}();function Js(){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 $s=function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"getDeviceInfo",value:(a=u(c.mark(function e(){var t,n,r,i,o,a,s,l,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=Js(),n=t.browser,r=t.os,i=t.osVersion,o={deviceType:"web",deviceModel:n,deviceBrand:"web",osName:r,osVersion:i,screenWidth:window.screen.width||0,screenHeight:window.screen.height||0,screenDensity:window.devicePixelRatio||1,platform:"web"},a=u.length,s=new Array(a),l=0;l<a;l++)s[l]=u[l];return e.abrupt("return",T(s,o));case 1:case"end":return e.stop()}},e)})),function(){return a.apply(this,arguments)})},{key:"getSupportSchemes",value:(o=u(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",T(n,[]));case 1:case"end":return e.stop()}},e)})),function(){return o.apply(this,arguments)})},{key:"getVisiblePageSize",value:(i=u(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",T(n,{width:window.innerWidth,height:window.innerHeight}));case 1:case"end":return e.stop()}},e)})),function(){return i.apply(this,arguments)})},{key:"launchEsPage",value:(r=u(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(console.log("[ESNativeModule] launchEsPage called (web - no-op)"),t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",T(n,null));case 1:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)})},{key:"launchNativeApp",value:(n=u(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(console.log("[ESNativeModule] launchNativeApp called (web - no-op)"),t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",T(n,null));case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"launchNativeAppWithPackage",value:function(){console.log("[ESNativeModule] launchNativeAppWithPackage called (web - no-op)");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(t,null)}},{key:"startService",value:function(){console.log("[ESNativeModule] startService called (web - no-op)");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(t,null)}},{key:"finish",value:function(){console.log("[ESNativeModule] finish called (web - no-op)");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(t,null)}},{key:"finishAll",value:function(){console.log("[ESNativeModule] finishAll called (web - no-op)");for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(t,null)}},{key:"callReflect",value:(t=u(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(console.log("[ESNativeModule] callReflect called (web - no-op)"),t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",T(n,null));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"init",value:(e=u(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",I(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}();function el(){var e=globalThis;return e&&e.__localStorage||e&&e.localStorage||null}function tl(e){return nl.apply(this,arguments)}function nl(){return(nl=u(c.mark(function e(t){var n,r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((n=el())&&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 rl(e,t){return il.apply(this,arguments)}function il(){return(il=u(c.mark(function e(t,n){var r,i;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((r=el())&&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 ol=function(){return P(function e(t){x(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:(h=u(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",T(r,!0));case 1:case"end":return e.stop()}},e,this)})),function(e){return h.apply(this,arguments)})},{key:"initESSharedPreferences",value:(d=u(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",T(r,!0));case 1:case"end":return e.stop()}},e,this)})),function(e){return d.apply(this,arguments)})},{key:"getBoolean",value:(l=u(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,tl(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",T(o,!!n));case 2:if("true"!==r){e.next=3;break}return e.abrupt("return",T(o,!0));case 3:if("false"!==r){e.next=4;break}return e.abrupt("return",T(o,!1));case 4:if("1"!==r){e.next=5;break}return e.abrupt("return",T(o,!0));case 5:if("0"!==r){e.next=6;break}return e.abrupt("return",T(o,!1));case 6:return e.abrupt("return",T(o,!!n));case 7:case"end":return e.stop()}},e,this)})),function(e,t){return l.apply(this,arguments)})},{key:"putBoolean",value:(s=u(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,rl(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",T(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return s.apply(this,arguments)})},{key:"getInt",value:(a=u(c.mark(function e(t,n){var r,i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,tl(this._key(String(t)));case 1:for(r=e.sent,i=l.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=l[a];if(null!=r&&""!==r){e.next=2;break}return e.abrupt("return",T(o,Number(n)||0));case 2:return s=Number.parseInt(String(r),10),e.abrupt("return",T(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=u(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,rl(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",T(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return o.apply(this,arguments)})},{key:"getLong",value:(i=u(c.mark(function e(t,n){var r,i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,tl(this._key(String(t)));case 1:for(r=e.sent,i=l.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=l[a];if(null!=r&&""!==r){e.next=2;break}return e.abrupt("return",T(o,Number(n)||0));case 2:return s=Number.parseInt(String(r),10),e.abrupt("return",T(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=u(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,rl(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",T(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"getString",value:(n=u(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,tl(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",T(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=u(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,rl(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",T(o,r));case 2:case"end":return e.stop()}},e,this)})),function(e,n){return t.apply(this,arguments)})},{key:"init",value:(e=u(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",I(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,l,d,h}(),al=null;function sl(){var e=globalThis;return e&&e.__CONFIG__&&e.__CONFIG__.packageName?e.__CONFIG__.packageName:"web"}function ll(){return al||(al={versionCode:1,versionName:"1.0.0",packageName:sl(),channel:"web"}),al}var ul=function(){return P(function e(t){x(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=ll();return r&&"function"==typeof r.resolve&&r.resolve(i),i}},{key:"destroy",value:function(){al=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=ll();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=sl();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=ll().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=ll().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=ll().channel;return r&&"function"==typeof r.resolve&&r.resolve(i),i}},{key:"getVendor",value:function(){return this.getChannel.apply(this,arguments)}}])}(),cl=null,dl=[],hl=!1,fl=0,pl="";function vl(){if(!cl){(cl=document.createElement("div")).id="__es_toast_container__",cl.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(cl);else{var t=document.getElementById("app");t?t.appendChild(cl):(cl.style.position="fixed",document.body.appendChild(cl))}}return cl}function yl(e,t){var n=Date.now();if(!(e===pl&&n-fl<100)){fl=n,pl=e;vl();dl.push({message:e,duration:t}),ml()}}function ml(){if(!hl&&0!==dl.length){hl=!0;var e=dl.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",vl().appendChild(r),r.offsetHeight,r.style.opacity="1",setTimeout(function(){r.style.opacity="0",setTimeout(function(){r.parentNode&&r.parentNode.removeChild(r),hl=!1,ml()},200)},n)}}var gl=function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"showToast",value:function(e){"string"!=typeof e&&(e=String(e)),yl(e,2e3)}},{key:"showLongToast",value:function(e){"string"!=typeof e&&(e=String(e)),yl(e,3500)}},{key:"showShortToast",value:function(e){"string"!=typeof e&&(e=String(e)),yl(e,2e3)}},{key:"destroy",value:function(){cl&&cl.parentNode&&(cl.parentNode.removeChild(cl),cl=null),dl=[],hl=!1}},{key:"init",value:function(){return Promise.resolve(!0)}}])}(),bl=(new gl,function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.mode="normal",this.enabled=!0},[{key:"init",value:(t=u(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",I(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=u(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",T(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 _l={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(_l)}var El=function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"setDefaultFocusBorderCorner",value:function(e){_l.cornerRadius="number"==typeof e?e:0,_l.cornerEnabled=!0,console.log("[FocusModule] setDefaultFocusBorderCorner:",_l.cornerRadius),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 T(n,null)}},{key:"setDefaultFocusBorderColor",value:function(e){_l.borderColor=e||"#FFFFFF",_l.borderColorEnabled=!0,console.log("[FocusModule] setDefaultFocusBorderColor:",_l.borderColor),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 T(n,null)}},{key:"setDefaultFocusBorderWidth",value:function(e){_l.borderWidth="number"==typeof e?e:2,_l.borderWidthEnabled=!0,console.log("[FocusModule] setDefaultFocusBorderWidth:",_l.borderWidth),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 T(n,null)}},{key:"setFocusBorderInsetValue",value:function(e){_l.borderInset="number"==typeof e?e:0,_l.borderInsetEnabled=!0,console.log("[FocusModule] setFocusBorderInsetValue:",_l.borderInset),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 T(n,null)}},{key:"setDefaultFocusInnerBorderEnable",value:function(e){_l.innerBorderEnabled=!0===e,console.log("[FocusModule] setDefaultFocusInnerBorderEnable:",_l.innerBorderEnabled),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 T(n,null)}},{key:"setDefaultPlaceholderFocusScale",value:function(e){_l.focusScale="number"==typeof e?e:1,console.log("[FocusModule] setDefaultPlaceholderFocusScale:",_l.focusScale),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 T(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 T(t,_l)}},{key:"init",value:(e=u(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 El;function kl(){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 Sl=null;function Al(){return Sl||(Sl=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}}()),Sl}var xl=function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"getDeviceBrand",value:(Q=u(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(Al(),t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",T(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return Q.apply(this,arguments)})},{key:"getDeviceModel",value:(q=u(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=Al(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(r,t.browser||"Browser"));case 1:case"end":return e.stop()}},e)})),function(){return q.apply(this,arguments)})},{key:"getDeviceCpu",value:(Y=u(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=Al(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(r,"".concat(t.cpuCores," cores")));case 1:case"end":return e.stop()}},e)})),function(){return Y.apply(this,arguments)})},{key:"getDeviceCpuCores",value:(G=u(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=Al(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(r,t.cpuCores));case 1:case"end":return e.stop()}},e)})),function(){return G.apply(this,arguments)})},{key:"getDeviceMemory",value:(z=u(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=Al(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(r,t.memory));case 1:case"end":return e.stop()}},e)})),function(){return z.apply(this,arguments)})},{key:"getDeviceStorage",value:(U=u(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",T(n,i.quota||0));case 3:e.prev=3,e.catch(1);case 4:return e.abrupt("return",T(n,0));case 5:case"end":return e.stop()}},e,null,[[1,3]])})),function(){return U.apply(this,arguments)})},{key:"getDeviceResolution",value:(H=u(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=Al(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(r,"".concat(t.screenWidth,"x").concat(t.screenHeight)));case 1:case"end":return e.stop()}},e)})),function(){return H.apply(this,arguments)})},{key:"getDevice5G",value:(j=u(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(kl(),t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",T(n,!1));case 1:case"end":return e.stop()}},e)})),function(){return j.apply(this,arguments)})},{key:"getDeviceLinkSpeed",value:(W=u(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=kl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(r,t.downlink));case 1:case"end":return e.stop()}},e)})),function(){return W.apply(this,arguments)})},{key:"getDeviceManufacture",value:(B=u(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",T(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return B.apply(this,arguments)})},{key:"getDeviceBoard",value:(V=u(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",T(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return V.apply(this,arguments)})},{key:"getDevicePlatform",value:(F=u(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=Al(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(r,t.platform||"Web"));case 1:case"end":return e.stop()}},e)})),function(){return F.apply(this,arguments)})},{key:"getDeviceHard",value:(M=u(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",T(n,"Web"));case 1:case"end":return e.stop()}},e)})),function(){return M.apply(this,arguments)})},{key:"getDeviceArchitecture",value:(D=u(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=Al(),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",T(r,"arm64"));case 1:if(!/x86_64|amd64/i.test(t.ua)){e.next=2;break}return e.abrupt("return",T(r,"x86_64"));case 2:return e.abrupt("return",T(r,"unknown"));case 3:case"end":return e.stop()}},e)})),function(){return D.apply(this,arguments)})},{key:"getDeviceClockSpeed",value:(N=u(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",T(n,0));case 1:case"end":return e.stop()}},e)})),function(){return N.apply(this,arguments)})},{key:"getDeviceAndroidVersion",value:(R=u(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=Al(),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",T(r,t.osVersion));case 1:return e.abrupt("return",T(r,""));case 2:case"end":return e.stop()}},e)})),function(){return R.apply(this,arguments)})},{key:"getDeviceApiVersion",value:(O=u(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",T(n,0));case 1:case"end":return e.stop()}},e)})),function(){return O.apply(this,arguments)})},{key:"getDeviceAndroidId",value:(L=u(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",T(n,""));case 1:case"end":return e.stop()}},e)})),function(){return L.apply(this,arguments)})},{key:"getDeviceBuildId",value:(C=u(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",T(n,"web"));case 1:case"end":return e.stop()}},e)})),function(){return C.apply(this,arguments)})},{key:"getDeviceRoot",value:(A=u(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",T(n,!1));case 1:case"end":return e.stop()}},e)})),function(){return A.apply(this,arguments)})},{key:"getDeviceFreeStore",value:(S=u(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",T(n,(i.quota||0)-(i.usage||0)));case 3:e.prev=3,e.catch(1);case 4:return e.abrupt("return",T(n,0));case 5:case"end":return e.stop()}},e,null,[[1,3]])})),function(){return S.apply(this,arguments)})},{key:"getNetworkState",value:(k=u(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=kl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(r,{connected:navigator.onLine,type:t.effectiveType}));case 1:case"end":return e.stop()}},e)})),function(){return k.apply(this,arguments)})},{key:"getNetworkType",value:(E=u(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=kl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(r,t.effectiveType));case 1:case"end":return e.stop()}},e)})),function(){return E.apply(this,arguments)})},{key:"getSSID",value:(w=u(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",T(n,""));case 1:case"end":return e.stop()}},e)})),function(){return w.apply(this,arguments)})},{key:"getMac",value:(_=u(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",T(n,""));case 1:case"end":return e.stop()}},e)})),function(){return _.apply(this,arguments)})},{key:"getIp",value:(b=u(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",T(n,""));case 1:case"end":return e.stop()}},e)})),function(){return b.apply(this,arguments)})},{key:"getDeviceDns",value:(g=u(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",T(n,""));case 1:case"end":return e.stop()}},e)})),function(){return g.apply(this,arguments)})},{key:"getWifiVersion",value:(m=u(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",T(n,""));case 1:case"end":return e.stop()}},e)})),function(){return m.apply(this,arguments)})},{key:"getDisplayInformation",value:(y=u(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=Al(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(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=u(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",T(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",T(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=u(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=Al(),n=kl(),r=a.length,i=new Array(r),o=0;o<r;o++)i[o]=a[o];return e.abrupt("return",T(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=u(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=Al(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(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:(h=u(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=Al(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(r,{cores:t.cpuCores,memory:t.memory}));case 1:case"end":return e.stop()}},e)})),function(){return h.apply(this,arguments)})},{key:"getAndroidInfo",value:(d=u(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",T(n,null));case 1:case"end":return e.stop()}},e)})),function(){return d.apply(this,arguments)})},{key:"getStoreInfo",value:(l=u(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",T(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",T(n,{total:0,used:0,free:0}));case 5:case"end":return e.stop()}},e,null,[[1,3]])})),function(){return l.apply(this,arguments)})},{key:"getNetInfo",value:(s=u(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=kl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(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=u(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",T(n,""));case 1:case"end":return e.stop()}},e)})),function(){return a.apply(this,arguments)})},{key:"getUsbInfo",value:(o=u(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",T(n,[]));case 1:case"end":return e.stop()}},e)})),function(){return o.apply(this,arguments)})},{key:"getBluetoothInfo",value:(i=u(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",T(r,{available:t,devices:[]}));case 1:case"end":return e.stop()}},e)})),function(){return i.apply(this,arguments)})},{key:"permissionHandler",value:(r=u(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",T(n,{granted:!0}));case 1:case"end":return e.stop()}},e)})),function(){return r.apply(this,arguments)})},{key:"getNetworkProtocol",value:(n=u(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",T(n,"https:"===location.protocol?"https":"http"));case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"getNetworkSpeed",value:(t=u(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=kl(),n=o.length,r=new Array(n),i=0;i<n;i++)r[i]=o[i];return e.abrupt("return",T(r,t.downlink));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"init",value:(e=u(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",I(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,l,d,h,f,p,v,y,m,g,b,_,w,E,k,S,A,C,L,O,R,N,D,M,F,V,B,W,j,H,U,z,G,Y,q,Q}();new xl;function Cl(e,t){return e&&e.packageName?"".concat("es_group_data_").concat(e.packageName,"_").concat(t):null}function Ll(e,t,n){var r=Cl(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){console.warn("[ESGroupDataModule] Error reading from storage:",e)}return Promise.resolve(n)}function Pl(e,t,n,r,i){var o=Cl(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 console.warn("[ESGroupDataModule] Error writing to storage:",e),Promise.resolve(!1)}}var Tl=0,Il=1,Ol=3,Rl=4,Nl=5,Dl=6,Ml=function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.mode="normal"},[{key:"getBoolean",value:(p=u(c.mark(function e(t,n,r){var i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Ll(t,n,r);case 1:for(i=e.sent,o=l.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=l[s];return e.abrupt("return",T(a,i));case 2:case"end":return e.stop()}},e)})),function(e,t,n){return p.apply(this,arguments)})},{key:"putBoolean",value:(f=u(c.mark(function e(t,n,r,i){var o,a,s,l,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Pl(t,n,r,i,Rl);case 1:for(o=e.sent,a=u.length,s=new Array(a>4?a-4:0),l=4;l<a;l++)s[l-4]=u[l];return e.abrupt("return",T(s,o));case 2:case"end":return e.stop()}},e)})),function(e,t,n,r){return f.apply(this,arguments)})},{key:"getInt",value:(h=u(c.mark(function e(t,n,r){var i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Ll(t,n,r);case 1:for(i=e.sent,o=l.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=l[s];return e.abrupt("return",T(a,i));case 2:case"end":return e.stop()}},e)})),function(e,t,n){return h.apply(this,arguments)})},{key:"putInt",value:(d=u(c.mark(function e(t,n,r,i){var o,a,s,l,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Pl(t,n,r,i,Tl);case 1:for(o=e.sent,a=u.length,s=new Array(a>4?a-4:0),l=4;l<a;l++)s[l-4]=u[l];return e.abrupt("return",T(s,o));case 2:case"end":return e.stop()}},e)})),function(e,t,n,r){return d.apply(this,arguments)})},{key:"getLong",value:(l=u(c.mark(function e(t,n,r){var i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Ll(t,n,r);case 1:for(i=e.sent,o=l.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=l[s];return e.abrupt("return",T(a,i));case 2:case"end":return e.stop()}},e)})),function(e,t,n){return l.apply(this,arguments)})},{key:"putLong",value:(s=u(c.mark(function e(t,n,r,i){var o,a,s,l,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Pl(t,n,r,i,Il);case 1:for(o=e.sent,a=u.length,s=new Array(a>4?a-4:0),l=4;l<a;l++)s[l-4]=u[l];return e.abrupt("return",T(s,o));case 2:case"end":return e.stop()}},e)})),function(e,t,n,r){return s.apply(this,arguments)})},{key:"getString",value:(a=u(c.mark(function e(t,n,r){var i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Ll(t,n,r);case 1:for(i=e.sent,o=l.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=l[s];return e.abrupt("return",T(a,i));case 2:case"end":return e.stop()}},e)})),function(e,t,n){return a.apply(this,arguments)})},{key:"putString",value:(o=u(c.mark(function e(t,n,r,i){var o,a,s,l,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Pl(t,n,r,i,Ol);case 1:for(o=e.sent,a=u.length,s=new Array(a>4?a-4:0),l=4;l<a;l++)s[l-4]=u[l];return e.abrupt("return",T(s,o));case 2:case"end":return e.stop()}},e)})),function(e,t,n,r){return o.apply(this,arguments)})},{key:"getArray",value:(i=u(c.mark(function e(t,n,r){var i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Ll(t,n,r);case 1:for(i=e.sent,o=l.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=l[s];return e.abrupt("return",T(a,i));case 2:case"end":return e.stop()}},e)})),function(e,t,n){return i.apply(this,arguments)})},{key:"putArray",value:(r=u(c.mark(function e(t,n,r,i){var o,a,s,l,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Pl(t,n,r,i,Dl);case 1:for(o=e.sent,a=u.length,s=new Array(a>4?a-4:0),l=4;l<a;l++)s[l-4]=u[l];return e.abrupt("return",T(s,o));case 2:case"end":return e.stop()}},e)})),function(e,t,n,i){return r.apply(this,arguments)})},{key:"getMap",value:(n=u(c.mark(function e(t,n,r){var i,o,a,s,l=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Ll(t,n,r);case 1:for(i=e.sent,o=l.length,a=new Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=l[s];return e.abrupt("return",T(a,i));case 2:case"end":return e.stop()}},e)})),function(e,t,r){return n.apply(this,arguments)})},{key:"putMap",value:(t=u(c.mark(function e(t,n,r,i){var o,a,s,l,u=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Pl(t,n,r,i,Nl);case 1:for(o=e.sent,a=u.length,s=new Array(a>4?a-4:0),l=4;l<a;l++)s[l-4]=u[l];return e.abrupt("return",T(s,o));case 2:case"end":return e.stop()}},e)})),function(e,n,r,i){return t.apply(this,arguments)})},{key:"init",value:(e=u(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",I(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,l,d,h,f,p}(),Fl=(new Ml,function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.userId="",this.level=0,this.enabled=!0},[{key:"init",value:(o=u(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",I(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,console.log("[HLog] UserId set to: ".concat(e))}},{key:"initLog",value:(i=u(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,console.log("[HLog] Initialized with type: ".concat(t,", level: ").concat(n,", url: ").concat(r)),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",T(o,!0));case 1:case"end":return e.stop()}},e,this)})),function(e,t,n){return i.apply(this,arguments)})},{key:"setLevel",value:(r=u(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,console.log("[HLog] Level set to: ".concat(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",T(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(){console.log("[HLog] Flush called (no-op in web)")}},{key:"getVersion",value:(n=u(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",T(n,"web-1.0.0"));case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"upLoad",value:function(e){console.log("[HLog] Upload called for dates: ".concat(JSON.stringify(e)," (no-op in web)"))}},{key:"detectTask",value:function(){console.log("[HLog] DetectTask called (no-op in web)")}},{key:"getSendFilePath",value:(t=u(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(console.log("[HLog] GetSendFilePath called for dates: ".concat(JSON.stringify(t)," (no-op in web)")),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",T(r,""));case 1:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})},{key:"getAllFileInfo",value:(e=u(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(console.log("[HLog] GetAllFileInfo called (no-op in web)"),t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",T(n,[]));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})}]);var e,t,n,r,i,o}()),Vl=function(){return P(function e(t){x(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:(l=u(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",I(n));case 1:case"end":return e.stop()}},e)})),function(){return l.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,console.log("[ESAndroidAudioPlayer] Initialized with looping: ".concat(e))}},{key:"play",value:function(e){var t=this._getOrCreateAudioElement();this.currentUrl=e,t.src=e,t.play().catch(function(e){console.error("[ESAndroidAudioPlayer] Play error:",e)}),console.log("[ESAndroidAudioPlayer] Playing: ".concat(e))}},{key:"start",value:function(){var e=this._getOrCreateAudioElement();e.src&&e.play().catch(function(e){console.error("[ESAndroidAudioPlayer] Start error:",e)})}},{key:"pause",value:function(){this._getOrCreateAudioElement().pause(),console.log("[ESAndroidAudioPlayer] Paused")}},{key:"resume",value:function(){this._getOrCreateAudioElement().play().catch(function(e){console.error("[ESAndroidAudioPlayer] Resume error:",e)}),console.log("[ESAndroidAudioPlayer] Resumed")}},{key:"seekTo",value:function(e){this._getOrCreateAudioElement().currentTime=e/1e3,console.log("[ESAndroidAudioPlayer] Seek to: ".concat(e,"ms"))}},{key:"stop",value:function(){var e=this._getOrCreateAudioElement();e.pause(),e.currentTime=0,console.log("[ESAndroidAudioPlayer] Stopped")}},{key:"setPlayRate",value:function(e){this._getOrCreateAudioElement().playbackRate=e,this.playRate=e,console.log("[ESAndroidAudioPlayer] Play rate set to: ".concat(e))}},{key:"setVolume",value:function(e){this._getOrCreateAudioElement().volume=e,this.leftVolume=e,this.rightVolume=e,console.log("[ESAndroidAudioPlayer] Volume set to: ".concat(e))}},{key:"setLeftRightVolume",value:function(e,t){var n=(e+t)/2;this._getOrCreateAudioElement().volume=n,this.leftVolume=e,this.rightVolume=t,console.log("[ESAndroidAudioPlayer] Left/Right volume set to: ".concat(e,"/").concat(t))}},{key:"reset",value:function(){var e=this._getOrCreateAudioElement();e.pause(),e.currentTime=0,e.src="",this.currentUrl="",console.log("[ESAndroidAudioPlayer] Reset")}},{key:"release",value:function(){this.destroy(),console.log("[ESAndroidAudioPlayer] Released")}},{key:"isPlaying",value:(s=u(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",T(i,n));case 1:case"end":return e.stop()}},e,this)})),function(){return s.apply(this,arguments)})},{key:"isPaused",value:(a=u(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",T(r,t.paused));case 1:case"end":return e.stop()}},e,this)})),function(){return a.apply(this,arguments)})},{key:"getDuration",value:(o=u(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",T(i,n));case 1:case"end":return e.stop()}},e,this)})),function(){return o.apply(this,arguments)})},{key:"getCurrentPosition",value:(i=u(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",T(i,n));case 1:case"end":return e.stop()}},e,this)})),function(){return i.apply(this,arguments)})},{key:"getBufferPercentage",value:(r=u(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",T(r,a));case 1:return e.abrupt("return",T(r,0));case 2:case"end":return e.stop()}},e,this)})),function(){return r.apply(this,arguments)})},{key:"getCurrentPlayRate",value:(n=u(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",T(n,this.playRate));case 1:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"getLeftVolume",value:(t=u(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",T(n,this.leftVolume));case 1:case"end":return e.stop()}},e,this)})),function(){return t.apply(this,arguments)})},{key:"getRightVolume",value:(e=u(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",T(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,l}(),Bl=function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.playerType=1,this.mediaCodec=!0},[{key:"init",value:(n=u(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",I(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,console.log("[ESPlayerIJK] Player type set to: ".concat(e))}},{key:"getPlayerType",value:(t=u(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",T(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,console.log("[ESPlayerIJK] Media codec set to: ".concat(e))}},{key:"getMediaCodec",value:(e=u(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",T(n,this.mediaCodec));case 1:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})}]);var e,t,n}(),Wl=function(){return P(function e(t){x(this,e),this.context=t,this.name="",this.storageListeners=[]},[{key:"init",value:(o=u(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",I(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(){console.log("[BoxInstall] Storage receiver registered (no-op in web)")}},{key:"unregisterExtraStorageReceiver",value:function(){console.log("[BoxInstall] Storage receiver unregistered (no-op in web)"),this.storageListeners=[]}},{key:"installApkByPath",value:(i=u(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(console.log("[BoxInstall] Install APK called for package: ".concat(t,", path: ").concat(n," (no-op in web)")),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",T(i,!1));case 1:case"end":return e.stop()}},e)})),function(e,t){return i.apply(this,arguments)})},{key:"copyFile2Disk",value:(r=u(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(console.log("[BoxInstall] Copy file called: ".concat(t," -> ").concat(n," (no-op in web)")),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",T(i,!1));case 1:case"end":return e.stop()}},e)})),function(e,t){return r.apply(this,arguments)})},{key:"getAppVersionCodeByPkgName",value:(n=u(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(console.log("[BoxInstall] Get app version for: ".concat(t," (no-op in web)")),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",T(r,-1));case 1:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)})},{key:"getUsbDevices",value:(t=u(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(console.log("[BoxInstall] Get USB devices called (no-op in web)"),t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",T(n,[]));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"requestUsbPermission",value:(e=u(c.mark(function e(){var t,n,r,i=arguments;return c.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(console.log("[BoxInstall] Request USB permission called (no-op in web)"),t=i.length,n=new Array(t),r=0;r<t;r++)n[r]=i[r];return e.abrupt("return",T(n,!1));case 1:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})}]);var e,t,n,r,i,o}(),jl=new Map,Hl=new Map,Ul=function(){return P(function e(t){x(this,e),this.context=t},[{key:"init",value:(e=u(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",I(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(){jl.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,Hl.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=Hl.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&&jl.delete(r),{success:!0}}},{key:"releaseCanvas",value:function(e,t,n){var r=t&&t[0];return r&&Hl.delete(r),{success:!0}}}]);var e}();function zl(e,t,n){return t=yn(t),vn(e,Gl()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function Gl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gl=function(){return!!e})()}(0,_.A)(Ul,"name","CanvasModule");var Yl=function(e){function t(e,n,r){var i;return x(this,t),(i=zl(this,t,[e,n,r])).tagName="text-v2",i}return bn(t,e),P(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=mn(yn(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}}])}($o);function ql(e,t,n){return t=yn(t),vn(e,Ql()?Reflect.construct(t,n||[],yn(e).constructor):t.apply(e,n))}function Ql(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ql=function(){return!!e})()}var Kl={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},Xl=function(e){function t(e,n,r){var i;return x(this,t),(i=ql(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=Kl.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,y(n,i),i._bindVideoEvents(),i}return bn(t,e),P(t,[{key:"_bindVideoEvents",value:function(){var e=this,t=this.dom;t.addEventListener("play",function(){e._playerState=Kl.ES_PLAYER_STATE_PLAYING,e._dispatchPlayerStatusChanged()}),t.addEventListener("pause",function(){e._playerState=Kl.ES_PLAYER_STATE_PAUSED,e._dispatchPlayerStatusChanged()}),t.addEventListener("ended",function(){e._playerState=Kl.ES_PLAYER_STATE_COMPLETED,e._dispatchPlayerStatusChanged(),e._dispatchEvent("onPlayerCompleted")}),t.addEventListener("error",function(n){var r,i,o,a;console.error("[IJKPlayerComponent] Video error:",{code:null===(r=n.target.error)||void 0===r?void 0:r.code,message:null===(i=n.target.error)||void 0===i?void 0:i.message,src:t.src,currentSrc:t.currentSrc,originalUrl:e._originalUrl,networkState:t.networkState,readyState:t.readyState}),e._playerState=Kl.ES_PLAYER_STATE_ERROR,e._dispatchEvent("onPlayerError",{errorCode:(null===(o=n.target.error)||void 0===o?void 0:o.code)||-1,errorMessage:(null===(a=n.target.error)||void 0===a?void 0:a.message)||"Video error"}),e._dispatchPlayerStatusChanged()}),t.addEventListener("loadedmetadata",function(){console.log("[IJKPlayerComponent] loadedmetadata:",{videoWidth:t.videoWidth,videoHeight:t.videoHeight,duration:t.duration}),e._playerState=Kl.ES_PLAYER_STATE_PREPARED,e._dispatchPlayerStatusChanged(),e._dispatchAspectRatioChanged(),e._dispatchEvent("onPlayerPrepared"),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Kl.ES_PLAYER_STATE_VIDEO_SIZE_CHANGED,playerState:Kl.ES_PLAYER_STATE_VIDEO_SIZE_CHANGED,playerWidth:t.videoWidth||0,playerHeight:t.videoHeight||0}),!1!==e._autoPlay&&(console.log("[IJKPlayerComponent] Auto playing video after loadedmetadata"),t.play().catch(function(){console.log("[IJKPlayerComponent] Auto play blocked by browser, waiting for user interaction")}))}),t.addEventListener("canplay",function(){console.log("[IJKPlayerComponent] canplay - video is ready to play")}),t.addEventListener("loadstart",function(){console.log("[IJKPlayerComponent] loadstart request info:",{originalUrl:e._originalUrl,assignedSrc:t.src,currentSrc:t.currentSrc})}),t.addEventListener("canplaythrough",function(){console.log("[IJKPlayerComponent] canplaythrough - video can play without buffering")}),t.addEventListener("loadstart",function(){console.log("[IJKPlayerComponent] loadstart - video loading started")}),t.addEventListener("progress",function(){console.log("[IJKPlayerComponent] progress - video buffering progress")}),t.addEventListener("canplay",function(){e._playerState<Kl.ES_PLAYER_STATE_PREPARED&&(e._playerState=Kl.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:Kl.ES_PLAYER_STATE_SET_PLAY_RATE_SUCCESS,playerState:Kl.ES_PLAYER_STATE_SET_PLAY_RATE_SUCCESS})}),t.addEventListener("waiting",function(){e._dispatchEvent("onPlayerBufferStart"),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Kl.ES_PLAYER_STATE_BUFFER_START,playerState:Kl.ES_PLAYER_STATE_BUFFER_START})}),t.addEventListener("canplaythrough",function(){e._dispatchEvent("onPlayerBufferEnd"),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Kl.ES_PLAYER_STATE_BUFFER_END,playerState:Kl.ES_PLAYER_STATE_BUFFER_END})}),t.addEventListener("playing",function(){e._dispatchEvent("onPlayerResumed"),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Kl.ES_PLAYER_STATE_RESUMED,playerState:Kl.ES_PLAYER_STATE_RESUMED})}),t.addEventListener("seeking",function(){e._dispatchEvent("onPlayerSeekStart"),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Kl.ES_PLAYER_STATE_SEEK_START,playerState:Kl.ES_PLAYER_STATE_SEEK_START})}),t.addEventListener("seeked",function(){e._dispatchEvent("onPlayerSeekCompleted"),e._dispatchEvent("onPlayerStatusChanged",{playerStatus:Kl.ES_PLAYER_STATE_SEEK_COMPLETED,playerState:Kl.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){console.error("[IJKPlayerComponent] Duration callback error:",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){console.error("[IJKPlayerComponent] Buffer percent callback error:",e)}}}}),t.addEventListener("loadstart",function(){e._playerState=Kl.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){console.error("[IJKPlayerComponent] Progress callback error:",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&&g(this._currentSid),this._currentSid=n,void(n?(m(n,this),this.dom.setAttribute("sid",String(n)),console.log("[IJKPlayerComponent] Registered with sid:",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=mn(yn(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(){console.log("[IJKPlayerComponent] init called"),this._playerState=Kl.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(console.log("[IJKPlayerComponent] play called with:",{url:n,aspectRatio:r,leftVolume:i,options:o}),n){var a,l,u=ln(n);this._originalUrl=n,this._url=u,console.log("[IJKPlayerComponent] resolved play url:",{originalUrl:n,proxyUrl:u}),this._autoPlay=!1!==(null==o?void 0:o.autoPlay),this.dom.src=u;var c=void 0!==i?parseFloat(i):1;this.dom.volume=Math.max(0,Math.min(1,c)),void 0!==(null==o?void 0:o.loop)&&(this.dom.loop=o.loop),this._setAspectRatio(r||0),this._playerState=Kl.ES_PLAYER_STATE_PREPARING,this._dispatchPlayerStatusChanged(),console.log("[IJKPlayerComponent] Video element dimensions:",{width:this.dom.offsetWidth,height:this.dom.offsetHeight,parentWidth:null===(a=this.dom.parentElement)||void 0===a?void 0:a.offsetWidth,parentHeight:null===(l=this.dom.parentElement)||void 0===l?void 0:l.offsetHeight,style:this.dom.style.cssText}),this.dom.load()}}},{key:"start",value:function(e){var t=s(e,1)[0];console.log("[IJKPlayerComponent] start called with progress:",t),t&&t>0&&(this.dom.currentTime=t/1e3),this.dom.play().catch(function(e){console.error("[IJKPlayerComponent] Play error:",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=Kl.ES_PLAYER_STATE_STOPPED,this._dispatchPlayerStatusChanged()}},{key:"release",value:function(){this._destroyed=!0,this.dom.pause(),this.dom.src="",this._playerState=Kl.ES_PLAYER_STATE_RELEASED,this._currentSid&&(g(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===Kl.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:Kl.ES_PLAYER_STATE_PLAYER_INITIALIZED,playerState:Kl.ES_PLAYER_STATE_PLAYER_INITIALIZED}),this._dispatchEvent("onPlayerStatusChanged",{playerStatus:Kl.ES_PLAYER_STATE_INITIALIZE_SUCCESS,playerState:Kl.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),Zl=zo(Uo,"View"),Jl=zo($o,"Text"),$l={View:Zl,Text:Jl,Image:zo(ia,"Image"),ListView:Ps,ListViewItem:Ts,ScrollView:zo(Uo,"ScrollView"),TextInput:zo(Uo,"TextInput"),WebView:Fa,ViewPager:zo(Uo,"ViewPager"),FastListView:Sa,TextView:Jl,ESPageRouterView:zo(Uo,"ESPageRouterView"),ESPageRootView:Xo,ESSlotRootView:zo(Uo,"ESSlotRootView"),ESSlotView:zo(Uo,"ESSlotView"),LoadingViewComponent:Pa,AnimationViewComponent:Na,ESWebViewComponent:Fa,ESX5WebViewComponent:Fa,QrCodeComponent:Ha,TVProgressBarViewComponent:Ya,TVSeekBarViewComponent:Xa,TVListViewComponent:Sa,ItemFrameComponent:$a,ItemStoreView:rs,RippleViewComponent:ss,FastFlexView:sa,FastItemView:ds,TabsView:ys,RecyclerViewPager:ws,Modal:As,TextV2Component:Yl,TransitionImageComponent:zs,IJKPlayerComponent:Xl,ESPlayMarkViewComponent:Ns,CanvasView2D:js,CanvasComponent:js};function eu(e){e.start({id:"app",name:A,params:{business:A,data:{}}}),console.log("[Web Renderer] Engine started")}console.log("[Web Runtime] === Starting ==="),n.g.__ORIGINAL_FETCH__=n.g.fetch.bind(n.g),window.addEventListener("error",function(e){var t,n=(null===(t=e.error)||void 0===t?void 0:t.message)||e.message||"";if(n.includes("No match for")&&n.includes('"lifecycle"')){console.error("[Web Runtime] 检测到路由版本过低错误");var r=document.createElement("div");r.id="router-upgrade-notice",r.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999999;\n background: rgba(0, 0, 0, 0.9);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n ",r.innerHTML='\n <div style="\n background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);\n border: 2px solid #e94560;\n border-radius: 16px;\n padding: 40px 50px;\n max-width: 500px;\n text-align: center;\n box-shadow: 0 20px 60px rgba(233, 69, 96, 0.3);\n ">\n <div style="font-size: 48px; margin-bottom: 20px;">⚠️</div>\n <h2 style="color: #e94560; margin: 0 0 16px 0; font-size: 24px;">路由版本过低</h2>\n <p style="color: #ccc; line-height: 1.8; margin: 0 0 24px 0;">\n 当前项目使用的 <code style="color: #4fc3f7; background: rgba(79, 195, 247, 0.1); padding: 2px 8px; border-radius: 4px;">@extscreen/es3-router</code> 版本过低\n </p>\n <div style="\n background: #0f0f23;\n border-radius: 8px;\n padding: 16px;\n margin-bottom: 24px;\n font-family: \'Monaco\', \'Menlo\', monospace;\n font-size: 14px;\n color: #4fc3f7;\n ">\n npm install @extscreen/es3-router@^3.0.1\n </div>\n <p style="color: #888; font-size: 13px; margin: 0;">\n 请升级至 <strong style="color: #4fc3f7;">3.0.1</strong> 或更高版本后重新构建\n </p>\n <button id="close-router-notice" style="\n margin-top: 24px;\n background: #e94560;\n border: none;\n color: white;\n padding: 12px 32px;\n border-radius: 8px;\n font-size: 14px;\n cursor: pointer;\n transition: all 0.2s;\n ">关闭</button>\n </div>\n ',document.body.appendChild(r),document.getElementById("close-router-notice").onclick=function(){r.remove()},e.preventDefault()}});var tu="files";function nu(){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(tu)||t.createObjectStore(tu)}})}function ru(e,t,n){return iu.apply(this,arguments)}function iu(){return(iu=u(d().mark(function e(t,n,r){var i;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,nu();case 1:return i=e.sent,e.abrupt("return",new Promise(function(e,o){var a=i.transaction(tu,"readwrite");a.objectStore(tu).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 ou(){return au.apply(this,arguments)}function au(){return(au=u(d().mark(function e(){var t;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,nu();case 1:return t=e.sent,e.abrupt("return",new Promise(function(e,n){var r=t.transaction(tu,"readonly").objectStore(tu).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 su(){return lu.apply(this,arguments)}function lu(){return(lu=u(d().mark(function e(){var t;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,nu();case 1:return t=e.sent,e.abrupt("return",new Promise(function(e,n){var r=t.transaction(tu,"readwrite");r.objectStore(tu).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 uu={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),l=0;l<o.length;l++)a[l]=o.charCodeAt(l);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("/")):"",console.log("[VirtualFS] Loaded from cache:",this.files.size/2,"files, entry:",this.entryFile,", baseDir:",this.baseDir);var n=Array.from(this.files.keys()).filter(function(e){return!e.startsWith("/")}).slice(0,10);console.log("[VirtualFS] Sample file paths:",n),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 console.log("[VirtualFS.get] Found directly:",t),n;if(this.baseDir){var r=this.baseDir+"/"+t;if(n=this.files.get(r)||this.files.get("/"+r))return console.log("[VirtualFS] Found with baseDir:",t,"->",r),n}return console.log("[VirtualFS.get] NOT found:",e,"(normalized:",t,", baseDir:",this.baseDir,")"),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 cu(){return du.apply(this,arguments)}function du(){return(du=u(d().mark(function e(){return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",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(){console.log("[Web Runtime] JSZip loaded"),e(window.JSZip)},n.onerror=function(){return t(new Error("Failed to load JSZip"))},document.head.appendChild(n)}}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function hu(e){return!e.includes("__MACOSX/")&&(!e.split("/").pop().startsWith("._")&&(!e.endsWith(".DS_Store")&&!e.toLowerCase().endsWith(".thumbs.db")))}function fu(e){return pu.apply(this,arguments)}function pu(){return(pu=u(d().mark(function e(t){var n,r,i,o,a,s,l,u;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,cu();case 1:return n=e.sent,console.log("[Web Runtime] Extracting ZIP:",t.name),e.next=2,n.loadAsync(t);case 2:return r=e.sent,i={},o=0,a=[],r.forEach(function(e,t){if(!t.dir)if(hu(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)});a.push(n)}else o++}),e.next=3,Promise.all(a);case 3:if(console.log("[Web Runtime] ZIP extracted:",Object.keys(i).length,"files, skipped:",o),s=Object.keys(i),(l=s.find(function(e){return e.endsWith("index.bundle")}))||(l=s.find(function(e){return e.endsWith("index.android.js")})),l||(l=s.find(function(e){return e.match(/index\.(android|hippy)\.js$/)})),l||(l=s.find(function(e){return e.endsWith(".bundle")})),l||(l=s.find(function(e){return e.endsWith(".js")})),l){e.next=4;break}throw new Error("No bundle entry found in ZIP");case 4:return console.log("[Web Runtime] Entry file:",l),e.next=5,ru(i,l,t.name);case 5:console.log("[Web Runtime] Files saved to IndexedDB, refreshing page..."),(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 vu(e,t){return yu.apply(this,arguments)}function yu(){return yu=u(d().mark(function e(t,n){var r,i,o,a,s,l,u,c,h,f,p,v,y,m,g,b,_,w=arguments;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=w.length>2&&void 0!==w[2]&&w[2],e.next=1,cu();case 1:return i=e.sent,o=t,r&&((a=new URL(t)).searchParams.set("_t",Date.now().toString()),o=a.toString(),console.log("[Web Runtime] Force refresh - cache-busted URL")),console.log("[Web Runtime] Downloading ZIP from URL:",t),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,l="remote-bundle.zip";try{u=new URL(t),c=u.pathname,(h=c.split("/").pop())&&h.endsWith(".zip")&&(l=h)}catch(e){}return console.log("[Web Runtime] ZIP downloaded, size:",s.byteLength,"bytes"),n&&n(50,"正在解压 ZIP 包..."),e.next=3,i.loadAsync(s);case 3:return f=e.sent,p={},v=0,y=0,m=Object.keys(f.files).filter(function(e){return!f.files[e].dir&&hu(e)}).length,g=[],f.forEach(function(e,t){t.dir||(hu(e)?g.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/m*40);n(o,"正在解压... (".concat(v,"/").concat(m,")"))}})):y++)}),e.next=4,Promise.all(g);case 4:if(console.log("[Web Runtime] ZIP extracted:",v,"files, skipped:",y),n&&n(95,"正在保存到缓存..."),b=Object.keys(p),(_=b.find(function(e){return e.endsWith("index.bundle")}))||(_=b.find(function(e){return e.endsWith("index.android.js")})),_||(_=b.find(function(e){return e.match(/index\.(android|hippy)\.js$/)})),_||(_=b.find(function(e){return e.endsWith(".bundle")})),_||(_=b.find(function(e){return e.endsWith(".js")})),_){e.next=5;break}throw new Error("ZIP 包中未找到有效的入口文件 (index.bundle 或 index.android.js)");case 5:return console.log("[Web Runtime] Entry file:",_),e.next=6,ru(p,_,l);case 6:n&&n(100,"准备加载..."),uu.loadFromData({files:p,entryFile:_,zipName:l});case 7:case"end":return e.stop()}},e)})),yu.apply(this,arguments)}function mu(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 gu(e){return bu.apply(this,arguments)}function bu(){return(bu=u(d().mark(function e(t){var n,r,i,o;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=uu.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=Eu(),o=i+r,e.abrupt("return",new Promise(function(e,t){try{var n=document.createElement("script");n.textContent=o,document.body.appendChild(n),e()}catch(e){t(e)}}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}console.log("[Web Runtime] VirtualFS and ZIP support initialized");var _u="";function wu(e){_u=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),console.log("[Web Runtime] externalBundleBaseDir:",_u)}function Eu(){var e=JSON.stringify(uu&&uu.baseDir?"/":_u||"/");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 ku(e){return"string"==typeof e&&/\$\{[^}]+\}/.test(e)}function Su(e){if(ku(e))return e;var t=function(e){if(!_u||"string"!=typeof e||!e)return e;if(ku(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=_u.replace(/^https?:\/\/[^/]+/,"");return n.startsWith(r.replace(/^\//,""))?e:"".concat(_u).concat(n).concat(t.search).concat(t.hash)}catch(t){var i=e.replace(/^\//,"");if(!i)return e;var o=_u.replace(/^https?:\/\/[^/]+/,"");return i.startsWith(o.replace(/^\//,""))?e:"".concat(_u).concat(i)}}(e);return t!==e&&console.log("[Web Runtime] external bundle asset resolved:",e,"->",t),t}if("undefined"==typeof localStorage){var Au={};n.g.localStorage={getItem:function(e){return Au[e]||null},setItem:function(e,t){Au[e]=String(t)},removeItem:function(e){delete Au[e]},clear:function(){Object.keys(Au).forEach(function(e){return delete Au[e]})}}}function xu(e){if("string"!=typeof e)return e;if(e.startsWith("hpfile://")){var t=e.replace(/^hpfile:\/\/\.?\//,"/").replace(/^hpfile:\/\//,"/");return console.log("[convertHpfilePath] hpfile:// converted:",e,"->",t),t}if(/https?:\/\/[^/:]+:38989\//.test(e)){var n=e.replace(/https?:\/\/[^/:]+:38989\/[a-f0-9]{32}\//,"/bundles-dev/").replace(/https?:\/\/[^/:]+:38989\//,"/bundles-dev/");return console.log("[convertHpfilePath] 38989 port URL:",e,"->",n),n}return e}function Cu(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 Lu=Element.prototype.setAttribute;Element.prototype.setAttribute=function(e,t){var n=e.toLowerCase();if("SCRIPT"===this.tagName&&"src"===n){if(console.log("[setAttribute] Script src:",t,"VirtualFS.baseDir:",null==uu?void 0:uu.baseDir),uu){var r=t;try{r=new URL(t,window.location.origin).pathname}catch(e){}var i=r.replace(/^\//,""),o=uu.baseDir?uu.baseDir+"/"+i:i;if(uu.has(o)){console.log("[VirtualFS] setAttribute injecting:",o);var a=uu.get(o);return Cu(this,(new TextDecoder).decode(a)),void(this._virtualSrc=t)}if(uu.has(i)){console.log("[VirtualFS] setAttribute injecting:",i);var s=uu.get(i);return Cu(this,(new TextDecoder).decode(s)),void(this._virtualSrc=t)}}var l=Su(t);if(l!==t)return Lu.call(this,e,l)}if("IMG"===this.tagName&&"src"===n){console.log("[setAttribute] Image src:",t);var u=xu(t);if(uu){var c=u.replace(/^\//,""),d=uu.baseDir?uu.baseDir+"/"+c:c;if(uu.has(d)){console.log("[VirtualFS] setAttribute loading image:",d);var h=uu.get(d),f=new Blob([h],{type:mu(d)}),p=URL.createObjectURL(f);return Lu.call(this,e,p)}}if(uu&&uu.has(u)){console.log("[VirtualFS] setAttribute loading image:",u);var v=uu.get(u),y=new Blob([v],{type:mu(u)}),m=URL.createObjectURL(y);return Lu.call(this,e,m)}var g=Su(u);if(g!==u)return Lu.call(this,e,g);if(u!==t)return Lu.call(this,e,u)}if("style"===n&&"string"==typeof t){var b=Ru(t);if(b!==t)return console.log("[setAttribute] style converted:",t,"->",b),Lu.call(this,e,b)}if("src"===n||"href"===n||"data-src"===n){var _=Su(xu(t));if(_!==t)return Lu.call(this,e,_)}return Lu.call(this,e,t)};var Pu=document.createElement.bind(document);document.createElement=function(e,t){var n=Pu(e,t);if("script"===e.toLowerCase()){var r=Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype,"src"),i=Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype,"textContent");if(!r||!i)return console.warn("[Web Runtime] Script descriptor not available, skipping patch"),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){console.log("[createElement Script.src] Setting:",e,"VirtualFS.baseDir:",null==uu?void 0:uu.baseDir);var t=e.replace(/^\//,"");if(uu){var r=uu.baseDir?uu.baseDir+"/"+t:t;if(uu.has(r)){console.log("[VirtualFS] Loading script from cache:",r);var i=uu.get(r);return void(n.__vfsContent=(new TextDecoder).decode(i))}}if(uu&&uu.has(t)){console.log("[VirtualFS] Loading script from cache:",t);var o=uu.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&&(console.log("[MutationObserver] Script added:",t,"VirtualFS.baseDir:",null==uu?void 0:uu.baseDir),t&&uu)){var n=t;try{n=new URL(t,window.location.origin).pathname}catch(e){}var r=n.replace(/^\//,""),i=uu.baseDir?uu.baseDir+"/"+r:r;if(console.log("[MutationObserver] Looking for:",i,"has:",uu.has(i)),uu.has(i)){console.log("[VirtualFS] Injecting script content for:",i);var o=uu.get(i),a=(new TextDecoder).decode(o);e.removeAttribute("src"),e.textContent=a,setTimeout(function(){return e.dispatchEvent(new Event("load"))},0)}else if(uu.has(r)){console.log("[VirtualFS] Injecting script content for:",r);var s=uu.get(r),l=(new TextDecoder).decode(s);e.removeAttribute("src"),e.textContent=l,setTimeout(function(){return e.dispatchEvent(new Event("load"))},0)}}if(t&&!uu){var u=Su(t);u!==t&&(e.src=u)}})})}).observe(document.documentElement,{childList:!0,subtree:!0});var Tu=Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype,"src");if(Tu){var Iu=Tu.get,Ou=Tu.set;Object.defineProperty(HTMLScriptElement.prototype,"src",{get(){return this._virtualSrc?this._virtualSrc:Iu.call(this)},set(e){var t=this;console.log("[Script.src] Setting:",e,"VirtualFS.baseDir:",null==uu?void 0:uu.baseDir);var n=Su(xu(e));if(uu&&uu.has&&uu.has(n)){console.log("[VirtualFS] Intercepting script src:",n),this._virtualSrc=n;var r=uu.get(n);return Cu(this,(new TextDecoder).decode(r)),setTimeout(function(){return t.dispatchEvent(new Event("load"))},0),n}if(uu){var i=n.replace(/^\//,""),o=uu.baseDir?uu.baseDir+"/"+i:i;if(console.log("[Script.src] Trying with baseDir:",o,"has:",uu.has(o)),uu.has(o)){console.log("[VirtualFS] Intercepting script src with baseDir:",n,"->",o),this._virtualSrc=o;var a=uu.get(o);return Cu(this,(new TextDecoder).decode(a)),setTimeout(function(){return t.dispatchEvent(new Event("load"))},0),o}}return n!==e&&console.log("[Web Runtime] Script.src converted",e,"->",n),Ou.call(this,n)},configurable:!0,enumerable:!0})}function Ru(e){if("string"!=typeof e)return e;if(e.startsWith("hpfile://")){var t=e.replace(/^hpfile:\/\/\.?\//,"/").replace(/^hpfile:\/\//,"/");if(console.log("[CSS URL] Direct hpfile:// converted:",e,"->",t),uu&&t.startsWith("/assets/")){var n=t.replace(/^\//,""),r=uu.baseDir?uu.baseDir+"/"+n:n;if(uu.has(r)){console.log("[CSS URL] Loading from VirtualFS:",r);var i=uu.get(r),o=new Blob([i],{type:mu(r)}),a=URL.createObjectURL(o);return"url(".concat(a,")")}}if(uu&&uu.has(t)){console.log("[CSS URL] Loading from VirtualFS:",t);var s=uu.get(t),l=new Blob([s],{type:mu(t)}),u=URL.createObjectURL(l);return"url(".concat(u,")")}return"url(".concat(Su(t),")")}return e.replace(/url\(['"]?(hpfile:\/\/[^'")\s]+)['"]?\)/gi,function(e,t){var n=t.replace(/^hpfile:\/\/\.?\//,"/").replace(/^hpfile:\/\//,"/");if(console.log("[CSS URL] Converted:",t,"->",n),uu&&n.startsWith("/assets/")){var r=n.replace(/^\//,""),i=uu.baseDir?uu.baseDir+"/"+r:r;if(uu.has(i)){console.log("[CSS URL] Loading from VirtualFS:",i);var o=uu.get(i),a=new Blob([o],{type:mu(i)}),s=URL.createObjectURL(a);return"url(".concat(s,")")}}if(uu&&uu.has(n)){console.log("[CSS URL] Loading from VirtualFS:",n);var l=uu.get(n),u=new Blob([l],{type:mu(n)}),c=URL.createObjectURL(u);return"url(".concat(c,")")}return"url(".concat(Su(n),")")})}var Nu=Object.getOwnPropertyDescriptor(CSSStyleDeclaration.prototype,"cssText");if(Nu&&Nu.set){var Du=Nu.set;Object.defineProperty(CSSStyleDeclaration.prototype,"cssText",{get:Nu.get,set(e){console.log("[cssText] Setting:",e);var t=Ru(e);return Du.call(this,t)},configurable:!0})}var Mu=CSSStyleDeclaration.prototype.setProperty;CSSStyleDeclaration.prototype.setProperty=function(e,t,n){var r=e.toLowerCase();if("background-image"===r||"background"===r){console.log("[setProperty] Setting:",e,"=",t);var i=Ru(t);return Mu.call(this,e,i,n)}return Mu.call(this,e,t,n)};var Fu=Object.getOwnPropertyDescriptor(CSSStyleDeclaration.prototype,"backgroundImage");if(Fu&&Fu.set){var Vu=Fu.set;Object.defineProperty(CSSStyleDeclaration.prototype,"backgroundImage",{get:Fu.get,set(e){console.log("[backgroundImage] Setting:",e);var t=Ru(e);return Vu.call(this,t)},configurable:!0})}var Bu=Object.getOwnPropertyDescriptor(CSSStyleDeclaration.prototype,"background");if(Bu&&Bu.set){var Wu=Bu.set;Object.defineProperty(CSSStyleDeclaration.prototype,"background",{get:Bu.get,set(e){console.log("[background] Setting:",e);var t=Ru(e);return Wu.call(this,t)},configurable:!0})}var ju=Object.getOwnPropertyDescriptor(HTMLImageElement.prototype,"src");if(ju){var Hu=ju.get,Uu=ju.set;Object.defineProperty(HTMLImageElement.prototype,"src",{get(){return Hu.call(this)},set(e){console.log("[Image.src] Setting:",e,"VirtualFS.baseDir:",null==uu?void 0:uu.baseDir);var t=Su(xu(e));if(console.log("[Image.src] After convertHpfilePath:",t),uu&&t.startsWith("/assets/")){var n=t.replace(/^\//,""),r=uu.baseDir?uu.baseDir+"/"+n:n;if(console.log("[Image.src] Looking for asset:",n,"withBaseDir:",r),console.log("[Image.src] VirtualFS.has(withBaseDir):",uu.has(r)),uu.has(r)){console.log("[VirtualFS] Loading image from cache:",r);var i=uu.get(r),o=new Blob([i],{type:mu(r)}),a=URL.createObjectURL(o);return Uu.call(this,a)}console.log("[Image.src] Asset not found in VirtualFS:",r)}if(uu&&uu.has(t)){console.log("[VirtualFS] Loading image from cache:",t);var s=uu.get(t),l=new Blob([s],{type:mu(t)}),u=URL.createObjectURL(l);return Uu.call(this,u)}return t!==e&&console.log("[Web Runtime] Image.src converted",e,"->",t),Uu.call(this,t)},configurable:!0,enumerable:!0})}var zu=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"src");if(zu){var Gu=zu.get,Yu=zu.set;Object.defineProperty(HTMLMediaElement.prototype,"src",{get(){return Gu.call(this)},set(e){if(console.log("[Media.src] Setting:",e,"VirtualFS.baseDir:",null==uu?void 0:uu.baseDir),"string"==typeof e&&/^https?:\/\//i.test(e))return console.log("[Media.src] Network URL detected, using directly:",e),Yu.call(this,e);if("string"==typeof e&&e.startsWith("//"))return console.log("[Media.src] Protocol-relative URL detected, using directly:",e),Yu.call(this,e);var t=Su(xu(e));if(uu&&t.startsWith("/assets/")){var n=t.replace(/^\//,""),r=uu.baseDir?uu.baseDir+"/"+n:n;if(uu.has(r)){console.log("[VirtualFS] Loading media from cache:",r);var i=uu.get(r),o=new Blob([i],{type:mu(r)}),a=URL.createObjectURL(o);return Yu.call(this,a)}}if(uu&&t.startsWith("/")&&uu.has(t)){console.log("[VirtualFS] Loading media from cache:",t);var s=uu.get(t),l=new Blob([s],{type:mu(t)}),u=URL.createObjectURL(l);return Yu.call(this,u)}return t!==e&&console.log("[Web Runtime] Media.src converted",e,"->",t),Yu.call(this,t)},configurable:!0,enumerable:!0})}if("undefined"!=typeof fetch){var qu=n.g.fetch;n.g.fetch=function(e,t){var n=e;"string"==typeof e?n=e:e instanceof Request&&(n=e.url),console.log("[fetch] URL:",n);var r=xu(n);if(uu&&r.startsWith("/")){if(r.startsWith("/assets/")){var i=r.replace(/^\//,""),o=uu.baseDir?uu.baseDir+"/"+i:i;if(uu.has(o)){console.log("[fetch] VirtualFS serving:",o);var a=uu.get(o);return Promise.resolve(new Response(a,{status:200,headers:{"Content-Type":mu(o)}}))}}if(uu.has(r)){console.log("[fetch] VirtualFS serving:",r);var s=uu.get(r);return Promise.resolve(new Response(s,{status:200,headers:{"Content-Type":mu(r)}}))}}return r!==n&&(console.log("[fetch] Converted:",n,"->",r),"string"==typeof e?e=r:e instanceof Request&&(e=new Request(r,t))),qu(e,t)}}console.log("[Web Runtime] hpfile:// protocol handler installed"),n.g.__ES_LAST_SDK_INFO__={eskit_ver_code:2.8},n.g.__ES_APP_READY__=!0,console.log("[Web Runtime] ES SDK info and APP_READY pre-initialized"),globalThis.__nativeLocalStorage=cn,globalThis.__localStorage=hn,Object.defineProperty(window,"localStorage",{value:hn,writable:!1,configurable:!0}),console.log("[AsyncLocalStorage] Initialized - localStorage methods now return Promises"),un(),n.g.__WEB_COMPONENTS__=n.g.__WEB_COMPONENTS__||{},n.g.__WEB_COMPONENTS__.IJKPlayerComponent=Xl,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)}},console.log("[Web Renderer] Installed SceneBuilder with addEventListener support")}}(),console.log("[Web Runtime] Components:",Object.keys($l));var Qu=function(){console.log("[Web Renderer] Creating HippyWebEngine...");var e=Tr.create({modules:{ESModule:Gs,ESLocalStorageModule:Zs,EsNativeModule:$s,AndroidSharedPreferencesModule:ol,AndroidDevelopModule:ul,AndroidNetworkModule:H,AndroidFileModule:tt,ESToastModule:gl,RuntimeDeviceModule:K,ESIJKAudioPlayerModule:Ie,ESSoundPoolAudioPlayerModule:He,ESLogModule:bl,FastListModule:ya,FocusModule:El,ESDeviceInfoModule:xl,ESGroupDataModule:Ml,ESDownloadModule:dt,ESHLogModule:Fl,ESAndroidAudioPlayerModule:Vl,ESPlayerIJKModule:Bl,BoxInstallModule:Wl,CanvasModule:Ul},components:$l});return console.log("[Web Renderer] Engine created"),e}();!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},console.log("[Web Renderer] Patched async function detection for es3-router compatibility"),function(e){h=e}(e),function(e){if(!_t){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,l,u,c){var d;if(console.log("hippyCallNatives",a,l,u,c),"AndroidFileModule"===a&&console.log("[Web Renderer] AndroidFileModule check - __WEB_MODULES__:",Object.keys(n.g.__WEB_MODULES__||{})),"ExtendModule"!==a||"callUIFunction"!==l){if("ESIJKAudioPlayerModule"===a){var h,f=null===(h=n.g.__WEB_MODULES__)||void 0===h?void 0:h.ESIJKAudioPlayerModule;if(f&&"function"==typeof f[l]){console.log("[Web Renderer] ESIJKAudioPlayerModule (hippyCallNatives):",l,"callId:",u,"params:",c);var p=f[l].apply(f,[u].concat(E(c||[])));return p&&"function"==typeof p.catch?p.catch(function(e){console.warn("[Web Renderer] ESIJKAudioPlayerModule error:",e)}):p}}if("ESSoundPoolAudioPlayerModule"===a||"ESSoundPoolPlayerModule"===a){var v,y=null===(v=n.g.__WEB_MODULES__)||void 0===v?void 0:v.ESSoundPoolAudioPlayerModule;if(y&&"function"==typeof y[l]){console.log("[Web Renderer] "+a+" (hippyCallNatives):",l,"callId:",u,"params:",c);var m={resolve:function(e){var t,r=null===(t=n.g.__GLOBAL__)||void 0===t||null===(t=t.moduleCallList)||void 0===t?void 0:t[u];r&&"function"==typeof r.cb&&(r.cb(e),0!==r.type&&1!==r.type||delete n.g.__GLOBAL__.moduleCallList[u])},reject:function(e){var t,r=null===(t=n.g.__GLOBAL__)||void 0===t||null===(t=t.moduleCallList)||void 0===t?void 0:t[u];r&&"function"==typeof r.reject&&(r.reject(e),0!==r.type&&1!==r.type||delete n.g.__GLOBAL__.moduleCallList[u])}},g=y[l].apply(y,E(c||[]).concat([m]));return g&&"function"==typeof g.catch?g.catch(function(e){console.warn("[Web Renderer] "+a+" error:",e)}):g}}if("AndroidFileModule"!==a){if("ESDownloadModule"!==a){var _=!(null==e||null===(d=e.modules)||void 0===d||!d[a]);if(console.log("[Web Renderer] hasModule check:",a,"hasModule:",_,"engine.modules:",Object.keys((null==e?void 0:e.modules)||{})),!_){if(console.error("[Web Renderer] Module ".concat(a," not found!")),r.has(l))return t("ESLocalStorageModule",l,u,c);if(i.has(l))return t("ESModule",l,u,c);if(o.has(l))return t("AndroidDevelopModule",l,u,c)}if("UIManagerModule"===a&&("createNode"===l||"updateNode"===l||"deleteNode"===l)){var w=s(c||[],2),k=w[0],S=w[1];if(Array.isArray(S)){var A=S.map(function(e){return Array.isArray(e)?e:[e,null]});return t(a,l,u,[k,A])}}return t(a,l,u,c)}var x,C,L=(null==e||null===(x=e.modules)||void 0===x?void 0:x.ESDownloadModule)||(null===(C=n.g.__WEB_MODULES__)||void 0===C?void 0:C.ESDownloadModule);if(console.log("[Web Renderer] ESDownloadModule (hippyCallNatives):",l,"callId:",u,"params:",c,"dlModule:",!!L),L&&"function"==typeof L[l]){var P={resolve:function(e){var t,r=null===(t=n.g.__GLOBAL__)||void 0===t||null===(t=t.moduleCallList)||void 0===t?void 0:t[u];r&&"function"==typeof r.cb&&(r.cb(e),0!==r.type&&1!==r.type||delete n.g.__GLOBAL__.moduleCallList[u])},reject:function(e){var t,r=null===(t=n.g.__GLOBAL__)||void 0===t||null===(t=t.moduleCallList)||void 0===t?void 0:t[u];r&&"function"==typeof r.reject&&(r.reject(e),0!==r.type&&1!==r.type||delete n.g.__GLOBAL__.moduleCallList[u])}},T=L[l].apply(L,E(c||[]).concat([P]));return T&&"function"==typeof T.catch?T.catch(function(e){console.warn("[Web Renderer] ESDownloadModule error:",e)}):T}console.warn("[Web Renderer] ESDownloadModule not found in engine.modules or __WEB_MODULES__, returning empty result")}else{var I,O,R=(null==e||null===(I=e.modules)||void 0===I?void 0:I.AndroidFileModule)||(null===(O=n.g.__WEB_MODULES__)||void 0===O?void 0:O.AndroidFileModule);if(console.log("[Web Renderer] AndroidFileModule (hippyCallNatives):",l,"callId:",u,"params:",c,"fileModule:",!!R,"engine:",!!e,"engine.modules:",Object.keys((null==e?void 0:e.modules)||{}),"__WEB_MODULES__:",Object.keys(n.g.__WEB_MODULES__||{})),R&&"function"==typeof R[l]){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[u];r&&"function"==typeof r.cb&&(r.cb(e),0!==r.type&&1!==r.type||delete n.g.__GLOBAL__.moduleCallList[u])},reject:function(e){var t,r=null===(t=n.g.__GLOBAL__)||void 0===t||null===(t=t.moduleCallList)||void 0===t?void 0:t[u];r&&"function"==typeof r.reject&&(r.reject(e),0!==r.type&&1!==r.type||delete n.g.__GLOBAL__.moduleCallList[u])}},D=R[l].apply(R,E(c||[]).concat([N]));return D&&"function"==typeof D.catch?D.catch(function(e){console.warn("[Web Renderer] AndroidFileModule error:",e)}):D}console.warn("[Web Renderer] AndroidFileModule not found in engine.modules or __WEB_MODULES__, returning empty result")}}else{var M=s(c||[],3),F=M[0],V=M[1],B=M[2];if(console.log("[Web Renderer] ExtendModule.callUIFunction:",{sid:F,funcName:V,args:B}),!F||!V)return void console.warn("[Web Renderer] ExtendModule.callUIFunction missing sid or funcName");var W=b(F);if(W&&"function"==typeof W[V]){console.log("[Web Renderer] Calling",V,"on component with sid:",F);try{return W[V].apply(W,E(B||[]))}catch(e){console.error("[Web Renderer] Error calling",V,":",e)}}else W?console.warn("[Web Renderer] Component with sid:",F,"has no method:",V):console.warn("[Web Renderer] Component not found for sid:",F)}},_t=!0}}}(e),function(){var e;if(!bt){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 l,u=null===(l=n.g.__WEB_MODULES__)||void 0===l?void 0:l.ESIJKAudioPlayerModule;if(u&&"function"==typeof u[t]){console.log("[Web Renderer] ESIJKAudioPlayerModule:",t,"args:",o);var c=u[t].apply(u,[-1].concat(o));return c&&"function"==typeof c.catch?c.catch(function(e){console.warn("[Web Renderer] ESIJKAudioPlayerModule error:",e)}):c}}if("ESSoundPoolAudioPlayerModule"===e||"ESSoundPoolPlayerModule"===e){var d,h=null===(d=n.g.__WEB_MODULES__)||void 0===d?void 0:d.ESSoundPoolAudioPlayerModule;if(h&&"function"==typeof h[t]){console.log("[Web Renderer] "+e+":",t,"args:",o);var f=h[t].apply(h,o);return f&&"function"==typeof f.catch?f.catch(function(t){console.warn("[Web Renderer] "+e+" error:",t)}):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]){console.log("[Web Renderer] AndroidFileModule:",t,"args:",o);var y=v[t].apply(v,o);return y&&"function"==typeof y.catch?y.catch(function(e){console.warn("[Web Renderer] AndroidFileModule error:",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]){console.log("[Web Renderer] ESDownloadModule:",t,"args:",o);var _=g[t].apply(g,o);return _&&"function"==typeof _.catch?_.catch(function(e){console.warn("[Web Renderer] ESDownloadModule error:",e)}):_}}if("UIManagerModule"===e){if("addEventListener"===t){var w=o[0],E=o[1],A=o[2];console.log("[Web Renderer] addEventListener:",{id:w,eventName:E});var x=b(w);return void(x&&x.addEventListener?(x.addEventListener(E,A),console.log("[Web Renderer] Event listener registered:",E,"on component",x.tagName)):console.warn("[Web Renderer] Component not found or no addEventListener for id:",w))}if("removeEventListener"===t){var C=o[0],L=o[1],P=o[2];console.log("[Web Renderer] removeEventListener:",{id:C,eventName:L});var T=b(C);return void(T&&T.removeEventListener&&T.removeEventListener(L,P))}if("callUIFunction"===t){var I,O,R,N;if(Array.isArray(o[0])){var D=o[0],M=o[1],F=s(D||[],3);I=F[0],O=F[1],R=F[2],N=M}else I=o[0],O=o[1],R=o[2],N=o[3];console.log("[Web Renderer] callUIFunction:",{nodeId:I,funcName:O,paramList:R});var V=b(I);if(V&&"function"==typeof V[O]){console.log("[Web Renderer] Calling",O,"on component",V.tagName);try{var B=V[O](R);return N&&"function"==typeof N&&N(B),B}catch(e){console.error("[Web Renderer] Error calling",O,":",e)}}else V?console.warn("[Web Renderer] Component",V.tagName,"has no method:",O):console.warn("[Web Renderer] Component not found for id:",I);return}if("createNode"===t){var W=o[0],j=o[1];if(Array.isArray(j)){var H=!1;if(j.forEach(function(e){var t=e;Array.isArray(e)&&(t=e[0]),t&&"ESPageRootView"===t.name&&(H=!0)}),H){console.log("[Web Renderer] 检测到新页面创建,保存当前页面焦点");var U=n.g.__TV_FOCUS_MANAGER__;U&&"function"==typeof U.saveCurrentPageFocus&&U.saveCurrentPageFocus()}var z=j.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"),console.log("[Web Renderer] Creating node:",t.id,"name:",t.name),gt||"app"!==t.pId&&t.pId!==W||(gt=t.id,console.log("[Web Renderer] ROOT NODE detected: id="+gt),t.props&&(t.props.style=t.props.style||{},t.props.style.width=k,t.props.style.height=S,delete t.props.style.flex))),Array.isArray(e)?[t,n]:t});return r(e,t,W,z)}}if("updateNode"===t){var G=o[0],Y=o[1];if(Array.isArray(Y)){var q=Y.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"),gt&&t.id===gt&&t.props&&(t.props.style=t.props.style||{},t.props.style.width=k,t.props.style.height=S,delete t.props.style.flex)),[t,n]});return r(e,t,G,q)}}if("deleteNode"===t){var Q=o[0],K=o[1];if(Array.isArray(K)){var X=K.map(function(e){return Array.isArray(e)?e:[e]});return X.forEach(function(e){var t=e;if(Array.isArray(e)&&(t=e[0]),t&&"object"==typeof t&&(console.log("[Web Renderer] Deleting node:",t.id,"name:",t.name),"ESPageRootView"===t.name)){console.log("[Web Renderer] ESPageRootView 被删除,通知焦点管理器恢复上一个页面焦点");var r=n.g.__TV_FOCUS_MANAGER__;r&&"function"==typeof r.restorePreviousPageFocus&&setTimeout(function(){r.restorePreviousPageFocus()},50)}}),r(e,t,Q,X)}}}if("ESNetworkSpeedModule"===e&&ot&&"function"==typeof ot[t])return console.log("[Web Renderer] ESNetworkSpeedModule:",t,o),void ot[t].apply(ot,o);if("ESPluginModule"!==e)return r.apply(void 0,[e,t].concat(o));if(console.log("[Web Renderer] ESPluginModule call: ".concat(t),o),"install"===t){var Z=Array.isArray(o[0])?o[0][0]:o[0],J=null==Z?void 0:Z.pkg;return console.log("[Web Renderer] ESPluginModule.install: ".concat(J),Z),ae("onESPluginStateChanged",{success:!0,pkg:J,status:0,msg:"Plugin installed successfully (web)"}),void console.log("[Web Renderer] Plugin ".concat(J," install completed (web)"))}},bt=!0,console.log("[Web Renderer] Patched Hippy.bridge.callNative")}else console.error("[Web Renderer] Hippy.bridge not available!")}}(),function(){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);t.callNativeWithPromise=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(console.log("[Web Renderer] callNativeWithPromise:",e,t,o),"ESIJKAudioPlayerModule"===e){var s,l=null===(s=n.g.__WEB_MODULES__)||void 0===s?void 0:s.ESIJKAudioPlayerModule;if(l&&"function"==typeof l[t]){console.log("[Web Renderer] ESIJKAudioPlayerModule (Promise):",t,o);var u=l[t].apply(l,[-1].concat(o));return u instanceof Promise?u:Promise.resolve(u)}}if("RuntimeDeviceModule"===e&&X&&"function"==typeof X[t]){console.log("[Web Renderer] RuntimeDeviceModule (Promise):",t,o);var c=X[t].apply(X,o);return c instanceof Promise?c:Promise.resolve(c)}if("AndroidDeviceModule"===e&&R&&"function"==typeof R[t]){console.log("[Web Renderer] AndroidDeviceModule (Promise):",t,o);var d=R[t].apply(R,o);return d instanceof Promise?d:Promise.resolve(d)}if("AndroidNetworkModule"===e&&U&&"function"==typeof U[t]){console.log("[Web Renderer] AndroidNetworkModule (Promise):",t,o);var h=U[t].apply(U,o);return h instanceof Promise?h:Promise.resolve(h)}if("ESSoundPoolAudioPlayerModule"===e||"ESSoundPoolPlayerModule"===e){var f,p=null===(f=n.g.__WEB_MODULES__)||void 0===f?void 0:f.ESSoundPoolAudioPlayerModule;if(p&&"function"==typeof p[t]){console.log("[Web Renderer] "+e+" (Promise):",t,"args:",o);var y=p[t].apply(p,o);return y instanceof Promise?y:Promise.resolve(y)}}if("AndroidFileModule"===e){var m,g,b=v(),_=(null==b||null===(m=b.modules)||void 0===m?void 0:m.AndroidFileModule)||(null===(g=n.g.__WEB_MODULES__)||void 0===g?void 0:g.AndroidFileModule);if(console.log("[Web Renderer] AndroidFileModule (Promise):",t,"args:",o,"fileModule:",!!_,"engine.modules:",Object.keys((null==b?void 0:b.modules)||{}),"__WEB_MODULES__:",Object.keys(n.g.__WEB_MODULES__||{})),_&&"function"==typeof _[t]){var w=_[t].apply(_,o);return w instanceof Promise?w:Promise.resolve(w)}}return r.apply(void 0,[e,t].concat(o))},console.log("[Web Renderer] Patched Hippy.bridge.callNativeWithPromise")}else console.log("[Web Renderer] Hippy.bridge.callNativeWithPromise not available")}(),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=b(e);if(s&&"function"==typeof s[t]){console.log("[Web Renderer] Retry successful - Calling",t,"on component",s.tagName);try{var l=s[t](n);return r&&"function"==typeof r&&r(l),l}catch(e){console.error("[Web Renderer] Error calling",t,":",e)}}else o>0?(console.log("[Web Renderer] Component not found for id:",e,"- retrying in",a,"ms (retries left:",o,")"),setTimeout(function(){i(e,t,n,r,o-1,a)},a)):console.warn("[Web Renderer] Retry exhausted - Component still not found for id:",e)},n.g.Hippy.document.callUIFunction=function(e,t,n,o){var a,s,l,u,c;Array.isArray(e)&&"function"==typeof t?(s=e[0],l=e[1],u=e[2],c=t):(s=e,l=t,u=n,c=o),console.log("[Web Renderer] Hippy.document.callUIFunction:",{nodeId:s,funcName:l,paramsLength:null===(a=u)||void 0===a?void 0:a.length});var d=b(s);if(d&&"function"==typeof d[l]){var h;console.log("[Web Renderer] Calling",l,"on component",d.tagName,"with",null===(h=u)||void 0===h?void 0:h.length,"params");try{var f=d[l](u);return c&&"function"==typeof c&&c(f),f}catch(e){console.error("[Web Renderer] Error calling",l,":",e)}}else{if(!d)return void i(s,l,u,c);console.warn("[Web Renderer] Component",d.tagName,"has no method:",l)}return r(s,l,u,c)},console.log("[Web Renderer] Patched Hippy.document.callUIFunction"),wt(),Et(),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=(0,ht.Zd)(Lt(e,t));i(e,n)},r._setElementStylePatched=!0,console.log("[Web Renderer] Patched HippyWeb.setElementStyle for focus styles")}}(e),Pt(),Tt||(Tt=new MutationObserver(function(){return Pt()})).observe(document.head,{childList:!0,subtree:!0}),!It(e)){var o=function(){It(e)?console.log("[Web Renderer] UIManagerModule patched via requestAnimationFrame"):requestAnimationFrame(o)};requestAnimationFrame(o)}}(Qu);var Ku=new Zt;n.g.__TV_FOCUS_MANAGER__=Ku,console.log("[Web Runtime] TVFocusManager ready");var Xu=document.createElement("style");Xu.id="web-runtime-css",Xu.textContent='\n #app, #app * { align-items: flex-start; }\n [style*="align-items"] { align-items: var(--align-items, center) !important; }\n',document.head.appendChild(Xu);var Zu=new URLSearchParams(window.location.search);function Ju(e){return $u.apply(this,arguments)}function $u(){return($u=u(d().mark(function e(t){var n,r,i,o;return d().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 console.log("[Web Runtime] Vendor not found, skipping"),e.abrupt("return",!1);case 2:return e.next=3,n.text();case 3:return r=e.sent,r=Eu()+r,(i=document.createElement("script")).textContent=r,document.body.appendChild(i),console.log("[Web Runtime] Vendor loaded"),e.abrupt("return",!0);case 4:return e.prev=4,o=e.catch(0),console.log("[Web Runtime] Vendor load failed:",o),e.abrupt("return",!1);case 5:case"end":return e.stop()}},e,null,[[0,4]])}))).apply(this,arguments)}function ec(e){return tc.apply(this,arguments)}function tc(){return(tc=u(d().mark(function e(t){return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=document.createElement("script");i.src=t,i.onload=function(){console.log("[Web Runtime] Main bundle script loaded, waiting for initialization..."),setTimeout(function(){var t,r,i;console.log("[Web Runtime] Main bundle initialized"),console.log("[Web Runtime] __GLOBAL__:",n.g.__GLOBAL__),console.log("[Web Runtime] jsModuleList:",null===(t=n.g.__GLOBAL__)||void 0===t?void 0:t.jsModuleList),null!==(r=n.g.__GLOBAL__)&&void 0!==r&&r.jsModuleList&&Object.keys(n.g.__GLOBAL__.jsModuleList).forEach(function(e){console.log("[Web Runtime] - ".concat(e,":"),typeof n.g.__GLOBAL__.jsModuleList[e])}),console.log("[Web Runtime] appRegister:",null===(i=n.g.__GLOBAL__)||void 0===i?void 0:i.appRegister),e()},100)},i.onerror=function(e){console.error("[Web Runtime] Main bundle load failed:",e),r(e)},document.body.appendChild(i)}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function nc(e){return rc.apply(this,arguments)}function rc(){return rc=u(d().mark(function e(t){var r,i,o,a,s,l,u,c,h,f,p;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("[Web Runtime] Bundle:",t),e.prev=1,wu(t),a=!1,!t.endsWith("index.android.js")){e.next=3;break}return s=t.replace("index.android.js","vendor.android.js"),e.next=2,Ju(s);case 2:a=e.sent,e.next=4;break;case 3:t.endsWith("index.bundle")&&console.log("[Web Runtime] Skipping vendor probe for index.bundle mode");case 4:return a||(l=Eu(),console.log("[Web Runtime] Injecting publicPath (no vendor):",l),(u=document.createElement("script")).textContent=l,document.body.appendChild(u)),e.next=5,ec(t);case 5:if(c=null===(r=n.g.__GLOBAL__)||void 0===r||null===(r=r.jsModuleList)||void 0===r?void 0:r.EventDispatcher,console.log("[Web Runtime] Saved EventDispatcher before engine.start:",c),h=Object.keys((null===(i=n.g.__GLOBAL__)||void 0===i?void 0:i.appRegister)||{}),console.log("[Web Runtime] Registered apps:",h),0!==h.length){e.next=6;break}return console.error("[Web Runtime] No apps registered!"),console.error("[Web Runtime] Run: cd .. && yarn build:android"),e.abrupt("return");case 6:f=h.includes(A)?A:h[0],console.log("[Web Runtime] Starting app:",f),eu(Qu),c&&(n.g.__GLOBAL__=n.g.__GLOBAL__||{},n.g.__GLOBAL__.jsModuleList=n.g.__GLOBAL__.jsModuleList||{},n.g.__GLOBAL__.jsModuleList.EventDispatcher=c,console.log("[Web Runtime] Restored EventDispatcher after engine.start")),console.log("[Web Runtime] Final jsModuleList.EventDispatcher:",null===(o=n.g.__GLOBAL__)||void 0===o||null===(o=o.jsModuleList)||void 0===o?void 0:o.EventDispatcher),e.next=8;break;case 7:e.prev=7,p=e.catch(1),console.error("[Web Runtime] Failed to load bundles:",p);case 8:case"end":return e.stop()}},e,null,[[1,7]])})),rc.apply(this,arguments)}function ic(){return oc.apply(this,arguments)}function oc(){return(oc=u(d().mark(function e(){var t,r,i,o,a,s,l,u,c,h,f,p,v;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i=uu.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: "+uu.zipName),a=i.substring(0,i.lastIndexOf("/")),s=a?"".concat(a,"/vendor.android.js"):"vendor.android.js",!uu.has(s)){e.next=3;break}return console.log("[Web Runtime] Loading vendor from ZIP:",s),e.next=2,gu(s);case 2:e.next=4;break;case 3:if(l=uu.list(),!(u=l.find(function(e){return e.endsWith("vendor.android.js")}))){e.next=4;break}return console.log("[Web Runtime] Loading vendor from ZIP:",u),e.next=4,gu(u);case 4:return console.log("[Web Runtime] Loading main bundle from ZIP:",i),e.next=5,gu(i);case 5:return console.log("[Web Runtime] Bundle loaded, waiting for initialization..."),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,h=Object.keys((null===(r=n.g.__GLOBAL__)||void 0===r?void 0:r.appRegister)||{}),console.log("[Web Runtime] Registered apps:",h),0!==h.length){e.next=7;break}return console.error("[Web Runtime] No apps registered!"),e.abrupt("return");case 7:f=h.includes(A)?A:h[0],console.log("[Web Runtime] Starting app:",f),eu(Qu),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: "+uu.zipName),console.log("[Web Runtime] === ZIP Bundle Ready ==="),e.next=9;break;case 8:e.prev=8,v=e.catch(0),console.error("[Web Runtime] Failed to load ZIP bundle:",v),(p=document.getElementById("bundle-info"))&&(p.textContent="Error: "+v.message);case 9:case"end":return e.stop()}},e,null,[[0,8]])}))).apply(this,arguments)}console.log("[Web Runtime] URL params:",Object.fromEntries(Zu)),n.g.__GLOBAL__=n.g.__GLOBAL__||{},n.g.__GLOBAL__.appRegister=new Proxy({},{set:(e,t,n)=>(console.log("[Web Runtime] App registering:",t),e[t]=n,!0),get:(e,t)=>e[t]}),console.log("[Web Runtime] AppRegister proxy installed"),window.addEventListener("zip-file-selected",function(){var e=u(d().mark(function e(t){var n,r,i;return d().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,fu(n);case 2:e.next=4;break;case 3:e.prev=3,i=e.catch(1),console.error("[Web Runtime] ZIP processing failed:",i),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=u(d().mark(function e(t){var n,r,i,o,a,s,l,u;return d().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,console.log("[Web Runtime] Directory dropped:",o,"entry:",i),console.log("[Web Runtime] Files count:",Object.keys(r).length),console.log("[Web Runtime] Sample files:",Object.keys(r).slice(0,5)),a&&(a.textContent="正在保存 "+Object.keys(r).length+" 个文件..."),console.log("[Web Runtime] Starting saveZipToDB..."),e.next=2,ru(r,i,o);case 2:return console.log("[Web Runtime] saveZipToDB completed"),console.log("[Web Runtime] Verifying saved data..."),e.next=3,ou();case 3:s=e.sent,console.log("[Web Runtime] Saved data files count:",s?Object.keys(s.files).length:0),a&&(a.textContent="保存完成,正在加载..."),console.log("[Web Runtime] Refreshing page..."),(l=new URL(window.location.href)).searchParams.set("zip","1"),l.searchParams.delete("bundle"),window.location.href=l.toString(),e.next=5;break;case 4:e.prev=4,u=e.catch(1),console.error("[Web Runtime] Directory load failed:",u),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 ac="1"===Zu.get("zip"),sc=Zu.get("bundle"),lc=Zu.get("zipUrl");function uc(){return(uc=u(d().mark(function e(){var t,n,r,i,o;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=document.getElementById("bundle-info"),!ac){e.next=5;break}return console.log("[Web Runtime] Loading from ZIP cache..."),e.next=1,ou();case 1:if(!(n=e.sent)){e.next=3;break}return uu.loadFromData(n),e.next=2,ic();case 2:e.next=4;break;case 3:console.error("[Web Runtime] No ZIP cache found!"),t&&(t.textContent="No ZIP cache found. Please upload a ZIP file."),(r=new URL(window.location.href)).searchParams.delete("zip"),window.location.replace(r.toString());case 4:e.next=17;break;case 5:if(!lc){e.next=12;break}return console.log("[Web Runtime] Loading from ZIP URL:",lc),e.next=6,su();case 6:return(i=Zu.has("_force"))&&console.log("[Web Runtime] Force refresh requested"),window.__LOADING_OVERLAY__&&(window.__LOADING_OVERLAY__.show(),window.__LOADING_OVERLAY__.update(0,"准备下载...")),e.prev=7,e.next=8,vu(lc,function(e,n){t&&(t.textContent=n),window.__LOADING_OVERLAY__&&window.__LOADING_OVERLAY__.update(e,n)},i);case 8:return window.__LOADING_OVERLAY__&&window.__LOADING_OVERLAY__.update(100,"加载完成"),e.next=9,ic();case 9:window.__LOADING_OVERLAY__&&window.__LOADING_OVERLAY__.hide(),e.next=11;break;case 10:e.prev=10,o=e.catch(7),console.error("[Web Runtime] ZIP URL download failed:",o),t&&(t.textContent="下载失败: "+o.message),window.__LOADING_OVERLAY__&&window.__LOADING_OVERLAY__.hide();case 11:e.next=17;break;case 12:if(!sc){e.next=15;break}return e.next=13,su();case 13:return e.next=14,nc(sc);case 14:e.next=17;break;case 15:return e.next=16,su();case 16:console.log("[Web Runtime] No bundle specified. Waiting for ZIP upload..."),t&&(t.textContent="请上传 ZIP 包开始预览");case 17:case"end":return e.stop()}},e,null,[[7,10]])}))).apply(this,arguments)}!function(){uc.apply(this,arguments)}(),console.log("[Web Runtime] === Ready ===")},79(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},794(e,t,n){var r=n(313);function i(){var t,n,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.toStringTag||"@@toStringTag";function l(e,i,o,a){var s=i&&i.prototype instanceof c?i:c,l=Object.create(s.prototype);return r(l,"_invoke",function(e,r,i){var o,a,s,l=0,c=i||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return o=e,a=0,s=t,h.n=n,u}};function f(e,r){for(a=e,s=r,n=0;!d&&l&&!i&&n<c.length;n++){var i,o=c[n],f=h.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,h.v=r,h.n=o[1]):f<p&&(i=e<3||o[0]>r||r>p)&&(o[4]=e,o[5]=r,h.n=p,a=0))}if(i||e>1)return u;throw d=!0,r}return function(i,c,p){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,p),a=c,s=p;(n=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(l=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=(d=h.n<0)?s:e.call(r,h))!==u)break}catch(e){o=t,a=1,s=e}finally{l=1}}return{value:n,done:d}}}(e,o,a),!0),l}var u={};function c(){}function d(){}function h(){}n=Object.getPrototypeOf;var f=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),p=h.prototype=c.prototype=Object.create(f);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,r(e,s,"GeneratorFunction")),e.prototype=Object.create(p),e}return d.prototype=h,r(p,"constructor",h),r(h,"constructor",d),d.displayName="GeneratorFunction",r(h,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:l,m:v}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},408(e,t,n){var r=n(404);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},404(e,t,n){var r=n(794),i=n(666);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},666(e,t,n){var r=n(79),i=n(313);e.exports=function e(t,n){function o(e,i,a,s){try{var l=t[e](i),u=l.value;return u instanceof r?n.resolve(u.v).then(function(e){o("next",e,a,s)},function(e){o("throw",e,a,s)}):n.resolve(u).then(function(e){l.value=e,a(l)},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},313(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},740(e,t,n){var r=n(79),i=n(794),o=n(408),a=n(404),s=n(666),l=n(394),u=n(36);function c(){"use strict";var t=i(),n=t.m(c),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"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,u(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:h,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:s,async:function(e,t,n,r,i){return(h(t)?a:o)(p(e),t,n,r,i)},keys:l,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports},36(e,t,n){var r=n(611).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},611(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(740)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},298(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(517);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}},517(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})},824(e,t,n){"use strict";n.d(t,{Zd:()=>l,pb:()=>o,yf:()=>s});var r=n(298);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){return"string"!=typeof e?e:e.replace(/^hpfile:\/\/\.?\//,"/").replace(/^hpfile:\/\//,"/")}function a(e){if("string"!=typeof e)return e;var t=o(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 a,s=URL.createObjectURL(new Blob([i],{type:(a=t,{png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml"}[String(a).split(".").pop().toLowerCase()]||"application/octet-stream")}));return r.set(t,s),s}function s(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=a(n);return r===n?e:"url(".concat(r,")")})}(r);var i=a(r);return i!==r?"url(".concat(i,")"):t}function l(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 o=s(n,e[n]);o!==e[n]&&(t===e&&(t=function(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}({},e)),t[n]=o)}}),t}},814(e,t,n){"use strict";n.d(t,{Hd:()=>l,bindTemplateDataToNode:()=>b,u6:()=>g,vy:()=>u});var r=n(298),i=n(824);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 l(e,t){if(!e||!t)return e;var n=String(e).match(/^\$\{([^}]+)\}$/);return n?s(n[1],t):e}function u(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){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 d(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 l=t.x,u=t.y,c=t.width,d=t.height,h=e.style.position||"",f=""===h||"absolute"===h||"fixed"===h||"relative"===h;f&&null!=l&&(e.style.left="number"==typeof l?"".concat(l,"px"):l),f&&null!=u&&(e.style.top="number"==typeof u?"".concat(u,"px"):u),null!=c&&(e.style.width="number"==typeof c?"".concat(c,"px"):c),null!=d&&(e.style.height="number"==typeof d?"".concat(d,"px"):d),!f||void 0===l&&void 0===u||e.style.position&&"relative"!==e.style.position||(e.style.position="absolute")}}}function h(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:u(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 b(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("${")&&b(g,i,r)}var _=p(e),w=!0,E=null!==(n=e.getAttribute("data-template-type"))&&void 0!==n?n:e.getAttribute("type");if(null!=E&&""!==E){var k=String(E);if(k.includes("${")&&(k=String(u(k,i))),k!==(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(_&&"function"==typeof _.setVisible&&_.setVisible(!1));"none"===e.style.display&&e.style.removeProperty("display"),_&&"function"==typeof _.setVisible&&_.setVisible(!0)}else if(!1===x)return}for(var L=0,P=Array.from(e.attributes);L<P.length;L++){var T=P[L],I=T.value;if(I&&"string"==typeof I&&I.includes("${")){var O=T.name.toLowerCase(),R=v(I,i);if("list"!==O&&"listdata"!==O)if("flexstyle"!==O)if("layout"!==O)if("decoration"!==O)if("size"!==O)if("textsize"!==O&&"fontsize"!==O){var N=R.isPure?void 0!==R.value?String(R.value):I:R.value;_&&("text"===O&&"function"==typeof _.setText?_.setText(N):"function"==typeof _.updateProperty&&_.updateProperty(T.name,N)),e.setAttribute(T.name,N)}else{var D=R.isPure?R.value:l(I,i);if(void 0!==D){if(_&&"function"==typeof _.updateProperty)_.updateProperty(T.name,D);else{var M="number"==typeof D?D+"px":D;e.style.fontSize=M}e.removeAttribute(T.name)}}else{var F=R.isPure?R.value:l(I,i);null!=F&&(_&&"function"==typeof _.updateProperty?_.updateProperty(T.name,F):f(e,F),e.removeAttribute(T.name))}else{var V=R.isPure?R.value:l(I,i);V&&"object"==typeof V&&(_&&"function"==typeof _.updateProperty?_.updateProperty(T.name,V):h(e,V),e.removeAttribute(T.name))}else{var B=R.isPure?R.value:l(I,i);null!=B&&(_&&"function"==typeof _.updateProperty?_.updateProperty(T.name,B):d(e,B),e.removeAttribute(T.name))}else{var W=R.isPure?R.value:l(I,i);W&&"object"==typeof W&&(_&&"function"==typeof _.updateProperty?_.updateProperty(T.name,W):c(e,W),e.removeAttribute(T.name))}else{var j=R.isPure?R.value:l(I,i);Array.isArray(j)?("function"==typeof r.onListData&&r.onListData(e,j,T.name),w=!1,e.removeAttribute(T.name)):(_&&"function"==typeof _.updateProperty&&_.updateProperty(T.name,j),void 0===j?e.setAttribute(T.name,I):e.setAttribute(T.name,String(j)))}}}if(e.style&&e.style.cssText&&e.style.cssText.includes("${")&&(e.style.cssText=u(e.style.cssText,i),m(e)),"IMG"===e.tagName&&e.getAttribute("src")){var H=e.getAttribute("src"),U=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}(H.includes("${")?u(H,i):H);U!==H&&(_&&"function"==typeof _.updateProperty&&_.updateProperty("src",U),e.setAttribute("src",U),e.src=U)}w&&Array.from(e.childNodes).forEach(function(e){b(e,i,r)})}}else{var z=e.textContent;if(z&&z.includes("${")){var G=u(z,i);if(G!==z){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](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.ccab04df97ffd41b3a94.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,l;if(void 0!==i)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var d=u[c];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+i){s=d;break}}s||(l=!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 h=(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(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&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})(),(()=>{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,l]=n,u=0;if(o.some(t=>0!==e[t])){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);if(l)l(a)}for(t&&t(n);u<o.length;u++)i=o[u],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(11);a(991)})();
|