(()=>{"use strict";functiont(t,e){varn=t.split(".");"isekai"inwindow||(window.isekai={});for(varo=window.isekai,i=0;i<n.length-1;i++){varr=n[i];rino||(o[r]={}),o=o[r]}o[n[i]]=e}functione(t){returne="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},e(t)}functionn(t,n){for(varo=0;o<n.length;o++){vari=n[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"ini&&(i.writable=!0),Object.defineProperty(t,(void0,r=function(t,n){if("object"!==e(t)||null===t)returnt;varo=t[Symbol.toPrimitive];if(void0!==o){vari=o.call(t,"string");if("object"!==e(i))returni;thrownewTypeError("@@toPrimitive must return a primitive value.")}returnString(t)}(i.key),"symbol"===e(r)?r:String(r)),i)}varr}functiono(){o=function(t,e){returnnewr(t,void0,e)};vart=RegExp.prototype,n=newWeakMap;functionr(t,e,o){vara=newRegExp(t,e);returnn.set(a,o||n.get(t)),i(a,r.prototype)}functiona(t,e){varo=n.get(e);returnObject.keys(o).reduce((function(e,n){vari=o[n];if("number"==typeofi)e[n]=t[i];else{for(varr=0;void0===t[i[r]]&&r+1<i.length;)r++;e[n]=t[i[r]]}returne}),Object.create(null))}returnfunction(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(r,RegExp),r.prototype.exec=function(e){varn=t.exec.call(this,e);if(n){n.groups=a(n,this);varo=n.indices;o&&(o.groups=a(o,this))}returnn},r.prototype[Symbol.replace]=function(o,i){if("string"==typeofi){varr=n.get(this);returnt[Symbol.replace].call(this,o,i.replace(/\$<([^>]+)>/g,(function(t,e){varn=r[e];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeofi){varl=this;returnt[Symbol.replace].call(this,o,(function(){vart=arguments;return"object"!=e(t[t.length-1])&&(t=[].slice.call(t)).push(a(t,l)),i.apply(this,t)}))}returnt[Symbol.replace].call(this,o,i)},o.apply(this,arguments)}functioni(t,e){returni=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){returnt.__proto__=e,t},i(t,e)}varr,a=!(!(r=navigator.userAgent.match(o(/Version\/(\S+) Mobile\/\S+/,{version:1})))||!r.groups.version),l=function(){functiont(){!function(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}(this,t),this.menuItems=[],this.menuItemsUpdated=!0,this.initDom()}vare,o;returne=t,o=[{key:"initDom",value:function(){vart=this,e=document.createElement("div");e.id="iseai-contextmenu",e.className="oo-ui-toolGroup-tools oo-ui-popupToolGroup-tools oo-ui-listToolGroup-tools oo-ui-toolGroup-enabled-tools oo-ui-popupToolGroup-active-tools",e.style.minWidth="unset",e.style.display="none",this.menuContainer=e;varn=document.createElement("div");n.className="isekai-contextmenu-cover",n.style.display="none",n.addEventListener("click",(function(){t.hide()})),this.menuCover=n,document.body.appendChild(e),document.body.appendChild(n)}},{key:"setMenuItem",value:function(t){this.menuItems=t,this.menuItemsUpdated=!0}},{key:"updateMenuItemDom",value:function(){vart=this;this.menuItemsUpdated&&(this.menuContainer.innerHTML="",this.menuItems.sort((function(t,e){varn,o;return(null!==(n=e.priority)&&void0!==n?n:0)-(null!==(o=t.priority)&&void0!==o?o:0)})).forEach((function(e){varn=document.createElement("span");n.className="oo-ui-widget oo-ui-widget-enabled oo-ui-tool";varo=document.createElement("a");o.className="oo-ui-tool-link",o.tabIndex=0,o.role="button",o.addEventListener("click",(function(n){varo;n.preventDefault(),null===(o=e.onClick)||void0===o||o.call(e),t.hide()}));vari=document.createElement("span");i.className="oo-ui-tool-title",i.innerText=e.label,o.appendChild(i),n.appendChild(o),t.menuContainer.appendChild(n)})),this.menuItemsUpdated=!1)}},{key:"show",value:function(){for(vart=0,e=0,n=arguments.length,o=newArray(n),i=0;i<n;i++)o[i]=arguments[i];if(o[0]instanceof