-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathemulators-ui.js
20 lines (18 loc) · 202 KB
/
emulators-ui.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
* js-dos v7
* (c) 2023 Alexander Guryanov, https://github.com/caiiiycuk
*/
!function t(e,n,o){function i(s,a){if(!n[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(r)return r(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};e[s][0].call(u.exports,(function(t){return i(e[s][1][t]||t)}),u,u.exports,t,e,n,o)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(t,e,n){"use strict";var o=t("./utils");function i(){var t={},e=0,n=0,o=0;return{add:function(i,r){r||(r=i,i=0),i>n?n=i:i<o&&(o=i),t[i]||(t[i]=[]),t[i].push(r),e++},process:function(){for(var e=o;e<=n;e++)for(var i=t[e],r=0;r<i.length;r++){(0,i[r])()}},size:function(){return e}}}e.exports=function(t){var e=(t=t||{}).reporter,n=o.getOption(t,"async",!0),r=o.getOption(t,"auto",!0);r&&!n&&(e&&e.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var s,a=i(),l=!1;function c(){for(l=!0;a.size();){var t=a;a=i(),t.process()}l=!1}function u(){var t;t=c,s=setTimeout(t,0)}return{add:function(t,e){!l&&r&&n&&0===a.size()&&u(),a.add(t,e)},force:function(t){l||(void 0===t&&(t=n),s&&(clearTimeout(s),s=null),t?u():c())}}}},{"./utils":2}],2:[function(t,e,n){"use strict";(e.exports={}).getOption=function(t,e,n){var o=t[e];if(null==o&&void 0!==n)return n;return o}},{}],3:[function(t,e,n){var o=t("../internals/is-callable"),i=t("../internals/try-to-string"),r=TypeError;e.exports=function(t){if(o(t))return t;throw r(i(t)+" is not a function")}},{"../internals/is-callable":65,"../internals/try-to-string":110}],4:[function(t,e,n){var o=t("../internals/is-constructor"),i=t("../internals/try-to-string"),r=TypeError;e.exports=function(t){if(o(t))return t;throw r(i(t)+" is not a constructor")}},{"../internals/is-constructor":66,"../internals/try-to-string":110}],5:[function(t,e,n){var o=t("../internals/is-callable"),i=String,r=TypeError;e.exports=function(t){if("object"==typeof t||o(t))return t;throw r("Can't set "+i(t)+" as a prototype")}},{"../internals/is-callable":65}],6:[function(t,e,n){var o=t("../internals/well-known-symbol"),i=t("../internals/object-create"),r=t("../internals/object-define-property").f,s=o("unscopables"),a=Array.prototype;null==a[s]&&r(a,s,{configurable:!0,value:i(null)}),e.exports=function(t){a[s][t]=!0}},{"../internals/object-create":79,"../internals/object-define-property":81,"../internals/well-known-symbol":117}],7:[function(t,e,n){var o=t("../internals/object-is-prototype-of"),i=TypeError;e.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},{"../internals/object-is-prototype-of":86}],8:[function(t,e,n){var o=t("../internals/is-object"),i=String,r=TypeError;e.exports=function(t){if(o(t))return t;throw r(i(t)+" is not an object")}},{"../internals/is-object":69}],9:[function(t,e,n){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},{}],10:[function(t,e,n){"use strict";var o,i,r,s=t("../internals/array-buffer-native"),a=t("../internals/descriptors"),l=t("../internals/global"),c=t("../internals/is-callable"),u=t("../internals/is-object"),d=t("../internals/has-own-property"),p=t("../internals/classof"),f=t("../internals/try-to-string"),h=t("../internals/create-non-enumerable-property"),y=t("../internals/define-built-in"),m=t("../internals/object-define-property").f,g=t("../internals/object-is-prototype-of"),v=t("../internals/object-get-prototype-of"),b=t("../internals/object-set-prototype-of"),_=t("../internals/well-known-symbol"),w=t("../internals/uid"),D=l.Int8Array,B=D&&D.prototype,k=l.Uint8ClampedArray,x=k&&k.prototype,K=D&&v(D),C=B&&v(B),E=Object.prototype,O=l.TypeError,j=_("toStringTag"),S=w("TYPED_ARRAY_TAG"),P=w("TYPED_ARRAY_CONSTRUCTOR"),T=s&&!!b&&"Opera"!==p(l.opera),M=!1,L={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},A={BigInt64Array:8,BigUint64Array:8},I=function(t){if(!u(t))return!1;var e=p(t);return d(L,e)||d(A,e)};for(o in L)(r=(i=l[o])&&i.prototype)?h(r,P,i):T=!1;for(o in A)(r=(i=l[o])&&i.prototype)&&h(r,P,i);if((!T||!c(K)||K===Function.prototype)&&(K=function(){throw O("Incorrect invocation")},T))for(o in L)l[o]&&b(l[o],K);if((!T||!C||C===E)&&(C=K.prototype,T))for(o in L)l[o]&&b(l[o].prototype,C);if(T&&v(x)!==C&&b(x,C),a&&!d(C,j))for(o in M=!0,m(C,j,{get:function(){return u(this)?this[S]:void 0}}),L)l[o]&&h(l[o],S,o);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:T,TYPED_ARRAY_CONSTRUCTOR:P,TYPED_ARRAY_TAG:M&&S,aTypedArray:function(t){if(I(t))return t;throw O("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!b||g(K,t)))return t;throw O(f(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n,o){if(a){if(n)for(var i in L){var r=l[i];if(r&&d(r.prototype,t))try{delete r.prototype[t]}catch(n){try{r.prototype[t]=e}catch(t){}}}C[t]&&!n||y(C,t,n?e:T&&B[t]||e,o)}},exportTypedArrayStaticMethod:function(t,e,n){var o,i;if(a){if(b){if(n)for(o in L)if((i=l[o])&&d(i,t))try{delete i[t]}catch(t){}if(K[t]&&!n)return;try{return y(K,t,n?e:T&&K[t]||e)}catch(t){}}for(o in L)!(i=l[o])||i[t]&&!n||y(i,t,e)}},isView:function(t){if(!u(t))return!1;var e=p(t);return"DataView"===e||d(L,e)||d(A,e)},isTypedArray:I,TypedArray:K,TypedArrayPrototype:C}},{"../internals/array-buffer-native":9,"../internals/classof":21,"../internals/create-non-enumerable-property":25,"../internals/define-built-in":28,"../internals/descriptors":32,"../internals/global":53,"../internals/has-own-property":54,"../internals/is-callable":65,"../internals/is-object":69,"../internals/object-define-property":81,"../internals/object-get-prototype-of":85,"../internals/object-is-prototype-of":86,"../internals/object-set-prototype-of":90,"../internals/try-to-string":110,"../internals/uid":114,"../internals/well-known-symbol":117}],11:[function(t,e,n){"use strict";var o=t("../internals/global"),i=t("../internals/function-uncurry-this"),r=t("../internals/descriptors"),s=t("../internals/array-buffer-native"),a=t("../internals/function-name"),l=t("../internals/create-non-enumerable-property"),c=t("../internals/define-built-ins"),u=t("../internals/fails"),d=t("../internals/an-instance"),p=t("../internals/to-integer-or-infinity"),f=t("../internals/to-length"),h=t("../internals/to-index"),y=t("../internals/ieee754"),m=t("../internals/object-get-prototype-of"),g=t("../internals/object-set-prototype-of"),v=t("../internals/object-get-own-property-names").f,b=t("../internals/object-define-property").f,_=t("../internals/array-fill"),w=t("../internals/array-slice-simple"),D=t("../internals/set-to-string-tag"),B=t("../internals/internal-state"),k=a.PROPER,x=a.CONFIGURABLE,K=B.get,C=B.set,E="ArrayBuffer",O="DataView",j="Wrong index",S=o.ArrayBuffer,P=S,T=P&&P.prototype,M=o.DataView,L=M&&M.prototype,A=Object.prototype,I=o.Array,N=o.RangeError,F=i(_),R=i([].reverse),U=y.pack,z=y.unpack,H=function(t){return[255&t]},V=function(t){return[255&t,t>>8&255]},G=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},Y=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},W=function(t){return U(t,23,4)},q=function(t){return U(t,52,8)},X=function(t,e){b(t.prototype,e,{get:function(){return K(this)[e]}})},J=function(t,e,n,o){var i=h(n),r=K(t);if(i+e>r.byteLength)throw N(j);var s=K(r.buffer).bytes,a=i+r.byteOffset,l=w(s,a,a+e);return o?l:R(l)},Q=function(t,e,n,o,i,r){var s=h(n),a=K(t);if(s+e>a.byteLength)throw N(j);for(var l=K(a.buffer).bytes,c=s+a.byteOffset,u=o(+i),d=0;d<e;d++)l[c+d]=u[r?d:e-d-1]};if(s){var $=k&&S.name!==E;if(u((function(){S(1)}))&&u((function(){new S(-1)}))&&!u((function(){return new S,new S(1.5),new S(NaN),$&&!x})))$&&x&&l(S,"name",E);else{(P=function(t){return d(this,T),new S(h(t))}).prototype=T;for(var Z,tt=v(S),et=0;tt.length>et;)(Z=tt[et++])in P||l(P,Z,S[Z]);T.constructor=P}g&&m(L)!==A&&g(L,A);var nt=new M(new P(2)),ot=i(L.setInt8);nt.setInt8(0,2147483648),nt.setInt8(1,2147483649),!nt.getInt8(0)&&nt.getInt8(1)||c(L,{setInt8:function(t,e){ot(this,t,e<<24>>24)},setUint8:function(t,e){ot(this,t,e<<24>>24)}},{unsafe:!0})}else T=(P=function(t){d(this,T);var e=h(t);C(this,{bytes:F(I(e),0),byteLength:e}),r||(this.byteLength=e)}).prototype,L=(M=function(t,e,n){d(this,L),d(t,T);var o=K(t).byteLength,i=p(e);if(i<0||i>o)throw N("Wrong offset");if(i+(n=void 0===n?o-i:f(n))>o)throw N("Wrong length");C(this,{buffer:t,byteLength:n,byteOffset:i}),r||(this.buffer=t,this.byteLength=n,this.byteOffset=i)}).prototype,r&&(X(P,"byteLength"),X(M,"buffer"),X(M,"byteLength"),X(M,"byteOffset")),c(L,{getInt8:function(t){return J(this,1,t)[0]<<24>>24},getUint8:function(t){return J(this,1,t)[0]},getInt16:function(t){var e=J(this,2,t,arguments.length>1?arguments[1]:void 0);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=J(this,2,t,arguments.length>1?arguments[1]:void 0);return e[1]<<8|e[0]},getInt32:function(t){return Y(J(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return Y(J(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return z(J(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return z(J(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,e){Q(this,1,t,H,e)},setUint8:function(t,e){Q(this,1,t,H,e)},setInt16:function(t,e){Q(this,2,t,V,e,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,e){Q(this,2,t,V,e,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,e){Q(this,4,t,G,e,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,e){Q(this,4,t,G,e,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,e){Q(this,4,t,W,e,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,e){Q(this,8,t,q,e,arguments.length>2?arguments[2]:void 0)}});D(P,E),D(M,O),e.exports={ArrayBuffer:P,DataView:M}},{"../internals/an-instance":7,"../internals/array-buffer-native":9,"../internals/array-fill":12,"../internals/array-slice-simple":15,"../internals/create-non-enumerable-property":25,"../internals/define-built-ins":29,"../internals/descriptors":32,"../internals/fails":43,"../internals/function-name":47,"../internals/function-uncurry-this":48,"../internals/global":53,"../internals/ieee754":58,"../internals/internal-state":62,"../internals/object-define-property":81,"../internals/object-get-own-property-names":83,"../internals/object-get-prototype-of":85,"../internals/object-set-prototype-of":90,"../internals/set-to-string-tag":95,"../internals/to-index":100,"../internals/to-integer-or-infinity":102,"../internals/to-length":103}],12:[function(t,e,n){"use strict";var o=t("../internals/to-object"),i=t("../internals/to-absolute-index"),r=t("../internals/length-of-array-like");e.exports=function(t){for(var e=o(this),n=r(e),s=arguments.length,a=i(s>1?arguments[1]:void 0,n),l=s>2?arguments[2]:void 0,c=void 0===l?n:i(l,n);c>a;)e[a++]=t;return e}},{"../internals/length-of-array-like":74,"../internals/to-absolute-index":99,"../internals/to-object":104}],13:[function(t,e,n){var o=t("../internals/to-indexed-object"),i=t("../internals/to-absolute-index"),r=t("../internals/length-of-array-like"),s=function(t){return function(e,n,s){var a,l=o(e),c=r(l),u=i(s,c);if(t&&n!=n){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},{"../internals/length-of-array-like":74,"../internals/to-absolute-index":99,"../internals/to-indexed-object":101}],14:[function(t,e,n){var o=t("../internals/function-bind-context"),i=t("../internals/function-uncurry-this"),r=t("../internals/indexed-object"),s=t("../internals/to-object"),a=t("../internals/length-of-array-like"),l=t("../internals/array-species-create"),c=i([].push),u=function(t){var e=1==t,n=2==t,i=3==t,u=4==t,d=6==t,p=7==t,f=5==t||d;return function(h,y,m,g){for(var v,b,_=s(h),w=r(_),D=o(y,m),B=a(w),k=0,x=g||l,K=e?x(h,B):n||p?x(h,0):void 0;B>k;k++)if((f||k in w)&&(b=D(v=w[k],k,_),t))if(e)K[k]=b;else if(b)switch(t){case 3:return!0;case 5:return v;case 6:return k;case 2:c(K,v)}else switch(t){case 4:return!1;case 7:c(K,v)}return d?-1:i||u?u:K}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},{"../internals/array-species-create":18,"../internals/function-bind-context":44,"../internals/function-uncurry-this":48,"../internals/indexed-object":59,"../internals/length-of-array-like":74,"../internals/to-object":104}],15:[function(t,e,n){var o=t("../internals/to-absolute-index"),i=t("../internals/length-of-array-like"),r=t("../internals/create-property"),s=Array,a=Math.max;e.exports=function(t,e,n){for(var l=i(t),c=o(e,l),u=o(void 0===n?l:n,l),d=s(a(u-c,0)),p=0;c<u;c++,p++)r(d,p,t[c]);return d.length=p,d}},{"../internals/create-property":27,"../internals/length-of-array-like":74,"../internals/to-absolute-index":99}],16:[function(t,e,n){var o=t("../internals/array-slice-simple"),i=Math.floor,r=function(t,e){var n=t.length,l=i(n/2);return n<8?s(t,e):a(t,r(o(t,0,l),e),r(o(t,l),e),e)},s=function(t,e){for(var n,o,i=t.length,r=1;r<i;){for(o=r,n=t[r];o&&e(t[o-1],n)>0;)t[o]=t[--o];o!==r++&&(t[o]=n)}return t},a=function(t,e,n,o){for(var i=e.length,r=n.length,s=0,a=0;s<i||a<r;)t[s+a]=s<i&&a<r?o(e[s],n[a])<=0?e[s++]:n[a++]:s<i?e[s++]:n[a++];return t};e.exports=r},{"../internals/array-slice-simple":15}],17:[function(t,e,n){var o=t("../internals/is-array"),i=t("../internals/is-constructor"),r=t("../internals/is-object"),s=t("../internals/well-known-symbol")("species"),a=Array;e.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===a||o(e.prototype))||r(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?a:e}},{"../internals/is-array":64,"../internals/is-constructor":66,"../internals/is-object":69,"../internals/well-known-symbol":117}],18:[function(t,e,n){var o=t("../internals/array-species-constructor");e.exports=function(t,e){return new(o(t))(0===e?0:e)}},{"../internals/array-species-constructor":17}],19:[function(t,e,n){var o=t("../internals/well-known-symbol")("iterator"),i=!1;try{var r=0,s={next:function(){return{done:!!r++}},return:function(){i=!0}};s[o]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}e.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var r={};r[o]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}},{"../internals/well-known-symbol":117}],20:[function(t,e,n){var o=t("../internals/function-uncurry-this"),i=o({}.toString),r=o("".slice);e.exports=function(t){return r(i(t),8,-1)}},{"../internals/function-uncurry-this":48}],21:[function(t,e,n){var o=t("../internals/to-string-tag-support"),i=t("../internals/is-callable"),r=t("../internals/classof-raw"),s=t("../internals/well-known-symbol")("toStringTag"),a=Object,l="Arguments"==r(function(){return arguments}());e.exports=o?r:function(t){var e,n,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),s))?n:l?r(e):"Object"==(o=r(e))&&i(e.callee)?"Arguments":o}},{"../internals/classof-raw":20,"../internals/is-callable":65,"../internals/to-string-tag-support":109,"../internals/well-known-symbol":117}],22:[function(t,e,n){var o=t("../internals/has-own-property"),i=t("../internals/own-keys"),r=t("../internals/object-get-own-property-descriptor"),s=t("../internals/object-define-property");e.exports=function(t,e,n){for(var a=i(e),l=s.f,c=r.f,u=0;u<a.length;u++){var d=a[u];o(t,d)||n&&o(n,d)||l(t,d,c(e,d))}}},{"../internals/has-own-property":54,"../internals/object-define-property":81,"../internals/object-get-own-property-descriptor":82,"../internals/own-keys":92}],23:[function(t,e,n){var o=t("../internals/fails");e.exports=!o((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},{"../internals/fails":43}],24:[function(t,e,n){"use strict";var o=t("../internals/iterators-core").IteratorPrototype,i=t("../internals/object-create"),r=t("../internals/create-property-descriptor"),s=t("../internals/set-to-string-tag"),a=t("../internals/iterators"),l=function(){return this};e.exports=function(t,e,n,c){var u=e+" Iterator";return t.prototype=i(o,{next:r(+!c,n)}),s(t,u,!1,!0),a[u]=l,t}},{"../internals/create-property-descriptor":26,"../internals/iterators":73,"../internals/iterators-core":72,"../internals/object-create":79,"../internals/set-to-string-tag":95}],25:[function(t,e,n){var o=t("../internals/descriptors"),i=t("../internals/object-define-property"),r=t("../internals/create-property-descriptor");e.exports=o?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},{"../internals/create-property-descriptor":26,"../internals/descriptors":32,"../internals/object-define-property":81}],26:[function(t,e,n){e.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},{}],27:[function(t,e,n){"use strict";var o=t("../internals/to-property-key"),i=t("../internals/object-define-property"),r=t("../internals/create-property-descriptor");e.exports=function(t,e,n){var s=o(e);s in t?i.f(t,s,r(0,n)):t[s]=n}},{"../internals/create-property-descriptor":26,"../internals/object-define-property":81,"../internals/to-property-key":108}],28:[function(t,e,n){var o=t("../internals/is-callable"),i=t("../internals/create-non-enumerable-property"),r=t("../internals/make-built-in"),s=t("../internals/define-global-property");e.exports=function(t,e,n,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;return o(n)&&r(n,c,a),a.global?l?t[e]=n:s(e,n):(a.unsafe?t[e]&&(l=!0):delete t[e],l?t[e]=n:i(t,e,n)),t}},{"../internals/create-non-enumerable-property":25,"../internals/define-global-property":30,"../internals/is-callable":65,"../internals/make-built-in":75}],29:[function(t,e,n){var o=t("../internals/define-built-in");e.exports=function(t,e,n){for(var i in e)o(t,i,e[i],n);return t}},{"../internals/define-built-in":28}],30:[function(t,e,n){var o=t("../internals/global"),i=Object.defineProperty;e.exports=function(t,e){try{i(o,t,{value:e,configurable:!0,writable:!0})}catch(n){o[t]=e}return e}},{"../internals/global":53}],31:[function(t,e,n){"use strict";var o=t("../internals/export"),i=t("../internals/function-call"),r=t("../internals/is-pure"),s=t("../internals/function-name"),a=t("../internals/is-callable"),l=t("../internals/create-iterator-constructor"),c=t("../internals/object-get-prototype-of"),u=t("../internals/object-set-prototype-of"),d=t("../internals/set-to-string-tag"),p=t("../internals/create-non-enumerable-property"),f=t("../internals/define-built-in"),h=t("../internals/well-known-symbol"),y=t("../internals/iterators"),m=t("../internals/iterators-core"),g=s.PROPER,v=s.CONFIGURABLE,b=m.IteratorPrototype,_=m.BUGGY_SAFARI_ITERATORS,w=h("iterator"),D="keys",B="values",k="entries",x=function(){return this};e.exports=function(t,e,n,s,h,m,K){l(n,e,s);var C,E,O,j=function(t){if(t===h&&L)return L;if(!_&&t in T)return T[t];switch(t){case D:case B:case k:return function(){return new n(this,t)}}return function(){return new n(this)}},S=e+" Iterator",P=!1,T=t.prototype,M=T[w]||T["@@iterator"]||h&&T[h],L=!_&&M||j(h),A="Array"==e&&T.entries||M;if(A&&(C=c(A.call(new t)))!==Object.prototype&&C.next&&(r||c(C)===b||(u?u(C,b):a(C[w])||f(C,w,x)),d(C,S,!0,!0),r&&(y[S]=x)),g&&h==B&&M&&M.name!==B&&(!r&&v?p(T,"name",B):(P=!0,L=function(){return i(M,this)})),h)if(E={values:j(B),keys:m?L:j(D),entries:j(k)},K)for(O in E)(_||P||!(O in T))&&f(T,O,E[O]);else o({target:e,proto:!0,forced:_||P},E);return r&&!K||T[w]===L||f(T,w,L,{name:h}),y[e]=L,E}},{"../internals/create-iterator-constructor":24,"../internals/create-non-enumerable-property":25,"../internals/define-built-in":28,"../internals/export":42,"../internals/function-call":46,"../internals/function-name":47,"../internals/is-callable":65,"../internals/is-pure":70,"../internals/iterators":73,"../internals/iterators-core":72,"../internals/object-get-prototype-of":85,"../internals/object-set-prototype-of":90,"../internals/set-to-string-tag":95,"../internals/well-known-symbol":117}],32:[function(t,e,n){var o=t("../internals/fails");e.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},{"../internals/fails":43}],33:[function(t,e,n){var o=t("../internals/global"),i=t("../internals/is-object"),r=o.document,s=i(r)&&i(r.createElement);e.exports=function(t){return s?r.createElement(t):{}}},{"../internals/global":53,"../internals/is-object":69}],34:[function(t,e,n){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],35:[function(t,e,n){var o=t("../internals/document-create-element")("span").classList,i=o&&o.constructor&&o.constructor.prototype;e.exports=i===Object.prototype?void 0:i},{"../internals/document-create-element":33}],36:[function(t,e,n){var o=t("../internals/engine-user-agent").match(/firefox\/(\d+)/i);e.exports=!!o&&+o[1]},{"../internals/engine-user-agent":38}],37:[function(t,e,n){var o=t("../internals/engine-user-agent");e.exports=/MSIE|Trident/.test(o)},{"../internals/engine-user-agent":38}],38:[function(t,e,n){var o=t("../internals/get-built-in");e.exports=o("navigator","userAgent")||""},{"../internals/get-built-in":49}],39:[function(t,e,n){var o,i,r=t("../internals/global"),s=t("../internals/engine-user-agent"),a=r.process,l=r.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(i=(o=u.split("."))[0]>0&&o[0]<4?1:+(o[0]+o[1])),!i&&s&&(!(o=s.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=s.match(/Chrome\/(\d+)/))&&(i=+o[1]),e.exports=i},{"../internals/engine-user-agent":38,"../internals/global":53}],40:[function(t,e,n){var o=t("../internals/engine-user-agent").match(/AppleWebKit\/(\d+)\./);e.exports=!!o&&+o[1]},{"../internals/engine-user-agent":38}],41:[function(t,e,n){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],42:[function(t,e,n){var o=t("../internals/global"),i=t("../internals/object-get-own-property-descriptor").f,r=t("../internals/create-non-enumerable-property"),s=t("../internals/define-built-in"),a=t("../internals/define-global-property"),l=t("../internals/copy-constructor-properties"),c=t("../internals/is-forced");e.exports=function(t,e){var n,u,d,p,f,h=t.target,y=t.global,m=t.stat;if(n=y?o:m?o[h]||a(h,{}):(o[h]||{}).prototype)for(u in e){if(p=e[u],d=t.dontCallGetSet?(f=i(n,u))&&f.value:n[u],!c(y?u:h+(m?".":"#")+u,t.forced)&&void 0!==d){if(typeof p==typeof d)continue;l(p,d)}(t.sham||d&&d.sham)&&r(p,"sham",!0),s(n,u,p,t)}}},{"../internals/copy-constructor-properties":22,"../internals/create-non-enumerable-property":25,"../internals/define-built-in":28,"../internals/define-global-property":30,"../internals/global":53,"../internals/is-forced":67,"../internals/object-get-own-property-descriptor":82}],43:[function(t,e,n){e.exports=function(t){try{return!!t()}catch(t){return!0}}},{}],44:[function(t,e,n){var o=t("../internals/function-uncurry-this"),i=t("../internals/a-callable"),r=t("../internals/function-bind-native"),s=o(o.bind);e.exports=function(t,e){return i(t),void 0===e?t:r?s(t,e):function(){return t.apply(e,arguments)}}},{"../internals/a-callable":3,"../internals/function-bind-native":45,"../internals/function-uncurry-this":48}],45:[function(t,e,n){var o=t("../internals/fails");e.exports=!o((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},{"../internals/fails":43}],46:[function(t,e,n){var o=t("../internals/function-bind-native"),i=Function.prototype.call;e.exports=o?i.bind(i):function(){return i.apply(i,arguments)}},{"../internals/function-bind-native":45}],47:[function(t,e,n){var o=t("../internals/descriptors"),i=t("../internals/has-own-property"),r=Function.prototype,s=o&&Object.getOwnPropertyDescriptor,a=i(r,"name"),l=a&&"something"===function(){}.name,c=a&&(!o||o&&s(r,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},{"../internals/descriptors":32,"../internals/has-own-property":54}],48:[function(t,e,n){var o=t("../internals/function-bind-native"),i=Function.prototype,r=i.bind,s=i.call,a=o&&r.bind(s,s);e.exports=o?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},{"../internals/function-bind-native":45}],49:[function(t,e,n){var o=t("../internals/global"),i=t("../internals/is-callable"),r=function(t){return i(t)?t:void 0};e.exports=function(t,e){return arguments.length<2?r(o[t]):o[t]&&o[t][e]}},{"../internals/global":53,"../internals/is-callable":65}],50:[function(t,e,n){var o=t("../internals/classof"),i=t("../internals/get-method"),r=t("../internals/iterators"),s=t("../internals/well-known-symbol")("iterator");e.exports=function(t){if(null!=t)return i(t,s)||i(t,"@@iterator")||r[o(t)]}},{"../internals/classof":21,"../internals/get-method":52,"../internals/iterators":73,"../internals/well-known-symbol":117}],51:[function(t,e,n){var o=t("../internals/function-call"),i=t("../internals/a-callable"),r=t("../internals/an-object"),s=t("../internals/try-to-string"),a=t("../internals/get-iterator-method"),l=TypeError;e.exports=function(t,e){var n=arguments.length<2?a(t):e;if(i(n))return r(o(n,t));throw l(s(t)+" is not iterable")}},{"../internals/a-callable":3,"../internals/an-object":8,"../internals/function-call":46,"../internals/get-iterator-method":50,"../internals/try-to-string":110}],52:[function(t,e,n){var o=t("../internals/a-callable");e.exports=function(t,e){var n=t[e];return null==n?void 0:o(n)}},{"../internals/a-callable":3}],53:[function(t,e,n){(function(t){(function(){var n=function(t){return t&&t.Math==Math&&t};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],54:[function(t,e,n){var o=t("../internals/function-uncurry-this"),i=t("../internals/to-object"),r=o({}.hasOwnProperty);e.exports=Object.hasOwn||function(t,e){return r(i(t),e)}},{"../internals/function-uncurry-this":48,"../internals/to-object":104}],55:[function(t,e,n){e.exports={}},{}],56:[function(t,e,n){var o=t("../internals/get-built-in");e.exports=o("document","documentElement")},{"../internals/get-built-in":49}],57:[function(t,e,n){var o=t("../internals/descriptors"),i=t("../internals/fails"),r=t("../internals/document-create-element");e.exports=!o&&!i((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},{"../internals/descriptors":32,"../internals/document-create-element":33,"../internals/fails":43}],58:[function(t,e,n){var o=Array,i=Math.abs,r=Math.pow,s=Math.floor,a=Math.log,l=Math.LN2;e.exports={pack:function(t,e,n){var c,u,d,p=o(n),f=8*n-e-1,h=(1<<f)-1,y=h>>1,m=23===e?r(2,-24)-r(2,-77):0,g=t<0||0===t&&1/t<0?1:0,v=0;for((t=i(t))!=t||t===1/0?(u=t!=t?1:0,c=h):(c=s(a(t)/l),t*(d=r(2,-c))<1&&(c--,d*=2),(t+=c+y>=1?m/d:m*r(2,1-y))*d>=2&&(c++,d/=2),c+y>=h?(u=0,c=h):c+y>=1?(u=(t*d-1)*r(2,e),c+=y):(u=t*r(2,y-1)*r(2,e),c=0));e>=8;)p[v++]=255&u,u/=256,e-=8;for(c=c<<e|u,f+=e;f>0;)p[v++]=255&c,c/=256,f-=8;return p[--v]|=128*g,p},unpack:function(t,e){var n,o=t.length,i=8*o-e-1,s=(1<<i)-1,a=s>>1,l=i-7,c=o-1,u=t[c--],d=127&u;for(u>>=7;l>0;)d=256*d+t[c--],l-=8;for(n=d&(1<<-l)-1,d>>=-l,l+=e;l>0;)n=256*n+t[c--],l-=8;if(0===d)d=1-a;else{if(d===s)return n?NaN:u?-1/0:1/0;n+=r(2,e),d-=a}return(u?-1:1)*n*r(2,d-e)}}},{}],59:[function(t,e,n){var o=t("../internals/function-uncurry-this"),i=t("../internals/fails"),r=t("../internals/classof-raw"),s=Object,a=o("".split);e.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==r(t)?a(t,""):s(t)}:s},{"../internals/classof-raw":20,"../internals/fails":43,"../internals/function-uncurry-this":48}],60:[function(t,e,n){var o=t("../internals/is-callable"),i=t("../internals/is-object"),r=t("../internals/object-set-prototype-of");e.exports=function(t,e,n){var s,a;return r&&o(s=e.constructor)&&s!==n&&i(a=s.prototype)&&a!==n.prototype&&r(t,a),t}},{"../internals/is-callable":65,"../internals/is-object":69,"../internals/object-set-prototype-of":90}],61:[function(t,e,n){var o=t("../internals/function-uncurry-this"),i=t("../internals/is-callable"),r=t("../internals/shared-store"),s=o(Function.toString);i(r.inspectSource)||(r.inspectSource=function(t){return s(t)}),e.exports=r.inspectSource},{"../internals/function-uncurry-this":48,"../internals/is-callable":65,"../internals/shared-store":97}],62:[function(t,e,n){var o,i,r,s=t("../internals/native-weak-map"),a=t("../internals/global"),l=t("../internals/function-uncurry-this"),c=t("../internals/is-object"),u=t("../internals/create-non-enumerable-property"),d=t("../internals/has-own-property"),p=t("../internals/shared-store"),f=t("../internals/shared-key"),h=t("../internals/hidden-keys"),y="Object already initialized",m=a.TypeError,g=a.WeakMap;if(s||p.state){var v=p.state||(p.state=new g),b=l(v.get),_=l(v.has),w=l(v.set);o=function(t,e){if(_(v,t))throw new m(y);return e.facade=t,w(v,t,e),e},i=function(t){return b(v,t)||{}},r=function(t){return _(v,t)}}else{var D=f("state");h[D]=!0,o=function(t,e){if(d(t,D))throw new m(y);return e.facade=t,u(t,D,e),e},i=function(t){return d(t,D)?t[D]:{}},r=function(t){return d(t,D)}}e.exports={set:o,get:i,has:r,enforce:function(t){return r(t)?i(t):o(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=i(e)).type!==t)throw m("Incompatible receiver, "+t+" required");return n}}}},{"../internals/create-non-enumerable-property":25,"../internals/function-uncurry-this":48,"../internals/global":53,"../internals/has-own-property":54,"../internals/hidden-keys":55,"../internals/is-object":69,"../internals/native-weak-map":78,"../internals/shared-key":96,"../internals/shared-store":97}],63:[function(t,e,n){var o=t("../internals/well-known-symbol"),i=t("../internals/iterators"),r=o("iterator"),s=Array.prototype;e.exports=function(t){return void 0!==t&&(i.Array===t||s[r]===t)}},{"../internals/iterators":73,"../internals/well-known-symbol":117}],64:[function(t,e,n){var o=t("../internals/classof-raw");e.exports=Array.isArray||function(t){return"Array"==o(t)}},{"../internals/classof-raw":20}],65:[function(t,e,n){e.exports=function(t){return"function"==typeof t}},{}],66:[function(t,e,n){var o=t("../internals/function-uncurry-this"),i=t("../internals/fails"),r=t("../internals/is-callable"),s=t("../internals/classof"),a=t("../internals/get-built-in"),l=t("../internals/inspect-source"),c=function(){},u=[],d=a("Reflect","construct"),p=/^\s*(?:class|function)\b/,f=o(p.exec),h=!p.exec(c),y=function(t){if(!r(t))return!1;try{return d(c,u,t),!0}catch(t){return!1}},m=function(t){if(!r(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!f(p,l(t))}catch(t){return!0}};m.sham=!0,e.exports=!d||i((function(){var t;return y(y.call)||!y(Object)||!y((function(){t=!0}))||t}))?m:y},{"../internals/classof":21,"../internals/fails":43,"../internals/function-uncurry-this":48,"../internals/get-built-in":49,"../internals/inspect-source":61,"../internals/is-callable":65}],67:[function(t,e,n){var o=t("../internals/fails"),i=t("../internals/is-callable"),r=/#|\.prototype\./,s=function(t,e){var n=l[a(t)];return n==u||n!=c&&(i(e)?o(e):!!e)},a=s.normalize=function(t){return String(t).replace(r,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";e.exports=s},{"../internals/fails":43,"../internals/is-callable":65}],68:[function(t,e,n){var o=t("../internals/is-object"),i=Math.floor;e.exports=Number.isInteger||function(t){return!o(t)&&isFinite(t)&&i(t)===t}},{"../internals/is-object":69}],69:[function(t,e,n){var o=t("../internals/is-callable");e.exports=function(t){return"object"==typeof t?null!==t:o(t)}},{"../internals/is-callable":65}],70:[function(t,e,n){e.exports=!1},{}],71:[function(t,e,n){var o=t("../internals/get-built-in"),i=t("../internals/is-callable"),r=t("../internals/object-is-prototype-of"),s=t("../internals/use-symbol-as-uid"),a=Object;e.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&r(e.prototype,a(t))}},{"../internals/get-built-in":49,"../internals/is-callable":65,"../internals/object-is-prototype-of":86,"../internals/use-symbol-as-uid":115}],72:[function(t,e,n){"use strict";var o,i,r,s=t("../internals/fails"),a=t("../internals/is-callable"),l=t("../internals/object-create"),c=t("../internals/object-get-prototype-of"),u=t("../internals/define-built-in"),d=t("../internals/well-known-symbol"),p=t("../internals/is-pure"),f=d("iterator"),h=!1;[].keys&&("next"in(r=[].keys())?(i=c(c(r)))!==Object.prototype&&(o=i):h=!0),null==o||s((function(){var t={};return o[f].call(t)!==t}))?o={}:p&&(o=l(o)),a(o[f])||u(o,f,(function(){return this})),e.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:h}},{"../internals/define-built-in":28,"../internals/fails":43,"../internals/is-callable":65,"../internals/is-pure":70,"../internals/object-create":79,"../internals/object-get-prototype-of":85,"../internals/well-known-symbol":117}],73:[function(t,e,n){arguments[4][55][0].apply(n,arguments)},{dup:55}],74:[function(t,e,n){var o=t("../internals/to-length");e.exports=function(t){return o(t.length)}},{"../internals/to-length":103}],75:[function(t,e,n){var o=t("../internals/fails"),i=t("../internals/is-callable"),r=t("../internals/has-own-property"),s=t("../internals/descriptors"),a=t("../internals/function-name").CONFIGURABLE,l=t("../internals/inspect-source"),c=t("../internals/internal-state"),u=c.enforce,d=c.get,p=Object.defineProperty,f=s&&!o((function(){return 8!==p((function(){}),"length",{value:8}).length})),h=String(String).split("String"),y=e.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!r(t,"name")||a&&t.name!==e)&&p(t,"name",{value:e,configurable:!0}),f&&n&&r(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var o=u(t);return r(o,"source")||(o.source=h.join("string"==typeof e?e:"")),t};Function.prototype.toString=y((function(){return i(this)&&d(this).source||l(this)}),"toString")},{"../internals/descriptors":32,"../internals/fails":43,"../internals/function-name":47,"../internals/has-own-property":54,"../internals/inspect-source":61,"../internals/internal-state":62,"../internals/is-callable":65}],76:[function(t,e,n){var o=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(t){var e=+t;return(e>0?i:o)(e)}},{}],77:[function(t,e,n){var o=t("../internals/engine-v8-version"),i=t("../internals/fails");e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},{"../internals/engine-v8-version":39,"../internals/fails":43}],78:[function(t,e,n){var o=t("../internals/global"),i=t("../internals/is-callable"),r=t("../internals/inspect-source"),s=o.WeakMap;e.exports=i(s)&&/native code/.test(r(s))},{"../internals/global":53,"../internals/inspect-source":61,"../internals/is-callable":65}],79:[function(t,e,n){var o,i=t("../internals/an-object"),r=t("../internals/object-define-properties"),s=t("../internals/enum-bug-keys"),a=t("../internals/hidden-keys"),l=t("../internals/html"),c=t("../internals/document-create-element"),u=t("../internals/shared-key"),d=u("IE_PROTO"),p=function(){},f=function(t){return"<script>"+t+"</"+"script>"},h=function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{o=new ActiveXObject("htmlfile")}catch(t){}var t,e;y="undefined"!=typeof document?document.domain&&o?h(o):((e=c("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):h(o);for(var n=s.length;n--;)delete y.prototype[s[n]];return y()};a[d]=!0,e.exports=Object.create||function(t,e){var n;return null!==t?(p.prototype=i(t),n=new p,p.prototype=null,n[d]=t):n=y(),void 0===e?n:r.f(n,e)}},{"../internals/an-object":8,"../internals/document-create-element":33,"../internals/enum-bug-keys":41,"../internals/hidden-keys":55,"../internals/html":56,"../internals/object-define-properties":80,"../internals/shared-key":96}],80:[function(t,e,n){var o=t("../internals/descriptors"),i=t("../internals/v8-prototype-define-bug"),r=t("../internals/object-define-property"),s=t("../internals/an-object"),a=t("../internals/to-indexed-object"),l=t("../internals/object-keys");n.f=o&&!i?Object.defineProperties:function(t,e){s(t);for(var n,o=a(e),i=l(e),c=i.length,u=0;c>u;)r.f(t,n=i[u++],o[n]);return t}},{"../internals/an-object":8,"../internals/descriptors":32,"../internals/object-define-property":81,"../internals/object-keys":88,"../internals/to-indexed-object":101,"../internals/v8-prototype-define-bug":116}],81:[function(t,e,n){var o=t("../internals/descriptors"),i=t("../internals/ie8-dom-define"),r=t("../internals/v8-prototype-define-bug"),s=t("../internals/an-object"),a=t("../internals/to-property-key"),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",p="configurable",f="writable";n.f=o?r?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&f in n&&!n.writable){var o=u(t,e);o&&o.writable&&(t[e]=n.value,n={configurable:p in n?n.configurable:o.configurable,enumerable:d in n?n.enumerable:o.enumerable,writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},{"../internals/an-object":8,"../internals/descriptors":32,"../internals/ie8-dom-define":57,"../internals/to-property-key":108,"../internals/v8-prototype-define-bug":116}],82:[function(t,e,n){var o=t("../internals/descriptors"),i=t("../internals/function-call"),r=t("../internals/object-property-is-enumerable"),s=t("../internals/create-property-descriptor"),a=t("../internals/to-indexed-object"),l=t("../internals/to-property-key"),c=t("../internals/has-own-property"),u=t("../internals/ie8-dom-define"),d=Object.getOwnPropertyDescriptor;n.f=o?d:function(t,e){if(t=a(t),e=l(e),u)try{return d(t,e)}catch(t){}if(c(t,e))return s(!i(r.f,t,e),t[e])}},{"../internals/create-property-descriptor":26,"../internals/descriptors":32,"../internals/function-call":46,"../internals/has-own-property":54,"../internals/ie8-dom-define":57,"../internals/object-property-is-enumerable":89,"../internals/to-indexed-object":101,"../internals/to-property-key":108}],83:[function(t,e,n){var o=t("../internals/object-keys-internal"),i=t("../internals/enum-bug-keys").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return o(t,i)}},{"../internals/enum-bug-keys":41,"../internals/object-keys-internal":87}],84:[function(t,e,n){n.f=Object.getOwnPropertySymbols},{}],85:[function(t,e,n){var o=t("../internals/has-own-property"),i=t("../internals/is-callable"),r=t("../internals/to-object"),s=t("../internals/shared-key"),a=t("../internals/correct-prototype-getter"),l=s("IE_PROTO"),c=Object,u=c.prototype;e.exports=a?c.getPrototypeOf:function(t){var e=r(t);if(o(e,l))return e[l];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof c?u:null}},{"../internals/correct-prototype-getter":23,"../internals/has-own-property":54,"../internals/is-callable":65,"../internals/shared-key":96,"../internals/to-object":104}],86:[function(t,e,n){var o=t("../internals/function-uncurry-this");e.exports=o({}.isPrototypeOf)},{"../internals/function-uncurry-this":48}],87:[function(t,e,n){var o=t("../internals/function-uncurry-this"),i=t("../internals/has-own-property"),r=t("../internals/to-indexed-object"),s=t("../internals/array-includes").indexOf,a=t("../internals/hidden-keys"),l=o([].push);e.exports=function(t,e){var n,o=r(t),c=0,u=[];for(n in o)!i(a,n)&&i(o,n)&&l(u,n);for(;e.length>c;)i(o,n=e[c++])&&(~s(u,n)||l(u,n));return u}},{"../internals/array-includes":13,"../internals/function-uncurry-this":48,"../internals/has-own-property":54,"../internals/hidden-keys":55,"../internals/to-indexed-object":101}],88:[function(t,e,n){var o=t("../internals/object-keys-internal"),i=t("../internals/enum-bug-keys");e.exports=Object.keys||function(t){return o(t,i)}},{"../internals/enum-bug-keys":41,"../internals/object-keys-internal":87}],89:[function(t,e,n){"use strict";var o={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!o.call({1:2},1);n.f=r?function(t){var e=i(this,t);return!!e&&e.enumerable}:o},{}],90:[function(t,e,n){var o=t("../internals/function-uncurry-this"),i=t("../internals/an-object"),r=t("../internals/a-possible-prototype");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=o(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return i(n),r(o),e?t(n,o):n.__proto__=o,n}}():void 0)},{"../internals/a-possible-prototype":5,"../internals/an-object":8,"../internals/function-uncurry-this":48}],91:[function(t,e,n){var o=t("../internals/function-call"),i=t("../internals/is-callable"),r=t("../internals/is-object"),s=TypeError;e.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!r(a=o(n,t)))return a;if(i(n=t.valueOf)&&!r(a=o(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!r(a=o(n,t)))return a;throw s("Can't convert object to primitive value")}},{"../internals/function-call":46,"../internals/is-callable":65,"../internals/is-object":69}],92:[function(t,e,n){var o=t("../internals/get-built-in"),i=t("../internals/function-uncurry-this"),r=t("../internals/object-get-own-property-names"),s=t("../internals/object-get-own-property-symbols"),a=t("../internals/an-object"),l=i([].concat);e.exports=o("Reflect","ownKeys")||function(t){var e=r.f(a(t)),n=s.f;return n?l(e,n(t)):e}},{"../internals/an-object":8,"../internals/function-uncurry-this":48,"../internals/get-built-in":49,"../internals/object-get-own-property-names":83,"../internals/object-get-own-property-symbols":84}],93:[function(t,e,n){var o=TypeError;e.exports=function(t){if(null==t)throw o("Can't call method on "+t);return t}},{}],94:[function(t,e,n){"use strict";var o=t("../internals/get-built-in"),i=t("../internals/object-define-property"),r=t("../internals/well-known-symbol"),s=t("../internals/descriptors"),a=r("species");e.exports=function(t){var e=o(t),n=i.f;s&&e&&!e[a]&&n(e,a,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":32,"../internals/get-built-in":49,"../internals/object-define-property":81,"../internals/well-known-symbol":117}],95:[function(t,e,n){var o=t("../internals/object-define-property").f,i=t("../internals/has-own-property"),r=t("../internals/well-known-symbol")("toStringTag");e.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!i(t,r)&&o(t,r,{configurable:!0,value:e})}},{"../internals/has-own-property":54,"../internals/object-define-property":81,"../internals/well-known-symbol":117}],96:[function(t,e,n){var o=t("../internals/shared"),i=t("../internals/uid"),r=o("keys");e.exports=function(t){return r[t]||(r[t]=i(t))}},{"../internals/shared":98,"../internals/uid":114}],97:[function(t,e,n){var o=t("../internals/global"),i=t("../internals/define-global-property"),r="__core-js_shared__",s=o[r]||i(r,{});e.exports=s},{"../internals/define-global-property":30,"../internals/global":53}],98:[function(t,e,n){var o=t("../internals/is-pure"),i=t("../internals/shared-store");(e.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.22.8",mode:o?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":70,"../internals/shared-store":97}],99:[function(t,e,n){var o=t("../internals/to-integer-or-infinity"),i=Math.max,r=Math.min;e.exports=function(t,e){var n=o(t);return n<0?i(n+e,0):r(n,e)}},{"../internals/to-integer-or-infinity":102}],100:[function(t,e,n){var o=t("../internals/to-integer-or-infinity"),i=t("../internals/to-length"),r=RangeError;e.exports=function(t){if(void 0===t)return 0;var e=o(t),n=i(e);if(e!==n)throw r("Wrong length or index");return n}},{"../internals/to-integer-or-infinity":102,"../internals/to-length":103}],101:[function(t,e,n){var o=t("../internals/indexed-object"),i=t("../internals/require-object-coercible");e.exports=function(t){return o(i(t))}},{"../internals/indexed-object":59,"../internals/require-object-coercible":93}],102:[function(t,e,n){var o=t("../internals/math-trunc");e.exports=function(t){var e=+t;return e!=e||0===e?0:o(e)}},{"../internals/math-trunc":76}],103:[function(t,e,n){var o=t("../internals/to-integer-or-infinity"),i=Math.min;e.exports=function(t){return t>0?i(o(t),9007199254740991):0}},{"../internals/to-integer-or-infinity":102}],104:[function(t,e,n){var o=t("../internals/require-object-coercible"),i=Object;e.exports=function(t){return i(o(t))}},{"../internals/require-object-coercible":93}],105:[function(t,e,n){var o=t("../internals/to-positive-integer"),i=RangeError;e.exports=function(t,e){var n=o(t);if(n%e)throw i("Wrong offset");return n}},{"../internals/to-positive-integer":106}],106:[function(t,e,n){var o=t("../internals/to-integer-or-infinity"),i=RangeError;e.exports=function(t){var e=o(t);if(e<0)throw i("The argument can't be less than 0");return e}},{"../internals/to-integer-or-infinity":102}],107:[function(t,e,n){var o=t("../internals/function-call"),i=t("../internals/is-object"),r=t("../internals/is-symbol"),s=t("../internals/get-method"),a=t("../internals/ordinary-to-primitive"),l=t("../internals/well-known-symbol"),c=TypeError,u=l("toPrimitive");e.exports=function(t,e){if(!i(t)||r(t))return t;var n,l=s(t,u);if(l){if(void 0===e&&(e="default"),n=o(l,t,e),!i(n)||r(n))return n;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},{"../internals/function-call":46,"../internals/get-method":52,"../internals/is-object":69,"../internals/is-symbol":71,"../internals/ordinary-to-primitive":91,"../internals/well-known-symbol":117}],108:[function(t,e,n){var o=t("../internals/to-primitive"),i=t("../internals/is-symbol");e.exports=function(t){var e=o(t,"string");return i(e)?e:e+""}},{"../internals/is-symbol":71,"../internals/to-primitive":107}],109:[function(t,e,n){var o={};o[t("../internals/well-known-symbol")("toStringTag")]="z",e.exports="[object z]"===String(o)},{"../internals/well-known-symbol":117}],110:[function(t,e,n){var o=String;e.exports=function(t){try{return o(t)}catch(t){return"Object"}}},{}],111:[function(t,e,n){"use strict";var o=t("../internals/export"),i=t("../internals/global"),r=t("../internals/function-call"),s=t("../internals/descriptors"),a=t("../internals/typed-array-constructors-require-wrappers"),l=t("../internals/array-buffer-view-core"),c=t("../internals/array-buffer"),u=t("../internals/an-instance"),d=t("../internals/create-property-descriptor"),p=t("../internals/create-non-enumerable-property"),f=t("../internals/is-integral-number"),h=t("../internals/to-length"),y=t("../internals/to-index"),m=t("../internals/to-offset"),g=t("../internals/to-property-key"),v=t("../internals/has-own-property"),b=t("../internals/classof"),_=t("../internals/is-object"),w=t("../internals/is-symbol"),D=t("../internals/object-create"),B=t("../internals/object-is-prototype-of"),k=t("../internals/object-set-prototype-of"),x=t("../internals/object-get-own-property-names").f,K=t("../internals/typed-array-from"),C=t("../internals/array-iteration").forEach,E=t("../internals/set-species"),O=t("../internals/object-define-property"),j=t("../internals/object-get-own-property-descriptor"),S=t("../internals/internal-state"),P=t("../internals/inherit-if-required"),T=S.get,M=S.set,L=O.f,A=j.f,I=Math.round,N=i.RangeError,F=c.ArrayBuffer,R=F.prototype,U=c.DataView,z=l.NATIVE_ARRAY_BUFFER_VIEWS,H=l.TYPED_ARRAY_CONSTRUCTOR,V=l.TYPED_ARRAY_TAG,G=l.TypedArray,Y=l.TypedArrayPrototype,W=l.aTypedArrayConstructor,q=l.isTypedArray,X="BYTES_PER_ELEMENT",J="Wrong length",Q=function(t,e){W(t);for(var n=0,o=e.length,i=new t(o);o>n;)i[n]=e[n++];return i},$=function(t,e){L(t,e,{get:function(){return T(this)[e]}})},Z=function(t){var e;return B(R,t)||"ArrayBuffer"==(e=b(t))||"SharedArrayBuffer"==e},tt=function(t,e){return q(t)&&!w(e)&&e in t&&f(+e)&&e>=0},et=function(t,e){return e=g(e),tt(t,e)?d(2,t[e]):A(t,e)},nt=function(t,e,n){return e=g(e),!(tt(t,e)&&_(n)&&v(n,"value"))||v(n,"get")||v(n,"set")||n.configurable||v(n,"writable")&&!n.writable||v(n,"enumerable")&&!n.enumerable?L(t,e,n):(t[e]=n.value,t)};s?(z||(j.f=et,O.f=nt,$(Y,"buffer"),$(Y,"byteOffset"),$(Y,"byteLength"),$(Y,"length")),o({target:"Object",stat:!0,forced:!z},{getOwnPropertyDescriptor:et,defineProperty:nt}),e.exports=function(t,e,n){var s=t.match(/\d+$/)[0]/8,l=t+(n?"Clamped":"")+"Array",c="get"+t,d="set"+t,f=i[l],g=f,v=g&&g.prototype,b={},w=function(t,e){L(t,e,{get:function(){return function(t,e){var n=T(t);return n.view[c](e*s+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,o){var i=T(t);n&&(o=(o=I(o))<0?0:o>255?255:255&o),i.view[d](e*s+i.byteOffset,o,!0)}(this,e,t)},enumerable:!0})};z?a&&(g=e((function(t,e,n,o){return u(t,v),P(_(e)?Z(e)?void 0!==o?new f(e,m(n,s),o):void 0!==n?new f(e,m(n,s)):new f(e):q(e)?Q(g,e):r(K,g,e):new f(y(e)),t,g)})),k&&k(g,G),C(x(f),(function(t){t in g||p(g,t,f[t])})),g.prototype=v):(g=e((function(t,e,n,o){u(t,v);var i,a,l,c=0,d=0;if(_(e)){if(!Z(e))return q(e)?Q(g,e):r(K,g,e);i=e,d=m(n,s);var p=e.byteLength;if(void 0===o){if(p%s)throw N(J);if((a=p-d)<0)throw N(J)}else if((a=h(o)*s)+d>p)throw N(J);l=a/s}else l=y(e),i=new F(a=l*s);for(M(t,{buffer:i,byteOffset:d,byteLength:a,length:l,view:new U(i)});c<l;)w(t,c++)})),k&&k(g,G),v=g.prototype=D(Y)),v.constructor!==g&&p(v,"constructor",g),p(v,H,g),V&&p(v,V,l);var B=g!=f;b[l]=g,o({global:!0,constructor:!0,forced:B,sham:!z},b),X in g||p(g,X,s),X in v||p(v,X,s),E(l)}):e.exports=function(){}},{"../internals/an-instance":7,"../internals/array-buffer":11,"../internals/array-buffer-view-core":10,"../internals/array-iteration":14,"../internals/classof":21,"../internals/create-non-enumerable-property":25,"../internals/create-property-descriptor":26,"../internals/descriptors":32,"../internals/export":42,"../internals/function-call":46,"../internals/global":53,"../internals/has-own-property":54,"../internals/inherit-if-required":60,"../internals/internal-state":62,"../internals/is-integral-number":68,"../internals/is-object":69,"../internals/is-symbol":71,"../internals/object-create":79,"../internals/object-define-property":81,"../internals/object-get-own-property-descriptor":82,"../internals/object-get-own-property-names":83,"../internals/object-is-prototype-of":86,"../internals/object-set-prototype-of":90,"../internals/set-species":94,"../internals/to-index":100,"../internals/to-length":103,"../internals/to-offset":105,"../internals/to-property-key":108,"../internals/typed-array-constructors-require-wrappers":112,"../internals/typed-array-from":113}],112:[function(t,e,n){var o=t("../internals/global"),i=t("../internals/fails"),r=t("../internals/check-correctness-of-iteration"),s=t("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,a=o.ArrayBuffer,l=o.Int8Array;e.exports=!s||!i((function(){l(1)}))||!i((function(){new l(-1)}))||!r((function(t){new l,new l(null),new l(1.5),new l(t)}),!0)||i((function(){return 1!==new l(new a(2),1,void 0).length}))},{"../internals/array-buffer-view-core":10,"../internals/check-correctness-of-iteration":19,"../internals/fails":43,"../internals/global":53}],113:[function(t,e,n){var o=t("../internals/function-bind-context"),i=t("../internals/function-call"),r=t("../internals/a-constructor"),s=t("../internals/to-object"),a=t("../internals/length-of-array-like"),l=t("../internals/get-iterator"),c=t("../internals/get-iterator-method"),u=t("../internals/is-array-iterator-method"),d=t("../internals/array-buffer-view-core").aTypedArrayConstructor;e.exports=function(t){var e,n,p,f,h,y,m=r(this),g=s(t),v=arguments.length,b=v>1?arguments[1]:void 0,_=void 0!==b,w=c(g);if(w&&!u(w))for(y=(h=l(g,w)).next,g=[];!(f=i(y,h)).done;)g.push(f.value);for(_&&v>2&&(b=o(b,arguments[2])),n=a(g),p=new(d(m))(n),e=0;n>e;e++)p[e]=_?b(g[e],e):g[e];return p}},{"../internals/a-constructor":4,"../internals/array-buffer-view-core":10,"../internals/function-bind-context":44,"../internals/function-call":46,"../internals/get-iterator":51,"../internals/get-iterator-method":50,"../internals/is-array-iterator-method":63,"../internals/length-of-array-like":74,"../internals/to-object":104}],114:[function(t,e,n){var o=t("../internals/function-uncurry-this"),i=0,r=Math.random(),s=o(1..toString);e.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+r,36)}},{"../internals/function-uncurry-this":48}],115:[function(t,e,n){var o=t("../internals/native-symbol");e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{"../internals/native-symbol":77}],116:[function(t,e,n){var o=t("../internals/descriptors"),i=t("../internals/fails");e.exports=o&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},{"../internals/descriptors":32,"../internals/fails":43}],117:[function(t,e,n){var o=t("../internals/global"),i=t("../internals/shared"),r=t("../internals/has-own-property"),s=t("../internals/uid"),a=t("../internals/native-symbol"),l=t("../internals/use-symbol-as-uid"),c=i("wks"),u=o.Symbol,d=u&&u.for,p=l?u:u&&u.withoutSetter||s;e.exports=function(t){if(!r(c,t)||!a&&"string"!=typeof c[t]){var e="Symbol."+t;a&&r(u,t)?c[t]=u[t]:c[t]=l&&d?d(e):p(e)}return c[t]}},{"../internals/global":53,"../internals/has-own-property":54,"../internals/native-symbol":77,"../internals/shared":98,"../internals/uid":114,"../internals/use-symbol-as-uid":115}],118:[function(t,e,n){"use strict";var o=t("../internals/to-indexed-object"),i=t("../internals/add-to-unscopables"),r=t("../internals/iterators"),s=t("../internals/internal-state"),a=t("../internals/object-define-property").f,l=t("../internals/define-iterator"),c=t("../internals/is-pure"),u=t("../internals/descriptors"),d="Array Iterator",p=s.set,f=s.getterFor(d);e.exports=l(Array,"Array",(function(t,e){p(this,{type:d,target:o(t),index:0,kind:e})}),(function(){var t=f(this),e=t.target,n=t.kind,o=t.index++;return!e||o>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:o,done:!1}:"values"==n?{value:e[o],done:!1}:{value:[o,e[o]],done:!1}}),"values");var h=r.Arguments=r.Array;if(i("keys"),i("values"),i("entries"),!c&&u&&"values"!==h.name)try{a(h,"name",{value:"values"})}catch(t){}},{"../internals/add-to-unscopables":6,"../internals/define-iterator":31,"../internals/descriptors":32,"../internals/internal-state":62,"../internals/is-pure":70,"../internals/iterators":73,"../internals/object-define-property":81,"../internals/to-indexed-object":101}],119:[function(t,e,n){t("../internals/typed-array-constructor")("Float32",(function(t){return function(e,n,o){return t(this,e,n,o)}}))},{"../internals/typed-array-constructor":111}],120:[function(t,e,n){"use strict";var o=t("../internals/global"),i=t("../internals/function-call"),r=t("../internals/array-buffer-view-core"),s=t("../internals/length-of-array-like"),a=t("../internals/to-offset"),l=t("../internals/to-object"),c=t("../internals/fails"),u=o.RangeError,d=o.Int8Array,p=d&&d.prototype,f=p&&p.set,h=r.aTypedArray,y=r.exportTypedArrayMethod,m=!c((function(){var t=new Uint8ClampedArray(2);return i(f,t,{length:1,0:3},1),3!==t[1]})),g=m&&r.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new d(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));y("set",(function(t){h(this);var e=a(arguments.length>1?arguments[1]:void 0,1),n=l(t);if(m)return i(f,this,n,e);var o=this.length,r=s(n),c=0;if(r+e>o)throw u("Wrong length");for(;c<r;)this[e+c]=n[c++]}),!m||g)},{"../internals/array-buffer-view-core":10,"../internals/fails":43,"../internals/function-call":46,"../internals/global":53,"../internals/length-of-array-like":74,"../internals/to-object":104,"../internals/to-offset":105}],121:[function(t,e,n){"use strict";var o=t("../internals/global"),i=t("../internals/function-uncurry-this"),r=t("../internals/fails"),s=t("../internals/a-callable"),a=t("../internals/array-sort"),l=t("../internals/array-buffer-view-core"),c=t("../internals/engine-ff-version"),u=t("../internals/engine-is-ie-or-edge"),d=t("../internals/engine-v8-version"),p=t("../internals/engine-webkit-version"),f=l.aTypedArray,h=l.exportTypedArrayMethod,y=o.Uint16Array,m=y&&i(y.prototype.sort),g=!(!m||r((function(){m(new y(2),null)}))&&r((function(){m(new y(2),{})}))),v=!!m&&!r((function(){if(d)return d<74;if(c)return c<67;if(u)return!0;if(p)return p<602;var t,e,n=new y(516),o=Array(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,o[t]=t-2*e+3;for(m(n,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(n[t]!==o[t])return!0}));h("sort",(function(t){return void 0!==t&&s(t),v?m(this,t):a(f(this),function(t){return function(e,n){return void 0!==t?+t(e,n)||0:n!=n?-1:e!=e?1:0===e&&0===n?1/e>0&&1/n<0?1:-1:e>n}}(t))}),!v||g)},{"../internals/a-callable":3,"../internals/array-buffer-view-core":10,"../internals/array-sort":16,"../internals/engine-ff-version":36,"../internals/engine-is-ie-or-edge":37,"../internals/engine-v8-version":39,"../internals/engine-webkit-version":40,"../internals/fails":43,"../internals/function-uncurry-this":48,"../internals/global":53}],122:[function(t,e,n){t("../internals/typed-array-constructor")("Uint8",(function(t){return function(e,n,o){return t(this,e,n,o)}}))},{"../internals/typed-array-constructor":111}],123:[function(t,e,n){t("../internals/typed-array-constructor")("Uint8",(function(t){return function(e,n,o){return t(this,e,n,o)}}),!0)},{"../internals/typed-array-constructor":111}],124:[function(t,e,n){var o=t("../internals/global"),i=t("../internals/dom-iterables"),r=t("../internals/dom-token-list-prototype"),s=t("../modules/es.array.iterator"),a=t("../internals/create-non-enumerable-property"),l=t("../internals/well-known-symbol"),c=l("iterator"),u=l("toStringTag"),d=s.values,p=function(t,e){if(t){if(t[c]!==d)try{a(t,c,d)}catch(e){t[c]=d}if(t[u]||a(t,u,e),i[e])for(var n in s)if(t[n]!==s[n])try{a(t,n,s[n])}catch(e){t[n]=s[n]}}};for(var f in i)p(o[f]&&o[f].prototype,f);p(r,"DOMTokenList")},{"../internals/create-non-enumerable-property":25,"../internals/dom-iterables":34,"../internals/dom-token-list-prototype":35,"../internals/global":53,"../internals/well-known-symbol":117,"../modules/es.array.iterator":118}],125:[function(t,e,n){"use strict";var o=e.exports={};o.isIE=function(t){return(-1!==(e=navigator.userAgent.toLowerCase()).indexOf("msie")||-1!==e.indexOf("trident")||-1!==e.indexOf(" edge/"))&&(!t||t===function(){var t=3,e=document.createElement("div"),n=e.getElementsByTagName("i");do{e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e"}while(n[0]);return t>4?t:undefined}());var e},o.isLegacyOpera=function(){return!!window.opera}},{}],126:[function(t,e,n){"use strict";(e.exports={}).forEach=function(t,e){for(var n=0;n<t.length;n++){var o=e(t[n]);if(o)return o}}},{}],127:[function(t,e,n){"use strict";var o=t("../browser-detector");e.exports=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,i=t.stateHandler.getState;if(!e)throw new Error("Missing required dependency: reporter.");function r(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function s(t){return i(t).object}return{makeDetectable:function(t,s,a){a||(a=s,s=t,t=null),(t=t||{}).debug,o.isIE(8)?a(s):function(s,a){var l=r(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),c=!1,u=window.getComputedStyle(s),d=s.offsetWidth,p=s.offsetHeight;function f(){function n(){if("static"===u.position){s.style.setProperty("position","relative",t.important?"important":"");var n=function(e,n,o,i){var r=o[i];"auto"!==r&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(r)&&(e.warn("An element that is positioned static has style."+i+"="+r+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",n),n.style.setProperty(i,"0",t.important?"important":""))};n(e,s,u,"top"),n(e,s,u,"right"),n(e,s,u,"bottom"),n(e,s,u,"left")}}""!==u.position&&(n(),c=!0);var r=document.createElement("object");r.style.cssText=l,r.tabIndex=-1,r.type="text/html",r.setAttribute("aria-hidden","true"),r.onload=function(){c||n(),function t(e,n){if(!e.contentDocument){var o=i(e);return o.checkForObjectDocumentTimeoutId&&window.clearTimeout(o.checkForObjectDocumentTimeoutId),void(o.checkForObjectDocumentTimeoutId=setTimeout((function(){o.checkForObjectDocumentTimeoutId=0,t(e,n)}),100))}n(e.contentDocument)}(this,(function(t){a(s)}))},o.isIE()||(r.data="about:blank"),i(s)&&(s.appendChild(r),i(s).object=r,o.isIE()&&(r.data="about:blank"))}i(s).startSize={width:d,height:p},n?n.add(f):f()}(s,a)},addListener:function(t,e){function n(){e(t)}if(o.isIE(8))i(t).object={proxy:n},t.attachEvent("onresize",n);else{var r=s(t);if(!r)throw new Error("Element is not detectable by this strategy.");r.contentDocument.defaultView.addEventListener("resize",n)}},uninstall:function(t){if(i(t)){var e=s(t);e&&(o.isIE(8)?t.detachEvent("onresize",e.proxy):t.removeChild(e),i(t).checkForObjectDocumentTimeoutId&&window.clearTimeout(i(t).checkForObjectDocumentTimeoutId),delete i(t).object)}}}}},{"../browser-detector":125}],128:[function(t,e,n){"use strict";var o=t("../collection-utils").forEach;e.exports=function(t){var e=(t=t||{}).reporter,n=t.batchProcessor,i=t.stateHandler.getState,r=(t.stateHandler.hasState,t.idHandler);if(!n)throw new Error("Missing required dependency: batchProcessor");if(!e)throw new Error("Missing required dependency: reporter.");var s=function(){var t=500,e=500,n=document.createElement("div");n.style.cssText=c(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var o=document.createElement("div");o.style.cssText=c(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),o.appendChild(n),document.body.insertBefore(o,document.body.firstChild);var i=t-o.clientWidth,r=e-o.clientHeight;return document.body.removeChild(o),{width:i,height:r}}(),a="erd_scroll_detection_container";function l(t){!function(t,e,n){function o(n,o){o=o||function(e){t.head.appendChild(e)};var i=t.createElement("style");return i.innerHTML=n,i.id=e,o(i),i}if(!t.getElementById(e)){var i=n+"_animation",r=n+"_animation_active",s="/* Created by the element-resize-detector library. */\n";s+="."+n+" > div::-webkit-scrollbar { "+c(["display: none"])+" }\n\n",s+="."+r+" { "+c(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+i,"animation-name: "+i])+" }\n",s+="@-webkit-keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",o(s+="@keyframes "+i+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(t,"erd_scroll_detection_scrollbar_style",a)}function c(e){var n=t.important?" !important; ":"; ";return(e.join(n)+n).trim()}function u(t,n,o){if(t.addEventListener)t.addEventListener(n,o);else{if(!t.attachEvent)return e.error("[scroll] Don't know how to add event listeners.");t.attachEvent("on"+n,o)}}function d(t,n,o){if(t.removeEventListener)t.removeEventListener(n,o);else{if(!t.detachEvent)return e.error("[scroll] Don't know how to remove event listeners.");t.detachEvent("on"+n,o)}}function p(t){return i(t).container.childNodes[0].childNodes[0].childNodes[0]}function f(t){return i(t).container.childNodes[0].childNodes[0].childNodes[1]}return l(window.document),{makeDetectable:function(t,l,d){function h(){if(t.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(r.get(l),"Scroll: "),e.log.apply)e.log.apply(null,n);else for(var o=0;o<n.length;o++)e.log(n[o])}}function y(t){var e=i(t).container.childNodes[0],n=window.getComputedStyle(e);return!n.width||-1===n.width.indexOf("px")}function m(){var t=window.getComputedStyle(l),e={};return e.position=t.position,e.width=l.offsetWidth,e.height=l.offsetHeight,e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left,e.widthCSS=t.width,e.heightCSS=t.height,e}function g(){if(h("storeStyle invoked."),i(l)){var t=m();i(l).style=t}else h("Aborting because element has been uninstalled")}function v(t,e,n){i(t).lastWidth=e,i(t).lastHeight=n}function b(){return 2*s.width+1}function _(){return 2*s.height+1}function w(t){return t+10+b()}function D(t){return t+10+_()}function B(t,e,n){var o=p(t),i=f(t),r=w(e),s=D(n),a=function(t){return 2*t+b()}(e),l=function(t){return 2*t+_()}(n);o.scrollLeft=r,o.scrollTop=s,i.scrollLeft=a,i.scrollTop=l}function k(){var t=i(l).container;if(!t){(t=document.createElement("div")).className=a,t.style.cssText=c(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),i(l).container=t,function(t){t.className+=" "+a+"_animation_active"}(t),l.appendChild(t);var e=function(){i(l).onRendered&&i(l).onRendered()};u(t,"animationstart",e),i(l).onAnimationStart=e}return t}function x(){if(h("Injecting elements"),i(l)){!function(){var n=i(l).style;if("static"===n.position){l.style.setProperty("position","relative",t.important?"important":"");var o=function(t,e,n,o){var i=n[o];"auto"!==i&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(i)&&(t.warn("An element that is positioned static has style."+o+"="+i+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+o+" will be set to 0. Element: ",e),e.style[o]=0)};o(e,l,n,"top"),o(e,l,n,"right"),o(e,l,n,"bottom"),o(e,l,n,"left")}}();var n=i(l).container;n||(n=k());var o,r,d,p,f=s.width,y=s.height,m=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),g=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(["left: "+(o=(o=-(1+f))?o+"px":"0"),"top: "+(r=(r=-(1+y))?r+"px":"0"),"right: "+(p=(p=-f)?p+"px":"0"),"bottom: "+(d=(d=-y)?d+"px":"0")])),v=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),b=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),_=c(["position: absolute","left: 0","top: 0"]),w=c(["position: absolute","width: 200%","height: 200%"]),D=document.createElement("div"),B=document.createElement("div"),x=document.createElement("div"),K=document.createElement("div"),C=document.createElement("div"),E=document.createElement("div");D.dir="ltr",D.style.cssText=m,D.className=a,B.className=a,B.style.cssText=g,x.style.cssText=v,K.style.cssText=_,C.style.cssText=b,E.style.cssText=w,x.appendChild(K),C.appendChild(E),B.appendChild(x),B.appendChild(C),D.appendChild(B),n.appendChild(D),u(x,"scroll",O),u(C,"scroll",j),i(l).onExpandScroll=O,i(l).onShrinkScroll=j}else h("Aborting because element has been uninstalled");function O(){var t=i(l);t&&t.onExpand?t.onExpand():h("Aborting expand scroll handler: element has been uninstalled")}function j(){var t=i(l);t&&t.onShrink?t.onShrink():h("Aborting shrink scroll handler: element has been uninstalled")}}function K(){function s(e,n,o){var i=function(t){return p(t).childNodes[0]}(e),r=w(n),s=D(o);i.style.setProperty("width",r+"px",t.important?"important":""),i.style.setProperty("height",s+"px",t.important?"important":"")}function a(o){var a=l.offsetWidth,u=l.offsetHeight,d=a!==i(l).lastWidth||u!==i(l).lastHeight;h("Storing current size",a,u),v(l,a,u),n.add(0,(function(){if(d)if(i(l))if(c()){if(t.debug){var n=l.offsetWidth,o=l.offsetHeight;n===a&&o===u||e.warn(r.get(l),"Scroll: Size changed before updating detector elements.")}s(l,a,u)}else h("Aborting because element container has not been initialized");else h("Aborting because element has been uninstalled")})),n.add(1,(function(){i(l)?c()?B(l,a,u):h("Aborting because element container has not been initialized"):h("Aborting because element has been uninstalled")})),d&&o&&n.add(2,(function(){i(l)?c()?o():h("Aborting because element container has not been initialized"):h("Aborting because element has been uninstalled")}))}function c(){return!!i(l).container}function u(){h("notifyListenersIfNeeded invoked");var t=i(l);return void 0===i(l).lastNotifiedWidth&&t.lastWidth===t.startSize.width&&t.lastHeight===t.startSize.height?h("Not notifying: Size is the same as the start size, and there has been no notification yet."):t.lastWidth===t.lastNotifiedWidth&&t.lastHeight===t.lastNotifiedHeight?h("Not notifying: Size already notified"):(h("Current size not notified, notifying..."),t.lastNotifiedWidth=t.lastWidth,t.lastNotifiedHeight=t.lastHeight,void o(i(l).listeners,(function(t){t(l)})))}function d(){h("Scroll detected."),y(l)?h("Scroll event fired while unrendered. Ignoring..."):a(u)}if(h("registerListenersAndPositionElements invoked."),i(l)){i(l).onRendered=function(){if(h("startanimation triggered."),y(l))h("Ignoring since element is still unrendered...");else{h("Element rendered.");var t=p(l),e=f(l);0!==t.scrollLeft&&0!==t.scrollTop&&0!==e.scrollLeft&&0!==e.scrollTop||(h("Scrollbars out of sync. Updating detector elements..."),a(u))}},i(l).onExpand=d,i(l).onShrink=d;var m=i(l).style;s(l,m.width,m.height)}else h("Aborting because element has been uninstalled")}function C(){if(h("finalizeDomMutation invoked."),i(l)){var t=i(l).style;v(l,t.width,t.height),B(l,t.width,t.height)}else h("Aborting because element has been uninstalled")}function E(){d(l)}function O(){var t;h("Installing..."),i(l).listeners=[],t=m(),i(l).startSize={width:t.width,height:t.height},h("Element start size",i(l).startSize),n.add(0,g),n.add(1,x),n.add(2,K),n.add(3,C),n.add(4,E)}d||(d=l,l=t,t=null),t=t||{},h("Making detectable..."),!function(t){return!function(t){var e=t.getRootNode&&t.getRootNode().contains(t);return t===t.ownerDocument.body||t.ownerDocument.body.contains(t)||e}(t)||null===window.getComputedStyle(t)}(l)?O():(h("Element is detached"),k(),h("Waiting until element is attached..."),i(l).onRendered=function(){h("Element is now attached"),O()})},addListener:function(t,e){if(!i(t).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");i(t).listeners.push(e)},uninstall:function(t){var e=i(t);e&&(e.onExpandScroll&&d(p(t),"scroll",e.onExpandScroll),e.onShrinkScroll&&d(f(t),"scroll",e.onShrinkScroll),e.onAnimationStart&&d(e.container,"animationstart",e.onAnimationStart),e.container&&t.removeChild(e.container))},initDocument:l}}},{"../collection-utils":126}],129:[function(t,e,n){"use strict";var o=t("./collection-utils").forEach,i=t("./element-utils"),r=t("./listener-handler"),s=t("./id-generator"),a=t("./id-handler"),l=t("./reporter"),c=t("./browser-detector"),u=t("batch-processor"),d=t("./state-handler"),p=t("./detection-strategy/object.js"),f=t("./detection-strategy/scroll.js");function h(t){return Array.isArray(t)||void 0!==t.length}function y(t){if(Array.isArray(t))return t;var e=[];return o(t,(function(t){e.push(t)})),e}function m(t){return t&&1===t.nodeType}function g(t,e,n){var o=t[e];return null==o&&void 0!==n?n:o}e.exports=function(t){var e;if((t=t||{}).idHandler)e={get:function(e){return t.idHandler.get(e,!0)},set:t.idHandler.set};else{var n=s(),v=a({idGenerator:n,stateHandler:d});e=v}var b=t.reporter;b||(b=l(!1===b));var _=g(t,"batchProcessor",u({reporter:b})),w={};w.callOnAdd=!!g(t,"callOnAdd",!0),w.debug=!!g(t,"debug",!1);var D,B=r(e),k=i({stateHandler:d}),x=g(t,"strategy","object"),K=g(t,"important",!1),C={reporter:b,batchProcessor:_,stateHandler:d,idHandler:e,important:K};if("scroll"===x&&(c.isLegacyOpera()?(b.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),x="object"):c.isIE(9)&&(b.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),x="object")),"scroll"===x)D=f(C);else{if("object"!==x)throw new Error("Invalid strategy name: "+x);D=p(C)}var E={};return{listenTo:function(t,n,i){function r(t){var e=B.get(t);o(e,(function(e){e(t)}))}function s(t,e,n){B.add(e,n),t&&n(e)}if(i||(i=n,n=t,t={}),!n)throw new Error("At least one element required.");if(!i)throw new Error("Listener required.");if(m(n))n=[n];else{if(!h(n))return b.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=y(n)}var a=0,l=g(t,"callOnAdd",w.callOnAdd),c=g(t,"onReady",(function(){})),u=g(t,"debug",w.debug);o(n,(function(t){d.getState(t)||(d.initState(t),e.set(t));var p=e.get(t);if(u&&b.log("Attaching listener to element",p,t),!k.isDetectable(t))return u&&b.log(p,"Not detectable."),k.isBusy(t)?(u&&b.log(p,"System busy making it detectable"),s(l,t,i),E[p]=E[p]||[],void E[p].push((function(){++a===n.length&&c()}))):(u&&b.log(p,"Making detectable..."),k.markBusy(t,!0),D.makeDetectable({debug:u,important:K},t,(function(t){if(u&&b.log(p,"onElementDetectable"),d.getState(t)){k.markAsDetectable(t),k.markBusy(t,!1),D.addListener(t,r),s(l,t,i);var e=d.getState(t);if(e&&e.startSize){var f=t.offsetWidth,h=t.offsetHeight;e.startSize.width===f&&e.startSize.height===h||r(t)}E[p]&&o(E[p],(function(t){t()}))}else u&&b.log(p,"Element uninstalled before being detectable.");delete E[p],++a===n.length&&c()})));u&&b.log(p,"Already detecable, adding listener."),s(l,t,i),a++})),a===n.length&&c()},removeListener:B.removeListener,removeAllListeners:B.removeAllListeners,uninstall:function(t){if(!t)return b.error("At least one element is required.");if(m(t))t=[t];else{if(!h(t))return b.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=y(t)}o(t,(function(t){B.removeAllListeners(t),D.uninstall(t),d.cleanState(t)}))},initDocument:function(t){D.initDocument&&D.initDocument(t)}}}},{"./browser-detector":125,"./collection-utils":126,"./detection-strategy/object.js":127,"./detection-strategy/scroll.js":128,"./element-utils":130,"./id-generator":131,"./id-handler":132,"./listener-handler":133,"./reporter":134,"./state-handler":135,"batch-processor":1}],130:[function(t,e,n){"use strict";e.exports=function(t){var e=t.stateHandler.getState;return{isDetectable:function(t){var n=e(t);return n&&!!n.isDetectable},markAsDetectable:function(t){e(t).isDetectable=!0},isBusy:function(t){return!!e(t).busy},markBusy:function(t,n){e(t).busy=!!n}}}},{}],131:[function(t,e,n){"use strict";e.exports=function(){var t=1;return{generate:function(){return t++}}}},{}],132:[function(t,e,n){"use strict";e.exports=function(t){var e=t.idGenerator,n=t.stateHandler.getState;return{get:function(t){var e=n(t);return e&&void 0!==e.id?e.id:null},set:function(t){var o=n(t);if(!o)throw new Error("setId required the element to have a resize detection state.");var i=e.generate();return o.id=i,i}}}},{}],133:[function(t,e,n){"use strict";e.exports=function(t){var e={};function n(n){var o=t.get(n);return void 0===o?[]:e[o]||[]}return{get:n,add:function(n,o){var i=t.get(n);e[i]||(e[i]=[]),e[i].push(o)},removeListener:function(t,e){for(var o=n(t),i=0,r=o.length;i<r;++i)if(o[i]===e){o.splice(i,1);break}},removeAllListeners:function(t){var e=n(t);e&&(e.length=0)}}}},{}],134:[function(t,e,n){"use strict";e.exports=function(t){function e(){}var n={log:e,warn:e,error:e};if(!t&&window.console){var o=function(t,e){t[e]=function(){var t=console[e];if(t.apply)t.apply(console,arguments);else for(var n=0;n<arguments.length;n++)t(arguments[n])}};o(n,"log"),o(n,"warn"),o(n,"error")}return n}},{}],135:[function(t,e,n){"use strict";function o(t){return t._erd}e.exports={initState:function(t){return t._erd={},o(t)},getState:o,cleanState:function(t){delete t._erd}}},{}],136:[function(t,e,n){var o,i;o=window,i=function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var o,i=function(t,e){var n=e.x-t.x,o=e.y-t.y;return Math.sqrt(n*n+o*o)},r=function(t){return t*(Math.PI/180)},s=new Map,a=function(t){s.has(t)&&clearTimeout(s.get(t)),s.set(t,setTimeout(t,100))},l=function(t,e,n){for(var o,i=e.split(/[ ,]+/g),r=0;r<i.length;r+=1)o=i[r],t.addEventListener?t.addEventListener(o,n,!1):t.attachEvent&&t.attachEvent(o,n)},c=function(t,e,n){for(var o,i=e.split(/[ ,]+/g),r=0;r<i.length;r+=1)o=i[r],t.removeEventListener?t.removeEventListener(o,n):t.detachEvent&&t.detachEvent(o,n)},u=function(t){return t.preventDefault(),t.type.match(/^touch/)?t.changedTouches:t},d=function(){return{x:void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop}},p=function(t,e){e.top||e.right||e.bottom||e.left?(t.style.top=e.top,t.style.right=e.right,t.style.bottom=e.bottom,t.style.left=e.left):(t.style.left=e.x+"px",t.style.top=e.y+"px")},f=function(t,e,n){var o=h(t);for(var i in o)if(o.hasOwnProperty(i))if("string"==typeof e)o[i]=e+" "+n;else{for(var r="",s=0,a=e.length;s<a;s+=1)r+=e[s]+" "+n+", ";o[i]=r.slice(0,-2)}return o},h=function(t){var e={};return e[t]="",["webkit","Moz","o"].forEach((function(n){e[n+t.charAt(0).toUpperCase()+t.slice(1)]=""})),e},y=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},m=function(t,e){if(t.length)for(var n=0,o=t.length;n<o;n+=1)e(t[n]);else e(t)},g=!!("ontouchstart"in window),v=!!window.PointerEvent,b=!!window.MSPointerEvent,_={start:"mousedown",move:"mousemove",end:"mouseup"},w={};function D(){}v?o={start:"pointerdown",move:"pointermove",end:"pointerup, pointercancel"}:b?o={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:g?(o={start:"touchstart",move:"touchmove",end:"touchend, touchcancel"},w=_):o=_,D.prototype.on=function(t,e){var n,o=t.split(/[ ,]+/g);this._handlers_=this._handlers_||{};for(var i=0;i<o.length;i+=1)n=o[i],this._handlers_[n]=this._handlers_[n]||[],this._handlers_[n].push(e);return this},D.prototype.off=function(t,e){return this._handlers_=this._handlers_||{},void 0===t?this._handlers_={}:void 0===e?this._handlers_[t]=null:this._handlers_[t]&&this._handlers_[t].indexOf(e)>=0&&this._handlers_[t].splice(this._handlers_[t].indexOf(e),1),this},D.prototype.trigger=function(t,e){var n,o=this,i=t.split(/[ ,]+/g);o._handlers_=o._handlers_||{};for(var r=0;r<i.length;r+=1)n=i[r],o._handlers_[n]&&o._handlers_[n].length&&o._handlers_[n].forEach((function(t){t.call(o,{type:n,target:o},e)}))},D.prototype.config=function(t){this.options=this.defaults||{},t&&(this.options=function(t,e){var n={};for(var o in t)t.hasOwnProperty(o)&&e.hasOwnProperty(o)?n[o]=e[o]:t.hasOwnProperty(o)&&(n[o]=t[o]);return n}(this.options,t))},D.prototype.bindEvt=function(t,e){var n=this;return n._domHandlers_=n._domHandlers_||{},n._domHandlers_[e]=function(){"function"==typeof n["on"+e]?n["on"+e].apply(n,arguments):console.warn('[WARNING] : Missing "on'+e+'" handler.')},l(t,o[e],n._domHandlers_[e]),w[e]&&l(t,w[e],n._domHandlers_[e]),n},D.prototype.unbindEvt=function(t,e){return this._domHandlers_=this._domHandlers_||{},c(t,o[e],this._domHandlers_[e]),w[e]&&c(t,w[e],this._domHandlers_[e]),delete this._domHandlers_[e],this};var B=D;function k(t,e){return this.identifier=e.identifier,this.position=e.position,this.frontPosition=e.frontPosition,this.collection=t,this.defaults={size:100,threshold:.1,color:"white",fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:.5,mode:"dynamic",zone:document.body,lockX:!1,lockY:!1,shape:"circle"},this.config(e),"dynamic"===this.options.mode&&(this.options.restOpacity=0),this.id=k.id,k.id+=1,this.buildEl().stylize(),this.instance={el:this.ui.el,on:this.on.bind(this),off:this.off.bind(this),show:this.show.bind(this),hide:this.hide.bind(this),add:this.addToDom.bind(this),remove:this.removeFromDom.bind(this),destroy:this.destroy.bind(this),setPosition:this.setPosition.bind(this),resetDirection:this.resetDirection.bind(this),computeDirection:this.computeDirection.bind(this),trigger:this.trigger.bind(this),position:this.position,frontPosition:this.frontPosition,ui:this.ui,identifier:this.identifier,id:this.id,options:this.options},this.instance}k.prototype=new B,k.constructor=k,k.id=0,k.prototype.buildEl=function(t){return this.ui={},this.options.dataOnly||(this.ui.el=document.createElement("div"),this.ui.back=document.createElement("div"),this.ui.front=document.createElement("div"),this.ui.el.className="nipple collection_"+this.collection.id,this.ui.back.className="back",this.ui.front.className="front",this.ui.el.setAttribute("id","nipple_"+this.collection.id+"_"+this.id),this.ui.el.appendChild(this.ui.back),this.ui.el.appendChild(this.ui.front)),this},k.prototype.stylize=function(){if(this.options.dataOnly)return this;var t=this.options.fadeTime+"ms",e=function(t,e){var n=h("borderRadius");for(var o in n)n.hasOwnProperty(o)&&(n[o]="50%");return n}(),n=f("transition","opacity",t),o={};return o.el={position:"absolute",opacity:this.options.restOpacity,display:"block",zIndex:999},o.back={position:"absolute",display:"block",width:this.options.size+"px",height:this.options.size+"px",marginLeft:-this.options.size/2+"px",marginTop:-this.options.size/2+"px",background:this.options.color,opacity:".5"},o.front={width:this.options.size/2+"px",height:this.options.size/2+"px",position:"absolute",display:"block",marginLeft:-this.options.size/4+"px",marginTop:-this.options.size/4+"px",background:this.options.color,opacity:".5"},y(o.el,n),"circle"===this.options.shape&&y(o.back,e),y(o.front,e),this.applyStyles(o),this},k.prototype.applyStyles=function(t){for(var e in this.ui)if(this.ui.hasOwnProperty(e))for(var n in t[e])this.ui[e].style[n]=t[e][n];return this},k.prototype.addToDom=function(){return this.options.dataOnly||document.body.contains(this.ui.el)||this.options.zone.appendChild(this.ui.el),this},k.prototype.removeFromDom=function(){return this.options.dataOnly||!document.body.contains(this.ui.el)||this.options.zone.removeChild(this.ui.el),this},k.prototype.destroy=function(){clearTimeout(this.removeTimeout),clearTimeout(this.showTimeout),clearTimeout(this.restTimeout),this.trigger("destroyed",this.instance),this.removeFromDom(),this.off()},k.prototype.show=function(t){var e=this;return e.options.dataOnly||(clearTimeout(e.removeTimeout),clearTimeout(e.showTimeout),clearTimeout(e.restTimeout),e.addToDom(),e.restCallback(),setTimeout((function(){e.ui.el.style.opacity=1}),0),e.showTimeout=setTimeout((function(){e.trigger("shown",e.instance),"function"==typeof t&&t.call(this)}),e.options.fadeTime)),e},k.prototype.hide=function(t){var e=this;if(e.options.dataOnly)return e;if(e.ui.el.style.opacity=e.options.restOpacity,clearTimeout(e.removeTimeout),clearTimeout(e.showTimeout),clearTimeout(e.restTimeout),e.removeTimeout=setTimeout((function(){var n="dynamic"===e.options.mode?"none":"block";e.ui.el.style.display=n,"function"==typeof t&&t.call(e),e.trigger("hidden",e.instance)}),e.options.fadeTime),e.options.restJoystick){var n=e.options.restJoystick,o={};o.x=!0===n||!1!==n.x?0:e.instance.frontPosition.x,o.y=!0===n||!1!==n.y?0:e.instance.frontPosition.y,e.setPosition(t,o)}return e},k.prototype.setPosition=function(t,e){var n=this;n.frontPosition={x:e.x,y:e.y};var o=n.options.fadeTime+"ms",i={};i.front=f("transition",["top","left"],o);var r={front:{}};r.front={left:n.frontPosition.x+"px",top:n.frontPosition.y+"px"},n.applyStyles(i),n.applyStyles(r),n.restTimeout=setTimeout((function(){"function"==typeof t&&t.call(n),n.restCallback()}),n.options.fadeTime)},k.prototype.restCallback=function(){var t={};t.front=f("transition","none",""),this.applyStyles(t),this.trigger("rested",this.instance)},k.prototype.resetDirection=function(){this.direction={x:!1,y:!1,angle:!1}},k.prototype.computeDirection=function(t){var e,n,o,i=t.angle.radian,r=Math.PI/4,s=Math.PI/2;if(i>r&&i<3*r&&!t.lockX?e="up":i>-r&&i<=r&&!t.lockY?e="left":i>3*-r&&i<=-r&&!t.lockX?e="down":t.lockY||(e="right"),t.lockY||(n=i>-s&&i<s?"left":"right"),t.lockX||(o=i>0?"up":"down"),t.force>this.options.threshold){var a,l={};for(a in this.direction)this.direction.hasOwnProperty(a)&&(l[a]=this.direction[a]);var c={};for(a in this.direction={x:n,y:o,angle:e},t.direction=this.direction,l)l[a]===this.direction[a]&&(c[a]=!0);if(c.x&&c.y&&c.angle)return t;c.x&&c.y||this.trigger("plain",t),c.x||this.trigger("plain:"+n,t),c.y||this.trigger("plain:"+o,t),c.angle||this.trigger("dir dir:"+e,t)}else this.resetDirection();return t};var x=k;function K(t,e){this.nipples=[],this.idles=[],this.actives=[],this.ids=[],this.pressureIntervals={},this.manager=t,this.id=K.id,K.id+=1,this.defaults={zone:document.body,multitouch:!1,maxNumberOfNipples:10,mode:"dynamic",position:{top:0,left:0},catchDistance:200,size:100,threshold:.1,color:"white",fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:.5,lockX:!1,lockY:!1,shape:"circle",dynamicPage:!1,follow:!1},this.config(e),"static"!==this.options.mode&&"semi"!==this.options.mode||(this.options.multitouch=!1),this.options.multitouch||(this.options.maxNumberOfNipples=1);var n=getComputedStyle(this.options.zone.parentElement);return n&&"flex"===n.display&&(this.parentIsFlex=!0),this.updateBox(),this.prepareNipples(),this.bindings(),this.begin(),this.nipples}K.prototype=new B,K.constructor=K,K.id=0,K.prototype.prepareNipples=function(){var t=this.nipples;t.on=this.on.bind(this),t.off=this.off.bind(this),t.options=this.options,t.destroy=this.destroy.bind(this),t.ids=this.ids,t.id=this.id,t.processOnMove=this.processOnMove.bind(this),t.processOnEnd=this.processOnEnd.bind(this),t.get=function(e){if(void 0===e)return t[0];for(var n=0,o=t.length;n<o;n+=1)if(t[n].identifier===e)return t[n];return!1}},K.prototype.bindings=function(){this.bindEvt(this.options.zone,"start"),this.options.zone.style.touchAction="none",this.options.zone.style.msTouchAction="none"},K.prototype.begin=function(){var t=this.options;if("static"===t.mode){var e=this.createNipple(t.position,this.manager.getIdentifier());e.add(),this.idles.push(e)}},K.prototype.createNipple=function(t,e){var n=this.manager.scroll,o={},i=this.options,r=this.parentIsFlex?n.x:n.x+this.box.left,s=this.parentIsFlex?n.y:n.y+this.box.top;if(t.x&&t.y)o={x:t.x-r,y:t.y-s};else if(t.top||t.right||t.bottom||t.left){var a=document.createElement("DIV");a.style.display="hidden",a.style.top=t.top,a.style.right=t.right,a.style.bottom=t.bottom,a.style.left=t.left,a.style.position="absolute",i.zone.appendChild(a);var l=a.getBoundingClientRect();i.zone.removeChild(a),o=t,t={x:l.left+n.x,y:l.top+n.y}}var c=new x(this,{color:i.color,size:i.size,threshold:i.threshold,fadeTime:i.fadeTime,dataOnly:i.dataOnly,restJoystick:i.restJoystick,restOpacity:i.restOpacity,mode:i.mode,identifier:e,position:t,zone:i.zone,frontPosition:{x:0,y:0},shape:i.shape});return i.dataOnly||(p(c.ui.el,o),p(c.ui.front,c.frontPosition)),this.nipples.push(c),this.trigger("added "+c.identifier+":added",c),this.manager.trigger("added "+c.identifier+":added",c),this.bindNipple(c),c},K.prototype.updateBox=function(){this.box=this.options.zone.getBoundingClientRect()},K.prototype.bindNipple=function(t){var e,n=this,o=function(t,o){e=t.type+" "+o.id+":"+t.type,n.trigger(e,o)};t.on("destroyed",n.onDestroyed.bind(n)),t.on("shown hidden rested dir plain",o),t.on("dir:up dir:right dir:down dir:left",o),t.on("plain:up plain:right plain:down plain:left",o)},K.prototype.pressureFn=function(t,e,n){var o=this,i=0;clearInterval(o.pressureIntervals[n]),o.pressureIntervals[n]=setInterval(function(){var n=t.force||t.pressure||t.webkitForce||0;n!==i&&(e.trigger("pressure",n),o.trigger("pressure "+e.identifier+":pressure",n),i=n)}.bind(o),100)},K.prototype.onstart=function(t){var e=this,n=e.options,o=t;return t=u(t),e.updateBox(),m(t,(function(i){e.actives.length<n.maxNumberOfNipples?e.processOnStart(i):o.type.match(/^touch/)&&(Object.keys(e.manager.ids).forEach((function(n){if(Object.values(o.touches).findIndex((function(t){return t.identifier===n}))<0){var i=[t[0]];i.identifier=n,e.processOnEnd(i)}})),e.actives.length<n.maxNumberOfNipples&&e.processOnStart(i))})),e.manager.bindDocument(),!1},K.prototype.processOnStart=function(t){var e,n=this,o=n.options,r=n.manager.getIdentifier(t),s=t.force||t.pressure||t.webkitForce||0,a={x:t.pageX,y:t.pageY},l=n.getOrCreate(r,a);l.identifier!==r&&n.manager.removeIdentifier(l.identifier),l.identifier=r;var c=function(e){e.trigger("start",e),n.trigger("start "+e.id+":start",e),e.show(),s>0&&n.pressureFn(t,e,e.identifier),n.processOnMove(t)};if((e=n.idles.indexOf(l))>=0&&n.idles.splice(e,1),n.actives.push(l),n.ids.push(l.identifier),"semi"!==o.mode)c(l);else{if(!(i(a,l.position)<=o.catchDistance))return l.destroy(),void n.processOnStart(t);c(l)}return l},K.prototype.getOrCreate=function(t,e){var n,o=this.options;return/(semi|static)/.test(o.mode)?(n=this.idles[0])?(this.idles.splice(0,1),n):"semi"===o.mode?this.createNipple(e,t):(console.warn("Coudln't find the needed nipple."),!1):n=this.createNipple(e,t)},K.prototype.processOnMove=function(t){var e=this.options,n=this.manager.getIdentifier(t),o=this.nipples.get(n),s=this.manager.scroll;if(function(t){return isNaN(t.buttons)?0!==t.pressure:0!==t.buttons}(t)){if(!o)return console.error("Found zombie joystick with ID "+n),void this.manager.removeIdentifier(n);if(e.dynamicPage){var a=o.el.getBoundingClientRect();o.position={x:s.x+a.left,y:s.y+a.top}}o.identifier=n;var l=o.options.size/2,c={x:t.pageX,y:t.pageY};e.lockX&&(c.y=o.position.y),e.lockY&&(c.x=o.position.x);var u,d,f,h,y,m,g,v,b,_,w=i(c,o.position),D=(u=c,f=(d=o.position).x-u.x,h=d.y-u.y,function(t){return t*(180/Math.PI)}(Math.atan2(h,f))),B=r(D),k=w/l,x={distance:w,position:c};if("circle"===o.options.shape?(y=Math.min(w,l),g=o.position,v=y,_={x:0,y:0},b=r(b=D),_.x=g.x-v*Math.cos(b),_.y=g.y-v*Math.sin(b),m=_):(m=function(t,e,n){return{x:Math.min(Math.max(t.x,e.x-n),e.x+n),y:Math.min(Math.max(t.y,e.y-n),e.y+n)}}(c,o.position,l),y=i(m,o.position)),e.follow){if(w>l){var K=c.x-m.x,C=c.y-m.y;o.position.x+=K,o.position.y+=C,o.el.style.top=o.position.y-(this.box.top+s.y)+"px",o.el.style.left=o.position.x-(this.box.left+s.x)+"px",w=i(c,o.position)}}else c=m,w=y;var E=c.x-o.position.x,O=c.y-o.position.y;o.frontPosition={x:E,y:O},e.dataOnly||p(o.ui.front,o.frontPosition);var j={identifier:o.identifier,position:c,force:k,pressure:t.force||t.pressure||t.webkitForce||0,distance:w,angle:{radian:B,degree:D},vector:{x:E/l,y:-O/l},raw:x,instance:o,lockX:e.lockX,lockY:e.lockY};(j=o.computeDirection(j)).angle={radian:r(180-D),degree:180-D},o.trigger("move",j),this.trigger("move "+o.id+":move",j)}else this.processOnEnd(t)},K.prototype.processOnEnd=function(t){var e=this,n=e.options,o=e.manager.getIdentifier(t),i=e.nipples.get(o),r=e.manager.removeIdentifier(i.identifier);i&&(n.dataOnly||i.hide((function(){"dynamic"===n.mode&&(i.trigger("removed",i),e.trigger("removed "+i.id+":removed",i),e.manager.trigger("removed "+i.id+":removed",i),i.destroy())})),clearInterval(e.pressureIntervals[i.identifier]),i.resetDirection(),i.trigger("end",i),e.trigger("end "+i.id+":end",i),e.ids.indexOf(i.identifier)>=0&&e.ids.splice(e.ids.indexOf(i.identifier),1),e.actives.indexOf(i)>=0&&e.actives.splice(e.actives.indexOf(i),1),/(semi|static)/.test(n.mode)?e.idles.push(i):e.nipples.indexOf(i)>=0&&e.nipples.splice(e.nipples.indexOf(i),1),e.manager.unbindDocument(),/(semi|static)/.test(n.mode)&&(e.manager.ids[r.id]=r.identifier))},K.prototype.onDestroyed=function(t,e){this.nipples.indexOf(e)>=0&&this.nipples.splice(this.nipples.indexOf(e),1),this.actives.indexOf(e)>=0&&this.actives.splice(this.actives.indexOf(e),1),this.idles.indexOf(e)>=0&&this.idles.splice(this.idles.indexOf(e),1),this.ids.indexOf(e.identifier)>=0&&this.ids.splice(this.ids.indexOf(e.identifier),1),this.manager.removeIdentifier(e.identifier),this.manager.unbindDocument()},K.prototype.destroy=function(){for(var t in this.unbindEvt(this.options.zone,"start"),this.nipples.forEach((function(t){t.destroy()})),this.pressureIntervals)this.pressureIntervals.hasOwnProperty(t)&&clearInterval(this.pressureIntervals[t]);this.trigger("destroyed",this.nipples),this.manager.unbindDocument(),this.off()};var C=K;function E(t){var e=this;e.ids={},e.index=0,e.collections=[],e.scroll=d(),e.config(t),e.prepareCollections();var n=function(){var t;e.collections.forEach((function(n){n.forEach((function(n){t=n.el.getBoundingClientRect(),n.position={x:e.scroll.x+t.left,y:e.scroll.y+t.top}}))}))};l(window,"resize",(function(){a(n)}));var o=function(){e.scroll=d()};return l(window,"scroll",(function(){a(o)})),e.collections}E.prototype=new B,E.constructor=E,E.prototype.prepareCollections=function(){var t=this;t.collections.create=t.create.bind(t),t.collections.on=t.on.bind(t),t.collections.off=t.off.bind(t),t.collections.destroy=t.destroy.bind(t),t.collections.get=function(e){var n;return t.collections.every((function(t){return!(n=t.get(e))})),n}},E.prototype.create=function(t){return this.createCollection(t)},E.prototype.createCollection=function(t){var e=new C(this,t);return this.bindCollection(e),this.collections.push(e),e},E.prototype.bindCollection=function(t){var e,n=this,o=function(t,o){e=t.type+" "+o.id+":"+t.type,n.trigger(e,o)};t.on("destroyed",n.onDestroyed.bind(n)),t.on("shown hidden rested dir plain",o),t.on("dir:up dir:right dir:down dir:left",o),t.on("plain:up plain:right plain:down plain:left",o)},E.prototype.bindDocument=function(){this.binded||(this.bindEvt(document,"move").bindEvt(document,"end"),this.binded=!0)},E.prototype.unbindDocument=function(t){Object.keys(this.ids).length&&!0!==t||(this.unbindEvt(document,"move").unbindEvt(document,"end"),this.binded=!1)},E.prototype.getIdentifier=function(t){var e;return t?void 0===(e=void 0===t.identifier?t.pointerId:t.identifier)&&(e=this.latest||0):e=this.index,void 0===this.ids[e]&&(this.ids[e]=this.index,this.index+=1),this.latest=e,this.ids[e]},E.prototype.removeIdentifier=function(t){var e={};for(var n in this.ids)if(this.ids[n]===t){e.id=n,e.identifier=this.ids[n],delete this.ids[n];break}return e},E.prototype.onmove=function(t){return this.onAny("move",t),!1},E.prototype.onend=function(t){return this.onAny("end",t),!1},E.prototype.oncancel=function(t){return this.onAny("end",t),!1},E.prototype.onAny=function(t,e){var n,o=this,i="processOn"+t.charAt(0).toUpperCase()+t.slice(1);return e=u(e),m(e,(function(t){n=o.getIdentifier(t),m(o.collections,function(t,e,n){n.ids.indexOf(e)>=0&&(n[i](t),t._found_=!0)}.bind(null,t,n)),t._found_||o.removeIdentifier(n)})),!1},E.prototype.destroy=function(){this.unbindDocument(!0),this.ids={},this.index=0,this.collections.forEach((function(t){t.destroy()})),this.off()},E.prototype.onDestroyed=function(t,e){if(this.collections.indexOf(e)<0)return!1;this.collections.splice(this.collections.indexOf(e),1)};var O=new E;e.default={create:function(t){return O.create(t)},factory:O}}]).default},"object"==typeof n&&"object"==typeof e?e.exports=i():"function"==typeof define&&define.amd?define("nipplejs",[],i):"object"==typeof n?n.nipplejs=i():o.nipplejs=i()},{}],137:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var o,i=function(){return i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)},r=function(){function t(t){this.options=t,this.listeners={}}return t.prototype.on=function(t,e){var n=this.listeners[t]||[];this.listeners[t]=n.concat([e])},t.prototype.triggerEvent=function(t,e){var n=this;(this.listeners[t]||[]).forEach((function(t){return t({target:n,event:e})}))},t}();(o=n.NotyfArrayEvent||(n.NotyfArrayEvent={}))[o.Add=0]="Add",o[o.Remove=1]="Remove";var s,a=function(){function t(){this.notifications=[]}return t.prototype.push=function(t){this.notifications.push(t),this.updateFn(t,n.NotyfArrayEvent.Add,this.notifications)},t.prototype.splice=function(t,e){var o=this.notifications.splice(t,e)[0];return this.updateFn(o,n.NotyfArrayEvent.Remove,this.notifications),o},t.prototype.indexOf=function(t){return this.notifications.indexOf(t)},t.prototype.onUpdate=function(t){this.updateFn=t},t}();(s=n.NotyfEvent||(n.NotyfEvent={})).Dismiss="dismiss",s.Click="click";var l={types:[{type:"success",className:"notyf__toast--success",backgroundColor:"#3dc763",icon:{className:"notyf__icon--success",tagName:"i"}},{type:"error",className:"notyf__toast--error",backgroundColor:"#ed3d3d",icon:{className:"notyf__icon--error",tagName:"i"}}],duration:2e3,ripple:!0,position:{x:"right",y:"bottom"},dismissible:!1},c=function(){function t(){this.notifications=[],this.events={},this.X_POSITION_FLEX_MAP={left:"flex-start",center:"center",right:"flex-end"},this.Y_POSITION_FLEX_MAP={top:"flex-start",center:"center",bottom:"flex-end"};var t=document.createDocumentFragment(),e=this._createHTMLElement({tagName:"div",className:"notyf"});t.appendChild(e),document.body.appendChild(t),this.container=e,this.animationEndEventName=this._getAnimationEndEventName(),this._createA11yContainer()}return t.prototype.on=function(t,e){var n;this.events=i(i({},this.events),((n={})[t]=e,n))},t.prototype.update=function(t,e){e===n.NotyfArrayEvent.Add?this.addNotification(t):e===n.NotyfArrayEvent.Remove&&this.removeNotification(t)},t.prototype.removeNotification=function(t){var e,n,o=this,i=this._popRenderedNotification(t);i&&((e=i.node).classList.add("notyf__toast--disappear"),e.addEventListener(this.animationEndEventName,n=function(t){t.target===e&&(e.removeEventListener(o.animationEndEventName,n),o.container.removeChild(e))}))},t.prototype.addNotification=function(t){var e=this._renderNotification(t);this.notifications.push({notification:t,node:e}),this._announce(t.options.message||"Notification")},t.prototype._renderNotification=function(t){var e,n=this._buildNotificationCard(t),o=t.options.className;return o&&(e=n.classList).add.apply(e,o.split(" ")),this.container.appendChild(n),n},t.prototype._popRenderedNotification=function(t){for(var e=-1,n=0;n<this.notifications.length&&e<0;n++)this.notifications[n].notification===t&&(e=n);if(-1!==e)return this.notifications.splice(e,1)[0]},t.prototype.getXPosition=function(t){var e;return(null===(e=null==t?void 0:t.position)||void 0===e?void 0:e.x)||"right"},t.prototype.getYPosition=function(t){var e;return(null===(e=null==t?void 0:t.position)||void 0===e?void 0:e.y)||"bottom"},t.prototype.adjustContainerAlignment=function(t){var e=this.X_POSITION_FLEX_MAP[this.getXPosition(t)],n=this.Y_POSITION_FLEX_MAP[this.getYPosition(t)],o=this.container.style;o.setProperty("justify-content",n),o.setProperty("align-items",e)},t.prototype._buildNotificationCard=function(t){var e=this,o=t.options,i=o.icon;this.adjustContainerAlignment(o);var r=this._createHTMLElement({tagName:"div",className:"notyf__toast"}),s=this._createHTMLElement({tagName:"div",className:"notyf__ripple"}),a=this._createHTMLElement({tagName:"div",className:"notyf__wrapper"}),l=this._createHTMLElement({tagName:"div",className:"notyf__message"});l.innerHTML=o.message||"";var c=o.background||o.backgroundColor;if(i){var u=this._createHTMLElement({tagName:"div",className:"notyf__icon"});if(("string"==typeof i||i instanceof String)&&(u.innerHTML=new String(i).valueOf()),"object"==typeof i){var d=i.tagName,p=void 0===d?"i":d,f=i.className,h=i.text,y=i.color,m=void 0===y?c:y,g=this._createHTMLElement({tagName:p,className:f,text:h});m&&(g.style.color=m),u.appendChild(g)}a.appendChild(u)}if(a.appendChild(l),r.appendChild(a),c&&(o.ripple?(s.style.background=c,r.appendChild(s)):r.style.background=c),o.dismissible){var v=this._createHTMLElement({tagName:"div",className:"notyf__dismiss"}),b=this._createHTMLElement({tagName:"button",className:"notyf__dismiss-btn"});v.appendChild(b),a.appendChild(v),r.classList.add("notyf__toast--dismissible"),b.addEventListener("click",(function(o){var i,r;null===(r=(i=e.events)[n.NotyfEvent.Dismiss])||void 0===r||r.call(i,{target:t,event:o}),o.stopPropagation()}))}r.addEventListener("click",(function(o){var i,r;return null===(r=(i=e.events)[n.NotyfEvent.Click])||void 0===r?void 0:r.call(i,{target:t,event:o})}));var _="top"===this.getYPosition(o)?"upper":"lower";return r.classList.add("notyf__toast--"+_),r},t.prototype._createHTMLElement=function(t){var e=t.tagName,n=t.className,o=t.text,i=document.createElement(e);return n&&(i.className=n),i.textContent=o||null,i},t.prototype._createA11yContainer=function(){var t=this._createHTMLElement({tagName:"div",className:"notyf-announcer"});t.setAttribute("aria-atomic","true"),t.setAttribute("aria-live","polite"),t.style.border="0",t.style.clip="rect(0 0 0 0)",t.style.height="1px",t.style.margin="-1px",t.style.overflow="hidden",t.style.padding="0",t.style.position="absolute",t.style.width="1px",t.style.outline="0",document.body.appendChild(t),this.a11yContainer=t},t.prototype._announce=function(t){var e=this;this.a11yContainer.textContent="",setTimeout((function(){e.a11yContainer.textContent=t}),100)},t.prototype._getAnimationEndEventName=function(){var t,e=document.createElement("_fake"),n={MozTransition:"animationend",OTransition:"oAnimationEnd",WebkitTransition:"webkitAnimationEnd",transition:"animationend"};for(t in n)if(void 0!==e.style[t])return n[t];return"animationend"},t}(),u=function(){function t(t){var e=this;this.dismiss=this._removeNotification,this.notifications=new a,this.view=new c;var o=this.registerTypes(t);this.options=i(i({},l),t),this.options.types=o,this.notifications.onUpdate((function(t,n){return e.view.update(t,n)})),this.view.on(n.NotyfEvent.Dismiss,(function(t){var o=t.target,i=t.event;e._removeNotification(o),o.triggerEvent(n.NotyfEvent.Dismiss,i)})),this.view.on(n.NotyfEvent.Click,(function(t){var e=t.target,o=t.event;return e.triggerEvent(n.NotyfEvent.Click,o)}))}return t.prototype.error=function(t){var e=this.normalizeOptions("error",t);return this.open(e)},t.prototype.success=function(t){var e=this.normalizeOptions("success",t);return this.open(e)},t.prototype.open=function(t){var e=this.options.types.find((function(e){return e.type===t.type}))||{},n=i(i({},e),t);this.assignProps(["ripple","position","dismissible"],n);var o=new r(n);return this._pushNotification(o),o},t.prototype.dismissAll=function(){for(;this.notifications.splice(0,1););},t.prototype.assignProps=function(t,e){var n=this;t.forEach((function(t){e[t]=null==e[t]?n.options[t]:e[t]}))},t.prototype._pushNotification=function(t){var e=this;this.notifications.push(t);var n=void 0!==t.options.duration?t.options.duration:this.options.duration;n&&setTimeout((function(){return e._removeNotification(t)}),n)},t.prototype._removeNotification=function(t){var e=this.notifications.indexOf(t);-1!==e&&this.notifications.splice(e,1)},t.prototype.normalizeOptions=function(t,e){var n={type:t};return"string"==typeof e?n.message=e:"object"==typeof e&&(n=i(i({},n),e)),n},t.prototype.registerTypes=function(t){var e=(t&&t.types||[]).slice();return l.types.map((function(t){var n=-1;e.forEach((function(e,o){e.type===t.type&&(n=o)}));var o=-1!==n?e.splice(n,1)[0]:{};return i(i({},t),o)})).concat(e)},t}();n.DEFAULT_OPTIONS=l,n.Notyf=u,n.NotyfArray=a,n.NotyfNotification=r,n.NotyfView=c},{}],138:[function(t,e,n){var o,i;o=this,i=function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function i(t){return(i="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)}function r(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}n.r(e);var s,a,l,c=function(){function t(e){var n=e.getOptions,o=e.getCaretPosition,i=e.getCaretPositionEnd,r=e.dispatch;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.getOptions=n,this.getCaretPosition=o,this.getCaretPositionEnd=i,this.dispatch=r,t.bindMethods(t,this)}var e,n,s;return e=t,s=[{key:"bindMethods",value:function(t,e){var n,i=function(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}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 s,a=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,s=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw s}}}}(Object.getOwnPropertyNames(t.prototype));try{for(i.s();!(n=i.n()).done;){var r=n.value;"constructor"===r||"bindMethods"===r||(e[r]=e[r].bind(e))}}catch(t){i.e(t)}finally{i.f()}}}],(n=[{key:"getButtonClass",value:function(t){var e=t.includes("{")&&t.includes("}")&&"{//}"!==t?"functionBtn":"standardBtn",n=t.replace("{","").replace("}",""),o="";return"standardBtn"!==e&&(o=" hg-button-".concat(n)),"hg-".concat(e).concat(o)}},{key:"getDefaultDiplay",value:function(){return{"{bksp}":"backspace","{backspace}":"backspace","{enter}":"< enter","{shift}":"shift","{shiftleft}":"shift","{shiftright}":"shift","{alt}":"alt","{s}":"shift","{tab}":"tab","{lock}":"caps","{capslock}":"caps","{accept}":"Submit","{space}":" ","{//}":" ","{esc}":"esc","{escape}":"esc","{f1}":"f1","{f2}":"f2","{f3}":"f3","{f4}":"f4","{f5}":"f5","{f6}":"f6","{f7}":"f7","{f8}":"f8","{f9}":"f9","{f10}":"f10","{f11}":"f11","{f12}":"f12","{numpaddivide}":"/","{numlock}":"lock","{arrowup}":"↑","{arrowleft}":"←","{arrowdown}":"↓","{arrowright}":"→","{prtscr}":"print","{scrolllock}":"scroll","{pause}":"pause","{insert}":"ins","{home}":"home","{pageup}":"up","{delete}":"del","{end}":"end","{pagedown}":"down","{numpadmultiply}":"*","{numpadsubtract}":"-","{numpadadd}":"+","{numpadenter}":"enter","{period}":".","{numpaddecimal}":".","{numpad0}":"0","{numpad1}":"1","{numpad2}":"2","{numpad3}":"3","{numpad4}":"4","{numpad5}":"5","{numpad6}":"6","{numpad7}":"7","{numpad8}":"8","{numpad9}":"9"}}},{key:"getButtonDisplayName",value:function(t,e,n){return(e=n?Object.assign({},this.getDefaultDiplay(),e):e||this.getDefaultDiplay())[t]||t}},{key:"getUpdatedInput",value:function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=this.getOptions(),s=[n,o,i],a=e;return("{bksp}"===t||"{backspace}"===t)&&a.length>0?a=this.removeAt.apply(this,[a].concat(s)):"{space}"===t?a=this.addStringAt.apply(this,[a," "].concat(s)):"{tab}"!==t||"boolean"==typeof r.tabCharOnTab&&!1===r.tabCharOnTab?"{enter}"!==t&&"{numpadenter}"!==t||!r.newLineOnEnter?t.includes("numpad")&&Number.isInteger(Number(t[t.length-2]))?a=this.addStringAt.apply(this,[a,t[t.length-2]].concat(s)):"{numpaddivide}"===t?a=this.addStringAt.apply(this,[a,"/"].concat(s)):"{numpadmultiply}"===t?a=this.addStringAt.apply(this,[a,"*"].concat(s)):"{numpadsubtract}"===t?a=this.addStringAt.apply(this,[a,"-"].concat(s)):"{numpadadd}"===t?a=this.addStringAt.apply(this,[a,"+"].concat(s)):"{numpaddecimal}"===t?a=this.addStringAt.apply(this,[a,"."].concat(s)):"{"===t||"}"===t?a=this.addStringAt.apply(this,[a,t].concat(s)):t.includes("{")||t.includes("}")||(a=this.addStringAt.apply(this,[a,t].concat(s))):a=this.addStringAt.apply(this,[a,"\n"].concat(s)):a=this.addStringAt.apply(this,[a,"\t"].concat(s)),a}},{key:"updateCaretPos",value:function(t,e){var n=this.updateCaretPosAction(t,e);this.dispatch((function(t){t.setCaretPosition(n)}))}},{key:"updateCaretPosAction",value:function(t,e){var n=this.getOptions(),o=this.getCaretPosition();return e?o>0&&(o-=t):o+=t,n.debug&&console.log("Caret at:",o,"(".concat(this.keyboardDOMClass,")")),o}},{key:"addStringAt",value:function(t,e){var n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return o||0===o?(n=[t.slice(0,o),e,t.slice(i)].join(""),this.isMaxLengthReached()||r&&this.updateCaretPos(e.length)):n=t+e,n}},{key:"removeAt",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(0===n&&0===o)return t;if(n===o){var r=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;n&&n>=0?t.substring(n-2,n).match(r)?(e=t.substr(0,n-2)+t.substr(n),i&&this.updateCaretPos(2,!0)):(e=t.substr(0,n-1)+t.substr(n),i&&this.updateCaretPos(1,!0)):t.slice(-2).match(r)?(e=t.slice(0,-2),i&&this.updateCaretPos(2,!0)):(e=t.slice(0,-1),i&&this.updateCaretPos(1,!0))}else e=t.slice(0,n)+t.slice(o),i&&this.dispatch((function(t){t.setCaretPosition(n)}));return e}},{key:"handleMaxLength",value:function(t,e){var n=this.getOptions(),o=n.maxLength,r=t[n.inputName],s=e.length-1>=o;if(e.length<=r.length)return!1;if(Number.isInteger(o))return n.debug&&console.log("maxLength (num) reached:",s),s?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if("object"===i(o)){var a=e.length-1>=o[n.inputName];return n.debug&&console.log("maxLength (obj) reached:",a),a?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return Boolean(this.maxLengthReached)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return window.PointerEvent}},{key:"camelCase",value:function(t){return!!t&&t.toLowerCase().trim().split(/[.\-_\s]/g).reduce((function(t,e){return e.length?t+e[0].toUpperCase()+e.slice(1):t}))}}])&&r(e.prototype,n),s&&r(e,s),t}();l=function(){},(a="noop")in(s=c)?Object.defineProperty(s,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):s[a]=l;var u=c;function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var p=function(){function t(e){var n=e.dispatch,o=e.getOptions;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.dispatch=n,this.getOptions=o,u.bindMethods(t,this)}var e,n;return e=t,(n=[{key:"handleHighlightKeyDown",value:function(t){var e=this.getOptions(),n=this.getSimpleKeyboardLayoutKey(t);this.dispatch((function(t){var o=t.getButtonElement(n)||t.getButtonElement("{".concat(n,"}"));o&&(o.style.backgroundColor=e.physicalKeyboardHighlightBgColor||"#dadce4",o.style.color=e.physicalKeyboardHighlightTextColor||"black",e.physicalKeyboardHighlightPress&&(o.onpointerdown||o.onmousedown||o.ontouchstart||u.noop)())}))}},{key:"handleHighlightKeyUp",value:function(t){var e=this.getOptions(),n=this.getSimpleKeyboardLayoutKey(t);this.dispatch((function(t){var o=t.getButtonElement(n)||t.getButtonElement("{".concat(n,"}"));o&&o.removeAttribute&&(o.removeAttribute("style"),e.physicalKeyboardHighlightPress&&(o.onpointerup||o.onmouseup||o.ontouchend||u.noop)())}))}},{key:"getSimpleKeyboardLayoutKey",value:function(t){var e;return((e=t.code.includes("Numpad")||t.code.includes("Shift")||t.code.includes("Space")||t.code.includes("Backspace")||t.code.includes("Control")||t.code.includes("Alt")||t.code.includes("Meta")?t.code:t.key)&&e!==e.toUpperCase()||"F"===t.code[0]&&Number.isInteger(Number(t.code[1]))&&t.code.length<=3)&&(e=e?e.toLowerCase():e),e}}])&&d(e.prototype,n),t}();function f(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return h(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,e):void 0}}(t)||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.")}()}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var v=function(){function t(){var e=this;y(this,t),g(this,"handleParams",(function(t){var e,n,o;if("string"==typeof t[0])e=t[0].split(".").join(""),n=document.querySelector(".".concat(e)),o=t[1];else if(t[0]instanceof HTMLDivElement){if(!t[0].className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");e=t[0].className.split(" ")[0],n=t[0],o=t[1]}else e="simple-keyboard",n=document.querySelector(".".concat(e)),o=t[0];return{keyboardDOMClass:e,keyboardDOM:n,options:o}})),g(this,"getOptions",(function(){return e.options})),g(this,"getCaretPosition",(function(){return e.caretPosition})),g(this,"getCaretPositionEnd",(function(){return e.caretPositionEnd})),g(this,"registerModule",(function(t,n){e.modules[t]||(e.modules[t]={}),n(e.modules[t])})),g(this,"getKeyboardClassString",(function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var i=[e.keyboardDOMClass].concat(n).filter((function(t){return!!t}));return i.join(" ")}));for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];var r=this.handleParams(o),s=r.keyboardDOMClass,a=r.keyboardDOM,l=r.options,c=void 0===l?{}:l;if(this.utilities=new u({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=a,this.options=c,this.options.layoutName=this.options.layoutName||"default",this.options.theme=this.options.theme||"hg-theme-default",this.options.inputName=this.options.inputName||"default",this.options.preventMouseDownDefault=this.options.preventMouseDownDefault||!1,this.keyboardPluginClasses="",u.bindMethods(t,this),this.input={},this.input[this.options.inputName]="",this.keyboardDOMClass=s,this.buttonElements={},window.SimpleKeyboardInstances||(window.SimpleKeyboardInstances={}),this.currentInstanceName=this.utilities.camelCase(this.keyboardDOMClass),window.SimpleKeyboardInstances[this.currentInstanceName]=this,this.allKeyboardInstances=window.SimpleKeyboardInstances,this.keyboardInstanceNames=Object.keys(window.SimpleKeyboardInstances),this.isFirstKeyboardInstance=this.keyboardInstanceNames[0]===this.currentInstanceName,this.physicalKeyboard=new p({dispatch:this.dispatch,getOptions:this.getOptions}),!this.keyboardDOM)throw console.warn('".'.concat(s,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}var e,n;return e=t,(n=[{key:"setCaretPosition",value:function(t,e){this.caretPosition=t,this.caretPositionEnd=e||t}},{key:"handleButtonClicked",value:function(t){var e=this.options.debug;if("{//}"===t)return!1;"function"==typeof this.options.onKeyPress&&this.options.onKeyPress(t),this.input[this.options.inputName]||(this.input[this.options.inputName]="");var n=this.utilities.getUpdatedInput(t,this.input[this.options.inputName],this.caretPosition,this.caretPositionEnd);if(this.input[this.options.inputName]!==n&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(n))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,n))return!1;this.input[this.options.inputName]=this.utilities.getUpdatedInput(t,this.input[this.options.inputName],this.caretPosition,this.caretPositionEnd,!0),e&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")")),this.options.syncInstanceInputs&&this.syncInstanceInputs(),"function"==typeof this.options.onChange&&this.options.onChange(this.getInput(this.options.inputName,!0)),"function"==typeof this.options.onChangeAll&&this.options.onChangeAll(this.getAllInputs())}e&&console.log("Key pressed:",t)}},{key:"handleButtonMouseDown",value:function(t,e){var n=this;e&&(this.options.preventMouseDownDefault&&e.preventDefault(),this.options.stopMouseDownPropagation&&e.stopPropagation(),e.target.classList.add(this.activeButtonClass)),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdTimeout&&clearTimeout(this.holdTimeout),this.isMouseHold=!0,this.options.disableButtonHold||(this.holdTimeout=setTimeout((function(){(n.isMouseHold&&(!t.includes("{")&&!t.includes("}")||"{delete}"===t||"{backspace}"===t||"{bksp}"===t||"{space}"===t||"{tab}"===t)||"{arrowright}"===t||"{arrowleft}"===t||"{arrowup}"===t||"{arrowdown}"===t)&&(n.options.debug&&console.log("Button held:",t),n.handleButtonHold(t,e)),clearTimeout(n.holdTimeout)}),500))}},{key:"handleButtonMouseUp",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;n&&(this.options.preventMouseUpDefault&&n.preventDefault(),this.options.stopMouseUpPropagation&&n.stopPropagation()),this.recurseButtons((function(e){e.classList.remove(t.activeButtonClass)})),this.isMouseHold=!1,this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),e&&"function"==typeof this.options.onKeyReleased&&this.options.onKeyReleased(e)}},{key:"handleKeyboardContainerMouseDown",value:function(t){this.options.preventMouseDownDefault&&t.preventDefault()}},{key:"handleButtonHold",value:function(t){var e=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=setTimeout((function(){e.isMouseHold?(e.handleButtonClicked(t),e.handleButtonHold(t)):clearTimeout(e.holdInteractionTimeout)}),100)}},{key:"syncInstanceInputs",value:function(){var t=this;this.dispatch((function(e){e.replaceInput(t.input),e.setCaretPosition(t.caretPosition,t.caretPositionEnd)}))}},{key:"clearInput",value:function(t){t=t||this.options.inputName,this.input[t]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t=t||this.options.inputName,this.options.syncInstanceInputs&&!e&&this.syncInstanceInputs(),this.options.rtl){var n=this.input[t].replace("","").replace("","");return""+n+""}return this.input[t]}},{key:"getAllInputs",value:function(){var t=this,e={};return Object.keys(this.input).forEach((function(n){e[n]=t.getInput(n,!0)})),e}},{key:"setInput",value:function(t,e){e=e||this.options.inputName,this.input[e]=t,this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(t){this.input=t}},{key:"setOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.changedOptions(t);this.options=Object.assign(this.options,t),e.length&&(this.options.debug&&console.log("changedOptions",e),this.onSetOptions(t),this.render())}},{key:"changedOptions",value:function(t){var e=this;return Object.keys(t).filter((function(n){return JSON.stringify(t[n])!==JSON.stringify(e.options[n])}))}},{key:"onSetOptions",value:function(t){t.inputName&&(this.options.debug&&console.log("inputName changed. caretPosition reset."),this.setCaretPosition(null))}},{key:"clear",value:function(){this.keyboardDOM.innerHTML="",this.keyboardDOM.className=this.keyboardDOMClass,this.buttonElements={}}},{key:"dispatch",value:function(t){if(!window.SimpleKeyboardInstances)throw console.warn("SimpleKeyboardInstances is not defined. Dispatch cannot be called."),new Error("INSTANCES_VAR_ERROR");return Object.keys(window.SimpleKeyboardInstances).forEach((function(e){t(window.SimpleKeyboardInstances[e],e)}))}},{key:"addButtonTheme",value:function(t,e){var n=this;if(!e||!t)return!1;t.split(" ").forEach((function(o){e.split(" ").forEach((function(e){n.options.buttonTheme||(n.options.buttonTheme=[]);var i=!1;n.options.buttonTheme.map((function(t){if(t.class.split(" ").includes(e)){i=!0;var n=t.buttons.split(" ");n.includes(o)||(i=!0,n.push(o),t.buttons=n.join(" "))}return t})),i||n.options.buttonTheme.push({class:e,buttons:t})}))})),this.render()}},{key:"removeButtonTheme",value:function(t,e){var n=this;if(!t&&!e)return this.options.buttonTheme=[],this.render(),!1;t&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(t.split(" ").forEach((function(t){n.options.buttonTheme.map((function(o,i){if(e&&e.includes(o.class)||!e){var r=o.buttons.split(" ").filter((function(e){return e!==t}));r.length?o.buttons=r.join(" "):(n.options.buttonTheme.splice(i,1),o=null)}return o}))})),this.render())}},{key:"getButtonElement",value:function(t){var e,n=this.buttonElements[t];return n&&(e=n.length>1?n:n[0]),e}},{key:"inputPatternIsValid",value:function(t){var e,n=this.options.inputPattern;if((e=n instanceof RegExp?n:n[this.options.inputName])&&t){var o=e.test(t);return this.options.debug&&console.log('inputPattern ("'.concat(e,'"): ').concat(o?"passed":"did not pass!")),o}return!0}},{key:"setEventListeners",value:function(){!this.isFirstKeyboardInstance&&this.allKeyboardInstances||(this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")")),document.addEventListener("keyup",this.handleKeyUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd))}},{key:"handleKeyUp",value:function(t){this.caretEventHandler(t),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(t)}},{key:"handleKeyDown",value:function(t){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(t)}},{key:"handleMouseUp",value:function(t){this.caretEventHandler(t)}},{key:"handleTouchEnd",value:function(t){this.caretEventHandler(t)}},{key:"caretEventHandler",value:function(t){var e;t.target.tagName&&(e=t.target.tagName.toLowerCase()),this.dispatch((function(n){var o=t.target===n.keyboardDOM||t.target&&n.keyboardDOM.contains(t.target);n.isMouseHold&&(n.isMouseHold=!1),"textarea"!==e&&"input"!==e||!["text","search","url","tel","password"].includes(t.target.type)||n.options.disableCaretPositioning?!n.options.disableCaretPositioning&&o||n.setCaretPosition(null):(n.setCaretPosition(t.target.selectionStart,t.target.selectionEnd),n.options.debug&&console.log("Caret at: ",n.getCaretPosition(),n.getCaretPositionEnd(),t&&t.target.tagName.toLowerCase(),"(".concat(n.keyboardDOMClass,")")))}))}},{key:"recurseButtons",value:function(t){var e=this;t&&Object.keys(this.buttonElements).forEach((function(n){return e.buttonElements[n].forEach(t)}))}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName)),document.removeEventListener("keyup",this.handleKeyUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),document.onpointerup=null,document.ontouchend=null,document.ontouchcancel=null,document.onmouseup=null;var t=function(t){t.onpointerdown=null,t.onpointerup=null,t.onpointercancel=null,t.ontouchstart=null,t.ontouchend=null,t.ontouchcancel=null,t.onclick=null,t.onmousedown=null,t.onmouseup=null,t.remove(),t=null};this.recurseButtons(t),this.recurseButtons=null,t=null,this.keyboardDOM.onpointerdown=null,this.keyboardDOM.ontouchstart=null,this.keyboardDOM.onmousedown=null,this.clear(),window.SimpleKeyboardInstances[this.currentInstanceName]=null,delete window.SimpleKeyboardInstances[this.currentInstanceName],this.initialized=!1}},{key:"getButtonThemeClasses",value:function(t){var e=this.options.buttonTheme,n=[];return Array.isArray(e)&&e.forEach((function(e){if(e.class&&"string"==typeof e.class&&e.buttons&&"string"==typeof e.buttons){var o=e.class.split(" ");e.buttons.split(" ").includes(t)&&(n=[].concat(f(n),f(o)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',e)})),n}},{key:"setDOMButtonAttributes",value:function(t,e){var n=this.options.buttonAttributes;Array.isArray(n)&&n.forEach((function(n){n.attribute&&"string"==typeof n.attribute&&n.value&&"string"==typeof n.value&&n.buttons&&"string"==typeof n.buttons?n.buttons.split(" ").includes(t)&&e(n.attribute,n.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',n)}))}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(t){if(t.target.classList.contains("hg-button"))return t.preventDefault(),t.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),"function"==typeof this.options.onInit&&this.options.onInit()}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),"function"==typeof this.options.beforeFirstRender&&this.options.beforeFirstRender(),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){"function"==typeof this.options.beforeRender&&this.options.beforeRender()}},{key:"onRender",value:function(){"function"==typeof this.options.onRender&&this.options.onRender()}},{key:"onModulesLoaded",value:function(){"function"==typeof this.options.onModulesLoaded&&this.options.onModulesLoaded(this)}},{key:"loadModules",value:function(){var t=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach((function(e){(new e).init(t)})),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(t,e){return!!this.modules[t]&&this.modules[t][e]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(t,e,n,o){var i=this,r=Array.from(t.children),s=0;return r.length&&n.forEach((function(n,a){var l=o[a];if(!(l&&l>n))return!1;var c=n-s,u=l-s,d=document.createElement("div");d.className+="hg-button-container";var p="".concat(i.options.layoutName,"-r").concat(e,"c").concat(a);d.setAttribute("data-skUID",p);var f=r.splice(c,u-c+1);s=u-c,f.forEach((function(t){return d.appendChild(t)})),r.splice(c,0,d),t.innerHTML="",r.forEach((function(e){return t.appendChild(e)})),i.options.debug&&console.log("rowDOMContainer",f,c,u,s+1)})),t}},{key:"render",value:function(){var t=this;this.clear(),this.initialized||this.beforeFirstRender(),this.beforeRender();var e="hg-layout-".concat(this.options.layoutName),n=this.options.layout||{default:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","{lock} a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}",".com @ {space}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'{lock} A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}",".com @ {space}"]},o=this.options.useTouchEvents||!1,i=o?"hg-touch-events":"",r=this.options.useMouseEvents||!1,s=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,e,this.keyboardPluginClasses,i),n[this.options.layoutName].forEach((function(e,n){var i=e.split(" "),a=document.createElement("div");a.className+="hg-row";var l=[],c=[];i.forEach((function(e,i){var u,d=!s&&"string"==typeof e&&e.length>1&&0===e.indexOf("["),p=!s&&"string"==typeof e&&e.length>1&&e.indexOf("]")===e.length-1;d&&(l.push(i),e=e.replace(/\[/g,"")),p&&(c.push(i),e=e.replace(/\]/g,""));var h=t.utilities.getButtonClass(e),y=t.utilities.getButtonDisplayName(e,t.options.display,t.options.mergeDisplay),m=t.options.useButtonTag?"button":"div",g=document.createElement(m);g.className+="hg-button ".concat(h),(u=g.classList).add.apply(u,f(t.getButtonThemeClasses(e))),t.setDOMButtonAttributes(e,(function(t,e){g.setAttribute(t,e)})),t.activeButtonClass="hg-activeButton",!t.utilities.pointerEventsSupported()||o||r?o?(g.ontouchstart=function(n){t.handleButtonClicked(e),t.handleButtonMouseDown(e,n)},g.ontouchend=function(n){t.handleButtonMouseUp(e,n)},g.ontouchcancel=function(n){t.handleButtonMouseUp(e,n)}):(g.onclick=function(){t.isMouseHold=!1,t.handleButtonClicked(e)},g.onmousedown=function(n){t.handleButtonMouseDown(e,n)},g.onmouseup=function(n){t.handleButtonMouseUp(e,n)}):(g.onpointerdown=function(n){t.handleButtonClicked(e),t.handleButtonMouseDown(e,n)},g.onpointerup=function(n){t.handleButtonMouseUp(e,n)},g.onpointercancel=function(n){t.handleButtonMouseUp(e,n)}),g.setAttribute("data-skBtn",e);var v="".concat(t.options.layoutName,"-r").concat(n,"b").concat(i);g.setAttribute("data-skBtnUID",v);var b=document.createElement("span");b.innerHTML=y,g.appendChild(b),t.buttonElements[e]||(t.buttonElements[e]=[]),t.buttonElements[e].push(g),a.appendChild(g)})),a=t.parseRowDOMContainers(a,n,l,c),t.keyboardDOM.appendChild(a)})),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||o||r?o?(document.ontouchend=function(){return t.handleButtonMouseUp()},document.ontouchcancel=function(){return t.handleButtonMouseUp()},this.keyboardDOM.ontouchstart=function(e){return t.handleKeyboardContainerMouseDown(e)}):o||(document.onmouseup=function(){return t.handleButtonMouseUp()},this.keyboardDOM.onmousedown=function(e){return t.handleKeyboardContainerMouseDown(e)}):(document.onpointerup=function(){return t.handleButtonMouseUp()},this.keyboardDOM.onpointerdown=function(e){return t.handleKeyboardContainerMouseDown(e)}),this.onInit())}}])&&m(e.prototype,n),t}();e.default=v}])},"object"==typeof n&&"object"==typeof e?e.exports=i():"function"==typeof define&&define.amd?define("SimpleKeyboard",[],i):"object"==typeof n?n.SimpleKeyboard=i():o.SimpleKeyboard=i()},{}],139:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Build=void 0,n.Build={short:"0.73.5",version:"0.73.5 (30edf4d38a4cb6b03e735ccab8f0ab95)",buildSeed:1654243824812}},{}],140:[function(t,e,n){"use strict";t("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.deprecatedButton=n.createButton=void 0;const o=t("../dom/keys"),i=t("../dom/pointer"),r=function(){const t={};for(const e of Object.keys(o.namedKeyCodes))t[o.namedKeyCodes[e]]=e.substr(4,2);return t}();function s(t,e,n){const o=Math.round(.6*n),r=Math.round(.5*n),s=Math.max(1,Math.round(n/20)),l=h[t.toLowerCase()],c=void 0===l?t:"",u=a("emulator-button-touch-zone"),d=a("emulator-button"),p=a("emulator-button-text",void 0===l?void 0===c||0===c.length?"□":c.substr(0,1).toUpperCase():"");void 0!==l&&(d.style.backgroundImage='url("'+l+'")'),d.style.width=o+"px",d.style.height=o+"px",p.style.fontSize=r+"px",u.widthPx=n-2*s,u.heightPx=n-2*s,u.style.width=u.widthPx+"px",u.style.height=u.heightPx+"px",u.style.borderWidth=s+"px",u.appendChild(d),u.appendChild(p);const f=t=>{void 0!==e.onDown&&e.onDown(),void 0!==e.onClick&&e.onClick(),t.stopPropagation(),t.preventDefault()},y=t=>{void 0!==e.onUp&&e.onUp(),t.stopPropagation(),t.preventDefault()},m=t=>{t.stopPropagation(),t.preventDefault()},g={capture:!0};for(const t of i.pointer.starters)u.addEventListener(t,f,g);for(const t of i.pointer.enders)u.addEventListener(t,y,g);for(const t of i.pointer.changers)u.addEventListener(t,m,g);for(const t of i.pointer.leavers)u.addEventListener(t,m,g);for(const t of i.pointer.prevents)u.addEventListener(t,m,g);return u}function a(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.innerHTML=e),n}function l(t){return"number"==typeof t?r[t]:t}function c(t,e){return"click"===t.action?{onClick:()=>e.fireKeyPress(t.mapTo)}:{onDown:()=>e.fireKeyDown(t.mapTo),onUp:()=>e.fireKeyUp(t.mapTo)}}n.createButton=s,n.deprecatedButton=function(t,e,n,i){const r=Math.round(i/4),a=[];for(const e of n){if(e.mapTo===o.KBD_NONE)continue;const n=s((e.symbol||l(e.mapTo)).toUpperCase(),c(e,t),i);n.style.position="absolute";const u=e.style;if(u)for(const t of Object.keys(u))n.style[t]=u[t];if(void 0!==e.position){const t=e.position.left,o=e.position.top,s=e.position.bottom,a=e.position.right;void 0!==t&&(n.style.left=r*t+i*(t-1)+"px"),void 0!==a&&(n.style.right=r*a+i*(a-1)+"px"),void 0!==o&&(n.style.top=r*o+i*(o-1)+"px"),void 0!==s&&(n.style.bottom=r*s+i*(s-1)+"px")}t.mouseOverlay.appendChild(n),a.push(n)}return()=>{for(const e of a)e.parentElement===t.mouseOverlay&&t.mouseOverlay.removeChild(e)}};const u="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg version='1.1' id='Layer_1' xmlns:sketch='http://www.bohemiancoding.com/sketch/ns' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 20 20' fill='%23FFF' enable-background='new 0 0 20 20' xml:space='preserve'%3E%3Ctitle%3EShape%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cg id='Page-1' sketch:type='MSPage'%3E%3Cg id='Artboard-1' transform='translate(-3.000000, -1.000000)' sketch:type='MSArtboardGroup'%3E%3Cpath id='Shape' sketch:type='MSShapeGroup' d='M19,12c-0.3,0-0.5,0.1-0.7,0.3L14,16.6V3c0-0.5-0.4-1-1-1s-1,0.5-1,1v13.6 l-4.3-4.3C7.5,12.1,7.3,12,7,12c-0.5,0-1,0.4-1,1c0,0.3,0.1,0.5,0.3,0.7l6,6c0.2,0.2,0.4,0.3,0.7,0.3s0.5-0.1,0.7-0.3l6-6 c0.2-0.2,0.3-0.4,0.3-0.7C20,12.4,19.5,12,19,12L19,12z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E",d="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 20 20' enable-background='new 0 0 20 20' fill='%23FFF' xml:space='preserve'%3E%3Cg id='left_arrow_1_'%3E%3Cg%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18,9H4.41l4.29-4.29C8.89,4.53,9,4.28,9,4c0-0.55-0.45-1-1-1 C7.72,3,7.47,3.11,7.29,3.29l-6,6C1.11,9.47,1,9.72,1,10c0,0.28,0.11,0.53,0.29,0.71l6,6C7.47,16.89,7.72,17,8,17 c0.55,0,1-0.45,1-1c0-0.28-0.11-0.53-0.29-0.71L4.41,11H18c0.55,0,1-0.45,1-1C19,9.45,18.55,9,18,9z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E",p="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' fill='%23fff' viewBox='0 0 20 20' enable-background='new 0 0 20 20' xml:space='preserve'%3E%3Cg id='right_arrow_1_'%3E%3Cg%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18.71,9.29l-6-6C12.53,3.11,12.28,3,12,3c-0.55,0-1,0.45-1,1 c0,0.28,0.11,0.53,0.29,0.71L15.59,9H2c-0.55,0-1,0.45-1,1c0,0.55,0.45,1,1,1h13.59l-4.29,4.29C11.11,15.47,11,15.72,11,16 c0,0.55,0.45,1,1,1c0.28,0,0.53-0.11,0.71-0.29l6-6C18.89,10.53,19,10.28,19,10C19,9.72,18.89,9.47,18.71,9.29z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E",f="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' fill='%23fff' viewBox='0 0 20 20' enable-background='new 0 0 20 20' xml:space='preserve'%3E%3Cg id='key_enter_1_'%3E%3Cg%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18,2c-0.55,0-1,0.45-1,1v5c0,2.21-1.79,4-4,4H4.41l2.29-2.29 C6.89,9.53,7,9.28,7,9c0-0.55-0.45-1-1-1C5.72,8,5.47,8.11,5.29,8.29l-4,4C1.11,12.47,1,12.72,1,13c0,0.28,0.11,0.53,0.29,0.71 l4,4C5.47,17.89,5.72,18,6,18c0.55,0,1-0.45,1-1c0-0.28-0.11-0.53-0.29-0.71L4.41,14H13c3.31,0,6-2.69,6-6V3C19,2.45,18.55,2,18,2 z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E",h={fullscreen:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 16 16' enable-background='new 0 0 16 16' xml:space='preserve'%3E%3Cg id='maximize_1_' fill='%23FFFFFF'%3E%3Cg%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M5.99,8.99c-0.28,0-0.53,0.11-0.71,0.29l-3.29,3.29v-1.59c0-0.55-0.45-1-1-1 s-1,0.45-1,1v4c0,0.55,0.45,1,1,1h4c0.55,0,1-0.45,1-1s-0.45-1-1-1H3.41L6.7,10.7c0.18-0.18,0.29-0.43,0.29-0.71 C6.99,9.44,6.54,8.99,5.99,8.99z M14.99-0.01h-4c-0.55,0-1,0.45-1,1s0.45,1,1,1h1.59L9.28,5.29C9.1,5.47,8.99,5.72,8.99,5.99 c0,0.55,0.45,1,1,1c0.28,0,0.53-0.11,0.71-0.29l3.29-3.29v1.59c0,0.55,0.45,1,1,1s1-0.45,1-1v-4C15.99,0.44,15.54-0.01,14.99-0.01 z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E",save:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 16 16' enable-background='new 0 0 16 16' fill='%23FFFFFF' xml:space='preserve'%3E%3Cg id='floppy_disk'%3E%3Cg%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15.71,2.29l-2-2C13.53,0.11,13.28,0,13,0h-1v6H4V0H1C0.45,0,0,0.45,0,1v14 c0,0.55,0.45,1,1,1h14c0.55,0,1-0.45,1-1V3C16,2.72,15.89,2.47,15.71,2.29z M14,15H2V9c0-0.55,0.45-1,1-1h10c0.55,0,1,0.45,1,1V15 z M11,1H9v4h2V1z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A",options:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 20 20' enable-background='new 0 0 20 20' fill='%23FFF' xml:space='preserve'%3E%3Cg id='cog_2_'%3E%3Cg%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M19,8h-2.31c-0.14-0.46-0.33-0.89-0.56-1.3l1.7-1.7c0.39-0.39,0.39-1.02,0-1.41 l-1.41-1.41c-0.39-0.39-1.02-0.39-1.41,0l-1.7,1.7c-0.41-0.22-0.84-0.41-1.3-0.55V1c0-0.55-0.45-1-1-1H9C8.45,0,8,0.45,8,1v2.33 C7.52,3.47,7.06,3.67,6.63,3.91L5,2.28c-0.37-0.37-0.98-0.37-1.36,0L2.28,3.64C1.91,4.02,1.91,4.63,2.28,5l1.62,1.62 C3.66,7.06,3.46,7.51,3.31,8H1C0.45,8,0,8.45,0,9v2c0,0.55,0.45,1,1,1h2.31c0.14,0.46,0.33,0.89,0.56,1.3L2.17,15 c-0.39,0.39-0.39,1.02,0,1.41l1.41,1.41c0.39,0.39,1.02,0.39,1.41,0l1.7-1.7c0.41,0.22,0.84,0.41,1.3,0.55V19c0,0.55,0.45,1,1,1h2 c0.55,0,1-0.45,1-1v-2.33c0.48-0.14,0.94-0.35,1.37-0.59L15,17.72c0.37,0.37,0.98,0.37,1.36,0l1.36-1.36 c0.37-0.37,0.37-0.98,0-1.36l-1.62-1.62c0.24-0.43,0.45-0.89,0.6-1.38H19c0.55,0,1-0.45,1-1V9C20,8.45,19.55,8,19,8z M10,14 c-2.21,0-4-1.79-4-4c0-2.21,1.79-4,4-4s4,1.79,4,4C14,12.21,12.21,14,10,14z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E",keyboard:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 16 16' enable-background='new 0 0 16 16' xml:space='preserve'%3E%3Cg id='manually_entered_data_2_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' fill-rule='evenodd' clip-rule='evenodd' d='M1,8h3.76l2-2H1C0.45,6,0,6.45,0,7C0,7.55,0.45,8,1,8z M15.49,3.99 C15.8,3.67,16,3.23,16,2.75C16,1.78,15.22,1,14.25,1c-0.48,0-0.92,0.2-1.24,0.51l-1.44,1.44l2.47,2.47L15.49,3.99z M1,4h7.76l2-2 H1C0.45,2,0,2.45,0,3C0,3.55,0.45,4,1,4z M1,10c-0.55,0-1,0.45-1,1c0,0.48,0.35,0.86,0.8,0.96L2.76,10H1z M10.95,3.57l-6.69,6.69 l2.47,2.47l6.69-6.69L10.95,3.57z M15.2,6.04L13.24,8H15c0.55,0,1-0.45,1-1C16,6.52,15.65,6.14,15.2,6.04z M2,15l3.86-1.39 l-2.46-2.44L2,15z M15,10h-3.76l-2,2H15c0.55,0,1-0.45,1-1C16,10.45,15.55,10,15,10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E",up:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg version='1.1' id='Layer_1' xmlns:sketch='http://www.bohemiancoding.com/sketch/ns' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 20 20' fill='%23FFF' enable-background='new 0 0 20 20' xml:space='preserve'%3E%3Ctitle%3EShape%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cg id='Page-1' sketch:type='MSPage'%3E%3Cg id='Artboard-1' transform='translate(-3.000000, -1.000000)' sketch:type='MSArtboardGroup'%3E%3Cpath id='Shape' sketch:type='MSShapeGroup' d='M19.7,8.3l-6-6C13.5,2.1,13.3,2,13,2s-0.5,0.1-0.7,0.3l-6,6C6.1,8.5,6,8.7,6,9 c0,0.6,0.5,1,1,1c0.3,0,0.5-0.1,0.7-0.3L12,5.4V19c0,0.5,0.4,1,1,1s1-0.5,1-1V5.4l4.3,4.3C18.5,9.9,18.7,10,19,10c0.5,0,1-0.4,1-1 C20,8.7,19.9,8.5,19.7,8.3L19.7,8.3z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E",down:u,do:u,dw:u,dwn:u,left:d,le:d,lft:d,right:p,ri:p,rght:p,rgh:p,enter:f,en:f,enr:f,ent:f,entr:f}},{"../dom/keys":154,"../dom/pointer":158,"core-js/modules/web.dom-collections.iterator.js":124}],141:[function(t,e,n){"use strict";function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(n,"__esModule",{value:!0}),n.getGrid=void 0,n.getGrid=function(t){switch(t){case"square":return function(){class t{constructor(){o(this,"aspect",.625)}getConfiguration(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const o=this.getCols(),i=this.getRows(),r=Math.floor(o/2),s=Math.floor(i/2),a=5*t/100/2,l=a,c=(t-2*a)/o*n,u=(e-2*l)/i*n,d=Math.min(c,u),p=[];for(let n=0;n<i;++n){const c=[];for(let u=0;u<o;++u)c.push({centerX:u<r?a+d*(u+.5):t-a-d*(o-u-1+.5),centerY:n<s?l+d*(n+.5):e-l-d*(i-n-1+.5)});p.push(c)}return{gridType:"square",cells:p,columnWidth:d,rowHeight:d,columnsPadding:a,rowsPadding:l,width:t,height:e}}getCols(){return 10}getRows(){return Math.floor(this.getCols()*this.aspect)+1}}return new t}();case"honeycomb":return function(){class t{constructor(){o(this,"aspect",.625)}getConfiguration(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const o=this.getCols(),i=this.getRows(),r=Math.floor(o/2),s=Math.floor(i/2),a=5*t/100/2,l=a,c=(t-2*a)/o*n,u=(e-2*l)/i*n,d=Math.min(c,u),p=[];for(let n=0;n<i;++n){const c=[],u=n%2==0?o:o-1,f=n%2==0?0:d/2;for(let p=0;p<u;++p)c.push({centerX:p<r?f+a+d*(p+.5):f+t-a-d*(o-p-1+.5),centerY:n<s?l+d*(n+.5):e-l-d*(i-n-1+.5)});p.push(c)}return{gridType:"honeycomb",cells:p,columnWidth:d,rowHeight:d,columnsPadding:a,rowsPadding:l,width:t,height:e}}getCols(){return 10}getRows(){return Math.floor(this.getCols()*this.aspect)+1}}return new t}()}throw new Error("Unknown grid type "+t)}},{}],142:[function(t,e,n){"use strict";t("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.keyboard=void 0,n.keyboard=function(t,e,n){const o=n||{};function i(t){return void 0!==o[t]?o[t]:t}return t.setOnKeyDown((t=>{e.sendKeyEvent(i(t),!0)})),t.setOnKeyUp((t=>{e.sendKeyEvent(i(t),!1)})),t.setOnKeyPress((t=>{e.simulateKeyPress(i(t))})),t.setOnKeysPress((t=>{e.simulateKeyPress(...t)})),()=>{t.setOnKeyDown((t=>{})),t.setOnKeyUp((t=>{})),t.setOnKeyPress((t=>{})),t.setOnKeysPress((t=>{}))}}},{"core-js/modules/web.dom-collections.iterator.js":124}],143:[function(t,e,n){"use strict";t("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.extractLayersConfig=void 0,n.extractLayersConfig=function(t){return void 0!==t.layersConfig?(1===t.layersConfig.version&&function(t){for(const e of t.layers)for(const t of e.controls)if("Key"===t.type){const e=t;"number"==typeof e.mapTo&&(e.mapTo=[e.mapTo])}}(t.layersConfig),t.layersConfig):void 0!==t.layers?t.layers:null}},{"core-js/modules/web.dom-collections.iterator.js":124}],144:[function(t,e,n){"use strict";t("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.initLayersControl=void 0;const o=t("./grid"),i=t("./button"),r=t("./keyboard"),s=t("./mouse/mouse-common"),a=t("./options"),l=t("../dom/pointer"),c=t("nipplejs");n.initLayersControl=function(t,e,n,i,a,l,c){let p=e.layers[0];if(void 0!==c)for(const t of e.layers)if(t.title===c){p=t;break}return function(t,e,n,i,a,l){const c=(0,r.keyboard)(e,n),p=(0,s.mouse)(i.autolock,i.sensitivity,e,n),f=[];function y(r,s){var c;for(const t of f)t();f.splice(0,f.length);const p=(0,o.getGrid)(t.grid).getConfiguration(r,s,l),y=new u;for(const e of t.controls){const{row:t,column:n,type:o}=e;"NippleActivator"===o&&h(p,t,n)}let m=-1;if(0===(null===(c=e.options.optionControls)||void 0===c?void 0:c.length))for(const e of t.controls){const{row:t,type:n}=e;if("Options"===n){m=t;break}}const g={};if(a)for(const e of t.controls){const{row:t}=e;let n=e.column;const o=p.cells[t].length,i=o/2;t===m&&n>=i&&(n=Math.min(n+1,o-1)),void 0===g[t]&&(g[t]={leftStart:i,leftEnd:0,rightStart:o-1,rightEnd:i}),n<i?(g[t].leftStart=Math.min(g[t].leftStart,n),g[t].leftEnd=Math.max(g[t].leftEnd,n)):(g[t].rightStart=Math.min(g[t].rightStart,n),g[t].rightEnd=Math.max(g[t].rightEnd,n))}for(const o of t.controls){const t=d[o.type];if(void 0===t){console.error("Factory for control '"+o.type+"' is not defined");continue}const r={...o},s=p.cells[o.row].length,l=s/2;if(m===o.row&&o.column>=l&&(r.column=Math.min(r.column+1,s-1)),a){const{leftStart:t,leftEnd:e,rightStart:n,rightEnd:o}=g[r.row],i=r.column<l;i?r.column+=l+(l-e)-t-1:r.column-=l+(n-l)-(s-o)+1,r.column>=s?(console.error("Column",r.column,"is out of bound",s,i?"[leftSide]":"[rightSide]",g),r.column=s-1):r.column<0&&(console.error("Column",r.column,"is out of bound",0,i?"[leftSide]":"[rightSide]",g),r.column=0)}const c=t(r,e,n,p,y,i);f.push(c)}}return e.addOnResize(y),y(e.width,e.height),()=>{e.removeOnResize(y),c(),p();for(const t of f)t()}}(p,t,n,i,a,l)};class u{constructor(){var t,e,n;n={},(e="sensors")in(t=this)?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}activate(t,e){const n=this.sensors[e+"_"+t];void 0!==n&&n.activate()}deactivate(t,e){const n=this.sensors[e+"_"+t];void 0!==n&&n.deactivate()}register(t,e,n){this.sensors[e+"_"+t]=n}}const d={Key:function(t,e,n,o,r,s){const{cells:a,columnWidth:l}=o,{row:c,column:u}=t,{centerX:d,centerY:p}=a[c][u],h={onDown:()=>{for(const e of t.mapTo)n.sendKeyEvent(e,!0)},onUp:()=>{for(const e of t.mapTo)n.sendKeyEvent(e,!1)}};if(r.register(c,u,{activate:h.onDown,deactivate:h.onUp}),f(o,c,u))return()=>{};const y=(0,i.createButton)(t.symbol,h,l);return y.style.position="absolute",y.style.left=d-y.widthPx/2+"px",y.style.top=p-y.heightPx/2+"px",e.mouseOverlay.appendChild(y),()=>e.mouseOverlay.removeChild(y)},Options:function(t,e,n,o,i,r){var s;if(0===(null===(s=e.options.optionControls)||void 0===s?void 0:s.length))return()=>{};if(void 0!==e.options.optionControls&&1===e.options.optionControls.length&&"keyboard"===e.options.optionControls[0])return p(t,e,n,o,i,r);const{cells:l,columnWidth:c,rowHeight:u}=o,{row:d,column:f}=t,{centerX:h,centerY:y}=l[d][f],m=y-u/2,g=h-c/2,v=o.width-g-c;return(0,a.options)(e,["default"],(()=>{}),c,m,v)},Keyboard:p,Switch:function(t,e,n,o,r,s){const{cells:a,columnWidth:l}=o,{row:c,column:u}=t,{centerX:d,centerY:p}=a[c][u],f=(0,i.createButton)(t.symbol,{onUp:()=>s.setLayersConfig(s.getLayersConfig(),t.layerName)},l);return f.style.position="absolute",f.style.left=d-f.widthPx/2+"px",f.style.top=p-f.heightPx/2+"px",e.mouseOverlay.appendChild(f),()=>{e.mouseOverlay.removeChild(f)}},ScreenMove:function(t,e,n,o,r,s){const{cells:a,columnWidth:l}=o,{row:c,column:u}=t,{centerX:d,centerY:p}=a[c][u];let h=.5,y=.5;t.direction.indexOf("up")>=0&&(y=0);t.direction.indexOf("down")>=0&&(y=1);t.direction.indexOf("left")>=0&&(h=0);t.direction.indexOf("right")>=0&&(h=1);const m={onDown:()=>{n.sendMouseMotion(h,y)},onUp:()=>{n.sendMouseMotion(.5,.5)}};if(r.register(c,u,{activate:m.onDown,deactivate:m.onUp}),f(o,c,u))return()=>{};const g=(0,i.createButton)(t.symbol,m,l);return g.style.position="absolute",g.style.left=d-g.widthPx/2+"px",g.style.top=p-g.heightPx/2+"px",e.mouseOverlay.appendChild(g),()=>e.mouseOverlay.removeChild(g)},PointerButton:function(t,e,n,o,r,s){const{cells:a,columnWidth:l}=o,{row:c,column:u,click:d}=t,{centerX:p,centerY:h}=a[c][u],y={onDown:()=>{d?n.sendMouseButton(t.button,!0):e.pointerButton=t.button},onUp:()=>{d?n.sendMouseButton(t.button,!1):e.pointerButton=0}};if(r.register(c,u,{activate:y.onDown,deactivate:y.onUp}),f(o,c,u))return()=>{};const m=(0,i.createButton)(t.symbol,y,l);return m.style.position="absolute",m.style.left=p-m.widthPx/2+"px",m.style.top=h-m.heightPx/2+"px",e.mouseOverlay.appendChild(m),()=>e.mouseOverlay.removeChild(m)},PointerMove:function(t,e,n,o,r,s){const{cells:a,columnWidth:l}=o,{row:c,column:u,x:d,y:p}=t,{centerX:h,centerY:y}=a[c][u],m={onDown:()=>{n.sendMouseMotion(d,p)},onUp:()=>{n.sendMouseMotion(d,p)}};if(r.register(c,u,{activate:m.onDown,deactivate:m.onUp}),f(o,c,u))return()=>{};const g=(0,i.createButton)(t.symbol,m,l);return g.style.position="absolute",g.style.left=h-g.widthPx/2+"px",g.style.top=y-g.heightPx/2+"px",e.mouseOverlay.appendChild(g),()=>e.mouseOverlay.removeChild(g)},PointerReset:function(t,e,n,o,r,s){const{cells:a,columnWidth:l}=o,{row:c,column:u}=t,{centerX:d,centerY:p}=a[c][u],h={onDown:()=>{n.sendMouseSync()}};if(r.register(c,u,{activate:h.onDown,deactivate:()=>{}}),f(o,c,u))return()=>{};const y=(0,i.createButton)(t.symbol,h,l);return y.style.position="absolute",y.style.left=d-y.widthPx/2+"px",y.style.top=p-y.heightPx/2+"px",e.mouseOverlay.appendChild(y),()=>e.mouseOverlay.removeChild(y)},PointerToggle:function(t,e,n,o,r,s){const{cells:a,columnWidth:l}=o,{row:c,column:u}=t,{centerX:d,centerY:p}=a[c][u],h={onDown:()=>{e.pointerDisabled=!e.pointerDisabled,e.pointerDisabled?y.classList.contains("emulator-button-highlight")||y.classList.add("emulator-button-highlight"):y.classList.remove("emulator-button-highlight")}};if(r.register(c,u,{activate:h.onDown,deactivate:()=>{}}),f(o,c,u))return()=>{};const y=(0,i.createButton)(t.symbol,h,l);return y.style.position="absolute",y.style.left=d-y.widthPx/2+"px",y.style.top=p-y.heightPx/2+"px",e.mouseOverlay.appendChild(y),()=>e.mouseOverlay.removeChild(y)},NippleActivator:function(t,e,n,o,i,r){const{cells:s,columnWidth:a,rowHeight:u,width:d,height:p}=o,{row:f,column:h}=t,{centerX:y,centerY:m}=s[f][h],g=document.createElement("div"),v=1.5,b=Math.max(0,y-a*v),_=Math.max(0,m-u*v),w=Math.max(0,d-y-a*v),D=Math.max(0,p-m-u*v);g.style.position="absolute",g.style.zIndex="999",g.style.left=b+"px",g.style.top=_+"px",g.style.right=w+"px",g.style.bottom=D+"px",e.mouseOverlay.appendChild(g);const B=c.create({zone:g,multitouch:!1,maxNumberOfNipples:1,mode:"static",follow:!1,dynamicPage:!0,size:1.5*Math.max(a,u),position:{left:(d-w-b)/2+"px",top:(p-D-_)/2+"px"}});let k=-1,x=-1;B.on("move",((t,e)=>{if(e.distance<10)return i.deactivate(x,k),k=-1,void(x=-1);let n=-1,o=-1;const r=22.5,s=e.angle.degree;s>r&&s<=67.5?(n=h+1,o=f-1):s>67.5&&s<=112.5?(n=h,o=f-1):s>112.5&&s<=157.5?(n=h-1,o=f-1):s>157.5&&s<=202.5?(n=h-1,o=f):s>202.5&&s<=247.5?(n=h-1,o=f+1):s>247.5&&s<=292.5?(n=h,o=f+1):s>292.5&&s<=337.5?(n=h+1,o=f+1):(n=h+1,o=f),k===n&&x===o||(i.deactivate(x,k),i.activate(o,n),k=n,x=o)}));let K=!1;B.on("start",(()=>{K=!0})),B.on("end",(()=>{K=!1,i.deactivate(x,k),x=-1,k=-1}));const C={capture:!0};function E(t){K&&B.processOnEnd(t)}for(const t of l.pointer.enders)e.mouseOverlay.addEventListener(t,E,C);return()=>{B.destroy(),e.mouseOverlay.removeChild(g);for(const t of l.pointer.enders)e.mouseOverlay.removeEventListener(t,E,C)}}};function p(t,e,n,o,r,s){const{cells:a,columnWidth:l}=o,{row:c,column:u}=t,{centerX:d,centerY:p}=a[c][u],f=(0,i.createButton)("keyboard",{onUp:()=>e.toggleKeyboard()},l),h=t=>{t?f.children[0].classList.add("emulator-control-close-icon"):f.children[0].classList.remove("emulator-control-close-icon")};return e.setOnKeyboardVisibility(h),f.style.position="absolute",f.style.left=d-f.widthPx/2+"px",f.style.top=p-f.heightPx/2+"px",e.mouseOverlay.appendChild(f),()=>{e.mouseOverlay.removeChild(f),e.removeOnKeyboardVisibility(h)}}function f(t,e,n){return!0===t.cells[e][n].hidden}function h(t,e,n){function o(o,i){if((o!==e||i!==n)&&o>=0&&o<t.cells.length){const e=t.cells[o];i>=0&&i<e.length&&(e[i].hidden=!0)}}for(let t=e-1;t<=e+1;++t)for(let e=n-1;e<=n+1;++e)o(t,e)}},{"../dom/pointer":158,"./button":140,"./grid":141,"./keyboard":142,"./mouse/mouse-common":146,"./options":152,"core-js/modules/web.dom-collections.iterator.js":124,nipplejs:136}],145:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.initLegacyLayersControl=void 0;const o=t("./button"),i=t("./mouse/mouse-common"),r=t("./nipple"),s=t("./options"),a=t("./keyboard");n.initLegacyLayersControl=function(t,e,n,l){var c;const u=Object.keys(n),d={keyboard:()=>{},mouse:()=>{},gestures:()=>{},buttons:()=>{}},p=s=>{d.keyboard(),d.mouse(),d.gestures(),d.buttons(),d.keyboard=()=>{},d.mouse=()=>{},d.gestures=()=>{},d.buttons=()=>{};const c=n[s];void 0!==c&&(d.keyboard=(0,a.keyboard)(e,l,c.mapper),void 0!==c.gestures&&c.gestures.length>0?d.gestures=(0,r.nipple)(e,l,c.gestures):d.mouse=(0,i.mouse)(t.autolock,t.sensitivity,e,l),void 0!==c.buttons&&c.buttons.length&&(d.buttons=(0,o.deprecatedButton)(e,l,c.buttons,54)))},f=0===(null===(c=e.options.optionControls)||void 0===c?void 0:c.length)?()=>{}:(0,s.options)(e,u,p,54,13.5,0);return p("default"),()=>{d.gestures(),d.buttons(),d.mouse(),d.keyboard(),f()}}},{"./button":140,"./keyboard":142,"./mouse/mouse-common":146,"./nipple":150,"./options":152}],146:[function(t,e,n){"use strict";t("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.mouse=n.mount=n.mapXY=void 0;const o=t("../../dom/pointer"),i=t("./mouse-swipe"),r=t("./mouse-not-locked"),s=t("./mouse-locked"),a=.01;n.mapXY=function(t,e,n,o){const i=n.width(),r=n.height(),s=o.width,l=o.height,c=i/r;let u=s,d=s/c;d>l&&(d=l,u=l*c);const p=(l-d)/2,f=(s-u)/2;let h=Math.max(0,Math.min(1,(t-f)/u)),y=Math.max(0,Math.min(1,(e-p)/d));return h<=a&&(h=0),h>=.99&&(h=1),y<=a&&(y=0),y>=.99&&(y=1),{x:h,y:y}},n.mount=function(t,e,n,i,r,s){let a=0;const l=i=>{if(i.target!==t)return;if(e.pointerDisabled)return void i.stopPropagation();const r=(0,o.getPointerState)(i,t);a=r.button||e.pointerButton,n(r.x,r.y,a),i.stopPropagation()},c=n=>{if(n.target!==t)return;if(e.pointerDisabled)return void n.stopPropagation();const r=(0,o.getPointerState)(n,t);i(r.x,r.y,r.mX,r.mY),n.stopPropagation()},u=n=>{if(e.pointerDisabled)return void n.stopPropagation();const i=(0,o.getPointerState)(n,t);r(i.x,i.y,a),n.stopPropagation()},d=n=>{if(n.target!==t)return;if(e.pointerDisabled)return void n.stopPropagation();const i=(0,o.getPointerState)(n,t);s(i.x,i.y),n.stopPropagation()},p=t=>{t.stopPropagation()},f={capture:!1};for(const e of o.pointer.starters)t.addEventListener(e,l,f);for(const e of o.pointer.changers)t.addEventListener(e,c,f);for(const e of o.pointer.enders)t.addEventListener(e,u,f);for(const e of o.pointer.prevents)t.addEventListener(e,p,f);for(const e of o.pointer.leavers)t.addEventListener(e,d,f);return()=>{for(const e of o.pointer.starters)t.removeEventListener(e,l,f);for(const e of o.pointer.changers)t.removeEventListener(e,c,f);for(const e of o.pointer.enders)t.removeEventListener(e,u,f);for(const e of o.pointer.prevents)t.removeEventListener(e,p,f);for(const e of o.pointer.leavers)t.removeEventListener(e,d,f)}},n.mouse=function(t,e,n,a){return t&&!o.pointer.canLock?(0,i.mouseSwipe)(e,n,a):t?(0,s.mouseLocked)(e,n,a):(0,r.mouseNotLocked)(n,a)}},{"../../dom/pointer":158,"./mouse-locked":147,"./mouse-not-locked":148,"./mouse-swipe":149,"core-js/modules/web.dom-collections.iterator.js":124}],147:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mouseLocked=void 0;const o=t("./mouse-common");n.mouseLocked=function(t,e,n){const i=e.mouseOverlay;function r(){return document.pointerLockElement!==i}return(0,o.mount)(i,e,(function(t,e,o){if(r()){(i.requestPointerLock||i.mozRequestPointerLock||i.webkitRequestPointerLock).call(i)}else n.sendMouseButton(o,!0)}),(function(e,o,i,s){r()||0===i&&0===s||n.sendMouseRelativeMotion(i*t,s*t)}),(function(t,e,o){r()||n.sendMouseButton(o,!1)}),(function(t,e){}))}},{"./mouse-common":146}],148:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mouseNotLocked=void 0;const o=t("./mouse-common");n.mouseNotLocked=function(t,e){const n=t.mouseOverlay,i=(n,i)=>(0,o.mapXY)(n,i,e,t);return document.pointerLockElement===n&&document.exitPointerLock(),(0,o.mount)(n,t,(function(t,n,o){const r=i(t,n);e.sendMouseMotion(r.x,r.y),e.sendMouseButton(o,!0)}),(function(t,n,o,r){const s=i(t,n);e.sendMouseMotion(s.x,s.y)}),(function(t,n,o){const r=i(t,n);e.sendMouseMotion(r.x,r.y),e.sendMouseButton(o,!1)}),(function(t,n){const o=i(t,n);e.sendMouseMotion(o.x,o.y)}))}},{"./mouse-common":146}],149:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mouseSwipe=void 0;const o=t("./mouse-common");n.mouseSwipe=function(t,e,n){const i=e.mouseOverlay;let r=-1,s=0,a=0,l=0;return(0,o.mount)(i,e,((t,e)=>{r=Date.now(),s=0,a=t,l=e}),(function(e,o,i,r){void 0===i&&(i=e-a),void 0===r&&(r=o-l),a=e,l=o,0===i&&0===r||(s+=Math.abs(i)+Math.abs(r),n.sendMouseRelativeMotion(i*t*2,r*t*2))}),((t,o)=>{if(Date.now()-r<500&&s<50){const t=e.pointerButton||0;n.sendMouseButton(t,!0),setTimeout((()=>n.sendMouseButton(t,!1)),60)}}),(()=>{}))}},{"./mouse-common":146}],150:[function(t,e,n){"use strict";t("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.nipple=void 0;const o=t("nipplejs"),i=t("../dom/keys");n.nipple=function(t,e,n){const r=o.create({zone:t.mouseOverlay,multitouch:!0,maxNumberOfNipples:2});let s=-1;const a=()=>{-1!==s&&(t.fireKeyUp(s),s=-1)},l={},c={},u={};for(const e of n)"end:release"===e.event?l[e.joystickId]=!0:e.mapTo!==i.KBD_NONE&&("tap"===e.event?c[e.joystickId]=e.mapTo:r.on(e.event,(()=>{var n;u[e.joystickId]=Date.now(),a(),n=e.mapTo,t.fireKeyDown(n),s=n})));const d={};return r.on("start",(()=>{const t=r.ids.length-1;d[t]=Date.now()})),r.on("end",(()=>{const e=r.ids.length-1,n=Date.now()-d[e];!0===l[e]&&a(),c[e]&&n<500&&u[e]<d[e]&&t.fireKeyPress(c[e])})),()=>r.destroy()}},{"../dom/keys":154,"core-js/modules/web.dom-collections.iterator.js":124,nipplejs:136}],151:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.initNullLayersControl=void 0;const o=t("./keyboard"),i=t("./mouse/mouse-common"),r=t("./options");n.initNullLayersControl=function(t,e,n){var s;const a=(0,o.keyboard)(e,n),l=(0,i.mouse)(t.autolock,t.sensitivity,e,n),c=0===(null===(s=e.options.optionControls)||void 0===s?void 0:s.length)?()=>{}:(0,r.options)(e,["default"],(()=>{}),54,13.5,0);return()=>{a(),l(),c()}}},{"./keyboard":142,"./mouse/mouse-common":146,"./options":152}],152:[function(t,e,n){"use strict";t("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.options=void 0;const o=t("./button"),i=t("../dom/helpers");function r(t,e){if(t.length<=1)return document.createElement("div");const n=document.createElement("select");n.classList.add("emulator-control-select");for(const e of t){const t=document.createElement("option");t.value=e,t.innerHTML=e,n.appendChild(t)}return n.onchange=t=>{const n=t.target.value;e(n)},(0,i.stopPropagation)(n,!1),n}n.options=function(t,e,n,s,a,l){const c=Math.round(s/4);let u=!1,d=!1;const p=()=>{const t=u?"flex":"none";for(const e of h)e!=y&&(e.style.display=t)},f=()=>{u=!u,!u&&d&&t.toggleKeyboard(),p()},h=[r(e,n),(0,o.createButton)("keyboard",{onClick:()=>{t.toggleKeyboard(),u&&!d&&(u=!1,p())}},s),(0,o.createButton)("save",{onClick:()=>{t.save(),u&&f()}},s),(0,o.createButton)("fullscreen",{onClick:()=>{t.toggleFullscreen(),u&&f()}},s),(0,o.createButton)("options",{onClick:f},s)],y=h[h.length-1],m=h[h.length-2].children[0],g=h[h.length-4].children[0],v=t=>{d=t,t?g.classList.add("emulator-control-close-icon"):g.classList.remove("emulator-control-close-icon")};t.setOnKeyboardVisibility(v),v(t.keyboardVisible),t.setOnFullscreen((t=>{t?m.classList.contains("emulator-control-exit-fullscreen-icon")||m.classList.add("emulator-control-exit-fullscreen-icon"):m.classList.remove("emulator-control-exit-fullscreen-icon")})),t.fullscreen&&m.classList.add("emulator-control-exit-fullscreen-icon");const b=(0,i.createDiv)("emulator-options"),_=d?"flex":"none";for(const t of h)t!==y&&t.classList.add("emulator-button-control"),t.style.marginRight=c+"px",t.style.marginBottom=c+"px",t!==y&&(t.style.display=_),b.appendChild(t);return b.style.position="absolute",b.style.right=l+"px",b.style.top=a+"px",t.mouseOverlay.appendChild(b),()=>{t.mouseOverlay.removeChild(b),t.setOnFullscreen((()=>{})),t.removeOnKeyboardVisibility(v)}}},{"../dom/helpers":153,"./button":140,"core-js/modules/web.dom-collections.iterator.js":124}],153:[function(t,e,n){"use strict";t("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.stopPropagation=n.createDiv=void 0;const o=t("./pointer");n.createDiv=function(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.innerHTML=e),n},n.stopPropagation=function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=t=>{t.stopPropagation()},i=t=>{t.stopPropagation(),e&&t.preventDefault()},r={capture:!1};for(const e of o.pointer.starters)t.addEventListener(e,n,r);for(const e of o.pointer.enders)t.addEventListener(e,n,r);for(const e of o.pointer.prevents)t.addEventListener(e,i,r)}},{"./pointer":158,"core-js/modules/web.dom-collections.iterator.js":124}],154:[function(t,e,n){"use strict";t("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.KBD_kp0=n.KBD_f12=n.KBD_f11=n.KBD_f10=n.KBD_f9=n.KBD_f8=n.KBD_f7=n.KBD_f6=n.KBD_f5=n.KBD_f4=n.KBD_f3=n.KBD_f2=n.KBD_f1=n.KBD_z=n.KBD_y=n.KBD_x=n.KBD_w=n.KBD_v=n.KBD_u=n.KBD_t=n.KBD_s=n.KBD_r=n.KBD_q=n.KBD_p=n.KBD_o=n.KBD_n=n.KBD_m=n.KBD_l=n.KBD_k=n.KBD_j=n.KBD_i=n.KBD_h=n.KBD_g=n.KBD_f=n.KBD_e=n.KBD_d=n.KBD_c=n.KBD_b=n.KBD_a=n.KBD_9=n.KBD_8=n.KBD_7=n.KBD_6=n.KBD_5=n.KBD_4=n.KBD_3=n.KBD_2=n.KBD_1=n.KBD_0=n.KBD_NONE=void 0,n.KBD_up=n.KBD_left=n.KBD_pagedown=n.KBD_end=n.KBD_delete=n.KBD_pageup=n.KBD_home=n.KBD_insert=n.KBD_pause=n.KBD_printscreen=n.KBD_slash=n.KBD_comma=n.KBD_period=n.KBD_quote=n.KBD_semicolon=n.KBD_rightbracket=n.KBD_leftbracket=n.KBD_backslash=n.KBD_equals=n.KBD_minus=n.KBD_grave=n.KBD_numlock=n.KBD_scrolllock=n.KBD_capslock=n.KBD_rightshift=n.KBD_leftshift=n.KBD_rightctrl=n.KBD_leftctrl=n.KBD_rightalt=n.KBD_leftalt=n.KBD_space=n.KBD_enter=n.KBD_backspace=n.KBD_tab=n.KBD_esc=n.KBD_kpenter=n.KBD_kpplus=n.KBD_kpminus=n.KBD_kpmultiply=n.KBD_kpdivide=n.KBD_kpperiod=n.KBD_kp9=n.KBD_kp8=n.KBD_kp7=n.KBD_kp6=n.KBD_kp5=n.KBD_kp4=n.KBD_kp3=n.KBD_kp2=n.KBD_kp1=void 0,n.domToKeyCode=n.keyCodesToDom=n.namedKeyCodes=n.domToKeyCodes=n.KBD_extra_lt_gt=n.KBD_right=n.KBD_down=void 0,n.KBD_NONE=0,n.KBD_0=48,n.KBD_1=49,n.KBD_2=50,n.KBD_3=51,n.KBD_4=52,n.KBD_5=53,n.KBD_6=54,n.KBD_7=55,n.KBD_8=56,n.KBD_9=57,n.KBD_a=65,n.KBD_b=66,n.KBD_c=67,n.KBD_d=68,n.KBD_e=69,n.KBD_f=70,n.KBD_g=71,n.KBD_h=72,n.KBD_i=73,n.KBD_j=74,n.KBD_k=75,n.KBD_l=76,n.KBD_m=77,n.KBD_n=78,n.KBD_o=79,n.KBD_p=80,n.KBD_q=81,n.KBD_r=82,n.KBD_s=83,n.KBD_t=84,n.KBD_u=85,n.KBD_v=86,n.KBD_w=87,n.KBD_x=88,n.KBD_y=89,n.KBD_z=90,n.KBD_f1=290,n.KBD_f2=291,n.KBD_f3=292,n.KBD_f4=293,n.KBD_f5=294,n.KBD_f6=295,n.KBD_f7=296,n.KBD_f8=297,n.KBD_f9=298,n.KBD_f10=299,n.KBD_f11=300,n.KBD_f12=301,n.KBD_kp0=320,n.KBD_kp1=321,n.KBD_kp2=322,n.KBD_kp3=323,n.KBD_kp4=324,n.KBD_kp5=325,n.KBD_kp6=326,n.KBD_kp7=327,n.KBD_kp8=328,n.KBD_kp9=329,n.KBD_kpperiod=330,n.KBD_kpdivide=331,n.KBD_kpmultiply=332,n.KBD_kpminus=333,n.KBD_kpplus=334,n.KBD_kpenter=335,n.KBD_esc=256,n.KBD_tab=258,n.KBD_backspace=259,n.KBD_enter=257,n.KBD_space=32,n.KBD_leftalt=342,n.KBD_rightalt=346,n.KBD_leftctrl=341,n.KBD_rightctrl=345,n.KBD_leftshift=340,n.KBD_rightshift=344,n.KBD_capslock=280,n.KBD_scrolllock=281,n.KBD_numlock=282,n.KBD_grave=96,n.KBD_minus=45,n.KBD_equals=61,n.KBD_backslash=92,n.KBD_leftbracket=91,n.KBD_rightbracket=93,n.KBD_semicolon=59,n.KBD_quote=39,n.KBD_period=46,n.KBD_comma=44,n.KBD_slash=47,n.KBD_printscreen=283,n.KBD_pause=284,n.KBD_insert=260,n.KBD_home=268,n.KBD_pageup=266,n.KBD_delete=261,n.KBD_end=269,n.KBD_pagedown=267,n.KBD_left=263,n.KBD_up=265,n.KBD_down=264,n.KBD_right=262,n.KBD_extra_lt_gt=348,n.domToKeyCodes={8:n.KBD_backspace,9:n.KBD_tab,13:n.KBD_enter,16:n.KBD_leftshift,17:n.KBD_leftctrl,18:n.KBD_leftalt,19:n.KBD_pause,27:n.KBD_esc,32:n.KBD_space,33:n.KBD_pageup,34:n.KBD_pagedown,35:n.KBD_end,36:n.KBD_home,37:n.KBD_left,38:n.KBD_up,39:n.KBD_right,40:n.KBD_down,45:n.KBD_insert,46:n.KBD_delete,48:n.KBD_0,49:n.KBD_1,50:n.KBD_2,51:n.KBD_3,52:n.KBD_4,53:n.KBD_5,54:n.KBD_6,55:n.KBD_7,56:n.KBD_8,57:n.KBD_9,59:n.KBD_semicolon,64:n.KBD_equals,65:n.KBD_a,66:n.KBD_b,67:n.KBD_c,68:n.KBD_d,69:n.KBD_e,70:n.KBD_f,71:n.KBD_g,72:n.KBD_h,73:n.KBD_i,74:n.KBD_j,75:n.KBD_k,76:n.KBD_l,77:n.KBD_m,78:n.KBD_n,79:n.KBD_o,80:n.KBD_p,81:n.KBD_q,82:n.KBD_r,83:n.KBD_s,84:n.KBD_t,85:n.KBD_u,86:n.KBD_v,87:n.KBD_w,88:n.KBD_x,89:n.KBD_y,90:n.KBD_z,91:n.KBD_leftbracket,93:n.KBD_rightbracket,96:n.KBD_kp0,97:n.KBD_kp1,98:n.KBD_kp2,99:n.KBD_kp3,100:n.KBD_kp4,101:n.KBD_kp5,102:n.KBD_kp6,103:n.KBD_kp7,104:n.KBD_kp8,105:n.KBD_kp9,111:n.KBD_kpdivide,112:n.KBD_f1,113:n.KBD_f2,114:n.KBD_f3,115:n.KBD_f4,116:n.KBD_f5,117:n.KBD_f6,118:n.KBD_f7,119:n.KBD_f8,120:n.KBD_f9,121:n.KBD_f10,122:n.KBD_f11,123:n.KBD_f12,144:n.KBD_numlock,145:n.KBD_scrolllock,173:n.KBD_minus,186:n.KBD_semicolon,187:n.KBD_equals,188:n.KBD_comma,189:n.KBD_minus,190:n.KBD_period,191:n.KBD_slash,219:n.KBD_leftbracket,220:n.KBD_backslash,221:n.KBD_rightbracket},n.namedKeyCodes={KBD_NONE:n.KBD_NONE,KBD_0:n.KBD_0,KBD_1:n.KBD_1,KBD_2:n.KBD_2,KBD_3:n.KBD_3,KBD_4:n.KBD_4,KBD_5:n.KBD_5,KBD_6:n.KBD_6,KBD_7:n.KBD_7,KBD_8:n.KBD_8,KBD_9:n.KBD_9,KBD_a:n.KBD_a,KBD_b:n.KBD_b,KBD_c:n.KBD_c,KBD_d:n.KBD_d,KBD_e:n.KBD_e,KBD_f:n.KBD_f,KBD_g:n.KBD_g,KBD_h:n.KBD_h,KBD_i:n.KBD_i,KBD_j:n.KBD_j,KBD_k:n.KBD_k,KBD_l:n.KBD_l,KBD_m:n.KBD_m,KBD_n:n.KBD_n,KBD_o:n.KBD_o,KBD_p:n.KBD_p,KBD_q:n.KBD_q,KBD_r:n.KBD_r,KBD_s:n.KBD_s,KBD_t:n.KBD_t,KBD_u:n.KBD_u,KBD_v:n.KBD_v,KBD_w:n.KBD_w,KBD_x:n.KBD_x,KBD_y:n.KBD_y,KBD_z:n.KBD_z,KBD_f1:n.KBD_f1,KBD_f2:n.KBD_f2,KBD_f3:n.KBD_f3,KBD_f4:n.KBD_f4,KBD_f5:n.KBD_f5,KBD_f6:n.KBD_f6,KBD_f7:n.KBD_f7,KBD_f8:n.KBD_f8,KBD_f9:n.KBD_f9,KBD_f10:n.KBD_f10,KBD_f11:n.KBD_f11,KBD_f12:n.KBD_f12,KBD_kp0:n.KBD_kp0,KBD_kp1:n.KBD_kp1,KBD_kp2:n.KBD_kp2,KBD_kp3:n.KBD_kp3,KBD_kp4:n.KBD_kp4,KBD_kp5:n.KBD_kp5,KBD_kp6:n.KBD_kp6,KBD_kp7:n.KBD_kp7,KBD_kp8:n.KBD_kp8,KBD_kp9:n.KBD_kp9,KBD_kpperiod:n.KBD_kpperiod,KBD_kpdivide:n.KBD_kpdivide,KBD_kpmultiply:n.KBD_kpmultiply,KBD_kpminus:n.KBD_kpminus,KBD_kpplus:n.KBD_kpplus,KBD_kpenter:n.KBD_kpenter,KBD_esc:n.KBD_esc,KBD_tab:n.KBD_tab,KBD_backspace:n.KBD_backspace,KBD_enter:n.KBD_enter,KBD_space:n.KBD_space,KBD_leftalt:n.KBD_leftalt,KBD_rightalt:n.KBD_rightalt,KBD_leftctrl:n.KBD_leftctrl,KBD_rightctrl:n.KBD_rightctrl,KBD_leftshift:n.KBD_leftshift,KBD_rightshift:n.KBD_rightshift,KBD_capslock:n.KBD_capslock,KBD_scrolllock:n.KBD_scrolllock,KBD_numlock:n.KBD_numlock,KBD_grave:n.KBD_grave,KBD_minus:n.KBD_minus,KBD_equals:n.KBD_equals,KBD_backslash:n.KBD_backslash,KBD_leftbracket:n.KBD_leftbracket,KBD_rightbracket:n.KBD_rightbracket,KBD_semicolon:n.KBD_semicolon,KBD_quote:n.KBD_quote,KBD_period:n.KBD_period,KBD_comma:n.KBD_comma,KBD_slash:n.KBD_slash,KBD_printscreen:n.KBD_printscreen,KBD_pause:n.KBD_pause,KBD_insert:n.KBD_insert,KBD_home:n.KBD_home,KBD_pageup:n.KBD_pageup,KBD_delete:n.KBD_delete,KBD_end:n.KBD_end,KBD_pagedown:n.KBD_pagedown,KBD_left:n.KBD_left,KBD_up:n.KBD_up,KBD_down:n.KBD_down,KBD_right:n.KBD_right,KBD_extra_lt_gt:n.KBD_extra_lt_gt},n.keyCodesToDom={};for(const t of Object.keys(n.domToKeyCodes)){const e=Number.parseInt(t,10);n.keyCodesToDom[n.domToKeyCodes[e]]=e}n.domToKeyCode=function(t){return n.domToKeyCodes[t]||0}},{"core-js/modules/web.dom-collections.iterator.js":124}],155:[function(t,e,n){"use strict";function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}t("core-js/modules/web.dom-collections.iterator.js");var i=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.Layers=n.layers=void 0;const r=t("notyf"),s=i(t("simple-keyboard")),a=t("./helpers"),l=t("./keys"),c=t("element-resize-detector")({});n.layers=function(t,e){return new u(t,e||{})};class u{constructor(t,e){o(this,"options",void 0),o(this,"root",void 0),o(this,"loading",void 0),o(this,"canvas",void 0),o(this,"video",void 0),o(this,"mouseOverlay",void 0),o(this,"width",void 0),o(this,"height",void 0),o(this,"fullscreen",!1),o(this,"keyboardVisible",!1),o(this,"pointerLock",!1),o(this,"pointerDisabled",!1),o(this,"pointerButton",0),o(this,"notyf",new r.Notyf),o(this,"toggleKeyboard",(()=>!1)),o(this,"fullscreenElement",void 0),o(this,"clickToStart",void 0),o(this,"loaderText",void 0),o(this,"onResize",void 0),o(this,"onKeyDown",void 0),o(this,"onKeyUp",void 0),o(this,"onKeyPress",void 0),o(this,"onKeysPress",void 0),o(this,"onSave",void 0),o(this,"onSaveStarted",void 0),o(this,"onSaveEnded",void 0),o(this,"onFullscreenChanged",[]),o(this,"onKeyboardChanged",[]),this.options=e,this.root=t,this.root.classList.add("emulator-root"),this.fullscreenElement=e.fullscreenElement||this.root,this.canvas=document.createElement("canvas"),this.canvas.className="emulator-canvas",this.video=document.createElement("video"),this.video.setAttribute("autoplay",""),this.video.setAttribute("playsinline",""),this.video.className="emulator-video",this.loading=(0,a.createDiv)("emulator-loading","\n<div class='emulator-loading-inner'>\n<pre class='emulator-loading-pre-1'>\n _ __\n (_)____ ____/ /___ _____ _________ ____ ___\n / / ___/_____/ __ / __ \\/ ___// ___/ __ \\/ __ `__ \\\n / (__ )_____/ /_/ / /_/ (__ )/ /__/ /_/ / / / / / /\n __/ /____/ \\__,_/\\____/____(_)___/\\____/_/ /_/ /_/\n /___/\n</pre>\n<pre class='emulator-loading-pre-2'>\n</pre>\n<div class='emulator-loader'>\n</div>\n</div>\n"),this.loaderText=this.loading.querySelector(".emulator-loading-pre-2"),this.mouseOverlay=(0,a.createDiv)("emulator-mouse-overlay",""),this.clickToStart=(0,a.createDiv)("emulator-click-to-start-overlay",'\n<div class="emulator-click-to-start-text">Press to start</div>\n<div class="emulator-click-to-start-icon"></div>\n'),this.clickToStart.onclick=()=>{this.clickToStart.style.display="none",this.video.play()},this.root.appendChild(this.canvas),this.root.appendChild(this.video),this.root.appendChild(this.mouseOverlay),this.root.appendChild(this.clickToStart),this.root.appendChild(this.loading),this.width=t.offsetWidth,this.height=t.offsetHeight,this.onResize=[],this.onKeyDown=()=>{},this.onKeyUp=()=>{},this.onKeyPress=()=>{},this.onKeysPress=()=>{},this.onSave=()=>Promise.reject(new Error("Not implemented")),this.onSaveStarted=()=>{},this.onSaveEnded=()=>{},c.listenTo(this.root,(e=>{if(e===t){this.width=e.offsetWidth,this.height=e.offsetHeight;for(const t of this.onResize)t(this.width,this.height)}})),this.initKeyEvents(),this.initKeyboard(),this.preventContextMenu(),this.fullscreenElement.onfullscreenchange=()=>{if(document.fullscreenElement!==this.fullscreenElement){this.fullscreen=!1;for(const t of this.onFullscreenChanged)t(this.fullscreen)}}}initKeyEvents(){window.addEventListener("keydown",(t=>{const e=(0,l.domToKeyCode)(t.keyCode);this.onKeyDown(e)})),window.addEventListener("keyup",(t=>{const e=(0,l.domToKeyCode)(t.keyCode);this.onKeyUp(e)}))}preventContextMenu(){this.root.addEventListener("contextmenu",(t=>(t.stopPropagation(),t.preventDefault(),!1)))}addOnResize(t){this.onResize.push(t)}removeOnResize(t){this.onResize=this.onResize.filter((e=>e!==t))}setOnKeyDown(t){this.onKeyDown=t}fireKeyDown(t){this.onKeyDown(t)}setOnKeyUp(t){this.onKeyUp=t}fireKeyUp(t){this.onKeyUp(t)}setOnKeyPress(t){this.onKeyPress=t}fireKeyPress(t){this.onKeyPress(t)}setOnKeysPress(t){this.onKeysPress=t}fireKeysPress(t){this.onKeysPress(t)}toggleFullscreen(){if(this.fullscreen){this.fullscreen=!1,this.fullscreenElement.classList.contains("emulator-fullscreen-workaround")?this.fullscreenElement.classList.remove("emulator-fullscreen-workaround"):document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen();for(const t of this.onFullscreenChanged)t(!1)}else{this.fullscreen=!0;const t=this.fullscreenElement;t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitEnterFullscreen?t.webkitEnterFullscreen():this.fullscreenElement.classList.add("emulator-fullscreen-workaround");for(const t of this.onFullscreenChanged)t(!0)}}setOnFullscreen(t){this.onFullscreenChanged.push(t)}removeOnFullscreen(t){this.onFullscreenChanged=this.onFullscreenChanged.filter((e=>e!==t))}setOnKeyboardVisibility(t){this.onKeyboardChanged.push(t)}removeOnKeyboardVisibility(t){this.onKeyboardChanged=this.onKeyboardChanged.filter((e=>e!==t))}save(){return this.onSaveStarted(),this.onSave().then((()=>{this.notyf.success("Saved"),this.onSaveEnded()})).catch((t=>{this.notyf.error(t.message),this.onSaveEnded()}))}setOnSave(t){this.onSave=t}getOnSave(){return this.onSave}setOnSaveStarted(t){this.onSaveStarted=t}setOnSaveEnded(t){this.onSaveEnded=t}hideLoadingLayer(){this.loading.style.visibility="hidden"}showLoadingLayer(){this.loading.style.visibility="visible"}setLoadingMessage(t){this.loaderText.innerHTML=t}switchToVideo(){this.video.style.display="block",this.canvas.style.display="none"}showClickToStart(){this.clickToStart.style.display="flex"}initKeyboard(){let t=!1;const e=[{"{esc}":"ESC","{bksp}":"Backspace","{enter}":"⏎","{space}":"Space"},{"{esc}":"ESC","{bksp}":"Backspace","{enter}":"⏎","{space}":"Space",q:"й",w:"ц",e:"у",r:"к",t:"е",y:"н",u:"г",i:"ш",o:"щ",p:"з","{":"х","}":"ъ",a:"ф",s:"ы",d:"в",f:"а",g:"п",h:"р",j:"о",k:"л",l:"д",";":"ж","'":"э",z:"я",x:"ч",c:"с",v:"м",b:"и",n:"т",m:"ь",",":"б",".":"ю"}];let n=0;const o=this.options.keyboardDiv||(0,a.createDiv)("");o.classList.add("emulator-keyboard"),o.style.display="none",(0,a.stopPropagation)(o);const i=new s.default(o,{layout:{en:["{esc} ` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","q w e r t y u i o p { } \\","a s d f g h j k l ; ' [ {enter}","⎘ z x c v b n m , . / ] {space}"]},layoutName:"en",display:e[n],onKeyPress:t=>{if("⎘"===t)return n=(n+1)%e.length,void i.setOptions({display:e[n]});const o=function(t){if(t.length>1)return"{enter}"===t?[l.KBD_enter]:"{shift}"===t?[l.KBD_leftshift]:"{bksp}"===t?[l.KBD_backspace]:"{lock}"===t?[l.KBD_capslock]:"{tab}"===t?[l.KBD_tab]:"{space}"===t?[l.KBD_space]:"{esc}"===t?[l.KBD_esc]:"ctrl"===t?[l.KBD_leftctrl]:"{alt}"===t?[l.KBD_leftalt]:(console.warn("Unknown button",t),[]);if(","===t)return[l.KBD_comma];if("."===t)return[l.KBD_period];if("'"===t)return[l.KBD_quote];if(":"===t)return[l.KBD_semicolon];if("{"===t)return[l.KBD_leftshift,l.KBD_leftbracket];if("}"===t)return[l.KBD_leftshift,l.KBD_rightbracket];const e=(0,l.domToKeyCode)(t.toUpperCase().charCodeAt(0));if(0===e)return[];return[e]}(t);1===o.length?this.fireKeyPress(o[0]):o.length>0&&this.fireKeysPress(o)},preventMouseDownDefault:!0,preventMouseUpDefault:!0,stopMouseDownPropagation:!0,stopMouseUpPropagation:!0,autoUseTouchEvents:!0,useMouseEvents:!0});this.toggleKeyboard=()=>{t=!t;const e=t?"block":"none";o.style.display=e;for(const e of this.onKeyboardChanged)e(t);return this.keyboardVisible=t,t},this.options.keyboardDiv||this.mouseOverlay.appendChild(o)}}n.Layers=u},{"./helpers":153,"./keys":154,"core-js/modules/web.dom-collections.iterator.js":124,"element-resize-detector":129,notyf:137,"simple-keyboard":138}],156:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.lifecycle=void 0,n.lifecycle=function(t){let e="",n="";function o(){document[e]?t.pause():t.resume()}void 0!==document.hidden?(e="hidden",n="visibilitychange"):void 0!==document.mozHidden?(e="mozHidden",n="mozvisibilitychange"):void 0!==document.msHidden?(e="msHidden",n="msvisibilitychange"):void 0!==document.webkitHidden&&(e="webkitHidden",n="webkitvisibilitychange"),document.addEventListener(n,o),t.events().onExit((()=>{document.removeEventListener(n,o)}))}},{}],157:[function(t,e,n){"use strict";function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(n,"__esModule",{value:!0}),n.MemStorage=void 0;n.MemStorage=class{constructor(){o(this,"length",0),o(this,"storage",{})}setItem(t,e){this.storage[t]=e,this.length=Object.keys(this.storage).length}getItem(t){const e=this.storage[t];return void 0===e?null:e}removeItem(t){delete this.storage[t],this.length=Object.keys(this.storage).length}key(t){const e=Object.keys(this.storage);return void 0===e[t]?null:e[t]}clear(){this.length=0,this.storage={}}}},{}],158:[function(t,e,n){"use strict";function o(t,e){if(t.type.match(/^touch/)){const n=t,o=e.getBoundingClientRect();return{x:n.targetTouches[0].clientX-o.x,y:n.targetTouches[0].clientY-o.y,mX:0,mY:0}}if(t.type.match(/^pointer/)){const e=t;return{x:e.offsetX,y:e.offsetY,mX:e.movementX,mY:e.movementY}}{const e=t;return{x:e.offsetX,y:e.offsetY,mX:e.movementX,mY:e.movementY,button:0===e.button?0:1}}}Object.defineProperty(n,"__esModule",{value:!0}),n.pointers=n.getPointerState=n.pointer=void 0,n.pointer=function(){const t=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent),e=t&&!!("ontouchstart"in window),n=t&&!!window.PointerEvent,o=t&&!!window.MSPointerEvent;let i=!t;const r=[],s=[],a=[],l=[],c=[];n?(r.push("pointerdown"),a.push("pointerup","pointercancel"),s.push("pointermove"),c.push("touchstart","touchmove","touchend")):o?(r.push("MSPointerDown"),s.push("MSPointerMove"),a.push("MSPointerUp")):e?(i=!1,r.push("touchstart","mousedown"),s.push("touchmove"),a.push("touchend","touchcancel","mouseup")):(r.push("mousedown"),s.push("mousemove"),a.push("mouseup"),l.push("mouseleave"));return{mobile:t,canLock:i,starters:r,changers:s,enders:a,prevents:c,leavers:l}}(),n.getPointerState=o,n.pointers={bind:n.pointer,getPointerState:o}},{}],159:[function(t,e,n){"use strict";function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}t("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.LStorage=void 0;const i=t("./mem-storage");n.LStorage=class{constructor(t,e){o(this,"backend",void 0),o(this,"length",void 0),o(this,"prefix",void 0),this.prefix=e;try{this.backend=t||localStorage,this.testBackend()}catch(t){this.backend=new i.MemStorage}this.length=this.backend.length,"function"==typeof this.backend.sync&&(this.sync=t=>{this.backend.sync(t)})}testBackend(){const t=this.prefix+".test.record";this.backend.setItem(t,"123");const e=this.backend.getItem(t);this.backend.removeItem(t);if(!("123"===e&&null===this.backend.getItem(t)))throw new Error("Storage backend is not working properly")}setLocalStoragePrefix(t){this.prefix=t}clear(){if(!this.backend.length)return;const t=[];for(let e=0;e<this.backend.length;++e){const n=this.backend.key(e);n&&n.startsWith(this.prefix)&&t.push(n)}for(const e of t)this.backend.removeItem(e);this.length=this.backend.length}key(t){return this.backend.key(t)}setItem(t,e){if(!e||void 0===e.length||0===e.length)return void this.writeStringToKey(t,"");let n=0;for(;n<e.length;){let o=e.substr(n,1024);n+=o.length,n<e.length&&(o+="@"),this.writeStringToKey(t,o),t+="."}}getItem(t){let e=this.readStringFromKey(t);if(null===e)return null;if(0===e.length)return e;for(;"@"===e[e.length-1];){e=e.substr(0,e.length-1),t+=".";const n=this.readStringFromKey(t);e+=null===n?"":n}return e}removeItem(t){this.backend.removeItem(this.prefix+t),this.length=this.backend.length}writeStringToKey(t,e){this.backend.setItem(this.prefix+t,e),this.length=this.backend.length}readStringFromKey(t){return this.backend.getItem(this.prefix+t)}}},{"./mem-storage":157,"core-js/modules/web.dom-collections.iterator.js":124}],160:[function(t,e,n){"use strict";function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(n,"__esModule",{value:!0}),n.EmulatorsUi=void 0;const i=t("./build"),r=t("./dom/layers"),s=t("./dom/lifecycle"),a=t("./network/xhr"),l=t("./graphics/_2d"),c=t("./graphics/webgl"),u=t("./graphics/video"),d=t("./controls/keyboard"),p=t("./controls/mouse/mouse-common"),f=t("./controls/nipple"),h=t("./controls/options"),y=t("./dom/keys"),m=t("./sound/audio-node"),g=t("./notification/notyf"),v=t("./persist/save-load"),b=t("./controls/grid"),_=t("./dom/pointer"),w=t("./dom/storage"),D=t("./js-dos");class B{constructor(){o(this,"build",i.Build),o(this,"dom",{layers:r.layers,lifecycle:s.lifecycle,pointers:_.pointers,storage:new w.LStorage(void 0,"emulators.ui.")}),o(this,"network",{resolveBundle:a.resolveBundle}),o(this,"graphics",{webGl:c.webGl,_2d:l._2d,video:u.video}),o(this,"sound",{audioNode:m.audioNode}),o(this,"persist",{save:v.save,load:v.load}),o(this,"controls",{getGrid:b.getGrid,namedKeyCodes:y.namedKeyCodes,domToKeyCodes:y.domToKeyCodes,domToKeyCode:y.domToKeyCode,keyCodesToDom:y.keyCodesToDom,keyboard:d.keyboard,mouse:p.mouse,nipple:f.nipple,options:h.options}),o(this,"notifications",{notyf:g.notyf}),o(this,"dos",((t,e)=>new D.DosInstance(t,k,e||{})))}}n.EmulatorsUi=B;const k=new B;window.emulatorsUi=k,window.Dos=k.dos},{"./build":139,"./controls/grid":141,"./controls/keyboard":142,"./controls/mouse/mouse-common":146,"./controls/nipple":150,"./controls/options":152,"./dom/keys":154,"./dom/layers":155,"./dom/lifecycle":156,"./dom/pointer":158,"./dom/storage":159,"./graphics/_2d":161,"./graphics/video":162,"./graphics/webgl":163,"./js-dos":164,"./network/xhr":165,"./notification/notyf":166,"./persist/save-load":168,"./sound/audio-node":169}],161:[function(t,e,n){"use strict";t("core-js/modules/es.typed-array.uint8-clamped-array.js"),t("core-js/modules/es.typed-array.set.js"),t("core-js/modules/es.typed-array.sort.js"),Object.defineProperty(n,"__esModule",{value:!0}),n._2d=void 0,n._2d=function(t,e){const n=t.canvas,o=n.getContext("2d");if(null===o)throw new Error("Unable to create 2d context on given canvas");let i=t.width,r=t.height,s=0,a=0;const l=()=>{const t=s/a;let e=i,o=i/t;o>r&&(o=r,e=r*t),n.style.position="relative",n.style.top=(r-o)/2+"px",n.style.left=(i-e)/2+"px",n.style.width=e+"px",n.style.height=o+"px"},c=(t,e)=>{i=t,r=e,l()};t.addOnResize(c);let u=new Uint8ClampedArray(0);const d=(t,e)=>{s=t,a=e,n.width=s,n.height=a,u=new Uint8ClampedArray(t*e*4),l()};e.events().onFrameSize(d),e.events().onFrame(((t,e)=>{if(null===t&&null===e)return;const n=null!==t?t:e;let i=0,r=0;for(;r<u.length;)u[r++]=n[i++],u[r++]=n[i++],u[r++]=n[i++],u[r++]=255,n.length===u.length&&i++;o.putImageData(new ImageData(u,s,a),0,0)})),d(e.width(),e.height()),e.events().onExit((()=>{t.removeOnResize(c)}))}},{"core-js/modules/es.typed-array.set.js":120,"core-js/modules/es.typed-array.sort.js":121,"core-js/modules/es.typed-array.uint8-clamped-array.js":123}],162:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.video=void 0,n.video=function(t,e){t.switchToVideo(),e.events().onMessage(((e,n)=>{"onremotestream"===e&&window.Janus.attachMediaStream(t.video,n)}))}},{}],163:[function(t,e,n){"use strict";t("core-js/modules/es.typed-array.uint8-array.js"),t("core-js/modules/es.typed-array.set.js"),t("core-js/modules/es.typed-array.sort.js"),t("core-js/modules/es.typed-array.float32-array.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.webGl=void 0;function o(t,e,n){const o=t.createShader(e);if(t.shaderSource(o,n),t.compileShader(o),!t.getShaderParameter(o,t.COMPILE_STATUS)){const e=t.getShaderInfoLog(o);throw t.deleteShader(o),new Error("An error occurred compiling the shaders: "+e)}return o}n.webGl=function(t,e){const n=t.canvas,i=n.getContext("webgl");if(null===i)throw new Error("Unable to create webgl context on given canvas");const r=function(t,e,n){const i=o(t,t.VERTEX_SHADER,e),r=o(t,t.FRAGMENT_SHADER,n),s=t.createProgram();if(t.attachShader(s,i),t.attachShader(s,r),t.linkProgram(s),!t.getProgramParameter(s,t.LINK_STATUS))throw new Error("Unable to initialize the shader program: "+t.getProgramInfoLog(s));return s}(i,"\nattribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nvarying highp vec2 vTextureCoord;\n\nvoid main(void) {\n gl_Position = aVertexPosition;\n vTextureCoord = aTextureCoord;\n}\n","\nvarying highp vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\n\nvoid main(void) {\n highp vec4 color = texture2D(uSampler, vTextureCoord);\n gl_FragColor = vec4(color.r, color.g, color.b, 1.0);\n}\n"),s=i.getAttribLocation(r,"aVertexPosition"),a=i.getAttribLocation(r,"aTextureCoord"),l=i.getUniformLocation(r,"uSampler");!function(t,e,n){const o=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,o);const i=[-1,-1,0,1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,1,0];t.bufferData(t.ARRAY_BUFFER,new Float32Array(i),t.STATIC_DRAW),t.vertexAttribPointer(e,3,t.FLOAT,!1,0,0),t.enableVertexAttribArray(e);const r=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,r);const s=[0,1,1,1,1,0,0,1,1,0,0,0];t.bufferData(t.ARRAY_BUFFER,new Float32Array(s),t.STATIC_DRAW),t.vertexAttribPointer(n,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(n)}(i,s,a);const c=i.createTexture();i.bindTexture(i.TEXTURE_2D,c),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR);const u=new Uint8Array([0,0,0]);i.texImage2D(i.TEXTURE_2D,0,i.RGB,1,1,0,i.RGB,i.UNSIGNED_BYTE,u),i.useProgram(r),i.activeTexture(i.TEXTURE0),i.uniform1i(l,0);let d=t.width,p=t.height,f=0,h=0;const y=()=>{const t=f/h;let e=d,o=d/t;o>p&&(o=p,e=p*t),n.style.position="relative",n.style.top=(p-o)/2+"px",n.style.left=(d-e)/2+"px",n.style.width=e+"px",n.style.height=o+"px"},m=(t,e)=>{d=t,p=e,y()};t.addOnResize(m);const g=(t,e)=>{f=t,h=e,n.width=f,n.height=h,i.viewport(0,0,f,h),y()};e.events().onFrameSize(g),g(e.width(),e.height());let v=null,b=null,_=0;e.events().onFrame(((t,e)=>{b=null!=t?t:e,_=null!=t?i.RGB:i.RGBA,null===v&&(v=requestAnimationFrame(w))}));const w=()=>{i.texImage2D(i.TEXTURE_2D,0,_,f,h,0,_,i.UNSIGNED_BYTE,b),i.drawArrays(i.TRIANGLES,0,6),v=null,b=null};e.events().onExit((()=>{t.removeOnResize(m)}))}},{"core-js/modules/es.typed-array.float32-array.js":119,"core-js/modules/es.typed-array.set.js":120,"core-js/modules/es.typed-array.sort.js":121,"core-js/modules/es.typed-array.uint8-array.js":122}],164:[function(t,e,n){"use strict";function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}t("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.DosInstance=void 0;const i=t("./controls/layers-config"),r=t("./controls/legacy-layers-control"),s=t("./controls/null-layers-control"),a=t("./controls/layers-control"),l=t("./dom/pointer");n.DosInstance=class{constructor(t,e,n){var i,r,s;o(this,"emulatorsUi",void 0),o(this,"emulatorFunction",void 0),o(this,"createTransportLayer",void 0),o(this,"layers",void 0),o(this,"layersConfig",null),o(this,"ciPromise",void 0),o(this,"options",void 0),o(this,"mobileControls",void 0),o(this,"mirroredControls",void 0),o(this,"scaleControls",void 0),o(this,"autolock",void 0),o(this,"sensitivity",void 0),o(this,"storage",void 0),o(this,"volume",void 0),o(this,"clickToStart",void 0),o(this,"unbindControls",(()=>{})),o(this,"storedLayersConfig",null),o(this,"onMobileControlsChanged",void 0),o(this,"onSensitivityChanged",[]),o(this,"onScaleChanged",[]),o(this,"onVolumeChanged",[]),o(this,"setVolumeImplFn",(()=>{})),o(this,"registerOnSensitivityChanged",(t=>{this.onSensitivityChanged.push(t)})),o(this,"removeOnSensitivityChanged",(t=>{this.onSensitivityChanged=this.onSensitivityChanged.filter((e=>e!==t))})),o(this,"registerOnScaleChanged",(t=>{this.onScaleChanged.push(t)})),o(this,"removeOnScaleChanged",(t=>{this.onScaleChanged=this.onScaleChanged.filter((e=>e!==t))})),o(this,"registerOnVolumeChanged",(t=>{this.onVolumeChanged.push(t)})),o(this,"removeOnVolumeChanged",(t=>{this.onVolumeChanged=this.onVolumeChanged.filter((e=>e!==t))})),this.options=n,this.emulatorsUi=e,this.storage=e.dom.storage,this.emulatorFunction=n.emulatorFunction||"dosboxWorker",this.clickToStart=n.clickToStart||!1,this.layers=this.emulatorsUi.dom.layers(t,n.layersOptions),this.layers.showLoadingLayer(),this.createTransportLayer=n.createTransportLayer,this.mobileControls=l.pointers.bind.mobile,this.autolock=!1,this.mirroredControls="true"===this.storage.getItem("mirroredControls");const a=Number.parseFloat(null!==(i=this.storage.getItem("scaleControls"))&&void 0!==i?i:"1.0");this.scaleControls=Number.isNaN(a)?1:a;const c=Number.parseFloat(null!==(r=this.storage.getItem("sensitivity"))&&void 0!==r?r:"1.0");this.sensitivity=Number.isNaN(c)?1:c;const u=Number.parseFloat(null!==(s=this.storage.getItem("volume"))&&void 0!==s?s:"1.0");if(this.volume=Number.isNaN(u)?1:u,this.onMobileControlsChanged=()=>{},"backend"===this.emulatorFunction&&void 0===this.createTransportLayer)throw new Error("Emulator function set to 'backend' but 'createTransportLayer' is not a function")}async run(t,e,n){var o,r,s;await this.stop(),this.layers.setLoadingMessage("Starting...");const a=null!=n&&n.length>0?n:t+".changes";let l;try{l=await this.runBundle(t,e,a)}catch(t){throw this.layers.setLoadingMessage("Unexpected error occured..."),this.layers.notyf.error({message:"Can't start emulator look browser logs for more info"}),console.error(t),t}const c=this.emulatorsUi;if("janus"===this.emulatorFunction)c.graphics.video(this.layers,l);else{c.persist.save(a,this.layers,l,emulators);try{if(!0===this.options.noWebGL)throw new Error("WebGL is disabled by options");c.graphics.webGl(this.layers,l)}catch(t){console.error("Unable to create webgl canvas, fallback to 2d rendering"),c.graphics._2d(this.layers,l)}this.setVolumeImplFn=c.sound.audioNode(l),this.setVolumeImplFn(this.volume)}c.dom.lifecycle(l);const u=await l.config();return this.autolock=!0===(null===(o=u.output)||void 0===o||null===(r=o.options)||void 0===r||null===(s=r.autolock)||void 0===s?void 0:s.value),await this.setLayersConfig((0,i.extractLayersConfig)(u)),this.mobileControls||(this.mobileControls=!0,this.disableMobileControls()),this.layers.setLoadingMessage("Ready"),this.layers.hideLoadingLayer(),this.clickToStart&&this.layers.showClickToStart(),l}async stop(){if(this.layers.showLoadingLayer(),void 0===this.ciPromise)return;const t=await this.ciPromise;delete this.ciPromise,await t.exit()}async setLayersConfig(t,e){if(void 0===this.ciPromise)return;const n=await this.ciPromise;this.layersConfig=t,this.unbindControls(),null===t?this.unbindControls=(0,s.initNullLayersControl)(this,this.layers,n):void 0===t.version?this.unbindControls=(0,r.initLegacyLayersControl)(this,this.layers,t,n):this.unbindControls=(0,a.initLayersControl)(this.layers,t,n,this,this.mirroredControls,this.scaleControls,e)}getLayersConfig(){return this.layersConfig}async enableMobileControls(){this.mobileControls||(this.mobileControls=!0,await this.setLayersConfig(this.storedLayersConfig),this.storedLayersConfig=null,this.onMobileControlsChanged(!0))}async disableMobileControls(){this.mobileControls&&(this.mobileControls=!1,this.storedLayersConfig=this.layersConfig,await this.setLayersConfig(null),this.onMobileControlsChanged(!1))}async setMirroredControls(t){this.mirroredControls!==t&&(this.mirroredControls=t,this.storage.setItem("mirroredControls",t+""),t?this.mobileControls?await this.setLayersConfig(this.layersConfig):await this.enableMobileControls():this.mobileControls&&await this.setLayersConfig(this.layersConfig))}async setScaleControls(t){if(t!==this.scaleControls){this.scaleControls=t,this.storage.setItem("scaleControls",t+""),this.mobileControls&&await this.setLayersConfig(this.layersConfig);for(const t of this.onScaleChanged)t(this.scaleControls)}}async setSensitivity(t){if(t!==this.sensitivity){this.sensitivity=t,this.storage.setItem("sensitivity",t+""),await this.setLayersConfig(this.layersConfig);for(const t of this.onSensitivityChanged)t(this.sensitivity)}}async setVolume(t){this.volume=t,this.storage.setItem("volume",t+""),this.setVolumeImplFn(t);for(const t of this.onVolumeChanged)t(this.volume)}async setAutolock(t){t!==this.autolock&&(this.autolock=t,await this.setLayersConfig(this.layersConfig))}setOnMobileControlsChanged(t){this.onMobileControlsChanged=t}async runBundle(t,e,n){const o=this.emulatorsUi;if("janus"===this.emulatorFunction)this.layers.setLoadingMessage("Connecting..."),this.ciPromise=emulators.janus(t);else{this.layers.setLoadingMessage("Downloading bundle ...");const i=o.network.resolveBundle(t,{onprogress:t=>this.layers.setLoadingMessage("Downloading bundle "+t+"%")}),r={onExtractProgress:(t,e,n,o)=>{if(0!==t)return;const i=Math.round(n/o*100),r=e.lastIndexOf("/"),s=e.substring(r+1);this.layers.setLoadingMessage("Extracting "+i+"% ("+s+")")}};try{let t;t=null!=e&&e.length>0?await o.network.resolveBundle(e,{httpCache:!1}):await o.persist.load(n,emulators);const s=await i;"backend"===this.emulatorFunction?this.ciPromise=emulators.backend([s,t],this.createTransportLayer(),r):this.ciPromise=emulators[this.emulatorFunction]([s,t],r)}catch{const t=await i;"backend"===this.emulatorFunction?this.ciPromise=emulators.backend([t],this.createTransportLayer(),r):this.ciPromise=emulators[this.emulatorFunction]([t],r)}}return this.ciPromise}}},{"./controls/layers-config":143,"./controls/layers-control":144,"./controls/legacy-layers-control":145,"./controls/null-layers-control":151,"./dom/pointer":158,"core-js/modules/web.dom-collections.iterator.js":124}],165:[function(t,e,n){"use strict";t("core-js/modules/es.typed-array.uint8-array.js"),t("core-js/modules/es.typed-array.set.js"),t("core-js/modules/es.typed-array.sort.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.resolveBundle=void 0,n.resolveBundle=async function(t,e){const n=null==e?void 0:e.onprogress,o=!(!1===(null==e?void 0:e.httpCache));return new Promise(((e,i)=>{const r=new XMLHttpRequest;r.open("GET",t,!0),r.overrideMimeType("text/plain; charset=x-user-defined"),r.addEventListener("error",(()=>{i(new Error("Network error, can't download "+t))})),r.addEventListener("abort",(()=>{i(new Error("Request canceled for url "+t))}),!1),r.responseType="arraybuffer",r.onreadystatechange=()=>{4===r.readyState&&(200===r.status?(void 0!==n&&n(100),e(new Uint8Array(r.response))):i(new Error("Network error, can't download "+t)))},void 0!==n&&(r.onprogress=t=>{if(t.total&&t.total>0){const e=Math.round(1e4*t.loaded/t.total)/100;n(e)}}),!1===o&&(r.setRequestHeader("Cache-Control","no-cache, no-store, max-age=0"),r.setRequestHeader("Expires","Tue, 01 Jan 1980 1:00:00 GMT"),r.setRequestHeader("Pragma","no-cache")),r.send()}))}},{"core-js/modules/es.typed-array.set.js":120,"core-js/modules/es.typed-array.sort.js":121,"core-js/modules/es.typed-array.uint8-array.js":122}],166:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.notyf=void 0,n.notyf=function(t,e){const n=t.notyf;e.events().onMessage((function(t){if("error"===t){for(var e=arguments.length,o=new Array(e>1?e-1:0),i=1;i<e;i++)o[i-1]=arguments[i];n.error({message:JSON.stringify(o)})}}))}},{}],167:[function(t,e,n){"use strict";function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(n,"__esModule",{value:!0}),n.makeCache=void 0;class i{close(){}put(t,e){return Promise.resolve()}get(t,e){return void 0!==e?Promise.resolve(e):Promise.reject(new Error("Cache is not supported on this host"))}forEach(t,e){e()}}n.makeCache=function(t,e){return new Promise((n=>{new r(t,n,(t=>{e.onErr(t),n(new i)}))}))};class r{constructor(t,e,n){if(o(this,"version",void 0),o(this,"storeName","files"),o(this,"indexedDB",void 0),o(this,"db",null),this.version=t,this.indexedDB="undefined"==typeof window?void 0:window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,this.indexedDB)try{const o=this.indexedDB.open("js-dos-cache ("+t+")",1);o.onerror=t=>{var e;n("Can't open cache database: "+(null===(e=o.error)||void 0===e?void 0:e.message))},o.onsuccess=t=>{this.db=o.result,e(this)},o.onupgradeneeded=t=>{try{this.db=o.result,this.db.onerror=t=>{n("Can't upgrade cache database")},this.db.createObjectStore(this.storeName)}catch(t){n("Can't upgrade cache database")}}}catch(t){n("Can't open cache database: "+t.message)}else n("Indexed db is not supported on this host")}close(){null!==this.db&&(this.db.close(),this.db=null)}put(t,e){return new Promise((n=>{if(null===this.db)return void n();const o=this.db.transaction(this.storeName,"readwrite");o.oncomplete=()=>n(),o.objectStore(this.storeName).put(e,t)}))}get(t,e){return new Promise(((n,o)=>{function i(t){void 0===e?o(new Error(t)):n(e)}if(null===this.db)return void i("db is not initalized");const r=this.db.transaction(this.storeName,"readonly").objectStore(this.storeName).get(t);r.onerror=()=>o(new Error("Can't read value for key '"+t+"'")),r.onsuccess=()=>{r.result?n(r.result):i("Result is empty for key '"+t+"', result: "+r.result)}}))}forEach(t,e){if(null===this.db)return void e();const n=this.db.transaction(this.storeName,"readonly").objectStore(this.storeName).openCursor();n.onerror=()=>e(),n.onsuccess=n=>{const o=n.target.result;o?(t(o.key.toString(),o.value),o.continue()):e()}}}},{}],168:[function(t,e,n){"use strict";t("core-js/modules/es.typed-array.uint8-array.js"),t("core-js/modules/es.typed-array.set.js"),t("core-js/modules/es.typed-array.sort.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.load=n.save=void 0;const o=(0,t("./cache").makeCache)("emulators-ui-saves",{onErr:console.error});n.save=function(t,e,n,i){e.setOnSave((async()=>{const e=await o,i=await n.persist();return e.put(t,i.buffer)}))},n.load=async function(t,e){return(await o).get(t).then((t=>new Uint8Array(t)))}},{"./cache":167,"core-js/modules/es.typed-array.set.js":120,"core-js/modules/es.typed-array.sort.js":121,"core-js/modules/es.typed-array.uint8-array.js":122}],169:[function(t,e,n){"use strict";t("core-js/modules/web.dom-collections.iterator.js"),Object.defineProperty(n,"__esModule",{value:!0}),n.audioNode=void 0;class o{constructor(){var t,e,n;n=[],(e="samplesQueue")in(t=this)?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}push(t){this.samplesQueue.push(t)}length(){let t=0;for(const e of this.samplesQueue)t+=e.length;return t}writeTo(t,e){let n=0;for(;this.samplesQueue.length>0;){const o=this.samplesQueue[0],i=Math.min(e-n,o.length);if(i===o.length?(t.set(o,n),this.samplesQueue.shift()):(t.set(o.slice(0,i),n),this.samplesQueue[0]=o.slice(i)),n+=i,n===e)break}n<e&&t.fill(0,n)}}n.audioNode=function(t){const e=t.soundFrequency();if(0===e)return console.warn("Can't create audio node with sampleRate === 0, ingnoring"),()=>{};let n=null;if("undefined"!=typeof AudioContext?n=new AudioContext({sampleRate:e,latencyHint:"interactive"}):void 0!==window.webkitAudioContext&&(n=new window.webkitAudioContext({sampleRate:e,latencyHint:"interactive"})),null==n)return()=>{};const i=new o;t.events().onSoundPush((t=>{i.length()<6144&&i.push(t)}));const r=n.createScriptProcessor(2048,0,1);let s=!1,a=0;const l=t.directSound;r.onaudioprocess=void 0!==t.directSound?t=>{if(!s){const t=l.buffer[0];s=Math.ceil(t[t.length-1])>0}if(!s)return;let e=0,n=t.outputBuffer.length;const o=t.outputBuffer.numberOfChannels;let i,r=l.buffer[a];for(;n>0&&(i=Math.ceil(r[r.length-1]))>0;)if(n>=i){const s=r.subarray(0,i);for(let n=0;n<o;++n){t.outputBuffer.getChannelData(n).set(s,e)}e+=i,n-=i,r[r.length-1]=0,a=(a+1)%l.ringSize,r=l.buffer[a]}else{const s=r.subarray(0,n);for(let n=0;n<o;++n){t.outputBuffer.getChannelData(n).set(s,e)}r[r.length-1]=i-n,r.set(r.subarray(n,n+r[r.length-1])),n=0}}:t=>{const e=t.outputBuffer.length,n=t.outputBuffer.numberOfChannels,o=i.length();if(s||(s=o>=2048),s)for(let o=0;o<n;o++){const n=t.outputBuffer.getChannelData(o);i.writeTo(n,e)}};const c=n.createGain();c.connect(n.destination),r.connect(c),c.gain.value=1;const u=()=>{null!==n&&"suspended"===n.state&&n.resume()};return document.addEventListener("click",u,{once:!0}),document.addEventListener("touchstart",u,{once:!0}),document.addEventListener("keydown",u,{once:!0}),t.events().onExit((()=>{null!==n&&(r.disconnect(),c.disconnect(),n.close()),document.removeEventListener("click",u),document.removeEventListener("touchstart",u),document.removeEventListener("keydown",u)})),t=>{c.gain.value=t}}},{"core-js/modules/web.dom-collections.iterator.js":124}]},{},[160]);