//{"name":"napi","version":"1.3.1707","created":"2025-06-02T12:27:52.760Z"}
import{consoleGroup as e,stringUtils as t,deepExtend as n}from"./libs.js";function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r,o={exports:{}};var s,a=(r||(r=1,s=o,function(e){var t=Object.hasOwnProperty,n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i="object"==typeof process&&"function"==typeof process.nextTick,r="function"==typeof Symbol,o="object"==typeof Reflect,a="function"==typeof setImmediate?setImmediate:setTimeout,c=r?o&&"function"==typeof Reflect.ownKeys?Reflect.ownKeys:function(e){var t=Object.getOwnPropertyNames(e);return t.push.apply(t,Object.getOwnPropertySymbols(e)),t}:Object.keys;function l(){this._events={},this._conf&&u.call(this,this._conf)}function u(t){t&&(this._conf=t,t.delimiter&&(this.delimiter=t.delimiter),t.maxListeners!==e&&(this._maxListeners=t.maxListeners),t.wildcard&&(this.wildcard=t.wildcard),t.newListener&&(this._newListener=t.newListener),t.removeListener&&(this._removeListener=t.removeListener),t.verboseMemoryLeak&&(this.verboseMemoryLeak=t.verboseMemoryLeak),t.ignoreErrors&&(this.ignoreErrors=t.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function f(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),"undefined"!=typeof process&&process.emitWarning){var i=new Error(n);i.name="MaxListenersExceededWarning",i.emitter=this,i.count=e,process.emitWarning(i)}else console.error(n),console.trace&&console.trace()}var d=function(e,t,n){var i=arguments.length;switch(i){case 0:return[];case 1:return[e];case 2:return[e,t];case 3:return[e,t,n];default:for(var r=new Array(i);i--;)r[i]=arguments[i];return r}};function h(t,n){for(var i={},r=t.length,o=0;o<r;o++)i[t[o]]=o<0?n[o]:e;return i}function p(e,t,n){var i,r;if(this._emitter=e,this._target=t,this._listeners={},this._listenersCount=0,(n.on||n.off)&&(i=n.on,r=n.off),t.addEventListener?(i=t.addEventListener,r=t.removeEventListener):t.addListener?(i=t.addListener,r=t.removeListener):t.on&&(i=t.on,r=t.off),!i&&!r)throw Error("target does not implement any known event API");if("function"!=typeof i)throw TypeError("on method must be a function");if("function"!=typeof r)throw TypeError("off method must be a function");this._on=i,this._off=r;var o=e._observers;o?o.push(this):e._observers=[this]}function m(n,i,r,o){var s=Object.assign({},i);if(!n)return s;if("object"!=typeof n)throw TypeError("options must be an object");var a,c,l,u=Object.keys(n),f=u.length;function d(e){throw Error('Invalid "'+a+'" option value'+(e?". Reason: "+e:""))}for(var h=0;h<f;h++){if(a=u[h],!t.call(i,a))throw Error('Unknown "'+a+'" option');(c=n[a])!==e&&(l=r[a],s[a]=l?l(c,d):c)}return s}function w(e,t){return"function"==typeof e&&e.hasOwnProperty("prototype")||t("value must be a constructor"),e}function y(e){var t="value must be type of "+e.join("|"),n=e.length,i=e[0],r=e[1];return 1===n?function(e,n){if(typeof e===i)return e;n(t)}:2===n?function(e,n){var o=typeof e;if(o===i||o===r)return e;n(t)}:function(i,r){for(var o=typeof i,s=n;s-- >0;)if(o===e[s])return i;r(t)}}Object.assign(p.prototype,{subscribe:function(e,t,n){var i=this,r=this._target,o=this._emitter,s=this._listeners,a=function(){var i=d.apply(null,arguments),s={data:i,name:t,original:e};n?!1!==n.call(r,s)&&o.emit.apply(o,[s.name].concat(i)):o.emit.apply(o,[t].concat(i))};if(s[e])throw Error("Event '"+e+"' is already listening");this._listenersCount++,o._newListener&&o._removeListener&&!i._onNewListener?(this._onNewListener=function(n){n===t&&null===s[e]&&(s[e]=a,i._on.call(r,e,a))},o.on("newListener",this._onNewListener),this._onRemoveListener=function(n){n===t&&!o.hasListeners(n)&&s[e]&&(s[e]=null,i._off.call(r,e,a))},s[e]=null,o.on("removeListener",this._onRemoveListener)):(s[e]=a,i._on.call(r,e,a))},unsubscribe:function(e){var t,n,i,r=this,o=this._listeners,s=this._emitter,a=this._off,l=this._target;if(e&&"string"!=typeof e)throw TypeError("event must be a string");function u(){r._onNewListener&&(s.off("newListener",r._onNewListener),s.off("removeListener",r._onRemoveListener),r._onNewListener=null,r._onRemoveListener=null);var e=_.call(s,r);s._observers.splice(e,1)}if(e){if(!(t=o[e]))return;a.call(l,e,t),delete o[e],--this._listenersCount||u()}else{for(i=(n=c(o)).length;i-- >0;)e=n[i],a.call(l,e,o[e]);this._listeners={},this._listenersCount=0,u()}}});var v=y(["function"]),g=y(["object","function"]);function b(e,t,n){var i,r,o,s=0,a=new e((function(c,l,u){function f(){r&&(r=null),s&&(clearTimeout(s),s=0)}n=m(n,{timeout:0,overload:!1},{timeout:function(e,t){return("number"!=typeof(e*=1)||e<0||!Number.isFinite(e))&&t("timeout must be a positive number"),e}}),i=!n.overload&&"function"==typeof e.prototype.cancel&&"function"==typeof u;var d=function(e){f(),c(e)},h=function(e){f(),l(e)};i?t(d,h,u):(r=[function(e){h(e||Error("canceled"))}],t(d,h,(function(e){if(o)throw Error("Unable to subscribe on cancel event asynchronously");if("function"!=typeof e)throw TypeError("onCancel callback must be a function");r.push(e)})),o=!0),n.timeout>0&&(s=setTimeout((function(){var e=Error("timeout");e.code="ETIMEDOUT",s=0,a.cancel(e),l(e)}),n.timeout))}));return i||(a.cancel=function(e){if(r){for(var t=r.length,n=1;n<t;n++)r[n](e);r[0](e),r=null}}),a}function _(e){var t=this._observers;if(!t)return-1;for(var n=t.length,i=0;i<n;i++)if(t[i]._target===e)return i;return-1}function E(e,t,n,i,r){if(!n)return null;if(0===i){var o=typeof t;if("string"===o){var s,a,l=0,u=0,f=this.delimiter,d=f.length;if(-1!==(a=t.indexOf(f))){s=new Array(5);do{s[l++]=t.slice(u,a),u=a+d}while(-1!==(a=t.indexOf(f,u)));s[l++]=t.slice(u),t=s,r=l}else t=[t],r=1}else"object"===o?r=t.length:(t=[t],r=1)}var h,p,m,w,y,v,g,b=null,_=t[i],L=t[i+1];if(i===r)n._listeners&&("function"==typeof n._listeners?(e&&e.push(n._listeners),b=[n]):(e&&e.push.apply(e,n._listeners),b=[n]));else{if("*"===_){for(a=(v=c(n)).length;a-- >0;)"_listeners"!==(h=v[a])&&(g=E(e,t,n[h],i+1,r))&&(b?b.push.apply(b,g):b=g);return b}if("**"===_){for((y=i+1===r||i+2===r&&"*"===L)&&n._listeners&&(b=E(e,t,n,r,r)),a=(v=c(n)).length;a-- >0;)"_listeners"!==(h=v[a])&&("*"===h||"**"===h?(n[h]._listeners&&!y&&(g=E(e,t,n[h],r,r))&&(b?b.push.apply(b,g):b=g),g=E(e,t,n[h],i,r)):g=E(e,t,n[h],h===L?i+2:i,r),g&&(b?b.push.apply(b,g):b=g));return b}n[_]&&(b=E(e,t,n[_],i+1,r))}if((p=n["*"])&&E(e,t,p,i+1,r),m=n["**"])if(i<r)for(m._listeners&&E(e,t,m,r,r),a=(v=c(m)).length;a-- >0;)"_listeners"!==(h=v[a])&&(h===L?E(e,t,m[h],i+2,r):h===_?E(e,t,m[h],i+1,r):((w={})[h]=m[h],E(e,t,{"**":w},i+1,r)));else m._listeners?E(e,t,m,r,r):m["*"]&&m["*"]._listeners&&E(e,t,m["*"],r,r);return b}function L(e,t,n){var i,r,o=0,s=0,a=this.delimiter,c=a.length;if("string"==typeof e)if(-1!==(i=e.indexOf(a))){r=new Array(5);do{r[o++]=e.slice(s,i),s=i+c}while(-1!==(i=e.indexOf(a,s)));r[o++]=e.slice(s)}else r=[e],o=1;else r=e,o=e.length;if(o>1)for(i=0;i+1<o;i++)if("**"===r[i]&&"**"===r[i+1])return;var l,u=this.listenerTree;for(i=0;i<o;i++)if(u=u[l=r[i]]||(u[l]={}),i===o-1)return u._listeners?("function"==typeof u._listeners&&(u._listeners=[u._listeners]),n?u._listeners.unshift(t):u._listeners.push(t),!u._listeners.warned&&this._maxListeners>0&&u._listeners.length>this._maxListeners&&(u._listeners.warned=!0,f.call(this,u._listeners.length,l))):u._listeners=t,!0;return!0}function k(e,t,n,i){for(var r,o,s,a,l=c(e),u=l.length,f=e._listeners;u-- >0;)r=e[o=l[u]],s="_listeners"===o?n:n?n.concat(o):[o],a=i||"symbol"==typeof o,f&&t.push(a?s:s.join(this.delimiter)),"object"==typeof r&&k.call(this,r,t,s,a);return t}function S(e){for(var t,n,i,r=c(e),o=r.length;o-- >0;)(t=e[n=r[o]])&&(i=!0,"_listeners"===n||S(t)||delete e[n]);return i}function T(e,t,n){this.emitter=e,this.event=t,this.listener=n}function O(t,n,r){if(!0===r)s=!0;else if(!1===r)o=!0;else{if(!r||"object"!=typeof r)throw TypeError("options should be an object or true");var o=r.async,s=r.promisify,c=r.nextTick,l=r.objectify}if(o||c||s){var u=n,f=n._origin||n;if(c&&!i)throw Error("process.nextTick is not supported");s===e&&(s="AsyncFunction"===n.constructor.name),n=function(){var e=arguments,t=this,n=this.event;return s?c?Promise.resolve():new Promise((function(e){a(e)})).then((function(){return t.event=n,u.apply(t,e)})):(c?process.nextTick:a)((function(){t.event=n,u.apply(t,e)}))},n._async=!0,n._origin=f}return[n,l?new T(this,t,n):this]}function x(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,u.call(this,e)}T.prototype.off=function(){return this.emitter.off(this.event,this.listener),this},x.EventEmitter2=x,x.prototype.listenTo=function(t,i,r){if("object"!=typeof t)throw TypeError("target musts be an object");var o=this;function s(e){if("object"!=typeof e)throw TypeError("events must be an object");var n,i=r.reducers,s=_.call(o,t);n=-1===s?new p(o,t,r):o._observers[s];for(var a,l=c(e),u=l.length,f="function"==typeof i,d=0;d<u;d++)a=l[d],n.subscribe(a,e[a]||a,f?i:i&&i[a])}return r=m(r,{on:e,off:e,reducers:e},{on:v,off:v,reducers:g}),n(i)?s(h(i)):s("string"==typeof i?h(i.split(/\s+/)):i),this},x.prototype.stopListeningTo=function(e,t){var n=this._observers;if(!n)return!1;var i,r=n.length,o=!1;if(e&&"object"!=typeof e)throw TypeError("target should be an object");for(;r-- >0;)i=n[r],e&&i._target!==e||(i.unsubscribe(t),o=!0);return o},x.prototype.delimiter=".",x.prototype.setMaxListeners=function(t){t!==e&&(this._maxListeners=t,this._conf||(this._conf={}),this._conf.maxListeners=t)},x.prototype.getMaxListeners=function(){return this._maxListeners},x.prototype.event="",x.prototype.once=function(e,t,n){return this._once(e,t,!1,n)},x.prototype.prependOnceListener=function(e,t,n){return this._once(e,t,!0,n)},x.prototype._once=function(e,t,n,i){return this._many(e,1,t,n,i)},x.prototype.many=function(e,t,n,i){return this._many(e,t,n,!1,i)},x.prototype.prependMany=function(e,t,n,i){return this._many(e,t,n,!0,i)},x.prototype._many=function(e,t,n,i,r){var o=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function s(){return 0==--t&&o.off(e,s),n.apply(this,arguments)}return s._origin=n,this._on(e,s,i,r)},x.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||l.call(this);var e,t,n,i,o,s,a=arguments[0],c=this.wildcard;if("newListener"===a&&!this._newListener&&!this._events.newListener)return!1;if(c&&(e=a,"newListener"!==a&&"removeListener"!==a&&"object"==typeof a)){if(n=a.length,r)for(i=0;i<n;i++)if("symbol"==typeof a[i]){s=!0;break}s||(a=a.join(this.delimiter))}var u,f=arguments.length;if(this._all&&this._all.length)for(i=0,n=(u=this._all.slice()).length;i<n;i++)switch(this.event=a,f){case 1:u[i].call(this,a);break;case 2:u[i].call(this,a,arguments[1]);break;case 3:u[i].call(this,a,arguments[1],arguments[2]);break;default:u[i].apply(this,arguments)}if(c)u=[],E.call(this,u,e,this.listenerTree,0,n);else{if("function"==typeof(u=this._events[a])){switch(this.event=a,f){case 1:u.call(this);break;case 2:u.call(this,arguments[1]);break;case 3:u.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(f-1),o=1;o<f;o++)t[o-1]=arguments[o];u.apply(this,t)}return!0}u&&(u=u.slice())}if(u&&u.length){if(f>3)for(t=new Array(f-1),o=1;o<f;o++)t[o-1]=arguments[o];for(i=0,n=u.length;i<n;i++)switch(this.event=a,f){case 1:u[i].call(this);break;case 2:u[i].call(this,arguments[1]);break;case 3:u[i].call(this,arguments[1],arguments[2]);break;default:u[i].apply(this,t)}return!0}if(!this.ignoreErrors&&!this._all&&"error"===a)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},x.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||l.call(this);var e,t,n,i,o,s,a=arguments[0],c=this.wildcard;if("newListener"===a&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(c&&(e=a,"newListener"!==a&&"removeListener"!==a&&"object"==typeof a)){if(i=a.length,r)for(o=0;o<i;o++)if("symbol"==typeof a[o]){t=!0;break}t||(a=a.join(this.delimiter))}var u,f=[],d=arguments.length;if(this._all)for(o=0,i=this._all.length;o<i;o++)switch(this.event=a,d){case 1:f.push(this._all[o].call(this,a));break;case 2:f.push(this._all[o].call(this,a,arguments[1]));break;case 3:f.push(this._all[o].call(this,a,arguments[1],arguments[2]));break;default:f.push(this._all[o].apply(this,arguments))}if(c?(u=[],E.call(this,u,e,this.listenerTree,0)):u=this._events[a],"function"==typeof u)switch(this.event=a,d){case 1:f.push(u.call(this));break;case 2:f.push(u.call(this,arguments[1]));break;case 3:f.push(u.call(this,arguments[1],arguments[2]));break;default:for(n=new Array(d-1),s=1;s<d;s++)n[s-1]=arguments[s];f.push(u.apply(this,n))}else if(u&&u.length){if(u=u.slice(),d>3)for(n=new Array(d-1),s=1;s<d;s++)n[s-1]=arguments[s];for(o=0,i=u.length;o<i;o++)switch(this.event=a,d){case 1:f.push(u[o].call(this));break;case 2:f.push(u[o].call(this,arguments[1]));break;case 3:f.push(u[o].call(this,arguments[1],arguments[2]));break;default:f.push(u[o].apply(this,n))}}else if(!this.ignoreErrors&&!this._all&&"error"===a)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(f)},x.prototype.on=function(e,t,n){return this._on(e,t,!1,n)},x.prototype.prependListener=function(e,t,n){return this._on(e,t,!0,n)},x.prototype.onAny=function(e){return this._onAny(e,!1)},x.prototype.prependAny=function(e){return this._onAny(e,!0)},x.prototype.addListener=x.prototype.on,x.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},x.prototype._on=function(t,n,i,r){if("function"==typeof t)return this._onAny(t,n),this;if("function"!=typeof n)throw new Error("on only accepts instances of Function");this._events||l.call(this);var o,s=this;return r!==e&&(n=(o=O.call(this,t,n,r))[0],s=o[1]),this._newListener&&this.emit("newListener",t,n),this.wildcard?(L.call(this,t,n,i),s):(this._events[t]?("function"==typeof this._events[t]&&(this._events[t]=[this._events[t]]),i?this._events[t].unshift(n):this._events[t].push(n),!this._events[t].warned&&this._maxListeners>0&&this._events[t].length>this._maxListeners&&(this._events[t].warned=!0,f.call(this,this._events[t].length,t))):this._events[t]=n,s)},x.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var i,r=[];if(this.wildcard){var o="string"==typeof e?e.split(this.delimiter):e.slice();if(!(r=E.call(this,null,o,this.listenerTree,0)))return this}else{if(!this._events[e])return this;i=this._events[e],r.push({_listeners:i})}for(var s=0;s<r.length;s++){var a=r[s];if(i=a._listeners,n(i)){for(var c=-1,l=0,u=i.length;l<u;l++)if(i[l]===t||i[l].listener&&i[l].listener===t||i[l]._origin&&i[l]._origin===t){c=l;break}if(c<0)continue;return this.wildcard?a._listeners.splice(c,1):this._events[e].splice(c,1),0===i.length&&(this.wildcard?delete a._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(i===t||i.listener&&i.listener===t||i._origin&&i._origin===t)&&(this.wildcard?delete a._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return this.listenerTree&&S(this.listenerTree),this},x.prototype.offAny=function(e){var t,n=0,i=0;if(e&&this._all&&this._all.length>0){for(n=0,i=(t=this._all).length;n<i;n++)if(e===t[n])return t.splice(n,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(n=0,i=t.length;n<i;n++)this.emit("removeListenerAny",t[n]);this._all=[]}return this},x.prototype.removeListener=x.prototype.off,x.prototype.removeAllListeners=function(t){if(t===e)return!this._events||l.call(this),this;if(this.wildcard){var n,i=E.call(this,null,t,this.listenerTree,0);if(!i)return this;for(n=0;n<i.length;n++)i[n]._listeners=null;this.listenerTree&&S(this.listenerTree)}else this._events&&(this._events[t]=null);return this},x.prototype.listeners=function(t){var n,i,r,o,s,a=this._events;if(t===e){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!a)return[];for(o=(n=c(a)).length,r=[];o-- >0;)"function"==typeof(i=a[n[o]])?r.push(i):r.push.apply(r,i);return r}if(this.wildcard){if(!(s=this.listenerTree))return[];var l=[],u="string"==typeof t?t.split(this.delimiter):t.slice();return E.call(this,l,u,s,0),l}return a&&(i=a[t])?"function"==typeof i?[i]:i:[]},x.prototype.eventNames=function(e){var t=this._events;return this.wildcard?k.call(this,this.listenerTree,[],null,e):t?c(t):[]},x.prototype.listenerCount=function(e){return this.listeners(e).length},x.prototype.hasListeners=function(t){if(this.wildcard){var n=[],i="string"==typeof t?t.split(this.delimiter):t.slice();return E.call(this,n,i,this.listenerTree,0),n.length>0}var r=this._events,o=this._all;return!!(o&&o.length||r&&(t===e?c(r).length:r[t]))},x.prototype.listenersAny=function(){return this._all?this._all:[]},x.prototype.waitFor=function(t,n){var i=this,r=typeof n;return"number"===r?n={timeout:n}:"function"===r&&(n={filter:n}),b((n=m(n,{timeout:0,filter:e,handleError:!1,Promise:Promise,overload:!1},{filter:v,Promise:w})).Promise,(function(e,r,o){function s(){var o=n.filter;if(!o||o.apply(i,arguments))if(i.off(t,s),n.handleError){var a=arguments[0];a?r(a):e(d.apply(null,arguments).slice(1))}else e(d.apply(null,arguments))}o((function(){i.off(t,s)})),i._on(t,s,!1)}),{timeout:n.timeout,overload:n.overload})};var A=x.prototype;Object.defineProperties(x,{defaultMaxListeners:{get:function(){return A._maxListeners},set:function(e){if("number"!=typeof e||e<0||Number.isNaN(e))throw TypeError("n must be a non-negative number");A._maxListeners=e},enumerable:!0},once:{value:function(e,t,n){return b((n=m(n,{Promise:Promise,timeout:0,overload:!1},{Promise:w})).Promise,(function(n,i,r){var o;if("function"==typeof e.addEventListener)return o=function(){n(d.apply(null,arguments))},r((function(){e.removeEventListener(t,o)})),void e.addEventListener(t,o,{once:!0});var s,a=function(){s&&e.removeListener("error",s),n(d.apply(null,arguments))};"error"!==t&&(s=function(n){e.removeListener(t,a),i(n)},e.once("error",s)),r((function(){s&&e.removeListener("error",s),e.removeListener(t,a)})),e.once(t,a)}),{timeout:n.timeout,overload:n.overload})},writable:!0,configurable:!0}}),Object.defineProperties(A,{_maxListeners:{value:10,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),s.exports=x}()),o.exports);const c=i(a);class l extends c{constructor(e={wildcard:!0,maxListeners:1/0}){super(e)}on(e,t){return c.prototype.on.call(this,e,t),()=>{this.off(e,t)}}once(e,t){return c.prototype.once.call(this,e,t),()=>{this.off(e,t)}}off(e,t){null==t?this.removeAllListeners(e):this.removeListener(e,t)}}let u,f=!1;const d={setEnabled:function(e){h();const t=Boolean(e);if(t===f)return;f=t,localStorage.__NITRO_DEBUGMODE=JSON.stringify(f),u.emit("enabledChanged",f)},isEnabled:p,subscribe:function(e){return e({enabled:f}),h(),u.on("enabledChanged",(()=>e({enabled:f})))},on:function(...e){return h(),u.on.apply(u,e)},debug:p()};function h(){u||(u=new l,f=Boolean(localStorage.__NITRO_DEBUGMODE&&JSON.parse(localStorage.__NITRO_DEBUGMODE)))}function p(){return h(),f}const m={on:function(...e){return b(),y.on.apply(y,e)},once:function(...e){return b(),y.once.apply(y,e)},emit:function(...e){return b(),y.emit.apply(y,e)},removeAllListeners:function(...e){return b(),y.removeAllListeners.apply(y,e)},emitEvent:function(...t){b(),g.includes(t[0])||(e.collapsed("%c 🚀 EVENT %c "+t[0]+" ","background: #0024bd; color: #FFF","background: #ffa800; color: #000000"),console.log("DATA "+t[0]+":",t[1]),e.end());if("BroadcastEvent"===t[2]){let e=[];if(t[1]&&"string"==typeof t[1]&&t[1].length)try{e=JSON.parse(t[1])}catch{}e.unshift(t[0]),y.emit.apply(y,e)}else{if(t[1]&&"string"==typeof t[1]&&t[1].length)try{t[1]=JSON.parse(t[1])}catch{}y.emit.apply(y,t)}v&&v.apply(window.app.avEvents,t)}},w="eventer_ignored_events";let y,v,g=["app.generic_event.firewall.publish"];function b(){if(y)return;y=new l;const e=localStorage.getItem(w)?.split(",");e&&1===e.length&&""===e[0]&&(g=[]),e&&(g=e)}window.app.avEvents&&"function"==typeof window.app.avEvents.emitEvent&&(v=window.app.avEvents.emitEvent),window.app.avEvents=m;const _="object"==typeof self?self:globalThis,E=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),i=r=>{if(e.has(r))return e.get(r);const[o,s]=t[r];switch(o){case 0:case-1:return n(s,r);case 1:{const e=n([],r);for(const t of s)e.push(i(t));return e}case 2:{const e=n({},r);for(const[t,n]of s)e[i(t)]=i(n);return e}case 3:return n(new Date(s),r);case 4:{const{source:e,flags:t}=s;return n(new RegExp(e,t),r)}case 5:{const e=n(new Map,r);for(const[t,n]of s)e.set(i(t),i(n));return e}case 6:{const e=n(new Set,r);for(const t of s)e.add(i(t));return e}case 7:{const{name:e,message:t}=s;return n(new _[e](t),r)}case 8:return n(BigInt(s),r);case"BigInt":return n(Object(BigInt(s)),r);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:e}=new Uint8Array(s);return n(new DataView(e),s)}}return n(new _[o](s),r)};return i})(new Map,e)(0),L="",{toString:k}={},{keys:S}=Object,T=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=k.call(e).slice(8,-1);switch(n){case"Array":return[1,L];case"Object":return[2,L];case"Date":return[3,L];case"RegExp":return[4,L];case"Map":return[5,L];case"Set":return[6,L];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},O=([e,t])=>0===e&&("function"===t||"symbol"===t),x=(e,{json:t,lossy:n}={})=>{const i=[];return((e,t,n,i)=>{const r=(e,t)=>{const r=i.push(e)-1;return n.set(t,r),r},o=i=>{if(n.has(i))return n.get(i);let[s,a]=T(i);switch(s){case 0:{let t=i;switch(a){case"bigint":s=8,t=i.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return r([-1],i)}return r([s,t],i)}case 1:{if(a){let e=i;return"DataView"===a?e=new Uint8Array(i.buffer):"ArrayBuffer"===a&&(e=new Uint8Array(i)),r([a,[...e]],i)}const e=[],t=r([s,e],i);for(const n of i)e.push(o(n));return t}case 2:{if(a)switch(a){case"BigInt":return r([a,i.toString()],i);case"Boolean":case"Number":case"String":return r([a,i.valueOf()],i)}if(t&&"toJSON"in i)return o(i.toJSON());const n=[],c=r([s,n],i);for(const t of S(i))!e&&O(T(i[t]))||n.push([o(t),o(i[t])]);return c}case 3:return r([s,i.toISOString()],i);case 4:{const{source:e,flags:t}=i;return r([s,{source:e,flags:t}],i)}case 5:{const t=[],n=r([s,t],i);for(const[r,s]of i)(e||!O(T(r))&&!O(T(s)))&&t.push([o(r),o(s)]);return n}case 6:{const t=[],n=r([s,t],i);for(const r of i)!e&&O(T(r))||t.push(o(r));return n}}const{message:c}=i;return r([s,{name:a,message:c}],i)};return o})(!(t||n),!!t,new Map,i)(e),i},A="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?E(x(e,t)):structuredClone(e):(e,t)=>E(x(e,t)),F=/^\d+$/;let P;function M(e,t,n=!0){const i={init:n&&window.performance.now()};return P?P(e,t).catch((i=>Promise.reject({code:"unauthorized",message:"Getting request permission failed",error:i,requestName:e,requestParams:n?t:"__hidden__"}))).then((r=>r?j(e,t,n,i):Promise.reject({code:"unauthorized",message:"Permission not granted",requestName:e,requestParams:n?t:"__hidden__"}))):j(e,t,n,i)}function j(e,t,n=!0,i){if(n&&(i.cond=window.performance.now()),"av.command"===e){const r=window.AvCommand(t);return n&&(i.cpp=window.performance.now()),n&&C({type:"request",requestName:e,requestParams:t,response:r},i),Promise.resolve(r)}return new Promise(((r,o)=>{let s=5;const a=setInterval((()=>{n&&(i.pending=window.performance.now()),n&&C({type:"pending",requestName:e,requestParams:t},i),s-=1,s<=0&&clearInterval(a)}),1e4);window.app.asyncCall(e,(([s,c])=>{let l,u;n&&(i.cpp=window.performance.now()),clearInterval(a);try{null!=c&&(u=JSON.parse(c))}catch(f){u={code:-1,message:f.toString(),data:c}}if(!u||"app.settings.Get"===e&&3===u.code)if(s&&"string"==typeof s)try{const r=JSON.parse(s);l=N(e,t,r),n&&(i.parse=window.performance.now()),u=null}catch(f){u={code:-1,message:f.toString(),data:s}}else l=N(e,t,s),n&&(i.parse=window.performance.now());u?(n&&C({type:"error",requestName:e,requestParams:t,response:u},i),o(u)):(n&&C({type:"request",requestName:e,requestParams:t,response:l},i),r(l))}),function(e,t){return"app.settings.Get"===e&&"string"==typeof t?{name:t}:t}(e,t))}))}function N(e,t,n){if("app.settings.Get"===e&&"string"==typeof t){let e=NaN;return"string"==typeof n.value&&F.test(n.value)&&(e=parseInt(n.value)),isNaN(e)?n.value:e}return n}function I(e){if("object"==typeof e)try{return JSON.stringify(e,void 0,2)}catch{return e}return e}function C(t,n={}){if("error"===(t=A(t)).type||d.isEnabled())switch(t.type){case"request":!function(t,n={}){t=A(t);const i=parseInt(n.cpp-n.init),r=i>1e3?"background: #fcc; color: #000":"background: #FFF; color: #009cff",o="app.Burger.4.TrackMessage"===t.requestName;e.collapsed("%c "+(o?"🍔 REQUEST %c ":"🚀 REQUEST %c ")+t.requestName+" %c in "+i+"ms ",o?"background: #f4bf80; color: #593729":"background: #0024bd; color: #FFF","background: #00b81d; color: #FFF",r),t.requestParams&&console.log(">",t.requestParams),t.response&&console.log("<",t.response),console.debug("⏲initialized at",n.init,"ms"),console.debug("⏲condition check in",n.cond-n.init,"ms"),console.debug("⏲C++ processed in",n.cpp-n.cond,"ms"),"av.command"!==t.requestName&&console.debug("⏲parsed in",n.parse-n.cpp,"ms"),e.end()}(t,n);break;case"pending":!function(t,n={}){t=A(t),e.collapsed("%c 🚀 REQUEST %c "+t.requestName+" %c pending ⏳","background: #0024bd; color: #FFF","background: #FCC; color: #000","background: #FFF; color: #009cff");const i=I(t.requestParams);i&&console.log(">",i),console.debug("⏲initialized at ",n.init,"ms"),console.debug("⏲condition check in",n.cond-n.init,"ms"),console.debug("⏲waiting for",n.pending-n.cond,"ms"),console.groupEnd()}(t,n);break;case"error":!function(e,t={}){e=A(e),console.group("%c 🚀 REQUEST %c "+e.requestName+" %c in "+parseInt(t.cpp-t.init)+"ms ","background: #0024bd; color: #FFF","background: #ff0000; color: #FFF","background: #FFF; color: #009cff");const n=I(e.requestParams),i=I(e.response);n&&console.log(">",n),i&&console.log("<",i),console.debug("⏲initialized at",t.init,"ms"),console.debug("⏲condition check in",t.cond-t.init,"ms"),console.debug("⏲C++ processed in",t.cpp-t.cond,"ms"),console.groupEnd()}(t,n)}}function z(e){P?console.warn("The request condition has already been set. For security reasons it is not possible to overwrite it."):P=e}const D=K("detection"),R=K("toaster"),q=K("dialog"),$=17,U=5,B=5,W=1,V=2,J=10,H=new Map,G=["a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10"];let Q;function K(e){return{ActionTypes:{Primary:"PRIMARY",Secondary:"SECONDARY"},click(t){ie(W,{category:e,action:"Click",label:t?.label,view:t?.view},t?.custom,Y(e,t)),ee(e,"Click",t?.label,t?.view,t?.custom)},automatedActivity(t){ie(J,{category:e,action:"AutomatedEvent",label:t?.label,view:t?.view},t?.custom,Y(e,t)),te(e,"AutomatedEvent",t?.label,t?.view,t?.custom)},view(t){const n={action:"view",view:t?.view},i=t?.details?.isInitial;ie(!1===i?U:V,n,t?.custom,Y(e,t)),X(t?.view,t?.custom)},close(t){ie(W,{category:e,action:"Click",label:"Close",view:t?.view},t?.custom,Y(e,t)),ee(e,"Click","Close",t?.view,t?.custom)}}}function Y(e,t){const n=t?.details||{},i=window?.userData||{},r=i.windowId&&i.timestamp?`${i.windowId}_${i.timestamp}`:null,o=t?.actionType??null;let s=i.alertCategory??null;"detection"===e&&n.color&&(s="red"===n.color?2:1);const a={message_category:s,alert_instance_id:r,alert_type:e.toUpperCase()};return o&&(a.action_type=o),a}function Z(e,t=!1){50===e?.category?console.debug("%c 🍔 Experiment ","background: #d2b48c; color: #8b4513",e.data):console.debug("%c 🍔 Burger ","background: #f4bf80; color: #593729",e.data.object,e.data.custom,e.data.details),M("app.Burger.4.TrackMessage",e).catch((n=>{t&&(delete e.data.details.action_type,M("app.Burger.4.TrackMessage",e),console.log("Burger error skipped - action_type supported in 25.5 ",n))}))}function X(e,t){ne(V,{action:"view",view:e},t)}function ee(e,t,n,i,r){ne(W,{category:e,action:t,label:n,view:i},r)}function te(e,t,n,i,r){ne(J,{category:e,action:t,label:n,view:i},r)}function ne(e,t,n){null!=t.label&&(t.label=re(t.label)),t.view??=Q;const i={category:B,id:e,data:{object:t}};n&&(i.data.custom=oe(n)),Z(i)}function ie(e,t,n,i){null!=t.label&&(t.label=re(t.label)),t.view??=Q;const r={category:$,id:e,data:{object:t}};n&&(r.data.custom=oe(n)),i&&(r.data.details=i),Z(r,!0)}function re(e){return t.escapeHtml(String(e)).substr(0,100)}function oe(e){return Object.keys(e).filter((e=>G.includes(e))).reduce(((t,n)=>(null!=e[n]?t[n]=e[n].toString():t[n]=null,t)),{})}const se={toaster:R,dialog:q,feature:{toggle(e){if(!e?.feature)return;let t;t=null==e.time?null:0===e.time?"until restart":-1===e.time?"until turned on again":e.time/6e4+" minutes";const n=e.labelExtend?" "+e.labelExtend:"",i=Array.isArray(e.feature)?JSON.stringify(e.feature):e.feature;ee(e.category||"Feature Detail","Click",e.enabled?`Turn on ${e.feature}${n}`:`Turn off ${e.feature}${n}`,e.view||i,{a1:t})},click(e){e?.feature&&ee(e?.category||"Feature Detail","Click",e.label,e.feature)},automatedActivity(e){e?.feature&&te(e?.category||"Feature Detail","AutomatedEvent",e?.label,e?.feature,e?.custom)}},detection:D,setView:function(e){Q=e},view:X,click:ee,automatedActivity:te,experimentByPath:function(e,t={}){t?.trackOnce&&H.has(e)?console.debug(`Experiment already tracked: ${e}=${H.get(e)}`):M("app.settings.Get",e).then((t=>{if(t){const[n,i]=t.split(";");null!=n&&null!=i?(!function(e,t){Z({category:50,id:1,data:{experiment_id:e,variant_id:t}})}(n,i),H.set(e,t)):console.error(`Invalid experiment definition: ${e}=${t}`)}}))},track:Z,webShieldFalsePositive:function({blockedUrl:e,alertId:t,detectionName:n,userAction:i=0}={}){return Z({category:130,id:1,data:{blocked_url:e,alertid:t,detection_name:n,user_action:i}})},deepfakeScamFeedback:function({detectionName:e,url:t,path:n,alertId:i,userAction:r=0}={}){return Z({category:159,id:1,data:{detection_name:e,blocked_url:t,blocked_path:n,alertid:i,user_action:r}})},DeepfakeScamFeedbackActions:{ScamFalsePositive:0,DeepfakeFalsePositive:1,ScamConfirmed:2,DeepfakeConfirmed:3,ExceptionCreated:4}};let ae;const ce=se.detection,le={toaster:se.toaster,dialog:se.dialog,detection:ce,feature:se.feature,view:function(e,t){ue(e);[/^Account$/,/^Dashboard$/,/^DashboardMessage$/,/^FeedbackForm$/,/^SmartScan$/,/^SmartScan stopped$/,/^SmartScan finished$/,/^SalesBar$/,/^Open UI$/,/^Message center$/,/^CyberHygiene detail$/,/^Dashboard Onboarding$/,/^Email Guardian - Statistics$/,/^DetectionDialog$/,/^DriveOptimization$/,/^\w+ scan$/,/^scans$/,/^Premium Wizard$/,/^ChatSupport$/,/^Dashboard news - /,/^Dashboard tile - /,/^SmartScan step - /,/^SmartScan detail - /,/^SmartScan modal /,/^SmartScan finished offer - /,/^HNS/,/^VPN Secure Connection - /,/^VPN - /,/^Private Session - /,/^AntiFingerprint - /,/^RescueDisk/,/^MyLicenses/,/^Paywall - /,/^FileInsight - /,/^Onboarding - /,/^PamEol - /,/^PM Iframe - /,/^PIO - /].some((t=>t.test(e)))&&se.view(e,t)},event:function(e,n,i,r,o){ue(r),null!=i&&(i=t.piiStrip(String(i)));(["DashboardMessage","L3 Email Guardian"].includes(e)||e.startsWith("HNS"))&&se.click(e,n,i,ae,o)},click:function(e,t,n,i,r){ue(i),se.click(e,t,n,ae,r)},automatedActivity:function(e,t,n,i,r){ue(i),se.automatedActivity(e,t,n,ae,r)},experimentByPath:function(e,t={}){se.experimentByPath(e,t)},track:function(e){se.track(e)},webShieldFalsePositive:function(e){se.webShieldFalsePositive(e)},deepfakeScamFeedback:function(e){se.deepfakeScamFeedback(e)},DeepfakeScamFeedbackActions:se.DeepfakeScamFeedbackActions};function ue(e){ae=e||ae,se.setView(ae)}const fe={init:function(e={}){we||(we=M("app.utils.getModulesList").then((t=>{pe=e.moduleMap||{},he=Object.assign({},t),me=he.metadata||{},delete he.metadata})));return we},getModuleDefs:function(){return ye(),ve(he)},exists:function(e){return ye(),Boolean(he[e])},getModuleMap:function(){return ye(),ve(pe)},getMetadata:function(){return ye(),ve(me)},importModule:function(e,t="default",n={silent:!1}){let i;function r(e){n.silent||console.error("%c 🚀 NAPI MODULE ERROR %c "+i+"."+t+" ","background: #bd0000; color: #FFF","background: #999; color: #FFF",e)}ye(),pe?.[e]?(i=pe[e].moduleRedirect?pe[e].moduleRedirect:"string"==typeof pe[e]?pe[e]:e,e!==i&&console.log("Redirecting module "+e+" to "+i)):i=e;m.emit("qa.av.request","module:"+i);const o=he?.[i];if(o){const e="./"+i+".js",n=!de[e]&&Date.now();return(de[e]?Promise.resolve(de[e]):import(e)).then((r=>{if(r){if(m.emit("qa.av.response","module:"+i,r[t]),!de[e]){de[e]=r;const t=r.metadata;console.log("%c 🚀 MODULE %c "+t.name+"#"+t.version+" ","background: #0024bd; color: #FFF","background: #999; color: #000","built at",t.created+",","loaded in",Date.now()-n+" ms")}if(r[t])return r[t];throw`Export "${t}" not found in module "${i}".`}throw`Imported module "${i}" is empty.`})).catch((e=>{throw r(e),e}))}{const e="Module is not defined.";return r(e),Promise.reject(e)}}},de={};let he,pe,me,we;function ye(){if(!we)throw"moduleManager is not initialized"}function ve(e){try{return n({},e)}catch(t){return console.warn("moduleManager: copying object failed",t),e}}const ge={update:function(){return ke(!0)},isOnline:function(){return ke().then((()=>Le))},isOnlineSync:function(){return ke(),Le},on:function(...e){return ke(),be.on.apply(be,e)},once:function(...e){return ke(),be.once.apply(be,e)},subscribe:function(e){e({online:Le}),ke();const t=be.on("online",(()=>e({online:Le}))),n=be.on("offline",(()=>e({online:Le})));return function(){t(),n()}}};let be,_e,Ee,Le=!0;function ke(e){return be||(be=new l),_e&&!e||(Ee?.(),_e=M("app.anen.global.get_connectivity").then((e=>{Le=Te(e),be.emit(Le?"online":"offline"),Ee=m.on("app.anen.global.connectivity_changed",(e=>{Le=Te(e.connectivity),be.emit(Le?"online":"offline")}))})).catch(Se)),_e}function Se(){Le=window.navigator.onLine,be.emit(Le?"online":"offline");const e=()=>{Le=!0,be.emit("online")},t=()=>{Le=!1,be.emit("offline")};window.addEventListener("online",e),window.addEventListener("offline",t),Ee=()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t)}}function Te(e){return 4==e.ipv4||4==e.ipv6||500==e.ipv4||500==e.ipv6}const Oe={maximized:"maximized",unmaximized:"unmaximized"},xe={CLOSE_REASONS:{navigateToOtherWindow:"navigateToOtherWindow",error:"navigateToOtherWindow",actionPerformed:"navigateToOtherWindow"},EVENTS:Oe,close:Ue,closeToaster:function(e){setTimeout((()=>Ue(e)),500)},minimize:function(){return M("window.minimize").then((()=>Ke(!1)))},maximize:function(){return M("window.maximize").then((()=>Ke(!0)))},restore:function(){return M("window.restore").then((()=>Ke(!1)))},isMaximized:function(){return qe},reload:function(){window.location.reload()},browse:function(e,t=null){const n={url:e};t&&(n.browser=t);return M("app.system.OpenUrl",n)},open:function(e){let t={};t="string"==typeof e?{url:e}:e;if(t.type=t.type||"CEF",!1!==t.showTitlebar){const e=window.location.pathname.slice(0,window.location.pathname.lastIndexOf("/")+1);t.url=window.location.origin+e+"mainWindow.html?module=mainLayout&view=window&url="+encodeURIComponent(t.url)+"&controls=close",t.title&&(t.url+="&title="+encodeURIComponent(t.title))}if(t.maximize||t.resizable){const e=new URL(t.url);t.maximize&&(e.search+="&placement=maximized"),t.resizable&&(e.search+="&resizable"),t.url=e.toString(),delete t.maximize,delete t.resizable}let n="";switch(t.windowType){case"modal":n="app.windowManager.ShowModal";break;case"window":n="app.windowManager.ShowWindow";break;default:n="app.windowManager.ShowModaless"}delete t.windowType,delete t.showTitlebar,t.width||t.width||(t.width=window.innerWidth,t.height=window.innerHeight);return M(n,t)},openHash:function(e){window.location.hash=e},openMainWindow:function(e={}){return M("app.windowManager.ShowMainWindow",e)},focusCurrentWindow:function(){return Ve().then(We)},focusMainWindow:function(){return M("app.windowManager.FocusMainWindow")},focusWindow:We,isInitialized:function(){return Re},init:Je,resize:He,broadcastEvent:function(e,...t){return M("app.windowManager.BroadcastEvent",{event:e,payload:JSON.stringify(t)}).catch((n=>{console.error("broadcasting event failed",e,t,n),m.emit.apply(m,[e].concat(t))}))},setTitle:function(e){document.querySelector("title").innerText=e},setCaption:Qe,getUrlParams:Ge,removeUrlParam:function(e){const t=new URL(window.location.href);t.searchParams.delete(e),window.history.replaceState({},"",t)},on:function(...e){return Ye(),je.on.apply(je,e)},subscribe:function(e){e({maximized:qe}),Ye();const t=je.on("maximized",(()=>e({maximized:qe}))),n=je.on("unmaximized",(()=>e({maximized:qe})));return function(){t(),n()}},allowResizing:Be,getWindowId:Ve},Ae=1010,Fe=674;let Pe,Me,je,Ne,Ie,Ce=".nui_caption",ze=".nui_caption_client",De=null,Re=!1,qe=!1,$e=!1;function Ue(e){return M("window.close",e)}function Be(){return M("window.setResizable")}function We(e){return M("app.windowManager.FocusWindow",{id:e})}function Ve(){return M("window.getId").then((e=>e?.id))}async function Je(e={}){if(Ye(),void 0!==e.wait&&e.wait>=0&&!1!==e.wait){const t=parseInt(e.wait)||0;await Promise.resolve(),await new Promise((e=>setTimeout(e,t)))}if(Re)return He(e.width,e.height);{const t=Ze(e.width,e.height);e.width=t.width,e.height=t.height,e.placement=e.placement||Pe.placement,null==e.placement&&delete e.placement,Re=!0;return M("window.isVisible",{},!1).catch((()=>Ve().catch((()=>"MainWindowUID")).then((e=>M("app.windowManager.IsWindowVisible",{id:e}).catch((()=>!1)))))).then((t=>{if(!t||e.forceIfVisible)return delete e.forceIfVisible,M("window.OnLoad",e)})).then((()=>{Ke("maximized"===e.placement),Qe();null!=Ge().resizable&&Be(),m.on("window.maximized",(()=>Ke(!0))),m.on("window.restored",(()=>Ke(!1)))}))}}function He(e,t){if(Re){const n=Ze(e,t);return n.width==window.innerWidth&&n.height==window.innerHeight?Promise.resolve():M("window.Resize",n).then((()=>{Ke(!1),Qe()}))}return Je({width:e,height:t})}function Ge(){return Pe||(Pe=Object.fromEntries(new URLSearchParams(window.location.search))),Pe}function Qe(e,t){e&&(Ce=e),t&&(ze=t);const n=e||Ce,i=t||ze;if(!n||!i)return;const r=((e,t)=>{let n=0;const i=()=>{const r=[],o=e=>{const t=[4];t[0]=parseInt(e.left),t[1]=parseInt(e.top),t[2]=parseInt(e.right),t[3]=parseInt(e.bottom),r.push(t)},s=document.querySelector(e);if(s){o(s.getBoundingClientRect());const e=document.querySelectorAll(t);for(let t=0;t<e.length;t++)o(e[t].getBoundingClientRect());Me!==JSON.stringify(r)&&(M("window.setNoneClientAreas",r),Me=JSON.stringify(r))}else n++,n<20?setTimeout(i,200):console.log("Caption error","no areas found with selectors ",e);return r};return i})(n,i);r(),null!=De&&window.removeEventListener("resize",De),De=((e,t)=>{let n,i;return(...r)=>{if(i){const o=Date.now()-i;clearTimeout(n),n=setTimeout((()=>{o>=t&&(e(r),i=Date.now())}),t-o)}else e(r),i=Date.now()}})(r.bind(null,!0),300),window.addEventListener("resize",De)}function Ke(e){qe=e,qe&&function(){Ne||(Ne=new ResizeObserver((()=>{Ie?Ie=!1:($e=!1,Ne.disconnect(),Ke(!1))})));setTimeout((()=>{qe&&!$e&&(Ie=!0,$e=!0,Ne.observe(document.body))}),500)}(),Ye(),qe?je.emit(Oe.maximized):je.emit(Oe.unmaximized)}function Ye(){je||(je=new l)}function Ze(e,t){const n={},i=Ge(),r=document.getElementById("app")?.firstElementChild||document.getElementById("app")||document.body,o=window.innerWidth<140?r.scrollWidth:window.innerWidth,s=window.innerHeight<100?r.scrollHeight:window.innerHeight;return n.width=Math.min(e||i.width||o||Ae,window.screen.availWidth+1),n.height=Math.min(t||i.height||s||Fe,window.screen.availHeight+1),n.width>window.screen.availWidth&&n.height>window.screen.availHeight?(document.querySelector("body").style.overflow="auto",--n.width,--n.height):document.querySelector("body").style.overflow="hidden",n}const Xe={debugMode:d,EventEmitter:l,eventer:m,napiTracker:le,moduleManager:fe,onlineChecker:ge,serviceRequest:M,setRequestCond:z,windowApi:xe},et=fe.importModule;export{l as EventEmitter,Xe as debug,d as debugMode,m as eventer,et as importModule,fe as moduleManager,le as napiTracker,ge as onlineChecker,M as serviceRequest,z as setRequestCond,xe as windowApi};const tt={name:"napi",version:"1.3.1707",created:"2025-06-02T12:27:52.760Z"};export{tt as metadata};
