!function(){"use strict";function t(i){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(i)}function i(t,i){for(var e=0;e<i.length;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function e(t,i,e){return(i=o(i))in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function o(i){var e=function(i,e){if("object"!=t(i)||!i)return i;var o=i[Symbol.toPrimitive];if(void 0!==o){var n=o.call(i,e||"default");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(i)}(i,"string");return"symbol"==t(e)?e:e+""}var n=700,r=470,a=84;new(function(){return t=function t(){var i,o,n;!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),e(this,"plugin",void 0),e(this,"dialog",void 0),this.plugin=null===(i=window.Extention)||void 0===i?void 0:i.PluginManager.getPlugin(),null===(o=this.plugin)||void 0===o||o.ready(this.ready.bind(this)),null===(n=this.plugin)||void 0===n||n.onRunning(this.onRunning.bind(this))},o=[{key:"ready",value:function(){this.showMainDialog()}},{key:"onRunning",value:function(){this.dialog?(this.setDialogPosition(),this.dialog.show(),this.dialog.takeFocus()):this.showMainDialog()}},{key:"getUrlPath",value:function(){var t=document.location.toString();return-1!=(t=decodeURI(t)).indexOf("/")&&(t=t.substring(0,t.lastIndexOf("/"))),t}},{key:"onDestroy",value:function(){var t;null===(t=this.dialog)||void 0===t||t.removeDestroyListener(this.onDestroy.bind(this)),this.dialog=void 0}},{key:"showMainDialog",value:function(){var t=n,i=r;this.dialog=window.Extention.Webview.create({url:this.getUrlPath()+"/entry.html",id:"t4"+Date.now(),attrs:{winFlag:"DialogType",allowResize:!1,mode:!1,hasShadow:!0,bChildWindow:!0,escQuit:!0,hasFocus:!0},geo:{w:t,h:i},nativeState:{needFailedClose:!0}}),this.dialog.setDragArea({x:0,y:0,w:n,h:a}),this.dialog.addDestroyListener(this.onDestroy.bind(this)),this.setDialogPosition(),this.dialog.show()}},{key:"setDialogPosition",value:function(){if(this.dialog){var t=0,i=0,e=n,o=r,a=this.dialog.getSize();if(a.code&&a.result){var l=a.result;e=l.w,o=l.h}var s=this.dialog.getParentGeometry();if(s.code&&s.result){var u=s.result,d=u.w,h=u.h;t=.5*(d-e)+u.x,i=.5*(h-o)+u.y}this.dialog.setGeometry({x:t,y:i})}}}],o&&i(t.prototype,o),l&&i(t,l),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,o,l}())}();