@yidun/livedetect-sdk-h5 2.3.1 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- // v2.3.1
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).NELiveDetection=t()}(this,(function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){u(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function s(e){r(a,o,i,s,u,"next",e)}function u(e){r(a,o,i,s,u,"throw",e)}s(void 0)}))}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(yK){return!1}}function d(e,t,n){return d=h()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&f(o,n.prototype),o},d.apply(null,arguments)}function p(e){var t="function"==typeof Map?new Map:void 0;return p=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return d(e,arguments,l(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f(r,e)},p(e)}function v(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function y(e){var t=h();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function b(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=b(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},w.apply(this,arguments)}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||T(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function C(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function k(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){k(i,r,o,a,s,"next",e)}function s(e){k(i,r,o,a,s,"throw",e)}a(void 0)}))}}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function M(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function L(e,t){return L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},L(e,t)}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(yK){return!1}}();return function(){var n,r=D(e);if(t){var o=D(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return B(this,n)}}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||W(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||W(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){if(e){if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=W(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function G(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,Q(e,t,"get"))}function X(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,Q(e,t,"set"),n),n}function Q(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Y(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}var q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},K=function(e){return e&&e.Math==Math&&e},J=K("object"==("undefined"==typeof globalThis?"undefined":S(globalThis))&&globalThis)||K("object"==("undefined"==typeof window?"undefined":S(window))&&window)||K("object"==("undefined"==typeof self?"undefined":S(self))&&self)||K("object"==S(q)&&q)||function(){return this}()||Function("return this")(),Z={},$=function(e){try{return!!e()}catch(t){return!0}},ee=!$((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),te=!$((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ne=te,re=Function.prototype.call,oe=ne?re.bind(re):function(){return re.apply(re,arguments)},ie={},ae={}.propertyIsEnumerable,se=Object.getOwnPropertyDescriptor,ue=se&&!ae.call({1:2},1);ie.f=ue?function(e){var t=se(this,e);return!!t&&t.enumerable}:ae;var ce,le,fe=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},he=te,de=Function.prototype,pe=de.bind,ve=de.call,ge=he&&pe.bind(ve,ve),me=he?function(e){return e&&ge(e)}:function(e){return e&&function(){return ve.apply(e,arguments)}},ye=me,be=ye({}.toString),we=ye("".slice),Ae=function(e){return we(be(e),8,-1)},xe=me,Te=$,Pe=Ae,Ce=J.Object,_e=xe("".split),Ee=Te((function(){return!Ce("z").propertyIsEnumerable(0)}))?function(e){return"String"==Pe(e)?_e(e,""):Ce(e)}:Ce,Se=J.TypeError,ke=function(e){if(null==e)throw Se("Can't call method on "+e);return e},Re=Ee,Oe=ke,Fe=function(e){return Re(Oe(e))},Me=function(e){return"function"==typeof e},Ie=Me,De=function(e){return"object"==S(e)?null!==e:Ie(e)},Le=J,je=Me,Be=function(e){return je(e)?e:void 0},Ne=function(e,t){return arguments.length<2?Be(Le[e]):Le[e]&&Le[e][t]},Ve=me({}.isPrototypeOf),Ue=Ne("navigator","userAgent")||"",We=J,ze=Ue,He=We.process,Ge=We.Deno,Xe=He&&He.versions||Ge&&Ge.version,Qe=Xe&&Xe.v8;Qe&&(le=(ce=Qe.split("."))[0]>0&&ce[0]<4?1:+(ce[0]+ce[1])),!le&&ze&&(!(ce=ze.match(/Edge\/(\d+)/))||ce[1]>=74)&&(ce=ze.match(/Chrome\/(\d+)/))&&(le=+ce[1]);var Ye=le,qe=Ye,Ke=$,Je=!!Object.getOwnPropertySymbols&&!Ke((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&qe&&qe<41})),Ze=Je&&!Symbol.sham&&"symbol"==S(Symbol.iterator),$e=Ne,et=Me,tt=Ve,nt=Ze,rt=J.Object,ot=nt?function(e){return"symbol"==S(e)}:function(e){var t=$e("Symbol");return et(t)&&tt(t.prototype,rt(e))},it=J.String,at=function(e){try{return it(e)}catch(t){return"Object"}},st=Me,ut=at,ct=J.TypeError,lt=function(e){if(st(e))return e;throw ct(ut(e)+" is not a function")},ft=lt,ht=function(e,t){var n=e[t];return null==n?void 0:ft(n)},dt=oe,pt=Me,vt=De,gt=J.TypeError,mt=function(e,t){var n,r;if("string"===t&&pt(n=e.toString)&&!vt(r=dt(n,e)))return r;if(pt(n=e.valueOf)&&!vt(r=dt(n,e)))return r;if("string"!==t&&pt(n=e.toString)&&!vt(r=dt(n,e)))return r;throw gt("Can't convert object to primitive value")},yt={exports:{}},bt=J,wt=Object.defineProperty,At=function(e,t){try{wt(bt,e,{value:t,configurable:!0,writable:!0})}catch(n){bt[e]=t}return t},xt=At,Tt="__core-js_shared__",Pt=J[Tt]||xt(Tt,{}),Ct=Pt;(yt.exports=function(e,t){return Ct[e]||(Ct[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.2",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.2/LICENSE",source:"https://github.com/zloirock/core-js"});var _t=ke,Et=J.Object,St=function(e){return Et(_t(e))},kt=St,Rt=me({}.hasOwnProperty),Ot=Object.hasOwn||function(e,t){return Rt(kt(e),t)},Ft=me,Mt=0,It=Math.random(),Dt=Ft(1..toString),Lt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Dt(++Mt+It,36)},jt=J,Bt=yt.exports,Nt=Ot,Vt=Lt,Ut=Je,Wt=Ze,zt=Bt("wks"),Ht=jt.Symbol,Gt=Ht&&Ht.for,Xt=Wt?Ht:Ht&&Ht.withoutSetter||Vt,Qt=function(e){if(!Nt(zt,e)||!Ut&&"string"!=typeof zt[e]){var t="Symbol."+e;Ut&&Nt(Ht,e)?zt[e]=Ht[e]:zt[e]=Wt&&Gt?Gt(t):Xt(t)}return zt[e]},Yt=oe,qt=De,Kt=ot,Jt=ht,Zt=mt,$t=Qt,en=J.TypeError,tn=$t("toPrimitive"),nn=function(e,t){if(!qt(e)||Kt(e))return e;var n,r=Jt(e,tn);if(r){if(void 0===t&&(t="default"),n=Yt(r,e,t),!qt(n)||Kt(n))return n;throw en("Can't convert object to primitive value")}return void 0===t&&(t="number"),Zt(e,t)},rn=nn,on=ot,an=function(e){var t=rn(e,"string");return on(t)?t:t+""},sn=De,un=J.document,cn=sn(un)&&sn(un.createElement),ln=function(e){return cn?un.createElement(e):{}},fn=ln,hn=!ee&&!$((function(){return 7!=Object.defineProperty(fn("div"),"a",{get:function(){return 7}}).a})),dn=ee,pn=oe,vn=ie,gn=fe,mn=Fe,yn=an,bn=Ot,wn=hn,An=Object.getOwnPropertyDescriptor;Z.f=dn?An:function(e,t){if(e=mn(e),t=yn(t),wn)try{return An(e,t)}catch(n){}if(bn(e,t))return gn(!pn(vn.f,e,t),e[t])};var xn={},Tn=ee&&$((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Pn=J,Cn=De,_n=Pn.String,En=Pn.TypeError,Sn=function(e){if(Cn(e))return e;throw En(_n(e)+" is not an object")},kn=ee,Rn=hn,On=Tn,Fn=Sn,Mn=an,In=J.TypeError,Dn=Object.defineProperty,Ln=Object.getOwnPropertyDescriptor,jn="enumerable",Bn="configurable",Nn="writable";xn.f=kn?On?function(e,t,n){if(Fn(e),t=Mn(t),Fn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Nn in n&&!n.writable){var r=Ln(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:Bn in n?n.configurable:r.configurable,enumerable:jn in n?n.enumerable:r.enumerable,writable:!1})}return Dn(e,t,n)}:Dn:function(e,t,n){if(Fn(e),t=Mn(t),Fn(n),Rn)try{return Dn(e,t,n)}catch(r){}if("get"in n||"set"in n)throw In("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Vn=xn,Un=fe,Wn=ee?function(e,t,n){return Vn.f(e,t,Un(1,n))}:function(e,t,n){return e[t]=n,e},zn={exports:{}},Hn=Me,Gn=Pt,Xn=me(Function.toString);Hn(Gn.inspectSource)||(Gn.inspectSource=function(e){return Xn(e)});var Qn,Yn,qn,Kn=Gn.inspectSource,Jn=Me,Zn=Kn,$n=J.WeakMap,er=Jn($n)&&/native code/.test(Zn($n)),tr=yt.exports,nr=Lt,rr=tr("keys"),or=function(e){return rr[e]||(rr[e]=nr(e))},ir={},ar=er,sr=J,ur=me,cr=De,lr=Wn,fr=Ot,hr=Pt,dr=or,pr=ir,vr="Object already initialized",gr=sr.TypeError,mr=sr.WeakMap;if(ar||hr.state){var yr=hr.state||(hr.state=new mr),br=ur(yr.get),wr=ur(yr.has),Ar=ur(yr.set);Qn=function(e,t){if(wr(yr,e))throw new gr(vr);return t.facade=e,Ar(yr,e,t),t},Yn=function(e){return br(yr,e)||{}},qn=function(e){return wr(yr,e)}}else{var xr=dr("state");pr[xr]=!0,Qn=function(e,t){if(fr(e,xr))throw new gr(vr);return t.facade=e,lr(e,xr,t),t},Yn=function(e){return fr(e,xr)?e[xr]:{}},qn=function(e){return fr(e,xr)}}var Tr={set:Qn,get:Yn,has:qn,enforce:function(e){return qn(e)?Yn(e):Qn(e,{})},getterFor:function(e){return function(t){var n;if(!cr(t)||(n=Yn(t)).type!==e)throw gr("Incompatible receiver, "+e+" required");return n}}},Pr=ee,Cr=Ot,_r=Function.prototype,Er=Pr&&Object.getOwnPropertyDescriptor,Sr=Cr(_r,"name"),kr={EXISTS:Sr,PROPER:Sr&&"something"===function(){}.name,CONFIGURABLE:Sr&&(!Pr||Pr&&Er(_r,"name").configurable)},Rr=J,Or=Me,Fr=Ot,Mr=Wn,Ir=At,Dr=Kn,Lr=kr.CONFIGURABLE,jr=Tr.get,Br=Tr.enforce,Nr=String(String).split("String");(zn.exports=function(e,t,n,r){var o,i=!!r&&!!r.unsafe,a=!!r&&!!r.enumerable,s=!!r&&!!r.noTargetGet,u=r&&void 0!==r.name?r.name:t;Or(n)&&("Symbol("===String(u).slice(0,7)&&(u="["+String(u).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Fr(n,"name")||Lr&&n.name!==u)&&Mr(n,"name",u),(o=Br(n)).source||(o.source=Nr.join("string"==typeof u?u:""))),e!==Rr?(i?!s&&e[t]&&(a=!0):delete e[t],a?e[t]=n:Mr(e,t,n)):a?e[t]=n:Ir(t,n)})(Function.prototype,"toString",(function(){return Or(this)&&jr(this).source||Dr(this)}));var Vr={},Ur=Math.ceil,Wr=Math.floor,zr=function(e){var t=+e;return t!=t||0===t?0:(t>0?Wr:Ur)(t)},Hr=zr,Gr=Math.max,Xr=Math.min,Qr=function(e,t){var n=Hr(e);return n<0?Gr(n+t,0):Xr(n,t)},Yr=zr,qr=Math.min,Kr=function(e){return e>0?qr(Yr(e),9007199254740991):0},Jr=Kr,Zr=function(e){return Jr(e.length)},$r=Fe,eo=Qr,to=Zr,no=function(e){return function(t,n,r){var o,i=$r(t),a=to(i),s=eo(r,a);if(e&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}},ro={includes:no(!0),indexOf:no(!1)},oo=Ot,io=Fe,ao=ro.indexOf,so=ir,uo=me([].push),co=function(e,t){var n,r=io(e),o=0,i=[];for(n in r)!oo(so,n)&&oo(r,n)&&uo(i,n);for(;t.length>o;)oo(r,n=t[o++])&&(~ao(i,n)||uo(i,n));return i},lo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fo=co,ho=lo.concat("length","prototype");Vr.f=Object.getOwnPropertyNames||function(e){return fo(e,ho)};var po={};po.f=Object.getOwnPropertySymbols;var vo=Ne,go=Vr,mo=po,yo=Sn,bo=me([].concat),wo=vo("Reflect","ownKeys")||function(e){var t=go.f(yo(e)),n=mo.f;return n?bo(t,n(e)):t},Ao=Ot,xo=wo,To=Z,Po=xn,Co=function(e,t,n){for(var r=xo(t),o=Po.f,i=To.f,a=0;a<r.length;a++){var s=r[a];Ao(e,s)||n&&Ao(n,s)||o(e,s,i(t,s))}},_o=$,Eo=Me,So=/#|\.prototype\./,ko=function(e,t){var n=Oo[Ro(e)];return n==Mo||n!=Fo&&(Eo(t)?_o(t):!!t)},Ro=ko.normalize=function(e){return String(e).replace(So,".").toLowerCase()},Oo=ko.data={},Fo=ko.NATIVE="N",Mo=ko.POLYFILL="P",Io=ko,Do=J,Lo=Z.f,jo=Wn,Bo=zn.exports,No=At,Vo=Co,Uo=Io,Wo=function(e,t){var n,r,o,i,a,s=e.target,u=e.global,c=e.stat;if(n=u?Do:c?Do[s]||No(s,{}):(Do[s]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=Lo(n,r))&&a.value:n[r],!Uo(u?r:s+(c?".":"#")+r,e.forced)&&void 0!==o){if(S(i)==S(o))continue;Vo(i,o)}(e.sham||o&&o.sham)&&jo(i,"sham",!0),Bo(n,r,i,e)}},zo={};zo[Qt("toStringTag")]="z";var Ho="[object z]"===String(zo),Go=J,Xo=Ho,Qo=Me,Yo=Ae,qo=Qt("toStringTag"),Ko=Go.Object,Jo="Arguments"==Yo(function(){return arguments}()),Zo=Xo?Yo:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Ko(e),qo))?n:Jo?Yo(t):"Object"==(r=Yo(t))&&Qo(t.callee)?"Arguments":r},$o=Zo,ei=J.String,ti=function(e){if("Symbol"===$o(e))throw TypeError("Cannot convert a Symbol value to a string");return ei(e)},ni={},ri=co,oi=lo,ii=Object.keys||function(e){return ri(e,oi)},ai=ee,si=Tn,ui=xn,ci=Sn,li=Fe,fi=ii;ni.f=ai&&!si?Object.defineProperties:function(e,t){ci(e);for(var n,r=li(t),o=fi(t),i=o.length,a=0;i>a;)ui.f(e,n=o[a++],r[n]);return e};var hi,di=Ne("document","documentElement"),pi=Sn,vi=ni,gi=lo,mi=ir,yi=di,bi=ln,wi=or("IE_PROTO"),Ai=function(){},xi=function(e){return"<script>"+e+"</"+"script>"},Ti=function(e){e.write(xi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Pi=function(){try{hi=new ActiveXObject("htmlfile")}catch(r){}var e,t;Pi="undefined"!=typeof document?document.domain&&hi?Ti(hi):((t=bi("iframe")).style.display="none",yi.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(xi("document.F=Object")),e.close(),e.F):Ti(hi);for(var n=gi.length;n--;)delete Pi.prototype[gi[n]];return Pi()};mi[wi]=!0;var Ci=Object.create||function(e,t){var n;return null!==e?(Ai.prototype=pi(e),n=new Ai,Ai.prototype=null,n[wi]=e):n=Pi(),void 0===t?n:vi.f(n,t)},_i={},Ei=an,Si=xn,ki=fe,Ri=function(e,t,n){var r=Ei(t);r in e?Si.f(e,r,ki(0,n)):e[r]=n},Oi=Qr,Fi=Zr,Mi=Ri,Ii=J.Array,Di=Math.max,Li=function(e,t,n){for(var r=Fi(e),o=Oi(t,r),i=Oi(void 0===n?r:n,r),a=Ii(Di(i-o,0)),s=0;o<i;o++,s++)Mi(a,s,e[o]);return a.length=s,a},ji=Ae,Bi=Fe,Ni=Vr.f,Vi=Li,Ui="object"==("undefined"==typeof window?"undefined":S(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];_i.f=function(e){return Ui&&"Window"==ji(e)?function(e){try{return Ni(e)}catch(t){return Vi(Ui)}}(e):Ni(Bi(e))};var Wi={},zi=Qt;Wi.f=zi;var Hi=J,Gi=Ot,Xi=Wi,Qi=xn.f,Yi=function(e){var t=Hi.Symbol||(Hi.Symbol={});Gi(t,e)||Qi(t,e,{value:Xi.f(e)})},qi=oe,Ki=Ne,Ji=Qt,Zi=zn.exports,$i=function(){var e=Ki("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Ji("toPrimitive");t&&!t[r]&&Zi(t,r,(function(e){return qi(n,this)}))},ea=xn.f,ta=Ot,na=Qt("toStringTag"),ra=function(e,t,n){e&&!n&&(e=e.prototype),e&&!ta(e,na)&&ea(e,na,{configurable:!0,value:t})},oa=lt,ia=te,aa=me(me.bind),sa=function(e,t){return oa(e),void 0===t?e:ia?aa(e,t):function(){return e.apply(t,arguments)}},ua=Ae,ca=Array.isArray||function(e){return"Array"==ua(e)},la=me,fa=$,ha=Me,da=Zo,pa=Kn,va=function(){},ga=[],ma=Ne("Reflect","construct"),ya=/^\s*(?:class|function)\b/,ba=la(ya.exec),wa=!ya.exec(va),Aa=function(e){if(!ha(e))return!1;try{return ma(va,ga,e),!0}catch(t){return!1}},xa=function(e){if(!ha(e))return!1;switch(da(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return wa||!!ba(ya,pa(e))}catch(t){return!0}};xa.sham=!0;var Ta=!ma||fa((function(){var e;return Aa(Aa.call)||!Aa(Object)||!Aa((function(){e=!0}))||e}))?xa:Aa,Pa=J,Ca=ca,_a=Ta,Ea=De,Sa=Qt("species"),ka=Pa.Array,Ra=function(e){var t;return Ca(e)&&(t=e.constructor,(_a(t)&&(t===ka||Ca(t.prototype))||Ea(t)&&null===(t=t[Sa]))&&(t=void 0)),void 0===t?ka:t},Oa=function(e,t){return new(Ra(e))(0===t?0:t)},Fa=sa,Ma=Ee,Ia=St,Da=Zr,La=Oa,ja=me([].push),Ba=function(e){var t=1==e,n=2==e,r=3==e,o=4==e,i=6==e,a=7==e,s=5==e||i;return function(u,c,l,f){for(var h,d,p=Ia(u),v=Ma(p),g=Fa(c,l),m=Da(v),y=0,b=f||La,w=t?b(u,m):n||a?b(u,0):void 0;m>y;y++)if((s||y in v)&&(d=g(h=v[y],y,p),e))if(t)w[y]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:ja(w,h)}else switch(e){case 4:return!1;case 7:ja(w,h)}return i?-1:r||o?o:w}},Na={forEach:Ba(0),map:Ba(1),filter:Ba(2),some:Ba(3),every:Ba(4),find:Ba(5),findIndex:Ba(6),filterReject:Ba(7)},Va=Wo,Ua=J,Wa=oe,za=me,Ha=ee,Ga=Je,Xa=$,Qa=Ot,Ya=Ve,qa=Sn,Ka=Fe,Ja=an,Za=ti,$a=fe,es=Ci,ts=ii,ns=Vr,rs=_i,os=po,is=Z,as=xn,ss=ni,us=ie,cs=zn.exports,ls=yt.exports,fs=ir,hs=Lt,ds=Qt,ps=Wi,vs=Yi,gs=$i,ms=ra,ys=Tr,bs=Na.forEach,ws=or("hidden"),As="Symbol",xs=ys.set,Ts=ys.getterFor(As),Ps=Object.prototype,Cs=Ua.Symbol,_s=Cs&&Cs.prototype,Es=Ua.TypeError,Ss=Ua.QObject,ks=is.f,Rs=as.f,Os=rs.f,Fs=us.f,Ms=za([].push),Is=ls("symbols"),Ds=ls("op-symbols"),Ls=ls("wks"),js=!Ss||!Ss.prototype||!Ss.prototype.findChild,Bs=Ha&&Xa((function(){return 7!=es(Rs({},"a",{get:function(){return Rs(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=ks(Ps,t);r&&delete Ps[t],Rs(e,t,n),r&&e!==Ps&&Rs(Ps,t,r)}:Rs,Ns=function(e,t){var n=Is[e]=es(_s);return xs(n,{type:As,tag:e,description:t}),Ha||(n.description=t),n},Vs=function(e,t,n){e===Ps&&Vs(Ds,t,n),qa(e);var r=Ja(t);return qa(n),Qa(Is,r)?(n.enumerable?(Qa(e,ws)&&e[ws][r]&&(e[ws][r]=!1),n=es(n,{enumerable:$a(0,!1)})):(Qa(e,ws)||Rs(e,ws,$a(1,{})),e[ws][r]=!0),Bs(e,r,n)):Rs(e,r,n)},Us=function(e,t){qa(e);var n=Ka(t),r=ts(n).concat(Gs(n));return bs(r,(function(t){Ha&&!Wa(Ws,n,t)||Vs(e,t,n[t])})),e},Ws=function(e){var t=Ja(e),n=Wa(Fs,this,t);return!(this===Ps&&Qa(Is,t)&&!Qa(Ds,t))&&(!(n||!Qa(this,t)||!Qa(Is,t)||Qa(this,ws)&&this[ws][t])||n)},zs=function(e,t){var n=Ka(e),r=Ja(t);if(n!==Ps||!Qa(Is,r)||Qa(Ds,r)){var o=ks(n,r);return!o||!Qa(Is,r)||Qa(n,ws)&&n[ws][r]||(o.enumerable=!0),o}},Hs=function(e){var t=Os(Ka(e)),n=[];return bs(t,(function(e){Qa(Is,e)||Qa(fs,e)||Ms(n,e)})),n},Gs=function(e){var t=e===Ps,n=Os(t?Ds:Ka(e)),r=[];return bs(n,(function(e){!Qa(Is,e)||t&&!Qa(Ps,e)||Ms(r,Is[e])})),r};Ga||(Cs=function(){if(Ya(_s,this))throw Es("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Za(arguments[0]):void 0,t=hs(e),n=function e(n){this===Ps&&Wa(e,Ds,n),Qa(this,ws)&&Qa(this[ws],t)&&(this[ws][t]=!1),Bs(this,t,$a(1,n))};return Ha&&js&&Bs(Ps,t,{configurable:!0,set:n}),Ns(t,e)},cs(_s=Cs.prototype,"toString",(function(){return Ts(this).tag})),cs(Cs,"withoutSetter",(function(e){return Ns(hs(e),e)})),us.f=Ws,as.f=Vs,ss.f=Us,is.f=zs,ns.f=rs.f=Hs,os.f=Gs,ps.f=function(e){return Ns(ds(e),e)},Ha&&(Rs(_s,"description",{configurable:!0,get:function(){return Ts(this).description}}),cs(Ps,"propertyIsEnumerable",Ws,{unsafe:!0}))),Va({global:!0,wrap:!0,forced:!Ga,sham:!Ga},{Symbol:Cs}),bs(ts(Ls),(function(e){vs(e)})),Va({target:As,stat:!0,forced:!Ga},{useSetter:function(){js=!0},useSimple:function(){js=!1}}),Va({target:"Object",stat:!0,forced:!Ga,sham:!Ha},{create:function(e,t){return void 0===t?es(e):Us(es(e),t)},defineProperty:Vs,defineProperties:Us,getOwnPropertyDescriptor:zs}),Va({target:"Object",stat:!0,forced:!Ga},{getOwnPropertyNames:Hs}),gs(),ms(Cs,As),fs[ws]=!0;var Xs=Je&&!!Symbol.for&&!!Symbol.keyFor,Qs=Wo,Ys=Ne,qs=Ot,Ks=ti,Js=yt.exports,Zs=Xs,$s=Js("string-to-symbol-registry"),eu=Js("symbol-to-string-registry");Qs({target:"Symbol",stat:!0,forced:!Zs},{for:function(e){var t=Ks(e);if(qs($s,t))return $s[t];var n=Ys("Symbol")(t);return $s[t]=n,eu[n]=t,n}});var tu=Wo,nu=Ot,ru=ot,ou=at,iu=Xs,au=(0,yt.exports)("symbol-to-string-registry");tu({target:"Symbol",stat:!0,forced:!iu},{keyFor:function(e){if(!ru(e))throw TypeError(ou(e)+" is not a symbol");if(nu(au,e))return au[e]}});var su=te,uu=Function.prototype,cu=uu.apply,lu=uu.call,fu="object"==("undefined"==typeof Reflect?"undefined":S(Reflect))&&Reflect.apply||(su?lu.bind(cu):function(){return lu.apply(cu,arguments)}),hu=me([].slice),du=Wo,pu=Ne,vu=fu,gu=oe,mu=me,yu=$,bu=ca,wu=Me,Au=De,xu=ot,Tu=hu,Pu=Je,Cu=pu("JSON","stringify"),_u=mu(/./.exec),Eu=mu("".charAt),Su=mu("".charCodeAt),ku=mu("".replace),Ru=mu(1..toString),Ou=/[\uD800-\uDFFF]/g,Fu=/^[\uD800-\uDBFF]$/,Mu=/^[\uDC00-\uDFFF]$/,Iu=!Pu||yu((function(){var e=pu("Symbol")();return"[null]"!=Cu([e])||"{}"!=Cu({a:e})||"{}"!=Cu(Object(e))})),Du=yu((function(){return'"\\udf06\\ud834"'!==Cu("\udf06\ud834")||'"\\udead"'!==Cu("\udead")})),Lu=function(e,t){var n=Tu(arguments),r=t;if((Au(t)||void 0!==e)&&!xu(e))return bu(t)||(t=function(e,t){if(wu(r)&&(t=gu(r,this,e,t)),!xu(t))return t}),n[1]=t,vu(Cu,null,n)},ju=function(e,t,n){var r=Eu(n,t-1),o=Eu(n,t+1);return _u(Fu,e)&&!_u(Mu,o)||_u(Mu,e)&&!_u(Fu,r)?"\\u"+Ru(Su(e,0),16):e};Cu&&du({target:"JSON",stat:!0,forced:Iu||Du},{stringify:function(e,t,n){var r=Tu(arguments),o=vu(Iu?Lu:Cu,null,r);return Du&&"string"==typeof o?ku(o,Ou,ju):o}});var Bu=po,Nu=St;Wo({target:"Object",stat:!0,forced:!Je||$((function(){Bu.f(1)}))},{getOwnPropertySymbols:function(e){var t=Bu.f;return t?t(Nu(e)):[]}});var Vu=Wo,Uu=ee,Wu=J,zu=me,Hu=Ot,Gu=Me,Xu=Ve,Qu=ti,Yu=xn.f,qu=Co,Ku=Wu.Symbol,Ju=Ku&&Ku.prototype;if(Uu&&Gu(Ku)&&(!("description"in Ju)||void 0!==Ku().description)){var Zu={},$u=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Qu(arguments[0]),t=Xu(Ju,this)?new Ku(e):void 0===e?Ku():Ku(e);return""===e&&(Zu[t]=!0),t};qu($u,Ku),$u.prototype=Ju,Ju.constructor=$u;var ec="Symbol(test)"==String(Ku("test")),tc=zu(Ju.toString),nc=zu(Ju.valueOf),rc=/^Symbol\((.*)\)[^)]+$/,oc=zu("".replace),ic=zu("".slice);Yu(Ju,"description",{configurable:!0,get:function(){var e=nc(this),t=tc(e);if(Hu(Zu,e))return"";var n=ec?ic(t,7,-1):oc(t,rc,"$1");return""===n?void 0:n}}),Vu({global:!0,forced:!0},{Symbol:$u})}Yi("asyncIterator"),Yi("hasInstance"),Yi("isConcatSpreadable"),Yi("iterator"),Yi("match"),Yi("replace"),Yi("search"),Yi("species"),Yi("split");var ac=$i;Yi("toPrimitive"),ac();var sc=Ne,uc=ra;Yi("toStringTag"),uc(sc("Symbol"),"Symbol"),Yi("unscopables");var cc=$,lc=Ye,fc=Qt("species"),hc=function(e){return lc>=51||!cc((function(){var t=[];return(t.constructor={})[fc]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},dc=Wo,pc=J,vc=$,gc=ca,mc=De,yc=St,bc=Zr,wc=Ri,Ac=Oa,xc=hc,Tc=Ye,Pc=Qt("isConcatSpreadable"),Cc=9007199254740991,_c="Maximum allowed index exceeded",Ec=pc.TypeError,Sc=Tc>=51||!vc((function(){var e=[];return e[Pc]=!1,e.concat()[0]!==e})),kc=xc("concat"),Rc=function(e){if(!mc(e))return!1;var t=e[Pc];return void 0!==t?!!t:gc(e)};dc({target:"Array",proto:!0,forced:!Sc||!kc},{concat:function(e){var t,n,r,o,i,a=yc(this),s=Ac(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Rc(i=-1===t?a:arguments[t])){if(u+(o=bc(i))>Cc)throw Ec(_c);for(n=0;n<o;n++,u++)n in i&&wc(s,u,i[n])}else{if(u>=Cc)throw Ec(_c);wc(s,u++,i)}return s.length=u,s}});var Oc=St,Fc=Qr,Mc=Zr,Ic=Math.min,Dc=[].copyWithin||function(e,t){var n=Oc(this),r=Mc(n),o=Fc(e,r),i=Fc(t,r),a=arguments.length>2?arguments[2]:void 0,s=Ic((void 0===a?r:Fc(a,r))-i,r-o),u=1;for(i<o&&o<i+s&&(u=-1,i+=s-1,o+=s-1);s-- >0;)i in n?n[o]=n[i]:delete n[o],o+=u,i+=u;return n},Lc=Ci,jc=xn,Bc=Qt("unscopables"),Nc=Array.prototype;null==Nc[Bc]&&jc.f(Nc,Bc,{configurable:!0,value:Lc(null)});var Vc=function(e){Nc[Bc][e]=!0},Uc=Vc;Wo({target:"Array",proto:!0},{copyWithin:Dc}),Uc("copyWithin");var Wc=St,zc=Qr,Hc=Zr,Gc=function(e){for(var t=Wc(this),n=Hc(t),r=arguments.length,o=zc(r>1?arguments[1]:void 0,n),i=r>2?arguments[2]:void 0,a=void 0===i?n:zc(i,n);a>o;)t[o++]=e;return t},Xc=Vc;Wo({target:"Array",proto:!0},{fill:Gc}),Xc("fill");var Qc=Na.filter;Wo({target:"Array",proto:!0,forced:!hc("filter")},{filter:function(e){return Qc(this,e,arguments.length>1?arguments[1]:void 0)}});var Yc=Wo,qc=Na.find,Kc=Vc,Jc="find",Zc=!0;Jc in[]&&Array(1).find((function(){Zc=!1})),Yc({target:"Array",proto:!0,forced:Zc},{find:function(e){return qc(this,e,arguments.length>1?arguments[1]:void 0)}}),Kc(Jc);var $c=Wo,el=Na.findIndex,tl=Vc,nl="findIndex",rl=!0;nl in[]&&Array(1).findIndex((function(){rl=!1})),$c({target:"Array",proto:!0,forced:rl},{findIndex:function(e){return el(this,e,arguments.length>1?arguments[1]:void 0)}}),tl(nl);var ol=ca,il=Zr,al=sa,sl=J.TypeError,ul=function e(t,n,r,o,i,a,s,u){for(var c,l=i,f=0,h=!!s&&al(s,u);f<o;){if(f in r){if(c=h?h(r[f],f,n):r[f],a>0&&ol(c))l=e(t,n,c,il(c),l,a-1)-1;else{if(l>=9007199254740991)throw sl("Exceed the acceptable array length");t[l]=c}l++}f++}return l},cl=ul,ll=St,fl=Zr,hl=zr,dl=Oa;Wo({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=ll(this),n=fl(t),r=dl(t,0);return r.length=cl(r,t,t,n,0,void 0===e?1:hl(e)),r}});var pl=ul,vl=lt,gl=St,ml=Zr,yl=Oa;Wo({target:"Array",proto:!0},{flatMap:function(e){var t,n=gl(this),r=ml(n);return vl(e),(t=yl(n,0)).length=pl(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var bl=oe,wl=Sn,Al=ht,xl=function(e,t,n){var r,o;wl(e);try{if(!(r=Al(e,"return"))){if("throw"===t)throw n;return n}r=bl(r,e)}catch(i){o=!0,r=i}if("throw"===t)throw n;if(o)throw r;return wl(r),n},Tl=Sn,Pl=xl,Cl={},_l=Cl,El=Qt("iterator"),Sl=Array.prototype,kl=function(e){return void 0!==e&&(_l.Array===e||Sl[El]===e)},Rl=Zo,Ol=ht,Fl=Cl,Ml=Qt("iterator"),Il=function(e){if(null!=e)return Ol(e,Ml)||Ol(e,"@@iterator")||Fl[Rl(e)]},Dl=oe,Ll=lt,jl=Sn,Bl=at,Nl=Il,Vl=J.TypeError,Ul=function(e,t){var n=arguments.length<2?Nl(e):t;if(Ll(n))return jl(Dl(n,e));throw Vl(Bl(e)+" is not iterable")},Wl=sa,zl=oe,Hl=St,Gl=function(e,t,n,r){try{return r?t(Tl(n)[0],n[1]):t(n)}catch(o){Pl(e,"throw",o)}},Xl=kl,Ql=Ta,Yl=Zr,ql=Ri,Kl=Ul,Jl=Il,Zl=J.Array,$l=function(e){var t=Hl(e),n=Ql(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=void 0!==o;i&&(o=Wl(o,r>2?arguments[2]:void 0));var a,s,u,c,l,f,h=Jl(t),d=0;if(!h||this==Zl&&Xl(h))for(a=Yl(t),s=n?new this(a):Zl(a);a>d;d++)f=i?o(t[d],d):t[d],ql(s,d,f);else for(l=(c=Kl(t,h)).next,s=n?new this:[];!(u=zl(l,c)).done;d++)f=i?Gl(c,o,[u.value,d],!0):u.value,ql(s,d,f);return s.length=d,s},ef=Qt("iterator"),tf=!1;try{var nf=0,rf={next:function(){return{done:!!nf++}},return:function(){tf=!0}};rf[ef]=function(){return this},Array.from(rf,(function(){throw 2}))}catch(x3){}var of=function(e,t){if(!t&&!tf)return!1;var n=!1;try{var r={};r[ef]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(x3){}return n},af=$l;Wo({target:"Array",stat:!0,forced:!of((function(e){Array.from(e)}))},{from:af});var sf=ro.includes,uf=Vc;Wo({target:"Array",proto:!0},{includes:function(e){return sf(this,e,arguments.length>1?arguments[1]:void 0)}}),uf("includes");var cf=$,lf=function(e,t){var n=[][e];return!!n&&cf((function(){n.call(null,t||function(){return 1},1)}))},ff=Wo,hf=ro.indexOf,df=lf,pf=me([].indexOf),vf=!!pf&&1/pf([1],1,-0)<0,gf=df("indexOf");ff({target:"Array",proto:!0,forced:vf||!gf},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return vf?pf(this,e,t)||0:hf(this,e,t)}});var mf,yf,bf,wf=!$((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Af=J,xf=Ot,Tf=Me,Pf=St,Cf=wf,_f=or("IE_PROTO"),Ef=Af.Object,Sf=Ef.prototype,kf=Cf?Ef.getPrototypeOf:function(e){var t=Pf(e);if(xf(t,_f))return t[_f];var n=t.constructor;return Tf(n)&&t instanceof n?n.prototype:t instanceof Ef?Sf:null},Rf=$,Of=Me,Ff=kf,Mf=zn.exports,If=Qt("iterator"),Df=!1;[].keys&&("next"in(bf=[].keys())?(yf=Ff(Ff(bf)))!==Object.prototype&&(mf=yf):Df=!0);var Lf=null==mf||Rf((function(){var e={};return mf[If].call(e)!==e}));Lf&&(mf={}),Of(mf[If])||Mf(mf,If,(function(){return this}));var jf={IteratorPrototype:mf,BUGGY_SAFARI_ITERATORS:Df},Bf=jf.IteratorPrototype,Nf=Ci,Vf=fe,Uf=ra,Wf=Cl,zf=function(){return this},Hf=function(e,t,n,r){var o=t+" Iterator";return e.prototype=Nf(Bf,{next:Vf(+!r,n)}),Uf(e,o,!1),Wf[o]=zf,e},Gf=J,Xf=Me,Qf=Gf.String,Yf=Gf.TypeError,qf=function(e){if("object"==S(e)||Xf(e))return e;throw Yf("Can't set "+Qf(e)+" as a prototype")},Kf=me,Jf=Sn,Zf=qf,$f=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Kf(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(x3){}return function(n,r){return Jf(n),Zf(r),t?e(n,r):n.__proto__=r,n}}():void 0),eh=Wo,th=oe,nh=kr,rh=Me,oh=Hf,ih=kf,ah=$f,sh=ra,uh=Wn,ch=zn.exports,lh=Cl,fh=nh.PROPER,hh=nh.CONFIGURABLE,dh=jf.IteratorPrototype,ph=jf.BUGGY_SAFARI_ITERATORS,vh=Qt("iterator"),gh="keys",mh="values",yh="entries",bh=function(){return this},wh=function(e,t,n,r,o,i,a){oh(n,t,r);var s,u,c,l=function(e){if(e===o&&v)return v;if(!ph&&e in d)return d[e];switch(e){case gh:case mh:case yh:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[vh]||d["@@iterator"]||o&&d[o],v=!ph&&p||l(o),g="Array"==t&&d.entries||p;if(g&&(s=ih(g.call(new e)))!==Object.prototype&&s.next&&(ih(s)!==dh&&(ah?ah(s,dh):rh(s[vh])||ch(s,vh,bh)),sh(s,f,!0)),fh&&o==mh&&p&&p.name!==mh&&(hh?uh(d,"name",mh):(h=!0,v=function(){return th(p,this)})),o)if(u={values:l(mh),keys:i?v:l(gh),entries:l(yh)},a)for(c in u)(ph||h||!(c in d))&&ch(d,c,u[c]);else eh({target:t,proto:!0,forced:ph||h},u);return d[vh]!==v&&ch(d,vh,v,{name:o}),lh[t]=v,u},Ah=Fe,xh=Vc,Th=Cl,Ph=Tr,Ch=xn.f,_h=wh,Eh=ee,Sh="Array Iterator",kh=Ph.set,Rh=Ph.getterFor(Sh),Oh=_h(Array,"Array",(function(e,t){kh(this,{type:Sh,target:Ah(e),index:0,kind:t})}),(function(){var e=Rh(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),Fh=Th.Arguments=Th.Array;if(xh("keys"),xh("values"),xh("entries"),Eh&&"values"!==Fh.name)try{Ch(Fh,"name",{value:"values"})}catch(x3){}var Mh=Wo,Ih=Ee,Dh=Fe,Lh=lf,jh=me([].join),Bh=Ih!=Object,Nh=Lh("join",",");Mh({target:"Array",proto:!0,forced:Bh||!Nh},{join:function(e){return jh(Dh(this),void 0===e?",":e)}});var Vh=fu,Uh=Fe,Wh=zr,zh=Zr,Hh=lf,Gh=Math.min,Xh=[].lastIndexOf,Qh=!!Xh&&1/[1].lastIndexOf(1,-0)<0,Yh=Hh("lastIndexOf"),qh=Qh||!Yh?function(e){if(Qh)return Vh(Xh,this,arguments)||0;var t=Uh(this),n=zh(t),r=n-1;for(arguments.length>1&&(r=Gh(r,Wh(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:Xh;Wo({target:"Array",proto:!0,forced:qh!==[].lastIndexOf},{lastIndexOf:qh});var Kh=Na.map;Wo({target:"Array",proto:!0,forced:!hc("map")},{map:function(e){return Kh(this,e,arguments.length>1?arguments[1]:void 0)}});var Jh=Wo,Zh=$,$h=Ta,ed=Ri,td=J.Array;Jh({target:"Array",stat:!0,forced:Zh((function(){function e(){}return!(td.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new($h(this)?this:td)(t);t>e;)ed(n,e,arguments[e++]);return n.length=t,n}});var nd=lt,rd=St,od=Ee,id=Zr,ad=J.TypeError,sd=function(e){return function(t,n,r,o){nd(n);var i=rd(t),a=od(i),s=id(i),u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in a){o=a[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw ad("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in a&&(o=n(o,a[u],u,i));return o}},ud={left:sd(!1),right:sd(!0)},cd="process"==Ae(J.process),ld=ud.left,fd=Ye,hd=cd;Wo({target:"Array",proto:!0,forced:!lf("reduce")||!hd&&fd>79&&fd<83},{reduce:function(e){var t=arguments.length;return ld(this,e,t,t>1?arguments[1]:void 0)}});var dd=ud.right,pd=Ye,vd=cd;Wo({target:"Array",proto:!0,forced:!lf("reduceRight")||!vd&&pd>79&&pd<83},{reduceRight:function(e){return dd(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var gd=Wo,md=ca,yd=me([].reverse),bd=[1,2];gd({target:"Array",proto:!0,forced:String(bd)===String(bd.reverse())},{reverse:function(){return md(this)&&(this.length=this.length),yd(this)}});var wd=Wo,Ad=J,xd=ca,Td=Ta,Pd=De,Cd=Qr,_d=Zr,Ed=Fe,Sd=Ri,kd=Qt,Rd=hu,Od=hc("slice"),Fd=kd("species"),Md=Ad.Array,Id=Math.max;wd({target:"Array",proto:!0,forced:!Od},{slice:function(e,t){var n,r,o,i=Ed(this),a=_d(i),s=Cd(e,a),u=Cd(void 0===t?a:t,a);if(xd(i)&&(n=i.constructor,(Td(n)&&(n===Md||xd(n.prototype))||Pd(n)&&null===(n=n[Fd]))&&(n=void 0),n===Md||void 0===n))return Rd(i,s,u);for(r=new(void 0===n?Md:n)(Id(u-s,0)),o=0;s<u;s++,o++)s in i&&Sd(r,o,i[s]);return r.length=o,r}});var Dd=Li,Ld=Math.floor,jd=function(e,t){for(var n,r,o=e.length,i=1;i<o;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},Bd=function(e,t,n,r){for(var o=t.length,i=n.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?r(t[a],n[s])<=0?t[a++]:n[s++]:a<o?t[a++]:n[s++];return e},Nd=function e(t,n){var r=t.length,o=Ld(r/2);return r<8?jd(t,n):Bd(t,e(Dd(t,0,o),n),e(Dd(t,o),n),n)},Vd=Ue.match(/firefox\/(\d+)/i),Ud=!!Vd&&+Vd[1],Wd=/MSIE|Trident/.test(Ue),zd=Ue.match(/AppleWebKit\/(\d+)\./),Hd=!!zd&&+zd[1],Gd=Wo,Xd=me,Qd=lt,Yd=St,qd=Zr,Kd=ti,Jd=$,Zd=Nd,$d=lf,ep=Ud,tp=Wd,np=Ye,rp=Hd,op=[],ip=Xd(op.sort),ap=Xd(op.push),sp=Jd((function(){op.sort(void 0)})),up=Jd((function(){op.sort(null)})),cp=$d("sort"),lp=!Jd((function(){if(np)return np<70;if(!(ep&&ep>3)){if(tp)return!0;if(rp)return rp<603;var e,t,n,r,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)op.push({k:t+r,v:n})}for(op.sort((function(e,t){return t.v-e.v})),r=0;r<op.length;r++)t=op[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}}));Gd({target:"Array",proto:!0,forced:sp||!up||!cp||!lp},{sort:function(e){void 0!==e&&Qd(e);var t=Yd(this);if(lp)return void 0===e?ip(t):ip(t,e);var n,r,o=[],i=qd(t);for(r=0;r<i;r++)r in t&&ap(o,t[r]);for(Zd(o,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Kd(t)>Kd(n)?1:-1}}(e)),n=o.length,r=0;r<n;)t[r]=o[r++];for(;r<i;)delete t[r++];return t}});var fp=Ne,hp=xn,dp=ee,pp=Qt("species"),vp=function(e){var t=fp(e),n=hp.f;dp&&t&&!t[pp]&&n(t,pp,{configurable:!0,get:function(){return this}})};vp("Array");var gp=Wo,mp=J,yp=Qr,bp=zr,wp=Zr,Ap=St,xp=Oa,Tp=Ri,Pp=hc("splice"),Cp=mp.TypeError,_p=Math.max,Ep=Math.min,Sp=9007199254740991,kp="Maximum allowed length exceeded";gp({target:"Array",proto:!0,forced:!Pp},{splice:function(e,t){var n,r,o,i,a,s,u=Ap(this),c=wp(u),l=yp(e,c),f=arguments.length;if(0===f?n=r=0:1===f?(n=0,r=c-l):(n=f-2,r=Ep(_p(bp(t),0),c-l)),c+n-r>Sp)throw Cp(kp);for(o=xp(u,r),i=0;i<r;i++)(a=l+i)in u&&Tp(o,i,u[a]);if(o.length=r,n<r){for(i=l;i<c-r;i++)s=i+n,(a=i+r)in u?u[s]=u[a]:delete u[s];for(i=c;i>c-r+n;i--)delete u[i-1]}else if(n>r)for(i=c-r;i>l;i--)s=i+n-1,(a=i+r-1)in u?u[s]=u[a]:delete u[s];for(i=0;i<n;i++)u[i+l]=arguments[i+2];return u.length=c-r+n,o}}),Vc("flat"),Vc("flatMap");var Rp="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Op=zn.exports,Fp=function(e,t,n){for(var r in t)Op(e,r,t[r],n);return e},Mp=Ve,Ip=J.TypeError,Dp=function(e,t){if(Mp(t,e))return e;throw Ip("Incorrect invocation")},Lp=zr,jp=Kr,Bp=J.RangeError,Np=function(e){if(void 0===e)return 0;var t=Lp(e),n=jp(t);if(t!==n)throw Bp("Wrong length or index");return n},Vp=J.Array,Up=Math.abs,Wp=Math.pow,zp=Math.floor,Hp=Math.log,Gp=Math.LN2,Xp={pack:function(e,t,n){var r,o,i,a=Vp(n),s=8*n-t-1,u=(1<<s)-1,c=u>>1,l=23===t?Wp(2,-24)-Wp(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=Up(e))!=e||e===1/0?(o=e!=e?1:0,r=u):(r=zp(Hp(e)/Gp),e*(i=Wp(2,-r))<1&&(r--,i*=2),(e+=r+c>=1?l/i:l*Wp(2,1-c))*i>=2&&(r++,i/=2),r+c>=u?(o=0,r=u):r+c>=1?(o=(e*i-1)*Wp(2,t),r+=c):(o=e*Wp(2,c-1)*Wp(2,t),r=0));t>=8;)a[h++]=255&o,o/=256,t-=8;for(r=r<<t|o,s+=t;s>0;)a[h++]=255&r,r/=256,s-=8;return a[--h]|=128*f,a},unpack:function(e,t){var n,r=e.length,o=8*r-t-1,i=(1<<o)-1,a=i>>1,s=o-7,u=r-1,c=e[u--],l=127&c;for(c>>=7;s>0;)l=256*l+e[u--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;s>0;)n=256*n+e[u--],s-=8;if(0===l)l=1-a;else{if(l===i)return n?NaN:c?-1/0:1/0;n+=Wp(2,t),l-=a}return(c?-1:1)*n*Wp(2,l-t)}},Qp=J,Yp=me,qp=ee,Kp=Rp,Jp=kr,Zp=Wn,$p=Fp,ev=$,tv=Dp,nv=zr,rv=Kr,ov=Np,iv=Xp,av=kf,sv=$f,uv=Vr.f,cv=xn.f,lv=Gc,fv=Li,hv=ra,dv=Jp.PROPER,pv=Jp.CONFIGURABLE,vv=Tr.get,gv=Tr.set,mv="ArrayBuffer",yv="DataView",bv="Wrong index",wv=Qp.ArrayBuffer,Av=wv,xv=Av&&Av.prototype,Tv=Qp.DataView,Pv=Tv&&Tv.prototype,Cv=Object.prototype,_v=Qp.Array,Ev=Qp.RangeError,Sv=Yp(lv),kv=Yp([].reverse),Rv=iv.pack,Ov=iv.unpack,Fv=function(e){return[255&e]},Mv=function(e){return[255&e,e>>8&255]},Iv=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Dv=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Lv=function(e){return Rv(e,23,4)},jv=function(e){return Rv(e,52,8)},Bv=function(e,t){cv(e.prototype,t,{get:function(){return vv(this)[t]}})},Nv=function(e,t,n,r){var o=ov(n),i=vv(e);if(o+t>i.byteLength)throw Ev(bv);var a=vv(i.buffer).bytes,s=o+i.byteOffset,u=fv(a,s,s+t);return r?u:kv(u)},Vv=function(e,t,n,r,o,i){var a=ov(n),s=vv(e);if(a+t>s.byteLength)throw Ev(bv);for(var u=vv(s.buffer).bytes,c=a+s.byteOffset,l=r(+o),f=0;f<t;f++)u[c+f]=l[i?f:t-f-1]};if(Kp){var Uv=dv&&wv.name!==mv;if(ev((function(){wv(1)}))&&ev((function(){new wv(-1)}))&&!ev((function(){return new wv,new wv(1.5),new wv(NaN),Uv&&!pv})))Uv&&pv&&Zp(wv,"name",mv);else{(Av=function(e){return tv(this,xv),new wv(ov(e))}).prototype=xv;for(var Wv,zv=uv(wv),Hv=0;zv.length>Hv;)(Wv=zv[Hv++])in Av||Zp(Av,Wv,wv[Wv]);xv.constructor=Av}sv&&av(Pv)!==Cv&&sv(Pv,Cv);var Gv=new Tv(new Av(2)),Xv=Yp(Pv.setInt8);Gv.setInt8(0,2147483648),Gv.setInt8(1,2147483649),!Gv.getInt8(0)&&Gv.getInt8(1)||$p(Pv,{setInt8:function(e,t){Xv(this,e,t<<24>>24)},setUint8:function(e,t){Xv(this,e,t<<24>>24)}},{unsafe:!0})}else xv=(Av=function(e){tv(this,xv);var t=ov(e);gv(this,{bytes:Sv(_v(t),0),byteLength:t}),qp||(this.byteLength=t)}).prototype,Pv=(Tv=function(e,t,n){tv(this,Pv),tv(e,xv);var r=vv(e).byteLength,o=nv(t);if(o<0||o>r)throw Ev("Wrong offset");if(o+(n=void 0===n?r-o:rv(n))>r)throw Ev("Wrong length");gv(this,{buffer:e,byteLength:n,byteOffset:o}),qp||(this.buffer=e,this.byteLength=n,this.byteOffset=o)}).prototype,qp&&(Bv(Av,"byteLength"),Bv(Tv,"buffer"),Bv(Tv,"byteLength"),Bv(Tv,"byteOffset")),$p(Pv,{getInt8:function(e){return Nv(this,1,e)[0]<<24>>24},getUint8:function(e){return Nv(this,1,e)[0]},getInt16:function(e){var t=Nv(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Nv(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Dv(Nv(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Dv(Nv(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Ov(Nv(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Ov(Nv(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Vv(this,1,e,Fv,t)},setUint8:function(e,t){Vv(this,1,e,Fv,t)},setInt16:function(e,t){Vv(this,2,e,Mv,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Vv(this,2,e,Mv,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Vv(this,4,e,Iv,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Vv(this,4,e,Iv,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Vv(this,4,e,Lv,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Vv(this,8,e,jv,t,arguments.length>2?arguments[2]:void 0)}});hv(Av,mv),hv(Tv,yv);var Qv={ArrayBuffer:Av,DataView:Tv},Yv=vp,qv="ArrayBuffer",Kv=Qv.ArrayBuffer;Wo({global:!0,forced:J.ArrayBuffer!==Kv},{ArrayBuffer:Kv}),Yv(qv);var Jv,Zv,$v,eg=Rp,tg=ee,ng=J,rg=Me,og=De,ig=Ot,ag=Zo,sg=at,ug=Wn,cg=zn.exports,lg=xn.f,fg=Ve,hg=kf,dg=$f,pg=Qt,vg=Lt,gg=ng.Int8Array,mg=gg&&gg.prototype,yg=ng.Uint8ClampedArray,bg=yg&&yg.prototype,wg=gg&&hg(gg),Ag=mg&&hg(mg),xg=Object.prototype,Tg=ng.TypeError,Pg=pg("toStringTag"),Cg=vg("TYPED_ARRAY_TAG"),_g=vg("TYPED_ARRAY_CONSTRUCTOR"),Eg=eg&&!!dg&&"Opera"!==ag(ng.opera),Sg=!1,kg={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Rg={BigInt64Array:8,BigUint64Array:8},Og=function(e){if(!og(e))return!1;var t=ag(e);return ig(kg,t)||ig(Rg,t)};for(Jv in kg)($v=(Zv=ng[Jv])&&Zv.prototype)?ug($v,_g,Zv):Eg=!1;for(Jv in Rg)($v=(Zv=ng[Jv])&&Zv.prototype)&&ug($v,_g,Zv);if((!Eg||!rg(wg)||wg===Function.prototype)&&(wg=function(){throw Tg("Incorrect invocation")},Eg))for(Jv in kg)ng[Jv]&&dg(ng[Jv],wg);if((!Eg||!Ag||Ag===xg)&&(Ag=wg.prototype,Eg))for(Jv in kg)ng[Jv]&&dg(ng[Jv].prototype,Ag);if(Eg&&hg(bg)!==Ag&&dg(bg,Ag),tg&&!ig(Ag,Pg))for(Jv in Sg=!0,lg(Ag,Pg,{get:function(){return og(this)?this[Cg]:void 0}}),kg)ng[Jv]&&ug(ng[Jv],Cg,Jv);var Fg={NATIVE_ARRAY_BUFFER_VIEWS:Eg,TYPED_ARRAY_CONSTRUCTOR:_g,TYPED_ARRAY_TAG:Sg&&Cg,aTypedArray:function(e){if(Og(e))return e;throw Tg("Target is not a typed array")},aTypedArrayConstructor:function(e){if(rg(e)&&(!dg||fg(wg,e)))return e;throw Tg(sg(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(tg){if(n)for(var o in kg){var i=ng[o];if(i&&ig(i.prototype,e))try{delete i.prototype[e]}catch(x3){try{i.prototype[e]=t}catch(a){}}}Ag[e]&&!n||cg(Ag,e,n?t:Eg&&mg[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(tg){if(dg){if(n)for(r in kg)if((o=ng[r])&&ig(o,e))try{delete o[e]}catch(x3){}if(wg[e]&&!n)return;try{return cg(wg,e,n?t:Eg&&wg[e]||t)}catch(x3){}}for(r in kg)!(o=ng[r])||o[e]&&!n||cg(o,e,t)}},isView:function(e){if(!og(e))return!1;var t=ag(e);return"DataView"===t||ig(kg,t)||ig(Rg,t)},isTypedArray:Og,TypedArray:wg,TypedArrayPrototype:Ag};Wo({target:"ArrayBuffer",stat:!0,forced:!Fg.NATIVE_ARRAY_BUFFER_VIEWS},{isView:Fg.isView});var Mg=Ta,Ig=at,Dg=J.TypeError,Lg=function(e){if(Mg(e))return e;throw Dg(Ig(e)+" is not a constructor")},jg=Sn,Bg=Lg,Ng=Qt("species"),Vg=function(e,t){var n,r=jg(e).constructor;return void 0===r||null==(n=jg(r)[Ng])?t:Bg(n)},Ug=Wo,Wg=me,zg=$,Hg=Sn,Gg=Qr,Xg=Kr,Qg=Vg,Yg=Qv.ArrayBuffer,qg=Qv.DataView,Kg=qg.prototype,Jg=Wg(Yg.prototype.slice),Zg=Wg(Kg.getUint8),$g=Wg(Kg.setUint8);Ug({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:zg((function(){return!new Yg(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(Jg&&void 0===t)return Jg(Hg(this),e);for(var n=Hg(this).byteLength,r=Gg(e,n),o=Gg(void 0===t?n:t,n),i=new(Qg(this,Yg))(Xg(o-r)),a=new qg(this),s=new qg(i),u=0;r<o;)$g(s,u++,Zg(a,r++));return i}});var em=St,tm=nn;Wo({target:"Date",proto:!0,forced:$((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=em(this),n=tm(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}});var nm=Sn,rm=mt,om=J.TypeError,im=Ot,am=zn.exports,sm=function(e){if(nm(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw om("Incorrect hint");return rm(this,e)},um=Qt("toPrimitive"),cm=Date.prototype;im(cm,um)||am(cm,um,sm);var lm=Me,fm=De,hm=xn,dm=kf,pm=Qt("hasInstance"),vm=Function.prototype;pm in vm||hm.f(vm,pm,{value:function(e){if(!lm(this)||!fm(e))return!1;var t=this.prototype;if(!fm(t))return e instanceof this;for(;e=dm(e);)if(t===e)return!0;return!1}});var gm=ee,mm=kr.EXISTS,ym=me,bm=xn.f,wm=Function.prototype,Am=ym(wm.toString),xm=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Tm=ym(xm.exec);gm&&!mm&&bm(wm,"name",{configurable:!0,get:function(){try{return Tm(xm,Am(this))[1]}catch(x3){return""}}}),ra(J.JSON,"JSON",!0);var Pm={exports:{}},Cm=$((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),_m=$,Em=De,Sm=Ae,km=Cm,Rm=Object.isExtensible,Om=_m((function(){Rm(1)}))||km?function(e){return!!Em(e)&&((!km||"ArrayBuffer"!=Sm(e))&&(!Rm||Rm(e)))}:Rm,Fm=!$((function(){return Object.isExtensible(Object.preventExtensions({}))})),Mm=Wo,Im=me,Dm=ir,Lm=De,jm=Ot,Bm=xn.f,Nm=Vr,Vm=_i,Um=Om,Wm=Fm,zm=!1,Hm=Lt("meta"),Gm=0,Xm=function(e){Bm(e,Hm,{value:{objectID:"O"+Gm++,weakData:{}}})},Qm=Pm.exports={enable:function(){Qm.enable=function(){},zm=!0;var e=Nm.f,t=Im([].splice),n={};n[Hm]=1,e(n).length&&(Nm.f=function(n){for(var r=e(n),o=0,i=r.length;o<i;o++)if(r[o]===Hm){t(r,o,1);break}return r},Mm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Vm.f}))},fastKey:function(e,t){if(!Lm(e))return"symbol"==S(e)?e:("string"==typeof e?"S":"P")+e;if(!jm(e,Hm)){if(!Um(e))return"F";if(!t)return"E";Xm(e)}return e[Hm].objectID},getWeakData:function(e,t){if(!jm(e,Hm)){if(!Um(e))return!0;if(!t)return!1;Xm(e)}return e[Hm].weakData},onFreeze:function(e){return Wm&&zm&&Um(e)&&!jm(e,Hm)&&Xm(e),e}};Dm[Hm]=!0;var Ym=sa,qm=oe,Km=Sn,Jm=at,Zm=kl,$m=Zr,ey=Ve,ty=Ul,ny=Il,ry=xl,oy=J.TypeError,iy=function(e,t){this.stopped=e,this.result=t},ay=iy.prototype,sy=function(e,t,n){var r,o,i,a,s,u,c,l=n&&n.that,f=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),p=Ym(t,l),v=function(e){return r&&ry(r,"normal",e),new iy(!0,e)},g=function(e){return f?(Km(e),d?p(e[0],e[1],v):p(e[0],e[1])):d?p(e,v):p(e)};if(h)r=e;else{if(!(o=ny(e)))throw oy(Jm(e)+" is not iterable");if(Zm(o)){for(i=0,a=$m(e);a>i;i++)if((s=g(e[i]))&&ey(ay,s))return s;return new iy(!1)}r=ty(e,o)}for(u=r.next;!(c=qm(u,r)).done;){try{s=g(c.value)}catch(x3){ry(r,"throw",x3)}if("object"==S(s)&&s&&ey(ay,s))return s}return new iy(!1)},uy=Me,cy=De,ly=$f,fy=function(e,t,n){var r,o;return ly&&uy(r=t.constructor)&&r!==n&&cy(o=r.prototype)&&o!==n.prototype&&ly(e,o),e},hy=Wo,dy=J,py=me,vy=Io,gy=zn.exports,my=Pm.exports,yy=sy,by=Dp,wy=Me,Ay=De,xy=$,Ty=of,Py=ra,Cy=fy,_y=function(e,t,n){var r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=r?"set":"add",a=dy[e],s=a&&a.prototype,u=a,c={},l=function(e){var t=py(s[e]);gy(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!Ay(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return o&&!Ay(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!Ay(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(vy(e,!wy(a)||!(o||s.forEach&&!xy((function(){(new a).entries().next()})))))u=n.getConstructor(t,e,r,i),my.enable();else if(vy(e,!0)){var f=new u,h=f[i](o?{}:-0,1)!=f,d=xy((function(){f.has(1)})),p=Ty((function(e){new a(e)})),v=!o&&xy((function(){for(var e=new a,t=5;t--;)e[i](t,t);return!e.has(-0)}));p||((u=t((function(e,t){by(e,s);var n=Cy(new a,e,u);return null!=t&&yy(t,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=s,s.constructor=u),(d||v)&&(l("delete"),l("has"),r&&l("get")),(v||h)&&l(i),o&&s.clear&&delete s.clear}return c[e]=u,hy({global:!0,forced:u!=a},c),Py(u,e),o||n.setStrong(u,e,r),u},Ey=xn.f,Sy=Ci,ky=Fp,Ry=sa,Oy=Dp,Fy=sy,My=wh,Iy=vp,Dy=ee,Ly=Pm.exports.fastKey,jy=Tr.set,By=Tr.getterFor,Ny={getConstructor:function(e,t,n,r){var o=e((function(e,o){Oy(e,i),jy(e,{type:t,index:Sy(null),first:void 0,last:void 0,size:0}),Dy||(e.size=0),null!=o&&Fy(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=By(t),s=function(e,t,n){var r,o,i=a(e),s=u(e,t);return s?s.value=n:(i.last=s={index:o=Ly(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=s),r&&(r.next=s),Dy?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},u=function(e,t){var n,r=a(e),o=Ly(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return ky(i,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,Dy?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=u(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),Dy?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=Ry(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),ky(i,n?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),Dy&&Ey(i,"size",{get:function(){return a(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=By(t),i=By(r);My(e,t,(function(e,t){jy(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),Iy(t)}};_y("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Ny);var Vy=Math.log,Uy=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Vy(1+e)},Wy=Wo,zy=Uy,Hy=Math.acosh,Gy=Math.log,Xy=Math.sqrt,Qy=Math.LN2;Wy({target:"Math",stat:!0,forced:!Hy||710!=Math.floor(Hy(Number.MAX_VALUE))||Hy(1/0)!=1/0},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Gy(e)+Qy:zy(e-1+Xy(e-1)*Xy(e+1))}});var Yy=Wo,qy=Math.asinh,Ky=Math.log,Jy=Math.sqrt;Yy({target:"Math",stat:!0,forced:!(qy&&1/qy(0)>0)},{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Ky(t+Jy(t*t+1)):t}});var Zy=Wo,$y=Math.atanh,eb=Math.log;Zy({target:"Math",stat:!0,forced:!($y&&1/$y(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:eb((1+e)/(1-e))/2}});var tb=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1},nb=Wo,rb=tb,ob=Math.abs,ib=Math.pow;nb({target:"Math",stat:!0},{cbrt:function(e){return rb(e=+e)*ib(ob(e),1/3)}});var ab=Wo,sb=Math.floor,ub=Math.log,cb=Math.LOG2E;ab({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-sb(ub(e+.5)*cb):32}});var lb=Math.expm1,fb=Math.exp,hb=!lb||lb(10)>22025.465794806718||lb(10)<22025.465794806718||-2e-17!=lb(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:fb(e)-1}:lb,db=Wo,pb=hb,vb=Math.cosh,gb=Math.abs,mb=Math.E;db({target:"Math",stat:!0,forced:!vb||vb(710)===1/0},{cosh:function(e){var t=pb(gb(e)-1)+1;return(t+1/(t*mb*mb))*(mb/2)}});var yb=hb;Wo({target:"Math",stat:!0,forced:yb!=Math.expm1},{expm1:yb});var bb=tb,wb=Math.abs,Ab=Math.pow,xb=Ab(2,-52),Tb=Ab(2,-23),Pb=Ab(2,127)*(2-Tb),Cb=Ab(2,-126),_b=Math.fround||function(e){var t,n,r=wb(e),o=bb(e);return r<Cb?o*(r/Cb/Tb+1/xb-1/xb)*Cb*Tb:(n=(t=(1+Tb/xb)*r)-(t-r))>Pb||n!=n?o*(1/0):o*n};Wo({target:"Math",stat:!0},{fround:_b});var Eb=Wo,Sb=Math.hypot,kb=Math.abs,Rb=Math.sqrt;Eb({target:"Math",stat:!0,forced:!!Sb&&Sb(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,r,o=0,i=0,a=arguments.length,s=0;i<a;)s<(n=kb(arguments[i++]))?(o=o*(r=s/n)*r+1,s=n):o+=n>0?(r=n/s)*r:n;return s===1/0?1/0:s*Rb(o)}});var Ob=Wo,Fb=$,Mb=Math.imul;Ob({target:"Math",stat:!0,forced:Fb((function(){return-5!=Mb(4294967295,5)||2!=Mb.length}))},{imul:function(e,t){var n=65535,r=+e,o=+t,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)}});var Ib=Math.log,Db=Math.LOG10E;Wo({target:"Math",stat:!0},{log10:Math.log10||function(e){return Ib(e)*Db}}),Wo({target:"Math",stat:!0},{log1p:Uy});var Lb=Wo,jb=Math.log,Bb=Math.LN2;Lb({target:"Math",stat:!0},{log2:function(e){return jb(e)/Bb}}),Wo({target:"Math",stat:!0},{sign:tb});var Nb=Wo,Vb=$,Ub=hb,Wb=Math.abs,zb=Math.exp,Hb=Math.E;Nb({target:"Math",stat:!0,forced:Vb((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return Wb(e=+e)<1?(Ub(e)-Ub(-e))/2:(zb(e-1)-zb(-e-1))*(Hb/2)}});var Gb=Wo,Xb=hb,Qb=Math.exp;Gb({target:"Math",stat:!0},{tanh:function(e){var t=Xb(e=+e),n=Xb(-e);return t==1/0?1:n==1/0?-1:(t-n)/(Qb(e)+Qb(-e))}}),ra(Math,"Math",!0);var Yb=Wo,qb=Math.ceil,Kb=Math.floor;Yb({target:"Math",stat:!0},{trunc:function(e){return(e>0?Kb:qb)(e)}});var Jb=me(1..valueOf),Zb="\t\n\v\f\r                 \u2028\u2029\ufeff",$b=ke,ew=ti,tw=me("".replace),nw="[\t\n\v\f\r                 \u2028\u2029\ufeff]",rw=RegExp("^"+nw+nw+"*"),ow=RegExp(nw+nw+"*$"),iw=function(e){return function(t){var n=ew($b(t));return 1&e&&(n=tw(n,rw,"")),2&e&&(n=tw(n,ow,"")),n}},aw={start:iw(1),end:iw(2),trim:iw(3)},sw=ee,uw=J,cw=me,lw=Io,fw=zn.exports,hw=Ot,dw=fy,pw=Ve,vw=ot,gw=nn,mw=$,yw=Vr.f,bw=Z.f,ww=xn.f,Aw=Jb,xw=aw.trim,Tw="Number",Pw=uw.Number,Cw=Pw.prototype,_w=uw.TypeError,Ew=cw("".slice),Sw=cw("".charCodeAt),kw=function(e){var t=gw(e,"number");return"bigint"==typeof t?t:Rw(t)},Rw=function(e){var t,n,r,o,i,a,s,u,c=gw(e,"number");if(vw(c))throw _w("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=xw(c),43===(t=Sw(c,0))||45===t){if(88===(n=Sw(c,2))||120===n)return NaN}else if(48===t){switch(Sw(c,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+c}for(a=(i=Ew(c,2)).length,s=0;s<a;s++)if((u=Sw(i,s))<48||u>o)return NaN;return parseInt(i,r)}return+c};if(lw(Tw,!Pw(" 0o1")||!Pw("0b1")||Pw("+0x1"))){for(var Ow,Fw=function(e){var t=arguments.length<1?0:Pw(kw(e)),n=this;return pw(Cw,n)&&mw((function(){Aw(n)}))?dw(Object(t),n,Fw):t},Mw=sw?yw(Pw):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Iw=0;Mw.length>Iw;Iw++)hw(Pw,Ow=Mw[Iw])&&!hw(Fw,Ow)&&ww(Fw,Ow,bw(Pw,Ow));Fw.prototype=Cw,Cw.constructor=Fw,fw(uw,Tw,Fw)}Wo({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)});var Dw=J.isFinite,Lw=Number.isFinite||function(e){return"number"==typeof e&&Dw(e)};Wo({target:"Number",stat:!0},{isFinite:Lw});var jw=De,Bw=Math.floor,Nw=Number.isInteger||function(e){return!jw(e)&&isFinite(e)&&Bw(e)===e};Wo({target:"Number",stat:!0},{isInteger:Nw}),Wo({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Vw=Wo,Uw=Nw,Ww=Math.abs;Vw({target:"Number",stat:!0},{isSafeInteger:function(e){return Uw(e)&&Ww(e)<=9007199254740991}}),Wo({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991}),Wo({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991});var zw=J,Hw=$,Gw=ti,Xw=aw.trim,Qw=me("".charAt),Yw=zw.parseFloat,qw=zw.Symbol,Kw=qw&&qw.iterator,Jw=1/Yw("\t\n\v\f\r                 \u2028\u2029\ufeff-0")!=-1/0||Kw&&!Hw((function(){Yw(Object(Kw))}))?function(e){var t=Xw(Gw(e)),n=Yw(t);return 0===n&&"-"==Qw(t,0)?-0:n}:Yw,Zw=Jw;Wo({target:"Number",stat:!0,forced:Number.parseFloat!=Zw},{parseFloat:Zw});var $w=J,eA=$,tA=me,nA=ti,rA=aw.trim,oA=Zb,iA=$w.parseInt,aA=$w.Symbol,sA=aA&&aA.iterator,uA=/^[+-]?0x/i,cA=tA(uA.exec),lA=8!==iA(oA+"08")||22!==iA(oA+"0x16")||sA&&!eA((function(){iA(Object(sA))}))?function(e,t){var n=rA(nA(e));return iA(n,t>>>0||(cA(uA,n)?16:10))}:iA,fA=lA;Wo({target:"Number",stat:!0,forced:Number.parseInt!=fA},{parseInt:fA});var hA=zr,dA=ti,pA=ke,vA=J.RangeError,gA=function(e){var t=dA(pA(this)),n="",r=hA(e);if(r<0||r==1/0)throw vA("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},mA=Wo,yA=J,bA=me,wA=zr,AA=Jb,xA=gA,TA=$,PA=yA.RangeError,CA=yA.String,_A=Math.floor,EA=bA(xA),SA=bA("".slice),kA=bA(1..toFixed),RA=function e(t,n,r){return 0===n?r:n%2==1?e(t,n-1,r*t):e(t*t,n/2,r)},OA=function(e,t,n){for(var r=-1,o=n;++r<6;)o+=t*e[r],e[r]=o%1e7,o=_A(o/1e7)},FA=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=_A(r/t),r=r%t*1e7},MA=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=CA(e[t]);n=""===n?r:n+EA("0",7-r.length)+r}return n};mA({target:"Number",proto:!0,forced:TA((function(){return"0.000"!==kA(8e-5,3)||"1"!==kA(.9,0)||"1.25"!==kA(1.255,2)||"1000000000000000128"!==kA(0xde0b6b3a7640080,0)}))||!TA((function(){kA({})}))},{toFixed:function(e){var t,n,r,o,i=AA(this),a=wA(e),s=[0,0,0,0,0,0],u="",c="0";if(a<0||a>20)throw PA("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return CA(i);if(i<0&&(u="-",i=-i),i>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(i*RA(2,69,1))-69)<0?i*RA(2,-t,1):i/RA(2,t,1),n*=4503599627370496,(t=52-t)>0){for(OA(s,0,n),r=a;r>=7;)OA(s,1e7,0),r-=7;for(OA(s,RA(10,r,1),0),r=t-1;r>=23;)FA(s,1<<23),r-=23;FA(s,1<<r),OA(s,1,1),FA(s,2),c=MA(s)}else OA(s,0,n),OA(s,1<<-t,0),c=MA(s)+EA("0",a);return c=a>0?u+((o=c.length)<=a?"0."+EA("0",a-o)+c:SA(c,0,o-a)+"."+SA(c,o-a)):u+c}});var IA=ee,DA=me,LA=oe,jA=$,BA=ii,NA=po,VA=ie,UA=St,WA=Ee,zA=Object.assign,HA=Object.defineProperty,GA=DA([].concat),XA=!zA||jA((function(){if(IA&&1!==zA({b:1},zA(HA({},"a",{enumerable:!0,get:function(){HA(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=zA({},e)[n]||BA(zA({},t)).join("")!=r}))?function(e,t){for(var n=UA(e),r=arguments.length,o=1,i=NA.f,a=VA.f;r>o;)for(var s,u=WA(arguments[o++]),c=i?GA(BA(u),i(u)):BA(u),l=c.length,f=0;l>f;)s=c[f++],IA&&!LA(a,u,s)||(n[s]=u[s]);return n}:zA,QA=XA;Wo({target:"Object",stat:!0,forced:Object.assign!==QA},{assign:QA});var YA=J,qA=Hd,KA=!$((function(){if(!(qA&&qA<535)){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete YA[e]}})),JA=lt,ZA=St,$A=xn;ee&&Wo({target:"Object",proto:!0,forced:KA},{__defineGetter__:function(e,t){$A.f(ZA(this),e,{get:JA(t),enumerable:!0,configurable:!0})}});var ex=Wo,tx=ee,nx=ni.f;ex({target:"Object",stat:!0,forced:Object.defineProperties!==nx,sham:!tx},{defineProperties:nx});var rx=Wo,ox=ee,ix=xn.f;rx({target:"Object",stat:!0,forced:Object.defineProperty!==ix,sham:!ox},{defineProperty:ix});var ax=lt,sx=St,ux=xn;ee&&Wo({target:"Object",proto:!0,forced:KA},{__defineSetter__:function(e,t){ux.f(sx(this),e,{set:ax(t),enumerable:!0,configurable:!0})}});var cx=ee,lx=me,fx=ii,hx=Fe,dx=lx(ie.f),px=lx([].push),vx=function(e){return function(t){for(var n,r=hx(t),o=fx(r),i=o.length,a=0,s=[];i>a;)n=o[a++],cx&&!dx(r,n)||px(s,e?[n,r[n]]:r[n]);return s}},gx={entries:vx(!0),values:vx(!1)},mx=gx.entries;Wo({target:"Object",stat:!0},{entries:function(e){return mx(e)}});var yx=Wo,bx=Fm,wx=$,Ax=De,xx=Pm.exports.onFreeze,Tx=Object.freeze;yx({target:"Object",stat:!0,forced:wx((function(){Tx(1)})),sham:!bx},{freeze:function(e){return Tx&&Ax(e)?Tx(xx(e)):e}});var Px=sy,Cx=Ri;Wo({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Px(e,(function(e,n){Cx(t,e,n)}),{AS_ENTRIES:!0}),t}});var _x=Wo,Ex=$,Sx=Fe,kx=Z.f,Rx=ee,Ox=Ex((function(){kx(1)}));_x({target:"Object",stat:!0,forced:!Rx||Ox,sham:!Rx},{getOwnPropertyDescriptor:function(e,t){return kx(Sx(e),t)}});var Fx=wo,Mx=Fe,Ix=Z,Dx=Ri;Wo({target:"Object",stat:!0,sham:!ee},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Mx(e),o=Ix.f,i=Fx(r),a={},s=0;i.length>s;)void 0!==(n=o(r,t=i[s++]))&&Dx(a,t,n);return a}});var Lx=Wo,jx=$,Bx=_i.f;Lx({target:"Object",stat:!0,forced:jx((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:Bx});var Nx=St,Vx=kf,Ux=wf;Wo({target:"Object",stat:!0,forced:$((function(){Vx(1)})),sham:!Ux},{getPrototypeOf:function(e){return Vx(Nx(e))}});var Wx=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Wo({target:"Object",stat:!0},{is:Wx});var zx=Om;Wo({target:"Object",stat:!0,forced:Object.isExtensible!==zx},{isExtensible:zx});var Hx=Wo,Gx=$,Xx=De,Qx=Ae,Yx=Cm,qx=Object.isFrozen;Hx({target:"Object",stat:!0,forced:Gx((function(){qx(1)}))||Yx},{isFrozen:function(e){return!Xx(e)||(!(!Yx||"ArrayBuffer"!=Qx(e))||!!qx&&qx(e))}});var Kx=Wo,Jx=$,Zx=De,$x=Ae,eT=Cm,tT=Object.isSealed;Kx({target:"Object",stat:!0,forced:Jx((function(){tT(1)}))||eT},{isSealed:function(e){return!Zx(e)||(!(!eT||"ArrayBuffer"!=$x(e))||!!tT&&tT(e))}});var nT=St,rT=ii;Wo({target:"Object",stat:!0,forced:$((function(){rT(1)}))},{keys:function(e){return rT(nT(e))}});var oT=Wo,iT=ee,aT=KA,sT=St,uT=an,cT=kf,lT=Z.f;iT&&oT({target:"Object",proto:!0,forced:aT},{__lookupGetter__:function(e){var t,n=sT(this),r=uT(e);do{if(t=lT(n,r))return t.get}while(n=cT(n))}});var fT=Wo,hT=ee,dT=KA,pT=St,vT=an,gT=kf,mT=Z.f;hT&&fT({target:"Object",proto:!0,forced:dT},{__lookupSetter__:function(e){var t,n=pT(this),r=vT(e);do{if(t=mT(n,r))return t.set}while(n=gT(n))}});var yT=Wo,bT=De,wT=Pm.exports.onFreeze,AT=Fm,xT=$,TT=Object.preventExtensions;yT({target:"Object",stat:!0,forced:xT((function(){TT(1)})),sham:!AT},{preventExtensions:function(e){return TT&&bT(e)?TT(wT(e)):e}});var PT=Wo,CT=De,_T=Pm.exports.onFreeze,ET=Fm,ST=$,kT=Object.seal;PT({target:"Object",stat:!0,forced:ST((function(){kT(1)})),sham:!ET},{seal:function(e){return kT&&CT(e)?kT(_T(e)):e}}),Wo({target:"Object",stat:!0},{setPrototypeOf:$f});var RT=Zo,OT=Ho?{}.toString:function(){return"[object "+RT(this)+"]"},FT=Ho,MT=zn.exports,IT=OT;FT||MT(Object.prototype,"toString",IT,{unsafe:!0});var DT=gx.values;Wo({target:"Object",stat:!0},{values:function(e){return DT(e)}});Wo({global:!0,forced:parseFloat!=Jw},{parseFloat:Jw});Wo({global:!0,forced:parseInt!=lA},{parseInt:lA});var LT,jT,BT,NT,VT=J.TypeError,UT=function(e,t){if(e<t)throw VT("Not enough arguments");return e},WT=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ue),zT=J,HT=fu,GT=sa,XT=Me,QT=Ot,YT=$,qT=di,KT=hu,JT=ln,ZT=UT,$T=WT,eP=cd,tP=zT.setImmediate,nP=zT.clearImmediate,rP=zT.process,oP=zT.Dispatch,iP=zT.Function,aP=zT.MessageChannel,sP=zT.String,uP=0,cP={},lP="onreadystatechange";try{LT=zT.location}catch(x3){}var fP=function(e){if(QT(cP,e)){var t=cP[e];delete cP[e],t()}},hP=function(e){return function(){fP(e)}},dP=function(e){fP(e.data)},pP=function(e){zT.postMessage(sP(e),LT.protocol+"//"+LT.host)};tP&&nP||(tP=function(e){ZT(arguments.length,1);var t=XT(e)?e:iP(e),n=KT(arguments,1);return cP[++uP]=function(){HT(t,void 0,n)},jT(uP),uP},nP=function(e){delete cP[e]},eP?jT=function(e){rP.nextTick(hP(e))}:oP&&oP.now?jT=function(e){oP.now(hP(e))}:aP&&!$T?(NT=(BT=new aP).port2,BT.port1.onmessage=dP,jT=GT(NT.postMessage,NT)):zT.addEventListener&&XT(zT.postMessage)&&!zT.importScripts&&LT&&"file:"!==LT.protocol&&!YT(pP)?(jT=pP,zT.addEventListener("message",dP,!1)):jT=lP in JT("script")?function(e){qT.appendChild(JT("script")).onreadystatechange=function(){qT.removeChild(this),fP(e)}}:function(e){setTimeout(hP(e),0)});var vP,gP,mP,yP,bP,wP,AP,xP,TP={set:tP,clear:nP},PP=J,CP=/ipad|iphone|ipod/i.test(Ue)&&void 0!==PP.Pebble,_P=/web0s(?!.*chrome)/i.test(Ue),EP=J,SP=sa,kP=Z.f,RP=TP.set,OP=WT,FP=CP,MP=_P,IP=cd,DP=EP.MutationObserver||EP.WebKitMutationObserver,LP=EP.document,jP=EP.process,BP=EP.Promise,NP=kP(EP,"queueMicrotask"),VP=NP&&NP.value;VP||(vP=function(){var e,t;for(IP&&(e=jP.domain)&&e.exit();gP;){t=gP.fn,gP=gP.next;try{t()}catch(x3){throw gP?yP():mP=void 0,x3}}mP=void 0,e&&e.enter()},OP||IP||MP||!DP||!LP?!FP&&BP&&BP.resolve?((AP=BP.resolve(void 0)).constructor=BP,xP=SP(AP.then,AP),yP=function(){xP(vP)}):IP?yP=function(){jP.nextTick(vP)}:(RP=SP(RP,EP),yP=function(){RP(vP)}):(bP=!0,wP=LP.createTextNode(""),new DP(vP).observe(wP,{characterData:!0}),yP=function(){wP.data=bP=!bP}));var UP=VP||function(e){var t={fn:e,next:void 0};mP&&(mP.next=t),gP||(gP=t,yP()),mP=t},WP=J,zP=function(e,t){var n=WP.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},HP=function(e){try{return{error:!1,value:e()}}catch(x3){return{error:!0,value:x3}}},GP=function(){this.head=null,this.tail=null};GP.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var XP=GP,QP=J.Promise,YP="object"==("undefined"==typeof window?"undefined":S(window))&&"object"!=("undefined"==typeof Deno?"undefined":S(Deno)),qP=J,KP=QP,JP=Me,ZP=Io,$P=Kn,eC=Qt,tC=YP,nC=Ye;KP&&KP.prototype;var rC=eC("species"),oC=!1,iC=JP(qP.PromiseRejectionEvent),aC=ZP("Promise",(function(){var e=$P(KP),t=e!==String(KP);if(!t&&66===nC)return!0;if(nC>=51&&/native code/.test(e))return!1;var n=new KP((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[rC]=r,!(oC=n.then((function(){}))instanceof r)||!t&&tC&&!iC})),sC={CONSTRUCTOR:aC,REJECTION_EVENT:iC,SUBCLASSING:oC},uC={},cC=lt,lC=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=cC(t),this.reject=cC(n)};uC.f=function(e){return new lC(e)};var fC,hC,dC,pC=Wo,vC=cd,gC=J,mC=oe,yC=zn.exports,bC=Fp,wC=$f,AC=ra,xC=vp,TC=lt,PC=Me,CC=De,_C=Dp,EC=Vg,SC=TP.set,kC=UP,RC=zP,OC=HP,FC=XP,MC=Tr,IC=QP,DC=uC,LC="Promise",jC=sC.CONSTRUCTOR,BC=sC.REJECTION_EVENT,NC=sC.SUBCLASSING,VC=MC.getterFor(LC),UC=MC.set,WC=IC&&IC.prototype,zC=IC,HC=WC,GC=gC.TypeError,XC=gC.document,QC=gC.process,YC=DC.f,qC=YC,KC=!!(XC&&XC.createEvent&&gC.dispatchEvent),JC="unhandledrejection",ZC=function(e){var t;return!(!CC(e)||!PC(t=e.then))&&t},$C=function(e,t){var n,r,o,i=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&o_(t),t.rejection=1),!0===s?n=i:(l&&l.enter(),n=s(i),l&&(l.exit(),o=!0)),n===e.promise?c(GC("Promise-chain cycle")):(r=ZC(n))?mC(r,n,u,c):u(n)):c(i)}catch(x3){l&&!o&&l.exit(),c(x3)}},e_=function(e,t){e.notified||(e.notified=!0,kC((function(){for(var n,r=e.reactions;n=r.get();)$C(n,e);e.notified=!1,t&&!e.rejection&&n_(e)})))},t_=function(e,t,n){var r,o;KC?((r=XC.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),gC.dispatchEvent(r)):r={promise:t,reason:n},!BC&&(o=gC["on"+e])?o(r):e===JC&&RC("Unhandled promise rejection",n)},n_=function(e){mC(SC,gC,(function(){var t,n=e.facade,r=e.value;if(r_(e)&&(t=OC((function(){vC?QC.emit("unhandledRejection",r,n):t_(JC,n,r)})),e.rejection=vC||r_(e)?2:1,t.error))throw t.value}))},r_=function(e){return 1!==e.rejection&&!e.parent},o_=function(e){mC(SC,gC,(function(){var t=e.facade;vC?QC.emit("rejectionHandled",t):t_("rejectionhandled",t,e.value)}))},i_=function(e,t,n){return function(r){e(t,r,n)}},a_=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,e_(e,!0))},s_=function e(t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===n)throw GC("Promise can't be resolved itself");var o=ZC(n);o?kC((function(){var r={done:!1};try{mC(o,n,i_(e,r,t),i_(a_,r,t))}catch(x3){a_(r,x3,t)}})):(t.value=n,t.state=1,e_(t,!1))}catch(x3){a_({done:!1},x3,t)}}};if(jC&&(HC=(zC=function(e){_C(this,HC),TC(e),mC(fC,this);var t=VC(this);try{e(i_(s_,t),i_(a_,t))}catch(x3){a_(t,x3)}}).prototype,(fC=function(e){UC(this,{type:LC,done:!1,notified:!1,parent:!1,reactions:new FC,rejection:!1,state:0,value:void 0})}).prototype=bC(HC,{then:function(e,t){var n=VC(this),r=YC(EC(this,zC));return n.parent=!0,r.ok=!PC(e)||e,r.fail=PC(t)&&t,r.domain=vC?QC.domain:void 0,0==n.state?n.reactions.add(r):kC((function(){$C(r,n)})),r.promise}}),hC=function(){var e=new fC,t=VC(e);this.promise=e,this.resolve=i_(s_,t),this.reject=i_(a_,t)},DC.f=YC=function(e){return e===zC||undefined===e?new hC(e):qC(e)},PC(IC)&&WC!==Object.prototype)){dC=WC.then,NC||yC(WC,"then",(function(e,t){var n=this;return new zC((function(e,t){mC(dC,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete WC.constructor}catch(x3){}wC&&wC(WC,HC)}pC({global:!0,wrap:!0,forced:jC},{Promise:zC}),AC(zC,LC,!1),xC(LC);var u_=QP,c_=sC.CONSTRUCTOR||!of((function(e){u_.all(e).then(void 0,(function(){}))})),l_=oe,f_=lt,h_=uC,d_=HP,p_=sy;Wo({target:"Promise",stat:!0,forced:c_},{all:function(e){var t=this,n=h_.f(t),r=n.resolve,o=n.reject,i=d_((function(){var n=f_(t.resolve),i=[],a=0,s=1;p_(e,(function(e){var u=a++,c=!1;s++,l_(n,t,e).then((function(e){c||(c=!0,i[u]=e,--s||r(i))}),o)})),--s||r(i)}));return i.error&&o(i.value),n.promise}});var v_=Wo,g_=sC.CONSTRUCTOR,m_=QP,y_=Ne,b_=Me,w_=zn.exports,A_=m_&&m_.prototype;if(v_({target:"Promise",proto:!0,forced:g_,real:!0},{catch:function(e){return this.then(void 0,e)}}),b_(m_)){var x_=y_("Promise").prototype.catch;A_.catch!==x_&&w_(A_,"catch",x_,{unsafe:!0})}var T_=oe,P_=lt,C_=uC,__=HP,E_=sy;Wo({target:"Promise",stat:!0,forced:c_},{race:function(e){var t=this,n=C_.f(t),r=n.reject,o=__((function(){var o=P_(t.resolve);E_(e,(function(e){T_(o,t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var S_=oe,k_=uC;Wo({target:"Promise",stat:!0,forced:sC.CONSTRUCTOR},{reject:function(e){var t=k_.f(this);return S_(t.reject,void 0,e),t.promise}});var R_=Sn,O_=De,F_=uC,M_=function(e,t){if(R_(e),O_(t)&&t.constructor===e)return t;var n=F_.f(e);return(0,n.resolve)(t),n.promise},I_=Wo,D_=sC.CONSTRUCTOR,L_=M_;Ne("Promise"),I_({target:"Promise",stat:!0,forced:D_},{resolve:function(e){return L_(this,e)}});var j_=Wo,B_=QP,N_=$,V_=Ne,U_=Me,W_=Vg,z_=M_,H_=zn.exports,G_=B_&&B_.prototype;if(j_({target:"Promise",proto:!0,real:!0,forced:!!B_&&N_((function(){G_.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=W_(this,V_("Promise")),n=U_(e);return this.then(n?function(n){return z_(t,e()).then((function(){return n}))}:e,n?function(n){return z_(t,e()).then((function(){throw n}))}:e)}}),U_(B_)){var X_=V_("Promise").prototype.finally;G_.finally!==X_&&H_(G_,"finally",X_,{unsafe:!0})}var Q_=fu,Y_=lt,q_=Sn;Wo({target:"Reflect",stat:!0,forced:!$((function(){Reflect.apply((function(){}))}))},{apply:function(e,t,n){return Q_(Y_(e),t,q_(n))}});var K_=me,J_=lt,Z_=De,$_=Ot,eE=hu,tE=te,nE=J.Function,rE=K_([].concat),oE=K_([].join),iE={},aE=function(e,t,n){if(!$_(iE,t)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";iE[t]=nE("C,a","return new C("+oE(r,",")+")")}return iE[t](e,n)},sE=tE?nE.bind:function(e){var t=J_(this),n=t.prototype,r=eE(arguments,1),o=function(){var n=rE(r,eE(arguments));return this instanceof o?aE(t,n.length,n):t.apply(e,n)};return Z_(n)&&(o.prototype=n),o},uE=Wo,cE=fu,lE=sE,fE=Lg,hE=Sn,dE=De,pE=Ci,vE=$,gE=Ne("Reflect","construct"),mE=Object.prototype,yE=[].push,bE=vE((function(){function e(){}return!(gE((function(){}),[],e)instanceof e)})),wE=!vE((function(){gE((function(){}))})),AE=bE||wE;uE({target:"Reflect",stat:!0,forced:AE,sham:AE},{construct:function(e,t){fE(e),hE(t);var n=arguments.length<3?e:fE(arguments[2]);if(wE&&!bE)return gE(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return cE(yE,r,t),new(cE(lE,e,r))}var o=n.prototype,i=pE(dE(o)?o:mE),a=cE(e,i,t);return dE(a)?a:i}});var xE=ee,TE=Sn,PE=an,CE=xn;Wo({target:"Reflect",stat:!0,forced:$((function(){Reflect.defineProperty(CE.f({},1,{value:1}),1,{value:2})})),sham:!xE},{defineProperty:function(e,t,n){TE(e);var r=PE(t);TE(n);try{return CE.f(e,r,n),!0}catch(x3){return!1}}});var _E=Wo,EE=Sn,SE=Z.f;_E({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=SE(EE(e),t);return!(n&&!n.configurable)&&delete e[t]}});var kE=Ot,RE=function(e){return void 0!==e&&(kE(e,"value")||kE(e,"writable"))},OE=oe,FE=De,ME=Sn,IE=RE,DE=Z,LE=kf;Wo({target:"Reflect",stat:!0},{get:function e(t,n){var r,o,i=arguments.length<3?t:arguments[2];return ME(t)===i?t[n]:(r=DE.f(t,n))?IE(r)?r.value:void 0===r.get?void 0:OE(r.get,i):FE(o=LE(t))?e(o,n,i):void 0}});var jE=Sn,BE=Z;Wo({target:"Reflect",stat:!0,sham:!ee},{getOwnPropertyDescriptor:function(e,t){return BE.f(jE(e),t)}});var NE=Sn,VE=kf;Wo({target:"Reflect",stat:!0,sham:!wf},{getPrototypeOf:function(e){return VE(NE(e))}}),Wo({target:"Reflect",stat:!0},{has:function(e,t){return t in e}});var UE=Sn,WE=Om;Wo({target:"Reflect",stat:!0},{isExtensible:function(e){return UE(e),WE(e)}}),Wo({target:"Reflect",stat:!0},{ownKeys:wo});var zE=Ne,HE=Sn;Wo({target:"Reflect",stat:!0,sham:!Fm},{preventExtensions:function(e){HE(e);try{var t=zE("Object","preventExtensions");return t&&t(e),!0}catch(x3){return!1}}});var GE=Wo,XE=oe,QE=Sn,YE=De,qE=RE,KE=xn,JE=Z,ZE=kf,$E=fe;var eS=$((function(){var e=function(){},t=KE.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}));GE({target:"Reflect",stat:!0,forced:eS},{set:function e(t,n,r){var o,i,a,s=arguments.length<4?t:arguments[3],u=JE.f(QE(t),n);if(!u){if(YE(i=ZE(t)))return e(i,n,r,s);u=$E(0)}if(qE(u)){if(!1===u.writable||!YE(s))return!1;if(o=JE.f(s,n)){if(o.get||o.set||!1===o.writable)return!1;o.value=r,KE.f(s,n,o)}else KE.f(s,n,$E(0,r))}else{if(void 0===(a=u.set))return!1;XE(a,s,r)}return!0}});var tS=Sn,nS=qf,rS=$f;rS&&Wo({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){tS(e),nS(t);try{return rS(e,t),!0}catch(x3){return!1}}});var oS=De,iS=Ae,aS=Qt("match"),sS=function(e){var t;return oS(e)&&(void 0!==(t=e[aS])?!!t:"RegExp"==iS(e))},uS=Sn,cS=function(){var e=uS(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},lS=oe,fS=Ot,hS=Ve,dS=cS,pS=RegExp.prototype,vS=function(e){var t=e.flags;return void 0!==t||"flags"in pS||fS(e,"flags")||!hS(pS,e)?t:lS(dS,e)},gS=$,mS=J.RegExp,yS=gS((function(){var e=mS("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),bS=yS||gS((function(){return!mS("a","y").sticky})),wS={BROKEN_CARET:yS||gS((function(){var e=mS("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:bS,UNSUPPORTED_Y:yS},AS=xn.f,xS=$,TS=J.RegExp,PS=xS((function(){var e=TS(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),CS=$,_S=J.RegExp,ES=CS((function(){var e=_S("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),SS=ee,kS=J,RS=me,OS=Io,FS=fy,MS=Wn,IS=Vr.f,DS=Ve,LS=sS,jS=ti,BS=vS,NS=wS,VS=function(e,t,n){n in e||AS(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},US=zn.exports,WS=$,zS=Ot,HS=Tr.enforce,GS=vp,XS=PS,QS=ES,YS=Qt("match"),qS=kS.RegExp,KS=qS.prototype,JS=kS.SyntaxError,ZS=RS(KS.exec),$S=RS("".charAt),ek=RS("".replace),tk=RS("".indexOf),nk=RS("".slice),rk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,ok=/a/g,ik=/a/g,ak=new qS(ok)!==ok,sk=NS.MISSED_STICKY,uk=NS.UNSUPPORTED_Y,ck=SS&&(!ak||sk||XS||QS||WS((function(){return ik[YS]=!1,qS(ok)!=ok||qS(ik)==ik||"/a/i"!=qS(ok,"i")})));if(OS("RegExp",ck)){for(var lk=function(e,t){var n,r,o,i,a,s,u=DS(KS,this),c=LS(e),l=void 0===t,f=[],h=e;if(!u&&c&&l&&e.constructor===lk)return e;if((c||DS(KS,e))&&(e=e.source,l&&(t=BS(h))),e=void 0===e?"":jS(e),t=void 0===t?"":jS(t),h=e,XS&&"dotAll"in ok&&(r=!!t&&tk(t,"s")>-1)&&(t=ek(t,/s/g,"")),n=t,sk&&"sticky"in ok&&(o=!!t&&tk(t,"y")>-1)&&uk&&(t=ek(t,/y/g,"")),QS&&(i=function(e){for(var t,n=e.length,r=0,o="",i=[],a={},s=!1,u=!1,c=0,l="";r<=n;r++){if("\\"===(t=$S(e,r)))t+=$S(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:ZS(rk,nk(e,r+1))&&(r+=2,u=!0),o+=t,c++;continue;case">"===t&&u:if(""===l||zS(a,l))throw new JS("Invalid capture group name");a[l]=!0,i[i.length]=[l,c],u=!1,l="";continue}u?l+=t:o+=t}return[o,i]}(e),e=i[0],f=i[1]),a=FS(qS(e,t),u?this:KS,lk),(r||o||f.length)&&(s=HS(a),r&&(s.dotAll=!0,s.raw=lk(function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=$S(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+$S(e,++r);return o}(e),n)),o&&(s.sticky=!0),f.length&&(s.groups=f)),e!==h)try{MS(a,"source",""===h?"(?:)":h)}catch(x3){}return a},fk=IS(qS),hk=0;fk.length>hk;)VS(lk,qS,fk[hk++]);KS.constructor=lk,lk.prototype=KS,US(kS,"RegExp",lk)}GS("RegExp");var dk=oe,pk=me,vk=ti,gk=cS,mk=wS,yk=yt.exports,bk=Ci,wk=Tr.get,Ak=PS,xk=ES,Tk=yk("native-string-replace",String.prototype.replace),Pk=RegExp.prototype.exec,Ck=Pk,_k=pk("".charAt),Ek=pk("".indexOf),Sk=pk("".replace),kk=pk("".slice),Rk=function(){var e=/a/,t=/b*/g;return dk(Pk,e,"a"),dk(Pk,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Ok=mk.BROKEN_CARET,Fk=void 0!==/()??/.exec("")[1];(Rk||Fk||Ok||Ak||xk)&&(Ck=function(e){var t,n,r,o,i,a,s,u=this,c=wk(u),l=vk(e),f=c.raw;if(f)return f.lastIndex=u.lastIndex,t=dk(Ck,f,l),u.lastIndex=f.lastIndex,t;var h=c.groups,d=Ok&&u.sticky,p=dk(gk,u),v=u.source,g=0,m=l;if(d&&(p=Sk(p,"y",""),-1===Ek(p,"g")&&(p+="g"),m=kk(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==_k(l,u.lastIndex-1))&&(v="(?: "+v+")",m=" "+m,g++),n=new RegExp("^(?:"+v+")",p)),Fk&&(n=new RegExp("^"+v+"$(?!\\s)",p)),Rk&&(r=u.lastIndex),o=dk(Pk,d?n:u,m),d?o?(o.input=kk(o.input,g),o[0]=kk(o[0],g),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:Rk&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),Fk&&o&&o.length>1&&dk(Tk,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&h)for(o.groups=a=bk(null),i=0;i<h.length;i++)a[(s=h[i])[0]]=o[s[1]];return o});var Mk=Ck;Wo({target:"RegExp",proto:!0,forced:/./.exec!==Mk},{exec:Mk});var Ik=ee,Dk=xn,Lk=cS,jk=$,Bk=RegExp.prototype;Ik&&jk((function(){return"sy"!==Object.getOwnPropertyDescriptor(Bk,"flags").get.call({dotAll:!0,sticky:!0})}))&&Dk.f(Bk,"flags",{configurable:!0,get:Lk});var Nk=kr.PROPER,Vk=zn.exports,Uk=Sn,Wk=ti,zk=$,Hk=vS,Gk="toString",Xk=RegExp.prototype.toString,Qk=zk((function(){return"/a/b"!=Xk.call({source:"a",flags:"b"})})),Yk=Nk&&Xk.name!=Gk;(Qk||Yk)&&Vk(RegExp.prototype,Gk,(function(){var e=Uk(this);return"/"+Wk(e.source)+"/"+Wk(Hk(e))}),{unsafe:!0}),_y("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Ny);var qk=me,Kk=zr,Jk=ti,Zk=ke,$k=qk("".charAt),eR=qk("".charCodeAt),tR=qk("".slice),nR=function(e){return function(t,n){var r,o,i=Jk(Zk(t)),a=Kk(n),s=i.length;return a<0||a>=s?e?"":void 0:(r=eR(i,a))<55296||r>56319||a+1===s||(o=eR(i,a+1))<56320||o>57343?e?$k(i,a):r:e?tR(i,a,a+2):o-56320+(r-55296<<10)+65536}},rR={codeAt:nR(!1),charAt:nR(!0)},oR=rR.codeAt;Wo({target:"String",proto:!0},{codePointAt:function(e){return oR(this,e)}});var iR,aR=sS,sR=J.TypeError,uR=function(e){if(aR(e))throw sR("The method doesn't accept regular expressions");return e},cR=Qt("match"),lR=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[cR]=!1,"/./"[e](t)}catch(r){}}return!1},fR=Wo,hR=me,dR=Z.f,pR=Kr,vR=ti,gR=uR,mR=ke,yR=lR,bR=hR("".endsWith),wR=hR("".slice),AR=Math.min,xR=yR("endsWith");fR({target:"String",proto:!0,forced:!!(xR||(iR=dR(String.prototype,"endsWith"),!iR||iR.writable))&&!xR},{endsWith:function(e){var t=vR(mR(this));gR(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=void 0===n?r:AR(pR(n),r),i=vR(e);return bR?bR(t,i,o):wR(t,o-i.length,o)===i}});var TR=Wo,PR=me,CR=Qr,_R=J.RangeError,ER=String.fromCharCode,SR=String.fromCodePoint,kR=PR([].join);TR({target:"String",stat:!0,forced:!!SR&&1!=SR.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],CR(t,1114111)!==t)throw _R(t+" is not a valid code point");n[o]=t<65536?ER(t):ER(55296+((t-=65536)>>10),t%1024+56320)}return kR(n,"")}});var RR=Wo,OR=uR,FR=ke,MR=ti,IR=lR,DR=me("".indexOf);RR({target:"String",proto:!0,forced:!IR("includes")},{includes:function(e){return!!~DR(MR(FR(this)),MR(OR(e)),arguments.length>1?arguments[1]:void 0)}});var LR=rR.charAt,jR=ti,BR=Tr,NR=wh,VR="String Iterator",UR=BR.set,WR=BR.getterFor(VR);NR(String,"String",(function(e){UR(this,{type:VR,string:jR(e),index:0})}),(function(){var e,t=WR(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=LR(n,r),t.index+=e.length,{value:e,done:!1})}));var zR=me,HR=zn.exports,GR=Mk,XR=$,QR=Qt,YR=Wn,qR=QR("species"),KR=RegExp.prototype,JR=function(e,t,n,r){var o=QR(e),i=!XR((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!XR((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[qR]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!a||n){var s=zR(/./[o]),u=t(o,""[e],(function(e,t,n,r,o){var a=zR(e),u=t.exec;return u===GR||u===KR.exec?i&&!o?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}}));HR(String.prototype,e,u[0]),HR(KR,o,u[1])}r&&YR(KR[o],"sham",!0)},ZR=rR.charAt,$R=function(e,t,n){return t+(n?ZR(e,t).length:1)},eO=oe,tO=Sn,nO=Me,rO=Ae,oO=Mk,iO=J.TypeError,aO=function(e,t){var n=e.exec;if(nO(n)){var r=eO(n,e,t);return null!==r&&tO(r),r}if("RegExp"===rO(e))return eO(oO,e,t);throw iO("RegExp#exec called on incompatible receiver")},sO=oe,uO=Sn,cO=Kr,lO=ti,fO=ke,hO=ht,dO=$R,pO=aO;JR("match",(function(e,t,n){return[function(t){var n=fO(this),r=null==t?void 0:hO(t,e);return r?sO(r,t,n):new RegExp(t)[e](lO(n))},function(e){var r=uO(this),o=lO(e),i=n(t,r,o);if(i.done)return i.value;if(!r.global)return pO(r,o);var a=r.unicode;r.lastIndex=0;for(var s,u=[],c=0;null!==(s=pO(r,o));){var l=lO(s[0]);u[c]=l,""===l&&(r.lastIndex=dO(o,cO(r.lastIndex),a)),c++}return 0===c?null:u}]}));var vO=me,gO=Kr,mO=ti,yO=ke,bO=vO(gA),wO=vO("".slice),AO=Math.ceil,xO=function(e){return function(t,n,r){var o,i,a=mO(yO(t)),s=gO(n),u=a.length,c=void 0===r?" ":mO(r);return s<=u||""==c?a:((i=bO(c,AO((o=s-u)/c.length))).length>o&&(i=wO(i,0,o)),e?a+i:i+a)}},TO={start:xO(!1),end:xO(!0)},PO=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Ue),CO=TO.end;Wo({target:"String",proto:!0,forced:PO},{padEnd:function(e){return CO(this,e,arguments.length>1?arguments[1]:void 0)}});var _O=TO.start;Wo({target:"String",proto:!0,forced:PO},{padStart:function(e){return _O(this,e,arguments.length>1?arguments[1]:void 0)}});var EO=Wo,SO=me,kO=Fe,RO=St,OO=ti,FO=Zr,MO=SO([].push),IO=SO([].join);EO({target:"String",stat:!0},{raw:function(e){for(var t=kO(RO(e).raw),n=FO(t),r=arguments.length,o=[],i=0;n>i;){if(MO(o,OO(t[i++])),i===n)return IO(o,"");i<r&&MO(o,OO(arguments[i]))}}}),Wo({target:"String",proto:!0},{repeat:gA});var DO=me,LO=St,jO=Math.floor,BO=DO("".charAt),NO=DO("".replace),VO=DO("".slice),UO=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,WO=/\$([$&'`]|\d{1,2})/g,zO=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,u=WO;return void 0!==o&&(o=LO(o),u=UO),NO(i,u,(function(i,u){var c;switch(BO(u,0)){case"$":return"$";case"&":return e;case"`":return VO(t,0,n);case"'":return VO(t,a);case"<":c=o[VO(u,1,-1)];break;default:var l=+u;if(0===l)return i;if(l>s){var f=jO(l/10);return 0===f?i:f<=s?void 0===r[f-1]?BO(u,1):r[f-1]+BO(u,1):i}c=r[l-1]}return void 0===c?"":c}))},HO=fu,GO=oe,XO=me,QO=JR,YO=$,qO=Sn,KO=Me,JO=zr,ZO=Kr,$O=ti,eF=ke,tF=$R,nF=ht,rF=zO,oF=aO,iF=Qt("replace"),aF=Math.max,sF=Math.min,uF=XO([].concat),cF=XO([].push),lF=XO("".indexOf),fF=XO("".slice),hF="$0"==="a".replace(/./,"$0"),dF=!!/./[iF]&&""===/./[iF]("a","$0");QO("replace",(function(e,t,n){var r=dF?"$":"$0";return[function(e,n){var r=eF(this),o=null==e?void 0:nF(e,iF);return o?GO(o,e,r,n):GO(t,$O(r),e,n)},function(e,o){var i=qO(this),a=$O(e);if("string"==typeof o&&-1===lF(o,r)&&-1===lF(o,"$<")){var s=n(t,i,a,o);if(s.done)return s.value}var u=KO(o);u||(o=$O(o));var c=i.global;if(c){var l=i.unicode;i.lastIndex=0}for(var f=[];;){var h=oF(i,a);if(null===h)break;if(cF(f,h),!c)break;""===$O(h[0])&&(i.lastIndex=tF(a,ZO(i.lastIndex),l))}for(var d,p="",v=0,g=0;g<f.length;g++){for(var m=$O((h=f[g])[0]),y=aF(sF(JO(h.index),a.length),0),b=[],w=1;w<h.length;w++)cF(b,void 0===(d=h[w])?d:String(d));var A=h.groups;if(u){var x=uF([m],b,y,a);void 0!==A&&cF(x,A);var T=$O(HO(o,void 0,x))}else T=rF(m,a,y,b,A,o);y>=v&&(p+=fF(a,v,y)+T,v=y+m.length)}return p+fF(a,v)}]}),!!YO((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!hF||dF);var pF=oe,vF=Sn,gF=ke,mF=Wx,yF=ti,bF=ht,wF=aO;JR("search",(function(e,t,n){return[function(t){var n=gF(this),r=null==t?void 0:bF(t,e);return r?pF(r,t,n):new RegExp(t)[e](yF(n))},function(e){var r=vF(this),o=yF(e),i=n(t,r,o);if(i.done)return i.value;var a=r.lastIndex;mF(a,0)||(r.lastIndex=0);var s=wF(r,o);return mF(r.lastIndex,a)||(r.lastIndex=a),null===s?-1:s.index}]}));var AF=fu,xF=oe,TF=me,PF=JR,CF=sS,_F=Sn,EF=ke,SF=Vg,kF=$R,RF=Kr,OF=ti,FF=ht,MF=Li,IF=aO,DF=Mk,LF=$,jF=wS.UNSUPPORTED_Y,BF=4294967295,NF=Math.min,VF=[].push,UF=TF(/./.exec),WF=TF(VF),zF=TF("".slice),HF=!LF((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));PF("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=OF(EF(this)),o=void 0===n?BF:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!CF(e))return xF(t,r,e,o);for(var i,a,s,u=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,f=new RegExp(e.source,c+"g");(i=xF(DF,f,r))&&!((a=f.lastIndex)>l&&(WF(u,zF(r,l,i.index)),i.length>1&&i.index<r.length&&AF(VF,u,MF(i,1)),s=i[0].length,l=a,u.length>=o));)f.lastIndex===i.index&&f.lastIndex++;return l===r.length?!s&&UF(f,"")||WF(u,""):WF(u,zF(r,l)),u.length>o?MF(u,0,o):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:xF(t,this,e,n)}:t,[function(t,n){var o=EF(this),i=null==t?void 0:FF(t,e);return i?xF(i,t,o,n):xF(r,OF(o),t,n)},function(e,o){var i=_F(this),a=OF(e),s=n(r,i,a,o,r!==t);if(s.done)return s.value;var u=SF(i,RegExp),c=i.unicode,l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(jF?"g":"y"),f=new u(jF?"^(?:"+i.source+")":i,l),h=void 0===o?BF:o>>>0;if(0===h)return[];if(0===a.length)return null===IF(f,a)?[a]:[];for(var d=0,p=0,v=[];p<a.length;){f.lastIndex=jF?0:p;var g,m=IF(f,jF?zF(a,p):a);if(null===m||(g=NF(RF(f.lastIndex+(jF?p:0)),a.length))===d)p=kF(a,p,c);else{if(WF(v,zF(a,d,p)),v.length===h)return v;for(var y=1;y<=m.length-1;y++)if(WF(v,m[y]),v.length===h)return v;p=d=g}}return WF(v,zF(a,d)),v}]}),!HF,jF);var GF=Wo,XF=me,QF=Z.f,YF=Kr,qF=ti,KF=uR,JF=ke,ZF=lR,$F=XF("".startsWith),eM=XF("".slice),tM=Math.min,nM=ZF("startsWith"),rM=!nM&&!!function(){var e=QF(String.prototype,"startsWith");return e&&!e.writable}();GF({target:"String",proto:!0,forced:!rM&&!nM},{startsWith:function(e){var t=qF(JF(this));KF(e);var n=YF(tM(arguments.length>1?arguments[1]:void 0,t.length)),r=qF(e);return $F?$F(t,r,n):eM(t,n,n+r.length)===r}});var oM=kr.PROPER,iM=$,aM=Zb,sM=function(e){return iM((function(){return!!aM[e]()||"​…᠎"!=="​…᠎"[e]()||oM&&aM[e].name!==e}))},uM=aw.trim;Wo({target:"String",proto:!0,forced:sM("trim")},{trim:function(){return uM(this)}});var cM=aw.end,lM=sM("trimEnd")?function(){return cM(this)}:"".trimEnd;Wo({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==lM},{trimRight:lM});Wo({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==lM},{trimEnd:lM});var fM=aw.start,hM=sM("trimStart")?function(){return fM(this)}:"".trimStart;Wo({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==hM},{trimLeft:hM});Wo({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==hM},{trimStart:hM});var dM=ke,pM=ti,vM=/"/g,gM=me("".replace),mM=function(e,t,n,r){var o=pM(dM(e)),i="<"+t;return""!==n&&(i+=" "+n+'="'+gM(pM(r),vM,"&quot;")+'"'),i+">"+o+"</"+t+">"},yM=$,bM=function(e){return yM((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))},wM=mM;Wo({target:"String",proto:!0,forced:bM("anchor")},{anchor:function(e){return wM(this,"a","name",e)}});var AM=mM;Wo({target:"String",proto:!0,forced:bM("big")},{big:function(){return AM(this,"big","","")}});var xM=mM;Wo({target:"String",proto:!0,forced:bM("blink")},{blink:function(){return xM(this,"blink","","")}});var TM=mM;Wo({target:"String",proto:!0,forced:bM("bold")},{bold:function(){return TM(this,"b","","")}});var PM=mM;Wo({target:"String",proto:!0,forced:bM("fixed")},{fixed:function(){return PM(this,"tt","","")}});var CM=mM;Wo({target:"String",proto:!0,forced:bM("fontcolor")},{fontcolor:function(e){return CM(this,"font","color",e)}});var _M=mM;Wo({target:"String",proto:!0,forced:bM("fontsize")},{fontsize:function(e){return _M(this,"font","size",e)}});var EM=mM;Wo({target:"String",proto:!0,forced:bM("italics")},{italics:function(){return EM(this,"i","","")}});var SM=mM;Wo({target:"String",proto:!0,forced:bM("link")},{link:function(e){return SM(this,"a","href",e)}});var kM=mM;Wo({target:"String",proto:!0,forced:bM("small")},{small:function(){return kM(this,"small","","")}});var RM=mM;Wo({target:"String",proto:!0,forced:bM("strike")},{strike:function(){return RM(this,"strike","","")}});var OM=mM;Wo({target:"String",proto:!0,forced:bM("sub")},{sub:function(){return OM(this,"sub","","")}});var FM=mM;Wo({target:"String",proto:!0,forced:bM("sup")},{sup:function(){return FM(this,"sup","","")}});var MM={exports:{}},IM=J,DM=$,LM=of,jM=Fg.NATIVE_ARRAY_BUFFER_VIEWS,BM=IM.ArrayBuffer,NM=IM.Int8Array,VM=!jM||!DM((function(){NM(1)}))||!DM((function(){new NM(-1)}))||!LM((function(e){new NM,new NM(null),new NM(1.5),new NM(e)}),!0)||DM((function(){return 1!==new NM(new BM(2),1,void 0).length})),UM=zr,WM=J.RangeError,zM=function(e){var t=UM(e);if(t<0)throw WM("The argument can't be less than 0");return t},HM=J.RangeError,GM=function(e,t){var n=zM(e);if(n%t)throw HM("Wrong offset");return n},XM=sa,QM=oe,YM=Lg,qM=St,KM=Zr,JM=Ul,ZM=Il,$M=kl,eI=Fg.aTypedArrayConstructor,tI=function(e){var t,n,r,o,i,a,s=YM(this),u=qM(e),c=arguments.length,l=c>1?arguments[1]:void 0,f=void 0!==l,h=ZM(u);if(h&&!$M(h))for(a=(i=JM(u,h)).next,u=[];!(o=QM(a,i)).done;)u.push(o.value);for(f&&c>2&&(l=XM(l,arguments[2])),n=KM(u),r=new(eI(s))(n),t=0;n>t;t++)r[t]=f?l(u[t],t):u[t];return r},nI=Wo,rI=J,oI=oe,iI=ee,aI=VM,sI=Fg,uI=Qv,cI=Dp,lI=fe,fI=Wn,hI=Nw,dI=Kr,pI=Np,vI=GM,gI=an,mI=Ot,yI=Zo,bI=De,wI=ot,AI=Ci,xI=Ve,TI=$f,PI=Vr.f,CI=tI,_I=Na.forEach,EI=vp,SI=xn,kI=Z,RI=fy,OI=Tr.get,FI=Tr.set,MI=SI.f,II=kI.f,DI=Math.round,LI=rI.RangeError,jI=uI.ArrayBuffer,BI=jI.prototype,NI=uI.DataView,VI=sI.NATIVE_ARRAY_BUFFER_VIEWS,UI=sI.TYPED_ARRAY_CONSTRUCTOR,WI=sI.TYPED_ARRAY_TAG,zI=sI.TypedArray,HI=sI.TypedArrayPrototype,GI=sI.aTypedArrayConstructor,XI=sI.isTypedArray,QI="BYTES_PER_ELEMENT",YI="Wrong length",qI=function(e,t){GI(e);for(var n=0,r=t.length,o=new e(r);r>n;)o[n]=t[n++];return o},KI=function(e,t){MI(e,t,{get:function(){return OI(this)[t]}})},JI=function(e){var t;return xI(BI,e)||"ArrayBuffer"==(t=yI(e))||"SharedArrayBuffer"==t},ZI=function(e,t){return XI(e)&&!wI(t)&&t in e&&hI(+t)&&t>=0},$I=function(e,t){return t=gI(t),ZI(e,t)?lI(2,e[t]):II(e,t)},eD=function(e,t,n){return t=gI(t),!(ZI(e,t)&&bI(n)&&mI(n,"value"))||mI(n,"get")||mI(n,"set")||n.configurable||mI(n,"writable")&&!n.writable||mI(n,"enumerable")&&!n.enumerable?MI(e,t,n):(e[t]=n.value,e)};iI?(VI||(kI.f=$I,SI.f=eD,KI(HI,"buffer"),KI(HI,"byteOffset"),KI(HI,"byteLength"),KI(HI,"length")),nI({target:"Object",stat:!0,forced:!VI},{getOwnPropertyDescriptor:$I,defineProperty:eD}),MM.exports=function(e,t,n){var r=e.match(/\d+$/)[0]/8,o=e+(n?"Clamped":"")+"Array",i="get"+e,a="set"+e,s=rI[o],u=s,c=u&&u.prototype,l={},f=function(e,t){MI(e,t,{get:function(){return function(e,t){var n=OI(e);return n.view[i](t*r+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var i=OI(e);n&&(o=(o=DI(o))<0?0:o>255?255:255&o),i.view[a](t*r+i.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};VI?aI&&(u=t((function(e,t,n,o){return cI(e,c),RI(bI(t)?JI(t)?void 0!==o?new s(t,vI(n,r),o):void 0!==n?new s(t,vI(n,r)):new s(t):XI(t)?qI(u,t):oI(CI,u,t):new s(pI(t)),e,u)})),TI&&TI(u,zI),_I(PI(s),(function(e){e in u||fI(u,e,s[e])})),u.prototype=c):(u=t((function(e,t,n,o){cI(e,c);var i,a,s,l=0,h=0;if(bI(t)){if(!JI(t))return XI(t)?qI(u,t):oI(CI,u,t);i=t,h=vI(n,r);var d=t.byteLength;if(void 0===o){if(d%r)throw LI(YI);if((a=d-h)<0)throw LI(YI)}else if((a=dI(o)*r)+h>d)throw LI(YI);s=a/r}else s=pI(t),i=new jI(a=s*r);for(FI(e,{buffer:i,byteOffset:h,byteLength:a,length:s,view:new NI(i)});l<s;)f(e,l++)})),TI&&TI(u,zI),c=u.prototype=AI(HI)),c.constructor!==u&&fI(c,"constructor",u),fI(c,UI,u),WI&&fI(c,WI,o),l[o]=u,nI({global:!0,forced:u!=s,sham:!VI},l),QI in u||fI(u,QI,r),QI in c||fI(c,QI,r),EI(o)}):MM.exports=function(){},(0,MM.exports)("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,MM.exports)("Float64",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,MM.exports)("Int8",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,MM.exports)("Int16",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,MM.exports)("Int32",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,MM.exports)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,MM.exports)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0),(0,MM.exports)("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,MM.exports)("Uint32",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var tD=Fg,nD=me(Dc),rD=tD.aTypedArray;(0,tD.exportTypedArrayMethod)("copyWithin",(function(e,t){return nD(rD(this),e,t,arguments.length>2?arguments[2]:void 0)}));var oD=Na.every,iD=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("every",(function(e){return oD(iD(this),e,arguments.length>1?arguments[1]:void 0)}));var aD=oe,sD=Gc,uD=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return aD(sD,uD(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}));var cD=Zr,lD=Vg,fD=Fg.TYPED_ARRAY_CONSTRUCTOR,hD=Fg.aTypedArrayConstructor,dD=function(e){return hD(lD(e,e[fD]))},pD=function(e,t){for(var n=0,r=cD(t),o=new e(r);r>n;)o[n]=t[n++];return o},vD=dD,gD=Na.filter,mD=function(e,t){return pD(vD(e),t)},yD=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("filter",(function(e){var t=gD(yD(this),e,arguments.length>1?arguments[1]:void 0);return mD(this,t)}));var bD=Na.find,wD=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("find",(function(e){return bD(wD(this),e,arguments.length>1?arguments[1]:void 0)}));var AD=Na.findIndex,xD=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("findIndex",(function(e){return AD(xD(this),e,arguments.length>1?arguments[1]:void 0)}));var TD=Na.forEach,PD=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("forEach",(function(e){TD(PD(this),e,arguments.length>1?arguments[1]:void 0)})),(0,Fg.exportTypedArrayStaticMethod)("from",tI,VM);var CD=ro.includes,_D=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("includes",(function(e){return CD(_D(this),e,arguments.length>1?arguments[1]:void 0)}));var ED=ro.indexOf,SD=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("indexOf",(function(e){return ED(SD(this),e,arguments.length>1?arguments[1]:void 0)}));var kD=J,RD=$,OD=me,FD=Fg,MD=Oh,ID=Qt("iterator"),DD=kD.Uint8Array,LD=OD(MD.values),jD=OD(MD.keys),BD=OD(MD.entries),ND=FD.aTypedArray,VD=FD.exportTypedArrayMethod,UD=DD&&DD.prototype,WD=!RD((function(){UD[ID].call([1])})),zD=!!UD&&UD.values&&UD[ID]===UD.values&&"values"===UD.values.name,HD=function(){return LD(ND(this))};VD("entries",(function(){return BD(ND(this))}),WD),VD("keys",(function(){return jD(ND(this))}),WD),VD("values",HD,WD||!zD,{name:"values"}),VD(ID,HD,WD||!zD,{name:"values"});var GD=Fg.aTypedArray,XD=Fg.exportTypedArrayMethod,QD=me([].join);XD("join",(function(e){return QD(GD(this),e)}));var YD=fu,qD=qh,KD=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return YD(qD,KD(this),t>1?[e,arguments[1]]:[e])}));var JD=Na.map,ZD=dD,$D=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("map",(function(e){return JD($D(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(ZD(e))(t)}))}));var eL=Fg.aTypedArrayConstructor;(0,Fg.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(eL(this))(t);t>e;)n[e]=arguments[e++];return n}),VM);var tL=ud.left,nL=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return tL(nL(this),e,t,t>1?arguments[1]:void 0)}));var rL=ud.right,oL=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return rL(oL(this),e,t,t>1?arguments[1]:void 0)}));var iL=Fg.aTypedArray,aL=Fg.exportTypedArrayMethod,sL=Math.floor;aL("reverse",(function(){for(var e,t=this,n=iL(t).length,r=sL(n/2),o=0;o<r;)e=t[o],t[o++]=t[--n],t[n]=e;return t}));var uL=J,cL=oe,lL=Fg,fL=Zr,hL=GM,dL=St,pL=$,vL=uL.RangeError,gL=uL.Int8Array,mL=gL&&gL.prototype,yL=mL&&mL.set,bL=lL.aTypedArray,wL=lL.exportTypedArrayMethod,AL=!pL((function(){var e=new Uint8ClampedArray(2);return cL(yL,e,{length:1,0:3},1),3!==e[1]})),xL=AL&&lL.NATIVE_ARRAY_BUFFER_VIEWS&&pL((function(){var e=new gL(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));wL("set",(function(e){bL(this);var t=hL(arguments.length>1?arguments[1]:void 0,1),n=dL(e);if(AL)return cL(yL,this,n,t);var r=this.length,o=fL(n),i=0;if(o+t>r)throw vL("Wrong length");for(;i<o;)this[t+i]=n[i++]}),!AL||xL);var TL=dD,PL=hu,CL=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("slice",(function(e,t){for(var n=PL(CL(this),e,t),r=TL(this),o=0,i=n.length,a=new r(i);i>o;)a[o]=n[o++];return a}),$((function(){new Int8Array(1).slice()})));var _L=Na.some,EL=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("some",(function(e){return _L(EL(this),e,arguments.length>1?arguments[1]:void 0)}));var SL=me,kL=$,RL=lt,OL=Nd,FL=Ud,ML=Wd,IL=Ye,DL=Hd,LL=Fg.aTypedArray,jL=Fg.exportTypedArrayMethod,BL=J.Uint16Array,NL=BL&&SL(BL.prototype.sort),VL=!(!NL||kL((function(){NL(new BL(2),null)}))&&kL((function(){NL(new BL(2),{})}))),UL=!!NL&&!kL((function(){if(IL)return IL<74;if(FL)return FL<67;if(ML)return!0;if(DL)return DL<602;var e,t,n=new BL(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(NL(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));jL("sort",(function(e){return void 0!==e&&RL(e),UL?NL(this,e):OL(LL(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!UL||VL);var WL=Kr,zL=Qr,HL=dD,GL=Fg.aTypedArray;(0,Fg.exportTypedArrayMethod)("subarray",(function(e,t){var n=GL(this),r=n.length,o=zL(e,r);return new(HL(n))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,WL((void 0===t?r:zL(t,r))-o))}));var XL=fu,QL=Fg,YL=$,qL=hu,KL=J.Int8Array,JL=QL.aTypedArray,ZL=QL.exportTypedArrayMethod,$L=[].toLocaleString,ej=!!KL&&YL((function(){$L.call(new KL(1))}));ZL("toLocaleString",(function(){return XL($L,ej?qL(JL(this)):JL(this),qL(arguments))}),YL((function(){return[1,2].toLocaleString()!=new KL([1,2]).toLocaleString()}))||!YL((function(){KL.prototype.toLocaleString.call([1,2])})));var tj=Fg.exportTypedArrayMethod,nj=$,rj=me,oj=J.Uint8Array,ij=oj&&oj.prototype||{},aj=[].toString,sj=rj([].join);nj((function(){aj.call({})}))&&(aj=function(){return sj(this)});var uj=ij.toString!=aj;tj("toString",aj,uj);var cj=me,lj=Fp,fj=Pm.exports.getWeakData,hj=Sn,dj=De,pj=Dp,vj=sy,gj=Ot,mj=Tr.set,yj=Tr.getterFor,bj=Na.find,wj=Na.findIndex,Aj=cj([].splice),xj=0,Tj=function(e){return e.frozen||(e.frozen=new Pj)},Pj=function(){this.entries=[]},Cj=function(e,t){return bj(e.entries,(function(e){return e[0]===t}))};Pj.prototype={get:function(e){var t=Cj(this,e);if(t)return t[1]},has:function(e){return!!Cj(this,e)},set:function(e,t){var n=Cj(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=wj(this.entries,(function(t){return t[0]===e}));return~t&&Aj(this.entries,t,1),!!~t}};var _j,Ej={getConstructor:function(e,t,n,r){var o=e((function(e,o){pj(e,i),mj(e,{type:t,id:xj++,frozen:void 0}),null!=o&&vj(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=yj(t),s=function(e,t,n){var r=a(e),o=fj(hj(t),!0);return!0===o?Tj(r).set(t,n):o[r.id]=n,e};return lj(i,{delete:function(e){var t=a(this);if(!dj(e))return!1;var n=fj(e);return!0===n?Tj(t).delete(e):n&&gj(n,t.id)&&delete n[t.id]},has:function(e){var t=a(this);if(!dj(e))return!1;var n=fj(e);return!0===n?Tj(t).has(e):n&&gj(n,t.id)}}),lj(i,n?{get:function(e){var t=a(this);if(dj(e)){var n=fj(e);return!0===n?Tj(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),o}},Sj=J,kj=me,Rj=Fp,Oj=Pm.exports,Fj=_y,Mj=Ej,Ij=De,Dj=Om,Lj=Tr.enforce,jj=er,Bj=!Sj.ActiveXObject&&"ActiveXObject"in Sj,Nj=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Vj=Fj("WeakMap",Nj,Mj);if(jj&&Bj){_j=Mj.getConstructor(Nj,"WeakMap",!0),Oj.enable();var Uj=Vj.prototype,Wj=kj(Uj.delete),zj=kj(Uj.has),Hj=kj(Uj.get),Gj=kj(Uj.set);Rj(Uj,{delete:function(e){if(Ij(e)&&!Dj(e)){var t=Lj(this);return t.frozen||(t.frozen=new _j),Wj(this,e)||t.frozen.delete(e)}return Wj(this,e)},has:function(e){if(Ij(e)&&!Dj(e)){var t=Lj(this);return t.frozen||(t.frozen=new _j),zj(this,e)||t.frozen.has(e)}return zj(this,e)},get:function(e){if(Ij(e)&&!Dj(e)){var t=Lj(this);return t.frozen||(t.frozen=new _j),zj(this,e)?Hj(this,e):t.frozen.get(e)}return Hj(this,e)},set:function(e,t){if(Ij(e)&&!Dj(e)){var n=Lj(this);n.frozen||(n.frozen=new _j),zj(this,e)?Gj(this,e,t):n.frozen.set(e,t)}else Gj(this,e,t);return this}})}_y("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Ej);var Xj=Error,Qj=me("".replace),Yj=String(Xj("zxcasd").stack),qj=/\n\s*at [^:]*:[^\n]*/,Kj=qj.test(Yj),Jj=De,Zj=Wn,$j=ti,eB=fe,tB=!$((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",eB(1,7)),7!==e.stack)})),nB=Wo,rB=J,oB=Ve,iB=kf,aB=$f,sB=Co,uB=Ci,cB=Wn,lB=fe,fB=function(e,t){if(Kj&&"string"==typeof e&&!Xj.prepareStackTrace)for(;t--;)e=Qj(e,qj,"");return e},hB=function(e,t){Jj(t)&&"cause"in t&&Zj(e,"cause",t.cause)},dB=sy,pB=function(e,t){return void 0===e?arguments.length<2?"":t:$j(e)},vB=tB,gB=Qt("toStringTag"),mB=rB.Error,yB=[].push,bB=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,o=oB(wB,this);aB?n=aB(new mB,o?iB(this):wB):(n=o?this:uB(wB),cB(n,gB,"Error")),void 0!==t&&cB(n,"message",pB(t)),vB&&cB(n,"stack",fB(n.stack,1)),hB(n,r);var i=[];return dB(e,yB,{that:i}),cB(n,"errors",i),n};aB?aB(bB,mB):sB(bB,mB,{name:!0});var wB=bB.prototype=uB(mB.prototype,{constructor:lB(1,bB),message:lB(1,""),name:lB(1,"AggregateError")});nB({global:!0},{AggregateError:bB});var AB=ee,xB=Vc,TB=St,PB=Zr,CB=xn.f;AB&&(CB(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=TB(this),t=PB(e);return 0==t?0:t-1}}),xB("lastIndex"));var _B=ee,EB=Vc,SB=St,kB=Zr,RB=xn.f;_B&&(RB(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=SB(this),t=kB(e);return 0==t?void 0:e[t-1]},set:function(e){var t=SB(this),n=kB(t);return t[0==n?0:n-1]=e}}),EB("lastItem"));var OB=J,FB=Ne,MB=Ci,IB=De,DB=OB.Object,LB=OB.TypeError,jB=FB("Map"),BB=FB("WeakMap"),NB=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=MB(null)};NB.prototype.get=function(e,t){return this[e]||(this[e]=t())},NB.prototype.next=function(e,t,n){var r=n?this.objectsByIndex[e]||(this.objectsByIndex[e]=new BB):this.primitives||(this.primitives=new jB),o=r.get(t);return o||r.set(t,o=new NB),o};var VB=new NB,UB=function(){var e,t,n=VB,r=arguments.length;for(e=0;e<r;e++)IB(t=arguments[e])&&(n=n.next(e,t,!0));if(this===DB&&n===VB)throw LB("Composite keys must contain a non-primitive component");for(e=0;e<r;e++)IB(t=arguments[e])||(n=n.next(e,t,!1));return n},WB=Wo,zB=fu,HB=UB,GB=Ne,XB=Ci,QB=J.Object,YB=function(){var e=GB("Object","freeze");return e?e(XB(null)):XB(null)};WB({global:!0,forced:!0},{compositeKey:function(){return zB(HB,QB,arguments).get("object",YB)}});var qB=UB,KB=Ne,JB=fu;Wo({global:!0,forced:!0},{compositeSymbol:function(){return 1==arguments.length&&"string"==typeof arguments[0]?KB("Symbol").for(arguments[0]):JB(qB,null,arguments).get("symbol",KB("Symbol"))}}),Wo({global:!0},{globalThis:J});var ZB=oe,$B=lt,eN=Sn,tN=function(){for(var e,t=eN(this),n=$B(t.delete),r=!0,o=0,i=arguments.length;o<i;o++)e=ZB(n,t,arguments[o]),r=r&&e;return!!r};Wo({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:tN});var nN=oe,rN=function(e){return nN(Map.prototype.entries,e)},oN=Sn,iN=sa,aN=rN,sN=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=oN(this),n=aN(t),r=iN(e,arguments.length>1?arguments[1]:void 0);return!sN(n,(function(e,n,o){if(!r(n,e,t))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var uN=Ne,cN=sa,lN=oe,fN=lt,hN=Sn,dN=Vg,pN=rN,vN=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=hN(this),n=pN(t),r=cN(e,arguments.length>1?arguments[1]:void 0),o=new(dN(t,uN("Map"))),i=fN(o.set);return vN(n,(function(e,n){r(n,e,t)&&lN(i,o,e,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}});var gN=Sn,mN=sa,yN=rN,bN=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=gN(this),n=yN(t),r=mN(e,arguments.length>1?arguments[1]:void 0);return bN(n,(function(e,n,o){if(r(n,e,t))return o(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var wN=Sn,AN=sa,xN=rN,TN=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=wN(this),n=xN(t),r=AN(e,arguments.length>1?arguments[1]:void 0);return TN(n,(function(e,n,o){if(r(n,e,t))return o(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var PN=sa,CN=oe,_N=lt,EN=Lg,SN=sy,kN=[].push,RN=function(e){var t,n,r,o,i=arguments.length,a=i>1?arguments[1]:void 0;return EN(this),(t=void 0!==a)&&_N(a),null==e?new this:(n=[],t?(r=0,o=PN(a,i>2?arguments[2]:void 0),SN(e,(function(e){CN(kN,n,o(e,r++))}))):SN(e,kN,{that:n}),new this(n))};Wo({target:"Map",stat:!0,forced:!0},{from:RN});var ON=Wo,FN=oe,MN=lt,IN=Ul,DN=sy,LN=me([].push);ON({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){MN(t);var n=IN(e),r=new this,o=MN(r.has),i=MN(r.get),a=MN(r.set);return DN(n,(function(e){var n=t(e);FN(o,r,n)?LN(FN(i,r,n),e):FN(a,r,n,[e])}),{IS_ITERATOR:!0}),r}});var jN=Sn,BN=rN,NN=function(e,t){return e===t||e!=e&&t!=t},VN=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return VN(BN(jN(this)),(function(t,n,r){if(NN(n,e))return r()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var UN=oe,WN=sy,zN=lt;Wo({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new this;zN(t);var r=zN(n.set);return WN(e,(function(e){UN(r,n,t(e),e)})),n}});var HN=Sn,GN=rN,XN=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){return XN(GN(HN(this)),(function(t,n,r){if(n===e)return r(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var QN=Ne,YN=sa,qN=oe,KN=lt,JN=Sn,ZN=Vg,$N=rN,eV=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=JN(this),n=$N(t),r=YN(e,arguments.length>1?arguments[1]:void 0),o=new(ZN(t,QN("Map"))),i=KN(o.set);return eV(n,(function(e,n){qN(i,o,r(n,e,t),n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}});var tV=Ne,nV=sa,rV=oe,oV=lt,iV=Sn,aV=Vg,sV=rN,uV=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=iV(this),n=sV(t),r=nV(e,arguments.length>1?arguments[1]:void 0),o=new(aV(t,tV("Map"))),i=oV(o.set);return uV(n,(function(e,n){rV(i,o,e,r(n,e,t))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}});var cV=lt,lV=Sn,fV=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{merge:function(e){for(var t=lV(this),n=cV(t.set),r=arguments.length,o=0;o<r;)fV(arguments[o++],n,{that:t,AS_ENTRIES:!0});return t}});var hV=hu,dV=function(){return new this(hV(arguments))};Wo({target:"Map",stat:!0,forced:!0},{of:dV});var pV=Wo,vV=Sn,gV=lt,mV=rN,yV=sy,bV=J.TypeError;pV({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=vV(this),n=mV(t),r=arguments.length<2,o=r?void 0:arguments[1];if(gV(e),yV(n,(function(n,i){r?(r=!1,o=i):o=e(o,i,n,t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r)throw bV("Reduce of empty map with no initial value");return o}});var wV=Sn,AV=sa,xV=rN,TV=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=wV(this),n=xV(t),r=AV(e,arguments.length>1?arguments[1]:void 0);return TV(n,(function(e,n,o){if(r(n,e,t))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var PV=Wo,CV=oe,_V=Sn,EV=lt,SV=J.TypeError;PV({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=_V(this),r=EV(n.get),o=EV(n.has),i=EV(n.set),a=arguments.length;EV(t);var s=CV(o,n,e);if(!s&&a<3)throw SV("Updating absent value");var u=s?CV(r,n,e):EV(a>2?arguments[2]:void 0)(e,n);return CV(i,n,e,t(u,e,n)),n}});var kV=Wo,RV=Math.min,OV=Math.max;kV({target:"Math",stat:!0,forced:!0},{clamp:function(e,t,n){return RV(n,OV(t,e))}}),Wo({target:"Math",stat:!0,forced:!0},{DEG_PER_RAD:Math.PI/180});var FV=Wo,MV=180/Math.PI;FV({target:"Math",stat:!0,forced:!0},{degrees:function(e){return e*MV}});var IV=Math.scale||function(e,t,n,r,o){var i=+e,a=+t,s=+n,u=+r,c=+o;return i!=i||a!=a||s!=s||u!=u||c!=c?NaN:i===1/0||i===-1/0?i:(i-a)*(c-u)/(s-a)+u},DV=IV,LV=_b;Wo({target:"Math",stat:!0,forced:!0},{fscale:function(e,t,n,r,o){return LV(DV(e,t,n,r,o))}}),Wo({target:"Math",stat:!0,forced:!0},{iaddh:function(e,t,n,r){var o=e>>>0,i=n>>>0;return(t>>>0)+(r>>>0)+((o&i|(o|i)&~(o+i>>>0))>>>31)|0}}),Wo({target:"Math",stat:!0,forced:!0},{imulh:function(e,t){var n=65535,r=+e,o=+t,i=r&n,a=o&n,s=r>>16,u=o>>16,c=(s*a>>>0)+(i*a>>>16);return s*u+(c>>16)+((i*u>>>0)+(c&n)>>16)}}),Wo({target:"Math",stat:!0,forced:!0},{isubh:function(e,t,n,r){var o=e>>>0,i=n>>>0;return(t>>>0)-(r>>>0)-((~o&i|~(o^i)&o-i>>>0)>>>31)|0}}),Wo({target:"Math",stat:!0,forced:!0},{RAD_PER_DEG:180/Math.PI});var jV=Wo,BV=Math.PI/180;jV({target:"Math",stat:!0,forced:!0},{radians:function(e){return e*BV}}),Wo({target:"Math",stat:!0,forced:!0},{scale:IV});var NV=Wo,VV=J,UV=Sn,WV=Lw,zV=Hf,HV=Tr,GV="Seeded Random",XV="Seeded Random Generator",QV=HV.set,YV=HV.getterFor(XV),qV=VV.TypeError,KV=zV((function(e){QV(this,{type:XV,seed:e%2147483647})}),GV,(function(){var e=YV(this);return{value:(1073741823&(e.seed=(1103515245*e.seed+12345)%2147483647))/1073741823,done:!1}}));NV({target:"Math",stat:!0,forced:!0},{seededPRNG:function(e){var t=UV(e).seed;if(!WV(t))throw qV('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new KV(t)}}),Wo({target:"Math",stat:!0,forced:!0},{signbit:function(e){return(e=+e)==e&&0==e?1/e==-1/0:e<0}}),Wo({target:"Math",stat:!0,forced:!0},{umulh:function(e,t){var n=65535,r=+e,o=+t,i=r&n,a=o&n,s=r>>>16,u=o>>>16,c=(s*a>>>0)+(i*a>>>16);return s*u+(c>>>16)+((i*u>>>0)+(c&n)>>>16)}});var JV=Wo,ZV=J,$V=me,eU=zr,tU=lA,nU="Invalid number representation",rU=ZV.RangeError,oU=ZV.SyntaxError,iU=ZV.TypeError,aU=/^[\da-z]+$/,sU=$V("".charAt),uU=$V(aU.exec),cU=$V(1..toString),lU=$V("".slice);JV({target:"Number",stat:!0,forced:!0},{fromString:function(e,t){var n,r,o=1;if("string"!=typeof e)throw iU(nU);if(!e.length)throw oU(nU);if("-"==sU(e,0)&&(o=-1,!(e=lU(e,1)).length))throw oU(nU);if((n=void 0===t?10:eU(t))<2||n>36)throw rU("Invalid radix");if(!uU(aU,e)||cU(r=tU(e,n),n)!==e)throw oU(nU);return o*r}});var fU=J,hU=Me,dU=Qt("observable"),pU=fU.Observable,vU=pU&&pU.prototype,gU=!(hU(pU)&&hU(pU.from)&&hU(pU.of)&&hU(vU.subscribe)&&hU(vU[dU])),mU=Wo,yU=oe,bU=ee,wU=vp,AU=lt,xU=Me,TU=Sn,PU=De,CU=Dp,_U=ht,EU=xn.f,SU=zn.exports,kU=Fp,RU=zP,OU=Tr,FU=gU,MU=Qt("observable"),IU="Observable",DU="Subscription",LU="SubscriptionObserver",jU=OU.getterFor,BU=OU.set,NU=jU(IU),VU=jU(DU),UU=jU(LU),WU=function(e){this.observer=TU(e),this.cleanup=void 0,this.subscriptionObserver=void 0};WU.prototype={type:DU,clean:function(){var e=this.cleanup;if(e){this.cleanup=void 0;try{e()}catch(x3){RU(x3)}}},close:function(){if(!bU){var e=this.facade,t=this.subscriptionObserver;e.closed=!0,t&&(t.closed=!0)}this.observer=void 0},isClosed:function(){return void 0===this.observer}};var zU=function(e,t){var n,r=BU(this,new WU(e));bU||(this.closed=!1);try{(n=_U(e,"start"))&&yU(n,e,this)}catch(x3){RU(x3)}if(!r.isClosed()){var o=r.subscriptionObserver=new HU(r);try{var i=t(o),a=i;null!=i&&(r.cleanup=xU(i.unsubscribe)?function(){a.unsubscribe()}:AU(i))}catch(x3){return void o.error(x3)}r.isClosed()&&r.clean()}};zU.prototype=kU({},{unsubscribe:function(){var e=VU(this);e.isClosed()||(e.close(),e.clean())}}),bU&&EU(zU.prototype,"closed",{configurable:!0,get:function(){return VU(this).isClosed()}});var HU=function(e){BU(this,{type:LU,subscriptionState:e}),bU||(this.closed=!1)};HU.prototype=kU({},{next:function(e){var t=UU(this).subscriptionState;if(!t.isClosed()){var n=t.observer;try{var r=_U(n,"next");r&&yU(r,n,e)}catch(x3){RU(x3)}}},error:function(e){var t=UU(this).subscriptionState;if(!t.isClosed()){var n=t.observer;t.close();try{var r=_U(n,"error");r?yU(r,n,e):RU(e)}catch(o){RU(o)}t.clean()}},complete:function(){var e=UU(this).subscriptionState;if(!e.isClosed()){var t=e.observer;e.close();try{var n=_U(t,"complete");n&&yU(n,t)}catch(x3){RU(x3)}e.clean()}}}),bU&&EU(HU.prototype,"closed",{configurable:!0,get:function(){return UU(this).subscriptionState.isClosed()}});var GU=function(e){CU(this,XU),BU(this,{type:IU,subscriber:AU(e)})},XU=GU.prototype;kU(XU,{subscribe:function(e){var t=arguments.length;return new zU(xU(e)?{next:e,error:t>1?arguments[1]:void 0,complete:t>2?arguments[2]:void 0}:PU(e)?e:{},NU(this).subscriber)}}),SU(XU,MU,(function(){return this})),mU({global:!0,forced:FU},{Observable:GU}),wU(IU);var QU=Wo,YU=Ne,qU=oe,KU=Sn,JU=Ta,ZU=Ul,$U=ht,eW=sy,tW=gU,nW=Qt("observable");QU({target:"Observable",stat:!0,forced:tW},{from:function(e){var t=JU(this)?this:YU("Observable"),n=$U(KU(e),nW);if(n){var r=KU(qU(n,e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}var o=ZU(e);return new t((function(e){eW(o,(function(t,n){if(e.next(t),e.closed)return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}),e.complete()}))}});var rW=Wo,oW=Ne,iW=Ta,aW=gU,sW=oW("Array");rW({target:"Observable",stat:!0,forced:aW},{of:function(){for(var e=iW(this)?this:oW("Observable"),t=arguments.length,n=sW(t),r=0;r<t;)n[r]=arguments[r++];return new e((function(e){for(var r=0;r<t;r++)if(e.next(n[r]),e.closed)return;e.complete()}))}});var uW=oe,cW=lt,lW=uC,fW=HP,hW=sy;Wo({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=lW.f(t),r=n.resolve,o=n.reject,i=fW((function(){var n=cW(t.resolve),o=[],i=0,a=1;hW(e,(function(e){var s=i++,u=!1;a++,uW(n,t,e).then((function(e){u||(u=!0,o[s]={status:"fulfilled",value:e},--a||r(o))}),(function(e){u||(u=!0,o[s]={status:"rejected",reason:e},--a||r(o))}))})),--a||r(o)}));return i.error&&o(i.value),n.promise}});var dW=oe,pW=lt,vW=Ne,gW=uC,mW=HP,yW=sy,bW="No one promise resolved";Wo({target:"Promise",stat:!0},{any:function(e){var t=this,n=vW("AggregateError"),r=gW.f(t),o=r.resolve,i=r.reject,a=mW((function(){var r=pW(t.resolve),a=[],s=0,u=1,c=!1;yW(e,(function(e){var l=s++,f=!1;u++,dW(r,t,e).then((function(e){f||c||(c=!0,o(e))}),(function(e){f||c||(f=!0,a[l]=e,--u||i(new n(a,bW)))}))})),--u||i(new n(a,bW))}));return a.error&&i(a.value),r.promise}});var wW=uC,AW=HP;Wo({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=wW.f(this),n=AW(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var xW=Ne,TW=me,PW=yt.exports,CW=xW("Map"),_W=xW("WeakMap"),EW=TW([].push),SW=PW("metadata"),kW=SW.store||(SW.store=new _W),RW=function(e,t,n){var r=kW.get(e);if(!r){if(!n)return;kW.set(e,r=new CW)}var o=r.get(t);if(!o){if(!n)return;r.set(t,o=new CW)}return o},OW={store:kW,getMap:RW,has:function(e,t,n){var r=RW(t,n,!1);return void 0!==r&&r.has(e)},get:function(e,t,n){var r=RW(t,n,!1);return void 0===r?void 0:r.get(e)},set:function(e,t,n,r){RW(n,r,!0).set(e,t)},keys:function(e,t){var n=RW(e,t,!1),r=[];return n&&n.forEach((function(e,t){EW(r,t)})),r},toKey:function(e){return void 0===e||"symbol"==S(e)?e:String(e)}},FW=Sn,MW=OW.toKey,IW=OW.set;Wo({target:"Reflect",stat:!0},{defineMetadata:function(e,t,n){var r=arguments.length<4?void 0:MW(arguments[3]);IW(e,t,FW(n),r)}});var DW=Sn,LW=OW.toKey,jW=OW.getMap,BW=OW.store;Wo({target:"Reflect",stat:!0},{deleteMetadata:function(e,t){var n=arguments.length<3?void 0:LW(arguments[2]),r=jW(DW(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var o=BW.get(t);return o.delete(n),!!o.size||BW.delete(t)}});var NW=Sn,VW=kf,UW=OW.has,WW=OW.get,zW=OW.toKey,HW=function e(t,n,r){if(UW(t,n,r))return WW(t,n,r);var o=VW(n);return null!==o?e(t,o,r):void 0};Wo({target:"Reflect",stat:!0},{getMetadata:function(e,t){var n=arguments.length<3?void 0:zW(arguments[2]);return HW(e,NW(t),n)}});var GW=me,XW=lt,QW=Zr,YW=St,qW=Oa,KW=Ne("Map"),JW=KW.prototype,ZW=GW(JW.forEach),$W=GW(JW.has),ez=GW(JW.set),tz=GW([].push),nz=Wo,rz=me,oz=OW,iz=Sn,az=kf,sz=function(e){var t,n,r,o=YW(this),i=QW(o),a=qW(o,0),s=new KW,u=null!=e?XW(e):function(e){return e};for(t=0;t<i;t++)r=u(n=o[t]),$W(s,r)||ez(s,r,n);return ZW(s,(function(e){tz(a,e)})),a},uz=rz(sz),cz=rz([].concat),lz=oz.keys,fz=oz.toKey,hz=function e(t,n){var r=lz(t,n),o=az(t);if(null===o)return r;var i=e(o,n);return i.length?r.length?uz(cz(r,i)):i:r};nz({target:"Reflect",stat:!0},{getMetadataKeys:function(e){var t=arguments.length<2?void 0:fz(arguments[1]);return hz(iz(e),t)}});var dz=Sn,pz=OW.get,vz=OW.toKey;Wo({target:"Reflect",stat:!0},{getOwnMetadata:function(e,t){var n=arguments.length<3?void 0:vz(arguments[2]);return pz(e,dz(t),n)}});var gz=Sn,mz=OW.keys,yz=OW.toKey;Wo({target:"Reflect",stat:!0},{getOwnMetadataKeys:function(e){var t=arguments.length<2?void 0:yz(arguments[1]);return mz(gz(e),t)}});var bz=Sn,wz=kf,Az=OW.has,xz=OW.toKey,Tz=function e(t,n,r){if(Az(t,n,r))return!0;var o=wz(n);return null!==o&&e(t,o,r)};Wo({target:"Reflect",stat:!0},{hasMetadata:function(e,t){var n=arguments.length<3?void 0:xz(arguments[2]);return Tz(e,bz(t),n)}});var Pz=Sn,Cz=OW.has,_z=OW.toKey;Wo({target:"Reflect",stat:!0},{hasOwnMetadata:function(e,t){var n=arguments.length<3?void 0:_z(arguments[2]);return Cz(e,Pz(t),n)}});var Ez=Sn,Sz=OW.toKey,kz=OW.set;Wo({target:"Reflect",stat:!0},{metadata:function(e,t){return function(n,r){kz(e,t,Ez(n),Sz(r))}}});var Rz=oe,Oz=lt,Fz=Sn,Mz=function(){for(var e=Fz(this),t=Oz(e.add),n=0,r=arguments.length;n<r;n++)Rz(t,e,arguments[n]);return e};Wo({target:"Set",proto:!0,real:!0,forced:!0},{addAll:Mz}),Wo({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:tN});var Iz=Ne,Dz=oe,Lz=lt,jz=Sn,Bz=Vg,Nz=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){var t=jz(this),n=new(Bz(t,Iz("Set")))(t),r=Lz(n.delete);return Nz(e,(function(e){Dz(r,n,e)})),n}});var Vz=oe,Uz=function(e){return Vz(Set.prototype.values,e)},Wz=Sn,zz=sa,Hz=Uz,Gz=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=Wz(this),n=Hz(t),r=zz(e,arguments.length>1?arguments[1]:void 0);return!Gz(n,(function(e,n){if(!r(e,e,t))return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var Xz=Ne,Qz=oe,Yz=lt,qz=Sn,Kz=sa,Jz=Vg,Zz=Uz,$z=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=qz(this),n=Zz(t),r=Kz(e,arguments.length>1?arguments[1]:void 0),o=new(Jz(t,Xz("Set"))),i=Yz(o.add);return $z(n,(function(e){r(e,e,t)&&Qz(i,o,e)}),{IS_ITERATOR:!0}),o}});var eH=Sn,tH=sa,nH=Uz,rH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=eH(this),n=nH(t),r=tH(e,arguments.length>1?arguments[1]:void 0);return rH(n,(function(e,n){if(r(e,e,t))return n(e)}),{IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Wo({target:"Set",stat:!0,forced:!0},{from:RN});var oH=Ne,iH=oe,aH=lt,sH=Sn,uH=Vg,cH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){var t=sH(this),n=new(uH(t,oH("Set"))),r=aH(t.has),o=aH(n.add);return cH(e,(function(e){iH(r,t,e)&&iH(o,n,e)})),n}});var lH=oe,fH=lt,hH=Sn,dH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){var t=hH(this),n=fH(t.has);return!dH(e,(function(e,r){if(!0===lH(n,t,e))return r()}),{INTERRUPTED:!0}).stopped}});var pH=Ne,vH=oe,gH=lt,mH=Me,yH=Sn,bH=Ul,wH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){var t=bH(this),n=yH(e),r=n.has;return mH(r)||(n=new(pH("Set"))(e),r=gH(n.has)),!wH(t,(function(e,t){if(!1===vH(r,n,e))return t()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var AH=oe,xH=lt,TH=Sn,PH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){var t=TH(this),n=xH(t.has);return!PH(e,(function(e,r){if(!1===AH(n,t,e))return r()}),{INTERRUPTED:!0}).stopped}});var CH=Wo,_H=Sn,EH=ti,SH=Uz,kH=sy,RH=me([].join),OH=[].push;CH({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=_H(this),n=SH(t),r=void 0===e?",":EH(e),o=[];return kH(n,OH,{that:o,IS_ITERATOR:!0}),RH(o,r)}});var FH=Ne,MH=sa,IH=oe,DH=lt,LH=Sn,jH=Vg,BH=Uz,NH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=LH(this),n=BH(t),r=MH(e,arguments.length>1?arguments[1]:void 0),o=new(jH(t,FH("Set"))),i=DH(o.add);return NH(n,(function(e){IH(i,o,r(e,e,t))}),{IS_ITERATOR:!0}),o}}),Wo({target:"Set",stat:!0,forced:!0},{of:dV});var VH=Wo,UH=lt,WH=Sn,zH=Uz,HH=sy,GH=J.TypeError;VH({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=WH(this),n=zH(t),r=arguments.length<2,o=r?void 0:arguments[1];if(UH(e),HH(n,(function(n){r?(r=!1,o=n):o=e(o,n,n,t)}),{IS_ITERATOR:!0}),r)throw GH("Reduce of empty set with no initial value");return o}});var XH=Sn,QH=sa,YH=Uz,qH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=XH(this),n=YH(t),r=QH(e,arguments.length>1?arguments[1]:void 0);return qH(n,(function(e,n){if(r(e,e,t))return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var KH=Ne,JH=oe,ZH=lt,$H=Sn,eG=Vg,tG=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){var t=$H(this),n=new(eG(t,KH("Set")))(t),r=ZH(n.delete),o=ZH(n.add);return tG(e,(function(e){JH(r,n,e)||JH(o,n,e)})),n}});var nG=Ne,rG=lt,oG=Sn,iG=Vg,aG=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){var t=oG(this),n=new(iG(t,nG("Set")))(t);return aG(e,rG(n.add),{that:n}),n}});var sG=rR.charAt,uG=ke,cG=zr,lG=ti;Wo({target:"String",proto:!0,forced:!0},{at:function(e){var t=lG(uG(this)),n=t.length,r=cG(e),o=r>=0?r:n+r;return o<0||o>=n?void 0:sG(t,o)}});var fG=Wo,hG=Hf,dG=ke,pG=ti,vG=Tr,gG=rR.codeAt,mG=rR.charAt,yG="String Iterator",bG=vG.set,wG=vG.getterFor(yG),AG=hG((function(e){bG(this,{type:yG,string:e,index:0})}),"String",(function(){var e,t=wG(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=mG(n,r),t.index+=e.length,{value:{codePoint:gG(e,0),position:r},done:!1})}));fG({target:"String",proto:!0,forced:!0},{codePoints:function(){return new AG(pG(dG(this)))}});var xG=Wo,TG=J,PG=oe,CG=me,_G=Hf,EG=ke,SG=Kr,kG=ti,RG=Sn,OG=sS,FG=vS,MG=ht,IG=zn.exports,DG=$,LG=Vg,jG=$R,BG=aO,NG=Tr,VG=Qt("matchAll"),UG="RegExp String",WG="RegExp String Iterator",zG=NG.set,HG=NG.getterFor(WG),GG=RegExp.prototype,XG=TG.TypeError,QG=CG("".indexOf),YG=CG("".matchAll),qG=!!YG&&!DG((function(){YG("a",/./)})),KG=_G((function(e,t,n,r){zG(this,{type:WG,regexp:e,string:t,global:n,unicode:r,done:!1})}),UG,(function(){var e=HG(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=BG(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""===kG(r[0])&&(t.lastIndex=jG(n,SG(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),JG=function(e){var t,n,r,o=RG(this),i=kG(e),a=LG(o,RegExp),s=kG(FG(o));return t=new a(a===RegExp?o.source:o,s),n=!!~QG(s,"g"),r=!!~QG(s,"u"),t.lastIndex=SG(o.lastIndex),new KG(t,i,n,r)};xG({target:"String",proto:!0,forced:qG},{matchAll:function(e){var t,n,r,o=EG(this);if(null!=e){if(OG(e)&&(t=kG(EG(FG(e))),!~QG(t,"g")))throw XG("`.matchAll` does not allow non-global regexes");if(qG)return YG(o,e);if(r=MG(e,VG))return PG(r,e,o)}else if(qG)return YG(o,e);return n=kG(o),new RegExp(e,"g")[VG](n)}}),VG in GG||IG(GG,VG,JG);var ZG=Wo,$G=J,eX=oe,tX=me,nX=ke,rX=Me,oX=sS,iX=ti,aX=ht,sX=vS,uX=zO,cX=Qt("replace"),lX=$G.TypeError,fX=tX("".indexOf);tX("".replace);var hX=tX("".slice),dX=Math.max,pX=function(e,t,n){return n>e.length?-1:""===t?n:fX(e,t,n)};ZG({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,o,i,a,s,u,c,l=nX(this),f=0,h=0,d="";if(null!=e){if(oX(e)&&(n=iX(nX(sX(e))),!~fX(n,"g")))throw lX("`.replaceAll` does not allow non-global regexes");if(r=aX(e,cX))return eX(r,e,l,t)}for(o=iX(l),i=iX(e),(a=rX(t))||(t=iX(t)),s=i.length,u=dX(1,s),f=pX(o,i,0);-1!==f;)c=a?iX(t(i,f,o)):uX(i,o,f,[],void 0,t),d+=hX(o,h,f)+c,h=f+s,f=pX(o,i,f+u);return h<o.length&&(d+=hX(o,h)),d}}),Yi("dispose"),Yi("observable"),Yi("patternMatch"),Wo({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:tN}),Wo({target:"WeakMap",stat:!0,forced:!0},{from:RN}),Wo({target:"WeakMap",stat:!0,forced:!0},{of:dV}),Wo({target:"WeakSet",proto:!0,real:!0,forced:!0},{addAll:Mz}),Wo({target:"WeakSet",proto:!0,real:!0,forced:!0},{deleteAll:tN}),Wo({target:"WeakSet",stat:!0,forced:!0},{from:RN}),Wo({target:"WeakSet",stat:!0,forced:!0},{of:dV});var vX={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},gX=ln("span").classList,mX=gX&&gX.constructor&&gX.constructor.prototype,yX=mX===Object.prototype?void 0:mX,bX=Na.forEach,wX=lf("forEach")?[].forEach:function(e){return bX(this,e,arguments.length>1?arguments[1]:void 0)},AX=J,xX=vX,TX=yX,PX=wX,CX=Wn,_X=function(e){if(e&&e.forEach!==PX)try{CX(e,"forEach",PX)}catch(x3){e.forEach=PX}};for(var EX in xX)xX[EX]&&_X(AX[EX]&&AX[EX].prototype);_X(TX);var SX=J,kX=vX,RX=yX,OX=Oh,FX=Wn,MX=Qt,IX=MX("iterator"),DX=MX("toStringTag"),LX=OX.values,jX=function(e,t){if(e){if(e[IX]!==LX)try{FX(e,IX,LX)}catch(x3){e[IX]=LX}if(e[DX]||FX(e,DX,t),kX[t])for(var n in OX)if(e[n]!==OX[n])try{FX(e,n,OX[n])}catch(x3){e[n]=OX[n]}}};for(var BX in kX)jX(SX[BX]&&SX[BX].prototype,BX);jX(RX,"DOMTokenList");var NX=TP.clear;Wo({global:!0,bind:!0,enumerable:!0,forced:J.clearImmediate!==NX},{clearImmediate:NX});var VX=TP.set;Wo({global:!0,bind:!0,enumerable:!0,forced:J.setImmediate!==VX},{setImmediate:VX});var UX=Wo,WX=UP,zX=lt,HX=UT,GX=cd,XX=J.process;UX({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){HX(arguments.length,1),zX(e);var t=GX&&XX.domain;WX(t?t.bind(e):e)}});var QX=$,YX=Qt("iterator"),qX=!QX((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[YX]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),KX=me,JX=2147483647,ZX=/[^\0-\u007E]/,$X=/[.\u3002\uFF0E\uFF61]/g,eQ="Overflow: input needs wider integers to process",tQ=J.RangeError,nQ=KX($X.exec),rQ=Math.floor,oQ=String.fromCharCode,iQ=KX("".charCodeAt),aQ=KX([].join),sQ=KX([].push),uQ=KX("".replace),cQ=KX("".split),lQ=KX("".toLowerCase),fQ=function(e){return e+22+75*(e<26)},hQ=function(e,t,n){var r=0;for(e=n?rQ(e/700):e>>1,e+=rQ(e/t);e>455;)e=rQ(e/35),r+=36;return rQ(r+36*e/(e+38))},dQ=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=iQ(e,n++);if(o>=55296&&o<=56319&&n<r){var i=iQ(e,n++);56320==(64512&i)?sQ(t,((1023&o)<<10)+(1023&i)+65536):(sQ(t,o),n--)}else sQ(t,o)}return t}(e);var n,r,o=e.length,i=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&sQ(t,oQ(r));var u=t.length,c=u;for(u&&sQ(t,"-");c<o;){var l=JX;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<l&&(l=r);var f=c+1;if(l-i>rQ((JX-a)/f))throw tQ(eQ);for(a+=(l-i)*f,i=l,n=0;n<e.length;n++){if((r=e[n])<i&&++a>JX)throw tQ(eQ);if(r==i){for(var h=a,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(h<p)break;var v=h-p,g=36-p;sQ(t,oQ(fQ(p+v%g))),h=rQ(v/g),d+=36}sQ(t,oQ(fQ(h))),s=hQ(a,f,c==u),a=0,c++}}a++,i++}return aQ(t,"")},pQ=Wo,vQ=J,gQ=oe,mQ=me,yQ=ee,bQ=qX,wQ=zn.exports,AQ=Fp,xQ=ra,TQ=Hf,PQ=Tr,CQ=Dp,_Q=Me,EQ=Ot,SQ=sa,kQ=Zo,RQ=Sn,OQ=De,FQ=ti,MQ=Ci,IQ=fe,DQ=Ul,LQ=Il,jQ=UT,BQ=Nd,NQ=Qt("iterator"),VQ="URLSearchParams",UQ="URLSearchParamsIterator",WQ=PQ.set,zQ=PQ.getterFor(VQ),HQ=PQ.getterFor(UQ),GQ=Object.getOwnPropertyDescriptor,XQ=function(e){if(!yQ)return vQ[e];var t=GQ(vQ,e);return t&&t.value},QQ=XQ("fetch"),YQ=XQ("Request"),qQ=XQ("Headers"),KQ=YQ&&YQ.prototype,JQ=qQ&&qQ.prototype,ZQ=vQ.RegExp,$Q=vQ.TypeError,eY=vQ.decodeURIComponent,tY=vQ.encodeURIComponent,nY=mQ("".charAt),rY=mQ([].join),oY=mQ([].push),iY=mQ("".replace),aY=mQ([].shift),sY=mQ([].splice),uY=mQ("".split),cY=mQ("".slice),lY=/\+/g,fY=Array(4),hY=function(e){return fY[e-1]||(fY[e-1]=ZQ("((?:%[\\da-f]{2}){"+e+"})","gi"))},dY=function(e){try{return eY(e)}catch(x3){return e}},pY=function(e){var t=iY(e,lY," "),n=4;try{return eY(t)}catch(x3){for(;n;)t=iY(t,hY(n--),dY);return t}},vY=/[!'()~]|%20/g,gY={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},mY=function(e){return gY[e]},yY=function(e){return iY(tY(e),vY,mY)},bY=TQ((function(e,t){WQ(this,{type:UQ,iterator:DQ(zQ(e).entries),kind:t})}),"Iterator",(function(){var e=HQ(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),wY=function(e){this.entries=[],this.url=null,void 0!==e&&(OQ(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===nY(e,0)?cY(e,1):e:FQ(e)))};wY.prototype={type:VQ,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,o,i,a,s,u=LQ(e);if(u)for(n=(t=DQ(e,u)).next;!(r=gQ(n,t)).done;){if(i=(o=DQ(RQ(r.value))).next,(a=gQ(i,o)).done||(s=gQ(i,o)).done||!gQ(i,o).done)throw $Q("Expected sequence with length 2");oY(this.entries,{key:FQ(a.value),value:FQ(s.value)})}else for(var c in e)EQ(e,c)&&oY(this.entries,{key:c,value:FQ(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=uY(e,"&"),o=0;o<r.length;)(t=r[o++]).length&&(n=uY(t,"="),oY(this.entries,{key:pY(aY(n)),value:pY(rY(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],oY(n,yY(e.key)+"="+yY(e.value));return rY(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var AY=function(){CQ(this,xY);var e=arguments.length>0?arguments[0]:void 0;WQ(this,new wY(e))},xY=AY.prototype;if(AQ(xY,{append:function(e,t){jQ(arguments.length,2);var n=zQ(this);oY(n.entries,{key:FQ(e),value:FQ(t)}),n.updateURL()},delete:function(e){jQ(arguments.length,1);for(var t=zQ(this),n=t.entries,r=FQ(e),o=0;o<n.length;)n[o].key===r?sY(n,o,1):o++;t.updateURL()},get:function(e){jQ(arguments.length,1);for(var t=zQ(this).entries,n=FQ(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){jQ(arguments.length,1);for(var t=zQ(this).entries,n=FQ(e),r=[],o=0;o<t.length;o++)t[o].key===n&&oY(r,t[o].value);return r},has:function(e){jQ(arguments.length,1);for(var t=zQ(this).entries,n=FQ(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){jQ(arguments.length,1);for(var n,r=zQ(this),o=r.entries,i=!1,a=FQ(e),s=FQ(t),u=0;u<o.length;u++)(n=o[u]).key===a&&(i?sY(o,u--,1):(i=!0,n.value=s));i||oY(o,{key:a,value:s}),r.updateURL()},sort:function(){var e=zQ(this);BQ(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=zQ(this).entries,r=SQ(e,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new bY(this,"keys")},values:function(){return new bY(this,"values")},entries:function(){return new bY(this,"entries")}},{enumerable:!0}),wQ(xY,NQ,xY.entries,{name:"entries"}),wQ(xY,"toString",(function(){return zQ(this).serialize()}),{enumerable:!0}),xQ(AY,VQ),pQ({global:!0,forced:!bQ},{URLSearchParams:AY}),!bQ&&_Q(qQ)){var TY=mQ(JQ.has),PY=mQ(JQ.set),CY=function(e){if(OQ(e)){var t,n=e.body;if(kQ(n)===VQ)return t=e.headers?new qQ(e.headers):new qQ,TY(t,"content-type")||PY(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),MQ(e,{body:IQ(0,FQ(n)),headers:IQ(0,t)})}return e};if(_Q(QQ)&&pQ({global:!0,enumerable:!0,noTargetGet:!0,forced:!0},{fetch:function(e){return QQ(e,arguments.length>1?CY(arguments[1]):{})}}),_Q(YQ)){var _Y=function(e){return CQ(this,KQ),new YQ(e,arguments.length>1?CY(arguments[1]):{})};KQ.constructor=_Y,_Y.prototype=KQ,pQ({global:!0,forced:!0,noTargetGet:!0},{Request:_Y})}}var EY,SY={URLSearchParams:AY,getState:zQ},kY=Wo,RY=ee,OY=qX,FY=J,MY=sa,IY=me,DY=ni.f,LY=zn.exports,jY=Dp,BY=Ot,NY=XA,VY=$l,UY=Li,WY=rR.codeAt,zY=function(e){var t,n,r=[],o=cQ(uQ(lQ(e),$X,"."),".");for(t=0;t<o.length;t++)n=o[t],sQ(r,nQ(ZX,n)?"xn--"+dQ(n):n);return aQ(r,".")},HY=ti,GY=ra,XY=UT,QY=SY,YY=Tr,qY=YY.set,KY=YY.getterFor("URL"),JY=QY.URLSearchParams,ZY=QY.getState,$Y=FY.URL,eq=FY.TypeError,tq=FY.parseInt,nq=Math.floor,rq=Math.pow,oq=IY("".charAt),iq=IY(/./.exec),aq=IY([].join),sq=IY(1..toString),uq=IY([].pop),cq=IY([].push),lq=IY("".replace),fq=IY([].shift),hq=IY("".split),dq=IY("".slice),pq=IY("".toLowerCase),vq=IY([].unshift),gq="Invalid scheme",mq="Invalid host",yq="Invalid port",bq=/[a-z]/i,wq=/[\d+-.a-z]/i,Aq=/\d/,xq=/^0x/i,Tq=/^[0-7]+$/,Pq=/^\d+$/,Cq=/^[\da-f]+$/i,_q=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Eq=/[\0\t\n\r #/:<>?@[\\\]^|]/,Sq=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,kq=/[\t\n\r]/g,Rq=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)vq(t,e%256),e=nq(e/256);return aq(t,".")}if("object"==S(e)){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=sq(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Oq={},Fq=NY({},Oq,{" ":1,'"':1,"<":1,">":1,"`":1}),Mq=NY({},Fq,{"#":1,"?":1,"{":1,"}":1}),Iq=NY({},Mq,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Dq=function(e,t){var n=WY(e,0);return n>32&&n<127&&!BY(t,e)?e:encodeURIComponent(e)},Lq={ftp:21,file:null,http:80,https:443,ws:80,wss:443},jq=function(e,t){var n;return 2==e.length&&iq(bq,oq(e,0))&&(":"==(n=oq(e,1))||!t&&"|"==n)},Bq=function(e){var t;return e.length>1&&jq(dq(e,0,2))&&(2==e.length||"/"===(t=oq(e,2))||"\\"===t||"?"===t||"#"===t)},Nq=function(e){return"."===e||"%2e"===pq(e)},Vq={},Uq={},Wq={},zq={},Hq={},Gq={},Xq={},Qq={},Yq={},qq={},Kq={},Jq={},Zq={},$q={},eK={},tK={},nK={},rK={},oK={},iK={},aK={},sK=function e(t,n,r){var o,i,a,s=HY(t);if(n){if(i=this.parse(s))throw eq(i);this.searchParams=null}else{if(void 0!==r&&(o=new e(r,!0)),i=this.parse(s,null,o))throw eq(i);(a=ZY(new JY)).bindURL(this),this.searchParams=a}};sK.prototype={type:"URL",parse:function(e,t,n){var r,o,i,a,s,u=this,c=t||Vq,l=0,f="",h=!1,d=!1,p=!1;for(e=HY(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=lq(e,Sq,"")),e=lq(e,kq,""),r=VY(e);l<=r.length;){switch(o=r[l],c){case Vq:if(!o||!iq(bq,o)){if(t)return gq;c=Wq;continue}f+=pq(o),c=Uq;break;case Uq:if(o&&(iq(wq,o)||"+"==o||"-"==o||"."==o))f+=pq(o);else{if(":"!=o){if(t)return gq;f="",c=Wq,l=0;continue}if(t&&(u.isSpecial()!=BY(Lq,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&Lq[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?c=$q:u.isSpecial()&&n&&n.scheme==u.scheme?c=zq:u.isSpecial()?c=Qq:"/"==r[l+1]?(c=Hq,l++):(u.cannotBeABaseURL=!0,cq(u.path,""),c=oK)}break;case Wq:if(!n||n.cannotBeABaseURL&&"#"!=o)return gq;if(n.cannotBeABaseURL&&"#"==o){u.scheme=n.scheme,u.path=UY(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=aK;break}c="file"==n.scheme?$q:Gq;continue;case zq:if("/"!=o||"/"!=r[l+1]){c=Gq;continue}c=Yq,l++;break;case Hq:if("/"==o){c=qq;break}c=rK;continue;case Gq:if(u.scheme=n.scheme,o==EY)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=UY(n.path),u.query=n.query;else if("/"==o||"\\"==o&&u.isSpecial())c=Xq;else if("?"==o)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=UY(n.path),u.query="",c=iK;else{if("#"!=o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=UY(n.path),u.path.length--,c=rK;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=UY(n.path),u.query=n.query,u.fragment="",c=aK}break;case Xq:if(!u.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=rK;continue}c=qq}else c=Yq;break;case Qq:if(c=Yq,"/"!=o||"/"!=oq(f,l+1))continue;l++;break;case Yq:if("/"!=o&&"\\"!=o){c=qq;continue}break;case qq:if("@"==o){h&&(f="%40"+f),h=!0,i=VY(f);for(var v=0;v<i.length;v++){var g=i[v];if(":"!=g||p){var m=Dq(g,Iq);p?u.password+=m:u.username+=m}else p=!0}f=""}else if(o==EY||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(h&&""==f)return"Invalid authority";l-=VY(f).length+1,f="",c=Kq}else f+=o;break;case Kq:case Jq:if(t&&"file"==u.scheme){c=tK;continue}if(":"!=o||d){if(o==EY||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(u.isSpecial()&&""==f)return mq;if(t&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",c=nK,t)return;continue}"["==o?d=!0:"]"==o&&(d=!1),f+=o}else{if(""==f)return mq;if(a=u.parseHost(f))return a;if(f="",c=Zq,t==Jq)return}break;case Zq:if(!iq(Aq,o)){if(o==EY||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()||t){if(""!=f){var y=tq(f,10);if(y>65535)return yq;u.port=u.isSpecial()&&y===Lq[u.scheme]?null:y,f=""}if(t)return;c=nK;continue}return yq}f+=o;break;case $q:if(u.scheme="file","/"==o||"\\"==o)c=eK;else{if(!n||"file"!=n.scheme){c=rK;continue}if(o==EY)u.host=n.host,u.path=UY(n.path),u.query=n.query;else if("?"==o)u.host=n.host,u.path=UY(n.path),u.query="",c=iK;else{if("#"!=o){Bq(aq(UY(r,l),""))||(u.host=n.host,u.path=UY(n.path),u.shortenPath()),c=rK;continue}u.host=n.host,u.path=UY(n.path),u.query=n.query,u.fragment="",c=aK}}break;case eK:if("/"==o||"\\"==o){c=tK;break}n&&"file"==n.scheme&&!Bq(aq(UY(r,l),""))&&(jq(n.path[0],!0)?cq(u.path,n.path[0]):u.host=n.host),c=rK;continue;case tK:if(o==EY||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&jq(f))c=rK;else if(""==f){if(u.host="",t)return;c=nK}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),t)return;f="",c=nK}continue}f+=o;break;case nK:if(u.isSpecial()){if(c=rK,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=EY&&(c=rK,"/"!=o))continue}else u.fragment="",c=aK;else u.query="",c=iK;break;case rK:if(o==EY||"/"==o||"\\"==o&&u.isSpecial()||!t&&("?"==o||"#"==o)){if(".."===(s=pq(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==o||"\\"==o&&u.isSpecial()||cq(u.path,"")):Nq(f)?"/"==o||"\\"==o&&u.isSpecial()||cq(u.path,""):("file"==u.scheme&&!u.path.length&&jq(f)&&(u.host&&(u.host=""),f=oq(f,0)+":"),cq(u.path,f)),f="","file"==u.scheme&&(o==EY||"?"==o||"#"==o))for(;u.path.length>1&&""===u.path[0];)fq(u.path);"?"==o?(u.query="",c=iK):"#"==o&&(u.fragment="",c=aK)}else f+=Dq(o,Mq);break;case oK:"?"==o?(u.query="",c=iK):"#"==o?(u.fragment="",c=aK):o!=EY&&(u.path[0]+=Dq(o,Oq));break;case iK:t||"#"!=o?o!=EY&&("'"==o&&u.isSpecial()?u.query+="%27":u.query+="#"==o?"%23":Dq(o,Oq)):(u.fragment="",c=aK);break;case aK:o!=EY&&(u.fragment+=Dq(o,Fq))}l++}},parseHost:function(e){var t,n,r;if("["==oq(e,0)){if("]"!=oq(e,e.length-1))return mq;if(t=function(e){var t,n,r,o,i,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,h=function(){return oq(e,f)};if(":"==h()){if(":"!=oq(e,1))return;f+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=n=0;n<4&&iq(Cq,h());)t=16*t+tq(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,c>6)return;for(r=0;h();){if(o=null,r>0){if(!("."==h()&&r<4))return;f++}if(!iq(Aq,h()))return;for(;iq(Aq,h());){if(i=tq(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;f++}u[c]=256*u[c]+o,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u}(dq(e,1,-1)),!t)return mq;this.host=t}else if(this.isSpecial()){if(e=zY(e),iq(_q,e))return mq;if(t=function(e){var t,n,r,o,i,a,s,u=hq(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(o=u[r]))return e;if(i=10,o.length>1&&"0"==oq(o,0)&&(i=iq(xq,o)?16:8,o=dq(o,8==i?1:2)),""===o)a=0;else{if(!iq(10==i?Pq:8==i?Tq:Cq,o))return e;a=tq(o,i)}cq(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=rq(256,5-t))return null}else if(a>255)return null;for(s=uq(n),r=0;r<n.length;r++)s+=n[r]*rq(256,3-r);return s}(e),null===t)return mq;this.host=t}else{if(iq(Eq,e))return mq;for(t="",n=VY(e),r=0;r<n.length;r++)t+=Dq(n[r],Oq);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return BY(Lq,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&jq(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==o?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=Rq(o),null!==i&&(c+=":"+i)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+aq(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw eq(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new uK(e.path[0]).origin}catch(x3){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Rq(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(HY(e)+":",Vq)},getUsername:function(){return this.username},setUsername:function(e){var t=VY(HY(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Dq(t[n],Iq)}},getPassword:function(){return this.password},setPassword:function(e){var t=VY(HY(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Dq(t[n],Iq)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Rq(e):Rq(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Kq)},getHostname:function(){var e=this.host;return null===e?"":Rq(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Jq)},getPort:function(){var e=this.port;return null===e?"":HY(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=HY(e))?this.port=null:this.parse(e,Zq))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+aq(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,nK))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=HY(e))?this.query=null:("?"==oq(e,0)&&(e=dq(e,1)),this.query="",this.parse(e,iK)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=HY(e))?("#"==oq(e,0)&&(e=dq(e,1)),this.fragment="",this.parse(e,aK)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var uK=function(e){var t=jY(this,cK),n=XY(arguments.length,1)>1?arguments[1]:void 0,r=qY(t,new sK(e,!1,n));RY||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},cK=uK.prototype,lK=function(e,t){return{get:function(){return KY(this)[e]()},set:t&&function(e){return KY(this)[t](e)},configurable:!0,enumerable:!0}};if(RY&&DY(cK,{href:lK("serialize","setHref"),origin:lK("getOrigin"),protocol:lK("getProtocol","setProtocol"),username:lK("getUsername","setUsername"),password:lK("getPassword","setPassword"),host:lK("getHost","setHost"),hostname:lK("getHostname","setHostname"),port:lK("getPort","setPort"),pathname:lK("getPathname","setPathname"),search:lK("getSearch","setSearch"),searchParams:lK("getSearchParams"),hash:lK("getHash","setHash")}),LY(cK,"toJSON",(function(){return KY(this).serialize()}),{enumerable:!0}),LY(cK,"toString",(function(){return KY(this).serialize()}),{enumerable:!0}),$Y){var fK=$Y.createObjectURL,hK=$Y.revokeObjectURL;fK&&LY(uK,"createObjectURL",MY(fK,$Y)),hK&&LY(uK,"revokeObjectURL",MY(hK,$Y))}GY(uK,"URL"),kY({global:!0,forced:!OY,sham:!RY},{URL:uK});var dK=oe;Wo({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return dK(URL.prototype.toString,this)}});!function(e){var t=function(e){var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(F){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?p:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(F){return{type:"throw",arg:F}}}e.wrap=c;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",v={};function g(){}function m(){}function y(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,A=w&&w(w(R([])));A&&A!==n&&r.call(A,i)&&(b=A);var x=y.prototype=g.prototype=Object.create(b);function T(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(o,i,a,s){var u=l(e[o],e,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"===S(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function C(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function R(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:O}}function O(){return{value:t,done:!0}}return m.prototype=y,u(x,"constructor",y),u(y,"constructor",m),m.displayName=u(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},T(P.prototype),u(P.prototype,a,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(x),u(x,s,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=R,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(n){"object"===("undefined"==typeof globalThis?"undefined":S(globalThis))?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}({exports:{}});var pK={exports:{}};!function(e,t){!function(n,r){var o="function",i="undefined",a="object",s="string",u="model",c="name",l="type",f="vendor",h="version",d="architecture",p="console",v="mobile",g="tablet",m="smarttv",y="wearable",b="embedded",w="Amazon",A="Apple",x="ASUS",T="BlackBerry",P="Firefox",C="Google",_="Huawei",E="LG",k="Microsoft",R="Motorola",O="Opera",F="Samsung",M="Sony",I="Xiaomi",D="Zebra",L="Facebook",j=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},B=function(e,t){return S(e)===s&&-1!==N(t).indexOf(N(e))},N=function(e){return e.toLowerCase()},V=function(e,t){if(S(e)===s)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),S(t)===i?e:e.substring(0,255)},U=function(e,t){for(var n,i,s,u,c,l,f=0;f<t.length&&!c;){var h=t[f],d=t[f+1];for(n=i=0;n<h.length&&!c;)if(c=h[n++].exec(e))for(s=0;s<d.length;s++)l=c[++i],S(u=d[s])===a&&u.length>0?2===u.length?S(u[1])==o?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?S(u[1])!==o||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):r:this[u[0]]=l?u[1].call(this,l,u[2]):r:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):r):this[u]=l||r;f+=2}},W=function(e,t){for(var n in t)if(S(t[n])===a&&t[n].length>0){for(var o=0;o<t[n].length;o++)if(B(t[n][o],e))return"?"===n?r:n}else if(B(t[n],e))return"?"===n?r:n;return e},z={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},H={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,h],[/opios[\/ ]+([\w\.]+)/i],[h,[c,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[h,[c,O]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,h],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[c,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[h,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[h,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure Browser"],h],[/\bfocus\/([\w\.]+)/i],[h,[c,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[h,[c,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[c,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[c,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[h,[c,P]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 Browser"],h],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,h],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,L],h],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[c,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,"Chrome WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[c,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,h],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[h,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[h,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[h,W,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[c,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,h]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[d,"amd64"]],[/(ia32(?=;))/i],[[d,N]],[/((?:i[346]|x)86)[;\)]/i],[[d,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[d,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[d,"armhf"]],[/windows (ce|mobile); ppc;/i],[[d,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[d,/ower/,"",N]],[/(sun4\w)[;\)]/i],[[d,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[d,N]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[f,F],[l,g]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[f,F],[l,v]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[f,A],[l,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[f,A],[l,g]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[f,_],[l,g]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[u,[f,_],[l,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[f,I],[l,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[f,I],[l,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[f,"OPPO"],[l,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[f,"Vivo"],[l,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[f,"Realme"],[l,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[f,R],[l,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[f,R],[l,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[f,E],[l,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[f,E],[l,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[f,"Lenovo"],[l,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[f,"Nokia"],[l,v]],[/(pixel c)\b/i],[u,[f,C],[l,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[f,C],[l,v]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[f,M],[l,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[f,M],[l,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[f,"OnePlus"],[l,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[f,w],[l,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[f,w],[l,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,f,[l,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[f,T],[l,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[f,x],[l,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[f,x],[l,v]],[/(nexus 9)/i],[u,[f,"HTC"],[l,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[f,[u,/_/g," "],[l,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[f,"Acer"],[l,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[f,"Meizu"],[l,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[f,"Sharp"],[l,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,u,[l,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,u,[l,g]],[/(surface duo)/i],[u,[f,k],[l,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[f,"Fairphone"],[l,v]],[/(u304aa)/i],[u,[f,"AT&T"],[l,v]],[/\bsie-(\w*)/i],[u,[f,"Siemens"],[l,v]],[/\b(rct\w+) b/i],[u,[f,"RCA"],[l,g]],[/\b(venue[\d ]{2,7}) b/i],[u,[f,"Dell"],[l,g]],[/\b(q(?:mv|ta)\w+) b/i],[u,[f,"Verizon"],[l,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[f,"Barnes & Noble"],[l,g]],[/\b(tm\d{3}\w+) b/i],[u,[f,"NuVision"],[l,g]],[/\b(k88) b/i],[u,[f,"ZTE"],[l,g]],[/\b(nx\d{3}j) b/i],[u,[f,"ZTE"],[l,v]],[/\b(gen\d{3}) b.+49h/i],[u,[f,"Swiss"],[l,v]],[/\b(zur\d{3}) b/i],[u,[f,"Swiss"],[l,g]],[/\b((zeki)?tb.*\b) b/i],[u,[f,"Zeki"],[l,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],u,[l,g]],[/\b(ns-?\w{0,9}) b/i],[u,[f,"Insignia"],[l,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[f,"NextBook"],[l,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],u,[l,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],u,[l,v]],[/\b(ph-1) /i],[u,[f,"Essential"],[l,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[f,"Envizen"],[l,g]],[/\b(trio[-\w\. ]+) b/i],[u,[f,"MachSpeed"],[l,g]],[/\btu_(1491) b/i],[u,[f,"Rotor"],[l,g]],[/(shield[\w ]+) b/i],[u,[f,"Nvidia"],[l,g]],[/(sprint) (\w+)/i],[f,u,[l,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[f,k],[l,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[f,D],[l,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[f,D],[l,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,u,[l,p]],[/droid.+; (shield) bui/i],[u,[f,"Nvidia"],[l,p]],[/(playstation [345portablevi]+)/i],[u,[f,M],[l,p]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[f,k],[l,p]],[/smart-tv.+(samsung)/i],[f,[l,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[f,F],[l,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,E],[l,m]],[/(apple) ?tv/i],[f,[u,"Apple TV"],[l,m]],[/crkey/i],[[u,"Chromecast"],[f,C],[l,m]],[/droid.+aft(\w)( bui|\))/i],[u,[f,w],[l,m]],[/\(dtv[\);].+(aquos)/i],[u,[f,"Sharp"],[l,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[f,V],[u,V],[l,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,m]],[/((pebble))app/i],[f,u,[l,y]],[/droid.+; (glass) \d/i],[u,[f,C],[l,y]],[/droid.+; (wt63?0{2,3})\)/i],[u,[f,D],[l,y]],[/(quest( 2)?)/i],[u,[f,L],[l,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[l,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[l,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[l,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,g]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[l,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,h],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[h,W,z]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[h,W,z]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[h,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,h],[/\(bb(10);/i],[h,[c,T]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[c,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[h,[c,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],h],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,h],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,h]]},G=function e(t,o){if(S(t)===a&&(o=t,t=r),!(this instanceof e))return new e(t,o).getResult();var u=t||(S(n)!==i&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),c=o?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(H,o):H;return this.getBrowser=function(){var e={};return e.name=r,e.version=r,U.call(e,u,c.browser),e.major=function(e){return S(e)===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r}(e.version),e},this.getCPU=function(){var e={};return e.architecture=r,U.call(e,u,c.cpu),e},this.getDevice=function(){var e={};return e.vendor=r,e.model=r,e.type=r,U.call(e,u,c.device),e},this.getEngine=function(){var e={};return e.name=r,e.version=r,U.call(e,u,c.engine),e},this.getOS=function(){var e={};return e.name=r,e.version=r,U.call(e,u,c.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return u},this.setUA=function(e){return u=S(e)===s&&e.length>255?V(e,255):e,this},this.setUA(u),this};G.VERSION="1.0.2",G.BROWSER=j([c,h,"major"]),G.CPU=j([d]),G.DEVICE=j([u,f,l,p,v,m,g,y,b]),G.ENGINE=G.OS=j([c,h]),e.exports&&(t=e.exports=G),t.UAParser=G;var X=S(n)!==i&&(n.jQuery||n.Zepto);if(X&&!X.ua){var Q=new G;X.ua=Q.getResult(),X.ua.get=function(){return Q.getUA()},X.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)X.ua[n]=t[n]}}}("object"===("undefined"==typeof window?"undefined":S(window))?window:q)}(pK,pK.exports);var vK=pK.exports;function gK(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function mK(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(gK(arguments[t]));return e}var yK=function(){function e(){this._reset()}return e.prototype._reset=function(){this.eventsMap={}},e.prototype.on=function(e,t,n){return void 0===n&&(n=this),this.eventsMap[e]||(this.eventsMap[e]=[]),this.eventsMap[e].push([t,n]),this},e.prototype.once=function(e,t,n){var r=this;void 0===n&&(n=this);var o=function o(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];r.off(e,o),t.apply(n,i)};return o.listener=t,this.on(e,o),this},e.prototype.off=function(e,t){if(!e&&!t)return this._reset(),this;if(!e)return this;if(!t)return this.eventsMap[e]=[],this;var n=this.eventsMap[e];if(!n)return this;for(var r=n.length,o=0;o<r;o++){var i=gK(n[o],1)[0];i!==t&&i.listener!==t||n.splice(o,1)}return this},e.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.eventsMap[e];if(r)for(var o=mK(r),i=o.length,a=0;a<i;a++){var s=gK(o[a],2),u=s[0],c=s[1];u&&"function"==typeof u&&u.apply(c,t)}},e}(),bK={exports:{}},wK={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},AK={exports:{}},xK=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))},TK=Array.prototype.concat,PK=Array.prototype.slice,CK=AK.exports=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];xK(o)?t=TK.call(t,PK.call(o)):t.push(o)}return t};CK.wrap=function(e){return function(){return e(CK(arguments))}};var _K=wK,EK=AK.exports,SK=Object.hasOwnProperty,kK=Object.create(null);for(var RK in _K)SK.call(_K,RK)&&(kK[_K[RK]]=RK);var OK=bK.exports={to:{},get:{}};function FK(e,t,n){return Math.min(Math.max(t,e),n)}function MK(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}OK.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=OK.get.hsl(e),n="hsl";break;case"hwb":t=OK.get.hwb(e),n="hwb";break;default:t=OK.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},OK.get.rgb=function(e){if(!e)return null;var t,n,r,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=t[2],t=t[1],n=0;n<3;n++){var i=2*n;o[n]=parseInt(t.slice(i,i+2),16)}r&&(o[3]=parseInt(r,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(r=(t=t[1])[3],n=0;n<3;n++)o[n]=parseInt(t[n]+t[n],16);r&&(o[3]=parseInt(r+r,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(t[n+1],0);t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:SK.call(_K,t[1])?((o=_K[t[1]])[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=FK(o[n],0,255);return o[3]=FK(o[3],0,1),o},OK.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,FK(parseFloat(t[2]),0,100),FK(parseFloat(t[3]),0,100),FK(isNaN(n)?1:n,0,1)]}return null},OK.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,FK(parseFloat(t[2]),0,100),FK(parseFloat(t[3]),0,100),FK(isNaN(n)?1:n,0,1)]}return null},OK.to.hex=function(){var e=EK(arguments);return"#"+MK(e[0])+MK(e[1])+MK(e[2])+(e[3]<1?MK(Math.round(255*e[3])):"")},OK.to.rgb=function(){var e=EK(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},OK.to.rgb.percent=function(){var e=EK(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},OK.to.hsl=function(){var e=EK(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},OK.to.hwb=function(){var e=EK(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},OK.to.keyword=function(e){return kK[e.slice(0,3)]};for(var IK=wK,DK={},LK=0,jK=Object.keys(IK);LK<jK.length;LK++){var BK=jK[LK];DK[IK[BK]]=BK}for(var NK={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},VK=NK,UK=0,WK=Object.keys(NK);UK<WK.length;UK++){var zK=WK[UK];if(!("channels"in NK[zK]))throw new Error("missing channels property: "+zK);if(!("labels"in NK[zK]))throw new Error("missing channel labels property: "+zK);if(NK[zK].labels.length!==NK[zK].channels)throw new Error("channel and label counts mismatch: "+zK);var HK=NK[zK],GK=HK.channels,XK=HK.labels;delete NK[zK].channels,delete NK[zK].labels,Object.defineProperty(NK[zK],"channels",{value:GK}),Object.defineProperty(NK[zK],"labels",{value:XK})}NK.rgb.hsl=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255,i=Math.min(n,r,o),a=Math.max(n,r,o),s=a-i;a===i?t=0:n===a?t=(r-o)/s:r===a?t=2+(o-n)/s:o===a&&(t=4+(n-r)/s),(t=Math.min(60*t,360))<0&&(t+=360);var u=(i+a)/2;return[t,100*(a===i?0:u<=.5?s/(a+i):s/(2-a-i)),100*u]},NK.rgb.hsv=function(e){var t,n,r,o,i,a=e[0]/255,s=e[1]/255,u=e[2]/255,c=Math.max(a,s,u),l=c-Math.min(a,s,u),f=function(e){return(c-e)/6/l+.5};return 0===l?(o=0,i=0):(i=l/c,t=f(a),n=f(s),r=f(u),a===c?o=r-n:s===c?o=1/3+t-r:u===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},NK.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[NK.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,r))),100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},NK.rgb.cmyk=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},NK.rgb.keyword=function(e){var t=DK[e];if(t)return t;for(var n,r,o,i=1/0,a=0,s=Object.keys(IK);a<s.length;a++){var u=s[a],c=(r=e,o=IK[u],Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));c<i&&(i=c,n=u)}return n},NK.keyword.rgb=function(e){return IK[e]},NK.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},NK.rgb.lab=function(e){var t=NK.rgb.xyz(e),n=t[0],r=t[1],o=t[2];return r/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},NK.hsl.rgb=function(e){var t,n,r,o=e[0]/360,i=e[1]/100,a=e[2]/100;if(0===i)return[r=255*a,r,r];for(var s=2*a-(t=a<.5?a*(1+i):a+i-a*i),u=[0,0,0],c=0;c<3;c++)(n=o+1/3*-(c-1))<0&&n++,n>1&&n--,r=6*n<1?s+6*(t-s)*n:2*n<1?t:3*n<2?s+(t-s)*(2/3-n)*6:s,u[c]=255*r;return u},NK.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,o=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,o*=i<=1?i:2-i,[t,100*(0===r?2*o/(i+o):2*n/(r+n)),100*((r+n)/2)]},NK.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*i),u=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,u,a];case 1:return[s,r,a];case 2:return[a,r,u];case 3:return[a,s,r];case 4:return[u,a,r];case 5:return[r,a,s]}},NK.hsv.hsl=function(e){var t,n,r=e[0],o=e[1]/100,i=e[2]/100,a=Math.max(i,.01);n=(2-o)*i;var s=(2-o)*a;return t=o*a,[r,100*(t=(t/=s<=1?s:2-s)||0),100*(n/=2)]},NK.hwb.rgb=function(e){var t,n=e[0]/360,r=e[1]/100,o=e[2]/100,i=r+o;i>1&&(r/=i,o/=i);var a=Math.floor(6*n),s=1-o;t=6*n-a,0!=(1&a)&&(t=1-t);var u,c,l,f=r+t*(s-r);switch(a){default:case 6:case 0:u=s,c=f,l=r;break;case 1:u=f,c=s,l=r;break;case 2:u=r,c=s,l=f;break;case 3:u=r,c=f,l=s;break;case 4:u=f,c=r,l=s;break;case 5:u=s,c=r,l=f}return[255*u,255*c,255*l]},NK.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},NK.xyz.rgb=function(e){var t,n,r,o=e[0]/100,i=e[1]/100,a=e[2]/100;return n=-.9689*o+1.8758*i+.0415*a,r=.0557*o+-.204*i+1.057*a,t=(t=3.2406*o+-1.5372*i+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},NK.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},NK.lab.xyz=function(e){var t,n,r,o=e[0];t=e[1]/500+(n=(o+16)/116),r=n-e[2]/200;var i=Math.pow(n,3),a=Math.pow(t,3),s=Math.pow(r,3);return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},NK.lab.lch=function(e){var t,n=e[0],r=e[1],o=e[2];return(t=360*Math.atan2(o,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+o*o),t]},NK.lch.lab=function(e){var t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},NK.rgb.ansi16=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=V(e,3),r=n[0],o=n[1],i=n[2],a=null===t?NK.rgb.hsv(e)[2]:t;if(0===(a=Math.round(a/50)))return 30;var s=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===a&&(s+=60),s},NK.hsv.ansi16=function(e){return NK.rgb.ansi16(NK.hsv.rgb(e),e[2])},NK.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},NK.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},NK.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},NK.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},NK.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},NK.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255,i=Math.max(Math.max(n,r),o),a=Math.min(Math.min(n,r),o),s=i-a;return t=s<=0?0:i===n?(r-o)/s%6:i===r?2+(o-n)/s:4+(n-r)/s,t/=6,[360*(t%=1),100*s,100*(s<1?a/(1-s):0)]},NK.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},NK.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},NK.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var o,i=[0,0,0],a=t%1*6,s=a%1,u=1-s;switch(Math.floor(a)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=u,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=u,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=u}return o=(1-n)*r,[255*(n*i[0]+o),255*(n*i[1]+o),255*(n*i[2]+o)]},NK.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},NK.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},NK.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},NK.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},NK.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},NK.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},NK.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},NK.gray.hsl=function(e){return[0,0,e[0]]},NK.gray.hsv=NK.gray.hsl,NK.gray.hwb=function(e){return[0,100,e[0]]},NK.gray.cmyk=function(e){return[0,0,0,e[0]]},NK.gray.lab=function(e){return[e[0],0,0]},NK.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},NK.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var QK=VK;function YK(e){var t=function(){for(var e={},t=Object.keys(QK),n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var r=n.pop(),o=Object.keys(QK[r]),i=o.length,a=0;a<i;a++){var s=o[a],u=t[s];-1===u.distance&&(u.distance=t[r].distance+1,u.parent=r,n.unshift(s))}return t}function qK(e,t){return function(n){return t(e(n))}}function KK(e,t){for(var n=[t[e].parent,e],r=QK[t[e].parent][e],o=t[e].parent;t[o].parent;)n.unshift(t[o].parent),r=qK(QK[t[o].parent][o],r),o=t[o].parent;return r.conversion=n,r}var JK=VK,ZK=function(e){for(var t=YK(e),n={},r=Object.keys(t),o=r.length,i=0;i<o;i++){var a=r[i];null!==t[a].parent&&(n[a]=KK(a,t))}return n},$K={};Object.keys(JK).forEach((function(e){$K[e]={},Object.defineProperty($K[e],"channels",{value:JK[e].channels}),Object.defineProperty($K[e],"labels",{value:JK[e].labels});var t=ZK(e);Object.keys(t).forEach((function(n){var r=t[n];$K[e][n]=function(e){var t=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];if(null==o)return o;o.length>1&&(n=o);var i=e(n);if("object"===S(i))for(var a=i.length,s=0;s<a;s++)i[s]=Math.round(i[s]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}(r),$K[e][n].raw=function(e){var t=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];return null==o?o:(o.length>1&&(n=o),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))}));for(var eJ=$K,tJ=bK.exports,nJ=eJ,rJ=["keyword","gray","hex"],oJ={},iJ=0,aJ=Object.keys(nJ);iJ<aJ.length;iJ++){var sJ=aJ[iJ];oJ[U(nJ[sJ].labels).sort().join("")]=sJ}var uJ={};function cJ(e,t){if(!(this instanceof cJ))return new cJ(e,t);if(t&&t in rJ&&(t=null),t&&!(t in nJ))throw new Error("Unknown model: "+t);var n,r;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof cJ)this.model=e.model,this.color=U(e.color),this.valpha=e.valpha;else if("string"==typeof e){var o=tJ.get(e);if(null===o)throw new Error("Unable to parse color from string: "+e);this.model=o.model,r=nJ[this.model].channels,this.color=o.value.slice(0,r),this.valpha="number"==typeof o.value[r]?o.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=nJ[this.model].channels;var i=Array.prototype.slice.call(e,0,r);this.color=gJ(i,r),this.valpha="number"==typeof e[r]?e[r]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var a=Object.keys(e);"alpha"in e&&(a.splice(a.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);var s=a.sort().join("");if(!(s in oJ))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=oJ[s];var u=nJ[this.model].labels,c=[];for(n=0;n<u.length;n++)c.push(e[u[n]]);this.color=gJ(c)}if(uJ[this.model])for(r=nJ[this.model].channels,n=0;n<r;n++){var l=uJ[this.model][n];l&&(this.color[n]=l(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}cJ.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var t=this.model in tJ.to?this:this.rgb(),n=1===(t=t.round("number"==typeof e?e:1)).valpha?t.color:[].concat(U(t.color),[this.valpha]);return tJ.to[t.model](n)},percentString:function(e){var t=this.rgb().round("number"==typeof e?e:1),n=1===t.valpha?t.color:[].concat(U(t.color),[this.valpha]);return tJ.to.rgb.percent(n)},array:function(){return 1===this.valpha?U(this.color):[].concat(U(this.color),[this.valpha])},object:function(){for(var e={},t=nJ[this.model].channels,n=nJ[this.model].labels,r=0;r<t;r++)e[n[r]]=this.color[r];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray:function(){var e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject:function(){var e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round:function(e){return e=Math.max(e||0,0),new cJ([].concat(U(this.color.map(function(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}(e))),[this.valpha]),this.model)},alpha:function(e){return void 0!==e?new cJ([].concat(U(this.color),[Math.max(0,Math.min(1,e))]),this.model):this.valpha},red:dJ("rgb",0,pJ(255)),green:dJ("rgb",1,pJ(255)),blue:dJ("rgb",2,pJ(255)),hue:dJ(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:dJ("hsl",1,pJ(100)),lightness:dJ("hsl",2,pJ(100)),saturationv:dJ("hsv",1,pJ(100)),value:dJ("hsv",2,pJ(100)),chroma:dJ("hcg",1,pJ(100)),gray:dJ("hcg",2,pJ(100)),white:dJ("hwb",1,pJ(100)),wblack:dJ("hwb",2,pJ(100)),cyan:dJ("cmyk",0,pJ(100)),magenta:dJ("cmyk",1,pJ(100)),yellow:dJ("cmyk",2,pJ(100)),black:dJ("cmyk",3,pJ(100)),x:dJ("xyz",0,pJ(95.047)),y:dJ("xyz",1,pJ(100)),z:dJ("xyz",2,pJ(108.833)),l:dJ("lab",0,pJ(100)),a:dJ("lab",1),b:dJ("lab",2),keyword:function(e){return void 0!==e?new cJ(e):nJ[this.model].keyword(this.color)},hex:function(e){return void 0!==e?new cJ(e):tJ.to.hex(this.rgb().round().color)},hexa:function(e){if(void 0!==e)return new cJ(e);var t=this.rgb().round().color,n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),tJ.to.hex(t)+n},rgbNumber:function(){var e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity:function(){var e,t=[],n=H(this.rgb().color.entries());try{for(n.s();!(e=n.n()).done;){var r=V(e.value,2),o=r[0],i=r[1]/255;t[o]=i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}}catch(a){n.e(a)}finally{n.f()}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return cJ.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];return n=(n=(n+e)%360)<0?360+n:n,t.color[0]=n,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+S(e));var n=e.rgb(),r=this.rgb(),o=void 0===t?.5:t,i=2*o-1,a=n.alpha()-r.alpha(),s=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,u=1-s;return cJ.rgb(s*n.red()+u*r.red(),s*n.green()+u*r.green(),s*n.blue()+u*r.blue(),n.alpha()*o+r.alpha()*(1-o))}};for(var lJ=function(){var e=hJ[fJ];if(rJ.includes(e))return"continue";var t=nJ[e].channels;cJ.prototype[e]=function(){if(this.model===e)return new cJ(this);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.length>0?new cJ(n,e):new cJ([].concat(U(vJ(nJ[this.model][e].raw(this.color))),[this.valpha]),e)},cJ[e]=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=r[0];return"number"==typeof i&&(i=gJ(r,t)),new cJ(i,e)}},fJ=0,hJ=Object.keys(nJ);fJ<hJ.length;fJ++)lJ();function dJ(e,t,n){var r,o=H(e=Array.isArray(e)?e:[e]);try{for(o.s();!(r=o.n()).done;){var i=r.value;(uJ[i]||(uJ[i]=[]))[t]=n}}catch(a){o.e(a)}finally{o.f()}return e=e[0],function(r){var o;return void 0!==r?(n&&(r=n(r)),(o=this[e]()).color[t]=r,o):(o=this[e]().color[t],n&&(o=n(o)),o)}}function pJ(e){return function(t){return Math.max(0,Math.min(e,t))}}function vJ(e){return Array.isArray(e)?e:[e]}function gJ(e,t){for(var n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}var mJ,yJ,bJ,wJ,AJ=cJ;!function(e){e[e.red=1]="red",e[e.green=2]="green",e[e.blue=3]="blue"}(bJ||(bJ={})),I(mJ={},bJ.red,"#db357f"),I(mJ,bJ.green,"#1eb848"),I(mJ,bJ.blue,"#371dc0"),function(e){e[e.Total=0]="Total",e[e.Eye=1]="Eye",e[e.LeftEye=2]="LeftEye",e[e.RightEye=3]="RightEye",e[e.Nose=4]="Nose",e[e.Mouth=5]="Mouth",e[e.LeftFace=6]="LeftFace",e[e.RightFace=7]="RightFace",e[e.Chin=8]="Chin"}(wJ||(wJ={})),I(yJ={},wJ.Total,"total"),I(yJ,wJ.LeftFace,"occlusion_eye"),I(yJ,wJ.Eye,"occlusion_left_eye"),I(yJ,wJ.RightEye,"occlusion_right_eye"),I(yJ,wJ.Nose,"occlusion_nose"),I(yJ,wJ.Mouth,"occlusion_mouth"),I(yJ,wJ.LeftFace,"occlusion_left_face"),I(yJ,wJ.RightFace,"occlusion_right_face"),I(yJ,wJ.Chin,"occlusion_chin");var xJ,TJ={empty:"未检测到人脸",multiple:"请保持单人入镜",outside:"请将人脸移入框内",close:"请远离屏幕",far:"请靠近屏幕",light:"请调暗环境光线",dark:"请调亮环境光线",rotate:"请保持正脸",offset:"人脸偏移",ok:"请保持不动",blink:"眨眨眼",mouthopen:"张张嘴",headright:"向右转头",headleft:"向左转头",lookup:"向上抬头",lookdown:"向下低头",timeout:"采集超时",action_over:"动作核验完成",color_ready:"屏幕即将闪烁,请保持正脸",color_running:"变光中,请保持正脸",color_detecting:"炫瞳检测中",occlusion_eye:"请勿遮挡眼睛",occlusion_left_eye:"请勿遮挡左眼",occlusion_right_eye:"请勿遮挡右眼",occlusion_nose:"请勿遮挡鼻子",occlusion_mouth:"请勿遮挡嘴巴",occlusion_left_face:"请勿遮挡左脸",occlusion_right_face:"请勿遮挡右脸",occlusion_chin:"请勿遮挡下巴"};!function(e){e[e.silence=0]="silence",e[e.action=1]="action",e[e.colorful=2]="colorful"}(xJ||(xJ={}));var PJ={0:{text:"眨眼",tip:"眨眨眼",name:"blink",name2:"blink2",duration:1150},1:{text:"张嘴",tip:"张张嘴",name:"mouthopen",name2:"mouthopen2",duration:1150},2:{text:"右转",tip:"向右转头",name:"headright",name2:"headright2",duration:2200},3:{text:"左转",tip:"向左转头",name:"headleft",name2:"headleft2",duration:2200},4:{text:"抬头",tip:"向上抬头",name:"lookup",name2:"lookup2",duration:2200},5:{text:"低头",tip:"向下低头",name:"lookdown",name2:"lookdown2",duration:2200},6:{text:"左右转头",tip:"左右转头",name:"headshake",duration:2200}},CJ={exports:{}};!function(e){!function(){var t,n="Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";if(m="object"===("undefined"==typeof process?"undefined":S(process))&&"object"===S(process.versions)&&process.versions.node&&!process.browser){var r=process.versions.node.toString().replace("v","");n="Nodejs/"+r+" (NodeOS) AppleWebKit/"+r+" (KHTML, like Gecko) Nodejs/"+r+" Nodejs/"+r}t=void 0!==q?q:window,"undefined"==typeof window&&("undefined"==typeof window&&void 0!==q&&(q.navigator={userAgent:n,getUserMedia:function(){}},t.window=q),"undefined"==typeof location&&(t.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(t.screen={width:0,height:0}));var o=window.navigator;void 0!==o?(void 0!==o.webkitGetUserMedia&&(o.getUserMedia=o.webkitGetUserMedia),void 0!==o.mozGetUserMedia&&(o.getUserMedia=o.mozGetUserMedia)):o={getUserMedia:function(){},userAgent:n};var i=!!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test(o.userAgent||""),a=!(-1===o.userAgent.indexOf("Edge")||!o.msSaveOrOpenBlob&&!o.msSaveBlob),s=!!window.opera||o.userAgent.indexOf(" OPR/")>=0,u=o.userAgent.toLowerCase().indexOf("firefox")>-1&&"netscape"in window&&/ rv:/.test(o.userAgent),c=/^((?!chrome|android).)*safari/i.test(o.userAgent),l=!!window.chrome&&!s,f="undefined"!=typeof document&&!!document.documentMode&&!a;function h(e,t){var n=0,r=!1,o=window.setInterval((function(){e()&&(window.clearInterval(o),t(r)),n++>50&&(window.clearInterval(o),t(r=!0))}),10)}var d={Android:function(){return o.userAgent.match(/Android/i)},BlackBerry:function(){return o.userAgent.match(/BlackBerry|BB10/i)},iOS:function(){return o.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return o.userAgent.match(/Opera Mini/i)},Windows:function(){return o.userAgent.match(/IEMobile/i)},any:function(){return d.Android()||d.BlackBerry()||d.iOS()||d.Opera()||d.Windows()},getOsName:function(){var e="Unknown OS";return d.Android()&&(e="Android"),d.BlackBerry()&&(e="BlackBerry"),d.iOS()&&(e="iOS"),d.Opera()&&(e="Opera Mini"),d.Windows()&&(e="Windows"),e}};var p="Unknown OS",v="Unknown OS Version";var g=function(){for(var e,t=o.appVersion,n=o.userAgent,r="-",i=[{s:"Chrome OS",r:/CrOS/},{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Windows Vista",r:/Windows NT 6.0/},{s:"Windows Server 2003",r:/Windows NT 5.2/},{s:"Windows XP",r:/(Windows NT 5.1|Windows XP)/},{s:"Windows 2000",r:/(Windows NT 5.0|Windows 2000)/},{s:"Windows ME",r:/(Win 9x 4.90|Windows ME)/},{s:"Windows 98",r:/(Windows 98|Win98)/},{s:"Windows 95",r:/(Windows 95|Win95|Windows_95)/},{s:"Windows NT 4.0",r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:"Windows CE",r:/Windows CE/},{s:"Windows 3.11",r:/Win16/},{s:"Android",r:/Android/},{s:"Open BSD",r:/OpenBSD/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"QNX",r:/QNX/},{s:"UNIX",r:/UNIX/},{s:"BeOS",r:/BeOS/},{s:"OS/2",r:/OS\/2/},{s:"Search Bot",r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}],a=0;e=i[a];a++)if(e.r.test(n)){r=e.s;break}var s="-";switch(/Windows/.test(r)&&(/Windows (.*)/.test(r)&&(s=/Windows (.*)/.exec(r)[1]),r="Windows"),r){case"Mac OS X":/Mac OS X (10[\.\_\d]+)/.test(n)&&(s=/Mac OS X (10[\.\_\d]+)/.exec(n)[1]);break;case"Android":/Android ([\.\_\d]+)/.test(n)&&(s=/Android ([\.\_\d]+)/.exec(n)[1]);break;case"iOS":/OS (\d+)_(\d+)_?(\d+)?/.test(n)&&(s=/OS (\d+)_(\d+)_?(\d+)?/.exec(t))&&s.length>3&&(s=s[1]+"."+s[2]+"."+(0|s[3]))}return{osName:r,osVersion:s}}();g&&g.osName&&"-"!=g.osName?(p=g.osName,v=g.osVersion):d.any()&&"Android"==(p=d.getOsName())&&(v=function(e){var t=(e=(e||o.userAgent).toLowerCase()).match(/android\s([0-9\.]*)/);return!!t&&t[1]}());var m="object"===("undefined"==typeof process?"undefined":S(process))&&"object"===S(process.versions)&&process.versions.node;"Unknown OS"===p&&m&&(p="Nodejs",v=process.versions.node.toString().replace("v",""));var y=!1,b=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(e){"undefined"!=typeof document&&"function"==typeof document.createElement&&(!y&&e in document.createElement("canvas")&&(y=!0),!b&&e in document.createElement("video")&&(b=!0))}));var w=/^(192\.168\.|169\.254\.|10\.|172\.(1[6-9]|2\d|3[01]))/,A=/([0-9]{1,3}(\.[0-9]{1,3}){3})/,x=/[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7}/;var T=[],P=[],C=[],_=[];o.mediaDevices&&o.mediaDevices.enumerateDevices&&(o.enumerateDevices=function(e){var t=o.mediaDevices.enumerateDevices();t&&t.then?o.mediaDevices.enumerateDevices().then(e).catch((function(){e([])})):e([])});var E=!1;("undefined"!=typeof MediaStreamTrack&&"getSources"in MediaStreamTrack||o.mediaDevices&&o.mediaDevices.enumerateDevices)&&(E=!0);var k=!1,R=!1,O=!1,F=!1,M=!1;var I=window.DetectRTC||{};I.browser=function(){o.appVersion;var e,t,n,r=o.userAgent,i=o.appName,h=""+parseFloat(o.appVersion),d=parseInt(o.appVersion,10);if(s){i="Opera";try{d=(h=o.userAgent.split("OPR/")[1].split(" ")[0]).split(".")[0]}catch(yK){h="0.0.0.0",d=0}}else f?((t=r.indexOf("rv:"))>0?h=r.substring(t+3):(t=r.indexOf("MSIE"),h=r.substring(t+5)),i="IE"):l?(t=r.indexOf("Chrome"),i="Chrome",h=r.substring(t+7)):c?-1!==r.indexOf("CriOS")?(t=r.indexOf("CriOS"),i="Chrome",h=r.substring(t+6)):-1!==r.indexOf("FxiOS")?(t=r.indexOf("FxiOS"),i="Firefox",h=r.substring(t+6)):(t=r.indexOf("Safari"),i="Safari",h=r.substring(t+7),-1!==(t=r.indexOf("Version"))&&(h=r.substring(t+8)),-1!==o.userAgent.indexOf("Version/")&&(h=o.userAgent.split("Version/")[1].split(" ")[0])):u?(t=r.indexOf("Firefox"),i="Firefox",h=r.substring(t+8)):(e=r.lastIndexOf(" ")+1)<(t=r.lastIndexOf("/"))&&(i=r.substring(e,t),h=r.substring(t+1),i.toLowerCase()===i.toUpperCase()&&(i=o.appName));return a&&(i="Edge",h=o.userAgent.split("Edge/")[1]),-1!==(n=h.search(/[; \)]/))&&(h=h.substring(0,n)),d=parseInt(""+h,10),isNaN(d)&&(h=""+parseFloat(o.appVersion),d=parseInt(o.appVersion,10)),{fullVersion:h,version:d,name:i,isPrivateBrowsing:!1}}(),function(e){var t;try{if(window.webkitRequestFileSystem)window.webkitRequestFileSystem(window.TEMPORARY,1,(function(){t=!1}),(function(e){t=!0}));else if(window.indexedDB&&/Firefox/.test(window.navigator.userAgent)){var n;try{(n=window.indexedDB.open("test")).onerror=function(){return!0}}catch(yK){t=!0}void 0===t&&h((function(){return"done"===n.readyState}),(function(e){e||(t=!n.result)}))}else if(function(e){var t=e.toLowerCase();if(0===t.indexOf("msie")&&0===t.indexOf("trident"))return!1;var n=/(?:msie|rv:)\s?([\d\.]+)/.exec(t);return!!(n&&parseInt(n[1],10)>=10)}(window.navigator.userAgent)){t=!1;try{window.indexedDB||(t=!0)}catch(yK){t=!0}}else if(window.localStorage&&/Safari/.test(window.navigator.userAgent)){try{window.localStorage.setItem("test",1)}catch(yK){t=!0}void 0===t&&(t=!1,window.localStorage.removeItem("test"))}}catch(yK){t=!1}h((function(){return void 0!==t}),(function(n){e(t)}))}((function(e){I.browser.isPrivateBrowsing=!!e})),I.browser["is"+I.browser.name]=!0,I.osName=p,I.osVersion=v,"object"===("undefined"==typeof process?"undefined":S(process))&&"object"===S(process.versions)&&process.versions["node-webkit"];var D=!1;["RTCPeerConnection","webkitRTCPeerConnection","mozRTCPeerConnection","RTCIceGatherer"].forEach((function(e){D||e in window&&(D=!0)})),I.isWebRTCSupported=D,I.isORTCSupported="undefined"!=typeof RTCIceGatherer;var L=!1;((I.browser.isChrome&&I.browser.version>=35||I.browser.isFirefox&&I.browser.version>=34||I.browser.isEdge&&I.browser.version>=17||"Android"===I.osName&&I.browser.isChrome)&&(L=!0),(o.getDisplayMedia||o.mediaDevices&&o.mediaDevices.getDisplayMedia)&&(L=!0),/^(https:|chrome-extension:)$/g.test(location.protocol||""))||("undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(I.browser.isChrome||I.browser.isEdge||I.browser.isOpera)||I.browser.isFirefox)&&(L=!1);I.isScreenCapturingSupported=L;var j={isSupported:!1,isCreateMediaStreamSourceSupported:!1};["AudioContext","webkitAudioContext","mozAudioContext","msAudioContext"].forEach((function(e){j.isSupported||e in window&&(j.isSupported=!0,window[e]&&"createMediaStreamSource"in window[e].prototype&&(j.isCreateMediaStreamSourceSupported=!0))})),I.isAudioContextSupported=j.isSupported,I.isCreateMediaStreamSourceSupported=j.isCreateMediaStreamSourceSupported;var B=!1;I.browser.isChrome&&I.browser.version>31&&(B=!0),I.isRtpDataChannelsSupported=B;var N=!1;(I.browser.isFirefox&&I.browser.version>28||I.browser.isChrome&&I.browser.version>25||I.browser.isOpera&&I.browser.version>=11)&&(N=!0),I.isSctpDataChannelsSupported=N,I.isMobileDevice=i;var V=!1;(o.getUserMedia||o.mediaDevices&&o.mediaDevices.getUserMedia)&&(V=!0),I.browser.isChrome&&I.browser.version>=46&&!/^(https:|chrome-extension:)$/g.test(location.protocol||"")&&"undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(V="Requires HTTPs"),"Nodejs"===I.osName&&(V=!1),I.isGetUserMediaSupported=V;var U="";screen.width&&(U+=(screen.width?screen.width:"")+" x "+(screen.height?screen.height:""));I.displayResolution=U,I.displayAspectRatio=function(e,t){var n=function e(t,n){return 0==n?t:e(n,t%n)}(e,t);return e/n/(t/n)}(screen.width,screen.height).toFixed(2),I.isCanvasSupportsStreamCapturing=y,I.isVideoSupportsStreamCapturing=b,"Chrome"==I.browser.name&&I.browser.version>=53&&(I.isCanvasSupportsStreamCapturing||(I.isCanvasSupportsStreamCapturing="Requires chrome flag: enable-experimental-web-platform-features"),I.isVideoSupportsStreamCapturing||(I.isVideoSupportsStreamCapturing="Requires chrome flag: enable-experimental-web-platform-features")),I.DetectLocalIPAddress=function(e,t){if(I.isWebRTCSupported){var n=!0,r=!0;!function(e,t){if("undefined"==typeof document||"function"!=typeof document.getElementById)return;var n={},r=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;if(!r){var o=document.getElementById("iframe");if(!o)return;var i=o.contentWindow;r=i.RTCPeerConnection||i.mozRTCPeerConnection||i.webkitRTCPeerConnection}if(!r)return;var a=null;"Chrome"===I.browser&&I.browser.version<58&&(a={optional:[{RtpDataChannels:!0}]});var s=new r({iceServers:[{urls:"stun:stun.l.google.com:19302"}]},a);t&&(s.addStream?s.addStream(t):s.addTrack&&t.getTracks()[0]&&s.addTrack(t.getTracks()[0],t));function u(t){if(t){var r=A.exec(t);if(r){var o=r[1],i=t.match(w),a=!0;void 0===n[o]&&e(o,i,a),n[o]=!0}}else e()}if(s.onicecandidate=function(e){e.candidate&&e.candidate.candidate?u(e.candidate.candidate):u()},!t)try{s.createDataChannel("sctp",{})}catch(yK){}I.isPromisesSupported?s.createOffer().then((function(e){s.setLocalDescription(e).then(c)})):s.createOffer((function(e){s.setLocalDescription(e,c,(function(){}))}),(function(){}));function c(){s.localDescription.sdp.split("\n").forEach((function(e){e&&0===e.indexOf("a=candidate:")&&u(e)}))}}((function(t){t?t.match(w)?e("Local: "+t,n=!1,r):t.match(x)?e("Public: "+t,n,r=!1):e("Public: "+t,n,r):e()}),t)}},I.isWebSocketsSupported="WebSocket"in window&&2===window.WebSocket.CLOSING,I.isWebSocketsBlocked=!I.isWebSocketsSupported,"Nodejs"===I.osName&&(I.isWebSocketsSupported=!0,I.isWebSocketsBlocked=!1),I.checkWebSocketsSupport=function(e){e=e||function(){};try{var t,n=new WebSocket("wss://echo.websocket.org:443/");n.onopen=function(){I.isWebSocketsBlocked=!1,t=(new Date).getTime(),n.send("ping")},n.onmessage=function(){I.WebsocketLatency=(new Date).getTime()-t+"ms",e(),n.close(),n=null},n.onerror=function(){I.isWebSocketsBlocked=!0,e()}}catch(yK){I.isWebSocketsBlocked=!0,e()}},I.load=function(e){!function(e){if(E)if(!o.enumerateDevices&&window.MediaStreamTrack&&window.MediaStreamTrack.getSources&&(o.enumerateDevices=window.MediaStreamTrack.getSources.bind(window.MediaStreamTrack)),!o.enumerateDevices&&o.enumerateDevices&&(o.enumerateDevices=o.enumerateDevices.bind(o)),o.enumerateDevices){T=[],P=[],C=[],_=[],k=!1,R=!1,O=!1,F=!1,M=!1;var t={};o.enumerateDevices((function(n){T=[],P=[],C=[],_=[],n.forEach((function(e){var n={};for(var r in e)try{"function"!=typeof e[r]&&(n[r]=e[r])}catch(yK){}t[n.deviceId+n.label+n.kind]||("audio"===n.kind&&(n.kind="audioinput"),"video"===n.kind&&(n.kind="videoinput"),n.deviceId||(n.deviceId=n.id),n.id||(n.id=n.deviceId),n.label?("videoinput"!==n.kind||M||(M=!0),"audioinput"!==n.kind||F||(F=!0)):(n.isCustomLabel=!0,"videoinput"===n.kind?n.label="Camera "+(_.length+1):"audioinput"===n.kind?n.label="Microphone "+(P.length+1):"audiooutput"===n.kind?n.label="Speaker "+(C.length+1):n.label="Please invoke getUserMedia once.",void 0!==I&&I.browser.isChrome&&I.browser.version>=46&&!/^(https:|chrome-extension:)$/g.test(location.protocol||"")&&"undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(n.label="HTTPs is required to get label of this "+n.kind+" device.")),"audioinput"===n.kind&&(k=!0,-1===P.indexOf(n)&&P.push(n)),"audiooutput"===n.kind&&(R=!0,-1===C.indexOf(n)&&C.push(n)),"videoinput"===n.kind&&(O=!0,-1===_.indexOf(n)&&_.push(n)),T.push(n),t[n.deviceId+n.label+n.kind]=n)})),void 0!==I&&(I.MediaDevices=T,I.hasMicrophone=k,I.hasSpeakers=R,I.hasWebcam=O,I.isWebsiteHasWebcamPermissions=M,I.isWebsiteHasMicrophonePermissions=F,I.audioInputDevices=P,I.audioOutputDevices=C,I.videoInputDevices=_),e&&e()}))}else e&&e();else e&&e()}(e=e||function(){})},I.MediaDevices=void 0!==T?T:[],I.hasMicrophone=k,I.hasSpeakers=R,I.hasWebcam=O,I.isWebsiteHasWebcamPermissions=M,I.isWebsiteHasMicrophonePermissions=F,I.audioInputDevices=P,I.audioOutputDevices=C,I.videoInputDevices=_;var W=!1;"undefined"!=typeof document&&"function"==typeof document.createElement&&"setSinkId"in document.createElement("video")&&(W=!0),I.isSetSinkIdSupported=W;var z=!1;I.browser.isFirefox&&"undefined"!=typeof mozRTCPeerConnection?"getSenders"in mozRTCPeerConnection.prototype&&(z=!0):I.browser.isChrome&&"undefined"!=typeof webkitRTCPeerConnection&&"getSenders"in webkitRTCPeerConnection.prototype&&(z=!0),I.isRTPSenderReplaceTracksSupported=z;var H=!1;I.browser.isFirefox&&I.browser.version>38&&(H=!0),I.isRemoteStreamProcessingSupported=H;var G=!1;"undefined"!=typeof MediaStreamTrack&&"applyConstraints"in MediaStreamTrack.prototype&&(G=!0),I.isApplyConstraintsSupported=G;var X=!1;I.browser.isFirefox&&I.browser.version>=43&&(X=!0),I.isMultiMonitorScreenCapturingSupported=X,I.isPromisesSupported=!!("Promise"in window),I.version="1.4.1",void 0===I&&(window.DetectRTC={});var Q=window.MediaStream;void 0===Q&&"undefined"!=typeof webkitMediaStream&&(Q=webkitMediaStream),I.MediaStream=void 0!==Q&&"function"==typeof Q&&Object.keys(Q.prototype),"undefined"!=typeof MediaStreamTrack?I.MediaStreamTrack=Object.keys(MediaStreamTrack.prototype):I.MediaStreamTrack=!1;var Y=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;I.RTCPeerConnection=void 0!==Y&&Object.keys(Y.prototype),window.DetectRTC=I,e.exports=I}()}(CJ);var _J=CJ.exports,EJ={exports:{}};function SJ(e,t,n){function r(r){n&&!n(e,t)||r.stopImmediatePropagation()}return e.addEventListener(t,r),r}function kJ(e,t,n,r){function o(e){n[t]=e}r&&o(e[t]),Object.defineProperty(e,t,{get:function(){return n[t]},set:o})}function RJ(e,t,n){n.addEventListener(t,(function(){return e.dispatchEvent(new Event(t))}))}function OJ(e,t){Promise.resolve().then((function(){e.dispatchEvent(new Event(t))}))}!function(e){function t(e,o){if(!e)throw"First parameter is required.";o=new n(e,o=o||{type:"video"});var i=this;function a(t){t&&(o.initCallback=function(){t(),t=o.initCallback=null});var n=new r(e,o);(d=new n(e,o)).record(),h("recording"),o.disableLogs||console.log("Initialized recorderType:",d.constructor.name,"for output-type:",o.type)}function s(e){if(e=e||function(){},d){if("paused"===i.state)return i.resumeRecording(),void setTimeout((function(){s(e)}),1);"recording"===i.state||o.disableLogs||console.warn('Recording state should be: "recording", however current state is: ',i.state),o.disableLogs||console.log("Stopped recording "+o.type+" stream."),"gif"!==o.type?d.stop(t):(d.stop(),t()),h("stopped")}else v();function t(t){if(d){Object.keys(d).forEach((function(e){"function"!=typeof d[e]&&(i[e]=d[e])}));var n=d.blob;if(!n){if(!t)throw"Recording failed.";d.blob=n=t}if(n&&!o.disableLogs&&console.log(n.type,"->",m(n.size)),e){var r;try{r=l.createObjectURL(n)}catch(yK){}"function"==typeof e.call?e.call(i,r):e(r)}o.autoWriteToDisk&&c((function(e){var t={};t[o.type+"Blob"]=e,R.Store(t)}))}else"function"==typeof e.call?e.call(i,""):e("")}}function u(e){postMessage((new FileReaderSync).readAsDataURL(e))}function c(e,t){if(!e)throw"Pass a callback function over getDataURL.";var n=t?t.blob:(d||{}).blob;if(!n)return o.disableLogs||console.warn("Blob encoder did not finish its job yet."),void setTimeout((function(){c(e,t)}),1e3);if("undefined"==typeof Worker||navigator.mozGetUserMedia){var r=new FileReader;r.readAsDataURL(n),r.onload=function(t){e(t.target.result)}}else{var i=function(e){try{var t=l.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),n=new Worker(t);return l.revokeObjectURL(t),n}catch(yK){}}(u);i.onmessage=function(t){e(t.data)},i.postMessage(n)}}function f(e){e=e||0,"paused"!==i.state?"stopped"!==i.state&&(e>=i.recordingDuration?s(i.onRecordingStopped):(e+=1e3,setTimeout((function(){f(e)}),1e3))):setTimeout((function(){f(e)}),1e3)}function h(e){i&&(i.state=e,"function"==typeof i.onStateChanged.call?i.onStateChanged.call(i,e):i.onStateChanged(e))}var d,p='It seems that recorder is destroyed or "startRecording" is not invoked for '+o.type+" recorder.";function v(){!0!==o.disableLogs&&console.warn(p)}var g={startRecording:function(t){return o.disableLogs||console.log("RecordRTC version: ",i.version),t&&(o=new n(e,t)),o.disableLogs||console.log("started recording "+o.type+" stream."),d?(d.clearRecordedData(),d.record(),h("recording"),i.recordingDuration&&f(),i):(a((function(){i.recordingDuration&&f()})),i)},stopRecording:s,pauseRecording:function(){d?"recording"===i.state?(h("paused"),d.pause(),o.disableLogs||console.log("Paused recording.")):o.disableLogs||console.warn("Unable to pause the recording. Recording state: ",i.state):v()},resumeRecording:function(){d?"paused"===i.state?(h("recording"),d.resume(),o.disableLogs||console.log("Resumed recording.")):o.disableLogs||console.warn("Unable to resume the recording. Recording state: ",i.state):v()},initRecorder:a,setRecordingDuration:function(e,t){if(void 0===e)throw"recordingDuration is required.";if("number"!=typeof e)throw"recordingDuration must be a number.";return i.recordingDuration=e,i.onRecordingStopped=t||function(){},{onRecordingStopped:function(e){i.onRecordingStopped=e}}},clearRecordedData:function(){d?(d.clearRecordedData(),o.disableLogs||console.log("Cleared old recorded data.")):v()},getBlob:function(){if(d)return d.blob;v()},getDataURL:c,toURL:function(){if(d)return l.createObjectURL(d.blob);v()},getInternalRecorder:function(){return d},save:function(e){d?y(d.blob,e):v()},getFromDisk:function(e){d?t.getFromDisk(o.type,e):v()},setAdvertisementArray:function(e){o.advertisement=[];for(var t=e.length,n=0;n<t;n++)o.advertisement.push({duration:n,image:e[n]})},blob:null,bufferSize:0,sampleRate:0,buffer:null,reset:function(){"recording"!==i.state||o.disableLogs||console.warn("Stop an active recorder."),d&&"function"==typeof d.clearRecordedData&&d.clearRecordedData(),d=null,h("inactive"),i.blob=null},onStateChanged:function(e){o.disableLogs||console.log("Recorder state changed:",e)},state:"inactive",getState:function(){return i.state},destroy:function(){var e=o.disableLogs;o={disableLogs:!0},i.reset(),h("destroyed"),g=i=null,x.AudioContextConstructor&&(x.AudioContextConstructor.close(),x.AudioContextConstructor=null),o.disableLogs=e,o.disableLogs||console.log("RecordRTC is destroyed.")},version:"5.6.2"};if(!this)return i=g,g;for(var b in g)this[b]=g[b];return i=this,g}function n(e,t){return t.recorderType||t.type||(t.audio&&t.video?t.type="video":t.audio&&!t.video&&(t.type="audio")),t.recorderType&&!t.type&&(t.recorderType===E||t.recorderType===_||t.recorderType===I?t.type="video":t.recorderType===O?t.type="gif":t.recorderType===C?t.type="audio":t.recorderType===P&&(w(e,"audio").length&&w(e,"video").length||!w(e,"audio").length&&w(e,"video").length?t.type="video":w(e,"audio").length&&!w(e,"video").length&&(t.type="audio"))),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(t.mimeType||(t.mimeType="video/webm"),t.type||(t.type=t.mimeType.split("/")[0]),t.bitsPerSecond),t.type||(t.mimeType&&(t.type=t.mimeType.split("/")[0]),t.type||(t.type="audio")),t}function r(e,t){var n;return(p||f||h)&&(n=C),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&!p&&(n=P),"video"===t.type&&(p||h)&&(n=E,"undefined"!=typeof ReadableStream&&(n=I)),"gif"===t.type&&(n=O),"canvas"===t.type&&(n=_),T()&&n!==_&&n!==O&&"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(w(e,"video").length||w(e,"audio").length)&&("audio"===t.type?"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("audio/webm")&&(n=P):"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("video/webm")&&(n=P)),e instanceof Array&&e.length&&(n=M),t.recorderType&&(n=t.recorderType),!t.disableLogs&&n&&n.name&&console.log("Using recorderType:",n.name||n.constructor.name),!n&&v&&(n=P),n}function o(e){this.addStream=function(t){t&&(e=t)},this.mediaType={audio:!0,video:!0},this.startRecording=function(){var n,r=this.mediaType,o=this.mimeType||{audio:null,video:null,gif:null};if("function"!=typeof r.audio&&T()&&!w(e,"audio").length&&(r.audio=!1),"function"!=typeof r.video&&T()&&!w(e,"video").length&&(r.video=!1),"function"!=typeof r.gif&&T()&&!w(e,"video").length&&(r.gif=!1),!r.audio&&!r.video&&!r.gif)throw"MediaStream must have either audio or video tracks.";if(r.audio&&(n=null,"function"==typeof r.audio&&(n=r.audio),this.audioRecorder=new t(e,{type:"audio",bufferSize:this.bufferSize,sampleRate:this.sampleRate,numberOfAudioChannels:this.numberOfAudioChannels||2,disableLogs:this.disableLogs,recorderType:n,mimeType:o.audio,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp}),r.video||this.audioRecorder.startRecording()),r.video){n=null,"function"==typeof r.video&&(n=r.video);var i=e;if(T()&&r.audio&&"function"==typeof r.audio){var a=w(e,"video")[0];d?((i=new g).addTrack(a),n&&n===E&&(n=P)):(i=new g).addTrack(a)}this.videoRecorder=new t(i,{type:"video",video:this.video,canvas:this.canvas,frameInterval:this.frameInterval||10,disableLogs:this.disableLogs,recorderType:n,mimeType:o.video,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp,workerPath:this.workerPath,webAssemblyPath:this.webAssemblyPath,frameRate:this.frameRate,bitrate:this.bitrate}),r.audio||this.videoRecorder.startRecording()}if(r.audio&&r.video){var s=this,u=!0===T();(r.audio instanceof C&&r.video||!0!==r.audio&&!0!==r.video&&r.audio!==r.video)&&(u=!1),!0===u?(s.audioRecorder=null,s.videoRecorder.startRecording()):s.videoRecorder.initRecorder((function(){s.audioRecorder.initRecorder((function(){s.videoRecorder.startRecording(),s.audioRecorder.startRecording()}))}))}r.gif&&(n=null,"function"==typeof r.gif&&(n=r.gif),this.gifRecorder=new t(e,{type:"gif",frameRate:this.frameRate||200,quality:this.quality||10,disableLogs:this.disableLogs,recorderType:n,mimeType:o.gif}),this.gifRecorder.startRecording())},this.stopRecording=function(e){e=e||function(){},this.audioRecorder&&this.audioRecorder.stopRecording((function(t){e(t,"audio")})),this.videoRecorder&&this.videoRecorder.stopRecording((function(t){e(t,"video")})),this.gifRecorder&&this.gifRecorder.stopRecording((function(t){e(t,"gif")}))},this.pauseRecording=function(){this.audioRecorder&&this.audioRecorder.pauseRecording(),this.videoRecorder&&this.videoRecorder.pauseRecording(),this.gifRecorder&&this.gifRecorder.pauseRecording()},this.resumeRecording=function(){this.audioRecorder&&this.audioRecorder.resumeRecording(),this.videoRecorder&&this.videoRecorder.resumeRecording(),this.gifRecorder&&this.gifRecorder.resumeRecording()},this.getBlob=function(e){var t={};return this.audioRecorder&&(t.audio=this.audioRecorder.getBlob()),this.videoRecorder&&(t.video=this.videoRecorder.getBlob()),this.gifRecorder&&(t.gif=this.gifRecorder.getBlob()),e&&e(t),t},this.destroy=function(){this.audioRecorder&&(this.audioRecorder.destroy(),this.audioRecorder=null),this.videoRecorder&&(this.videoRecorder.destroy(),this.videoRecorder=null),this.gifRecorder&&(this.gifRecorder.destroy(),this.gifRecorder=null)},this.getDataURL=function(e){function t(e,t){if("undefined"!=typeof Worker){var n=function(e){var t,n=l.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),r=new Worker(n);if(void 0!==l)t=l;else{if("undefined"==typeof webkitURL)throw"Neither URL nor webkitURL detected.";t=webkitURL}return t.revokeObjectURL(n),r}((function(e){postMessage((new FileReaderSync).readAsDataURL(e))}));n.onmessage=function(e){t(e.data)},n.postMessage(e)}else{var r=new FileReader;r.readAsDataURL(e),r.onload=function(e){t(e.target.result)}}}this.getBlob((function(n){n.audio&&n.video?t(n.audio,(function(r){t(n.video,(function(t){e({audio:r,video:t})}))})):n.audio?t(n.audio,(function(t){e({audio:t})})):n.video&&t(n.video,(function(t){e({video:t})}))}))},this.writeToDisk=function(){t.writeToDisk({audio:this.audioRecorder,video:this.videoRecorder,gif:this.gifRecorder})},this.save=function(e){(e=e||{audio:!0,video:!0,gif:!0}).audio&&this.audioRecorder&&this.audioRecorder.save("string"==typeof e.audio?e.audio:""),e.video&&this.videoRecorder&&this.videoRecorder.save("string"==typeof e.video?e.video:""),e.gif&&this.gifRecorder&&this.gifRecorder.save("string"==typeof e.gif?e.gif:"")}}t.version="5.6.2",e.exports=t,t.getFromDisk=function(e,t){if(!t)throw"callback is mandatory.";console.log("Getting recorded "+("all"===e?"blobs":e+" blob ")+" from disk!"),R.Fetch((function(n,r){"all"!==e&&r===e+"Blob"&&t&&t(n),"all"===e&&t&&t(n,r.replace("Blob",""))}))},t.writeToDisk=function(e){console.log("Writing recorded blob(s) to disk!"),(e=e||{}).audio&&e.video&&e.gif?e.audio.getDataURL((function(t){e.video.getDataURL((function(n){e.gif.getDataURL((function(e){R.Store({audioBlob:t,videoBlob:n,gifBlob:e})}))}))})):e.audio&&e.video?e.audio.getDataURL((function(t){e.video.getDataURL((function(e){R.Store({audioBlob:t,videoBlob:e})}))})):e.audio&&e.gif?e.audio.getDataURL((function(t){e.gif.getDataURL((function(e){R.Store({audioBlob:t,gifBlob:e})}))})):e.video&&e.gif?e.video.getDataURL((function(t){e.gif.getDataURL((function(e){R.Store({videoBlob:t,gifBlob:e})}))})):e.audio?e.audio.getDataURL((function(e){R.Store({audioBlob:e})})):e.video?e.video.getDataURL((function(e){R.Store({videoBlob:e})})):e.gif&&e.gif.getDataURL((function(e){R.Store({gifBlob:e})}))},o.getFromDisk=t.getFromDisk,o.writeToDisk=t.writeToDisk,t.MRecordRTC=o;var i;(i=void 0!==q?q:null)&&"undefined"==typeof window&&void 0!==q&&(q.navigator={userAgent:"Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45",getUserMedia:function(){}},q.console||(q.console={}),void 0!==q.console.log&&void 0!==q.console.error||(q.console.error=q.console.log=q.console.log||function(){console.log(arguments)}),"undefined"==typeof document&&(i.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var e={getContext:function(){return e},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return e},i.HTMLVideoElement=function(){}),"undefined"==typeof location&&(i.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(i.screen={width:0,height:0}),void 0===l&&(i.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),i.window=q);var a=window.requestAnimationFrame;if(void 0===a)if("undefined"!=typeof webkitRequestAnimationFrame)a=webkitRequestAnimationFrame;else if("undefined"!=typeof mozRequestAnimationFrame)a=mozRequestAnimationFrame;else if("undefined"!=typeof msRequestAnimationFrame)a=msRequestAnimationFrame;else if(void 0===a){var s=0;a=function(e,t){var n=(new Date).getTime(),r=Math.max(0,16-(n-s)),o=setTimeout((function(){e(n+r)}),r);return s=n+r,o}}var u=window.cancelAnimationFrame;void 0===u&&("undefined"!=typeof webkitCancelAnimationFrame?u=webkitCancelAnimationFrame:"undefined"!=typeof mozCancelAnimationFrame?u=mozCancelAnimationFrame:"undefined"!=typeof msCancelAnimationFrame?u=msCancelAnimationFrame:void 0===u&&(u=function(e){clearTimeout(e)}));var c=window.AudioContext;void 0===c&&("undefined"!=typeof webkitAudioContext&&(c=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(c=mozAudioContext));var l=window.URL;void 0===l&&"undefined"!=typeof webkitURL&&(l=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var f=!(-1===navigator.userAgent.indexOf("Edge")||!navigator.msSaveBlob&&!navigator.msSaveOrOpenBlob),h=!!window.opera||-1!==navigator.userAgent.indexOf("OPR/"),d=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&"netscape"in window&&/ rv:/.test(navigator.userAgent),p=!h&&!f&&!!navigator.webkitGetUserMedia||b()||-1!==navigator.userAgent.toLowerCase().indexOf("chrome/"),v=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);v&&!p&&-1!==navigator.userAgent.indexOf("CriOS")&&(v=!1,p=!0);var g=window.MediaStream;function m(e){if(0===e)return"0 Bytes";var t=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);return(e/Math.pow(1e3,t)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB"][t]}function y(e,t){if(!e)throw"Blob object is required.";if(!e.type)try{e.type="video/webm"}catch(yK){}var n=(e.type||"video/webm").split("/")[1];if(-1!==n.indexOf(";")&&(n=n.split(";")[0]),t&&-1!==t.indexOf(".")){var r=t.split(".");t=r[0],n=r[1]}var o=(t||Math.round(9999999999*Math.random())+888888888)+"."+n;if(void 0!==navigator.msSaveOrOpenBlob)return navigator.msSaveOrOpenBlob(e,o);if(void 0!==navigator.msSaveBlob)return navigator.msSaveBlob(e,o);var i=document.createElement("a");i.href=l.createObjectURL(e),i.download=o,i.style="display:none;opacity:0;color:transparent;",(document.body||document.documentElement).appendChild(i),"function"==typeof i.click?i.click():(i.target="_blank",i.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))),l.revokeObjectURL(i.href)}function b(){return"undefined"!=typeof window&&"object"===S(window.process)&&"renderer"===window.process.type||(!("undefined"==typeof process||"object"!==S(process.versions)||!process.versions.electron)||"object"===("undefined"==typeof navigator?"undefined":S(navigator))&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}function w(e,t){return e&&e.getTracks?e.getTracks().filter((function(e){return e.kind===(t||"audio")})):[]}function A(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}void 0===g&&"undefined"!=typeof webkitMediaStream&&(g=webkitMediaStream),void 0!==g&&void 0===g.prototype.stop&&(g.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))}),t.invokeSaveAsDialog=y,t.getTracks=w,t.getSeekableBlob=function(e,t){if("undefined"==typeof EBML)throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");var n=new EBML.Reader,r=new EBML.Decoder,o=EBML.tools,i=new FileReader;i.onload=function(e){r.decode(this.result).forEach((function(e){n.read(e)})),n.stop();var i=o.makeMetadataSeekable(n.metadatas,n.duration,n.cues),a=this.result.slice(n.metadataSize),s=new Blob([i,a],{type:"video/webm"});t(s)},i.readAsArrayBuffer(e)},t.bytesToSize=m,t.isElectron=b;var x={};function T(){if(d||v||f)return!0;var e,t,n=navigator.userAgent,r=""+parseFloat(navigator.appVersion),o=parseInt(navigator.appVersion,10);return(p||h)&&(e=n.indexOf("Chrome"),r=n.substring(e+7)),-1!==(t=r.indexOf(";"))&&(r=r.substring(0,t)),-1!==(t=r.indexOf(" "))&&(r=r.substring(0,t)),o=parseInt(""+r,10),isNaN(o)&&(r=""+parseFloat(navigator.appVersion),o=parseInt(navigator.appVersion,10)),o>=49}function P(e,t){var n=this;if(void 0===e)throw'First argument "MediaStream" is required.';if("undefined"==typeof MediaRecorder)throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";if("audio"===(t=t||{mimeType:"video/webm"}).type){var r;if(w(e,"video").length&&w(e,"audio").length)navigator.mozGetUserMedia?(r=new g).addTrack(w(e,"audio")[0]):r=new g(w(e,"audio")),e=r;t.mimeType&&-1!==t.mimeType.toString().toLowerCase().indexOf("audio")||(t.mimeType=p?"audio/webm":"audio/ogg"),t.mimeType&&"audio/ogg"!==t.mimeType.toString().toLowerCase()&&navigator.mozGetUserMedia&&(t.mimeType="audio/ogg")}var o,i=[];function a(){n.timestamps.push((new Date).getTime()),"function"==typeof t.onTimeStamp&&t.onTimeStamp(n.timestamps[n.timestamps.length-1],n.timestamps)}function s(e){return o&&o.mimeType?o.mimeType:e.mimeType||"video/webm"}function u(){i=[],o=null,n.timestamps=[]}this.getArrayOfBlobs=function(){return i},this.record=function(){n.blob=null,n.clearRecordedData(),n.timestamps=[],c=[],i=[];var r=t;t.disableLogs||console.log("Passing following config over MediaRecorder API.",r),o&&(o=null),p&&!T()&&(r="video/vp8"),"function"==typeof MediaRecorder.isTypeSupported&&r.mimeType&&(MediaRecorder.isTypeSupported(r.mimeType)||(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",r.mimeType),r.mimeType="audio"===t.type?"audio/webm":"video/webm"));try{o=new MediaRecorder(e,r),t.mimeType=r.mimeType}catch(yK){o=new MediaRecorder(e)}r.mimeType&&!MediaRecorder.isTypeSupported&&"canRecordMimeType"in o&&!1===o.canRecordMimeType(r.mimeType)&&(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",r.mimeType)),o.ondataavailable=function(e){if(e.data&&c.push("ondataavailable: "+m(e.data.size)),"number"!=typeof t.timeSlice)!e.data||!e.data.size||e.data.size<100||n.blob?n.recordingCallback&&(n.recordingCallback(new Blob([],{type:s(r)})),n.recordingCallback=null):(n.blob=t.getNativeBlob?e.data:new Blob([e.data],{type:s(r)}),n.recordingCallback&&(n.recordingCallback(n.blob),n.recordingCallback=null));else if(e.data&&e.data.size&&(i.push(e.data),a(),"function"==typeof t.ondataavailable)){var o=t.getNativeBlob?e.data:new Blob([e.data],{type:s(r)});t.ondataavailable(o)}},o.onstart=function(){c.push("started")},o.onpause=function(){c.push("paused")},o.onresume=function(){c.push("resumed")},o.onstop=function(){c.push("stopped")},o.onerror=function(e){e&&(e.name||(e.name="UnknownError"),c.push("error: "+e),t.disableLogs||(-1!==e.name.toString().toLowerCase().indexOf("invalidstate")?console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.",e):-1!==e.name.toString().toLowerCase().indexOf("notsupported")?console.error("MIME type (",r.mimeType,") is not supported.",e):-1!==e.name.toString().toLowerCase().indexOf("security")?console.error("MediaRecorder security error",e):"OutOfMemory"===e.name?console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"IllegalStreamModification"===e.name?console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"OtherRecordingError"===e.name?console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"GenericError"===e.name?console.error("The UA cannot provide the codec or recording option that has been requested.",e):console.error("MediaRecorder Error",e)),function(e){if(!n.manuallyStopped&&o&&"inactive"===o.state)return delete t.timeslice,void o.start(6e5);setTimeout(void 0,1e3)}(),"inactive"!==o.state&&"stopped"!==o.state&&o.stop())},"number"==typeof t.timeSlice?(a(),o.start(t.timeSlice)):o.start(36e5),t.initCallback&&t.initCallback()},this.timestamps=[],this.stop=function(e){e=e||function(){},n.manuallyStopped=!0,o&&(this.recordingCallback=e,"recording"===o.state&&o.stop(),"number"==typeof t.timeSlice&&setTimeout((function(){n.blob=new Blob(i,{type:s(t)}),n.recordingCallback(n.blob)}),100))},this.pause=function(){o&&"recording"===o.state&&o.pause()},this.resume=function(){o&&"paused"===o.state&&o.resume()},this.clearRecordedData=function(){o&&"recording"===o.state&&n.stop(u),u()},this.getInternalRecorder=function(){return o},this.blob=null,this.getState=function(){return o&&o.state||"inactive"};var c=[];this.getAllStates=function(){return c},void 0===t.checkForInactiveTracks&&(t.checkForInactiveTracks=!1);n=this;!function r(){if(o&&!1!==t.checkForInactiveTracks)return!1===function(){if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}()?(t.disableLogs||console.log("MediaStream seems stopped."),void n.stop()):void setTimeout(r,1e3)}(),this.name="MediaStreamRecorder",this.toString=function(){return this.name}}function C(e,n){if(!w(e,"audio").length)throw"Your stream has no audio tracks.";var r,o=this,i=[],a=[],s=!1,u=0,c=2,f=(n=n||{}).desiredSampRate;function h(){if(!1===n.checkForInactiveTracks)return!0;if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}function d(e,t){function n(e,t){var n,r=e.numberOfAudioChannels,o=e.leftBuffers.slice(0),i=e.rightBuffers.slice(0),a=e.sampleRate,s=e.internalInterleavedLength,u=e.desiredSampRate;function c(e,t,n){var r=Math.round(e.length*(t/n)),o=[],i=Number((e.length-1)/(r-1));o[0]=e[0];for(var a=1;a<r-1;a++){var s=a*i,u=Number(Math.floor(s)).toFixed(),c=Number(Math.ceil(s)).toFixed(),f=s-u;o[a]=l(e[u],e[c],f)}return o[r-1]=e[e.length-1],o}function l(e,t,n){return e+(t-e)*n}function f(e,t){for(var n=new Float64Array(t),r=0,o=e.length,i=0;i<o;i++){var a=e[i];n.set(a,r),r+=a.length}return n}function h(e,t,n){for(var r=n.length,o=0;o<r;o++)e.setUint8(t+o,n.charCodeAt(o))}2===r&&(o=f(o,s),i=f(i,s),u&&(o=c(o,u,a),i=c(i,u,a))),1===r&&(o=f(o,s),u&&(o=c(o,u,a))),u&&(a=u),2===r&&(n=function(e,t){for(var n=e.length+t.length,r=new Float64Array(n),o=0,i=0;i<n;)r[i++]=e[o],r[i++]=t[o],o++;return r}(o,i)),1===r&&(n=o);var d=n.length,p=new ArrayBuffer(44+2*d),v=new DataView(p);h(v,0,"RIFF"),v.setUint32(4,36+2*d,!0),h(v,8,"WAVE"),h(v,12,"fmt "),v.setUint32(16,16,!0),v.setUint16(20,1,!0),v.setUint16(22,r,!0),v.setUint32(24,a,!0),v.setUint32(28,a*r*2,!0),v.setUint16(32,2*r,!0),v.setUint16(34,16,!0),h(v,36,"data"),v.setUint32(40,2*d,!0);for(var g=d,m=44,y=0;y<g;y++)v.setInt16(m,32767*n[y],!0),m+=2;if(t)return t({buffer:p,view:v});postMessage({buffer:p,view:v})}if(e.noWorker)n(e,(function(e){t(e.buffer,e.view)}));else{var r,o,i,a=(r=n,o=l.createObjectURL(new Blob([r.toString(),";this.onmessage = function (eee) {"+r.name+"(eee.data);}"],{type:"application/javascript"})),(i=new Worker(o)).workerURL=o,i);a.onmessage=function(e){t(e.data.buffer,e.data.view),l.revokeObjectURL(a.workerURL),a.terminate()},a.postMessage(e)}}!0===n.leftChannel&&(c=1),1===n.numberOfAudioChannels&&(c=1),(!c||c<1)&&(c=2),n.disableLogs||console.log("StereoAudioRecorder is set to record number of channels: "+c),void 0===n.checkForInactiveTracks&&(n.checkForInactiveTracks=!0),this.record=function(){if(!1===h())throw"Please make sure MediaStream is active.";A(),T=b=!1,s=!0,void 0!==n.timeSlice&&C()},this.stop=function(e){e=e||function(){},s=!1,d({desiredSampRate:f,sampleRate:y,numberOfAudioChannels:c,internalInterleavedLength:u,leftBuffers:i,rightBuffers:1===c?[]:a,noWorker:n.noWorker},(function(t,n){o.blob=new Blob([n],{type:"audio/wav"}),o.buffer=new ArrayBuffer(n.buffer.byteLength),o.view=n,o.sampleRate=f||y,o.bufferSize=m,o.length=u,T=!1,e&&e(o.blob)}))},void 0===t.Storage&&(t.Storage={AudioContextConstructor:null,AudioContext:window.AudioContext||window.webkitAudioContext}),t.Storage.AudioContextConstructor&&"closed"!==t.Storage.AudioContextConstructor.state||(t.Storage.AudioContextConstructor=new t.Storage.AudioContext);var p=t.Storage.AudioContextConstructor,v=p.createMediaStreamSource(e),g=[0,256,512,1024,2048,4096,8192,16384],m=void 0===n.bufferSize?4096:n.bufferSize;if(-1===g.indexOf(m)&&(n.disableLogs||console.log("Legal values for buffer-size are "+JSON.stringify(g,null,"\t"))),p.createJavaScriptNode)r=p.createJavaScriptNode(m,c,c);else{if(!p.createScriptProcessor)throw"WebAudio API has no support on this browser.";r=p.createScriptProcessor(m,c,c)}v.connect(r),n.bufferSize||(m=r.bufferSize);var y=void 0!==n.sampleRate?n.sampleRate:p.sampleRate||44100;(y<22050||y>96e3)&&(n.disableLogs||console.log("sample-rate must be under range 22050 and 96000.")),n.disableLogs||n.desiredSampRate&&console.log("Desired sample-rate: "+n.desiredSampRate);var b=!1;function A(){i=[],a=[],u=0,T=!1,s=!1,b=!1,p=null,o.leftchannel=i,o.rightchannel=a,o.numberOfAudioChannels=c,o.desiredSampRate=f,o.sampleRate=y,o.recordingLength=u,P={left:[],right:[],recordingLength:0}}function x(){r&&(r.onaudioprocess=null,r.disconnect(),r=null),v&&(v.disconnect(),v=null),A()}this.pause=function(){b=!0},this.resume=function(){if(!1===h())throw"Please make sure MediaStream is active.";if(!s)return n.disableLogs||console.log("Seems recording has been restarted."),void this.record();b=!1},this.clearRecordedData=function(){n.checkForInactiveTracks=!1,s&&this.stop(x),x()},this.name="StereoAudioRecorder",this.toString=function(){return this.name};var T=!1;r.onaudioprocess=function(e){if(!b)if(!1===h()&&(n.disableLogs||console.log("MediaStream seems stopped."),r.disconnect(),s=!1),s){T||(T=!0,n.onAudioProcessStarted&&n.onAudioProcessStarted(),n.initCallback&&n.initCallback());var t=e.inputBuffer.getChannelData(0),l=new Float32Array(t);if(i.push(l),2===c){var f=e.inputBuffer.getChannelData(1),d=new Float32Array(f);a.push(d)}u+=m,o.recordingLength=u,void 0!==n.timeSlice&&(P.recordingLength+=m,P.left.push(l),2===c&&P.right.push(d))}else v&&(v.disconnect(),v=null)},p.createMediaStreamDestination?r.connect(p.createMediaStreamDestination()):r.connect(p.destination),this.leftchannel=i,this.rightchannel=a,this.numberOfAudioChannels=c,this.desiredSampRate=f,this.sampleRate=y,o.recordingLength=u;var P={left:[],right:[],recordingLength:0};function C(){s&&"function"==typeof n.ondataavailable&&void 0!==n.timeSlice&&(P.left.length?(d({desiredSampRate:f,sampleRate:y,numberOfAudioChannels:c,internalInterleavedLength:P.recordingLength,leftBuffers:P.left,rightBuffers:1===c?[]:P.right},(function(e,t){var r=new Blob([t],{type:"audio/wav"});n.ondataavailable(r),setTimeout(C,n.timeSlice)})),P={left:[],right:[],recordingLength:0}):setTimeout(C,n.timeSlice))}}function _(e,t){if("undefined"==typeof html2canvas)throw"Please link: https://www.webrtc-experiment.com/screenshot.js";(t=t||{}).frameInterval||(t.frameInterval=10);var n=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(e){e in document.createElement("canvas")&&(n=!0)}));var r,o,i,a=!(!window.webkitRTCPeerConnection&&!window.webkitGetUserMedia||!window.chrome),s=50,u=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(a&&u&&u[2]&&(s=parseInt(u[2],10)),a&&s<52&&(n=!1),t.useWhammyRecorder&&(n=!1),n)if(t.disableLogs||console.log("Your browser supports both MediRecorder API and canvas.captureStream!"),e instanceof HTMLCanvasElement)r=e;else{if(!(e instanceof CanvasRenderingContext2D))throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";r=e.canvas}else navigator.mozGetUserMedia&&(t.disableLogs||console.error("Canvas recording is NOT supported in Firefox."));this.record=function(){if(i=!0,n&&!t.useWhammyRecorder){var e;"captureStream"in r?e=r.captureStream(25):"mozCaptureStream"in r?e=r.mozCaptureStream(25):"webkitCaptureStream"in r&&(e=r.webkitCaptureStream(25));try{var a=new g;a.addTrack(w(e,"video")[0]),e=a}catch(yK){}if(!e)throw"captureStream API are NOT available.";(o=new P(e,{mimeType:t.mimeType||"video/webm"})).record()}else d.frames=[],h=(new Date).getTime(),f();t.initCallback&&t.initCallback()},this.getWebPImages=function(n){if("canvas"===e.nodeName.toLowerCase()){var r=d.frames.length;d.frames.forEach((function(e,n){var o=r-n;t.disableLogs||console.log(o+"/"+r+" frames remaining"),t.onEncodingCallback&&t.onEncodingCallback(o,r);var i=e.image.toDataURL("image/webp",1);d.frames[n].image=i})),t.disableLogs||console.log("Generating WebM"),n()}else n()},this.stop=function(e){i=!1;var r=this;n&&o?o.stop(e):this.getWebPImages((function(){d.compile((function(n){t.disableLogs||console.log("Recording finished!"),r.blob=n,r.blob.forEach&&(r.blob=new Blob([],{type:"video/webm"})),e&&e(r.blob),d.frames=[]}))}))};var c=!1;function l(){d.frames=[],i=!1,c=!1}function f(){if(c)return h=(new Date).getTime(),setTimeout(f,500);if("canvas"===e.nodeName.toLowerCase()){var n=(new Date).getTime()-h;return h=(new Date).getTime(),d.frames.push({image:(r=document.createElement("canvas"),o=r.getContext("2d"),r.width=e.width,r.height=e.height,o.drawImage(e,0,0),r),duration:n}),void(i&&setTimeout(f,t.frameInterval))}var r,o;html2canvas(e,{grabMouse:void 0===t.showMousePointer||t.showMousePointer,onrendered:function(e){var n=(new Date).getTime()-h;if(!n)return setTimeout(f,t.frameInterval);h=(new Date).getTime(),d.frames.push({image:e.toDataURL("image/webp",1),duration:n}),i&&setTimeout(f,t.frameInterval)}})}this.pause=function(){c=!0,o instanceof P&&o.pause()},this.resume=function(){c=!1,o instanceof P?o.resume():i||this.record()},this.clearRecordedData=function(){i&&this.stop(l),l()},this.name="CanvasRecorder",this.toString=function(){return this.name};var h=(new Date).getTime(),d=new k.Video(100)}function E(e,t){function n(e){e=void 0!==e?e:10;var t=(new Date).getTime()-u;return t?i?(u=(new Date).getTime(),setTimeout(n,100)):(u=(new Date).getTime(),s.paused&&s.play(),f.drawImage(s,0,0,l.width,l.height),c.frames.push({duration:t,image:l.toDataURL("image/webp")}),void(o||setTimeout(n,e,e))):setTimeout(n,e,e)}function r(e,t,n,r,o){var i=document.createElement("canvas");i.width=l.width,i.height=l.height;var a=i.getContext("2d"),s=[],u=-1===t,c=t&&t>0&&t<=e.length?t:e.length,f=0,h=0,d=0,p=Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2)),v=n&&n>=0&&n<=1?n:0,g=r&&r>=0&&r<=1?r:0,m=!1;!function(e){var t=-1,n=e.length;!function r(){++t!==n?setTimeout((function(){e.functionToLoop(r,t)}),1):e.callback()}()}({length:c,functionToLoop:function(t,n){var r,o,i,c=function(){!m&&i-r<=i*g||(u&&(m=!0),s.push(e[n])),t()};if(m)c();else{var y=new Image;y.onload=function(){a.drawImage(y,0,0,l.width,l.height);var e=a.getImageData(0,0,l.width,l.height);r=0,o=e.data.length,i=e.data.length/4;for(var t=0;t<o;t+=4){var n={r:e.data[t],g:e.data[t+1],b:e.data[t+2]};Math.sqrt(Math.pow(n.r-f,2)+Math.pow(n.g-h,2)+Math.pow(n.b-d,2))<=p*v&&r++}c()},y.src=e[n].image}},callback:function(){(s=s.concat(e.slice(c))).length<=0&&s.push(e[e.length-1]),o(s)}})}(t=t||{}).frameInterval||(t.frameInterval=10),t.disableLogs||console.log("Using frames-interval:",t.frameInterval),this.record=function(){t.width||(t.width=320),t.height||(t.height=240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),l.width=t.canvas.width||320,l.height=t.canvas.height||240,f=l.getContext("2d"),t.video&&t.video instanceof HTMLVideoElement?(s=t.video.cloneNode(),t.initCallback&&t.initCallback()):(s=document.createElement("video"),A(e,s),s.onloadedmetadata=function(){t.initCallback&&t.initCallback()},s.width=t.video.width,s.height=t.video.height),s.muted=!0,s.play(),u=(new Date).getTime(),c=new k.Video,t.disableLogs||(console.log("canvas resolutions",l.width,"*",l.height),console.log("video width/height",s.width||l.width,"*",s.height||l.height)),n(t.frameInterval)};var o=!1;this.stop=function(e){e=e||function(){},o=!0;var n=this;setTimeout((function(){r(c.frames,-1,null,null,(function(r){c.frames=r,t.advertisement&&t.advertisement.length&&(c.frames=t.advertisement.concat(c.frames)),c.compile((function(t){n.blob=t,n.blob.forEach&&(n.blob=new Blob([],{type:"video/webm"})),e&&e(n.blob)}))}))}),10)};var i=!1;function a(){c.frames=[],o=!0,i=!1}this.pause=function(){i=!0},this.resume=function(){i=!1,o&&this.record()},this.clearRecordedData=function(){o||this.stop(a),a()},this.name="WhammyRecorder",this.toString=function(){return this.name};var s,u,c,l=document.createElement("canvas"),f=l.getContext("2d")}void 0!==c?x.AudioContext=c:"undefined"!=typeof webkitAudioContext&&(x.AudioContext=webkitAudioContext),t.Storage=x,t.MediaStreamRecorder=P,t.StereoAudioRecorder=C,t.CanvasRecorder=_,t.WhammyRecorder=E;var k=function(){function e(e){this.frames=[],this.duration=e||1,this.quality=.8}function t(e){function t(e,t,n){return[{data:e,id:231}].concat(n.map((function(e){var n=function(e){var t=0;e.keyframe&&(t|=128);e.invisible&&(t|=8);e.lacing&&(t|=e.lacing<<1);e.discardable&&(t|=1);if(e.trackNum>127)throw"TrackNumber > 127 not supported";var n=[128|e.trackNum,e.timecode>>8,255&e.timecode,t].map((function(e){return String.fromCharCode(e)})).join("")+e.frame;return n}({discardable:0,frame:e.data.slice(4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math.round(t)});return t+=e.duration,{data:n,id:163}})))}function n(e){for(var t=[];e>0;)t.push(255&e),e>>=8;return new Uint8Array(t.reverse())}function r(e){var t=[];e=(e.length%8?new Array(9-e.length%8).join("0"):"")+e;for(var n=0;n<e.length;n+=8)t.push(parseInt(e.substr(n,8),2));return new Uint8Array(t)}function o(e){for(var t=[],i=0;i<e.length;i++){var a=e[i].data;"object"===S(a)&&(a=o(a)),"number"==typeof a&&(a=r(a.toString(2))),"string"==typeof a&&(a=new Uint8Array(a.split("").map((function(e){return e.charCodeAt(0)}))));var s=a.size||a.byteLength||a.length,u=Math.ceil(Math.ceil(Math.log(s)/Math.log(2))/8),c=s.toString(2),l=new Array(7*u+7+1-c.length).join("0")+c,f=new Array(u).join("0")+"1"+l;t.push(n(e[i].id)),t.push(r(f)),t.push(a)}return new Blob(t,{type:"video/webm"})}function i(e,t){return parseInt(e.substr(t+4,4).split("").map((function(e){var t=e.charCodeAt(0).toString(2);return new Array(8-t.length+1).join("0")+t})).join(""),2)}function a(e){for(var t=0,n={};t<e.length;){var r=e.substr(t,4),o=i(e,t),s=e.substr(t+4+4,o);t+=8+o,n[r]=n[r]||[],"RIFF"===r||"LIST"===r?n[r].push(a(s)):n[r].push(s)}return n}var s=new function(e){var n=function(e){if(!e[0])return void postMessage({error:"Something went wrong. Maybe WebP format is not supported in the current browser."});for(var t=e[0].width,n=e[0].height,r=e[0].duration,o=1;o<e.length;o++)r+=e[o].duration;return{duration:r,width:t,height:n}}(e);if(!n)return[];for(var r,i=[{id:440786851,data:[{data:1,id:17030},{data:1,id:17143},{data:4,id:17138},{data:8,id:17139},{data:"webm",id:17026},{data:2,id:17031},{data:2,id:17029}]},{id:408125543,data:[{id:357149030,data:[{data:1e6,id:2807729},{data:"whammy",id:19840},{data:"whammy",id:22337},{data:(r=n.duration,[].slice.call(new Uint8Array(new Float64Array([r]).buffer),0).map((function(e){return String.fromCharCode(e)})).reverse().join("")),id:17545}]},{id:374648427,data:[{id:174,data:[{data:1,id:215},{data:1,id:29637},{data:0,id:156},{data:"und",id:2274716},{data:"V_VP8",id:134},{data:"VP8",id:2459272},{data:1,id:131},{id:224,data:[{data:n.width,id:176},{data:n.height,id:186}]}]}]}]}],a=0,s=0;a<e.length;){var u=[],c=0;do{u.push(e[a]),c+=e[a].duration,a++}while(a<e.length&&c<3e4);var l={id:524531317,data:t(s,0,u)};i[1].data.push(l),s+=c}return o(i)}(e.map((function(e){var t=function(e){for(var t=e.RIFF[0].WEBP[0],n=t.indexOf("*"),r=0,o=[];r<4;r++)o[r]=t.charCodeAt(n+3+r);return{width:16383&(o[1]<<8|o[0]),height:16383&(o[3]<<8|o[2]),data:t,riff:e}}(a(atob(e.image.slice(23))));return t.duration=e.duration,t})));postMessage(s)}return e.prototype.add=function(e,t){if("canvas"in e&&(e=e.canvas),"toDataURL"in e&&(e=e.toDataURL("image/webp",this.quality)),!/^data:image\/webp;base64,/gi.test(e))throw"Input must be formatted properly as a base64 encoded DataURI of type image/webp";this.frames.push({image:e,duration:t||this.duration})},e.prototype.compile=function(e){var n,r,o,i=(n=t,r=l.createObjectURL(new Blob([n.toString(),"this.onmessage = function (eee) {"+n.name+"(eee.data);}"],{type:"application/javascript"})),o=new Worker(r),l.revokeObjectURL(r),o);i.onmessage=function(t){t.data.error?console.error(t.data.error):e(t.data)},i.postMessage(this.frames)},{Video:e}}();t.Whammy=k;var R={init:function(){var e=this;if("undefined"!=typeof indexedDB&&void 0!==indexedDB.open){var t,n=this.dbName||location.href.replace(/\/|:|#|%|\.|\[|\]/g,""),r=indexedDB.open(n,1);r.onerror=e.onError,r.onsuccess=function(){((t=r.result).onerror=e.onError,t.setVersion)?1!==t.version?t.setVersion(1).onsuccess=function(){o(t),i()}:i():i()},r.onupgradeneeded=function(e){o(e.target.result)}}else console.error("IndexedDB API are not available in this browser.");function o(t){t.createObjectStore(e.dataStoreName)}function i(){var n=t.transaction([e.dataStoreName],"readwrite");function r(t){n.objectStore(e.dataStoreName).get(t).onsuccess=function(n){e.callback&&e.callback(n.target.result,t)}}e.videoBlob&&n.objectStore(e.dataStoreName).put(e.videoBlob,"videoBlob"),e.gifBlob&&n.objectStore(e.dataStoreName).put(e.gifBlob,"gifBlob"),e.audioBlob&&n.objectStore(e.dataStoreName).put(e.audioBlob,"audioBlob"),r("audioBlob"),r("videoBlob"),r("gifBlob")}},Fetch:function(e){return this.callback=e,this.init(),this},Store:function(e){return this.audioBlob=e.audioBlob,this.videoBlob=e.videoBlob,this.gifBlob=e.gifBlob,this.init(),this},onError:function(e){console.error(JSON.stringify(e,null,"\t"))},dataStoreName:"recordRTC",dbName:null};function O(e,t){if("undefined"==typeof GIFEncoder){var n=document.createElement("script");n.src="https://www.webrtc-experiment.com/gif-recorder.js",(document.body||document.documentElement).appendChild(n)}t=t||{};var r=e instanceof CanvasRenderingContext2D||e instanceof HTMLCanvasElement;this.record=function(){"undefined"!=typeof GIFEncoder&&c?(r||(t.width||(t.width=l.offsetWidth||320),t.height||(t.height=l.offsetHeight||240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),i.width=t.canvas.width||320,i.height=t.canvas.height||240,l.width=t.video.width||320,l.height=t.video.height||240),(h=new GIFEncoder).setRepeat(0),h.setDelay(t.frameRate||200),h.setQuality(t.quality||10),h.start(),"function"==typeof t.onGifRecordingStarted&&t.onGifRecordingStarted(),d=a((function e(n){if(!0!==p.clearedRecordedData){if(o)return setTimeout((function(){e(n)}),100);d=a(e),void 0===S(f)&&(f=n),n-f<90||(!r&&l.paused&&l.play(),r||s.drawImage(l,0,0,i.width,i.height),t.onGifPreview&&t.onGifPreview(i.toDataURL("image/png")),h.addFrame(s),f=n)}})),t.initCallback&&t.initCallback()):setTimeout(p.record,1e3)},this.stop=function(e){e=e||function(){},d&&u(d),this.blob=new Blob([new Uint8Array(h.stream().bin)],{type:"image/gif"}),e(this.blob),h.stream().bin=[]};var o=!1;this.pause=function(){o=!0},this.resume=function(){o=!1},this.clearRecordedData=function(){p.clearedRecordedData=!0,h&&(h.stream().bin=[])},this.name="GifRecorder",this.toString=function(){return this.name};var i=document.createElement("canvas"),s=i.getContext("2d");r&&(e instanceof CanvasRenderingContext2D?i=(s=e).canvas:e instanceof HTMLCanvasElement&&(s=e.getContext("2d"),i=e));var c=!0;if(!r){var l=document.createElement("video");l.muted=!0,l.autoplay=!0,l.playsInline=!0,c=!1,l.onloadedmetadata=function(){c=!0},A(e,l),l.play()}var f,h,d=null,p=this}function F(e,t){t=t||"multi-streams-mixer";var n=[],r=!1,o=document.createElement("canvas"),i=o.getContext("2d");o.style.opacity=0,o.style.position="absolute",o.style.zIndex=-1,o.style.top="-1000em",o.style.left="-1000em",o.className=t,(document.body||document.documentElement).appendChild(o),this.disableLogs=!1,this.frameInterval=10,this.width=360,this.height=240,this.useGainNode=!0;var a=this,s=window.AudioContext;void 0===s&&("undefined"!=typeof webkitAudioContext&&(s=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(s=mozAudioContext));var u=window.URL;void 0===u&&"undefined"!=typeof webkitURL&&(u=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var c=window.MediaStream;void 0===c&&"undefined"!=typeof webkitMediaStream&&(c=webkitMediaStream),void 0!==c&&void 0===c.prototype.stop&&(c.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))});var l={};function f(){if(!r){var e=n.length,t=!1,i=[];if(n.forEach((function(e){e.stream||(e.stream={}),e.stream.fullcanvas?t=e:i.push(e)})),t)o.width=t.stream.width,o.height=t.stream.height;else if(i.length){o.width=e>1?2*i[0].width:i[0].width;var s=1;3!==e&&4!==e||(s=2),5!==e&&6!==e||(s=3),7!==e&&8!==e||(s=4),9!==e&&10!==e||(s=5),o.height=i[0].height*s}else o.width=a.width||360,o.height=a.height||240;t&&t instanceof HTMLVideoElement&&h(t),i.forEach((function(e,t){h(e,t)})),setTimeout(f,a.frameInterval)}}function h(e,t){if(!r){var n=0,o=0,a=e.width,s=e.height;1===t&&(n=e.width),2===t&&(o=e.height),3===t&&(n=e.width,o=e.height),4===t&&(o=2*e.height),5===t&&(n=e.width,o=2*e.height),6===t&&(o=3*e.height),7===t&&(n=e.width,o=3*e.height),void 0!==e.stream.left&&(n=e.stream.left),void 0!==e.stream.top&&(o=e.stream.top),void 0!==e.stream.width&&(a=e.stream.width),void 0!==e.stream.height&&(s=e.stream.height),i.drawImage(e,n,o,a,s),"function"==typeof e.stream.onRender&&e.stream.onRender(i,n,o,a,s,t)}}function d(e){var n=document.createElement("video");return function(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}(e,n),n.className=t,n.muted=!0,n.volume=0,n.width=e.width||a.width||360,n.height=e.height||a.height||240,n.play(),n}function p(t){n=[],(t=t||e).forEach((function(e){if(e.getTracks().filter((function(e){return"video"===e.kind})).length){var t=d(e);t.stream=e,n.push(t)}}))}void 0!==s?l.AudioContext=s:"undefined"!=typeof webkitAudioContext&&(l.AudioContext=webkitAudioContext),this.startDrawingFrames=function(){f()},this.appendStreams=function(t){if(!t)throw"First parameter is required.";t instanceof Array||(t=[t]),t.forEach((function(t){var r=new c;if(t.getTracks().filter((function(e){return"video"===e.kind})).length){var o=d(t);o.stream=t,n.push(o),r.addTrack(t.getTracks().filter((function(e){return"video"===e.kind}))[0])}if(t.getTracks().filter((function(e){return"audio"===e.kind})).length){var i=a.audioContext.createMediaStreamSource(t);a.audioDestination=a.audioContext.createMediaStreamDestination(),i.connect(a.audioDestination),r.addTrack(a.audioDestination.stream.getTracks().filter((function(e){return"audio"===e.kind}))[0])}e.push(r)}))},this.releaseStreams=function(){n=[],r=!0,a.gainNode&&(a.gainNode.disconnect(),a.gainNode=null),a.audioSources.length&&(a.audioSources.forEach((function(e){e.disconnect()})),a.audioSources=[]),a.audioDestination&&(a.audioDestination.disconnect(),a.audioDestination=null),a.audioContext&&a.audioContext.close(),a.audioContext=null,i.clearRect(0,0,o.width,o.height),o.stream&&(o.stream.stop(),o.stream=null)},this.resetVideoStreams=function(e){!e||e instanceof Array||(e=[e]),p(e)},this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=function(){r=!1;var t=function(){var e;p(),"captureStream"in o?e=o.captureStream():"mozCaptureStream"in o?e=o.mozCaptureStream():a.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var t=new c;return e.getTracks().filter((function(e){return"video"===e.kind})).forEach((function(e){t.addTrack(e)})),o.stream=t,t}(),n=function(){l.AudioContextConstructor||(l.AudioContextConstructor=new l.AudioContext);a.audioContext=l.AudioContextConstructor,a.audioSources=[],!0===a.useGainNode&&(a.gainNode=a.audioContext.createGain(),a.gainNode.connect(a.audioContext.destination),a.gainNode.gain.value=0);var t=0;if(e.forEach((function(e){if(e.getTracks().filter((function(e){return"audio"===e.kind})).length){t++;var n=a.audioContext.createMediaStreamSource(e);!0===a.useGainNode&&n.connect(a.gainNode),a.audioSources.push(n)}})),!t)return;return a.audioDestination=a.audioContext.createMediaStreamDestination(),a.audioSources.forEach((function(e){e.connect(a.audioDestination)})),a.audioDestination.stream}();return n&&n.getTracks().filter((function(e){return"audio"===e.kind})).forEach((function(e){t.addTrack(e)})),e.forEach((function(e){e.fullcanvas})),t}}function M(e,t){e=e||[];var n,r,o=this;(t=t||{elementClass:"multi-streams-mixer",mimeType:"video/webm",video:{width:360,height:240}}).frameInterval||(t.frameInterval=10),t.video||(t.video={}),t.video.width||(t.video.width=360),t.video.height||(t.video.height=240),this.record=function(){var o;n=new F(e,t.elementClass||"multi-streams-mixer"),(o=[],e.forEach((function(e){w(e,"video").forEach((function(e){o.push(e)}))})),o).length&&(n.frameInterval=t.frameInterval||10,n.width=t.video.width||360,n.height=t.video.height||240,n.startDrawingFrames()),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(n.getMixedStream()),(r=new P(n.getMixedStream(),t)).record()},this.stop=function(e){r&&r.stop((function(t){o.blob=t,e(t),o.clearRecordedData()}))},this.pause=function(){r&&r.pause()},this.resume=function(){r&&r.resume()},this.clearRecordedData=function(){r&&(r.clearRecordedData(),r=null),n&&(n.releaseStreams(),n=null)},this.addStreams=function(o){if(!o)throw"First parameter is required.";o instanceof Array||(o=[o]),e.concat(o),r&&n&&(n.appendStreams(o),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(n.getMixedStream()))},this.resetVideoStreams=function(e){n&&(!e||e instanceof Array||(e=[e]),n.resetVideoStreams(e))},this.getMixer=function(){return n},this.name="MultiStreamRecorder",this.toString=function(){return this.name}}function I(e,t){var n,r,o;function i(){return new ReadableStream({start:function(r){var o=document.createElement("canvas"),i=document.createElement("video"),a=!0;i.srcObject=e,i.muted=!0,i.height=t.height,i.width=t.width,i.volume=0,i.onplaying=function(){o.width=t.width,o.height=t.height;var e=o.getContext("2d"),s=1e3/t.frameRate,u=setInterval((function(){if(n&&(clearInterval(u),r.close()),a&&(a=!1,t.onVideoProcessStarted&&t.onVideoProcessStarted()),e.drawImage(i,0,0),"closed"!==r._controlledReadableStream.state)try{r.enqueue(e.getImageData(0,0,t.width,t.height))}catch(yK){}}),s)},i.play()}})}function a(e,u){if(!t.workerPath&&!u)return n=!1,void fetch("https://unpkg.com/webm-wasm@latest/dist/webm-worker.js").then((function(t){t.arrayBuffer().then((function(t){a(e,t)}))}));if(!t.workerPath&&u instanceof ArrayBuffer){var c=new Blob([u],{type:"text/javascript"});t.workerPath=l.createObjectURL(c)}t.workerPath||console.error("workerPath parameter is missing."),(r=new Worker(t.workerPath)).postMessage(t.webAssemblyPath||"https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"),r.addEventListener("message",(function(e){"READY"===e.data?(r.postMessage({width:t.width,height:t.height,bitrate:t.bitrate||1200,timebaseDen:t.frameRate||30,realtime:t.realtime}),i().pipeTo(new WritableStream({write:function(e){n?console.error("Got image, but recorder is finished!"):r.postMessage(e.data.buffer,[e.data.buffer])}}))):e.data&&(o||s.push(e.data))}))}"undefined"!=typeof ReadableStream&&"undefined"!=typeof WritableStream||console.error("Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js"),(t=t||{}).width=t.width||640,t.height=t.height||480,t.frameRate=t.frameRate||30,t.bitrate=t.bitrate||1200,t.realtime=t.realtime||!0,this.record=function(){s=[],o=!1,this.blob=null,a(e),"function"==typeof t.initCallback&&t.initCallback()},this.pause=function(){o=!0},this.resume=function(){o=!1};var s=[];this.stop=function(e){n=!0;var t=this;!function(e){r?(r.addEventListener("message",(function(t){null===t.data&&(r.terminate(),r=null,e&&e())})),r.postMessage(null)):e&&e()}((function(){t.blob=new Blob(s,{type:"video/webm"}),e(t.blob)}))},this.name="WebAssemblyRecorder",this.toString=function(){return this.name},this.clearRecordedData=function(){s=[],o=!1,this.blob=null},this.blob=null}t.DiskStorage=R,t.GifRecorder=O,t.MultiStreamRecorder=M,t.RecordRTCPromisesHandler=function(e,n){if(!this)throw'Use "new RecordRTCPromisesHandler()"';if(void 0===e)throw'First argument "MediaStream" is required.';var r=this;r.recordRTC=new t(e,n),this.startRecording=function(){return new Promise((function(e,t){try{r.recordRTC.startRecording(),e()}catch(yK){t(yK)}}))},this.stopRecording=function(){return new Promise((function(e,t){try{r.recordRTC.stopRecording((function(n){r.blob=r.recordRTC.getBlob(),r.blob&&r.blob.size?e(n):t("Empty blob.",r.blob)}))}catch(yK){t(yK)}}))},this.pauseRecording=function(){return new Promise((function(e,t){try{r.recordRTC.pauseRecording(),e()}catch(yK){t(yK)}}))},this.resumeRecording=function(){return new Promise((function(e,t){try{r.recordRTC.resumeRecording(),e()}catch(yK){t(yK)}}))},this.getDataURL=function(e){return new Promise((function(e,t){try{r.recordRTC.getDataURL((function(t){e(t)}))}catch(yK){t(yK)}}))},this.getBlob=function(){return new Promise((function(e,t){try{e(r.recordRTC.getBlob())}catch(yK){t(yK)}}))},this.getInternalRecorder=function(){return new Promise((function(e,t){try{e(r.recordRTC.getInternalRecorder())}catch(yK){t(yK)}}))},this.reset=function(){return new Promise((function(e,t){try{e(r.recordRTC.reset())}catch(yK){t(yK)}}))},this.destroy=function(){return new Promise((function(e,t){try{e(r.recordRTC.destroy())}catch(yK){t(yK)}}))},this.getState=function(){return new Promise((function(e,t){try{e(r.recordRTC.getState())}catch(yK){t(yK)}}))},this.blob=null,this.version="5.6.2"},t.WebAssemblyRecorder=I}(EJ);var FJ="object"===("undefined"==typeof document?"undefined":S(document))&&"object-fit"in document.head.style&&!matchMedia("(-webkit-video-playable-inline)").matches,MJ="bfred-it:iphone-inline-video",IJ="bfred-it:iphone-inline-video:event",DJ="bfred-it:iphone-inline-video:nativeplay",LJ="bfred-it:iphone-inline-video:nativepause";var jJ,BJ=[],NJ=0;function VJ(e,t,n){(jJ||0)+200<Date.now()&&(e[IJ]=!0,jJ=Date.now()),n||(e.currentTime=t),BJ[++NJ%3]=100*t|0}function UJ(e){return e.driver.currentTime>=e.video.duration}function WJ(e){var t=this;t.video.readyState>=t.video.HAVE_FUTURE_DATA?(t.hasAudio||(t.driver.currentTime=t.video.currentTime+e*t.video.playbackRate/1e3,t.video.loop&&UJ(t)&&(t.driver.currentTime=0)),VJ(t.video,t.driver.currentTime)):t.video.networkState===t.video.NETWORK_IDLE&&0===t.video.buffered.length&&t.video.load(),t.video.ended&&(delete t.video[IJ],t.video.pause(!0))}function zJ(){var e=this,t=e[MJ];e.webkitDisplayingFullscreen?e[DJ]():("data:"!==t.driver.src&&t.driver.src!==e.src&&(VJ(e,0,!0),t.driver.src=e.src),e.paused&&(t.paused=!1,0===e.buffered.length&&e.load(),t.driver.play(),t.updater.start(),t.hasAudio||(OJ(e,"play"),t.video.readyState>=t.video.HAVE_ENOUGH_DATA&&OJ(e,"playing"))))}function HJ(e){var t=this,n=t[MJ];n.driver.pause(),n.updater.stop(),t.webkitDisplayingFullscreen&&t[LJ](),n.paused&&!e||(n.paused=!0,n.hasAudio||OJ(t,"pause"),t.ended&&!t.webkitDisplayingFullscreen&&(t[IJ]=!0,OJ(t,"ended")))}function GJ(e,t){var n={};e[MJ]=n,n.paused=!0,n.hasAudio=t,n.video=e,n.updater=function(e,t,n,r){var o,i;function a(n){o=t(a,r),e(n-(i||n)),i=n}return{start:function(){o||a(0)},stop:function(){n(o),o=null,i=0}}}(WJ.bind(n),requestAnimationFrame,cancelAnimationFrame),t?n.driver=function(e){var t=new Audio;return RJ(e,"play",t),RJ(e,"playing",t),RJ(e,"pause",t),t.crossOrigin=e.crossOrigin,t.src=e.src||e.currentSrc||"data:",t}(e):(e.addEventListener("canplay",(function(){e.paused||OJ(e,"playing")})),n.driver={src:e.src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){n.driver.paused=!0},play:function(){n.driver.paused=!1,UJ(n)&&VJ(e,0)},get ended(){return UJ(n)}}),e.addEventListener("emptied",(function(){var r=!n.driver.src||"data:"===n.driver.src;n.driver.src&&n.driver.src!==e.src&&(VJ(e,0,!0),n.driver.src=e.src,r||!t&&e.autoplay?n.driver.play():n.updater.stop())}),!1),e.addEventListener("webkitbeginfullscreen",(function(){e.paused?t&&0===n.driver.buffered.length&&n.driver.load():(e.pause(),e[DJ]())})),t&&(e.addEventListener("webkitendfullscreen",(function(){n.driver.currentTime=e.currentTime})),e.addEventListener("seeking",(function(){BJ.indexOf(100*e.currentTime|0)<0&&(n.driver.currentTime=e.currentTime)})))}function XJ(e){var t=e[IJ];return delete e[IJ],!e.webkitDisplayingFullscreen&&!t}function QJ(e,t){if(void 0===t&&(t={}),!e[MJ]){if(!t.everywhere){if(!FJ)return;if(!(t.iPad||t.ipad?/iPhone|iPod|iPad/:/iPhone|iPod/).test(navigator.userAgent))return}e.pause();var n=e.autoplay;e.autoplay=!1,GJ(e,!e.muted),function(e){var t=e[MJ];e[DJ]=e.play,e[LJ]=e.pause,e.play=zJ,e.pause=HJ,kJ(e,"paused",t.driver),kJ(e,"muted",t.driver,!0),kJ(e,"playbackRate",t.driver,!0),kJ(e,"ended",t.driver),kJ(e,"loop",t.driver,!0),SJ(e,"seeking",(function(e){return!e.webkitDisplayingFullscreen})),SJ(e,"seeked",(function(e){return!e.webkitDisplayingFullscreen})),SJ(e,"timeupdate",XJ),SJ(e,"ended",XJ)}(e),e.classList.add("IIV"),e.muted&&n&&(e.play(),e.addEventListener("playing",(function t(){e.autoplay=!0,e.removeEventListener("playing",t)}))),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments")}}var YJ={exports:{}},qJ={exports:{}};(function(){var e,t,n,r,o,i;"undefined"!=typeof performance&&null!==performance&&performance.now?qJ.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(qJ.exports=function(){return(e()-o)/1e6},t=process.hrtime,r=(e=function(){var e;return 1e9*(e=t())[0]+e[1]})(),i=1e9*process.uptime(),o=r-i):Date.now?(qJ.exports=function(){return Date.now()-n},n=Date.now()):(qJ.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(q);for(var KJ=qJ.exports,JJ="undefined"==typeof window?q:window,ZJ=["moz","webkit"],$J="AnimationFrame",eZ=JJ["request"+$J],tZ=JJ["cancel"+$J]||JJ["cancelRequest"+$J],nZ=0;!eZ&&nZ<ZJ.length;nZ++)eZ=JJ[ZJ[nZ]+"Request"+$J],tZ=JJ[ZJ[nZ]+"Cancel"+$J]||JJ[ZJ[nZ]+"CancelRequest"+$J];if(!eZ||!tZ){var rZ=0,oZ=0,iZ=[];eZ=function(e){if(0===iZ.length){var t=KJ(),n=Math.max(0,16.666666666666668-(t-rZ));rZ=n+t,setTimeout((function(){var e=iZ.slice(0);iZ.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(rZ)}catch(yK){setTimeout((function(){throw yK}),0)}}),Math.round(n))}return iZ.push({handle:++oZ,callback:e,cancelled:!1}),oZ},tZ=function(e){for(var t=0;t<iZ.length;t++)iZ[t].handle===e&&(iZ[t].cancelled=!0)}}YJ.exports=function(e){return eZ.call(JJ,e)},YJ.exports.cancel=function(){tZ.apply(JJ,arguments)},YJ.exports.polyfill=function(e){e||(e=JJ),e.requestAnimationFrame=eZ,e.cancelAnimationFrame=tZ};var aZ=YJ.exports,sZ=function(e,t){return sZ=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},sZ(e,t)};function uZ(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}sZ(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var cZ=function(){return cZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cZ.apply(this,arguments)};function lZ(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(yK){i(yK)}}function s(e){try{u(r.throw(e))}catch(yK){i(yK)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function fZ(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(yK){i=[6,yK],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function hZ(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function dZ(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(x3){o={error:x3}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function pZ(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function vZ(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}var gZ,mZ=function(){function e(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}return e.Undefined=new e(void 0),e}(),yZ=function(){function e(){this._first=mZ.Undefined,this._last=mZ.Undefined,this._size=0}return Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.isEmpty=function(){return this._first===mZ.Undefined},e.prototype.clear=function(){for(var e=this._first;e!==mZ.Undefined;){var t=e.next;e.prev=mZ.Undefined,e.next=mZ.Undefined,e=t}this._first=mZ.Undefined,this._last=mZ.Undefined,this._size=0},e.prototype.unshift=function(e){return this._insert(e,!1)},e.prototype.push=function(e){return this._insert(e,!0)},e.prototype._insert=function(e,t){var n=this,r=new mZ(e);if(this._first===mZ.Undefined)this._first=r,this._last=r;else if(t){var o=this._last;this._last=r,r.prev=o,o.next=r}else{var i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;var a=!1;return function(){a||(a=!0,n._remove(r))}},e.prototype.shift=function(){if(this._first!==mZ.Undefined){var e=this._first.element;return this._remove(this._first),e}},e.prototype.pop=function(){if(this._last!==mZ.Undefined){var e=this._last.element;return this._remove(this._last),e}},e.prototype._remove=function(e){if(e.prev!==mZ.Undefined&&e.next!==mZ.Undefined){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===mZ.Undefined&&e.next===mZ.Undefined?(this._first=mZ.Undefined,this._last=mZ.Undefined):e.next===mZ.Undefined?(this._last=this._last.prev,this._last.next=mZ.Undefined):e.prev===mZ.Undefined&&(this._first=this._first.next,this._first.prev=mZ.Undefined);this._size-=1},e.prototype[Symbol.iterator]=function(){var e;return fZ(this,(function(t){switch(t.label){case 0:e=this._first,t.label=1;case 1:return e===mZ.Undefined?[3,3]:[4,e.element];case 2:return t.sent(),e=e.next,[3,1];case 3:return[2]}}))},e}();!function(e){e.is=function(e){return e&&"object"===S(e)&&"function"==typeof e[Symbol.iterator]};var t=Object.freeze([]);e.empty=function(){return t},e.single=function(e){return fZ(this,(function(t){switch(t.label){case 0:return[4,e];case 1:return t.sent(),[2]}}))},e.from=function(e){return e||t},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){var n,r;try{for(var o=hZ(e),i=o.next();!i.done;i=o.next()){if(t(i.value))return!0}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1},e.find=function(e,t){var n,r;try{for(var o=hZ(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(t(a))return a}}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.filter=function(e,t){var n,r,o,i,a,s;return fZ(this,(function(u){switch(u.label){case 0:u.trys.push([0,5,6,7]),n=hZ(e),r=n.next(),u.label=1;case 1:return r.done?[3,4]:(o=r.value,t(o)?[4,o]:[3,3]);case 2:u.sent(),u.label=3;case 3:return r=n.next(),[3,1];case 4:return[3,7];case 5:return i=u.sent(),a={error:i},[3,7];case 6:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 7:return[2]}}))},e.map=function(e,t){var n,r,o,i,a,s,u;return fZ(this,(function(c){switch(c.label){case 0:n=0,c.label=1;case 1:c.trys.push([1,6,7,8]),r=hZ(e),o=r.next(),c.label=2;case 2:return o.done?[3,5]:(i=o.value,[4,t(i,n++)]);case 3:c.sent(),c.label=4;case 4:return o=r.next(),[3,2];case 5:return[3,8];case 6:return a=c.sent(),s={error:a},[3,8];case 7:try{o&&!o.done&&(u=r.return)&&u.call(r)}finally{if(s)throw s.error}return[7];case 8:return[2]}}))},e.concat=function(){var e,t,n,r,o,i,a,s,u,c,l,f,h=[];for(e=0;e<arguments.length;e++)h[e]=arguments[e];return fZ(this,(function(e){switch(e.label){case 0:e.trys.push([0,11,12,13]),t=hZ(h),n=t.next(),e.label=1;case 1:if(n.done)return[3,10];r=n.value,e.label=2;case 2:e.trys.push([2,7,8,9]),l=void 0,o=hZ(r),i=o.next(),e.label=3;case 3:return i.done?[3,6]:[4,i.value];case 4:e.sent(),e.label=5;case 5:return i=o.next(),[3,3];case 6:return[3,9];case 7:return a=e.sent(),l={error:a},[3,9];case 8:try{i&&!i.done&&(f=o.return)&&f.call(o)}finally{if(l)throw l.error}return[7];case 9:return n=t.next(),[3,1];case 10:return[3,13];case 11:return s=e.sent(),u={error:s},[3,13];case 12:try{n&&!n.done&&(c=t.return)&&c.call(t)}finally{if(u)throw u.error}return[7];case 13:return[2]}}))},e.concatNested=function(e){var t,n,r,o,i,a,s,u,c,l,f;return fZ(this,(function(h){switch(h.label){case 0:h.trys.push([0,11,12,13]),t=hZ(e),n=t.next(),h.label=1;case 1:if(n.done)return[3,10];r=n.value,h.label=2;case 2:h.trys.push([2,7,8,9]),l=void 0,o=hZ(r),i=o.next(),h.label=3;case 3:return i.done?[3,6]:[4,i.value];case 4:h.sent(),h.label=5;case 5:return i=o.next(),[3,3];case 6:return[3,9];case 7:return a=h.sent(),l={error:a},[3,9];case 8:try{i&&!i.done&&(f=o.return)&&f.call(o)}finally{if(l)throw l.error}return[7];case 9:return n=t.next(),[3,1];case 10:return[3,13];case 11:return s=h.sent(),u={error:s},[3,13];case 12:try{n&&!n.done&&(c=t.return)&&c.call(t)}finally{if(u)throw u.error}return[7];case 13:return[2]}}))},e.reduce=function(e,t,n){var r,o,i=n;try{for(var a=hZ(e),s=a.next();!s.done;s=a.next()){i=t(i,s.value)}}catch(u){r={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i},e.slice=function(e,t,n){return void 0===n&&(n=e.length),fZ(this,(function(r){switch(r.label){case 0:t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length),r.label=1;case 1:return t<n?[4,e[t]]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},e.consume=function(t,n){var r;void 0===n&&(n=Number.POSITIVE_INFINITY);var o=[];if(0===n)return[o,t];for(var i=t[Symbol.iterator](),a=0;a<n;a++){var s=i.next();if(s.done)return[o,e.empty()];o.push(s.value)}return[o,(r={},r[Symbol.iterator]=function(){return i},r)]},e.equals=function(e,t,n){void 0===n&&(n=function(e,t){return e===t});for(var r=e[Symbol.iterator](),o=t[Symbol.iterator]();;){var i=r.next(),a=o.next();if(i.done!==a.done)return!1;if(i.done)return!0;if(!n(i.value,a.value))return!1}}}(gZ||(gZ={}));var bZ=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}return e.prototype.addListener=function(e){var t=this;return this.listeners.push(e),function(){t._removeListener(e)}},e.prototype.emit=function(e){this.listeners.forEach((function(t){t(e)}))},e.prototype._removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},e.prototype.setUnexpectedErrorHandler=function(e){this.unexpectedErrorHandler=e},e.prototype.getUnexpectedErrorHandler=function(){return this.unexpectedErrorHandler},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}(),wZ=new bZ;function AZ(e){var t;(t=e)instanceof Error&&t.name===xZ&&t.message===xZ||wZ.onUnexpectedError(e)}var xZ="Canceled";!function(e){function t(){var t=e.call(this,xZ)||this;return t.name=t.message,t}uZ(t,e)}(Error),function(e){function t(t){var n=e.call(this,"NotImplemented")||this;return t&&(n.message=t),n}uZ(t,e)}(Error),function(e){function t(t){var n=e.call(this,"NotSupported")||this;return t&&(n.message=t),n}uZ(t,e)}(Error);var TZ=function(e){function t(t){var n=e.call(this,"Encountered errors while disposing of store. Errors: ["+t.join(", ")+"]")||this;return n.errors=t,n}return uZ(t,e),t}(Error);function PZ(e){var t,n;if(gZ.is(e)){var r=[];try{for(var o=hZ(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(a)try{a.dispose()}catch(yK){r.push(yK)}}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}if(1===r.length)throw r[0];if(r.length>1)throw new TZ(r);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function CZ(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=_Z((function(){return PZ(e)}));return n}function _Z(e){return{dispose:vZ((function(){e()}))}}var EZ=function(){function e(){this._toDispose=new Set,this._isDisposed=!1}return e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this.clear())},e.prototype.clear=function(){try{PZ(this._toDispose.values())}finally{this._toDispose.clear()}},e.prototype.add=function(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t},e.DISABLE_DISPOSED_WARNING=!1,e}(),SZ=function(){function e(){this._store=new EZ,this._store}return e.prototype.dispose=function(){this._store.dispose()},e.prototype._register=function(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)},e.None=Object.freeze({dispose:function(){}}),e}();!function(){function e(){this._isDisposed=!1}Object.defineProperty(e.prototype,"value",{get:function(){return this._isDisposed?void 0:this._value},set:function(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),this._value=e)},enumerable:!1,configurable:!0}),e.prototype.clear=function(){this.value=void 0},e.prototype.dispose=function(){var e;this._isDisposed=!0,null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0},e.prototype.clearAndLeak=function(){var e=this._value;return this._value=void 0,e}}();var kZ,RZ="object"===("undefined"==typeof self?"undefined":S(self))?self:"object"===("undefined"==typeof global?"undefined":S(global))?global:{},OZ=RZ.performance&&"function"==typeof RZ.performance.now,FZ=function(){function e(e){this._highResolution=OZ&&e,this._startTime=this._now(),this._stopTime=-1}return e.create=function(t){return void 0===t&&(t=!0),new e(t)},e.prototype.stop=function(){this._stopTime=this._now()},e.prototype.elapsed=function(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime},e.prototype._now=function(){return this._highResolution?RZ.performance.now():Date.now()},e}();!function(e){function t(e){return function(t,n,r){void 0===n&&(n=null);var o,i=!1;return o=e((function(e){if(!i)return o?o.dispose():i=!0,t.call(n,e)}),null,r),i&&o.dispose(),o}}function n(e,t){return a((function(n,r,o){return void 0===r&&(r=null),e((function(e){return n.call(r,t(e))}),null,o)}))}function r(e,t){return a((function(n,r,o){return void 0===r&&(r=null),e((function(e){t(e),n.call(r,e)}),null,o)}))}function o(e,t){return a((function(n,r,o){return void 0===r&&(r=null),e((function(e){return t(e)&&n.call(r,e)}),null,o)}))}function i(e,t,r){var o=r;return n(e,(function(e){return o=t(o,e)}))}function a(e){var t,n=new IZ({onFirstListenerAdd:function(){t=e(n.fire,n)},onLastListenerRemove:function(){t.dispose()}});return n.event}function s(e,t,n,r,o){var i;void 0===n&&(n=100),void 0===r&&(r=!1);var a=void 0,s=void 0,u=0,c=new IZ({leakWarningThreshold:o,onFirstListenerAdd:function(){i=e((function(e){u++,a=t(a,e),r&&!s&&(c.fire(a),a=void 0),clearTimeout(s),s=setTimeout((function(){var e=a;a=void 0,s=void 0,(!r||u>1)&&c.fire(e),u=0}),n)}))},onLastListenerRemove:function(){i.dispose()}});return c.event}function u(e,t){void 0===t&&(t=function(e,t){return e===t});var n,r=!0;return o(e,(function(e){var o=r||!t(e,n);return r=!1,n=e,o}))}e.None=function(){return SZ.None},e.once=t,e.map=n,e.forEach=r,e.filter=o,e.signal=function(e){return e},e.any=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n,r){return void 0===n&&(n=null),CZ.apply(void 0,pZ([],dZ(e.map((function(e){return e((function(e){return t.call(n,e)}),null,r)}))),!1))}},e.reduce=i,e.debounce=s,e.latch=u,e.split=function(t,n){return[e.filter(t,n),e.filter(t,(function(e){return!n(e)}))]},e.buffer=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]);var r=n.slice(),o=e((function(e){r?r.push(e):a.fire(e)})),i=function(){r&&r.forEach((function(e){return a.fire(e)})),r=null},a=new IZ({onFirstListenerAdd:function(){o||(o=e((function(e){return a.fire(e)})))},onFirstListenerDidAdd:function(){r&&(t?setTimeout(i):i())},onLastListenerRemove:function(){o&&o.dispose(),o=null}});return a.event};var c=function(){function e(e){this.event=e}return e.prototype.map=function(t){return new e(n(this.event,t))},e.prototype.forEach=function(t){return new e(r(this.event,t))},e.prototype.filter=function(t){return new e(o(this.event,t))},e.prototype.reduce=function(t,n){return new e(i(this.event,t,n))},e.prototype.latch=function(){return new e(u(this.event))},e.prototype.debounce=function(t,n,r,o){return void 0===n&&(n=100),void 0===r&&(r=!1),new e(s(this.event,t,n,r,o))},e.prototype.on=function(e,t,n){return this.event(e,t,n)},e.prototype.once=function(e,n,r){return t(this.event)(e,n,r)},e}();e.chain=function(e){return new c(e)},e.fromNodeEventEmitter=function(e,t,n){void 0===n&&(n=function(e){return e});var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.fire(n.apply(void 0,pZ([],dZ(e),!1)))},o=new IZ({onFirstListenerAdd:function(){return e.on(t,r)},onLastListenerRemove:function(){return e.removeListener(t,r)}});return o.event},e.fromDOMEventEmitter=function(e,t,n){void 0===n&&(n=function(e){return e});var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.fire(n.apply(void 0,pZ([],dZ(e),!1)))},o=new IZ({onFirstListenerAdd:function(){return e.addEventListener(t,r)},onLastListenerRemove:function(){return e.removeEventListener(t,r)}});return o.event},e.toPromise=function(e){return new Promise((function(n){return t(e)(n)}))}}(kZ||(kZ={}));var MZ=function(){function e(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=t+"_"+e._idPool++}return e.prototype.start=function(e){this._stopWatch=new FZ(!0),this._listenerCount=e},e.prototype.stop=function(){if(this._stopWatch){var e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info("did FIRE "+this._name+": elapsed_ms: "+e.toFixed(5)+", listener: "+this._listenerCount+" (elapsed_overall: "+this._elapsedOverall.toFixed(2)+", invocations: "+this._invocationCount+")"),this._stopWatch=void 0}},e._idPool=0,e}(),IZ=function(){function e(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new MZ(this._options._profName):void 0}return Object.defineProperty(e.prototype,"event",{get:function(){var e=this;return this._event||(this._event=function(t,n,r){var o;e._listeners||(e._listeners=new yZ);var i=e._listeners.isEmpty();i&&e._options&&e._options.onFirstListenerAdd&&e._options.onFirstListenerAdd(e);var a=e._listeners.push(n?[t,n]:t);i&&e._options&&e._options.onFirstListenerDidAdd&&e._options.onFirstListenerDidAdd(e),e._options&&e._options.onListenerDidAdd&&e._options.onListenerDidAdd(e,t,n);var s=null===(o=e._leakageMon)||void 0===o?void 0:o.check(e._listeners.size),u=_Z((function(){(s&&s(),e._disposed)||(a(),e._options&&e._options.onLastListenerRemove&&(e._listeners&&!e._listeners.isEmpty()||e._options.onLastListenerRemove(e)))}));return r instanceof EZ?r.add(u):Array.isArray(r)&&r.push(u),u}),this._event},enumerable:!1,configurable:!0}),e.prototype.fire=function(e){var t,n,r,o;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new yZ);try{for(var i=hZ(this._listeners),a=i.next();!a.done;a=i.next()){var s=a.value;this._deliveryQueue.push([s,e])}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}for(null===(r=this._perfMon)||void 0===r||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){var u=dZ(this._deliveryQueue.shift(),2),c=(s=u[0],u[1]);try{"function"==typeof s?s.call(void 0,c):s[0].call(s[1],c)}catch(yK){AZ(yK)}}null===(o=this._perfMon)||void 0===o||o.stop()}},e.prototype.dispose=function(){var e,t,n,r,o;this._disposed||(this._disposed=!0,null===(e=this._listeners)||void 0===e||e.clear(),null===(t=this._deliveryQueue)||void 0===t||t.clear(),null===(r=null===(n=this._options)||void 0===n?void 0:n.onLastListenerRemove)||void 0===r||r.call(n),null===(o=this._leakageMon)||void 0===o||o.dispose())},e}();function DZ(e){return new Promise((function(t,n){var r=new Image;r.src=e,r.onload=function(){return t(r)},r.onerror=function(){return n(new Error(""))}}))}function LZ(e){return new Promise((function(t){setTimeout(t,e)}))}function jZ(e,t){return e+Math.round(Math.random()*(t-e))}function BZ(){for(var e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",t=e.length-1,n="";n.length<16;)n+=e[jZ(0,t)];return encodeURIComponent(n)}function NZ(e){for(var t=[186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138],n=window.atob(e),r=n.length,o=t.length,i="",a=0;a<r;a++)i+=String.fromCharCode(n.charCodeAt(a)^t[a%o]);var s=i.slice(0,4)+i.slice(12,16)+i.slice(24,28)+i.slice(36,40);return{t:i.slice(8,12)+i.slice(20,24)+i.slice(32,36)+i.substr(-2),s:s,fix:i.slice(4,8)+i.slice(16,20)+i.slice(28,32)+i.slice(40,-2)}}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}uZ(t,e),t.prototype.fireAsync=function(e,t,n){return lZ(this,void 0,void 0,(function(){var r,o,i,a,s,u,c;return fZ(this,(function(l){switch(l.label){case 0:if(!this._listeners)return[2];this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new yZ);try{for(r=hZ(this._listeners),o=r.next();!o.done;o=r.next())i=o.value,this._asyncDeliveryQueue.push([i,e])}catch(f){u={error:f}}finally{try{o&&!o.done&&(c=r.return)&&c.call(r)}finally{if(u)throw u.error}}a=function(){var e,t,r,o,i;return fZ(this,(function(a){switch(a.label){case 0:e=dZ(s._asyncDeliveryQueue.shift(),2),t=e[0],r=e[1],o=[],i=cZ(cZ({},r),{waitUntil:function(e){if(Object.isFrozen(o))throw new Error("waitUntil can NOT be called asynchronous");n&&(e=n(e,"function"==typeof t?t:t[0])),o.push(e)}});try{"function"==typeof t?t.call(void 0,i):t[0].call(t[1],i)}catch(yK){return AZ(yK),[2,"continue"]}return Object.freeze(o),[4,Promise.allSettled(o).then((function(e){var t,n;try{for(var r=(t=void 0,hZ(e)),o=r.next();!o.done;o=r.next()){var i=o.value;"rejected"===i.status&&AZ(i.reason)}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}))];case 1:return a.sent(),[2]}}))},s=this,l.label=1;case 1:return this._asyncDeliveryQueue.size>0&&!t.isCancellationRequested?[5,a()]:[3,3];case 2:return l.sent(),[3,1];case 3:return[2]}}))}))}}(IZ),function(e){function t(t){var n,r=e.call(this,t)||this;return r._delay=null!==(n=t.delay)&&void 0!==n?n:100,r}uZ(t,e),t.prototype.fire=function(t){var n=this;this._handle||(this.pause(),this._handle=setTimeout((function(){n._handle=void 0,n.resume()}),this._delay)),e.prototype.fire.call(this,t)}}(function(e){function t(t){var n=e.call(this,t)||this;return n._isPaused=0,n._eventQueue=new yZ,n._mergeFn=null==t?void 0:t.merge,n}return uZ(t,e),t.prototype.pause=function(){this._isPaused++},t.prototype.resume=function(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){var t=Array.from(this._eventQueue);this._eventQueue.clear(),e.prototype.fire.call(this,this._mergeFn(t))}else for(;!this._isPaused&&0!==this._eventQueue.size;)e.prototype.fire.call(this,this._eventQueue.shift())},t.prototype.fire=function(t){this._listeners&&(0!==this._isPaused?this._eventQueue.push(t):e.prototype.fire.call(this,t))},t}(IZ)),function(e){function t(t){var n=e.call(this,t)||this;return n._queuedEvents=[],n._mergeFn=null==t?void 0:t.merge,n}uZ(t,e),t.prototype.fire=function(t){var n=this;this._queuedEvents.push(t),1===this._queuedEvents.length&&queueMicrotask((function(){n._mergeFn?e.prototype.fire.call(n,n._mergeFn(n._queuedEvents)):n._queuedEvents.forEach((function(t){return e.prototype.fire.call(n,t)})),n._queuedEvents=[]}))}}(IZ),function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new IZ({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!1,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);return _Z(vZ((function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)})))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach((function(t){return e.hook(t)}))},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach((function(t){return e.unhook(t)}))},e.prototype.hook=function(e){var t=this;e.listener=e.event((function(e){return t.emitter.fire(e)}))},e.prototype.unhook=function(e){e.listener&&e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()}}(),function(){function e(){var e=this;this.listening=!1,this.inputEvent=kZ.None,this.inputEventListener=SZ.None,this.emitter=new IZ({onFirstListenerDidAdd:function(){e.listening=!0,e.inputEventListener=e.inputEvent(e.emitter.fire,e.emitter)},onLastListenerRemove:function(){e.listening=!1,e.inputEventListener.dispose()}}),this.event=this.emitter.event}Object.defineProperty(e.prototype,"input",{set:function(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()}}();var VZ=new WeakMap,UZ=new WeakMap,WZ=function(){function e(t){var n,r,o,i,a=this;O(this,e),I(this,"frameInfo",null),I(this,"frameInfoCanvas",null),I(this,"recorder",void 0),Y(this,VZ,{writable:!0,value:void 0}),Y(this,UZ,{writable:!0,value:void 0}),I(this,"_videoElement",void 0),I(this,"_originSizeCanvasAndCtx",void 0),I(this,"_frameDrawingHandler",-1),I(this,"_onFrameDrawingFinished",new IZ),I(this,"createVideoStream",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!G(a,VZ).useSecure){e.next=3;break}e.next=10;break;case 3:return e.t0=X,e.t1=a,e.t2=UZ,e.next=8,navigator.mediaDevices.getUserMedia(G(a,VZ).constraints);case 8:e.t3=e.sent,(0,e.t0)(e.t1,e.t2,e.t3);case 10:return e.next=12,a.processVideoStream();case 12:case"end":return e.stop()}}),e)})))),I(this,"processVideoStream",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{a._videoElement.srcObject=G(a,UZ)}catch(yK){a._videoElement.src=URL.createObjectURL(G(a,UZ))}finally{G(a,VZ).needToRecord&&(a.recorder=new EJ.exports.RecordRTCPromisesHandler(G(a,UZ),{type:"video",mimeType:"video/mp4",frameRate:15,videoBitsPerSecond:2e5}))}return e.next=3,a._videoElement.play();case 3:case"end":return e.stop()}}),e)})))),I(this,"stopVideoStream",(function(){if(a.hasStream)try{a._videoElement.srcObject=null,G(a,UZ).getTracks().forEach((function(e){return e.stop()}))}catch(yK){}})),I(this,"grabPicture",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.grabPictureCfg,n=a.grabPictureCanvas(),r=n.originCanvas,o=r.toDataURL(t.type,t.quality);return{originDataURL:o}})),I(this,"grabPictureCanvas",(function(){var e=V(a._originSizeCanvasAndCtx,2),t=e[0],n=e[1],r=a._originSizeCanvasDimensions,o=r.width,i=r.height;return t.width=o,t.height=i,null==n||n.drawImage(a._videoElement,0,0,o,i),{originCanvas:a._originSizeCanvasAndCtx[0]}})),I(this,"frameDrawing",(function(){a._frameDrawingHandler=aZ((function e(){a.frameInfoCanvas=a.grabPictureCanvas(),a._onFrameDrawingFinished.fire(),a._frameDrawingHandler=aZ(e)}))})),I(this,"cancelFrameDrawing",(function(){a._frameDrawingHandler&&(aZ.cancel(a._frameDrawingHandler),a._frameDrawingHandler=-1)})),I(this,"cleanupCanvasMemory",(function(){var e=V(a._originSizeCanvasAndCtx,1)[0];e.width=0,e.height=0})),X(this,VZ,t),this._createVideo(),this._bindVideoEvents(),this._originSizeCanvasAndCtx=(n=this._originSizeCanvasDimensions.width,r=this._originSizeCanvasDimensions.height,o=document.createElement("canvas"),i=o.getContext("2d"),o.width=n,o.height=r,[o,i]),G(this,VZ).useSecure}return M(e,[{key:"hasStream",get:function(){return!!G(this,UZ)}},{key:"onFrameDrawingFinished",get:function(){return this._onFrameDrawingFinished.event}},{key:"_originSizeCanvasDimensions",get:function(){return{width:this._videoElement.videoWidth,height:this._videoElement.videoHeight}}},{key:"_maxSizeCanvasDimensions",get:function(){var e=this._videoElement.getBoundingClientRect(),t=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:960,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:960,o=Math.max(e/n,t/r,1);return{w:e/o,h:t/o,scale:1/o}}(e.width,e.height,640,640);return{width:t.w,height:t.h}}},{key:"_createVideo",value:function(){var e=this;this._videoElement=G(this,VZ).video;var t={playsInline:!0,autoPlay:!0,muted:!0,"webkit-playsinline":!0,"x5-video-player-type":"h5","x5-video-player-fullscreen":!1,style:"transform:scale(-1, 1);width:100%;height:100%;object-fit:cover;"};return Object.keys(t).forEach((function(n){e._videoElement.setAttribute(n,t[n])})),this._videoElement.getBoundingClientRect()}},{key:"_bindVideoEvents",value:function(){var e=this;this._videoElement.addEventListener("webkitbeginfullscreen",(function(){var t,n;null===(t=(n=e._videoElement).webkitExitFullscreen)||void 0===t||t.call(n),QJ(e._videoElement),e._videoElement.play().catch((function(){}))})),this._videoElement.addEventListener("loadedmetadata",(function(){e._videoElement.play().catch((function(){}))}))}}],[{key:"isSupport",value:function(){return _J.isGetUserMediaSupported}}]),e}();I(WZ,"grabPictureCfg",{type:"image/jpeg",quality:.96});var zZ={exports:{}};!function(e,t){e.exports=function(){var e={911:function(e,t){var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},994:function(e,t,n){n.r(t),n.d(t,{GLOBALS:function(){return b},OpData:function(){return pe},PaddlejsBackend:function(){return Ce},Runner:function(){return Pe},Tensor:function(){return fe},Transformer:function(){return C},coreUtils:function(){return r},env:function(){return v},interfaces:function(){return o},nchw2nhwc:function(){return X},nhwc2nchw:function(){return Q},registerBackend:function(){return A},registerOp:function(){return w}});var r={};n.r(r),n.d(r,{AddItemToVars:function(){return u},delUselessData:function(){return l},findVarByKey:function(){return s},getGlobalInterface:function(){return i},getOrMakeGlobalProperty:function(){return a},traverseVars:function(){return c}});var o={};function i(){var e;if("undefined"!=typeof window)e=window;else if(void 0!==n.g)e=n.g;else{if("undefined"==typeof self)throw new Error("Could not find a global object");e=self}return e}function a(e,t){var n=i();return n[e]||(n[e]=t),n[e]}function s(e,t){return Array.isArray(e)?e.find((function(e){return e.name===t})):e[t]}function u(e,t){var n=Array.isArray(e),r=Array.isArray(t)?t:[t];n?r.forEach((function(t){for(var n=null,r=0;r<e.length;r++)if(e[r].name===t.name){n=r;break}null!==n?e[n]=t:e.push(t)})):r.forEach((function(t){e[t.name]=t}))}function c(e,t){Array.isArray(e)?e.forEach((function(e){t(e)})):Object.keys(e).forEach((function(n){t(e[n])}))}function l(e){if(e.ops=null,e.vars instanceof Array)for(var t=0;t<e.vars.length;t++)e.vars[t].data&&delete e.vars[t].data;else for(var n in e.vars)e.vars[n].data&&delete e.vars[n].data}n.r(o),n.d(o,{BufferType:function(){return f},GraphType:function(){return p},UniformType:function(){return d},WasmMemoryType:function(){return h}});var f,h,d,p,v=a("env",new(function(){function e(){this.ENV={}}return e.prototype.set=function(e,t){this.ENV[e]=t},e.prototype.get=function(e){return this.ENV[e]},e}())),g=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},m=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},y=function(){function e(e){this.urlConf={dir:"",main:""},this.separateChunk=!0,this.chunkNum=1,this.dataType="binary",this.params={type:"fetch"},this.inNode=!1,this.isLocalFile=!1,this.realFetch=function(){throw new Error("ERROR: empty fetch funciton")};var t=e,n="model.json";if(e.endsWith(".json")){var r=e.lastIndexOf("/")+1;t=e.substr(0,r),n=e.substr(r)}else"/"!==e.charAt(e.length-1)&&(t=e+"/");this.isLocalFile=0!==t.indexOf("http"),this.urlConf={dir:this.isLocalFile?"/"===t.charAt(0)?""+t:"/"+t:t,main:n},this.inNode="node"===v.get("platform")}return e.prototype.load=function(t){return g(this,void 0,void 0,(function(){var n,r;return m(this,(function(o){switch(o.label){case 0:return(r=t)?[3,2]:[4,this.fetchModel()];case 1:r=o.sent(),o.label=2;case 2:return n=r,this.separateChunk=!!n.chunkNum&&n.chunkNum>0,this.chunkNum=this.separateChunk?n.chunkNum:0,this.separateChunk?"binary"!==this.dataType?[3,4]:[4,this.fetchChunks().then((function(t){return e.allocateParamsVar(n.vars,t)}))]:[3,4];case 3:o.sent(),o.label=4;case 4:return[2,n]}}))}))},e.prototype.fetchOneChunk=function(e){return g(this,void 0,void 0,(function(){return m(this,(function(t){switch(t.label){case 0:return v.get("fetch")?[4,v.get("fetch")(e,{type:"arrayBuffer"})]:[3,2];case 1:return[2,t.sent()];case 2:return[2,this.fetch(e).then((function(e){return e.arrayBuffer()}))]}}))}))},e.prototype.fetchJson=function(e){return this.fetch(e).then((function(e){return e.json()}))},e.prototype.getFileName=function(e){return"chunk_"+e+".dat"},e.prototype.fetchChunks=function(){return g(this,void 0,void 0,(function(){var e,t,n;return m(this,(function(r){for(e=this.chunkNum,t=[],n=1;n<=e;n++)t.push(this.fetchOneChunk(this.urlConf.dir+this.getFileName(n)));return[2,Promise.all(t).then((function(e){var t,n=0,r=[];e.forEach((function(e){t=new Float32Array(e),r.push(t),n+=t.length}));var o=new Float32Array(n),i=0;return r.forEach((function(e){e.forEach((function(e){o[i]=e,i+=1}))})),o}))]}))}))},e.allocateParamsVar=function(e,t){var n,r=0,o=Array.isArray(t)?t:Object.values(t);c(e,(function(e){n=e.shape.reduce((function(e,t){return e*t})),e.persistable&&(e.data=o.slice(r,r+n),r+=n)}))},e.prototype.fetch=function(e,t){if(v.get("fetch"))return v.get("fetch")(e,t||{});var r=(t||this.params).method||"get",o=new(this.inNode?n(911).Headers:Headers);return this.realFetch=this.inNode?this.isLocalFile?this.fetchLocalFile:n(911):window.fetch.bind(window),this.realFetch(e,{method:r,headers:o})},e.prototype.fetchLocalFile=function(e){var t=n(993);return new Promise((function(n,r){try{n(t.readFileSync(e,"utf8"))}catch(e){r(e)}}))},e.prototype.fetchModel=function(){var e=this,t=this.params,n=this.urlConf.dir+this.urlConf.main,r=null;return"fetch"===t.type&&(r=new Promise((function(r,o){e.fetch(n,t).then((function(t){return v.get("fetch")?t:e.isLocalFile&&e.inNode?JSON.parse(t):t.json()})).then((function(e){return r(e)})).then((function(e){return o(e)}))}))),r},e}();!function(e){e.FrameBuffer="frameBuffer",e.ColorBuffer="colorBuffer"}(f||(f={})),function(e){e.memory100="100",e.memory200="200",e.memory300="300",e.memory400="400",e.memory500="500",e.memory600="600",e.memory700="700",e.memory800="800",e.memory900="900"}(h||(h={})),function(e){e.uniform1f="1f",e.uniform1fv="1fv",e.uniform1i="1i",e.uniform1iv="1iv",e.uniform2f="2f",e.uniform2fv="2fv",e.uniform2i="2i",e.uniform2iv="2iv",e.uniform3f="3f",e.uniform3fv="3fv",e.uniform3i="3i",e.uniform3iv="3iv",e.uniform4f="4f",e.uniform4fv="4fv",e.uniform4i="4i",e.uniform4iv="4iv"}(d||(d={})),function(e){e.SingleOutput="single",e.MultipleOutput="multiple",e.MultipleInput="multipleInput"}(p||(p={}));var b={opRegistry:{ops:{}},backend:"",backendInstance:null};function w(e,t){var n=e.conf,r=e.params,o=e.main,i=e.mainFunc,a=e.textureFuncConf,s=e.commonFuncConf,u=e.behaviors,c=void 0===u?[]:u,l=b.backend+"_"+t;b.opRegistry.ops[l]||(b.opRegistry.ops[l]={name:t,conf:n,params:r,main:o,mainFunc:i,textureFuncConf:a,commonFuncConf:s,behaviors:c})}function A(e,t,n){e&&(b.backend=e),t&&(b.backendInstance=t),n&&Object.keys(n).forEach((function(e){w(n[e],e)}))}b=a("GLOBALS",b);var x=i();x.ImageBitmap||(x.ImageBitmap=function(){});var T,P=function(){function e(e,t){this.id="",this.type="",this.inputs={},this.outputs={},this.attrs={},this.subAttrs=[],this.next="",this.opData=null,this.isPacked=!1,this.bufferType=f.FrameBuffer,this.uniform=null;var n=e.inputs,r=e.outputs,o=e.attrs,i=void 0===o?{}:o,a=e.type,s=e.isPacked,u=void 0!==s&&s,c=e.bufferType,l=void 0===c?f.FrameBuffer:c,h=e.uniform,d=void 0===h?null:h;this.id=a+"_"+ +new Date+"_"+t,this.inputs=n,this.outputs=r,this.attrs=i,this.subAttrs=e["sub-attrs"]||[],this.uniform=d,this.type=a,this.isPacked=u,this.bufferType=l,this.next="",this.opData=null}return Object.defineProperty(e.prototype,"inputsName",{get:function(){var e=this,t=[];return Object.keys(this.inputs).forEach((function(n){t.push(e.inputs[n][0])})),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"outputsName",{get:function(){return this.outputs.Output||this.outputs.Out||this.outputs.Y},enumerable:!1,configurable:!0}),e.prototype.execute=function(e){b.backendInstance.runProgram(this.opData,e)},e}(),C=function(e){this.name=e},_=(T=function(e,t){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),E={conv2d:function(e,t){var n=e.attrs.strides,r=e.inputs.Input[0],o=e.inputs.Filter[0];if("image"===r)return!1;var i=s(t,r).shape,a=s(t,o).shape;return!n.find((function(e){return e>1}))&&i[i.length-1-2]%4==0&&4===a.length&&a[0]%4==0&&a[1]%4==0}};function k(e){return{type:"packed_2_unpacked",attrs:{},inputs:{Input:[e.inputName]},outputs:{Output:[e.outputName]}}}function R(e){return{type:"unpacked_2_packed",attrs:{},inputs:{Input:[e.inputName]},outputs:{Output:[e.outputName]}}}function O(e,t){Object.keys(e.inputs).forEach((function(t){e.inputs[t]=[e.inputs[t]+"_packed"]})),Object.keys(e.outputs).forEach((function(t){e.outputs[t]=[e.outputs[t]+"_packed"]})),e.type=e.type+"_packing",e.id=e.type+"_"+ +new Date+"_"+t.length,e.isPacked=!0}var F,M,I=function(e){function t(){return e.call(this,"TexturePacking")||this}return _(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if("webgl"===b.backend&&v.get("webgl_pack_channel")){var n=e[0],r=e[1],o=e[2],i="depthwise_conv2d"===n.type?"conv2d":n.type,a=E[i];if(a&&a(n,r)){var s=n.inputs,u=n.outputs,c=s.Input[0],l=u.Output?u.Output[0]:u.Out[0],f=R({inputName:c,outputName:c+"_packed"}),h=o.length;o.push(new P(f,h)),O(n,o);var d=k({inputName:l+"_packed",outputName:l}),p=o.length+1;o.push(new P(d,p))}}},t}(C),D=(F=function(e,t){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),L=function(e){function t(){return e.call(this,"FormatInputsX")||this}return D(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0];if(["concat","connect","fc","rnn_origin","rnn_matmul","stack"].includes(n.type)){var r=n.inputs;if(("rnn_origin"===n.type||"rnn_matmul"===n.type)&&r.WeightList.length>0)r.WeightList.forEach((function(e,t){r["weightlist_"+t]=[e]}));else{var o=r.X||r.Input;if("wasm"!==v.get("backend"))o.length>1&&(o.forEach((function(e,t){r["origin"+(t>0?"_"+t:"")]=[e]})),delete r.X,delete r.Input);else{if(o.length>4)throw Error("Not yet supporting concat input tensors more than 4.");if(o.length>1){var i=o[0],a=o[1],s=o[2],u=o[3];r.X=[i],a&&(r.Y=[a]),s&&(r.Z=[s],n.type+="_mul"),u&&(r.M=[u])}}}}},t}(C),j=(M=function(e,t){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}M(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),B=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function N(e,t){var n=s(t,e);return n?n.shape:[]}function V(e,t,n,r){for(var o=B(t),i=0,a=0,s=e;a<s.length;a++)i+=N(s[a],r)[n];return o[n]=i,{name:e[e.length-1]+"_out",shape:o}}var U=function(e){function t(){return e.call(this,"splitOp")||this}return j(t,e),t.prototype.transform=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t[0],o=t[1],i=0,a=r.length;i<a;i++){var s=r[i];if("concat"===s.type&&(null===(e=s.inputs)||void 0===e?void 0:e.X)&&!(s.inputs.X.length<=4)){var c=s.attrs,l=s.inputs,f=s.outputs,h=l.X,d=h.length,p=Math.ceil((d-4)/3)+1,v=f.Out[0],g=N(v,o),m=c.axis||0;m=m>-1?m:g.length+m;for(var y=[],b=[],w=h.slice(0,4),A=void 0,x=0;x<p;x++){var T=0===x?w:h.slice(3*x+1,3*(x+1)+1),P=V(T,g,m,o);0!==x&&T.splice(0,0,A.name),P.shape[m]+=A?A.shape[m]:0;var C={Out:[P.name]};b.push({attrs:c,inputs:{X:T},outputs:C,type:"concat"}),y.push(P),A=P}b[p-1].outputs.Out=[v],r.splice.apply(r,B([i,1],b)),u(o,y)}}},t}(C),W=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function z(e){if(e.length<4){for(var t=[],n=0;n<4-e.length;n++)t.push(1);return t.concat(e)}return W(e)}function H(e){return e.reduce((function(e,t){return e+t}))}function G(e,t){var n=e.length;return 4-n+(t>-1?t:n+t)}function X(e,t){for(var n=t[0],r=t[1],o=t[2],i=t[3],a=r*i,s=r*o*i,u=[],c=0;c<n;c++)for(var l=0;l<r;l++)for(var f=0;f<o;f++)for(var h=0;h<i;h++)u.push(e[c*s+f*a+h*r+l]);return new Float32Array(u)}function Q(e,t){for(var n=t[0],r=t[1],o=t[2],i=t[3],a=o*i,s=r*o*i,u=[],c=0;c<n;c++)for(var l=0;l<i;l++)for(var f=0;f<r;f++)for(var h=0;h<o;h++)u.push(e[c*s+f*a+h*i+l]);return new Float32Array(u)}function Y(e,t,n,r){if("nhwc"===t){var o=n[0],i=n[1],a=Q(e,[o,n[2],n[3],i*(r?4:1)]);return new Float32Array(a)}return new Float32Array(e)}function q(e){for(var t,n=e.data,r=e.shape,o=W(r).reverse(),i=0,a=o.length-1;i<a;i++)t=K(t||n,o[i]);return t}function K(e,t){for(var n=[],r=0,o=e.length;r<o;r+=t)n.push(e.slice(r,r+t));return n}var J,Z,$,ee=(J=function(e,t){return(J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}J(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),te="fetch_pack",ne=function(e){function t(){return e.call(this,"PackOut")||this}return ee(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(v.get("webgl_pack_output")&&1!==v.get("webglVersion")){var n=e[0],r=e[1],o=n.find((function(e){return"fetch"===e.type})),i=o.inputs.X[0],a=z(s(r,i).shape),c=a[0],l=a[1],f=a[2],h=a[3],d={attrs:{},inputs:{X:[i]},outputs:{Y:[te]},type:"pack_out"},p=l*h,g=Math.ceil(c*f/4),m={name:te,shape:[1,1,g,p],persistable:!1};o.inputs.X=[te],o.attrs.origin_shape=[c,l,f,h],n.push(d),u(r,[m])}},t}(C),re=(Z=function(e,t){return(Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}Z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),oe="img_pre_processed",ie="img_origin",ae=function(e){function t(){return e.call(this,"FeedProcess")||this}return re(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=e[1],o=e[2];if(o.webglFeedProcess||v.get("webgl_gpu_pipeline")){var i=o.mean,a=void 0===i?[0,0,0]:i,c=o.std,l=void 0===c?[1,1,1]:c,f=o.scale,h=void 0===f?[1,1]:f,p=o.pos,g=void 0===p?[0,0]:p,m=o.feedShape,y=s(r,"image"),b=y.shape,w=b[2],A=b[3];y.shape=[1,1,w,A];var x=Object.assign({},y);x.name=oe,x.shape=[1,3,m.fh,m.fw],x.persistable=!1,delete x.data;var T=Object.assign({},y);T.name=ie,T.shape=[1,1,m.fh,m.fw],T.persistable=!1,delete T.data,u(r,[T,x]);for(var P=n.filter((function(e){var t=e.inputs;return Object.keys(t).find((function(e){return"image"===t[e][0]}))})),C=function(e){var t=e.inputs;Object.keys(t).forEach((function(e){"image"===t[e][0]&&(t[e][0]=oe)}))},_=0,E=P;_<E.length;_++)C(E[_]);var S={attrs:{mean:a,std:l},inputs:{X:[ie]},outputs:{Y:[oe]},type:"feedPost"},k={attrs:{mean:a,std:l,scale:h,pos:g},inputs:{X:["image"]},outputs:{Y:[ie]},type:"imgFeed",uniform:{u_scale:{type:d.uniform2fv,value:[1,1]},u_pos:{type:d.uniform2fv,value:[0,0]},u_keep_ratio:{type:d.uniform1i,value:1}},isPacked:!0};n.splice(1,0,S),n.splice(1,0,k)}},t}(C),se={preTransforms:[new U,new ne,new ae],transforms:[new L,new I],postTransforms:[]},ue=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function ce(e,t){return e&&e[t]||[]}!function(e){e.PreTransforms="preTransforms",e.Transforms="transforms",e.PostTransforms="postTransforms"}($||($={}));var le=function(){function e(e,t){this.weightMap=[],this.ops=[],this.vars=[],this.config={},this.type=p.SingleOutput,this.plugins=null,this.ops=e.ops,this.vars=e.vars,this.type=t.type||this.type,this.plugins=t.plugins,this.config=t,e.feedShape&&(this.config.feedShape=e.feedShape)}return e.prototype.createGraph=function(){return this.preTransforms(),this.createOpsMap(),this.arrangeMap(),this.postTransforms(),this.weightMap},e.prototype.preTransforms=function(){var e=this;ue(se.preTransforms,ce(this.plugins,$.PreTransforms)).forEach((function(t){t.transform(e.ops,e.vars,e.config)}))},e.prototype.transforms=function(e,t){var n=this;ue(se.transforms,ce(this.plugins,$.Transforms)).forEach((function(r){r.transform(e,n.vars,t)}))},e.prototype.postTransforms=function(){var e=this;ue(se.postTransforms,ce(this.plugins,$.PostTransforms)).forEach((function(t){t.transform(e.weightMap,e.vars,e.type)}))},e.prototype.createOpsMap=function(){for(var e=[],t=0;t<this.ops.length;t++){var n=e.length,r=this.ops[t],o=new P(r,n);this.transforms(o,e),e.push(o)}this.weightMap=e},e.prototype.arrangeMap=function(){for(var e=[],t={},n={},r=0;r<this.weightMap.length;r++)for(var o=this.weightMap[r],i=0;i<o.outputsName.length;i++){var a=o.outputsName[i];n[a]?n[a]++:n[a]=1,t[o.id]=r}for(r=0;r<this.weightMap.length;r++)for(o=this.weightMap[r],e[r]=0,i=0;i<o.inputsName.length;i++)n[o.inputsName[i]]&&e[r]++;this.topoSort(this.weightMap,e,t)},e.prototype.topoSort=function(e,t,n){for(var r=[],o=e.slice(0),i=0;i<t.length;i++)0===t[i]&&r.push(e[i]);for(var a=null,s=0,u=r;s<u.length;s++){var c=u[s];a=this.topoSortInner(e,t,n,c,o,a)}},e.prototype.topoSortInner=function(e,t,n,r,o,i){for(var a=[r],s=i,u=r;a.length>0;){s&&(e[n[s.id]].next=u.id),s=u,u=a.pop()||{};for(var c=0;c<u.outputsName.length;c++)for(var l=0;l<o.length;l++)for(var f=0;f<o[l].inputsName.length;f++)if(o[l].inputsName[f]===u.outputsName[c]&&(t[n[o[l].id]]--,0===t[n[o[l].id]])){a.push(e[n[o[l].id]]),o.splice(l,1),l--;break}}return e[n[s.id]].next=u.id,u},e.prototype.getFeedExecutor=function(){return this.weightMap.find((function(e){return"feed"===e.type}))},e.prototype.getFetchExecutor=function(){return this.weightMap.find((function(e){return"fetch"===e.type}))},e.prototype.getExecutorById=function(e){return this.weightMap.find((function(t){return t.id===e}))},e}(),fe=function(){function e(e){this.opts={},this.isPacked=!1,this.name="",this.tensorId="",this.total=1,this.shape=[],this.unformattedShapeLength=0,this.shape_texture=[],this.exceedMax=!1,this.data=null,this.persistable=!1,this.interpType="NEAREST",this.dataLayout="",this.runtime=0,this.binding=0;var t=e.isPacked,n=void 0!==t&&t,r=e.name,o=e.runtime,i=void 0===o?0:o,a=e.persistable,s=void 0!==a&&a,u=e.type,c=e.dataLayout,l=e.interpType,f=void 0===l?"NEAREST":l,h=e.shape,d=e.data,p=e.binding,v=void 0===p?0:p;this.opts=e,this.isPacked=n,this.name=r,this.runtime=i,this.binding=v,this.persistable=s,this.interpType=f,this.tensorId=u,this.dataLayout=c,this.unformattedShapeLength=h.length,this.shape=z(h),this.total=this.shape.reduce((function(e,t){return e*t})),e.noLayout||d&&d.length&&(this.data=Y(d,this.dataLayout,this.shape,this.isPacked),e.data=null)}return Object.defineProperty(e.prototype,"width_texture",{get:function(){var e=this.shape_texture.length;return this.shape_texture[e-1]||1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height_texture",{get:function(){var e=this.shape_texture.length;return this.shape_texture[e-2]||1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width_shape",{get:function(){var e=this.shape.length;return this.shape[e-1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height_shape",{get:function(){var e=this.shape.length;return this.shape[e-2]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"channel",{get:function(){var e=this.shape.length;return this.shape[e-3]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length_shape",{get:function(){return this.shape.length||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length_unformatted_shape",{get:function(){return this.unformattedShapeLength||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"total_shape",{get:function(){return this.total},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numbers_shape",{get:function(){for(var e=[],t=this.shape.length,n=0;n<t-1;n++){var r=this.shape.slice(n+1).reduce((function(e,t){return e*t}));e.push(r)}return e.push(1),e},enumerable:!1,configurable:!0}),e}(),he={adaptPaddings:function(){for(var e in this.processedAttrs)if(Object.prototype.hasOwnProperty.call(this.processedAttrs,e)&&"paddings"===e){var t=this.processedAttrs[e],n=t[0],r=t[1];return void(0===n&&1===r&&(this.processedAttrs[e][1]=0))}},setAdaptive:function(){this.processedAttrs.adaptive&&2===this.processedAttrs.ksize.length&&1===this.processedAttrs.ksize[0]&&1===this.processedAttrs.ksize[1]&&(this.processedAttrs.adaptive=!1,this.processedAttrs.global_pooling=!0)},isGlobalPooling:function(){var e,t=this.tensorDataMap.origin,n=(null===(e=null==t?void 0:t.shape)||void 0===e?void 0:e.length)||0;n>2&&this.processedAttrs.global_pooling&&(this.processedAttrs.ksize=[t.shape[n-2],t.shape[n-1]])},setPacked:function(){var e=this.processedAttrs.ispacked;this.tensorDataMap.origin&&e&&this.name.indexOf("pool")>-1&&(this.name+="_winograd")},mergeAttrs:function(){this.processedAttrs=this.subAttrs.reduce((function(e,t){return Object.assign(e,t)}),{})},isApplySeparableConv:function(){if(!this.isPackedOp){var e=this.processedAttrs.groups,t=this.tensorDataMap.filter;if("depthwise_conv2d"===this.name&&(this.name="conv2d"),t){var n=t.shape,r=n[0],o=n[1];r===e&&1===o&&(this.name+="_depthwise")}}},batchComputeConv2d:function(){var e=this.tensorDataMap.filter.shape[1];this.processedAttrs.filter_nearest_vec4=4*Math.floor(e/4),this.processedAttrs.filter_remainder_vec4=e%4},processBias:function(){var e=this.tensorDataMap.bias;if(e&&this.isPackedOp){e.packed=!0;var t=e.shape,n=[t[t.length-1]/4,1,1];e.shape=n}},isAdaptiveAvg:function(){var e=this.processedAttrs,t=e.adaptive,n=e.pooling_type;t&&"avg"===n&&(this.name+="_avg_adaptive")},isMax:function(){var e="max"===this.processedAttrs.pooling_type?1:0;this.processedAttrs.pooling_type=e,1===e&&(this.name+="_max")},transToPrelu:function(){this.processedAttrs.multi_value="0.0",this.processedAttrs.active_function="prelu"},transToRelu6:function(){this.processedAttrs.multi_value=this.processedAttrs.threshold,this.processedAttrs.active_function="relu6"},transToHardSigmoid:function(){this.processedAttrs.multi_value=this.processedAttrs.slope||.2,this.processedAttrs.bias_value=this.processedAttrs.offset||.5,this.processedAttrs.active_function="hardSigmoid"},transToLeakyrelu:function(){this.processedAttrs.multi_value=this.processedAttrs.alpha,this.processedAttrs.active_function="leakyRelu",this.name="relu"},transToPow:function(){this.processedAttrs.multi_value=this.processedAttrs.factor||2,this.processedAttrs.active_function="pow_func",this.name="pow"},transToSigmoid:function(){this.processedAttrs.active_function="sigmoid"},transToSqrt:function(){this.processedAttrs.active_function="sqrt"},transToTanh:function(){this.processedAttrs.active_function="tanh_func"},transToAbs:function(){this.processedAttrs.active_function="abs_func"},transToExp:function(){this.processedAttrs.active_function="exp"},transToScale:function(){var e=this.processedAttrs.scale;this.processedAttrs.multi_value=void 0!==e?e:1,this.processedAttrs.bias_value=this.processedAttrs.bias||0;var t=this.processedAttrs.bias_after_scale;this.processedAttrs.active_function=t||void 0===t?"scale":"scaleWidthBias"},setActiveFunc:function(){var e=this.name.replace("conv2d-elementwise_add-","");this.processedAttrs=Object.assign({active_function:"scale",multi_value:"1.0",bias_value:"0.0",fuse_relu:!1},this.processedAttrs),"leaky_relu"===e&&(this.processedAttrs.multi_value=this.processedAttrs.alpha,this.processedAttrs.active_function="leakyRelu")},normalizePerm:function(){var e=this.tensorDataMap.origin.shape.length,t=this.processedAttrs.axis,n=t.length;if(n-e>0&&(n=(t=t.map((function(e){return e-1})).filter((function(e){return e>=0}))).length),n>4)throw Error("op transpoes2 axis length exceeds maximum length 4, get "+n);for(var r=new Array(n).fill(0),o=0;o<n;o++)r[t[o]]=o;var i=[];for(o=0;o<4;o++)i[o]=r[o]||0;this.processedAttrs.perm_arr=i,this.processedAttrs.perm_size=n},normalizeDim:function(){for(var e=this.tensorDataMap.origin.shape,t=z(e),n=this.processedAttrs,r=n.axis,o=n.dim,i=G(e,void 0!==r?r:Array.isArray(o)&&o.length?o[0]:o),a=[],s=0;s<t[i];s++)a[s]=s;if(this.processedAttrs.target_length=a.length,this.processedAttrs.target_value=a,this.processedAttrs.inputs_dim=t[i],this.processedAttrs.dim=i,0===this.processedAttrs.num&&(this.processedAttrs.num=Object.values(this.tensorDataMap).filter((function(e){return"out"===e.tensorName})).length||1),"wasm"===v.get("backend")){this.processedAttrs.fourInputs=!1;var u=this.tensorDataMap.counter;if(u){var c=z(u.shape);this.processedAttrs.counter_num=c[i]}var l=this.tensorDataMap.appender;if(l){var f=z(l.shape);this.processedAttrs.append_num=f[i]}var h=this.tensorDataMap.fourth;if(h){this.processedAttrs.fourInputs=!0;var d=z(h.shape);this.processedAttrs.fourth_num=d[i]}}},processElementwiseAxis:function(){var e=this.tensorDataMap.origin.shape,t=this.tensorDataMap.counter.shape,n=void 0===this.processedAttrs.axis?-1:this.processedAttrs.axis;this.processedAttrs.counterLen=t.length,H(e)===H(t)?(this.processedAttrs.axis=0,this.processedAttrs.counterLen=4):(-1===n&&(n=e.length-t.length),this.processedAttrs.axis=G(e,n))},genElementwiseCounterPos:function(){for(var e=this.processedAttrs,t=e.counterLen,n=["0","0","0","0"],r=e.axis,o=4-t;o<4;o++)n[o]="oPos["+r+++"]";this.processedAttrs.counterPos=n.join(",")},flattenShape:function(){var e=Object.values(this.tensorDataMap).find((function(e){return e.shape.length>2}));if(e){var t=z(e.shape);e.shape=[t[0]*t[2],t[1]*t[3]]}},reshape:function(){var e=this.tensorDataMap.origin,t=this.tensorDataMap.counter,n=this.tensorDataMap.out;if(t.shape.length>e.shape.length){var r=t;t=e,e=r}if(e.shape.length>2&&2===t.shape.length){var o=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]);var n=e.reduce((function(e,t){return e*t}));return 1===t.length?[1,n]:[t[0],n/t[0]]}(e.shape,n.shape);e.shape=o}},checkIsMerge:function(){var e=this.name.replace("conv2d-elementwise_add-","");this.name="conv2d_elementwise_add","leaky_relu"===e&&(this.processedAttrs.alpha&&(this.processedAttrs.multi_value=this.processedAttrs.alpha),this.processedAttrs.active_function="leakyRelu")}},de=function(){return(de=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},pe=function(){function e(e,t,n,r,o){this.name="",this.isPackedOp=!1,this.processedAttrs={},this.subAttrs=[],this.uniform=null,this.inputTensors=[],this.outputTensors=[],this.dataLayout="",this.iLayer=0,this.program=[],this.isFinalOp=!1,this.bufferType=f.FrameBuffer,this.tensorDataMap={},this.tensorData=[];var i=e.type,a=e.inputs,s=e.outputs,u=e.attrs,c=e.isPacked,l=e.bufferType,h=void 0===l?f.FrameBuffer:l,d=e.uniform,p=void 0===d?null:d;this.modelName=o,this.subAttrs=e.subAttrs,this.name=i,this.isPackedOp=c,this.bufferType=h,this.dataLayout=n.dataLayout||"",this.iLayer=t,this.isFinalOp=r,this.uniform=p,this.initExtendedAttrs(u),this.constructTensorData(a,s,n.vars),this.buildTensor();var v=this.buildShaderParams();this.buildProgram(v)}return e.prototype.initExtendedAttrs=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];this.processedAttrs[t]=n}},e.prototype.constructTensorData=function(e,t,n){var r=this;Object.keys(t).forEach((function(e){t[e].forEach((function(o,i){t[e][i]=r.getTensorVar(o,n)}))})),Object.keys(e).forEach((function(t){e[t]=[r.getTensorVar(e[t][0],n)]}));var o=function(e){if(Object.prototype.hasOwnProperty.call(t,e))try{var n=t[e]||[{}],o=i.getExactTensorName(e,"output");o&&n.forEach((function(e,t){e.tensorName=o,r.tensorDataMap[o+"_"+t]=de(de({},e),{tensorName:o,runtime:t})}))}catch(e){console.error(e)}},i=this;for(var a in t)o(a);for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=e[a].length>0?e[a]:[{}],u=this.getExactTensorName(a,"input");if(u){var c=s[0];c.tensorName=u,this.tensorDataMap[u]=de(de({},c),{tensorName:u})}}},e.prototype.getExactTensorName=function(e,t){return"input"===t?{input:"origin",x:"origin",y:"counter",w:"weight"}[e.toLowerCase()]||e.toLowerCase():{output:"out",y:"out",out:"out",scale:"scale",bias:"bias",mean:"mean",variance:"variance",mask:"out",boxes:"out",variances:"out"}[e.toLowerCase()]},e.prototype.getTensorVar=function(e,t){var n=s(t,e.replace(/_packed$/,""));return n&&e.endsWith("_packed")?function(e,t){var n=3===e.shape.length?W([1],e.shape):e.shape,r=n[0],o=n[1],i=n[2],a=n[3],s=Object.assign({},e);if(s.name=t,s.packed=!1,o%4==0){var u=o/4;s.packed=!0,s.shape=[r,u,i,a]}return s}(n,e):n},e.prototype.buildProgram=function(e){var t=this,n=this.name,r=b.backend+"_"+n,o=b.opRegistry.ops[r];try{if(!o&&"wasm"!==v.get("backend"))throw new Error("[unregistered op] "+n);var i=this.inputTensors;this.program=this.outputTensors.map((function(n,r){return b.backendInstance.createProgram({op:o,outTensor:n,inputTensors:i,shaderParams:e[r],runtime:r,isFinalOp:t.isFinalOp})}))}catch(e){console.error(e)}},e.prototype.processTensorDataAndAttrs=function(){var e=this;try{this.name.indexOf("conv2d-elementwise_add")>-1?this.name="conv2d_elementwise_add":this.name.indexOf("max_pool2d_with_index")>-1&&(this.name="pool2d_max");var t=b.backend+"_"+this.name;(b.opRegistry.ops[t]&&b.opRegistry.ops[t].behaviors||[]).forEach((function(t){try{he[t].call(e)}catch(e){console.error(e)}}))}catch(e){console.error(e)}},e.prototype.buildTensor=function(){var e=this;this.processTensorDataAndAttrs();var t=Object.values(this.tensorDataMap);t.forEach((function(t,n){var r,o=t.tensorName,i=new fe({type:e.modelName+"_"+t.name,name:o,shape:t.shape,data:t.data||null,persistable:t.persistable||!1,interpType:t.interpType||"NEAREST",isPacked:e.isPackedOp||t.packed||!1,binding:n,noLayout:null===(r=b.backendInstance)||void 0===r?void 0:r.noLayout,dataLayout:e.dataLayout,runtime:t.runtime||0});"out"===o?e.outputTensors.push(i):e.inputTensors.push(i),t.shape=i.shape,t.total=i.total})),this.tensorDataMap=null,this.tensorData=t},e.prototype.buildShaderParams=function(){var e=this,t=[];return this.outputTensors.forEach((function(){var n=JSON.parse(JSON.stringify(e.processedAttrs));t.push(n)})),t},e}(),ve=function(){return(ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ge=function(){function e(){this.targetContext={},this.gapFillWith="#fff",this.mean=[0,0,0],this.std=[1,1,1],this.bgr=!1,this.pixelWidth=1,this.pixelHeight=1,this.inputFeed=[],this.targetCanvas=v.get("canvas2d")||document.createElement("canvas"),this.targetContext=this.targetCanvas.getContext("2d")}return e.prototype.process=function(e,t,n){var r=t.fill,o=t.mean,i=t.std,a=t.bgr,s=t.keepRatio,u=void 0===s||s,c=t.scale,l=void 0===c?0:c,f=t.normalizeScale,h=void 0===f?1:f,d=t.normalizeType,p=n.fc,v=void 0===p?3:p,g=n.fh,m=n.fw,y=e,b={gapFillWith:r||this.gapFillWith,mean:o||this.mean,std:i||this.std,bgr:a||this.bgr,keepRatio:u,scale:l,targetSize:{width:m,height:g},normalizeScale:h,normalizeType:d,targetShape:[1,v,g,m]};return this.fromPixels(y,b)||[]},e.prototype.fromPixels=function(e,t){var n=[],r={gapFillWith:t.gapFillWith,dx:0,dy:0,dWidth:t.targetSize.width,dHeight:t.targetSize.height},o=e,i=e.path&&e.width&&e.height;if(!i&&!(e instanceof ImageBitmap||e instanceof HTMLVideoElement||e instanceof HTMLImageElement||e instanceof HTMLCanvasElement))return[{data:n,shape:t.shape||t.targetShape,name:"image",persistable:!0}];this.pixelWidth=e.naturalWidth||e.width,this.pixelHeight=e.naturalHeight||e.height;var a=v.get("webgl_gpu_pipeline")||t.webglFeedProcess;return this.fitToTargetSize(i?o.path:o,r,ve(ve({},t),{inGPU:a})),n=this.getImageData(r),a?[{data:n=Float32Array.from(n.data),shape:[1,1,r.dHeight,r.dWidth],name:"image",persistable:!0}]:[{data:n=this.allReshapeToRGB(n,t),shape:t.targetShape||t.shape,name:"image",persistable:!0}]},e.prototype.allReshapeToRGB=function(e,t){for(var n=t.mean,r=t.std,o=t.targetShape,i=t.bgr,a=t.normalizeType,s=void 0===a?0:a,u=t.normalizeScale,c=void 0===u?1:u,l=o[1],f=o[2],h=o[3],d=e.data||e,p=new Float32Array(f*h*l),v=0,g=0;g<f;++g)for(var m=g*h,y=0;y<h;++y)for(var b=m+y,w=0;w<l;++w){var A=d[i?4*b+(2-w):4*b+w];switch(s){case 1:A=(A-128)/128;break;case 2:break;default:A/=255}p[v]=A,p[v]-=n[w],p[v]/=r[w],p[v]*=c,v++}return new Float32Array(Q(p,[1,f,h,l]))},e.prototype.fitToTargetSize=function(e,t,n){var r=n||{},o=r.keepRatio,i=void 0===o||o,a=r.inGPU,s=void 0!==a&&a,u=r.scale,c=void 0===u?0:u,l=t.dWidth,f=t.dHeight,h=s?this.pixelWidth:l,d=s?this.pixelHeight:f,p=s?this.pixelWidth:l,v=s?this.pixelHeight:f;if(c){if(p-l<0||v-f<0)throw new Error("scale size smaller than target size");this.pixelWidth>this.pixelHeight?(v=c,p=Math.round(v*this.pixelWidth/this.pixelHeight)):(p=c,v=Math.round(p*this.pixelHeight/this.pixelWidth)),this.targetCanvas.width=h=p,this.targetCanvas.height=d=v,t.dx=(p-l)/2,t.dy=(v-f)/2}else i&&(l/f*this.pixelHeight/this.pixelWidth>=1?s?(h=Math.round(v*l/f),Math.floor((h-p)/2)):(p=Math.round(v*this.pixelWidth/this.pixelHeight),Math.floor((l-p)/2)):s?(d=Math.round(p*f/l),Math.floor((d-v)/2)):(v=Math.round(p*this.pixelHeight/this.pixelWidth),Math.floor((f-v)/2))),this.targetCanvas.width=t.dWidth=h,this.targetCanvas.height=t.dHeight=d;this.targetContext.fillStyle=t.gapFillWith,this.targetContext.fillRect(0,0,this.targetCanvas.width,this.targetCanvas.height),this.targetContext.drawImage(e,0,0,p,v)},e.prototype.getImageData=function(e){var t=e.dx,n=e.dy,r=e.dWidth,o=e.dHeight;return this.targetContext.getImageData(t,n,r,o)},e.prototype.cover=function(e,t,n,r){var o=n,i=r;return n/r*t/e>=1?o=Math.round(i*e/t):i=Math.round(o*t/e),[o/n,i/r]},e}(),me=function(){return(me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function ye(e,t,n){for(var r=[],o=0,i=e.length;o<i;o++){var a=e[o];a>t&&r.push({score:a,i:o})}return r.sort((function(e,t){return t.score-e.score})).slice(0,n)}function be(e){var t=e[0],n=e[1],r=e[2],o=e[3];return r<t||o<n?0:(r-t)*(o-n)}function we(e,t){if(t[0]>e[2]||t[2]<e[0]||t[1]>e[3]||t[3]<e[1])return 0;var n=be(e),r=be(t),o=function(e,t){var n=e[0],r=e[1],o=e[2],i=e[3],a=t[0],s=t[1],u=t[2],c=t[3],l=Math.max(n,a),f=Math.max(r,s);return(Math.min(o,u)-l)*(Math.min(i,c)-f)}(e,t);return o/(n+r-o)}var Ae={multiclass_nms:function(e,t){var n=e[0],r=void 0===n?[]:n,o=e[1],i=void 0===o?[]:o,a=q(r),s=q(i);if(!a||!s)return[];if(a=a[0],s=s[0],!(a&&a.length&&s&&s.length))return[];for(var u=t.nms_top_k,c=void 0===u?100:u,l=t.nms_eta,f=void 0===l?1:l,h=t.keep_top_k,d=void 0===h?100:h,p=t.background_label,v=void 0===p?0:p,g=t.nms_threshold,m=void 0===g?.3:g,y=t.score_threshold,b=void 0===y?0:y,w=[],A=0,x=s.length;A<x;A++){var T=[];if(A!==v){var P=ye(s[A],b,c);if(P&&P.length){var C=P.shift(),_=a[C.i];for(T.push(me(me({},C),{box:_,label:A}));P.length;){var E=P.shift();_=a[E.i];for(var S=!0,k=0,R=T;k<R.length;k++)if(we(_,R[k].box)>m){S=!1;break}S&&T.push(me(me({},E),{box:_,label:A})),S&&f<1&&m>.5&&(m*=f)}w=w.concat(T)}}}var O=w.sort((function(e,t){return t.score-e.score})).slice(0,d).sort((function(e,t){return e.label-t.label})).map((function(e){return function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}([e.label,e.score],e.box)}));return O&&O.length?O:[]}},xe=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Te=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Pe=function(){function e(e){this.runnerConfig={},this.isPaused=!1,this.model={},this.weightMap=[],this.isExecuted=!1,this.test=!1,this.graphGenerator={},this.mediaProcessor=null,this.needPreheat=!0,this.feedShape={},this.runnerConfig=Object.assign({},e),this.needPreheat=void 0===e.needPreheat||e.needPreheat,this.modelName=e.modelName||Date.now().toString(),this.weightMap=[],v.set("ns",i()),"node"!==v.get("platform")&&(this.mediaProcessor=new ge)}return e.prototype.init=function(e){return xe(this,void 0,void 0,(function(){var t;return Te(this,(function(n){switch(n.label){case 0:return b.backendInstance?(this.isExecuted=!1,"wasm"!==v.get("backend")?[3,2]:[4,Promise.all([this.load(),b.backendInstance.init()])]):(console.error("ERROR: Haven't register backend"),[2]);case 1:return n.sent(),[3,5];case 2:return[4,b.backendInstance.init()];case 3:return n.sent(),[4,this.load(e)];case 4:n.sent(),n.label=5;case 5:return this.genFeedData(),this.genGraph(),this.genOpData(),"wasm"!==v.get("backend")?[3,7]:(this.model=Object.assign(this.model,this.runnerConfig),t=this.model,[4,b.backendInstance.initWasm(this.model,this.weightMap)]);case 6:return t.index=n.sent(),[2,[]];case 7:return this.needPreheat?[4,this.preheat()]:[3,9];case 8:return[2,n.sent()];case 9:return[2]}}))}))},e.prototype.load=function(e){return xe(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,u;return Te(this,(function(c){switch(c.label){case 0:return t=this.runnerConfig,n=t.modelPath,r=t.modelObj,o=void 0===r?null:r,n?(i=new y(n),a=this,[4,i.load(e)]):[3,2];case 1:return a.model=c.sent(),[3,3];case 2:(null==o?void 0:o.model)&&(null==o?void 0:o.params)&&(s=o.model,u=o.params,y.allocateParamsVar(s.vars,u),this.model=s),c.label=3;case 3:return[2]}}))}))},e.prototype.genGraph=function(){this.graphGenerator=new le(this.model,this.runnerConfig),this.weightMap=this.graphGenerator.createGraph()},e.prototype.genOpData=function(){var e=this,t=0;this.weightMap.forEach((function(n,r){var o=n.type;if("feed"!==o&&"fetch"!==o){t++;var i=r===e.weightMap.length-2,a=new pe(n,t,e.model,i,e.modelName);n.opData=a}})),l(this.model)},e.prototype.preheat=function(){return xe(this,void 0,void 0,(function(){var e;return Te(this,(function(t){switch(t.label){case 0:return[4,this.checkModelLoaded()];case 1:return t.sent(),[4,this.execute()];case 2:return e=t.sent(),this.isExecuted=!0,[2,e]}}))}))},e.prototype.checkModelLoaded=function(){return xe(this,void 0,void 0,(function(){return Te(this,(function(e){switch(e.label){case 0:return this.model?[3,2]:[4,this.load()];case 1:e.sent(),e.label=2;case 2:return 0===this.weightMap.length&&(console.info("It's better to preheat the model before running."),this.genFeedData(),this.genGraph(),this.genOpData(),this.isExecuted=!1),[2]}}))}))},e.prototype.predict=function(e,t){return xe(this,void 0,void 0,(function(){var n,r,o;return Te(this,(function(i){switch(i.label){case 0:return this.isPaused||!this.mediaProcessor?[2]:(n=[],n=this.runnerConfig.webglFeedProcess?[e]:this.mediaProcessor.process(e,this.runnerConfig,this.feedShape),r=[],"wasm"!==v.get("backend")?[3,3]:[4,b.backendInstance.predict(n[0].data,this.model.index)]);case 1:return i.sent(),[4,this.read()];case 2:return o=i.sent(),r=this.postProcess(o),[3,5];case 3:return this.updateFeedData(n),[4,this.execute()];case 4:r=i.sent(),i.label=5;case 5:return this.isExecuted=!0,[2,t?t(r):r]}}))}))},e.prototype.predictWithFeed=function(e,t,n,r){var o;return xe(this,void 0,void 0,(function(){var i,a,s,u,c,l,f,h,d,p,g,m,y;return Te(this,(function(w){switch(w.label){case 0:return i=this.feedShape,a=i.fc,s=void 0===a?3:a,u=i.fw,c=i.fh,Array.isArray(e)?(null===(o=e[0])||void 0===o?void 0:o.data)?((p=e[0].data)instanceof Float32Array||(e[0].data=new Float32Array(p)),l=e):l=[{data:new Float32Array(e),shape:n||[1,s,c,u],name:"image",persistable:!0}]:ArrayBuffer.isView(e)?l=[{data:e,shape:n||[1,s,c,u],name:"image",persistable:!0}]:(h=(f=e).width,d=f.height,p=f.data,l=[{data:new Float32Array(p),shape:n||[1,s,d||c,h||u],name:"image",persistable:!0}]),r||((g=l[0]).data=Y(g.data,"nhwc",g.shape,!1)),m=[],"wasm"!==v.get("backend")?[3,3]:[4,b.backendInstance.predict(l[0].data,this.model.index)];case 1:return w.sent(),[4,this.read()];case 2:return y=w.sent(),m=this.postProcess(y),[3,5];case 3:return this.updateFeedData(l),[4,this.execute()];case 4:m=w.sent(),w.label=5;case 5:return this.isExecuted=!0,[2,t?t(m):m]}}))}))},e.prototype.genFeedData=function(){var e,t=this.runnerConfig,n=t.type,r=t.feedShape,o=t.webglFeedProcess;this.feedShape=this.model.feedShape||r;var i,a=this.feedShape,c=a.fc,l=void 0===c?3:c,f=a.fh,h=a.fw,d=this.model,g=d.vars,m=d.feed;if(n===p.MultipleInput){var y=this.model.ops&&this.model.ops[0]&&(null===(e=this.model.ops[0].inputs)||void 0===e?void 0:e.X);y.length>1&&(i=y.map((function(e){var t=s(g,e),n=t.shape.reverse(),r=n[0],o=n[1],i=n[2],a=n[3],u=void 0===a?1:a;return t.data=new Float32Array(u*i*o*r),t})))}else{i=m||s(g,"image");var b="wasm"!==v.get("backend")&&o?4:l,w={name:"image",shape:[1,l,f,h]};i=Object.assign(w,i,{data:new Float32Array(b*f*h).fill(1),persistable:!0}),"wasm"!==v.get("backend")&&o&&(i.shape[1]=4)}u(g,i)},e.prototype.updateFeedData=function(e){for(var t=e[0],n=0,r=this.weightMap.filter((function(e){return e.opData?e.opData.inputTensors.find((function(e){return e.tensorId.endsWith("_image")})):null}));n<r.length;n++){for(var o=r[n],i=0,a=o.opData.inputTensors;i<a.length;i++){var s=a[i];s.tensorId.endsWith("_image")&&(s.data=t.data)}var u=this.runnerConfig,c=u.webglFeedProcess,l=void 0!==c&&c,f=u.keepRatio,h=void 0===f||f;if(l||v.get("webgl_gpu_pipeline")){var d=o.opData.inputTensors.find((function(e){return e.tensorId.endsWith("_image")})),p=t.shape||[1,1,t.height,t.width],g=new Uint8Array(t.data||[]);if(t.width&&t.height&&!t.data){var m=t.naturalWidth||t.width;p=[1,1,t.naturalHeight||t.height,m],g=t}var y=d.opts;y.shape=p;var b=o.opData,w=new fe(y);w.data=g,b.inputTensors=[w];var A=p.slice(-2),x=A[0],T=A[1],P=b.outputTensors[0].shape.slice(-2),C=P[0],_=P[1],E=this.mediaProcessor.cover(T,x,_,C);o.uniform.u_scale.value=E,o.uniform.u_keep_ratio.value=+h}}},e.prototype.execute=function(){return xe(this,void 0,void 0,(function(){var e,t;return Te(this,(function(n){switch(n.label){case 0:return e=this.graphGenerator.getFeedExecutor(),this.executeOp(e),[4,this.read()];case 1:return t=n.sent(),[2,this.postProcess(t)]}}))}))},e.prototype.postProcess=function(e){var t="wasm"===v.get("backend");if(v.get("debug"))return e;var n=e,r=this.model,o=r.multiOutputs,i=r.postOps;if(o)if(t)n=o.map((function(t,n){var r;return(r={})[t.name]=e[n],r}));else{var a=0;n=o.map((function(t){var n,r=t.shape.reduce((function(e,t){return e*t})),o=e.slice(a,r+a);return a+=r,(n={})[t.name]=o,n}))}if(o&&i&&i.length)for(var s=function(e,t){var r=i[e],o=r.type,a=r.attrs,s=r.inputs,u=Ae[o];if(!u)return{value:void 0};var c=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(n),l=Object.keys(s).map((function(e){var t=s[e],n=t.name,r=t.shape,o=c.filter((function(e){return e[n]}));return o&&o[0]&&o[0][n]?{name:e,tensorId:n,data:o[0][n],shape:r}:(console.error("未获取到"+n+"的数据"),null)}));n=u(l,a)},u=0,c=i.length;u<c;u++){var l=s(u);if("object"==S(l))return l.value}return n},e.prototype.executeOp=function(e){var t;if("fetch"!==e.type)if("feed"!==e.type&&e.execute(this.isExecuted),v.get("debug")&&(null===(t=e.opData)||void 0===t?void 0:t.outputTensors)&&e.opData.outputTensors[e.opData.outputTensors.length-1]&&e.opData.outputTensors[e.opData.outputTensors.length-1].tensorId===this.modelName+"_"+(v.get("ns").layerName||v.get("layerName")))console.info(e.opData.name+"_"+e.opData.iLayer,"runner op");else if(e.next){var n=e.next,r=this.graphGenerator.getExecutorById(n);this.executeOp(r)}},e.prototype.read=function(){return xe(this,void 0,void 0,(function(){var e,t,n;return Te(this,(function(r){switch(r.label){case 0:return e=this.graphGenerator.getFetchExecutor(),t=s(this.model.vars,e.inputs.X[0]),n={name:t.name,shape:e.attrs.origin_shape||t.shape,index:this.model.index},[4,b.backendInstance.read(n)];case 1:return[2,r.sent()]}}))}))},e.prototype.stopPredict=function(){this.isPaused=!0},e.prototype.dispose=function(){for(var e=0,t=this.weightMap;e<t.length;e++){var n=t[e];if(n.opData){var r=n.opData;b.backendInstance.dispose&&b.backendInstance.dispose(r)}}this.weightMap=[],this.model=null},e}(),Ce=function(){}},993:function(){}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==("undefined"==typeof globalThis?"undefined":S(globalThis)))return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==("undefined"==typeof window?"undefined":S(window)))return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(994)}()}(zZ);!function(e,t){e.exports=function(){var e={293:function(e,t,n){n.r(t),n.d(t,{GLHelper:function(){return y},glInstance:function(){return Te},ops:function(){return xe},webgl_types:function(){return r}});var r={};n.r(r),n.d(r,{UniformType:function(){return a}});var o={};n.r(o),n.d(o,{abs_func:function(){return j},exp_func:function(){return L},hardSigmoid:function(){return F},leakyRelu:function(){return S},pow_func:function(){return I},prelu:function(){return _},relu6:function(){return E},scale:function(){return k},scaleWidthBias:function(){return R},sigmoid:function(){return O},sqrt:function(){return M},tanh_func:function(){return D},transferFromNHWCtoNCHW:function(){return C}});var i={};n.r(i),n.d(i,{getPixelsFromTexturePos:function(){return U},getSamplerCode:function(){return z},getTensorPosFromArrayIndex:function(){return V},getValueFromTensorPos:function(){return B},getValueFromTensorPosPacking:function(){return N},moveTexture2PosToReal:function(){return W}});var a,s,u,c,l=n(170);function f(e){for(var t=e.length,n=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(e),r=[];t>1;)n.splice(0,1),r.push(n.reduce((function(e,t){return e*t}))),t--;return r}function h(e,t){if(1===e.length)return"float "+t+" = float("+e[0]+");";for(var n=e.length,r="\n vec"+n+" "+t+" = vec"+n+"(\n ",o=0;o<n;o++)r+="float("+e[o]+"),";return r.slice(0,-1)+");"}function d(e,t,n){if(0===e.length)return"";if(2===l.env.get("webglVersion"))return e.reduce((function(t,r,o){return t+(o<e.length-1?n+"("+r+"), ":n+"("+r+"));")}),n+" "+t+"[] = "+n+"[](");var r=e.reduce((function(e,r,o){return e+"\n "+t+"["+o+"] = "+n+"("+r+");"}),"");return"\n "+n+" "+t+"["+e.length+"];\n "+r+"\n "}function p(e,t,n){if(0===e.length)return"";var r=e.reduce((function(e,t,r){return e+(0===r?"\n "+n+" res = "+n+"(0);\n if (index == "+r+") {\n res = arr["+r+"];\n }":"\n else if (index == "+r+") {\n res = arr["+r+"];\n }")}),"");return"\n "+n+" getValueFromArrByIndex_"+t+"("+n+"["+e.length+"] arr, int index) {\n "+(2===l.env.get("webglVersion")?n+" res = arr[index];":r)+"\n return res;\n }\n "}!function(e){e.uniform1f="1f",e.uniform1fv="1fv",e.uniform1i="1i",e.uniform1iv="1iv",e.uniform2f="2f",e.uniform2fv="2fv",e.uniform2i="2i",e.uniform2iv="2iv",e.uniform3f="3f",e.uniform3fv="3fv",e.uniform3i="3i",e.uniform3iv="3iv",e.uniform4f="4f",e.uniform4fv="4fv",e.uniform4i="4i",e.uniform4iv="4iv"}(a||(a={})),function(e){e.INT_TYPE="int",e.FLOAT_TYPE="float"}(s||(s={})),function(e){e[e.VS_SHADER=0]="VS_SHADER",e[e.FS_SHADER=1]="FS_SHADER"}(u||(u={})),function(e){e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35677]="SAMPLER_2D",e[e.SAMPLER_CUBE=35678]="SAMPLER_CUBE",e[e.FLOAT=5126]="FLOAT",e[e.INT=5124]="INT"}(c||(c={}));var v,g=function(e,t,n){this.size=e,this.type=t,this.location=n},m=function(e,t,n){this.size=e,this.type=t,this.location=n},y=function(){function e(){}return e.getWebglVersion=function(){return l.env.get("webglVersion")},e.createCanvas=function(){return l.env.get("canvas")||document&&document.createElement("canvas")},e.setWebglVersion=function(e){l.env.set("webglVersion",e)},e.setWebGLRenderingContext=function(e){return this.gl=e,e},e.getWebGLRenderingContext=function(){return this.gl?this.gl:this.createWebGLRenderingContext()},e.createWebGLRenderingContext=function(){if(this.gl)return this.gl;var e=this.createCanvas();if(!e)return null;e.addEventListener&&e.addEventListener("webglcontextlost",(function(e){throw e.preventDefault(),Error("webgl context is lost~")}),!1);var t=e.getContext("webgl2",this.WEBGL_ATTRIBUTES);return t?l.env.set("webglVersion",2):(l.env.set("webglVersion",1),t=e.getContext("webgl",this.WEBGL_ATTRIBUTES)||e.getContext("experimental-webgl",this.WEBGL_ATTRIBUTES)),t},e.printStates=function(e){console.log("1. isBlendEnable = "+e.isEnabled(e.BLEND)),console.log("2. isCullFaceEnable = "+e.isEnabled(e.CULL_FACE)),console.log("3. isDepthTestEnable = "+e.isEnabled(e.DEPTH_TEST)),console.log("4. isDitherEnable = "+e.isEnabled(e.DITHER)),console.log("5. isPolygonOffsetFillEnable = "+e.isEnabled(e.POLYGON_OFFSET_FILL)),console.log("6. isSampleAlphtToCoverageEnable = "+e.isEnabled(e.SAMPLE_ALPHA_TO_COVERAGE)),console.log("7. isSampleCoverageEnable = "+e.isEnabled(e.SAMPLE_COVERAGE)),console.log("8. isScissorTestEnable = "+e.isEnabled(e.SCISSOR_TEST)),console.log("9. isStencilTestEnable = "+e.isEnabled(e.STENCIL_TEST))},e.printWebGLInfo=function(e){console.log("renderer = "+e.getParameter(e.RENDERER)),console.log("version = "+e.getParameter(e.VERSION)),console.log("vendor = "+e.getParameter(e.VENDOR)),console.log("glsl version = "+e.getParameter(e.SHADING_LANGUAGE_VERSION))},e.printWebGLTextureInfo=function(e){console.log("MAX_COMBINED_TEXTURE_IMAGE_UNITS = ",e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),console.log("MAX_TEXTURE_IMAGE_UNITS = ",e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),console.log("MAX_TEXTURE_SIZE = ",e.getParameter(e.MAX_TEXTURE_SIZE)),console.log("MAX_CUBE_MAP_TEXTURE_SIZE = ",e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE))},e.triggerContextLostEvent=function(e){var t=e.getExtension("WEBGL_lose_context");null!==t&&t.loseContext()},e.checkGLError=function(e){var t=e.getError();return 0!==t&&(console.log("WebGL Error NO: ",t),!0)},e.setDefaultState=function(e){e.clearColor(0,0,0,0),e.clearDepth(1),e.enable(e.DEPTH_TEST),e.enable(e.CULL_FACE),e.enable(e.SCISSOR_TEST)},e.setViewport=function(e,t){e.viewport(t[0],t[1],t[2],t[3])},e.initShader=function(e,t,n){var r=this.createShader(e,t);return this.compileShader(e,n,r),r},e.createShader=function(e,t){var n;if(null===(n=t===u.VS_SHADER?e.createShader(e.VERTEX_SHADER):e.createShader(e.FRAGMENT_SHADER)))throw new Error("WebGLShader创建失败!");return n},e.compileShader=function(e,t,n){return e.shaderSource(n,t),e.compileShader(n),!1!==e.getShaderParameter(n,e.COMPILE_STATUS)||(console.error(e.getShaderInfoLog(n)),e.deleteShader(n),!1)},e.createProgram=function(e){var t=e.createProgram();if(null===t)throw new Error("WebGLProgram创建失败!");return t},e.linkProgram=function(e,t,n,r,o,i){return void 0===o&&(o=null),void 0===i&&(i=null),e.attachShader(t,n),e.attachShader(t,r),null!==o&&o(e,t),e.linkProgram(t),!1===e.getProgramParameter(t,e.LINK_STATUS)?(console.error(e.getProgramInfoLog(t)),e.deleteShader(n),e.deleteShader(r),e.deleteProgram(t),!1):(e.validateProgram(t),!1===e.getProgramParameter(t,e.VALIDATE_STATUS)?(console.error(e.getProgramInfoLog(t)),e.deleteShader(n),e.deleteShader(r),e.deleteProgram(t),!1):(null!==i&&i(e,t),!0))},e.getProgramActiveAttribs=function(e,t,n){for(var r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),o=0;o<r;o++){var i=e.getActiveAttrib(t,o);i&&(n[i.name]=new m(i.size,i.type,e.getAttribLocation(t,i.name)))}},e.getProgramAtciveUniforms=function(e,t,n){for(var r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),o=0;o<r;o++){var i=e.getActiveUniform(t,o);if(i){var a=e.getUniformLocation(t,i.name);null!==a&&(n[i.name]=new g(i.size,i.type,a))}}},e.createBuffer=function(e){var t=e.createBuffer();if(null===t)throw new Error("WebGLBuffer创建失败!");return t},e.getColorBufferData=function(e){var t=new Uint8Array(e.drawingBufferWidth*e.drawingBufferHeight*4);return e.readPixels(0,0,e.drawingBufferWidth,e.drawingBufferHeight,e.RGBA,e.UNSIGNED_BYTE,t),t},e.setUniformParam=function(e,t,n,r){switch(n){case a.uniform1f:e.uniform1f(t,r);break;case a.uniform1fv:e.uniform1fv(t,r);break;case a.uniform1i:e.uniform1i(t,r);break;case a.uniform1iv:e.uniform1iv(t,r);break;case a.uniform2f:e.uniform2f(t,r[0],r[1]);break;case a.uniform2fv:e.uniform2fv(t,r);break;case a.uniform2i:e.uniform2i(t,r[0],r[1]);break;case a.uniform2iv:e.uniform2iv(t,r);break;case a.uniform3f:e.uniform3f(t,r[0],r[1],r[2]);break;case a.uniform3fv:e.uniform3fv(t,r);break;case a.uniform3i:e.uniform3i(t,r[0],r[1],r[2]);break;case a.uniform3iv:e.uniform3iv(t,r);break;case a.uniform4f:e.uniform4f(t,r[0],r[1],r[2],r[3]);break;case a.uniform4fv:e.uniform4fv(t,r);break;case a.uniform4i:e.uniform4i(t,r[0],r[1],r[2],r[3]);break;case a.uniform4iv:e.uniform4iv(t,r);break;default:console.error("["+n+"]: unknown uniform type")}},e.genTextureInfoFromTensorShape=function(e,t){var n=e||4096,r=t.shape,o=void 0===r?[]:r,i=o[0],a=o[1],s=o[2],u=o[3];if(i*s<=n&&a*u<=n)t.shape_texture=[i*s,a*u];else{var c=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(o).sort((function(e,t){return e-t})),f=c[0],h=c[1],d=c[2],p=f*c[3],v=h*d;if(p>n||v>n){var g=[p,v].sort((function(e,t){return e-t})),m=g[0],y=g[1],b=function(e,t){var n=t;if(e%n==0)return n;for(;n<e&&e%n!=0;)n++;return n}(y,Math.ceil(y/n));if(p=m*b,v=Math.ceil(y/b),l.env.get("debug")&&console.error("大小超限",o,[v,p]),p>n||v>n)throw new Error("Requested texture size ["+p+"x"+v+"] greater than WebGL maximum on this browser / GPU ["+n+"x"+n+"].")}t.shape_texture=[v,p]}},e.WEBGL_ATTRIBUTES={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0,powerPreference:"high-performance"},e.gl=null,e}();!function(e){e[e.GL_REPEAT=0]="GL_REPEAT",e[e.GL_MIRRORED_REPEAT=1]="GL_MIRRORED_REPEAT",e[e.GL_CLAMP_TO_EDGE=2]="GL_CLAMP_TO_EDGE"}(v||(v={}));var b=function(){function e(){}return e.getTextureConfig=function(e){var t,n,r,o,i,a,s,u,c=e,f=!0,h=!0;return 2===l.env.get("webglVersion")?(t=c.getExtension("EXT_color_buffer_float"),r=c.HALF_FLOAT,o=c.R32F,i=c.RGBA32F,a=c.R16F,s=c.RGBA16F,n=c.RED,u=c.RGBA32F):(o=c.RGBA,a=c.RGBA,s=c.RGBA,i=c.RGBA,n=c.RGBA,u=c.RGBA,t=c.getExtension("OES_texture_float"),r=c.getExtension("OES_texture_half_float").HALF_FLOAT_OES,f=this.isDownloadFloatTextureEnabled(c,u),h=this.isFloatTextureReadPixelsEnabledMethod(c,1,f)),{textureFloat:t,textureHalfFloat:r,internalFormat:o,internalFormatPacked:i,internalFormatHalfFloat:a,internalFormatPackedHalfFloat:s,textureFormat:n,downloadInternalFormat:u,frameBufferSupportFloat:f,isFloatTextureReadPixelsEnabled:h}},e.isFloatTextureReadPixelsEnabledMethod=function(e,t,n){var r=e;if(0===t)return!1;if(1===t){if(null==r.getExtension("OES_texture_float"))return!1}else if(null==r.getExtension("EXT_color_buffer_float")||null==r.getExtension("EXT_color_buffer_half_float"))return!1;var o=r.createFramebuffer(),i=r.createTexture();r.bindTexture(r.TEXTURE_2D,i);var a=2===t?r.RGBA32F:r.RGBA;r.texImage2D(r.TEXTURE_2D,0,a,1,1,0,r.RGBA,n?r.FLOAT:r.getExtension("OES_texture_half_float").HALF_FLOAT_OES,null),r.bindFramebuffer(r.FRAMEBUFFER,o),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0);var s=r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE;r.readPixels(0,0,1,1,r.RGBA,r.FLOAT,new Float32Array(4));var u=r.getError()===r.NO_ERROR;return s&&u},e.isDownloadFloatTextureEnabled=function(e,t){var n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n),e.texImage2D(e.TEXTURE_2D,0,t,1,1,0,e.RGBA,e.FLOAT,null);var r=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0);var o=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(n),e.deleteFramebuffer(r),o},e.uploadDataToTexture=function(e,t,n,r){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);var o=n.width_texture,i=n.height_texture,a=n.data,s=e.RGBA,u=e.RGBA,c=e.FLOAT,f=a;if(a instanceof Uint8Array||a instanceof Uint8ClampedArray)c=e.UNSIGNED_BYTE;else{if(!(a instanceof Float32Array||a instanceof Array))return void e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,a);if(2===l.env.get("webglVersion")){var h=l.env.get("webgl_force_half_float_texture");s=r?h?t.internalFormatPackedHalfFloat:t.internalFormatPacked:h?t.internalFormatHalfFloat:t.internalFormat,u=r?e.RGBA:t.textureFormat}else{for(var d=new Float32Array(o*i*4),p=0;p<a.length;p++)r?d[p]=a[p]:(d[4*p]=a[p],d[4*p+1]=0,d[4*p+2]=0,d[4*p+3]=0);f=d}}e.texImage2D(e.TEXTURE_2D,0,s,o,i,0,u,c,f)},e.genOutputTexture=function(e,t,n,r){var o=n.interpType,i=n.width_texture,a=n.height_texture,s=e.createTexture();e.bindTexture(e.TEXTURE_2D,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,"LINEAR"===o?e.LINEAR:e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,"LINEAR"===o?e.LINEAR:e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);var u=l.env.get("webgl_force_half_float_texture"),c=u?t.internalFormatPackedHalfFloat:t.internalFormatPacked,f=2===l.env.get("webglVersion")?u?e.HALF_FLOAT:e.FLOAT:t.frameBufferSupportFloat?e.FLOAT:t.textureHalfFloat,h=r?t.isFloatTextureReadPixelsEnabled?f:e.UNSIGNED_BYTE:null;return e.texImage2D(e.TEXTURE_2D,0,c,i,a,0,e.RGBA,r?h:f,null),e.bindTexture(e.TEXTURE_2D,null),s},e}(),w=["\n precision highp float;\n precision highp int;\n\n attribute vec4 position;\n varying vec2 vCoord;\n\n void main() {\n vCoord.x = (position.x + 1.0) / 2.0;\n vCoord.y = (position.y + 1.0) / 2.0;\n gl_Position = position;\n }\n ","#version 300 es\n in vec4 position;\n out vec2 vCoord;\n\n void main() {\n vCoord.x = (position.x + 1.0) / 2.0;\n vCoord.y = (position.y + 1.0) / 2.0;\n gl_Position = position;\n }\n "],A=new Float32Array([-1,1,-1,-1,1,1,1,-1]),x=["length_shape","length_unformatted_shape","width_shape","height_shape","width_texture","height_texture","offset_x","offset_y","channel","total_shape","numbers_shape"],T={float:["multi_value","bias_value"],bool:["fuse_relu"]};function P(){return"\n "+(l.env.get("useModAdaptor")?"\n int calMod(int a, int b) {\n float modV = mod(float(a), float(b));\n if (modV == float(b)) {\n modV = 0.0;\n }\n return int(modV);\n }\n ":"\n int calMod(int a, int b) {\n return a - a / b * b;\n }\n ")+"\n "+(l.env.get("useDivisionAdaptor")?"\n int calDivision(int a, int b) {\n return int(float(a) / (float(b) - 0.0001));\n }\n ":"\n int calDivision(int a, int b) {\n return a / b;\n }\n ")+"\n \n float tanh_calc(float num) {\n float res = (exp(2.0 * num) - 1.0) / (exp(2.0 * num) + 1.0);\n return res;\n }\n \n "}var C="\nivec4 transferFromNHWCtoNCHW(\n int sumVal,\n const int channel,\n const int width_shape,\n const int height_shape,\n const int total_shape) {\n\n int n_origin = int(total_shape/(channel * width_shape * height_shape));\n int new_a = calMod(sumVal, width_shape);\n sumVal = int((sumVal - new_a) / width_shape);\n int new_b = calMod(sumVal, height_shape);\n sumVal = int((sumVal - new_b) / height_shape);\n int new_g = calMod(sumVal, channel);\n sumVal = int((sumVal - new_g) / channel);\n int new_r = calMod(sumVal, n_origin);\n return ivec4(new_r,new_g,new_b,new_a);\n}\n",_="\nfloat prelu(float x, float p, float b) {\n float result = x;\n if (x < 0.0) {\n result = x * p;\n }\n\n return result;\n}",E="\nfloat relu6(float x, float threshold, float b) {\n float result = min(max(0.0, x), threshold);\n return result;\n}",S="\nfloat leakyRelu(float x, float p, float b) {\n float result = max(x, x * p);\n return result;\n}",k="\nfloat scale(float x, float p, float b) {\n float result = p * x + b;\n return result;\n}",R="\nfloat scaleWidthBias(float x, float p, float b) {\n float result = p * (x + b);\n return result;\n}",O="\nfloat sigmoid(float x, float y, float z) {\n float result = 1.0 / (1.0 + exp(-x));\n return result;\n}",F="\n float hardSigmoid(float x, float slope, float offset) {\n float result = max(0.0, min(1.0, slope * x + offset));\n return result;\n }\n",M="\n float sqrt(float x, float slope, float offset) {\n return sqrt(x);\n }\n",I="\n float pow_func(float x, float factor, float offset) {\n return pow(x, factor);\n }\n",D="\nfloat tanh_func(float x, float y, float z) {\n return tanh_calc(x);\n}",L="\nfloat exp_func(float x, float y, float z) {\n float result = exp(x);\n return result;\n}",j="\nfloat abs_func(float x, float y, float z) {\n return abs(x);\n}";function B(e,t){var n=t.width_shape,r=t.height_shape,o=t.channel,i=t.width_texture;return"\n float getValueFromTensorPos_"+e+"(int n, int c, int h, int w) {\n int index = n * "+n*r*o+" + c * "+n*r+" + h * "+n+" + w;\n // 0.01 hack: 在 PC/WISE 机器上,出现某个值(比如 index 为 3520) float(index) 和 float(3520) 返回值不同的情况,目前 +0.01 hack\n int pos_w = int(mod(float(index) + 0.01, float("+i+")));\n int pos_h = index / int("+i+");\n vec4 pixels = TEXTURE2D(texture_"+e+",\n vec2(\n (float(pos_w) + 0.5) / float("+i+"),\n (float(pos_h) + 0.5) / float("+t.height_texture+")\n )\n );\n return pixels.r;\n }"}function N(e,t){var n=t.channel,r=t.height_shape,o=t.width_texture,i=t.height_texture,a=t.width_shape;return"\n vec4 getValueFromTensorPosPacking_"+e+"(int n, int c, int h, int w) {\n int index = n * "+a*r*n+" + c * "+a*r+" + h * "+a+" + w;\n // 0.01 hack: 在 PC/WISE 设备上,出现某个值(比如 index 为 3520) float(index) 和 float(3520) 返回值不同的情况,目前 +0.01 hack\n int pos_w = int(mod(float(index) + 0.01, float("+o+")));\n int pos_h = index / int("+o+");\n vec4 pixels = TEXTURE2D(texture_"+e+",\n vec2(\n (float(pos_w) + 0.5) / float("+o+"),\n (float(pos_h) + 0.5) / float("+i+")\n )\n );\n return pixels;\n }"}function V(e,t){var n=t.numbers_shape,r=t.length_shape;if(1===r)return"\n int getTensorPosFromArrayIndex_"+e+"(int n) {\n return calMod(n, "+n[0]+");\n }\n ";for(var o="ivec"+r+"("+n.join(", ")+")",i="pos[0] = n / "+n[0]+";",a=1;a<r;a++)i+="\n n = calMod(n, "+n[a-1]+");\n pos["+a+"] = calDivision(n, "+n[a]+");\n ";return"\n ivec"+r+" shapeVec_"+e+" = "+o+";\n ivec"+r+" getTensorPosFromArrayIndex_"+e+"(int n) {\n ivec"+r+" pos;\n "+i+"\n return pos;\n }\n "}function U(e){return"\n #define getPixelsFromTexturePos_"+e+"(pos) TEXTURE2D(texture_"+e+", pos)\n "}function W(e,t){return"\n vec2 moveTexture2PosToReal_"+e+"(vec2 v) {\n vec2 v2;\n v2.x = v.x * float("+t.width_texture+");\n v2.y = v.y * float("+t.height_texture+");\n return v2;\n }\n "}function z(e){return"uniform sampler2D texture_"+e+";"}function H(e,t,n,r,a){var s,u,c="",f=t.name,h=t.mainFunc,d=t.textureFuncConf,p=void 0===d?{}:d,v=t.commonFuncConf;try{var g=function(e,t,n){for(var r={},o=Object.assign({},t),i=[],a=0,s=e;a<s.length;a++){for(var u=s[a],c=u.name,l={},f=0,h=x;f<h.length;f++)void 0!==u[y=h[f]]&&(l[y]=u[y]);r[c]=l,i.push(c)}for(var d=0,p=Object.keys(T);d<p.length;d++)for(var v=p[d],g=0,m=T[v];g<m.length;g++){var y;void 0!==t[y=m[g]]&&(o[y]=v+"("+t[y]+")")}return t.active_function&&(o.active_function=t.active_function),o.runtime=n,{textureParams:r,opParams:o,active_function:t.active_function}}(n,r,a),m=g.textureParams,y=g.opParams,b=g.active_function,w=2===l.env.get("webglVersion")?" #version 300 es\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n #else\n precision mediump float;\n precision mediump int;\n #endif \n ":" #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n #else\n precision highp float;\n precision highp int;\n #endif\n ",A=function(e){var t=e.frameBufferSupportFloat,n=e.isFinalOp,r=e.isFloatTextureReadPixelsEnabled;return 2===l.env.get("webglVersion")?"\n // 顶点shader透传的材质坐标\n in vec2 vCoord;\n out vec4 outColor;\n void setOutput(float result) {\n result = fuse_op(result);\n outColor.r = result;\n }\n void setPackedOutput(vec4 result) {\n outColor = result;\n }\n int calCeil(int a, int b) {\n return int(ceil(float(a) / float(b)));\n }\n "+P()+"\n ":t?"\n varying vec2 vCoord;\n varying vec4 outColor;\n void setOutput(float result) {\n result = fuse_op(result);\n gl_FragColor.r = result;\n }\n void setPackedOutput(vec4 result) {\n gl_FragColor = result;\n }\n int calCeil(int a, int b) {\n return int(ceil(float(a) / float(b)));\n }\n "+P()+"\n ":n&&!r?"\n varying vec2 vCoord;\n varying vec4 outColor;\n\n const float FLOAT_MAX = 1.70141184e38;\n const float FLOAT_MIN = 1.17549435e-38;\n\n #define isnan(value) isnan_custom(value)\n bool isnan_custom(float val) {\n return (val > 0. || val < 1. || val == 0.) ? false : true;\n }\n\n "+P()+"\n\n int calCeil(int a, int b) {\n return int(ceil(float(a) / float(b)));\n }\n\n lowp vec4 encode_float(highp float v) {\n if (isnan(v)) {\n return vec4(255, 255, 255, 255);\n }\n\n highp float av = abs(v);\n\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n highp float e = floor(log2(av));\n highp float m = exp2(fract(log2(av))) - 1.0;\n\n c[2] = floor(128.0 * m);\n m -= c[2] / 128.0;\n c[1] = floor(32768.0 * m);\n m -= c[1] / 32768.0;\n c[0] = floor(8388608.0 * m);\n\n highp float ebias = e + 127.0;\n c[3] = floor(ebias / 2.0);\n ebias -= c[3] * 2.0;\n c[2] += floor(ebias) * 128.0;\n\n c[3] += 128.0 * step(0.0, -v);\n\n return c / 255.0;\n }\n\n void setOutput(float result) {\n result = fuse_op(result);\n gl_FragColor = encode_float(result);\n }\n ":"\n #define isnan(value) isnan_custom(value)\n bool isnan_custom(float val) {\n return (val > 0. || val < 1. || val == 0.) ? false : true;\n }\n\n varying vec2 vCoord;\n varying vec4 outColor;\n void setOutput(float result) {\n result = fuse_op(result);\n if(isnan(result)) {\n gl_FragColor.r = 0.0;\n }else {\n gl_FragColor.r = result;\n }\n }\n\n void setPackedOutput(vec4 result) {\n gl_FragColor = result;\n }\n\n "+P()+"\n\n int calCeil(int a, int b) {\n return int(ceil(float(a) / float(b)));\n }\n "}(e),C=function(e){var t="",n="";if(e.fuse_opt)for(var r in e.fuse_opt){var i=r,a=0,s=0;switch(r){case"scale":var u=e.fuse_opt.scale.bias_after_scale;a=void 0!==(l=e.fuse_opt.scale.scale)?l:1,s=e.fuse_opt.scale.bias||0,!1===u&&void 0!==u&&(i="scaleWidthBias");break;case"relu":i="prelu";break;case"relu6":a=e.fuse_opt[r].threshold;break;case"hard_sigmoid":i="hardSigmoid",a=e.fuse_opt[r].slope||.2,s=e.fuse_opt[r].offset||.5;break;case"leakyRelu":a=e.fuse_opt[r].alpha;break;case"pow":i="pow_func",a=e.fuse_opt[r].factor||2;break;case"tanh":i="tanh_func";break;case"exp":i="exp_func";break;case"abs":i="abs_func"}if("hard_swish"===r){var c=void 0!==e.fuse_opt.hard_swish.offset?e.fuse_opt.hard_swish.offset:3,l=void 0!==e.fuse_opt.hard_swish.scale?e.fuse_opt.hard_swish.scale:6;n+="res = res * min(max(0.0, res + float("+c+")), float("+(void 0!==e.fuse_opt.hard_swish.threshold?e.fuse_opt.hard_swish.threshold:6)+")) / float("+l+");"}else"dropout"===r?n+="\n if ("+("downgrade_in_infer"===e.fuse_opt.dropout.dropout_implementation)+") {\n res = res * (1.0 - float("+e.fuse_opt.dropout.dropout_prob+"));\n }":(t+=o[i],n+="res = "+i+"(res, float("+a+"), float("+s+"));")}return"\n "+t+"\n\n float fuse_op(float x) {\n float res = x;\n "+n+"\n return res;\n }\n "}(y),_=function(e,t,n,r){if(!e)return"";var o=Object.assign({},e);o["@all"]&&function(e,t){var n=t.filter((function(e){return"out"!==e.name})),r=e["@all"];n.forEach((function(t){var n=t.name;e[n]?e[n].concat(r):e[n]=r})),delete e["@all"]}(o,r);for(var a="",s="",u=0,c=Object.keys(o);u<c.length;u++){var l=c[u];if(t[l]){s+=z(l);for(var f=0,h=o[l];f<h.length;f++){var d=h[f];if(i[d])try{a+=i[d](l,t[l],n)}catch(e){console.error(e)}}}}return"\n "+s+"\n "+a+"\n "}(p,m,y,n),E=function(e){return void 0===e?"":"\n int layer_run_time = "+e+";\n "}(a),S=function(e){var t,n,r,o,i;return"\n \n vec2 _2d_shape_texture_out = vec2(float("+e.width_texture+"), float("+e.height_texture+"));\n \n "+(n=(t=e).height_shape,r=t.width_shape,"\n ivec4 getOutputTensorPos() {\n vec2 outCoord = vCoord.xy * (_2d_shape_texture_out);\n int index = int(outCoord.x) + int(outCoord.y) * int("+t.width_texture+");\n\n int n1 = int(index / "+(o=r*n*t.channel)+");\n int c1 = int(calMod(index, "+o+") / "+(i=r*n)+");\n int h1 = int(calMod(index, "+i+") / "+r+");\n int w1 = calMod(index, "+r+");\n return ivec4(n1, c1, h1, w1);\n }\n \n ")}(m.out),k=function(e){if(!e)return"";for(var t="",n=0,r=e;n<r.length;n++){var i=r[n];o[i]&&(t+=o[i])}return t}(v);s=c=" "+w+"\n "+C+"\n "+A+"\n "+k+"\n "+(b?o[b]:"")+"\n "+_+"\n "+E+"\n "+S+"\n "+h(m,y)+"\n ",u=1===l.env.get("webglVersion")?"texture2D":"texture",c=s.replace(/\bTEXTURE2D\b/g,u)}catch(e){console.error("["+f+"]: "+e)}return c}var G,X=function(){function e(e,t,n,r){var o=e;this.vShader=t;try{this.fShader=this.initShader(o,n,"fragment"),this.shape=r&&r.shape;var i=this.program=o.createProgram();o.attachShader(i,this.vShader),o.attachShader(i,this.fShader),o.linkProgram(i)}catch(e){throw new Error(e)}}return e.prototype.initShader=function(e,t,n){void 0===n&&(n="vertex");var r,o="vertex"===n?e.VERTEX_SHADER:e.FRAGMENT_SHADER;if("vertex"===n&&this.vShader)r=this.vShader;else if(r=e.createShader(o),"vertex"===n&&(this.vShader=r),e.shaderSource(r,t),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw new Error("compile: "+e.getShaderInfoLog(r));return r},e.prototype.setProgram=function(e,t,n){e.useProgram(this.program),n||this.runVertexShader(e,t)},e.prototype.runVertexShader=function(e,t){var n=e.getAttribLocation(this.program,"position");e.enableVertexAttribArray(n),e.bindBuffer(e.ARRAY_BUFFER,t),e.vertexAttribPointer(n,2,e.FLOAT,!1,0,0)},e.Sampler="uSampler",e}(),Q=(G=function(e,t){return(G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}G(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Y=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},q=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},K=function(e){function t(){var t=e.call(this)||this;return t.cacheTextures={},t.uniformLocations={},t.texturesMap={},t.queryList=[],t.currentTexture=null,t.width_shape_out=1,t.height_shape_out=1,t.width_texture_out=1,t.height_texture_out=1,t.channel=0,t.total_shape=0,t}return Q(t,e),t.prototype.init=function(){return Y(this,void 0,void 0,(function(){var e;return q(this,(function(t){return e=this.gl=y.createWebGLRenderingContext(),this.gl?(this.glVersion=y.getWebglVersion(),this.textureConf=b.getTextureConfig(e),this.MAX_TEXTURE_SIZE=l.env.get("MAX_TEXTURE_SIZE")||e.getParameter(e.MAX_TEXTURE_SIZE),e.disable(e.DEPTH_TEST),e.disable(e.STENCIL_TEST),e.disable(e.BLEND),e.disable(e.DITHER),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SAMPLE_COVERAGE),e.enable(e.SCISSOR_TEST),e.enable(e.CULL_FACE),e.cullFace(e.BACK),this.vertexBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,A,e.STATIC_DRAW),this.vShader=y.initShader(e,u.VS_SHADER,w[this.glVersion-1]),this.frameBuffer=e.createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,this.frameBuffer),this.pbo=e.createBuffer(),[2]):[2]}))}))},t.prototype.createProgram=function(e){var t=this,n=e.op,r=e.outTensor,o=e.inputTensors,i=e.shaderParams,a=e.runtime,s=e.isFinalOp,u=null;try{var c=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}([r],o);c.forEach((function(e){return y.genTextureInfoFromTensorShape(t.MAX_TEXTURE_SIZE,e)}));var l=H(this.textureConf,n,c,i,a);(u=new X(this.gl,this.vShader,l,r)).fsCode=l;var f=b.genOutputTexture(this.gl,this.textureConf,r,s);this.texturesMap[r.tensorId]=f,this.program=u}catch(e){console.error("webgl createProgram: "+n.name+" -- "+e)}return u},t.prototype.runProgram=function(e,t){var n=this,r=function(e,t){if(2===t&&l.env.get("performance")){var n=e.getExtension("EXT_disjoint_timer_query_webgl2");if(!n)return;var r=e.createQuery();return e.beginQuery(n.TIME_ELAPSED_EXT,r),r}return null}(this.gl,this.glVersion),o=e.isPackedOp;e.program.forEach((function(r,i){var a=e.outputTensors[i],s=a.tensorId;n.setOutProps(a),"frameBuffer"===e.bufferType?n.attachFrameBuffer(s):n.attachColorBuffer(),r.setProgram(n.gl,n.vertexBuffer,t),n.program=r,n.render(e,t,i,o)})),e.tensorData=null,r&&(this.queryList.push({name:e.name,query:r,count:1}),r=function(e,t,n){if(2===t&&l.env.get("performance")){var r=e.getExtension("EXT_disjoint_timer_query_webgl2");if(!r)return;e.endQuery(r.TIME_ELAPSED_EXT)}return n}(this.gl,this.glVersion,r))},t.prototype.read=function(e){return Y(this,void 0,void 0,(function(){var t,n,r;return q(this,(function(o){switch(o.label){case 0:return l.env.get("webgl_gpu_pipeline")?(t=this.gl,this.frameBuffer=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer),[2,[]]):(n=this.createPBO(),[4,this.createAndWaitForFence()]);case 1:return o.sent(),r=e?e.shape:[],[2,this.downloadFloat32TensorFromBuffer(n,r)]}}))}))},t.prototype.createPBO=function(){var e,t=this.textureConf;if(2===this.glVersion){var n=this.gl,r=this.pbo;n.bindBuffer(n.PIXEL_PACK_BUFFER,r);var o=16*this.width_texture_out*this.height_texture_out;return n.bufferData(n.PIXEL_PACK_BUFFER,o,n.STREAM_READ),n.readPixels(0,0,this.width_texture_out,this.height_texture_out,n.RGBA,n.FLOAT,0),n.bindBuffer(n.PIXEL_PACK_BUFFER,null),r}var i=this.gl,a=i.FLOAT;return t.isFloatTextureReadPixelsEnabled?e=new Float32Array(this.width_texture_out*this.height_texture_out*4):(e=new Uint8Array(this.width_texture_out*this.height_texture_out*4),a=i.UNSIGNED_BYTE),i.readPixels(0,0,this.width_texture_out,this.height_texture_out,i.RGBA,a,e),t.isFloatTextureReadPixelsEnabled?e:new Float32Array(e.buffer)},t.prototype.createAndWaitForFence=function(){return Y(this,void 0,void 0,(function(){var e,t,n,r,o=this;return q(this,(function(i){return e=this.gl,t=null!=e.fenceSync,n=function(){return!0},t&&(r=e.fenceSync(e.SYNC_GPU_COMMANDS_COMPLETE,0),e.flush(),n=function(){var t=e.clientWaitSync(r,0,0);return t===e.ALREADY_SIGNALED||t===e.CONDITION_SATISFIED}),[2,new Promise((function(e){o.pollItem(n,e)}))]}))}))},t.prototype.pollItem=function(e,t){!function n(){e()?t():setTimeout(n,1)}()},t.prototype.downloadFloat32TensorFromBuffer=function(e,t){var n=4*this.width_texture_out*this.height_texture_out;if(2===this.glVersion){var r=this.gl,o=new Float32Array(n);r.bindBuffer(r.PIXEL_PACK_BUFFER,e),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,o),r.bindBuffer(r.PIXEL_PACK_BUFFER,null);var i=[];if(l.env.get("webgl_pack_output"))return Array.from(o).slice(0,function(e){return e.reduce((function(e,t){return e*t}),1)}(t));for(var a=0;a<this.width_texture_out*this.height_texture_out;a++)i.push(o[4*a]);return i}var s=e,u=[];for(a=0;a<this.width_texture_out*this.height_texture_out;a++){var c=this.textureConf.isFloatTextureReadPixelsEnabled?4*a:a;u.push(s[c])}return u},t.prototype.setOutProps=function(e){var t=e.width_shape,n=void 0===t?1:t,r=e.height_shape,o=void 0===r?1:r,i=e.width_texture,a=void 0===i?1:i,s=e.height_texture,u=void 0===s?1:s,c=e.channel,l=void 0===c?0:c,f=e.total_shape,h=void 0===f?0:f;this.width_shape_out=n,this.height_shape_out=o,this.width_texture_out=a,this.height_texture_out=u,this.channel=l,this.total_shape=h},t.prototype.attachColorBuffer=function(){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,null),e.canvas.width=this.width_shape_out,e.canvas.height=this.height_shape_out,e.viewport(0,0,e.canvas.width,e.canvas.height),e.scissor(0,0,e.canvas.width,e.canvas.height)},t.prototype.attachFrameBuffer=function(e){this.currentTexture=this.texturesMap[e];var t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.currentTexture,0),t.viewport(0,0,this.width_texture_out,this.height_texture_out),t.scissor(0,0,this.width_texture_out,this.height_texture_out)},t.prototype.render=function(e,t,n,r){var o=this;void 0===t&&(t=!1),void 0===r&&(r=!1);var i=e.inputTensors,a=void 0===i?[]:i,s=e.uniform,u=void 0===s?null:s,c=e.iLayer,l=void 0===c?0:c,f=e.modelName,h=this.gl,d=0;a.forEach((function(e){o.initTexture(d,e,r);var i=o.getUniformLoc("texture_"+e.name,l,t,n,f);i&&h.uniform1i(i,d++)})),u&&this.setUniform(u,l,t,n,f),h.drawArrays(h.TRIANGLE_STRIP,0,4)},t.prototype.initTexture=function(e,t,n){var r,o=this.gl,i=this.textureConf,a=t.tensorId,s=n||t.isPacked,u=t.data;if(t.persistable){this.cacheTextures=this.cacheTextures||{};var c=this.cacheTextures[a];c?(r=c,u&&y.genTextureInfoFromTensorShape(this.MAX_TEXTURE_SIZE,t)):(r=o.createTexture(),this.cacheTextures[a]=r)}else r=this.texturesMap[a];o.activeTexture(o["TEXTURE"+e]),o.bindTexture(o.TEXTURE_2D,r),u&&(b.uploadDataToTexture(o,i,t,s),t.data=null)},t.prototype.setUniform=function(e,t,n,r,o){var i=this,a=Object.keys(e),s=this.gl;a.forEach((function(a){var u=e[a].type,c=e[a].value,l=i.getUniformLoc(a,t,n,r,o);y.setUniformParam(s,l,u,c)}))},t.prototype.getUniformLoc=function(e,t,n,r,o){var i=o+"_";if(n)return this.uniformLocations[i+t][e+r];var a=this.gl.getUniformLocation(this.program.program,e);return this.uniformLocations[i+t]=this.uniformLocations[i+t]||{},this.uniformLocations[i+t][e+r]=a,a},t.prototype.dispose=function(e){for(var t=0,n=e.inputTensors;t<n.length;t++){var r=n[t].tensorId;this.texturesMap[r]&&this.gl.deleteTexture(this.texturesMap[r]),this.cacheTextures[r]&&this.gl.deleteTexture(this.cacheTextures[r]),this.cacheTextures[r]=null,this.texturesMap[r]=null}},t}(l.PaddlejsBackend),J={mainFunc:function(e,t){var n=e.origin,r=e.filter,o=e.out,i=e.bias,a=t.groups,s=void 0===a?1:a,u=t.strides,c=void 0===u?[]:u,l=t.paddings,f=void 0===l?[]:l,h=t.dilations,d=void 0===h?[]:h,p=t.fuse_relu,v=t.filter_nearest_vec4,g=t.filter_remainder_vec4,m=t.act_type,y=void 0===m?"":m,b=t.padding_algorithm,w=void 0===b?"":b,A=t.hard_swish_offset,x=void 0===A?3:A,T=t.hard_swish_scale,P=void 0===T?6:T,C=t.hard_swish_threshold,_=void 0===C?6:C,E=c[0],S=void 0===E?1:E,k=c[1],R=void 0===k?1:k,O=f[0],F=void 0===O?0:O,M=f[1],I=void 0===M?0:M,D=d[0],L=void 0===D?1:D,j=d[1],B=void 0===j?1:j;return"SAME"===w&&Math.ceil((n.width_shape-r.width_shape)/S)+1!==o.width_shape&&(F=1,I=1),"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n int x = oPos.a;\n int c = oPos.g;\n int y = oPos.b;\n int b = oPos.r;\n float res = 0.0;\n\n // 获取output的坐标\n int oTensorChannel = (c / ("+o.channel+" / "+s+")) * "+r.channel+";\n int oy = y * "+S+" - "+F+";\n for (int fy = 0; fy < "+r.height_shape+"; fy++) {\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n oy += "+L+";\n continue;\n }\n int ox = x * "+R+" - "+I+";\n for (int fx = 0; fx < "+r.width_shape+"; fx++) {\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n ox += "+B+";\n continue;\n }\n // channel计算\n for (int j = 0; j < "+v+"; j += 4) {\n vec4 fValues = vec4(\n getValueFromTensorPos_filter(c, j, fy, fx),\n getValueFromTensorPos_filter(c, j + 1, fy, fx),\n getValueFromTensorPos_filter(c, j + 2, fy, fx),\n getValueFromTensorPos_filter(c, j + 3, fy, fx)\n );\n\n vec4 oValues = vec4(\n getValueFromTensorPos_origin(b, oTensorChannel + j, oy, ox),\n getValueFromTensorPos_origin(b, oTensorChannel + j + 1, oy, ox),\n getValueFromTensorPos_origin(b, oTensorChannel + j + 2, oy, ox),\n getValueFromTensorPos_origin(b, oTensorChannel + j + 3, oy, ox)\n );\n\n res += dot(fValues, oValues);\n }\n\n if ("+g+" == 1) {\n res += dot(\n getValueFromTensorPos_filter(c, "+v+", fy, fx),\n getValueFromTensorPos_origin(b, oTensorChannel + "+v+", oy, ox));\n } else if ("+g+" == 2) {\n vec2 fValues = vec2(\n getValueFromTensorPos_filter(c, "+v+", fy, fx),\n getValueFromTensorPos_filter(c, "+v+" + 1, fy, fx)\n );\n vec2 oValues = vec2(\n getValueFromTensorPos_origin(b, oTensorChannel + "+v+", oy, ox),\n getValueFromTensorPos_origin(b, oTensorChannel + "+v+" + 1, oy, ox)\n );\n res += dot(fValues, oValues);\n } else if ("+g+" == 3) {\n vec3 fValues = vec3(\n getValueFromTensorPos_filter(c, "+v+", fy, fx),\n getValueFromTensorPos_filter(c, "+v+" + 1, fy, fx),\n getValueFromTensorPos_filter(c, "+v+" + 2, fy, fx)\n );\n vec3 oValues = vec3(\n getValueFromTensorPos_origin(b, oTensorChannel + "+v+", oy, ox),\n getValueFromTensorPos_origin(b, oTensorChannel + "+v+" + 1, oy, ox),\n getValueFromTensorPos_origin(b, oTensorChannel + "+v+" + 2, oy, ox)\n );\n res += dot(fValues, oValues);\n }\n\n ox += "+B+";\n }\n oy += "+L+";\n }\n\n "+(i?"res += getValueFromTensorPos_bias(0, 0, 0, c);":"")+"\n\n if ("+p+") {\n res = max(0.0, res);\n }\n else if ("+("relu6"===y)+") {\n res = min(max(0.0, res), 6.0);\n }\n else if ("+("hard_swish"===y)+") {\n res = res * min(\n max(0.0, res + float("+x+")),\n float("+_+")\n ) / float("+P+");\n }\n\n setOutput(res);\n }\n "},textureFuncConf:{filter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"],bias:["getValueFromTensorPos"]},behaviors:["adaptPaddings","isApplySeparableConv","batchComputeConv2d","processBias"]};function Z(e,t){var n=e[0],r=e[1],o=e[2],i=e[3];if(1===n&&1===r)return[[1,1,o],3,[i],1,[o,i]];var a=e.slice(0,t),s=e.slice(t);return[a,a.length,s,s.length,[a.reduce((function(e,t){return e*t})),s.reduce((function(e,t){return e*t}))]]}function $(e,t,n){if(1===n)return"\n int getTensorPosFromArrayIndex_"+e+"(int n) {\n return calMod(n, "+t[0]+");\n }\n ";var r=f(t);return r.push(1),"\n ivec"+n+" shapeVec_"+e+" = ivec"+n+"("+r.join(", ")+");\n ivec"+n+" getTensorPosFromArrayIndex_"+e+"(int n) {\n ivec"+n+" pos;\n pos[0] = n / shapeVec_"+e+"[0];\n for (int i = 1; i < "+n+"; i++) {\n n = calMod(n, shapeVec_"+e+"[i - 1]);\n pos[i] = n / shapeVec_"+e+"[i];\n }\n return pos;\n }\n "}function ee(e){return 1===e?"int":"ivec"+e}function te(e){var t=e.total_shape,n=e.channel,r=e.height_shape,o=e.width_shape;return[t/n/r/o,n,r,o]}var ne={mainFunc:function(e,t){var n=e.origin,r=t.transpose_X,o=void 0!==r&&r,i=t.transpose_Y,a=void 0!==i&&i,s=t.trans_x,u=void 0!==s&&s,c=t.trans_y,l=o||u,f=a||void 0!==c&&c;return"\n void main() {\n float res = 0.0;\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n ivec4 origin_pos = out_pos;\n if ("+l+") {\n origin_pos[3] = origin_pos[2];\n }\n ivec4 counter_pos = out_pos;\n if ("+f+") {\n counter_pos[2] = counter_pos[3];\n }\n\n for (int j = 0; j < "+(l?n.height_shape:n.width_shape)+"; j++) {\n if ("+l+") {\n origin_pos[2] = j;\n }\n else {\n origin_pos[3] = j;\n }\n if ("+f+") {\n counter_pos[3] = j;\n }\n else {\n counter_pos[2] = j;\n }\n float o = getValueFromTensorPos_origin(origin_pos[0], origin_pos[1], origin_pos[2], origin_pos[3]);\n float c = getValueFromTensorPos_counter(counter_pos[0], counter_pos[1], counter_pos[2], counter_pos[3]);\n \n res += c * o;\n }\n setOutput(res);\n }\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]}};function re(e,t){var n=e[0],r=e[1],o=e[2],i=e[3];if(1===n&&1===r)return[[1,1,o],3,[i],1,[o,i]];var a=e.slice(0,t),s=e.slice(t);return[a,a.length,s,s.length,[a.reduce((function(e,t){return e*t})),s.reduce((function(e,t){return e*t}))]]}function oe(e,t,n){if(1===n)return"\n int getTensorPosFromArrayIndex_"+e+"(int n) {\n return calMod(n, "+t[0]+");\n }\n ";var r=f(t);return r.push(1),"\n ivec"+n+" shapeVec_"+e+" = ivec"+n+"("+r.join(", ")+");\n ivec"+n+" getTensorPosFromArrayIndex_"+e+"(int n) {\n ivec"+n+" pos;\n pos[0] = n / shapeVec_"+e+"[0];\n for (int i = 1; i < "+n+"; i++) {\n n = calMod(n, shapeVec_"+e+"[i - 1]);\n pos[i] = n / shapeVec_"+e+"[i];\n }\n return pos;\n }\n "}function ie(e){return 1===e?"int":"ivec"+e}function ae(e){var t=e.total_shape,n=e.channel,r=e.height_shape,o=e.width_shape;return[t/n/r/o,n,r,o]}var se={mainFunc:function(e,t){var n=e.origin,r=e.out;return"\n // start函数\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n int sumVal = oPos.a\n + oPos.b * "+r.width_shape+"\n + oPos.g * "+r.height_shape+" * "+r.width_shape+"\n + oPos.r * "+r.channel+" * "+r.width_shape+" * "+r.height_shape+";\n ivec4 new_oPos = transferFromNHWCtoNCHW(\n sumVal,\n "+n.channel+",\n "+n.width_shape+",\n "+n.height_shape+",\n "+n.total_shape+"\n );\n float o = getValueFromTensorPos_origin(new_oPos.r, new_oPos.g, new_oPos.b, new_oPos.a);\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},commonFuncConf:["transferFromNHWCtoNCHW"]},ue={mainFunc:function(e,t){var n=e.out,r=e.origin,o=t.align_mode,i=void 0===o?1:o,a=t.align_corners,s=void 0===a||a;return"\n // start函数\n\n vec4 getData(float n, float scale, bool align_flag, int in_len) {\n float m = align_flag ? ((n + 0.5) / scale - 0.5) : (n / scale);\n int a1 = int(floor(m));\n a1 = a1 > 0 ? a1 : 0;\n int a2 = (a1 + 1) < (in_len - 1) ? (a1 + 1) : (in_len - 1);\n\n float idx_src = (n + 0.5) / scale - 0.5;\n idx_src = idx_src > 0.0 ? idx_src : 0.0;\n float b1 = align_flag ? (idx_src - float(a1)) : (n / scale - float(a1));\n float b2 = 1.0 - b1;\n return vec4(float(a1), float(a2), b1, b2);\n }\n\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n\n bool align_flag = "+i+" == 0 && !"+s+";\n\n float scale_x = 0.0;\n float scale_y = 0.0;\n if ("+s+") {\n scale_x = float("+n.width_shape+" - 1) / float("+r.width_shape+" - 1);\n scale_y = float("+n.height_shape+" - 1) / float("+r.height_shape+" - 1);\n }\n else {\n scale_x = float("+n.width_shape+") / float("+r.width_shape+");\n scale_y = float("+n.height_shape+") / float("+r.height_shape+");\n }\n\n vec4 vx = getData(float(oPos.a), scale_x, align_flag, "+r.width_shape+");\n vec4 vy = getData(float(oPos.b), scale_y, align_flag, "+r.height_shape+");\n\n int x1 = int(vx.r);\n int x2 = int(vx.g);\n float x3 = vx.b;\n float x4 = vx.a;\n int y1 = int(vy.r);\n int y2 = int(vy.g);\n float y3 = vy.b;\n float y4 = vy.a;\n\n float value11 = getValueFromTensorPos_origin(oPos.r, oPos.g, y1, x1);\n float value12 = getValueFromTensorPos_origin(oPos.r, oPos.g, y2, x1);\n float value21 = getValueFromTensorPos_origin(oPos.r, oPos.g, y1, x2);\n float value22 = getValueFromTensorPos_origin(oPos.r, oPos.g, y2, x2);\n float value = x4 * y4 * value11 + x4 * y3 * value12 + x3 * y4 * value21 + x3 * y3 * value22;\n setOutput(float(value));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},ce=ue,le={mainFunc:function(e,t){var n=e.out,r=e.origin,o=t.align_mode,i=void 0===o?1:o,a=t.align_corners,s=void 0===a||a,u=n.width_shape,c=r.width_shape;return"\n // start函数\n\n vec4 getData(float n, float scale, bool align_flag, int in_len) {\n float m = align_flag ? ((n + 0.5) / scale - 0.5) : (n / scale);\n // int a1 = int(floor(m + 0.5));\n int a1 = int(m);\n a1 = a1 > 0 ? a1 : 0;\n int a2 = a1 < (in_len - 1) ? (a1 + 1) : in_len;\n\n float idx_src = (n + 0.5) / scale - 0.5;\n idx_src = idx_src > 0.0 ? idx_src : 0.0;\n float b1 = align_flag ? (idx_src - float(a1)) : (n / scale - float(a1));\n float b2 = 1.0 - b1;\n return vec4(float(a1), float(a2), b1, b2);\n }\n\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n\n bool align_flag = "+i+" == 0 && !"+s+";\n\n float scale = float("+(s?(u-1)/(c-1):u/c)+");\n\n vec4 v = getData(float(oPos.a), scale, align_flag, "+c+");\n\n float v1 = v.r;\n float v2 = v.g;\n float v3 = v.b;\n float v4 = v.a;\n\n float value1 = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, int(v1));\n float value2 = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, int(v2));\n float value = v4 * value1 + v3 * value2;\n // setOutput(float(int(v1)));\n setOutput(float(value));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},fe=le,he={relu:["transToPrelu"],relu6:["transToRelu6"],leaky_relu:["transToLeakyrelu"],transToLeakyrelu:["transToLeakyrelu"],scale:["transToScale"],sigmoid:["transToSigmoid"],hard_sigmoid:["transToHardSigmoid"],pow:["transToPow"],exp:["transToExp"],sqrt:["transToSqrt"],tanh:["transToTanh"],abs:["transToAbs"]};function de(e,t){var n=t.multi_value,r=void 0===n?1:n,o=t.bias_value,i=void 0===o?0:o;return"\n // start函数\n void main(void) {\n // 输出数据\n float o = getPixelsFromTexturePos_origin(vCoord).r;\n float res = "+t.active_function+"(o, float("+r+"), float("+i+"));\n setOutput(res);\n }\n "}function pe(e){return{mainFunc:de,textureFuncConf:{origin:["getPixelsFromTexturePos"]},behaviors:he[e]}}var ve={mainFunc:function(e,t){var n=e.origin,r=e.out,o=t.axes,i=n.length_unformatted_shape,a=r.length_unformatted_shape,s=Array.isArray(o)?o:[o],u=4-i,c=s.map((function(e){return-1===e?3:e+u})),l=["oPos.r","oPos.g","oPos.b","oPos.a"].slice(-1*a),f=[0,1,2,3];return Array.from(c,(function(e){return f.splice(e,1,-1)})),"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n o = getValueFromTensorPos_origin("+f.reverse().map((function(e){return-1===e?"0":l.pop()||"0"})).reverse().join(",")+");\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},ge={mainFunc:function(e,t){var n=e.origin,r=e.out,o=t.align_corners;return"\n // start函数\n int getData(float n, float scale, bool align_corners) {\n float m = align_corners ? (n / scale + 0.5) : (n / scale);\n return int(floor(m));\n }\n\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n \n float scale_x = 0.0;\n float scale_y = 0.0;\n if ("+o+") {\n scale_x = float("+r.width_shape+" -1) / float("+n.width_shape+" - 1);\n scale_y = float("+r.height_shape+" - 1) / float("+n.height_shape+" - 1);\n }\n else {\n scale_x = float("+r.width_shape+") / float("+n.width_shape+");\n scale_y = float("+r.height_shape+") / float("+n.height_shape+");\n }\n \n int vx = getData(float(oPos.a), scale_x, "+o+");\n int vy = getData(float(oPos.b), scale_y, "+o+");\n \n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, vy, vx);\n setOutput(float(o));\n}\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},commonFuncConf:["transferFromNHWCtoNCHW"]},me=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},ye={mainFunc:function(e,t){var n=e.origin,r=e.image,o=e.out,i=t.variances,a=void 0===i?[.1,.1,.2,.2]:i,s=t.fixed_sizes,u=t.fixed_ratios,c=t.densities,l=t.flatten_to_2d,d=t.clip,p=t.step_w,v=void 0===p?0:p,g=t.step_h,m=void 0===g?0:g,y=t.offset,b=void 0===y?.5:y,w=t.runtime,A=void 0===w?0:w,x=r.height_shape,T=r.width_shape,P=n.height_shape,C=n.width_shape,_=o.total_shape,E=o.channel,S=o.height_shape,k=o.width_shape,R=_/E/S/k,O=f([R,E,S,k]),F=v,M=m;0!==v&&0!==m||(F=T/C,M=x/P);var I=Math.round(.5*(F+M)),D=u.map((function(e){return Math.sqrt(e)})),L=1===D.length?"sqrt_fixed_ratios":"sqrt_fixed_ratios[r]",j=u.length,B=S,N=R,U=E;l&&(N=P,U=C,B=S/P/C);var W=f([N,U,B,k]),z=V("out1",{numbers_shape:me(W,[1]),length_shape:4}),H=c.map((function(e){return e*e*j})),G=H.length,X=function(e){var t="ivec2 calRemain(int remain, int curAccIndex, int s) {",n=e.length;if(1===n)t+="\n int accIndex0 = density_acc_shape;\n\n if (remain >= accIndex0) {\n s++;\n remain -= accIndex0;\n }\n else {\n return ivec2(remain, s);\n }\n ";else for(var r=0;r<n;r++)t+="\n int accIndex"+r+" = density_acc_shape["+r+"];\n\n if (remain >= accIndex"+r+") {\n s++;\n remain -= accIndex"+r+";\n }\n else {\n return ivec2(remain, s);\n }\n ";return t+"\n }\n "}(H),Q=d?"v = min(max(v, 0.), 1.);":"",Y=1===G?"density_acc_shape":"density_acc_shape[0]",q="\n float getFloat4TensorVal(vec4 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n else if (index == 2) {\n return tensor[2];\n }\n else if (index == 3) {\n return tensor[3];\n }\n }\n float getFloat3TensorVal(vec3 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n else if (index == 2) {\n return tensor[2];\n }\n }\n float getFloat2TensorVal(vec2 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n }\n float getFloat1TensorVal(float tensor, int index) {\n return tensor;\n }\n int getInt4TensorVal(ivec4 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n else if (index == 2) {\n return tensor[2];\n }\n else if (index == 3) {\n return tensor[3];\n }\n }\n int getInt3TensorVal(ivec3 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n else if (index == 2) {\n return tensor[2];\n }\n }\n int getInt2TensorVal(ivec2 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n }\n\n int getInt1TensorVal(int tensor, int index) {\n return tensor;\n }\n\n "+z+"\n \n "+h(c,"densities")+"\n "+h(s,"fixed_sizes")+"\n "+h(D,"sqrt_fixed_ratios")+"\n "+function(e,t){if(1===e.length)return"int "+t+" = int("+e[0]+");";for(var n=e.length,r="\n ivec"+n+" "+t+" = ivec"+n+"(\n ",o=0;o<n;o++)r+=e[o]+",";return r.slice(0,-1)+");"}(H,"density_acc_shape")+"\n \n "+X+"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n int rr = int(oPos.r);\n int gg = int(oPos.g);\n int bb = int(oPos.b);\n int aa = int(oPos.a);\n\n // 输出坐标转换为输入坐标\n int index = rr * "+O[0]+" + gg * "+O[1]+" + bb * "+O[2]+" + aa;\n ivec4 realOutPos = getTensorPosFromArrayIndex_out1(index);\n int h = realOutPos.r;\n int w = realOutPos.g;\n int b = realOutPos.b;\n int a = realOutPos.a;\n ";return 1===A?"\n "+h(a,"variances")+"\n "+q+"\n setOutput(getFloat4TensorVal(variances, aa));\n }":"\n "+q+"\n // 求idx 对应的 s, r, di, dj\n int s = 0;\n int remain = b;\n int curAccIndex = "+Y+";\n\n ivec2 remainInfo = calRemain(remain, curAccIndex, s);\n remain = remainInfo[0];\n s = remainInfo[1];\n int density = int(getFloat"+c.length+"TensorVal(densities, s));\n int r = int(floor(float(remain / density / density)));\n remain -= r * density * density;\n\n float di = floor(float(remain / density));\n float dj = float(remain - int(di) * density);\n\n float center_x = (float(w) + float("+b+")) * float("+F+");\n float center_y = (float(h) + float("+b+")) * float("+M+");\n float fixed_size = getFloat"+s.length+"TensorVal(fixed_sizes, s);\n float shift = float("+I+") / float(density);\n\n float v = 0.0;\n if (a == 0 || a == 2) {\n float box_width_ratio = fixed_size * "+L+";\n float density_center_x = center_x - float("+I+") / 2. + shift / 2.;\n float center_x_temp = density_center_x + dj * shift;\n if (a == 0) {\n v = max((center_x_temp - box_width_ratio / 2.) / float("+T+"), 0.);\n }\n else {\n v = min((center_x_temp + box_width_ratio / 2.) / float("+T+"), 1.);\n }\n }\n else {\n float box_height_ratio = fixed_size / "+L+";\n float density_center_y = center_y - float("+I+") / 2. + shift / 2.;\n float center_y_temp = density_center_y + di * shift;\n if (a == 1) {\n v = max((center_y_temp - box_height_ratio / 2.) / float("+x+"), 0.);\n }\n else {\n v = min((center_y_temp + box_height_ratio / 2.) / float("+x+"), 1.);\n }\n }\n\n "+Q+"\n\n setOutput(v);\n }\n "},textureFuncConf:{image:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]}},be={mainFunc:function(e,t){var n=e.origin,r=e.image,o=e.out,i=t.variances,a=void 0===i?[.1,.1,.2,.2]:i,u=t.flip,c=t.clip,l=t.step_w,f=void 0===l?0:l,v=t.step_h,g=void 0===v?0:v,m=t.offset,y=void 0===m?.5:m,b=t.runtime,w=void 0===b?0:b,A=t.min_sizes,x=void 0===A?[]:A,T=t.max_sizes,P=void 0===T?[]:T,C=t.aspect_ratios,_=void 0===C?[]:C,E=t.min_max_aspect_ratios_order,S=void 0!==E&&E,k=r.height_shape,R=r.width_shape,O=n.height_shape,F=n.width_shape,M=o.channel,I=o.height_shape,D=f,L=g;0!==f&&0!==g||(D=R/F,L=k/O);var j=[1];_.forEach((function(e){1!==e&&(j.push(Math.sqrt(e)),u&&j.push(Math.sqrt(1/e)))}));var B=j.length,N="\n "+d(x,"min_sizes",s.FLOAT_TYPE)+"\n "+d(P,"max_sizes",s.FLOAT_TYPE)+"\n "+d(j,"aspect_ratios",s.FLOAT_TYPE)+"\n ",V=c?"res = min(max(res, 0.), 1.);":"",U="\n float getFloat4TensorVal(vec4 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n else if (index == 2) {\n return tensor[2];\n }\n else if (index == 3) {\n return tensor[3];\n }\n }\n\n \n "+p(x,"min_sizes",s.FLOAT_TYPE)+"\n "+p(P,"max_sizes",s.FLOAT_TYPE)+"\n "+p(j,"aspect_ratios",s.FLOAT_TYPE)+"\n \n\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n int nn = int(oPos.r);\n int cc = int(oPos.g);\n int hh = int(oPos.b);\n int ww = int(oPos.a);\n\n\n "+N+"\n\n ";return 1===w?"\n "+h(a,"variances")+"\n "+U+"\n float res = 0.0;\n res = getFloat4TensorVal(variances, ww);\n setOutput(float(res));\n }":"\n "+U+"\n int idx = nn * "+M*I+" + cc * "+I+" + hh;\n int as_num = "+B+";\n float offset = "+y+";\n \n int feature_width = "+F+";\n int num_priors = "+I+";\n float step_width = float("+D+");\n float step_height = float("+L+");\n\n float im_width = float("+R+");\n float im_height = float("+k+");\n\n bool min_max_aspect_ratios_order = "+S+";\n\n // 求idx 对应的 h w p m\n int h = int(idx / (num_priors * feature_width));\n int w = calMod(idx / num_priors, feature_width);\n int p = calMod(idx, num_priors);\n int m = "+(P.length>0)+" ? int(p / (as_num + 1)) : int(p / as_num);\n float cx = (float(w) + offset) * step_width;\n float cy = (float(h) + offset) * step_height;\n float min_size = getValueFromArrByIndex_min_sizes(min_sizes, m);\n float bw = 0.0;\n float bh = 0.0;\n\n "+(P.length>0?"\n int s = calMod(p, as_num + 1);\n if ("+!S+") {\n if (s < as_num) {\n float ar = getValueFromArrByIndex_aspect_ratios(aspect_ratios, s);\n bw = min_size * ar / 2.0;\n bh = min_size / ar / 2.0;\n }\n else {\n float max_size = getValueFromArrByIndex_max_sizes(max_sizes, m);\n bw = sqrt(min_size * max_size) / 2.0;\n bh = bw;\n }\n }\n else {\n if (s == 0) {\n bh = min_size / 2.0;\n bw = bh;\n }\n else if (s == 1) {\n float max_size = getValueFromArrByIndex_max_sizes(max_sizes, m);\n bw = sqrt(min_size * max_size) / 2.0;\n bh = bw;\n }\n else {\n float ar = getValueFromArrByIndex_aspect_ratios(aspect_ratios, s - 1);\n bw = min_size * sqrt(ar) / 2.0;\n bh = min_size / sqrt(ar) / 2.0;\n }\n }":"\n int s = calMod(p, as_num);\n float ar = getValueFromArrByIndex_aspect_ratios(aspect_ratios, s);\n bw = min_size * ar / 2.0;\n bh = min_size / ar / 2.0;\n ")+"\n float res = 0.0;\n if (ww == 0) {\n res = (cx - bw) / im_width;\n }\n else if (ww == 1) {\n res = (cy - bh) / im_height;\n }\n else if (ww == 2) {\n res = (cx + bw) / im_width;\n }\n else {\n res = (cy + bh) / im_height;\n }\n\n "+V+"\n\n setOutput(float(res));\n }\n "},textureFuncConf:{image:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]},behaviors:[]},we={mainFunc:function(e,t){for(var n=e.out,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["out"]),o=r.origin,i=o.width_shape,a=o.height_shape,s=o.channel,u=o.total_shape,c=o.length_unformatted_shape,l=[u/(i*a*s),s,a,i].slice(4-c),f=Object.keys(r).length,h=t.axis<0?t.axis+l.length+1:t.axis,d=1,p=1,v=0;v<h;v++)d*=l[v];for(v=h;v<l.length;v++)p*=l[v];var g=n.total_shape/d,m="";return m=Array.from(Array(f).keys()).reduce((function(e,t){return e+(0===t?"\n if (i == 0) {\n ivec4 co = getTensorPosFromArrayIndex_origin(j);\n o = getValueFromTensorPos_origin(co.r, co.g, co.b, co.a);\n }":"\n else if (i == "+t+") {\n ivec4 co = getTensorPosFromArrayIndex_origin_"+t+"(j);\n o = getValueFromTensorPos_origin_"+t+"(co.r, co.g, co.b, co.a);\n }")}),m),"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n int sumVal = oPos.a\n + oPos.b * "+n.width_shape+"\n + oPos.g * "+n.height_shape+" * "+n.width_shape+"\n + oPos.r * "+n.channel+" * "+n.width_shape+" * "+n.height_shape+";\n\n int index = calMod(sumVal, "+g+");\n\n int layer = sumVal / "+g+";\n\n int i = index / "+p+";\n int j = calMod(index, "+p+") + layer * "+p+";\n\n float o = 0.0;\n "+m+"\n setOutput(float(o));\n }\n "},textureFuncConf:{"@all":["getValueFromTensorPos","getTensorPosFromArrayIndex"]}},Ae={mainFunc:function(e,t){var n=e.origin,r=t.starts,o=t.axes,i=n.length_unformatted_shape,a=n.width_shape,s=n.height_shape,u=n.channel,c=Array.isArray(o)?o:[o];if(1!==c.length)throw Error("[slice op feature]: axes only support one dim");var l=c[0],f=["(oPos[0])","(oPos[1])","(oPos[2])","(oPos[3])"];return f[l=-1===l?3:4-i+l]="(oPos["+l+"]+ start)","\n void main(void) {\n int start = "+r[0]+";\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n int sumVal = "+f[3]+"\n + "+f[2]+" * "+a+"\n + "+f[1]+" * "+s*a+"\n + "+f[0]+" * "+u*a*s+";\n\n float res = 0.0;\n ivec4 co = getTensorPosFromArrayIndex_origin(sumVal);\n res = getValueFromTensorPos_origin(co.r, co.g, co.b, co.a);\n setOutput(float(res));\n }\n "},textureFuncConf:{origin:["getTensorPosFromArrayIndex","getValueFromTensorPos"]}},xe={arg_max:{mainFunc:function(e,t){var n=e.origin,r=t.axis,o=void 0===r?-1:r,i=t.flatten,a=n.total_shape,s=n.height_shape,u=n.width_shape,c=n.channel,l=n.length_unformatted_shape,f=a/(u*s*c),h=o<0?3:4-l+o,d=[f,c,s,u][h];return"\n\n void main() {\n ivec4 oPos = getOutputTensorPos();\n float o = 0.0;\n int pos = 0;\n if ("+!i+") {\n if ("+h+" == 1) {\n float tmp = getValueFromTensorPos_origin(oPos.g, 0, oPos.b, oPos.a);\n for (int index = 0; index < "+d+"; index++) {\n o = getValueFromTensorPos_origin(oPos.g, index, oPos.b, oPos.a);\n if (o > tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n else if ("+h+" == 2) {\n float tmp = getValueFromTensorPos_origin(oPos.g, oPos.b, 0, oPos.a);\n for (int index = 0; index < "+d+"; index++) {\n o = getValueFromTensorPos_origin(oPos.g, oPos.b, index, oPos.a);\n if (o > tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n else if ("+h+" == 3) {\n float tmp = getValueFromTensorPos_origin(oPos.g, oPos.b, oPos.a, 0);\n for (int index = 0; index < "+d+"; index++) {\n o = getValueFromTensorPos_origin(oPos.g, oPos.b, oPos.a, index);\n if (o > tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n else {\n float tmp = getValueFromTensorPos_origin(0, oPos.g, oPos.b, oPos.a);\n for (int index = 0; index < "+d+"; index++) {\n o = getValueFromTensorPos_origin(index, oPos.g, oPos.b, oPos.a);\n if (o > tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n }\n else {\n int index = 0;\n float tmp = getValueFromTensorPos_origin(0, 0, 0, 0);\n for (int n = 0; n < "+f+"; n++) {\n for (int c = 0; c < "+c+"; c++) {\n for (int h = 0; h < "+s+"; h++) {\n for (int w = 0; w < "+u+"; w++) {\n o = getValueFromTensorPos_origin(n, c, h, w);\n if (o > tmp) {\n tmp = o;\n pos = index;\n }\n index++;\n }\n }\n }\n }\n }\n setOutput(float(pos));\n }"},textureFuncConf:{origin:["getValueFromTensorPos"]}},arg_min:{mainFunc:function(e,t){for(var n=e.origin,r=t.axis,o=void 0===r?-1:r,i=t.flatten,a=n.total_shape,s=n.height_shape,u=n.width_shape,c=n.channel,l=a/(u*s*c),f=[l,c,s,u],h=0,d=0;d<4&&!(f[d]>1);d++)h++;var p=o<0?4-h+o:o,v=f[p=h+p];return"\n void main() {\n ivec4 oPos = getOutputTensorPos();\n float o = 0.0;\n int pos = 0;\n if ("+!i+") {\n if ("+p+" == 1) {\n float tmp = getValueFromTensorPos_origin(oPos.g, 0, oPos.b, oPos.a);\n for (int index = 0; index < "+v+"; index++) {\n o = getValueFromTensorPos_origin(oPos.g, index, oPos.b, oPos.a);\n if (o < tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n else if ("+p+" == 2) {\n float tmp = getValueFromTensorPos_origin(oPos.g, oPos.b, 0, oPos.a);\n for (int index = 0; index < "+v+"; index++) {\n o = getValueFromTensorPos_origin(oPos.g, oPos.b, index, oPos.a);\n if (o < tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n else if ("+p+" == 3) {\n float tmp = getValueFromTensorPos_origin(oPos.g, oPos.b, oPos.a, 0);\n for (int index = 0; index < "+v+"; index++) {\n o = getValueFromTensorPos_origin(oPos.g, oPos.b, oPos.a, index);\n if (o < tmp) {\n tmp = o;\n pos = index;\n }\n } \n }\n else {\n float tmp = getValueFromTensorPos_origin(0, oPos.g, oPos.b, oPos.a);\n for (int index = 0; index < "+v+"; index++) {\n o = getValueFromTensorPos_origin(index, oPos.g, oPos.b, oPos.a);\n if (o < tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n }\n else {\n int index = 0;\n float tmp = getValueFromTensorPos_origin(0, 0, 0, 0);\n for (int n = 0; n < "+l+"; n++) {\n for (int c = 0; c < "+c+"; c++) {\n for (int h = 0; h < "+s+"; h++) {\n for (int w = 0; w < "+u+"; w++) {\n o = getValueFromTensorPos_origin(n, c, h, w);\n if (o < tmp) {\n tmp = o;\n pos = index;\n }\n index++;\n }\n }\n }\n }\n }\n setOutput(float(pos));\n }"},textureFuncConf:{origin:["getValueFromTensorPos"]}},conv2d:J,conv2d_packing:{mainFunc:function(e,t){var n=e.origin,r=e.filter,o=e.out,i=e.bias,a=t.groups,s=void 0===a?1:a,u=t.strides,c=void 0===u?[]:u,l=t.paddings,f=void 0===l?[]:l,h=t.dilations,d=void 0===h?[]:h,p=t.fuse_relu,v=t.act_type,g=t.hard_swish_offset,m=void 0===g?3:g,y=t.hard_swish_scale,b=void 0===y?6:y,w=t.hard_swish_threshold,A=void 0===w?6:w,x=c[0],T=void 0===x?1:x,P=c[1],C=void 0===P?1:P,_=f[0],E=void 0===_?0:_,S=f[1],k=void 0===S?0:S,R=d[0],O=void 0===R?1:R,F=d[1],M=void 0===F?1:F;return"\n void main() {\n ivec4 oPos = getOutputTensorPos();\n int x = oPos.a;\n int c = oPos.g;\n int y = oPos.b;\n int b = oPos.r;\n vec4 res = vec4(0.0, 0.0, 0.0, 0.0);\n\n int oy = y * "+T+" - "+E+";\n for (int fy = 0; fy < "+r.height_shape+"; fy++) {\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n oy += "+O+";\n continue;\n }\n int ox = x * "+C+" - "+k+";\n for (int fx = 0; fx < "+r.width_shape+"; fx++) {\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n ox += "+M+";\n continue;\n }\n // channel计算\n for (int j = 0; j < "+r.channel+"; j += 1) {\n int c0 = (c / ("+o.channel+" * 4 / "+s+")) * "+r.channel+" + j;\n vec4 fValue = getValueFromTensorPosPacking_filter(c * 4, j, fy, fx);\n vec4 oValue = getValueFromTensorPosPacking_origin(b, c0, oy, ox);\n\n for (int packed_index = 0; packed_index < 4; packed_index++) {\n if (packed_index == 0) {\n res.r += dot(fValue, oValue);\n } else if (packed_index == 1) {\n int c1 = ((c + 1) / ("+o.channel+" * 4 / "+s+")) * "+r.channel+" + j;\n oValue = getValueFromTensorPosPacking_origin(b, c1, oy, ox);\n fValue = getValueFromTensorPosPacking_filter(c * 4 + 1, j, fy, fx);\n res.g += dot(fValue, oValue);\n } else if (packed_index == 2) {\n int c2 = ((c + 2) / ("+o.channel+" * 4 / "+s+")) * "+r.channel+" + j;\n oValue = getValueFromTensorPosPacking_origin(b, c2, oy, ox);\n fValue = getValueFromTensorPosPacking_filter(c * 4 + 2, j, fy, fx);\n res.b += dot(fValue, oValue);\n } else if (packed_index == 3) {\n int c3 = ((c + 3) / ("+o.channel+" * 4 / "+s+")) * "+r.channel+" + j;\n oValue = getValueFromTensorPosPacking_origin(b, c3, oy, ox);\n fValue = getValueFromTensorPosPacking_filter(c * 4 + 3, j, fy, fx);\n res.a += dot(fValue, oValue);\n }\n }\n }\n ox += "+M+";\n }\n oy += "+O+";\n }\n\n "+(i?"res += getValueFromTensorPosPacking_bias(0, c, 0, 0);":"")+"\n\n if ("+p+") {\n res = max(vec4(0.0, 0.0, 0.0, 0.0), res);\n }\n else if ("+("relu6"===v)+") {\n res = min(max(vec4(0.0, 0.0, 0.0, 0.0), res), vec4(6.0, 6.0, 6.0, 6.0));\n }\n else if ("+("hard_swish"===v)+") {\n res = res * min(\n max(vec4(0.0, 0.0, 0.0, 0.0), res + vec4("+m+")),\n vec4("+A+")\n ) / vec4("+b+");\n }\n\n setPackedOutput(res);\n }\n "},textureFuncConf:{filter:["getValueFromTensorPosPacking"],origin:["getValueFromTensorPosPacking"],bias:["getValueFromTensorPosPacking"]},behaviors:["adaptPaddings","isApplySeparableConv","batchComputeConv2d","processBias"]},conv2d_transpose:{mainFunc:function(e,t){var n=e.origin,r=e.filter,o=e.out,i=e.bias,a=t.groups,s=void 0===a?1:a,u=t.strides,c=void 0===u?[]:u,l=t.paddings,f=void 0===l?[]:l,h=t.dilations,d=void 0===h?[]:h,p=t.fuse_relu,v=t.act_type,g=c[0],m=void 0===g?1:g,y=c[1],b=void 0===y?1:y,w=f[0],A=void 0===w?0:w,x=f[1],T=void 0===x?0:x;T=r.height_shape-T-1,A=r.width_shape-A-1;var P=d[0],C=void 0===P?1:P,_=d[1],E=void 0===_?1:_;return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n int x = oPos.a;\n int c = oPos.g;\n int y = oPos.b;\n int b = oPos.r;\n float res = 0.0;\n int temp_x = 0;\n int temp_y = 0;\n float o = 0.0;\n float f = 0.0;\n\n // 获取output的坐标\n int oTensorChannel = int(c * "+s+" / "+o.channel+") * "+n.channel+";\n int oy = y - "+T+";\n const int groupLen = int("+n.channel+" / "+s+");\n int groupIndex = int(c / groupLen);\n\n for (int fy = 0; fy < "+r.height_shape+"; fy++) {\n if (oy < 0) {\n oy += "+C+";\n continue;\n }\n int ox = x - "+A+";\n for (int fx = 0; fx < "+r.width_shape+"; fx++) {\n\n if (ox < 0) {\n ox += "+E+";\n continue;\n }\n // channel计算\n for (int j = 0; j < groupLen; j++) {\n int curIndex = j + b * groupLen;\n if (calMod(ox, int("+b+")) == 0 && calMod(oy, int("+m+")) == 0) {\n temp_x = int(floor(float(ox) / float("+b+")));\n temp_y = int(floor(float(oy) / float("+m+")));\n if (temp_x < "+n.width_shape+" && temp_y < "+n.height_shape+") {\n o = getValueFromTensorPos_origin(b, curIndex , temp_y, temp_x);\n f = getValueFromTensorPos_filter(\n curIndex,\n int(c / "+s+"),\n "+r.height_shape+"-1-fy,\n "+r.width_shape+"-1-fx\n );\n res += f * o;\n }\n }\n }\n ox += "+E+";\n }\n oy += "+C+";\n }\n \n "+(i?"res += getValueFromTensorPos_bias(0, 0, 0, c);":"")+"\n \n if ("+p+") {\n res = max(0.0, res);\n }\n else if ("+("relu6"===v)+") {\n res = min(max(0.0, res), 6.0);\n }\n \n setOutput(float(res));\n }\n"},textureFuncConf:{filter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"],bias:["getValueFromTensorPos"]},behaviors:["adaptPaddings","isApplySeparableConv","batchComputeConv2d","processBias"]},depthwise_conv2d:J,conv2d_depthwise:J,conv2d_elementwise_add:{mainFunc:function(e,t){var n=e.origin,r=e.filter,o=e.out,i=e.counter,a=t.active_function,s=t.groups,u=void 0===s?1:s,c=t.axis,l=t.strides,f=void 0===l?[]:l,h=t.paddings,d=void 0===h?[]:h,p=t.dilations,v=void 0===p?[]:p,g=t.multi_value,m=t.bias_value,y=f[0],b=void 0===y?1:y,w=f[1],A=void 0===w?1:w,x=d[0],T=void 0===x?0:x,P=d[1],C=void 0===P?0:P,_=v[0],E=void 0===_?1:_,S=v[1],k=void 0===S?1:S;return"\n // start函数\n\n float getValueFromCounter(int index) {\n float xPos = float(index) / float("+i.width_shape+");\n vec4 pixels = TEXTURE2D(texture_counter, vec2(xPos, 0.5));\n return pixels.r;\n }\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n\n int x = oPos.a;\n int c = oPos.g;\n int y = oPos.b;\n int b = oPos.r;\n int addAxis = oPos["+c+"];\n float res = getValueFromCounter(addAxis);\n\n // 获取output的坐标\n int oTensorChannel = (c / ("+o.channel+" / "+u+")) * "+r.channel+";\n int oy = y * "+b+" - "+T+";\n for (int fy = 0; fy < "+r.height_shape+"; fy++) {\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n oy += "+E+";\n continue;\n }\n int ox = x * "+A+" - "+C+";\n for (int fx = 0; fx < "+r.width_shape+"; fx++) {\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n ox += "+k+";\n continue;\n }\n // channel计算\n for (int j = 0; j < "+r.channel+"; j++) {\n float f = getValueFromTensorPos_filter(c, j, fy, fx);\n float o = getValueFromTensorPos_origin(b, oTensorChannel + j, oy, ox);\n res += f * o;\n }\n ox += "+k+";\n }\n oy += "+E+";\n }\n setOutput("+a+"(res, "+g+", "+m+"));\n }\n"},textureFuncConf:{filter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"],counter:["getValueFromTensorPos"]},behaviors:["mergeAttrs","checkIsMerge","setActiveFunc"]},pool2d:{mainFunc:function(e,t){var n=e.origin,r=t.strides,o=void 0===r?[]:r,i=t.paddings,a=void 0===i?[]:i,s=t.pooling_type,u=t.ksize,c=o[0],l=void 0===c?1:c,f=o[1],h=void 0===f?1:f,d=a[0],p=void 0===d?0:d,v=a[1],g=void 0===v?0:v,m=u[0],y=u[1];return"\n // start函数\n void main(void) {\n float res = 0.0;\n if ("+s+" == 1) {\n res = -1.70141184e38;\n }\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n // X、Y方向的移动步长\n int count_pool = 0;\n int oy_base = out_pos[2] * "+l+" - "+p+";\n int ox_base = out_pos[3] * "+h+" - "+g+";\n for (int fy = 0; fy < "+m+"; fy++) {\n int oy = oy_base + fy;\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n continue;\n }\n for (int fx = 0; fx < "+y+"; fx++) {\n int ox = ox_base + fx;\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n continue;\n }\n // origin数据\n float curr = getValueFromTensorPos_origin(out_pos[0], out_pos[1], oy, ox);\n if ("+s+" == 1) {\n if (curr > res) {\n res = curr;\n }\n } else {\n res += curr;\n // 在平均池化模式忽略填充值(exclusive默认为true)\n count_pool++;\n }\n }\n }\n if ("+s+" != 1) {\n res = res / float(count_pool);\n }\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["isAdaptiveAvg","isMax","setPacked","setAdaptive","isGlobalPooling"]},pool2d_max:{mainFunc:function(e,t){var n=e.origin,r=t.strides,o=void 0===r?[]:r,i=t.paddings,a=void 0===i?[]:i,s=t.ksize,u=t.global_pooling,c=t.runtime,l=o[0],f=void 0===l?1:l,h=o[1],d=void 0===h?1:h,p=a[0],v=void 0===p?0:p,g=a[1],m=void 0===g?0:g,y=s[0],b=s[1],w=function(e){var t=e.total_shape,n=e.channel,r=e.height_shape,o=e.width_shape;return[t/n/r/o,n,r,o]}(n),A="",x="setOutput(float(res));";return 1===c&&!0===u&&(A="\n if (curr > res) {\n index = "+w[2]*w[3]+" * out_pos[1] + "+w[3]+" * oy + ox;\n }\n ",x="setOutput(float(res));"),"\n // start函数\n void main(void) {\n float res = -1.70141184e25;\n int index = 0;\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n int b = out_pos[0];\n int c = out_pos[1];\n int y = out_pos[2];\n int x = out_pos[3];\n // X、Y方向的移动步长\n int oy_base = out_pos[2] * "+f+" - "+v+";\n int ox_base = out_pos[3] * "+d+" - "+m+";\n for (int fy = 0; fy < "+y+"; fy++) {\n int oy = oy_base + fy;\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n continue;\n }\n for (int fx = 0; fx < "+b+"; fx++) {\n int ox = ox_base + fx;\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n continue;\n }\n // origin数据\n float curr = getValueFromTensorPos_origin(out_pos[0], out_pos[1], oy, ox);\n "+A+"\n res = max(res, curr);\n }\n }\n "+x+"\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["isMax","setPacked","setAdaptive","isGlobalPooling"]},pool2d_winograd:{mainFunc:function(e,t){var n=e.origin,r=e.pool,o=t.strides,i=void 0===o?[]:o,a=t.paddings,s=void 0===a?[]:a,u=t.type_pool,c=i[0],l=void 0===c?1:c,f=i[1],h=void 0===f?1:f,d=s[0],p=void 0===d?0:d,v=s[1],g=void 0===v?0:v,m=n.height_shape,y=n.width_texture,b=n.height_texture;return"\n\n float getValueFromTensorPosPacked_origin(int r, int g, int b, int a) {\n int y = b / 2;\n int yOffset = calMod(b, 2);\n int x = a / 2;\n int xOffset = calMod(a, 2);\n int height = "+m+" + "+n.offset_y+";\n vec4 pixels = TEXTURE2D(\n texture_origin,\n vec2((float(x) + 0.5) / float("+y+"),\n (float(g * height / 2 + y) + 0.5) / float("+b+"))\n );\n int index = 0;\n if (xOffset == 0 && yOffset == 0) {\n return pixels[0];\n }\n else if (xOffset == 1 && yOffset == 0) {\n return pixels[1];\n }\n else if (xOffset == 0 && yOffset == 1) {\n return pixels[2];\n }\n return pixels[3];\n }\n\n // start函数\n void main(void) {\n float res = (-1.0 / exp(-20.0));\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n // int b = out_pos[0];\n // int c = out_pos[1];\n // int y = out_pos[2];\n // int x = out_pos[3];\n // X、Y方向的移动步长\n int count_pool = 0;\n int oy_base = out_pos[2] * "+l+" - "+p+";\n int ox_base = out_pos[3] * "+h+" - "+g+";\n\n for (int fy = 0; fy < "+r.height_shape+"; fy++) {\n int oy = oy_base + fy;\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n continue;\n }\n for (int fx = 0; fx < "+r.width_shape+"; fx++) {\n int ox = ox_base + fx;\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n continue;\n }\n // origin数据\n float curr = getValueFromTensorPosPacked_origin(out_pos[0], out_pos[1], oy, ox);\n if ("+u+" == 1) {\n if (curr > res) {\n res = curr;\n }\n } else {\n res += curr;\n // 在平均池化模式忽略填充值(exclusive默认为true)\n count_pool++;\n }\n }\n }\n if ("+u+" != 1) {\n res = res / float(count_pool);\n }\n setOutput(res);\n }\n "},behaviors:["isMax","setPacked","setAdaptive","isGlobalPooling"]},elementwise_add:{mainFunc:function(e,t){var n=t.counterPos,r=t.Scale_y,o=void 0===r?1:r,i=t.Scale_x,a=void 0===i?1:i,s=t.Scale_out,u=void 0===s?1:s;return"\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n\n float c = getValueFromTensorPos_counter("+n+");\n float res = float("+u/o+") * c + float("+u/a+") * o;\n setOutput(float(res));\n }\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]},behaviors:["processElementwiseAxis","genElementwiseCounterPos"]},elementwise_mul:{mainFunc:function(e,t){var n=e.counter,r=t.counterPos,o=t.Scale_y,i=void 0===o?1:o,a=t.Scale_x,s=void 0===a?1:a,u=t.Scale_out,c=void 0===u?1:u;return"\n ivec4 formatNCHW(int n, int c, int h, int w) {\n int newN = n;\n int newC = c;\n int newH = h;\n int newW = w;\n\n if (n >= "+n.height_texture/n.height_shape+") {\n newN = int("+n.height_texture/n.height_shape+");\n }\n if (c >= "+n.channel+") {\n newC = int("+(n.channel-1)+");\n }\n if (h >= "+n.height_shape+") {\n newH = "+(n.height_shape-1)+";\n }\n if (w >= "+n.width_shape+") {\n newW = "+(n.width_shape-1)+";\n }\n return ivec4(newN, newC, newH, newW);\n }\n\n // start函数\n void main() {\n // 输出数据\n ivec4 oPos1 = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos1.r, oPos1.g, oPos1.b, oPos1.a);\n ivec4 oPos = formatNCHW(oPos1.r, oPos1.g, oPos1.b, oPos1.a);\n\n float c = getValueFromTensorPos_counter("+r+");\n float res = float("+c/s+") * o * float("+1/i+") * c;\n setOutput(float(res));\n }\n\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]},behaviors:["processElementwiseAxis","genElementwiseCounterPos"]},elementwise_div:{mainFunc:function(e,t){var n=e.counter,r=t.counterPos,o=t.Scale_y,i=void 0===o?1:o,a=t.Scale_x,s=void 0===a?1:a,u=t.Scale_out,c=void 0===u?1:u;return"\n ivec4 formatNCHW(int n, int c, int h, int w) {\n int newN = n;\n int newC = c;\n int newH = h;\n int newW = w;\n\n if (n >= "+n.height_texture/n.height_shape+") {\n newN = int("+n.height_texture/n.height_shape+");\n }\n if (c >= "+n.channel+") {\n newC = int("+(n.channel-1)+");\n }\n if (h >= "+n.height_shape+") {\n newH = "+(n.height_shape-1)+";\n }\n if (w >= "+n.width_shape+") {\n newW = "+(n.width_shape-1)+";\n }\n return ivec4(newN, newC, newH, newW);\n }\n\n // start函数\n void main() {\n // 输出数据\n ivec4 oPos1 = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos1.r, oPos1.g, oPos1.b, oPos1.a);\n ivec4 oPos = formatNCHW(oPos1.r, oPos1.g, oPos1.b, oPos1.a);\n\n float c = getValueFromTensorPos_counter("+r+");\n float res = float("+c+") * (float("+1/s+") * o / (float("+1/i+") * c));\n setOutput(float(res));\n }\n\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]},behaviors:["processElementwiseAxis","genElementwiseCounterPos"]},elementwise_pow:{mainFunc:function(e,t){var n=t.counterPos,r=t.Scale_y,o=void 0===r?1:r,i=t.Scale_x,a=void 0===i?1:i,s=t.Scale_out,u=void 0===s?1:s;return"\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n\n float c = getValueFromTensorPos_counter("+n+");\n float res = pow(float("+u/a+") * o, float("+u/o+") * c);\n setOutput(float(res));\n }\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]},behaviors:["processElementwiseAxis","genElementwiseCounterPos"]},elementwise_sub:{mainFunc:function(e,t){var n=t.counterPos,r=t.Scale_y,o=void 0===r?1:r,i=t.Scale_x,a=void 0===i?1:i,s=t.Scale_out,u=void 0===s?1:s;return"\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n\n float c = getValueFromTensorPos_counter("+n+");\n float res = float("+u/a+") * o - float("+u/o+") * c;\n setOutput(float(res));\n }\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]},behaviors:["processElementwiseAxis","genElementwiseCounterPos"]},mul:{mainFunc:function(e,t){var n=e.origin,r=e.counter,o=t.x_num_col_dims,i=t.y_num_col_dims,a=te(n),s=te(r),u=Z(a,o),c=u[0],l=u[1],f=u[2],h=u[3],d=u[4],p=Z(s,i),v=p[0],g=p[1],m=p[2],y=p[3];return"\n "+$("x1",c,l)+"\n "+$("x2",f,h)+"\n "+$("y1",v,g)+"\n "+$("y2",m,y)+"\n\n // start函数\n void main(void) {\n float res = 0.0;\n // 获取output的坐标\n ivec4 opos = getOutputTensorPos();\n float temp = 0.0;\n\n // output is 2D\n int b = opos.b;\n int a = opos.a;\n\n "+ee(l)+" x1 = getTensorPosFromArrayIndex_x1(b);\n "+ee(y)+" y2 = getTensorPosFromArrayIndex_y2(a);\n\n for (int j = 0; j < "+d[1]+"; j++) {\n "+ee(h)+" x2 = getTensorPosFromArrayIndex_x2(j);\n "+ee(g)+" y1 = getTensorPosFromArrayIndex_y1(j);\n\n ivec4 xPos = ivec4("+ee(l)+"(x1), "+ee(h)+"(x2));\n ivec4 yPos = ivec4("+ee(g)+"(y1), "+ee(y)+"(y2));\n\n float o = getValueFromTensorPos_origin(xPos.r, xPos.g, xPos.b, xPos.a);\n float c = getValueFromTensorPos_counter(yPos.r, yPos.g, yPos.b, yPos.a);\n res += c * o;\n }\n\n setOutput(res);\n }\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]}},matmul:ne,matmul_v2:ne,fc:{mainFunc:function(e,t){var n=e.origin,r=e.weight,o=t.x_num_col_dims,i=t.y_num_col_dims,a=t.activation_type,s=ae(n),u=ae(r),c=re(s,o),l=c[0],f=c[1],h=c[2],d=c[3],p=c[4],v=re(u,i),g=v[0],m=v[1],y=v[2],b=v[3];return"\n "+oe("x1",l,f)+"\n "+oe("x2",h,d)+"\n "+oe("y1",g,m)+"\n "+oe("y2",y,b)+"\n\n // start函数\n void main(void) {\n float res = 0.0;\n // 获取output的坐标\n ivec4 opos = getOutputTensorPos();\n float bias = getValueFromTensorPos_bias(opos.r, opos.g, opos.b, opos.a);\n float temp = 0.0;\n\n // output is 2D\n int b = opos.b;\n int a = opos.a;\n\n "+ie(f)+" x1 = getTensorPosFromArrayIndex_x1(b);\n "+ie(b)+" y2 = getTensorPosFromArrayIndex_y2(a);\n\n for (int j = 0; j < "+p[1]+"; j++) {\n "+ie(d)+" x2 = getTensorPosFromArrayIndex_x2(j);\n "+ie(m)+" y1 = getTensorPosFromArrayIndex_y1(j);\n\n ivec4 xPos = ivec4("+ie(f)+"(x1), "+ie(d)+"(x2));\n ivec4 yPos = ivec4("+ie(m)+"(y1), "+ie(b)+"(y2));\n\n float o = getValueFromTensorPos_origin(xPos.r, xPos.g, xPos.b, xPos.a);\n float c = getValueFromTensorPos_weight(yPos.r, yPos.g, yPos.b, yPos.a);\n res += c * o;\n }\n\n res = res + bias;\n\n if ("+("relu"===a)+") {\n res = max(0.0, res);\n }\n setOutput(res);\n }\n "},textureFuncConf:{weight:["getValueFromTensorPos"],origin:["getValueFromTensorPos"],bias:["getValueFromTensorPos"]}},dropout:{mainFunc:function(e,t){return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n if ("+("downgrade_in_infer"===t.dropout_implementation)+") {\n o = o * (1.0 - float("+t.dropout_prob+"));\n }\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},concat:{mainFunc:function(e,t){var n=t.dim,r=Object.keys(e).filter((function(e){return"out"!==e})).map((function(t){return e[t]})).map((function(e){var t=e.width_shape,r=e.height_shape,o=e.channel;return[e.total_shape/(t*r*o),o,r,t][n]})),o=r.map((function(e,t){return r.slice(0,t+1).reduce((function(e,t){return e+t}),0)})),i="";return o.forEach((function(e,t){i+=0===t?"\n if (oPos["+n+"] < "+e+") {\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n }\n ":"\n else if (oPos["+n+"] < "+e+") {\n oPos["+n+"] = oPos["+n+"] - "+o[t-1]+";\n o = getValueFromTensorPos_origin_"+t+"(oPos.r, oPos.g, oPos.b, oPos.a);\n }\n "})),"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n "+i+"\n setOutput(float(o));\n }\n "},textureFuncConf:{"@all":["getValueFromTensorPos"]},behaviors:["normalizeDim"]},concat_mul:{mainFunc:function(e,t){var n=t.dim,r=Object.keys(e).filter((function(e){return"out"!==e})).map((function(t){return e[t]})).map((function(e){var t=e.width_shape,r=e.height_shape,o=e.channel;return[e.total_shape/(t*r*o),o,r,t][n]})),o=r.map((function(e,t){return r.slice(0,t+1).reduce((function(e,t){return e+t}),0)})),i="";return o.forEach((function(e,t){i+=0===t?"\n if (oPos["+n+"] < "+e+") {\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n }":"\n else if (oPos["+n+"] < "+e+") {\n oPos["+n+"] = oPos["+n+"] - "+o[t-1]+";\n o = getValueFromTensorPos_origin_"+t+"(oPos.r, oPos.g, oPos.b, oPos.a);\n }\n "})),"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n "+i+"\n setOutput(float(o));\n }\n "},textureFuncConf:{"@all":["getValueFromTensorPos"]},behaviors:["normalizeDim"]},split:{mainFunc:function(e,t){var n=t.target_length,r=t.num,o=t.dim,i=t.sections;return"\n // start函数\n void main(void) {\n int length = int("+(i&&i.length>1?i[0]:n/r)+");\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n oPos["+o+"] = oPos["+o+"] + layer_run_time * length;\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["normalizeDim"]},softmax:{mainFunc:function(e,t){var n=e.origin,r=t.axis,o=n.length_unformatted_shape,i=!r||r<0?(r||-1)+4:r+o;return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n const int n = int("+n.total_shape+"/"+n.channel+"/"+n.height_shape+"/"+n.width_shape+");\n float o = getValueFromTensorPos_origin(oPos[0], oPos[1], oPos[2], oPos[3]);\n // 输出坐标转换为输入坐标\n float total = 0.0;\n float res = 0.0;\n if ("+i+" == 0) {\n for (int i = 0; i < n; i++){\n float temp = getValueFromTensorPos_origin(i, oPos[1], oPos[2], oPos[3]);\n total += exp(temp);\n }\n res = exp(o) / total;\n }\n else if ("+i+" == 1) {\n for (int i = 0; i < "+n.channel+"; i++){\n float temp = getValueFromTensorPos_origin(oPos[0], i, oPos[2], oPos[3]);\n total += exp(temp);\n }\n res = exp(o) / total;\n }\n else {\n for (int i = 0; i < "+n.width_shape+"; i++){\n float temp = getValueFromTensorPos_origin(oPos[0], oPos[1], oPos[2], i);\n total += exp(temp);\n }\n res = exp(o) / total;\n }\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},batchnorm:{mainFunc:function(e,t){var n=e.bias,r=e.scale,o=e.mean,i=e.variance,a=e.origin,s=t.epsilon,u="oPos["+(4-a.length_unformatted_shape+1)+"]";return"\n // start函数\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n\n // 归一化数据\n vec4 scale = getPixelsFromTexturePos_scale(\n vec2(float("+u+") / float("+r.width_texture+") + 0.00001, 0.0));\n vec4 bias = getPixelsFromTexturePos_bias(\n vec2(float("+u+") / float("+n.width_texture+") + 0.00001, 0.0));\n vec4 mean = getPixelsFromTexturePos_mean(\n vec2((float("+u+")) / float("+o.width_texture+") + 0.00001, 0.0));\n vec4 variance = getPixelsFromTexturePos_variance(\n vec2((float("+u+")) / float("+i.width_texture+") + 0.00001,\n 0.0)\n );\n\n float x = (o - mean[0]) / sqrt(variance[0] + "+s+");\n float res = scale[0] * x + bias[0];\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],scale:["getPixelsFromTexturePos"],bias:["getPixelsFromTexturePos"],mean:["getPixelsFromTexturePos"],variance:["getPixelsFromTexturePos"]}},reshape:se,reshape2:se,bilinear_interp:ue,linear_interp:le,transpose2:{mainFunc:function(e,t){var n=t.perm_arr,r=t.perm_size,o=n[0],i=n[1],a=n[2];return"\n // start函数\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n\n // 转置 坐标变换\n float o = 0.0;\n if ("+r+" == 1) {\n o = getValueFromTensorPos_origin(oPos[0], oPos[1], oPos[2], oPos[3]);\n }\n else if ("+r+" == 2) {\n o = getValueFromTensorPos_origin(\n oPos[0], oPos[1],\n oPos[(2 + "+o+") > 3 ? 3 : (2 + "+o+")],\n oPos[(2 + "+i+") > 3 ? 3 : (2 + "+i+")]\n );\n }\n else if ("+r+" == 3) {\n o = getValueFromTensorPos_origin(\n oPos[0],\n oPos[(1 + "+o+") > 3 ? 3 : (1 + "+o+")],\n oPos[(1 + "+i+") > 3 ? 3 : (1 + "+i+")],\n oPos[(1 + "+a+") > 3 ? 3 : (1 + "+a+")]\n );\n }\n else if ("+r+" == 4) {\n o = getValueFromTensorPos_origin(\n oPos["+o+"],\n oPos["+i+"],\n oPos["+a+"],\n oPos["+n[3]+"]\n );\n }\n\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["normalizePerm"]},unpacked_2_packed:{mainFunc:function(e,t){return"\n // start函数\n void main() {\n ivec4 oPos = getOutputTensorPos();\n vec4 out4;\n for (int i = 0; i < 4; i++) {\n vec4 o = getValueFromTensorPosPacking_origin(oPos[0], oPos[1] * 4 + i, oPos[2], oPos[3]);\n out4[i] = o[0];\n }\n setPackedOutput(out4);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPosPacking"]}},packed_2_unpacked:{mainFunc:function(e,t){return"\n // start函数\n void main() {\n ivec4 oPos = getOutputTensorPos();\n float res = 0.0;\n int c1 = calMod(oPos[1], 4);\n vec4 o = getValueFromTensorPosPacking_origin(oPos[0], oPos[1] / 4, oPos[2], oPos[3]);\n\n if (c1 == 0) {\n res = o.r;\n } else if (c1 == 1) {\n res = o.g;\n } else if (c1 == 2) {\n res = o.b;\n } else if (c1 == 3) {\n res = o.a;\n }\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPosPacking"]}},unsqueeze2:{mainFunc:function(e,t){for(var n=e.out,r=t.axes,o=n.length_unformatted_shape,i=(Array.isArray(r)?r:[r]).map((function(e){return-1===e?3:e})),a=[0,1,2,3].slice(4-o),s=0,u=i;s<u.length;s++){var c=u[s];a.splice(c,1)}for(var l=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(Array.from(new Array(4-a.length),(function(){return-1})),a),f=[],h=0,d=l.length;h<d;h++){var p=l[h],v=-1===p?"0":"oPos["+p+"]";f.push(v)}return"\n void main() {\n ivec4 oPos = getOutputTensorPos();\n float o = 0.0;\n o = getValueFromTensorPos_origin("+f.join(",")+");\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},flatten_contiguous_range:{mainFunc:function(e,t){var n=e.origin,r=e.out;return"\n void main() {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n int sumVal = oPos.a\n + oPos.b * "+r.width_shape+"\n + oPos.g * "+r.height_shape+" * "+r.width_shape+"\n + oPos.r * "+r.channel+" * "+r.width_shape+" * "+r.height_shape+";\n ivec4 new_oPos = transferFromNHWCtoNCHW(\n sumVal,\n "+n.channel+",\n "+n.width_shape+",\n "+n.height_shape+",\n "+n.total_shape+"\n );\n float o = getValueFromTensorPos_origin(new_oPos.r, new_oPos.g, new_oPos.b, new_oPos.a);\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},commonFuncConf:["transferFromNHWCtoNCHW"]},flatten2:se,greater_than:{mainFunc:function(e,t){return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float x = getValueFromTensorPos_input(oPos.r, oPos.g, oPos.b, oPos.a);\n float y = getValueFromTensorPos_counter(oPos.r, oPos.g, oPos.b, oPos.a);\n\n setOutput(bool(x >= y));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],counter:["getValueFromTensorPos"]}},reduce_sum:{mainFunc:function(e,t){return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n for (int i = 0; i < "+t.inputs_dim+"; i++) {\n oPos["+t.dim+"] = i;\n o += getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);;\n }\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["normalizeDim"]},reduce_mean:{mainFunc:function(e,t){var n=t.inputs_dim;return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n for (int i = 0; i < "+n+"; i++) {\n oPos["+t.dim+"] = i;\n o += getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n }\n o = o / float("+n+");\n setOutput(o);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["normalizeDim"]},reduce_max:{mainFunc:function(e,t){return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n for (int i = 0; i < "+t.inputs_dim+"; i++) {\n oPos["+t.dim+"] = i;\n o = max(o, getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a));\n }\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["normalizeDim"]},where:{mainFunc:function(e,t){return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float x = getValueFromTensorPos_input(oPos.r, oPos.g, oPos.b, oPos.a);\n float y = getValueFromTensorPos_counter(oPos.r, oPos.g, oPos.b, oPos.a);\n float condition = getValueFromTensorPos_condition(oPos.r, oPos.g, oPos.b, oPos.a);\n float o = 0.0;\n\n if (bool(condition)) {\n o = x;\n }\n else {\n o = y;\n }\n setOutput(o);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],counter:["getValueFromTensorPos"],condition:["getValueFromTensorPos"]}},connect:{mainFunc:function(e,t){var n=e.out,r=n.total_shape,o=n.width_shape,i=n.height_shape,a=n.channel,s=f([r/(o*i*a),a,i,o]),u=Object.keys(e).filter((function(e){return"out"!==e})).map((function(t){return e[t].total_shape})),c=u.map((function(e,t){return u.slice(0,t+1).reduce((function(e,t){return e+t}),0)})),l="";return c.forEach((function(e,t){l+=0===t?"\n if (sumVal < "+e+") {\n co = getTensorPosFromArrayIndex_origin(sumVal);\n o = getValueFromTensorPos_origin(co.r, co.g, co.b, co.a);\n }":"\n else if (sumVal < "+e+") {\n co = getTensorPosFromArrayIndex_origin_"+t+"(sumVal - "+c[t-1]+");\n o = getValueFromTensorPos_origin_"+t+"(co.r, co.g, co.b, co.a);\n }\n "})),"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n float o = 0.0;\n ivec4 co;\n int sumVal = oPos.b * "+s[2]+" + oPos.a;\n "+l+"\n setOutput(float(o));\n }\n "},textureFuncConf:{"@all":["getValueFromTensorPos","getTensorPosFromArrayIndex"]}},hard_swish:{mainFunc:function(e,t){var n=t.offset,r=void 0===n?3:n,o=t.scale,i=void 0===o?6:o,a=t.threshold;return"\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n float res = o * min(max(0.0, o + float("+r+")), float("+(void 0===a?6:a)+")) / float("+i+");\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},nearest_interp:ge,nearest_interp_v2:ge,cast:{mainFunc:function(e,t){var n="";switch(t.out_dtype){case 0:n="\n float res_bool = 0.0;\n if (o != 0.0) {\n res_bool = 1.0;\n }\n setOutput(res_bool);";break;case 1:case 2:case 3:n="\n int res_int = int(o);\n setOutput(float(res_int));";break;default:n=" \n float res_float = o;\n setOutput(res_float);"}return"\n void main() {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n "+n+"\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},fill_constant_batch_size_like:{mainFunc:function(e,t){return"\n // start函数\n void main(void) {\n float res = float("+t.value+");\n setOutput(res);\n }\n"}},rnn_matmul:{mainFunc:function(e,t){var n=e.weightlist_0,r=t.input_axis,o=t.state_axis,i=t.batch,a=t.reverse,s=void 0!==a&&a?i-r-1:r;return"\n void main() {\n float res = 0.0;\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n \n if ("+(0===r)+") {\n res = getValueFromTensorPos_origin(out_pos[0], "+s+", out_pos[2], out_pos[3]);\n setOutput(res);\n return;\n }\n \n ivec4 origin_pos = out_pos;\n ivec4 weight_pos = out_pos;\n\n weight_pos[1] = 0;\n weight_pos[2] = weight_pos[3];\n\n float o = 0.0;\n float w_hh = 0.0;\n float prestate_h = 0.0;\n res = getValueFromTensorPos_origin(out_pos[0], "+s+", out_pos[2], out_pos[3]);\n for (int j = 0; j < "+n.width_shape+"; j++) {\n prestate_h = getValueFromTensorPos_prestate(origin_pos[0], origin_pos[1], origin_pos[2], j);\n w_hh = getValueFromTensorPos_weightlist_0(out_pos[0], "+o+", out_pos[3], j);\n o += w_hh * prestate_h;\n }\n res += o;\n\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],prestate:["getValueFromTensorPos"],weightlist_0:["getValueFromTensorPos"]}},rnn_hidden:{mainFunc:function(e,t){var n=t.state_axis,r=t.hidden_size;return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n float origin = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n float cell = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a + "+r+");\n float appender = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a + "+2*r+");\n float fourth = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a + "+3*r+");\n float counter = getValueFromTensorPos_counter(oPos.r, "+n+", oPos.b, oPos.a);\n float i = 1.0 / (1.0 + exp(-origin));\n float f = 1.0 / (1.0 + exp(-cell));\n float o = 1.0 / (1.0 + exp(-fourth));\n float c = f * counter + i * tanh_calc(appender);\n float h = o * tanh_calc(c);\n \n setOutput(h);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],counter:["getValueFromTensorPos"]}},rnn_cell:{mainFunc:function(e,t){var n=t.state_axis,r=t.hidden_size;return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n float origin = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n float cell = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a + "+r+");\n float appender = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a + "+2*r+");\n float fourth = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a + "+3*r+");\n float counter = getValueFromTensorPos_counter(oPos.r, "+n+", oPos.b, oPos.a);\n float i = 1.0 / (1.0 + exp(-origin));\n float f = 1.0 / (1.0 + exp(-cell));\n float c = f * counter + i * tanh_calc(appender);\n \n setOutput(c);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],counter:["getValueFromTensorPos"]}},rnn_origin:{mainFunc:function(e,t){var n=e.weightlist_0,r=e.weightlist_1,o=t.state_axis;return"\n void main() {\n float res = 0.0;\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n ivec4 origin_pos = out_pos;\n ivec4 weight_pos = out_pos;\n \n weight_pos[1] = 0;\n weight_pos[2] = weight_pos[3];\n\n float b_ih = getValueFromTensorPos_weightlist_2(0, 0, 0, out_pos[3]);\n float b_hh = getValueFromTensorPos_weightlist_3(0, 0, 0, out_pos[3]);\n \n for (int j = 0; j < "+n.width_shape+"; j++) {\n float o = getValueFromTensorPos_origin(origin_pos[0], origin_pos[1], 0, j);\n float w_ih = getValueFromTensorPos_weightlist_0(0, 0, out_pos[3], j);\n res += w_ih * o;\n }\n res += b_ih;\n\n for (int j = 0; j < "+r.width_shape+"; j++) {\n float prestate = getValueFromTensorPos_prestate(0, 0, 0, j);\n float w_hh = getValueFromTensorPos_weightlist_1(0, "+o+", out_pos[3], j);\n res += w_hh * prestate;\n }\n res += b_hh;\n \n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],prestate:["getValueFromTensorPos"],weightlist_0:["getValueFromTensorPos"],weightlist_1:["getValueFromTensorPos"],weightlist_2:["getValueFromTensorPos"],weightlist_3:["getValueFromTensorPos"]}},pool2d_avg:{mainFunc:function(e,t){var n=e.origin,r=t.strides,o=void 0===r?[]:r,i=t.paddings,a=void 0===i?[]:i,s=t.ksize,u=o[0],c=void 0===u?1:u,l=o[1],f=void 0===l?1:l,h=a[0],d=void 0===h?0:h,p=a[1],v=void 0===p?0:p,g=s[0],m=s[1];return"\n // start函数\n void main(void) {\n float res = 0.0;\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n // X、Y方向的移动步长\n int oy_base = out_pos[2] * "+c+" - "+d+";\n int ox_base = out_pos[3] * "+f+" - "+v+";\n for (int fy = 0; fy < "+g+"; fy++) {\n int oy = oy_base + fy;\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n continue;\n }\n for (int fx = 0; fx < "+m+"; fx++) {\n int ox = ox_base + fx;\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n continue;\n }\n // origin数据\n float curr = getValueFromTensorPos_origin(out_pos[0], out_pos[1], oy, ox);\n res += curr;\n // 在平均池化模式忽略填充值(exclusive默认为true)\n }\n }\n res = res / float("+g+" * "+m+");\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["setPacked","setAdaptive","isGlobalPooling"]},pool2d_avg_adaptive:{mainFunc:function(e,t){var n=e.origin,r=t.strides,o=void 0===r?[]:r,i=t.paddings,a=void 0===i?[]:i,s=t.ksize,u=o[0],c=void 0===u?1:u,l=o[1],f=void 0===l?1:l,h=a[0],d=void 0===h?0:h,p=a[1],v=void 0===p?0:p,g=s[0],m=s[1],y=n.height_shape,b=n.width_shape;return"\n // start函数\n void main(void) {\n float res = 0.0;\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n int i = out_pos[2] * "+c+" - "+d+";\n int j = out_pos[3] * "+f+" - "+v+";\n int hstart = int(floor(float(i) * float("+y+") / float("+g+")));\n int hend = int(ceil(float(i + 1) * float("+y+") / float("+g+")));\n int wstart = int(floor(float(j) * float("+b+") / float("+m+")));\n int wend = int(ceil(float(j + 1) * float("+b+") / float("+m+")));\n for (int fy = hstart; fy < hend; fy++) {\n for (int fx = wstart; fx < wend; fx++) {\n float curr = getValueFromTensorPos_origin(out_pos[0], out_pos[1], fy, fx);\n res += curr;\n }\n }\n int count_pool = (hend - hstart) * (wend - wstart);\n res = res / float(count_pool);\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:[]},prelu:pe("prelu"),relu6:pe("relu6"),leakyRelu:pe("leakyRelu"),scale:pe("scale"),sigmoid:pe("sigmoid"),relu:pe("relu"),hard_sigmoid:pe("hard_sigmoid"),pow:pe("pow"),sqrt:pe("sqrt"),tanh:pe("tanh"),exp:pe("exp"),abs:pe("abs"),squeeze2:ve,pad3d:{mainFunc:function(e,t){var n=e.origin,r=t.paddings,o=t.mode,i=t.value,a=function(e){var t=e.total_shape,n=e.channel,r=e.height_shape,o=e.width_shape;return[t/n/r/o,n,r,o]}(n),s={reflect:"\n int a;\n int b;\n if (oPos.a - "+r[0]+" < 0) {\n a = "+r[0]+" - oPos.a;\n }\n else if (oPos.a - "+r[0]+" >= "+a[3]+") {\n a = "+a[3]+" - (oPos.a - "+r[0]+" - "+a[3]+" + 1) - 1;\n }\n else {\n a = oPos.a - "+r[0]+";\n }\n if (oPos.b - "+r[2]+" < 0) {\n b = "+r[2]+" - oPos.b;\n }\n else if (oPos.b - "+r[2]+" >= "+a[2]+") {\n b = "+a[2]+" - (oPos.b - "+r[2]+" - "+a[2]+" + 1) - 1;\n }\n else {\n b = oPos.b - "+r[2]+";\n }\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, b, a);\n ",replicate:"\n int a;\n int b;\n if (oPos.a - "+r[0]+" < 0) {\n a = 0;\n }\n else if (oPos.a - "+r[0]+" >= "+a[3]+") {\n a = "+a[3]+" - 1;\n }\n else {\n a = oPos.a - "+r[0]+";\n }\n if (oPos.b - "+r[2]+" < 0) {\n b = 0;\n }\n else if (oPos.b - "+r[2]+" >= "+a[2]+") {\n b = "+a[2]+" - 1;\n }\n else {\n b = oPos.b - "+r[2]+";\n }\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, b, a);\n ",circular:"\n int a;\n int b;\n if (oPos.a - "+r[0]+" < 0) {\n a = int(mod(float("+r[0]+" + oPos.a - 1), float("+a[3]+")));\n }\n else if (oPos.a - "+r[0]+" >= "+a[3]+") {\n a = int(mod(float(oPos.a - "+r[0]+" - "+a[3]+"), float("+a[3]+")));\n }\n else {\n a = oPos.a - "+r[0]+";\n }\n if (oPos.b - "+r[2]+" < 0) {\n b = int(mod(float("+r[2]+" + oPos.b - 1), float("+a[2]+")));\n }\n else if (oPos.b - "+r[2]+" >= "+a[2]+") {\n b = int(mod(float(oPos.b - "+r[2]+" - "+a[2]+"), float("+a[2]+")));\n }\n else {\n b = oPos.b - "+r[2]+";\n }\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, b, a);\n ",constant:"",undefined:""};return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n float o = "+(i||"0.0")+";\n if (oPos.a - "+r[0]+" >= 0\n && oPos.b - "+r[2]+" >= 0\n && oPos.a - "+r[0]+" < "+a[3]+"\n && oPos.b - "+r[2]+" < "+a[2]+"\n ) {\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b - "+r[2]+", oPos.a - "+r[0]+");\n }\n else {\n "+s[o]+"\n }\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},bilinear_interp_v2:ce,linear_interp_v2:fe,shuffle_channel:{mainFunc:function(e,t){var n=e.out,r=t.group,o=void 0===r?2:r,i=n.total_shape,a=n.height_shape,s=n.width_shape,u=n.channel,c=[1,0,2,3];return"\n // start函数\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = 0.0;\n\n int sumVal = oPos.a\n + oPos.b * "+s+"\n + oPos.g * "+a+" * "+s+"\n + oPos.r * "+u+" * "+s+" * "+a+";\n\n ivec4 transpose_out_pos = transferFromNHWCtoNCHW(\n sumVal,\n "+o+",\n "+s+",\n "+a+",\n "+i+"\n );\n\n ivec4 transpose_in_pos = ivec4(transpose_out_pos["+c[0]+"],\n transpose_out_pos["+c[1]+"], transpose_out_pos["+c[2]+"], transpose_out_pos["+c[3]+"]);\n int sumVal2 = transpose_in_pos.a\n + transpose_in_pos.b * "+s+"\n + transpose_in_pos.g * "+a+" * "+s+"\n + transpose_in_pos.r * "+u/o+" * "+s+" * "+a+";\n ivec4 origin_oPos = transferFromNHWCtoNCHW(\n sumVal2,\n "+u+",\n "+s+",\n "+a+",\n "+i+"\n );\n\n\n o = getValueFromTensorPos_origin(\n origin_oPos[0],\n origin_oPos[1],\n origin_oPos[2],\n origin_oPos[3]\n );\n\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},commonFuncConf:["transferFromNHWCtoNCHW"]},pack_out:{mainFunc:function(e,t){return"\n\n // start函数\n void main() {\n ivec4 oPos = getOutputTensorPos();\n vec2 outCoord = vCoord.xy * _2d_shape_texture_out;\n int index = int(outCoord.x) + int(outCoord.y) * int("+e.out.width_texture+");\n\n int first = index * 4;\n int sec = index * 4 + 1;\n int third = index * 4 + 2;\n int fourth = index * 4 + 3;\n\n ivec4 rPos = getTensorPosFromArrayIndex_origin(first);\n ivec4 gPos = getTensorPosFromArrayIndex_origin(sec);\n ivec4 bPos = getTensorPosFromArrayIndex_origin(third);\n ivec4 aPos = getTensorPosFromArrayIndex_origin(fourth);\n\n float r = getValueFromTensorPos_origin(rPos.r, rPos.g, rPos.b, rPos.a);\n float g = getValueFromTensorPos_origin(gPos.r, gPos.g, gPos.b, gPos.a);\n float b = getValueFromTensorPos_origin(bPos.r, bPos.g, bPos.b, bPos.a);\n float a = getValueFromTensorPos_origin(aPos.r, aPos.g, aPos.b, aPos.a);\n\n setPackedOutput(vec4(r, g, b, a));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos","getTensorPosFromArrayIndex"]}},nhwc_2_nchw:{mainFunc:function(e,t){var n=e.origin,r=e.out;return"\n void main() {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n int sumVal = oPos.a * "+r.channel+"\n + oPos.b * "+r.width_shape+" * "+r.channel+"\n + oPos.g\n + oPos.r * "+r.channel+" * "+r.width_shape+" * "+r.height_shape+";\n ivec4 new_oPos = transferFromNHWCtoNCHW(\n sumVal,\n "+n.channel+",\n "+n.width_shape+",\n "+n.height_shape+",\n "+n.total_shape+"\n );\n float o = getValueFromTensorPos_origin(new_oPos.r, new_oPos.g, new_oPos.b, new_oPos.a);\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},commonFuncConf:["transferFromNHWCtoNCHW"]},feedPost:{mainFunc:function(e,t){var n=e.out,r=t.mean,o=void 0===r?[0,0,0]:r,i=t.std,a=void 0===i?[1,1,1]:i,s=n.total_shape,u=n.height_shape,c=n.width_shape,l=n.channel;return"\n // start函数\n void main(void) {\n ivec4 nhwcPos = getOutputTensorPos();\n int sumVal = nhwcPos.a\n + nhwcPos.b * "+c+"\n + nhwcPos.g * "+u+" * "+c+"\n + nhwcPos.r * "+l+" * "+c+" * "+u+";\n\n ivec4 oPos = transferFromNHWCtoNCHW(\n sumVal,\n "+l+",\n "+c+",\n "+u+",\n "+s+"\n );\n float res = 0.0;\n int c1 = int(mod(float(oPos[1]), 4.0));\n int c = oPos[1];\n vec4 o = getValueFromTensorPosPacking_origin(oPos[0], c / 4, oPos[2], oPos[3]);\n\n if (c1 == 0) {\n res = o.r;\n } else if (c1 == 1) {\n res = o.g;\n } else if (c1 == 2) {\n res = o.b;\n } else if (c1 == 3) {\n res = o.a;\n }\n\n if (c == 0) {\n res = (res - float("+o[0]+")) / float("+a[0]+");\n } else if (c == 1) {\n res = (res - float("+o[1]+")) / float("+a[1]+");\n } else if (c == 2) {\n res = (res - float("+o[2]+")) / float("+a[2]+");\n }\n setOutput(float(res));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPosPacking"]},commonFuncConf:["transferFromNHWCtoNCHW"]},imgFeed:{mainFunc:function(){return"\n uniform vec2 u_scale;\n uniform int u_keep_ratio;\n\n void main(void) {\n vec2 outCoord = vCoord.xy;\n // 支持模型不按比例拉伸\n if (u_keep_ratio == 0) {\n vec4 origin = TEXTURE2D(texture_origin, outCoord);\n setPackedOutput(origin);\n return;\n }\n float startX = (1.0 - u_scale.x) / 2.0;\n float endX = startX + u_scale.x;\n float startY = (1.0 - u_scale.y) / 2.0;\n float endY = startY + u_scale.y;\n\n if (outCoord.x >= startX && outCoord.x <= endX && outCoord.y >= startY && outCoord.y <= endY) {\n vec2 newPos = (outCoord - vec2(startX, startY)) / u_scale;\n vec4 origin = TEXTURE2D(texture_origin, newPos);\n setPackedOutput(origin);\n }\n else {\n setPackedOutput(vec4(1.0));\n }\n }\n "},textureFuncConf:{origin:[]}},box_coder:{mainFunc:function(e,t){var n="decode_center_size"===t.code_type;return"\n // start函数\n vec2 getPriorBoxData(int r, int g, int b, int m, int n) {\n float start = getValueFromTensorPos_priorbox(r, g, b, m);\n float end = getValueFromTensorPos_priorbox(r, g, b, n);\n float len = end - start;\n return vec2(start + len / 2.0, len);\n }\n vec2 getBoxVarData(int r, int g, int b, int m, int n) {\n return vec2(\n getValueFromTensorPos_priorboxvar(r, g, b, m),\n getValueFromTensorPos_priorboxvar(r, g, b, n)\n );\n }\n vec2 getTargetBoxData(int r, int g, int b, int m, int n) {\n "+(n?"\n return vec2(\n getValueFromTensorPos_targetbox(r, g, b, m),\n getValueFromTensorPos_targetbox(r, g, b, n)\n );\n ":"\n float start = getValueFromTensorPos_targetbox(r, g, b, m);\n float end = getValueFromTensorPos_targetbox(r, g, b, n);\n float len = end - start;\n return vec2(start + len / 2.0, len);\n ")+"\n }\n\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n int r = int(oPos.r);\n int g = int(oPos.g);\n int b = int(oPos.b);\n int a = int(oPos.a);\n // 输出坐标转换为输入坐标\n float o = 0.0;\n\n int m = 0;\n int n = 0;\n if (a == 0 || a == "+(n?2:1)+") {\n m = 0;\n n = 2;\n }\n else {\n m = 1;\n n = 3;\n }\n vec2 priorbox = getPriorBoxData(r, g, b, m, n);\n vec2 boxvar = getBoxVarData(r, g, b, m, n);\n vec2 targetbox = getTargetBoxData(r, g, b, m, n);\n float p1 = priorbox.r;\n float p2 = priorbox.g;\n float t1 = targetbox.r;\n float t2 = targetbox.g;\n float v1 = boxvar.r;\n float v2 = boxvar.g;\n\n "+(n?"\n float b1 = p2 * v1 * t1 + p1;\n float b2 = exp(v2 * t2) * p2;\n if (a == 0 || a == 1) {\n o = b1 - b2 / 2.0 ;\n }\n else {\n o = b1 + b2 / 2.0;\n }\n ":"\n if (a == 0 || a == 1) {\n o = (t1 - p1) / p2 / v1;\n }\n else {\n o = log(abs(t2 / p2)) / v2;\n }\n ")+"\n setOutput(float(o));\n }\n "},textureFuncConf:{targetbox:["getValueFromTensorPos"],priorbox:["getValueFromTensorPos"],priorboxvar:["getValueFromTensorPos"]},behaviors:[]},density_prior_box:ye,prior_box:be,stack:we,slice:Ae},Te=new K;(0,l.registerBackend)("webgl",Te,xe)},170:function(e){e.exports=function(){var e={911:function(e,t){var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},994:function(e,t,n){n.r(t),n.d(t,{GLOBALS:function(){return b},OpData:function(){return pe},PaddlejsBackend:function(){return Ce},Runner:function(){return Pe},Tensor:function(){return fe},Transformer:function(){return C},coreUtils:function(){return r},env:function(){return v},interfaces:function(){return o},nchw2nhwc:function(){return X},nhwc2nchw:function(){return Q},registerBackend:function(){return A},registerOp:function(){return w}});var r={};n.r(r),n.d(r,{AddItemToVars:function(){return u},delUselessData:function(){return l},findVarByKey:function(){return s},getGlobalInterface:function(){return i},getOrMakeGlobalProperty:function(){return a},traverseVars:function(){return c}});var o={};function i(){var e;if("undefined"!=typeof window)e=window;else if(void 0!==n.g)e=n.g;else{if("undefined"==typeof self)throw new Error("Could not find a global object");e=self}return e}function a(e,t){var n=i();return n[e]||(n[e]=t),n[e]}function s(e,t){return Array.isArray(e)?e.find((function(e){return e.name===t})):e[t]}function u(e,t){var n=Array.isArray(e),r=Array.isArray(t)?t:[t];n?r.forEach((function(t){for(var n=null,r=0;r<e.length;r++)if(e[r].name===t.name){n=r;break}null!==n?e[n]=t:e.push(t)})):r.forEach((function(t){e[t.name]=t}))}function c(e,t){Array.isArray(e)?e.forEach((function(e){t(e)})):Object.keys(e).forEach((function(n){t(e[n])}))}function l(e){if(e.ops=null,e.vars instanceof Array)for(var t=0;t<e.vars.length;t++)e.vars[t].data&&delete e.vars[t].data;else for(var n in e.vars)e.vars[n].data&&delete e.vars[n].data}n.r(o),n.d(o,{BufferType:function(){return f},GraphType:function(){return p},UniformType:function(){return d},WasmMemoryType:function(){return h}});var f,h,d,p,v=a("env",new(function(){function e(){this.ENV={}}return e.prototype.set=function(e,t){this.ENV[e]=t},e.prototype.get=function(e){return this.ENV[e]},e}())),g=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},m=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},y=function(){function e(e){this.urlConf={dir:"",main:""},this.separateChunk=!0,this.chunkNum=1,this.dataType="binary",this.params={type:"fetch"},this.inNode=!1,this.isLocalFile=!1,this.realFetch=function(){throw new Error("ERROR: empty fetch funciton")};var t=e,n="model.json";if(e.endsWith(".json")){var r=e.lastIndexOf("/")+1;t=e.substr(0,r),n=e.substr(r)}else"/"!==e.charAt(e.length-1)&&(t=e+"/");this.isLocalFile=0!==t.indexOf("http"),this.urlConf={dir:this.isLocalFile?"/"===t.charAt(0)?""+t:"/"+t:t,main:n},this.inNode="node"===v.get("platform")}return e.prototype.load=function(t){return g(this,void 0,void 0,(function(){var n,r;return m(this,(function(o){switch(o.label){case 0:return(r=t)?[3,2]:[4,this.fetchModel()];case 1:r=o.sent(),o.label=2;case 2:return n=r,this.separateChunk=!!n.chunkNum&&n.chunkNum>0,this.chunkNum=this.separateChunk?n.chunkNum:0,this.separateChunk?"binary"!==this.dataType?[3,4]:[4,this.fetchChunks().then((function(t){return e.allocateParamsVar(n.vars,t)}))]:[3,4];case 3:o.sent(),o.label=4;case 4:return[2,n]}}))}))},e.prototype.fetchOneChunk=function(e){return g(this,void 0,void 0,(function(){return m(this,(function(t){switch(t.label){case 0:return v.get("fetch")?[4,v.get("fetch")(e,{type:"arrayBuffer"})]:[3,2];case 1:return[2,t.sent()];case 2:return[2,this.fetch(e).then((function(e){return e.arrayBuffer()}))]}}))}))},e.prototype.fetchJson=function(e){return this.fetch(e).then((function(e){return e.json()}))},e.prototype.getFileName=function(e){return"chunk_"+e+".dat"},e.prototype.fetchChunks=function(){return g(this,void 0,void 0,(function(){var e,t,n;return m(this,(function(r){for(e=this.chunkNum,t=[],n=1;n<=e;n++)t.push(this.fetchOneChunk(this.urlConf.dir+this.getFileName(n)));return[2,Promise.all(t).then((function(e){var t,n=0,r=[];e.forEach((function(e){t=new Float32Array(e),r.push(t),n+=t.length}));var o=new Float32Array(n),i=0;return r.forEach((function(e){e.forEach((function(e){o[i]=e,i+=1}))})),o}))]}))}))},e.allocateParamsVar=function(e,t){var n,r=0,o=Array.isArray(t)?t:Object.values(t);c(e,(function(e){n=e.shape.reduce((function(e,t){return e*t})),e.persistable&&(e.data=o.slice(r,r+n),r+=n)}))},e.prototype.fetch=function(e,t){if(v.get("fetch"))return v.get("fetch")(e,t||{});var r=(t||this.params).method||"get",o=new(this.inNode?n(911).Headers:Headers);return this.realFetch=this.inNode?this.isLocalFile?this.fetchLocalFile:n(911):window.fetch.bind(window),this.realFetch(e,{method:r,headers:o})},e.prototype.fetchLocalFile=function(e){var t=n(993);return new Promise((function(n,r){try{n(t.readFileSync(e,"utf8"))}catch(e){r(e)}}))},e.prototype.fetchModel=function(){var e=this,t=this.params,n=this.urlConf.dir+this.urlConf.main,r=null;return"fetch"===t.type&&(r=new Promise((function(r,o){e.fetch(n,t).then((function(t){return v.get("fetch")?t:e.isLocalFile&&e.inNode?JSON.parse(t):t.json()})).then((function(e){return r(e)})).then((function(e){return o(e)}))}))),r},e}();!function(e){e.FrameBuffer="frameBuffer",e.ColorBuffer="colorBuffer"}(f||(f={})),function(e){e.memory100="100",e.memory200="200",e.memory300="300",e.memory400="400",e.memory500="500",e.memory600="600",e.memory700="700",e.memory800="800",e.memory900="900"}(h||(h={})),function(e){e.uniform1f="1f",e.uniform1fv="1fv",e.uniform1i="1i",e.uniform1iv="1iv",e.uniform2f="2f",e.uniform2fv="2fv",e.uniform2i="2i",e.uniform2iv="2iv",e.uniform3f="3f",e.uniform3fv="3fv",e.uniform3i="3i",e.uniform3iv="3iv",e.uniform4f="4f",e.uniform4fv="4fv",e.uniform4i="4i",e.uniform4iv="4iv"}(d||(d={})),function(e){e.SingleOutput="single",e.MultipleOutput="multiple",e.MultipleInput="multipleInput"}(p||(p={}));var b={opRegistry:{ops:{}},backend:"",backendInstance:null};function w(e,t){var n=e.conf,r=e.params,o=e.main,i=e.mainFunc,a=e.textureFuncConf,s=e.commonFuncConf,u=e.behaviors,c=void 0===u?[]:u,l=b.backend+"_"+t;b.opRegistry.ops[l]||(b.opRegistry.ops[l]={name:t,conf:n,params:r,main:o,mainFunc:i,textureFuncConf:a,commonFuncConf:s,behaviors:c})}function A(e,t,n){e&&(b.backend=e),t&&(b.backendInstance=t),n&&Object.keys(n).forEach((function(e){w(n[e],e)}))}b=a("GLOBALS",b);var x=i();x.ImageBitmap||(x.ImageBitmap=function(){});var T,P=function(){function e(e,t){this.id="",this.type="",this.inputs={},this.outputs={},this.attrs={},this.subAttrs=[],this.next="",this.opData=null,this.isPacked=!1,this.bufferType=f.FrameBuffer,this.uniform=null;var n=e.inputs,r=e.outputs,o=e.attrs,i=void 0===o?{}:o,a=e.type,s=e.isPacked,u=void 0!==s&&s,c=e.bufferType,l=void 0===c?f.FrameBuffer:c,h=e.uniform,d=void 0===h?null:h;this.id=a+"_"+ +new Date+"_"+t,this.inputs=n,this.outputs=r,this.attrs=i,this.subAttrs=e["sub-attrs"]||[],this.uniform=d,this.type=a,this.isPacked=u,this.bufferType=l,this.next="",this.opData=null}return Object.defineProperty(e.prototype,"inputsName",{get:function(){var e=this,t=[];return Object.keys(this.inputs).forEach((function(n){t.push(e.inputs[n][0])})),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"outputsName",{get:function(){return this.outputs.Output||this.outputs.Out||this.outputs.Y},enumerable:!1,configurable:!0}),e.prototype.execute=function(e){b.backendInstance.runProgram(this.opData,e)},e}(),C=function(e){this.name=e},_=(T=function(e,t){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),E={conv2d:function(e,t){var n=e.attrs.strides,r=e.inputs.Input[0],o=e.inputs.Filter[0];if("image"===r)return!1;var i=s(t,r).shape,a=s(t,o).shape;return!n.find((function(e){return e>1}))&&i[i.length-1-2]%4==0&&4===a.length&&a[0]%4==0&&a[1]%4==0}};function k(e){return{type:"packed_2_unpacked",attrs:{},inputs:{Input:[e.inputName]},outputs:{Output:[e.outputName]}}}function R(e){return{type:"unpacked_2_packed",attrs:{},inputs:{Input:[e.inputName]},outputs:{Output:[e.outputName]}}}function O(e,t){Object.keys(e.inputs).forEach((function(t){e.inputs[t]=[e.inputs[t]+"_packed"]})),Object.keys(e.outputs).forEach((function(t){e.outputs[t]=[e.outputs[t]+"_packed"]})),e.type=e.type+"_packing",e.id=e.type+"_"+ +new Date+"_"+t.length,e.isPacked=!0}var F,M,I=function(e){function t(){return e.call(this,"TexturePacking")||this}return _(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if("webgl"===b.backend&&v.get("webgl_pack_channel")){var n=e[0],r=e[1],o=e[2],i="depthwise_conv2d"===n.type?"conv2d":n.type,a=E[i];if(a&&a(n,r)){var s=n.inputs,u=n.outputs,c=s.Input[0],l=u.Output?u.Output[0]:u.Out[0],f=R({inputName:c,outputName:c+"_packed"}),h=o.length;o.push(new P(f,h)),O(n,o);var d=k({inputName:l+"_packed",outputName:l}),p=o.length+1;o.push(new P(d,p))}}},t}(C),D=(F=function(e,t){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),L=function(e){function t(){return e.call(this,"FormatInputsX")||this}return D(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0];if(["concat","connect","fc","rnn_origin","rnn_matmul","stack"].includes(n.type)){var r=n.inputs;if(("rnn_origin"===n.type||"rnn_matmul"===n.type)&&r.WeightList.length>0)r.WeightList.forEach((function(e,t){r["weightlist_"+t]=[e]}));else{var o=r.X||r.Input;if("wasm"!==v.get("backend"))o.length>1&&(o.forEach((function(e,t){r["origin"+(t>0?"_"+t:"")]=[e]})),delete r.X,delete r.Input);else{if(o.length>4)throw Error("Not yet supporting concat input tensors more than 4.");if(o.length>1){var i=o[0],a=o[1],s=o[2],u=o[3];r.X=[i],a&&(r.Y=[a]),s&&(r.Z=[s],n.type+="_mul"),u&&(r.M=[u])}}}}},t}(C),j=(M=function(e,t){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}M(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),B=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function N(e,t){var n=s(t,e);return n?n.shape:[]}function V(e,t,n,r){for(var o=B(t),i=0,a=0,s=e;a<s.length;a++)i+=N(s[a],r)[n];return o[n]=i,{name:e[e.length-1]+"_out",shape:o}}var U=function(e){function t(){return e.call(this,"splitOp")||this}return j(t,e),t.prototype.transform=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t[0],o=t[1],i=0,a=r.length;i<a;i++){var s=r[i];if("concat"===s.type&&(null===(e=s.inputs)||void 0===e?void 0:e.X)&&!(s.inputs.X.length<=4)){var c=s.attrs,l=s.inputs,f=s.outputs,h=l.X,d=h.length,p=Math.ceil((d-4)/3)+1,v=f.Out[0],g=N(v,o),m=c.axis||0;m=m>-1?m:g.length+m;for(var y=[],b=[],w=h.slice(0,4),A=void 0,x=0;x<p;x++){var T=0===x?w:h.slice(3*x+1,3*(x+1)+1),P=V(T,g,m,o);0!==x&&T.splice(0,0,A.name),P.shape[m]+=A?A.shape[m]:0;var C={Out:[P.name]};b.push({attrs:c,inputs:{X:T},outputs:C,type:"concat"}),y.push(P),A=P}b[p-1].outputs.Out=[v],r.splice.apply(r,B([i,1],b)),u(o,y)}}},t}(C),W=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function z(e){if(e.length<4){for(var t=[],n=0;n<4-e.length;n++)t.push(1);return t.concat(e)}return W(e)}function H(e){return e.reduce((function(e,t){return e+t}))}function G(e,t){var n=e.length;return 4-n+(t>-1?t:n+t)}function X(e,t){for(var n=t[0],r=t[1],o=t[2],i=t[3],a=r*i,s=r*o*i,u=[],c=0;c<n;c++)for(var l=0;l<r;l++)for(var f=0;f<o;f++)for(var h=0;h<i;h++)u.push(e[c*s+f*a+h*r+l]);return new Float32Array(u)}function Q(e,t){for(var n=t[0],r=t[1],o=t[2],i=t[3],a=o*i,s=r*o*i,u=[],c=0;c<n;c++)for(var l=0;l<i;l++)for(var f=0;f<r;f++)for(var h=0;h<o;h++)u.push(e[c*s+f*a+h*i+l]);return new Float32Array(u)}function Y(e,t,n,r){if("nhwc"===t){var o=n[0],i=n[1],a=Q(e,[o,n[2],n[3],i*(r?4:1)]);return new Float32Array(a)}return new Float32Array(e)}function q(e){for(var t,n=e.data,r=e.shape,o=W(r).reverse(),i=0,a=o.length-1;i<a;i++)t=K(t||n,o[i]);return t}function K(e,t){for(var n=[],r=0,o=e.length;r<o;r+=t)n.push(e.slice(r,r+t));return n}var J,Z,$,ee=(J=function(e,t){return(J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}J(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),te="fetch_pack",ne=function(e){function t(){return e.call(this,"PackOut")||this}return ee(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(v.get("webgl_pack_output")&&1!==v.get("webglVersion")){var n=e[0],r=e[1],o=n.find((function(e){return"fetch"===e.type})),i=o.inputs.X[0],a=z(s(r,i).shape),c=a[0],l=a[1],f=a[2],h=a[3],d={attrs:{},inputs:{X:[i]},outputs:{Y:[te]},type:"pack_out"},p=l*h,g=Math.ceil(c*f/4),m={name:te,shape:[1,1,g,p],persistable:!1};o.inputs.X=[te],o.attrs.origin_shape=[c,l,f,h],n.push(d),u(r,[m])}},t}(C),re=(Z=function(e,t){return(Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}Z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),oe="img_pre_processed",ie="img_origin",ae=function(e){function t(){return e.call(this,"FeedProcess")||this}return re(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=e[1],o=e[2];if(o.webglFeedProcess||v.get("webgl_gpu_pipeline")){var i=o.mean,a=void 0===i?[0,0,0]:i,c=o.std,l=void 0===c?[1,1,1]:c,f=o.scale,h=void 0===f?[1,1]:f,p=o.pos,g=void 0===p?[0,0]:p,m=o.feedShape,y=s(r,"image"),b=y.shape,w=b[2],A=b[3];y.shape=[1,1,w,A];var x=Object.assign({},y);x.name=oe,x.shape=[1,3,m.fh,m.fw],x.persistable=!1,delete x.data;var T=Object.assign({},y);T.name=ie,T.shape=[1,1,m.fh,m.fw],T.persistable=!1,delete T.data,u(r,[T,x]);for(var P=function(e){var t=e.inputs;Object.keys(t).forEach((function(e){"image"===t[e][0]&&(t[e][0]=oe)}))},C=0,_=n.filter((function(e){var t=e.inputs;return Object.keys(t).find((function(e){return"image"===t[e][0]}))}));C<_.length;C++)P(_[C]);var E={attrs:{mean:a,std:l},inputs:{X:[ie]},outputs:{Y:[oe]},type:"feedPost"},S={attrs:{mean:a,std:l,scale:h,pos:g},inputs:{X:["image"]},outputs:{Y:[ie]},type:"imgFeed",uniform:{u_scale:{type:d.uniform2fv,value:[1,1]},u_pos:{type:d.uniform2fv,value:[0,0]},u_keep_ratio:{type:d.uniform1i,value:1}},isPacked:!0};n.splice(1,0,E),n.splice(1,0,S)}},t}(C),se={preTransforms:[new U,new ne,new ae],transforms:[new L,new I],postTransforms:[]},ue=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function ce(e,t){return e&&e[t]||[]}!function(e){e.PreTransforms="preTransforms",e.Transforms="transforms",e.PostTransforms="postTransforms"}($||($={}));var le=function(){function e(e,t){this.weightMap=[],this.ops=[],this.vars=[],this.config={},this.type=p.SingleOutput,this.plugins=null,this.ops=e.ops,this.vars=e.vars,this.type=t.type||this.type,this.plugins=t.plugins,this.config=t,e.feedShape&&(this.config.feedShape=e.feedShape)}return e.prototype.createGraph=function(){return this.preTransforms(),this.createOpsMap(),this.arrangeMap(),this.postTransforms(),this.weightMap},e.prototype.preTransforms=function(){var e=this;ue(se.preTransforms,ce(this.plugins,$.PreTransforms)).forEach((function(t){t.transform(e.ops,e.vars,e.config)}))},e.prototype.transforms=function(e,t){var n=this;ue(se.transforms,ce(this.plugins,$.Transforms)).forEach((function(r){r.transform(e,n.vars,t)}))},e.prototype.postTransforms=function(){var e=this;ue(se.postTransforms,ce(this.plugins,$.PostTransforms)).forEach((function(t){t.transform(e.weightMap,e.vars,e.type)}))},e.prototype.createOpsMap=function(){for(var e=[],t=0;t<this.ops.length;t++){var n=e.length,r=this.ops[t],o=new P(r,n);this.transforms(o,e),e.push(o)}this.weightMap=e},e.prototype.arrangeMap=function(){for(var e=[],t={},n={},r=0;r<this.weightMap.length;r++)for(var o=this.weightMap[r],i=0;i<o.outputsName.length;i++){var a=o.outputsName[i];n[a]?n[a]++:n[a]=1,t[o.id]=r}for(r=0;r<this.weightMap.length;r++)for(o=this.weightMap[r],e[r]=0,i=0;i<o.inputsName.length;i++)n[o.inputsName[i]]&&e[r]++;this.topoSort(this.weightMap,e,t)},e.prototype.topoSort=function(e,t,n){for(var r=[],o=e.slice(0),i=0;i<t.length;i++)0===t[i]&&r.push(e[i]);for(var a=null,s=0,u=r;s<u.length;s++){var c=u[s];a=this.topoSortInner(e,t,n,c,o,a)}},e.prototype.topoSortInner=function(e,t,n,r,o,i){for(var a=[r],s=i,u=r;a.length>0;){s&&(e[n[s.id]].next=u.id),s=u,u=a.pop()||{};for(var c=0;c<u.outputsName.length;c++)for(var l=0;l<o.length;l++)for(var f=0;f<o[l].inputsName.length;f++)if(o[l].inputsName[f]===u.outputsName[c]&&(t[n[o[l].id]]--,0===t[n[o[l].id]])){a.push(e[n[o[l].id]]),o.splice(l,1),l--;break}}return e[n[s.id]].next=u.id,u},e.prototype.getFeedExecutor=function(){return this.weightMap.find((function(e){return"feed"===e.type}))},e.prototype.getFetchExecutor=function(){return this.weightMap.find((function(e){return"fetch"===e.type}))},e.prototype.getExecutorById=function(e){return this.weightMap.find((function(t){return t.id===e}))},e}(),fe=function(){function e(e){this.opts={},this.isPacked=!1,this.name="",this.tensorId="",this.total=1,this.shape=[],this.unformattedShapeLength=0,this.shape_texture=[],this.exceedMax=!1,this.data=null,this.persistable=!1,this.interpType="NEAREST",this.dataLayout="",this.runtime=0,this.binding=0;var t=e.isPacked,n=void 0!==t&&t,r=e.name,o=e.runtime,i=void 0===o?0:o,a=e.persistable,s=void 0!==a&&a,u=e.type,c=e.dataLayout,l=e.interpType,f=void 0===l?"NEAREST":l,h=e.shape,d=e.data,p=e.binding,v=void 0===p?0:p;this.opts=e,this.isPacked=n,this.name=r,this.runtime=i,this.binding=v,this.persistable=s,this.interpType=f,this.tensorId=u,this.dataLayout=c,this.unformattedShapeLength=h.length,this.shape=z(h),this.total=this.shape.reduce((function(e,t){return e*t})),e.noLayout||d&&d.length&&(this.data=Y(d,this.dataLayout,this.shape,this.isPacked),e.data=null)}return Object.defineProperty(e.prototype,"width_texture",{get:function(){var e=this.shape_texture.length;return this.shape_texture[e-1]||1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height_texture",{get:function(){var e=this.shape_texture.length;return this.shape_texture[e-2]||1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width_shape",{get:function(){var e=this.shape.length;return this.shape[e-1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height_shape",{get:function(){var e=this.shape.length;return this.shape[e-2]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"channel",{get:function(){var e=this.shape.length;return this.shape[e-3]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length_shape",{get:function(){return this.shape.length||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length_unformatted_shape",{get:function(){return this.unformattedShapeLength||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"total_shape",{get:function(){return this.total},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numbers_shape",{get:function(){for(var e=[],t=this.shape.length,n=0;n<t-1;n++){var r=this.shape.slice(n+1).reduce((function(e,t){return e*t}));e.push(r)}return e.push(1),e},enumerable:!1,configurable:!0}),e}(),he={adaptPaddings:function(){for(var e in this.processedAttrs)if(Object.prototype.hasOwnProperty.call(this.processedAttrs,e)&&"paddings"===e){var t=this.processedAttrs[e],n=t[0],r=t[1];return void(0===n&&1===r&&(this.processedAttrs[e][1]=0))}},setAdaptive:function(){this.processedAttrs.adaptive&&2===this.processedAttrs.ksize.length&&1===this.processedAttrs.ksize[0]&&1===this.processedAttrs.ksize[1]&&(this.processedAttrs.adaptive=!1,this.processedAttrs.global_pooling=!0)},isGlobalPooling:function(){var e,t=this.tensorDataMap.origin,n=(null===(e=null==t?void 0:t.shape)||void 0===e?void 0:e.length)||0;n>2&&this.processedAttrs.global_pooling&&(this.processedAttrs.ksize=[t.shape[n-2],t.shape[n-1]])},setPacked:function(){var e=this.processedAttrs.ispacked;this.tensorDataMap.origin&&e&&this.name.indexOf("pool")>-1&&(this.name+="_winograd")},mergeAttrs:function(){this.processedAttrs=this.subAttrs.reduce((function(e,t){return Object.assign(e,t)}),{})},isApplySeparableConv:function(){if(!this.isPackedOp){var e=this.processedAttrs.groups,t=this.tensorDataMap.filter;if("depthwise_conv2d"===this.name&&(this.name="conv2d"),t){var n=t.shape,r=n[0],o=n[1];r===e&&1===o&&(this.name+="_depthwise")}}},batchComputeConv2d:function(){var e=this.tensorDataMap.filter.shape[1];this.processedAttrs.filter_nearest_vec4=4*Math.floor(e/4),this.processedAttrs.filter_remainder_vec4=e%4},processBias:function(){var e=this.tensorDataMap.bias;if(e&&this.isPackedOp){e.packed=!0;var t=e.shape,n=[t[t.length-1]/4,1,1];e.shape=n}},isAdaptiveAvg:function(){var e=this.processedAttrs,t=e.adaptive,n=e.pooling_type;t&&"avg"===n&&(this.name+="_avg_adaptive")},isMax:function(){var e="max"===this.processedAttrs.pooling_type?1:0;this.processedAttrs.pooling_type=e,1===e&&(this.name+="_max")},transToPrelu:function(){this.processedAttrs.multi_value="0.0",this.processedAttrs.active_function="prelu"},transToRelu6:function(){this.processedAttrs.multi_value=this.processedAttrs.threshold,this.processedAttrs.active_function="relu6"},transToHardSigmoid:function(){this.processedAttrs.multi_value=this.processedAttrs.slope||.2,this.processedAttrs.bias_value=this.processedAttrs.offset||.5,this.processedAttrs.active_function="hardSigmoid"},transToLeakyrelu:function(){this.processedAttrs.multi_value=this.processedAttrs.alpha,this.processedAttrs.active_function="leakyRelu",this.name="relu"},transToPow:function(){this.processedAttrs.multi_value=this.processedAttrs.factor||2,this.processedAttrs.active_function="pow_func",this.name="pow"},transToSigmoid:function(){this.processedAttrs.active_function="sigmoid"},transToSqrt:function(){this.processedAttrs.active_function="sqrt"},transToTanh:function(){this.processedAttrs.active_function="tanh_func"},transToAbs:function(){this.processedAttrs.active_function="abs_func"},transToExp:function(){this.processedAttrs.active_function="exp"},transToScale:function(){var e=this.processedAttrs.scale;this.processedAttrs.multi_value=void 0!==e?e:1,this.processedAttrs.bias_value=this.processedAttrs.bias||0;var t=this.processedAttrs.bias_after_scale;this.processedAttrs.active_function=t||void 0===t?"scale":"scaleWidthBias"},setActiveFunc:function(){var e=this.name.replace("conv2d-elementwise_add-","");this.processedAttrs=Object.assign({active_function:"scale",multi_value:"1.0",bias_value:"0.0",fuse_relu:!1},this.processedAttrs),"leaky_relu"===e&&(this.processedAttrs.multi_value=this.processedAttrs.alpha,this.processedAttrs.active_function="leakyRelu")},normalizePerm:function(){var e=this.tensorDataMap.origin.shape.length,t=this.processedAttrs.axis,n=t.length;if(n-e>0&&(n=(t=t.map((function(e){return e-1})).filter((function(e){return e>=0}))).length),n>4)throw Error("op transpoes2 axis length exceeds maximum length 4, get "+n);for(var r=new Array(n).fill(0),o=0;o<n;o++)r[t[o]]=o;var i=[];for(o=0;o<4;o++)i[o]=r[o]||0;this.processedAttrs.perm_arr=i,this.processedAttrs.perm_size=n},normalizeDim:function(){for(var e=this.tensorDataMap.origin.shape,t=z(e),n=this.processedAttrs,r=n.axis,o=n.dim,i=G(e,void 0!==r?r:Array.isArray(o)&&o.length?o[0]:o),a=[],s=0;s<t[i];s++)a[s]=s;if(this.processedAttrs.target_length=a.length,this.processedAttrs.target_value=a,this.processedAttrs.inputs_dim=t[i],this.processedAttrs.dim=i,0===this.processedAttrs.num&&(this.processedAttrs.num=Object.values(this.tensorDataMap).filter((function(e){return"out"===e.tensorName})).length||1),"wasm"===v.get("backend")){this.processedAttrs.fourInputs=!1;var u=this.tensorDataMap.counter;if(u){var c=z(u.shape);this.processedAttrs.counter_num=c[i]}var l=this.tensorDataMap.appender;if(l){var f=z(l.shape);this.processedAttrs.append_num=f[i]}var h=this.tensorDataMap.fourth;if(h){this.processedAttrs.fourInputs=!0;var d=z(h.shape);this.processedAttrs.fourth_num=d[i]}}},processElementwiseAxis:function(){var e=this.tensorDataMap.origin.shape,t=this.tensorDataMap.counter.shape,n=void 0===this.processedAttrs.axis?-1:this.processedAttrs.axis;this.processedAttrs.counterLen=t.length,H(e)===H(t)?(this.processedAttrs.axis=0,this.processedAttrs.counterLen=4):(-1===n&&(n=e.length-t.length),this.processedAttrs.axis=G(e,n))},genElementwiseCounterPos:function(){for(var e=this.processedAttrs,t=e.counterLen,n=["0","0","0","0"],r=e.axis,o=4-t;o<4;o++)n[o]="oPos["+r+++"]";this.processedAttrs.counterPos=n.join(",")},flattenShape:function(){var e=Object.values(this.tensorDataMap).find((function(e){return e.shape.length>2}));if(e){var t=z(e.shape);e.shape=[t[0]*t[2],t[1]*t[3]]}},reshape:function(){var e=this.tensorDataMap.origin,t=this.tensorDataMap.counter,n=this.tensorDataMap.out;if(t.shape.length>e.shape.length){var r=t;t=e,e=r}if(e.shape.length>2&&2===t.shape.length){var o=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]);var n=e.reduce((function(e,t){return e*t}));return 1===t.length?[1,n]:[t[0],n/t[0]]}(e.shape,n.shape);e.shape=o}},checkIsMerge:function(){var e=this.name.replace("conv2d-elementwise_add-","");this.name="conv2d_elementwise_add","leaky_relu"===e&&(this.processedAttrs.alpha&&(this.processedAttrs.multi_value=this.processedAttrs.alpha),this.processedAttrs.active_function="leakyRelu")}},de=function(){return(de=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},pe=function(){function e(e,t,n,r,o){this.name="",this.isPackedOp=!1,this.processedAttrs={},this.subAttrs=[],this.uniform=null,this.inputTensors=[],this.outputTensors=[],this.dataLayout="",this.iLayer=0,this.program=[],this.isFinalOp=!1,this.bufferType=f.FrameBuffer,this.tensorDataMap={},this.tensorData=[];var i=e.type,a=e.inputs,s=e.outputs,u=e.attrs,c=e.isPacked,l=e.bufferType,h=void 0===l?f.FrameBuffer:l,d=e.uniform,p=void 0===d?null:d;this.modelName=o,this.subAttrs=e.subAttrs,this.name=i,this.isPackedOp=c,this.bufferType=h,this.dataLayout=n.dataLayout||"",this.iLayer=t,this.isFinalOp=r,this.uniform=p,this.initExtendedAttrs(u),this.constructTensorData(a,s,n.vars),this.buildTensor();var v=this.buildShaderParams();this.buildProgram(v)}return e.prototype.initExtendedAttrs=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];this.processedAttrs[t]=n}},e.prototype.constructTensorData=function(e,t,n){var r=this;Object.keys(t).forEach((function(e){t[e].forEach((function(o,i){t[e][i]=r.getTensorVar(o,n)}))})),Object.keys(e).forEach((function(t){e[t]=[r.getTensorVar(e[t][0],n)]}));var o=function(e){if(Object.prototype.hasOwnProperty.call(t,e))try{var n=t[e]||[{}],o=i.getExactTensorName(e,"output");o&&n.forEach((function(e,t){e.tensorName=o,r.tensorDataMap[o+"_"+t]=de(de({},e),{tensorName:o,runtime:t})}))}catch(e){console.error(e)}},i=this;for(var a in t)o(a);for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=e[a].length>0?e[a]:[{}],u=this.getExactTensorName(a,"input");if(u){var c=s[0];c.tensorName=u,this.tensorDataMap[u]=de(de({},c),{tensorName:u})}}},e.prototype.getExactTensorName=function(e,t){return"input"===t?{input:"origin",x:"origin",y:"counter",w:"weight"}[e.toLowerCase()]||e.toLowerCase():{output:"out",y:"out",out:"out",scale:"scale",bias:"bias",mean:"mean",variance:"variance",mask:"out",boxes:"out",variances:"out"}[e.toLowerCase()]},e.prototype.getTensorVar=function(e,t){var n=s(t,e.replace(/_packed$/,""));return n&&e.endsWith("_packed")?function(e,t){var n=3===e.shape.length?W([1],e.shape):e.shape,r=n[0],o=n[1],i=n[2],a=n[3],s=Object.assign({},e);if(s.name=t,s.packed=!1,o%4==0){var u=o/4;s.packed=!0,s.shape=[r,u,i,a]}return s}(n,e):n},e.prototype.buildProgram=function(e){var t=this,n=this.name,r=b.backend+"_"+n,o=b.opRegistry.ops[r];try{if(!o&&"wasm"!==v.get("backend"))throw new Error("[unregistered op] "+n);var i=this.inputTensors;this.program=this.outputTensors.map((function(n,r){return b.backendInstance.createProgram({op:o,outTensor:n,inputTensors:i,shaderParams:e[r],runtime:r,isFinalOp:t.isFinalOp})}))}catch(e){console.error(e)}},e.prototype.processTensorDataAndAttrs=function(){var e=this;try{this.name.indexOf("conv2d-elementwise_add")>-1?this.name="conv2d_elementwise_add":this.name.indexOf("max_pool2d_with_index")>-1&&(this.name="pool2d_max");var t=b.backend+"_"+this.name;(b.opRegistry.ops[t]&&b.opRegistry.ops[t].behaviors||[]).forEach((function(t){try{he[t].call(e)}catch(e){console.error(e)}}))}catch(e){console.error(e)}},e.prototype.buildTensor=function(){var e=this;this.processTensorDataAndAttrs();var t=Object.values(this.tensorDataMap);t.forEach((function(t,n){var r,o=t.tensorName,i=new fe({type:e.modelName+"_"+t.name,name:o,shape:t.shape,data:t.data||null,persistable:t.persistable||!1,interpType:t.interpType||"NEAREST",isPacked:e.isPackedOp||t.packed||!1,binding:n,noLayout:null===(r=b.backendInstance)||void 0===r?void 0:r.noLayout,dataLayout:e.dataLayout,runtime:t.runtime||0});"out"===o?e.outputTensors.push(i):e.inputTensors.push(i),t.shape=i.shape,t.total=i.total})),this.tensorDataMap=null,this.tensorData=t},e.prototype.buildShaderParams=function(){var e=this,t=[];return this.outputTensors.forEach((function(){var n=JSON.parse(JSON.stringify(e.processedAttrs));t.push(n)})),t},e}(),ve=function(){return(ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ge=function(){function e(){this.targetContext={},this.gapFillWith="#fff",this.mean=[0,0,0],this.std=[1,1,1],this.bgr=!1,this.pixelWidth=1,this.pixelHeight=1,this.inputFeed=[],this.targetCanvas=v.get("canvas2d")||document.createElement("canvas"),this.targetContext=this.targetCanvas.getContext("2d")}return e.prototype.process=function(e,t,n){var r=t.fill,o=t.mean,i=t.std,a=t.bgr,s=t.keepRatio,u=void 0===s||s,c=t.scale,l=void 0===c?0:c,f=n.fc,h=void 0===f?3:f,d=n.fh,p=n.fw,v=e,g={gapFillWith:r||this.gapFillWith,mean:o||this.mean,std:i||this.std,bgr:a||this.bgr,keepRatio:u,scale:l,targetSize:{width:p,height:d},targetShape:[1,h,d,p]};return this.fromPixels(v,g)||[]},e.prototype.fromPixels=function(e,t){var n=[],r={gapFillWith:t.gapFillWith,dx:0,dy:0,dWidth:t.targetSize.width,dHeight:t.targetSize.height},o=e,i=e.path&&e.width&&e.height;if(!i&&!(e instanceof ImageBitmap||e instanceof HTMLVideoElement||e instanceof HTMLImageElement||e instanceof HTMLCanvasElement))return[{data:n,shape:t.shape||t.targetShape,name:"image",persistable:!0}];this.pixelWidth=e.naturalWidth||e.width,this.pixelHeight=e.naturalHeight||e.height;var a=v.get("webgl_gpu_pipeline")||t.webglFeedProcess;return this.fitToTargetSize(i?o.path:o,r,ve(ve({},t),{inGPU:a})),n=this.getImageData(r),a?[{data:n=Float32Array.from(n.data),shape:[1,1,r.dHeight,r.dWidth],name:"image",persistable:!0}]:[{data:n=this.allReshapeToRGB(n,t),shape:t.targetShape||t.shape,name:"image",persistable:!0}]},e.prototype.allReshapeToRGB=function(e,t){for(var n=t.mean,r=t.std,o=t.targetShape,i=t.bgr,a=t.normalizeType,s=void 0===a?0:a,u=o[1],c=o[2],l=o[3],f=e.data||e,h=new Float32Array(c*l*u),d=0,p=0;p<c;++p)for(var v=p*l,g=0;g<l;++g)for(var m=v+g,y=0;y<u;++y){var b=i?4*m+(2-y):4*m+y;h[d]=0===s?f[b]/255:(f[b]-128)/128,h[d]-=n[y],h[d]/=r[y],d++}return new Float32Array(Q(h,[1,c,l,u]))},e.prototype.fitToTargetSize=function(e,t,n){var r=n||{},o=r.keepRatio,i=void 0===o||o,a=r.inGPU,s=void 0!==a&&a,u=r.scale,c=void 0===u?0:u,l=t.dWidth,f=t.dHeight,h=s?this.pixelWidth:l,d=s?this.pixelHeight:f,p=s?this.pixelWidth:l,v=s?this.pixelHeight:f;if(c){if(p-l<0||v-f<0)throw new Error("scale size smaller than target size");this.pixelWidth>this.pixelHeight?(v=c,p=Math.round(v*this.pixelWidth/this.pixelHeight)):(p=c,v=Math.round(p*this.pixelHeight/this.pixelWidth)),this.targetCanvas.width=h=p,this.targetCanvas.height=d=v,t.dx=(p-l)/2,t.dy=(v-f)/2}else i&&(l/f*this.pixelHeight/this.pixelWidth>=1?s?(h=Math.round(v*l/f),Math.floor((h-p)/2)):(p=Math.round(v*this.pixelWidth/this.pixelHeight),Math.floor((l-p)/2)):s?(d=Math.round(p*f/l),Math.floor((d-v)/2)):(v=Math.round(p*this.pixelHeight/this.pixelWidth),Math.floor((f-v)/2))),this.targetCanvas.width=t.dWidth=h,this.targetCanvas.height=t.dHeight=d;this.targetContext.fillStyle=t.gapFillWith,this.targetContext.fillRect(0,0,this.targetCanvas.width,this.targetCanvas.height),this.targetContext.drawImage(e,0,0,p,v)},e.prototype.getImageData=function(e){var t=e.dx,n=e.dy,r=e.dWidth,o=e.dHeight;return this.targetContext.getImageData(t,n,r,o)},e.prototype.cover=function(e,t,n,r){var o=n,i=r;return n/r*t/e>=1?o=Math.round(i*e/t):i=Math.round(o*t/e),[o/n,i/r]},e}(),me=function(){return(me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function ye(e,t,n){for(var r=[],o=0,i=e.length;o<i;o++){var a=e[o];a>t&&r.push({score:a,i:o})}return r.sort((function(e,t){return t.score-e.score})).slice(0,n)}function be(e){var t=e[0],n=e[1],r=e[2],o=e[3];return r<t||o<n?0:(r-t)*(o-n)}function we(e,t){if(t[0]>e[2]||t[2]<e[0]||t[1]>e[3]||t[3]<e[1])return 0;var n=be(e),r=be(t),o=function(e,t){var n=e[0],r=e[1],o=e[2],i=e[3],a=t[0],s=t[1],u=t[2],c=t[3],l=Math.max(n,a),f=Math.max(r,s);return(Math.min(o,u)-l)*(Math.min(i,c)-f)}(e,t);return o/(n+r-o)}var Ae={multiclass_nms:function(e,t){var n=e[0],r=void 0===n?[]:n,o=e[1],i=void 0===o?[]:o,a=q(r),s=q(i);if(!a||!s)return[];if(a=a[0],s=s[0],!(a&&a.length&&s&&s.length))return[];for(var u=t.nms_top_k,c=void 0===u?100:u,l=t.nms_eta,f=void 0===l?1:l,h=t.keep_top_k,d=void 0===h?100:h,p=t.background_label,v=void 0===p?0:p,g=t.nms_threshold,m=void 0===g?.3:g,y=t.score_threshold,b=void 0===y?0:y,w=[],A=0,x=s.length;A<x;A++){var T=[];if(A!==v){var P=ye(s[A],b,c);if(P&&P.length){var C=P.shift(),_=a[C.i];for(T.push(me(me({},C),{box:_,label:A}));P.length;){var E=P.shift();_=a[E.i];for(var S=!0,k=0,R=T;k<R.length;k++)if(we(_,R[k].box)>m){S=!1;break}S&&T.push(me(me({},E),{box:_,label:A})),S&&f<1&&m>.5&&(m*=f)}w=w.concat(T)}}}var O=w.sort((function(e,t){return t.score-e.score})).slice(0,d).sort((function(e,t){return e.label-t.label})).map((function(e){return function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}([e.label,e.score],e.box)}));return O&&O.length?O:[]}},xe=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Te=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Pe=function(){function e(e){this.runnerConfig={},this.isPaused=!1,this.model={},this.weightMap=[],this.isExecuted=!1,this.test=!1,this.graphGenerator={},this.mediaProcessor=null,this.needPreheat=!0,this.feedShape={},this.runnerConfig=Object.assign({},e),this.needPreheat=void 0===e.needPreheat||e.needPreheat,this.modelName=e.modelName||Date.now().toString(),this.weightMap=[],v.set("ns",i()),"node"!==v.get("platform")&&(this.mediaProcessor=new ge)}return e.prototype.init=function(e){return xe(this,void 0,void 0,(function(){var t;return Te(this,(function(n){switch(n.label){case 0:return b.backendInstance?(this.isExecuted=!1,"wasm"!==v.get("backend")?[3,2]:[4,Promise.all([this.load(),b.backendInstance.init()])]):(console.error("ERROR: Haven't register backend"),[2]);case 1:return n.sent(),[3,5];case 2:return[4,b.backendInstance.init()];case 3:return n.sent(),[4,this.load(e)];case 4:n.sent(),n.label=5;case 5:return this.genFeedData(),this.genGraph(),this.genOpData(),"wasm"!==v.get("backend")?[3,7]:(this.model=Object.assign(this.model,this.runnerConfig),t=this.model,[4,b.backendInstance.initWasm(this.model,this.weightMap)]);case 6:return t.index=n.sent(),[2,[]];case 7:return this.needPreheat?[4,this.preheat()]:[3,9];case 8:return[2,n.sent()];case 9:return[2]}}))}))},e.prototype.load=function(e){return xe(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,u;return Te(this,(function(c){switch(c.label){case 0:return t=this.runnerConfig,n=t.modelPath,r=t.modelObj,o=void 0===r?null:r,n?(i=new y(n),a=this,[4,i.load(e)]):[3,2];case 1:return a.model=c.sent(),[3,3];case 2:(null==o?void 0:o.model)&&(null==o?void 0:o.params)&&(s=o.model,u=o.params,y.allocateParamsVar(s.vars,u),this.model=s),c.label=3;case 3:return[2]}}))}))},e.prototype.genGraph=function(){this.graphGenerator=new le(this.model,this.runnerConfig),this.weightMap=this.graphGenerator.createGraph()},e.prototype.genOpData=function(){var e=this,t=0;this.weightMap.forEach((function(n,r){var o=n.type;if("feed"!==o&&"fetch"!==o){t++;var i=r===e.weightMap.length-2,a=new pe(n,t,e.model,i,e.modelName);n.opData=a}})),l(this.model)},e.prototype.preheat=function(){return xe(this,void 0,void 0,(function(){var e;return Te(this,(function(t){switch(t.label){case 0:return[4,this.checkModelLoaded()];case 1:return t.sent(),[4,this.execute()];case 2:return e=t.sent(),this.isExecuted=!0,[2,e]}}))}))},e.prototype.checkModelLoaded=function(){return xe(this,void 0,void 0,(function(){return Te(this,(function(e){switch(e.label){case 0:return this.model?[3,2]:[4,this.load()];case 1:e.sent(),e.label=2;case 2:return 0===this.weightMap.length&&(console.info("It's better to preheat the model before running."),this.genFeedData(),this.genGraph(),this.genOpData(),this.isExecuted=!1),[2]}}))}))},e.prototype.predict=function(e,t){return xe(this,void 0,void 0,(function(){var n,r,o;return Te(this,(function(i){switch(i.label){case 0:return this.isPaused||!this.mediaProcessor?[2]:(n=[],n=this.runnerConfig.webglFeedProcess?[e]:this.mediaProcessor.process(e,this.runnerConfig,this.feedShape),r=[],"wasm"!==v.get("backend")?[3,3]:[4,b.backendInstance.predict(n[0].data,this.model.index)]);case 1:return i.sent(),[4,this.read()];case 2:return o=i.sent(),r=this.postProcess(o),[3,5];case 3:return this.updateFeedData(n),[4,this.execute()];case 4:r=i.sent(),i.label=5;case 5:return this.isExecuted=!0,[2,t?t(r):r]}}))}))},e.prototype.predictWithFeed=function(e,t,n,r){var o;return xe(this,void 0,void 0,(function(){var i,a,s,u,c,l,f,h,d,p,g,m,y;return Te(this,(function(w){switch(w.label){case 0:return i=this.feedShape,a=i.fc,s=void 0===a?3:a,u=i.fw,c=i.fh,Array.isArray(e)?(null===(o=e[0])||void 0===o?void 0:o.data)?((p=e[0].data)instanceof Float32Array||(e[0].data=new Float32Array(p)),l=e):l=[{data:new Float32Array(e),shape:n||[1,s,c,u],name:"image",persistable:!0}]:ArrayBuffer.isView(e)?l=[{data:e,shape:n||[1,s,c,u],name:"image",persistable:!0}]:(h=(f=e).width,d=f.height,p=f.data,l=[{data:new Float32Array(p),shape:n||[1,s,d||c,h||u],name:"image",persistable:!0}]),r||((g=l[0]).data=Y(g.data,"nhwc",g.shape,!1)),m=[],"wasm"!==v.get("backend")?[3,3]:[4,b.backendInstance.predict(l[0].data,this.model.index)];case 1:return w.sent(),[4,this.read()];case 2:return y=w.sent(),m=this.postProcess(y),[3,5];case 3:return this.updateFeedData(l),[4,this.execute()];case 4:m=w.sent(),w.label=5;case 5:return this.isExecuted=!0,[2,t?t(m):m]}}))}))},e.prototype.genFeedData=function(){var e,t=this.runnerConfig,n=t.type,r=t.feedShape,o=t.webglFeedProcess;this.feedShape=this.model.feedShape||r;var i,a=this.feedShape,c=a.fc,l=void 0===c?3:c,f=a.fh,h=a.fw,d=this.model,g=d.vars,m=d.feed;if(n===p.MultipleInput){var y=this.model.ops&&this.model.ops[0]&&(null===(e=this.model.ops[0].inputs)||void 0===e?void 0:e.X);y.length>1&&(i=y.map((function(e){var t=s(g,e),n=t.shape.reverse(),r=n[0],o=n[1],i=n[2],a=n[3],u=void 0===a?1:a;return t.data=new Float32Array(u*i*o*r),t})))}else{i=m||s(g,"image");var b="wasm"!==v.get("backend")&&o?4:l,w={name:"image",shape:[1,l,f,h]};i=Object.assign(w,i,{data:new Float32Array(b*f*h).fill(1),persistable:!0}),"wasm"!==v.get("backend")&&o&&(i.shape[1]=4)}u(g,i)},e.prototype.updateFeedData=function(e){for(var t=e[0],n=0,r=this.weightMap.filter((function(e){return e.opData?e.opData.inputTensors.find((function(e){return e.tensorId.endsWith("_image")})):null}));n<r.length;n++){for(var o=r[n],i=0,a=o.opData.inputTensors;i<a.length;i++){var s=a[i];s.tensorId.endsWith("_image")&&(s.data=t.data)}var u=this.runnerConfig,c=u.webglFeedProcess,l=void 0!==c&&c,f=u.keepRatio,h=void 0===f||f;if(l||v.get("webgl_gpu_pipeline")){var d=o.opData.inputTensors.find((function(e){return e.tensorId.endsWith("_image")})),p=t.shape||[1,1,t.height,t.width],g=new Uint8Array(t.data||[]);if(t.width&&t.height&&!t.data){var m=t.naturalWidth||t.width;p=[1,1,t.naturalHeight||t.height,m],g=t}var y=d.opts;y.shape=p;var b=o.opData,w=new fe(y);w.data=g,b.inputTensors=[w];var A=p.slice(-2),x=A[0],T=A[1],P=b.outputTensors[0].shape.slice(-2),C=P[0],_=P[1],E=this.mediaProcessor.cover(T,x,_,C);o.uniform.u_scale.value=E,o.uniform.u_keep_ratio.value=+h}}},e.prototype.execute=function(){return xe(this,void 0,void 0,(function(){var e,t;return Te(this,(function(n){switch(n.label){case 0:return e=this.graphGenerator.getFeedExecutor(),this.executeOp(e),[4,this.read()];case 1:return t=n.sent(),[2,this.postProcess(t)]}}))}))},e.prototype.postProcess=function(e){var t="wasm"===v.get("backend");if(v.get("debug"))return e;var n=e,r=this.model,o=r.multiOutputs,i=r.postOps;if(o)if(t)n=o.map((function(t,n){var r;return(r={})[t.name]=e[n],r}));else{var a=0;n=o.map((function(t){var n,r=t.shape.reduce((function(e,t){return e*t})),o=e.slice(a,r+a);return a+=r,(n={})[t.name]=o,n}))}if(o&&i&&i.length)for(var s=function(e,t){var r=i[e],o=r.type,a=r.attrs,s=r.inputs,u=Ae[o];if(!u)return{value:void 0};var c=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(n),l=Object.keys(s).map((function(e){var t=s[e],n=t.name,r=t.shape,o=c.filter((function(e){return e[n]}));return o&&o[0]&&o[0][n]?{name:e,tensorId:n,data:o[0][n],shape:r}:(console.error("未获取到"+n+"的数据"),null)}));n=u(l,a)},u=0,c=i.length;u<c;u++){var l=s(u);if("object"==S(l))return l.value}return n},e.prototype.executeOp=function(e){var t;if("fetch"!==e.type)if("feed"!==e.type&&e.execute(this.isExecuted),v.get("debug")&&(null===(t=e.opData)||void 0===t?void 0:t.outputTensors)&&e.opData.outputTensors[e.opData.outputTensors.length-1]&&e.opData.outputTensors[e.opData.outputTensors.length-1].tensorId===this.modelName+"_"+(v.get("ns").layerName||v.get("layerName")))console.info(e.opData.name+"_"+e.opData.iLayer,"runner op");else if(e.next){var n=e.next,r=this.graphGenerator.getExecutorById(n);this.executeOp(r)}},e.prototype.read=function(){return xe(this,void 0,void 0,(function(){var e,t,n;return Te(this,(function(r){switch(r.label){case 0:return e=this.graphGenerator.getFetchExecutor(),t=s(this.model.vars,e.inputs.X[0]),n={name:t.name,shape:e.attrs.origin_shape||t.shape,index:this.model.index},[4,b.backendInstance.read(n)];case 1:return[2,r.sent()]}}))}))},e.prototype.stopPredict=function(){this.isPaused=!0},e.prototype.dispose=function(){for(var e=0,t=this.weightMap;e<t.length;e++){var n=t[e];if(n.opData){var r=n.opData;b.backendInstance.dispose&&b.backendInstance.dispose(r)}}this.weightMap=[],this.model=null},e}(),Ce=function(){}},993:function(){}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==("undefined"==typeof globalThis?"undefined":S(globalThis)))return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==("undefined"==typeof window?"undefined":S(window)))return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(994)}()}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}return n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(293)}()}({exports:{}});var HZ=function(){function e(t){O(this,e),I(this,"arr",void 0),I(this,"shape",void 0),I(this,"row",void 0),I(this,"col",void 0),this.arr=t,this.row=t.length,this.col=t[0].length,this.shape=[this.row,this.col]}return M(e,[{key:"getCol",value:function(){for(var e=this.row,t=this.col,n=this.arr,r=[],o=0;o<e;o++)for(var i=0;i<t;i++)r[i]?r[i].push(n[o][i]):r[i]=[n[o][i]];return r}},{key:"mult",value:function(t){for(var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=this.row,i=t.col,a=[],s=t.getCol(),u=0;u<o;u++){a[u]=[];for(var c=function(e){var t=n.arr[u].reduce((function(t,n,r){return t+n*s[e][r]}),0);a[u][e]=t*r},l=0;l<i;l++)c(l)}return new e(a)}},{key:"multipy",value:function(t){for(var n=this.row,r=this.col,o=this.arr,i=[],a=0;a<n;a++){i[a]=[];for(var s=0;s<r;s++)i[a][s]=o[a][s]*t.arr[a][s]}return new e(i)}},{key:"pointMult",value:function(t){for(var n=this.row,r=this.col,o=this.arr,i=[],a=0;a<n;a++){i[a]=[];for(var s=0;s<r;s++)i[a][s]=o[a][s]*t}return new e(i)}},{key:"minus",value:function(t){for(var n=this.row,r=this.col,o=this.arr,i=[],a=0;a<n;a++){i[a]=[];for(var s=0;s<r;s++)i[a][s]=o[a][s]-t.arr[a][s]}return new e(i)}},{key:"transpose",value:function(){for(var t=this.row,n=this.col,r=this.arr,o=[],i=0;i<n;i++){o[i]=[];for(var a=0;a<t;a++)o[i][a]=r[a][i]}return new e(o)}},{key:"slice",value:function(t,n){return new e(this.arr.slice(t,n))}}]),e}(),GZ=[-.072,-.346,-.333,-.296,-.348,-.472,.156,-.366,-.417,-.361,.309,-.521,-.4796,.3,-.604,-.221,.296,-.512,.235,.296,-.46,.105,.291,-.474,.369,.285,-.512,-.225169,-.0925778,-.407935,-.071,-.023,-.13,.0945821,-.0943744,-.362066,-.649,-.198,-1.269,.593,-.236,-1.119,-.44,.502,-.469,.283,.486,-.376,-.575,.479,-.64,-.207,.444,-.388,.11,.445,-.358,.46,.472,-.51,-.068,-.703,-.387,-.0682077,-.284391,-.291888,-.0662728,-.383458,-.318104,-.142852,-.079903,-.269774,.0108861,-.0784876,-.259027,-.593385,.303609,-.719594,.497715,.276949,-.613964],XZ=new HZ([[-.26844819,-.10333455,.11066706,.28908497,-.12304192,.08628528,-.17137159,.12490889,-.03966109,-.34297211,.47149743,-.19553164,.19625587,-.03433842],[.22797247,.22441092,.22564315,.23023704,-.06674456,-.06389647,-.25005912,-.25659303,-.03265345,-.09075621,-.10026758,.23126454,.23132064,-.50987834],[-.04318945,.01956621,.02928017,-.02391375,.14084831,.1578003,.10779272,.12412716,.37154045,-.58593017,-.54288709,.0211159,.03161699,.19223225],[.25999897,.18569295,.09539778,.02480082,.09373256,.00550533,.05728472,-.07053279,.05620414,.22066479,-.12788923,.22662804,.06103472,-.0885228]]);function QZ(e,t,n,r,o){var i=Math.max(e,t)*o;return{size:i,x:n-(i-e)/2,y:r-(i-t)/2}}function YZ(e){var t=e.image,n=e.width,r=e.height,o=e.x0,i=e.y0,a=e.scale,s=void 0===a?1.2:a,u=e.targetWidth,c=e.targetHeight,l=document.createElement("canvas"),f=l.getContext("2d");l.width=u,l.height=c;var h=QZ(n,r,o,i,s),d=h.size,p=h.x,v=h.y;return null==f||f.drawImage(t,p,v,d,d,0,0,u,c),{ctx:f,imageData:null==f?void 0:f.getImageData(0,0,u,c)}}function qZ(e){var t=e.img,n=e.maxW,r=e.maxH,o=t.width,i=t.height,a=Math.max(o/n,i/r,1),s=o/a,u=i/a,c=document.createElement("canvas"),l=c.getContext("2d");return c.width=n,c.height=r,l.fillStyle="#000",l.fillRect(0,0,n,r),null==l||l.drawImage(t,0,0,s,u),{scale:1/a,imageData:null==l?void 0:l.getImageData(0,0,s,u)}}function KZ(e,t,n,r,o,i,a){return new Promise((function(s){var u=document.createElement("canvas"),c=u.getContext("2d"),l=new Image;u.width=t,u.height=n,null==c||c.putImageData(e,0,0),o&&i&&(null==c||c.fillRect(o[0]*i,o[1]*i,o[2]*i,o[3]*i)),a&&function(e,t){e.fillStyle="#FF0000";for(var n=0;n<t.length;n+=2)e.beginPath(),e.arc(t[n],t[n+1],2,0,2*Math.PI),e.closePath(),e.fill()}(c,a),l.src=u.toDataURL(),l.onload=function(){s(l)},r&&document.body.appendChild(u)}))}function JZ(e,t,n){for(var r=new Float32Array(t*n*3),o=0;o<t;o++)for(var i=0;i<n;i++)for(var a=0;a<3;a++){r[o*n*3+3*i+(0===a?2:2===a?0:a)]=e[o*n*4+4*i+a]/255-.5}return r}function ZZ(e){return function(t){return[e[2*t],e[2*t+1]]}}function $Z(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function e$(e){var t=Math.min.apply(Math,U(e.map((function(e){return V(e,1)[0]})))),n=Math.max.apply(Math,U(e.map((function(e){return V(e,1)[0]}))));return[t,Math.min.apply(Math,U(e.map((function(e){return V(e,2)[1]})))),n,Math.max.apply(Math,U(e.map((function(e){return V(e,2)[1]}))))]}function t$(e){var t=ZZ(e),n=V([58,60,62,64].map(t),4),r=n[0],o=n[1],i=n[2];return $Z(o,n[3])/$Z(r,i)>=.5?1:0}function n$(e){for(var t=[4,5,7,8,9,11,1,2,10,12,13,3,6,20],n=[13,17,30,34,50,53,58,62,57,2,10,21,38,6],r=t.length,o=[],i=[],a=0;a<r;a++)o.push([e[2*n[a]]-e[2*n[0]],e[2*n[a]+1]-e[2*n[0]+1]]),i.push([GZ[3*t[a]]-GZ[3*t[0]],GZ[3*t[a]+1]-GZ[3*t[0]+1],GZ[3*t[a]+2]-GZ[3*t[0]+2]]);var s=function(e,t){for(var n=1e3*Math.sqrt(e.arr.reduce((function(e,t){return e+Math.pow(t[0],2)+Math.pow(t[1],2)}),0)),r=e.arr.map((function(e){return[e[0]/n,e[1]/n]})),o=r.reduce((function(e,t,n){return e[0][n]=[t[0]],e[1][n]=[t[1]],e[2][n]=[1],e}),[[],[],[]]),i=V(o,3),a=i[0],s=i[1],u=i[2],c=new HZ(t.arr.map((function(e){return[].concat(U(e),[1])}))),l=new HZ(a),f=new HZ(s),h=new HZ(u),d=!1,p=0,v=[],g=[],m=[];!d;){var y=XZ.mult(l),b=XZ.mult(f),w=1/Math.sqrt(Math.pow(y.arr[0][0],2)+Math.pow(y.arr[1][0],2)+Math.pow(y.arr[2][0],2)),A=1/Math.sqrt(Math.pow(b.arr[0][0],2)+Math.pow(b.arr[1][0],2)+Math.pow(b.arr[2][0],2)),x=Math.sqrt(w*A),T=y.pointMult(x),P=b.pointMult(x);v=T.slice(0,3),g=P.slice(0,3),m=[[v.arr[1][0]*g.arr[2][0]-v.arr[2][0]*g.arr[1][0]],[v.arr[2][0]*g.arr[0][0]-v.arr[0][0]*g.arr[2][0]],[v.arr[0][0]*g.arr[1][0]-v.arr[1][0]*g.arr[0][0]]];var C=new HZ([].concat(U(m),[[x]])),_=(h=c.mult(C,1/x)).multipy(l),E=h.multipy(f),S=_.minus(l),k=E.minus(f);l=_,f=E;var R=S.transpose().mult(S).arr[0][0],O=k.transpose().mult(k).arr[0][0],F=Math.pow(1e3,2)*R+O;d=p>0&&p<10&&F<1,p+=1}return[[v.arr[0][0],v.arr[1][0],v.arr[2][0]],[g.arr[0][0],g.arr[1][0],g.arr[2][0]],[m[0][0],m[1][0],m[2][0]]]}(new HZ(o),new HZ(i)),u=V(function(e){var t=1e-5,n=e[0][0],r=e[0][1],o=e[0][2],i=e[1][0],a=e[2][0],s=e[2][1],u=e[2][2],c=0,l=0,f=0;if(Math.abs(1-a)<=t||Math.abs(-1-a)<=t)f=0,l=Math.PI/2,c=Math.atan2(r,o);else{l=Math.asin(-a);var h=Math.cos(l);c=Math.atan2(s/h,u/h),f=Math.atan2(i/h,n/h)}return[c,l,f]}(s),3),c=u[0],l=u[1],f=u[2];return[c=180*(c=c>0?c-Math.PI:c+Math.PI)/Math.PI,l=180*l/Math.PI,f=180*f/Math.PI]}function r$(e){for(var t=e.data,n=e.width,r=e.height,o=0,i=n*r,a=0;a<n;a++)for(var s=0;s<r;s++){var u=4*(a*r+s);o+=(.299*t[u]+.587*t[u+1]+.114*t[u+2])/255}return o/i}function o$(e,t,n){var r=V(t,4),o=r[0],i=r[1],a=r[2],s=r[3],u=function(e,t){var n=V(e,2),r=n[0],o=n[1],i=V(t,2),a=i[0],s=i[1],u=a/r,c=s/o,l=Math.max(u,c);return[(r*l-a)/2/l,(o*l-s)/2/l,a/l,s/l]}(e,null!=n?n:[216,216]),c=V(u,4),l=c[0],f=c[1],h=c[2],d=c[3];return{inCover:o>=l&&o+a<=l+h&&i>=f&&i+s<=f+d,ratio:a*s/(Math.PI*Math.pow(h/2,2))}}var i$=function(e,t){var n=V(t,4),r=n[0],o=n[1],i=n[2],a=n[3],s=V(e,4),u=s[0],c=s[1],l=s[2],f=r+i/2,h=o+a/2,d=u+l/2,p=c+s[3]/2,v=Math.sqrt((d-f)*(d-f)+(p-h)*(p-h));return Math.max(v/l,v/i)},a$=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8,r=i$(e,t);return r>n};function s$(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:15,o=n$(t),i=V(o,2),a=i[0],s=i[1];switch(e){case"headleft":return s<=-n;case"headright":return s>=r;case"lookup":return a<=0;case"lookdown":return a>=12;default:return!1}}function u$(e){var t,n=0,r=0,o=H(e);try{for(o.s();!(t=o.n()).done;){var i=t.value;"0"===i&&n++,"1"===i&&r++}}catch(a){o.e(a)}finally{o.f()}return[n,r]}function c$(e){return-e.angles.reduce((function(e,t){return Math.abs(e)+Math.abs(t)}),0)}var l$=function(){function e(t){var n=this;O(this,e),I(this,"loaded",!0),I(this,"bbox",void 0),I(this,"img",void 0),I(this,"tw",320),I(this,"th",240),I(this,"scale",1),I(this,"runner",void 0),I(this,"pathPrefix",void 0),I(this,"preheat",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.runner.preheat();case 1:case"end":return e.stop()}}),e)})))),I(this,"destroy",(function(){n.runner&&n.runner.dispose()})),this.pathPrefix=t}var t,n,r;return M(e,[{key:"load",value:(r=R(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.pathPrefix,n=new zZ.exports.Runner({modelPath:t+"/models/detect/model.json",fileCount:1,feedShape:{fw:this.tw,fh:this.th},targetSize:{height:this.th,width:this.tw},normalizeScale:.007843,mean:[104,117,123],normalizeType:2,bgr:2,needPreheat:!0}),e.next=4,n.init();case 4:this.runner=n;case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"predict",value:(n=R(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u,c,l,f,h,d,p,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.runner.predict(t);case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0=[];case 5:if(n=(n=e.t0).filter((function(e){return e[1]>=.3})),0!==(r=n.length)){e.next=10;break}return e.abrupt("return",{count:0,probability:-1,bbox:[0,0,0,0]});case 10:return o=V(n[0],6),i=o[1],a=o[2],s=o[3],u=o[4],c=o[5],l=this.img,f=l.width,h=l.height,d=this.scale,p=320/(f*d),v=240/(h*d),e.abrupt("return",{count:r,probability:i,bbox:[a*f*p,s*h*v,(u-a)*f*p,(c-s)*h*v]});case 16:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"run",value:(t=R(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.loaded){e.next=4;break}return e.next=3,this.load();case 3:this.loaded=!0;case 4:return this.img=t,n=this.tw,r=this.th,o=qZ({img:t,maxW:n,maxH:r}),i=o.scale,a=o.imageData,this.scale=i,s=r$(a),e.next=11,this.predict(t);case 11:return u=e.sent,e.abrupt("return",E(E({},u),{},{brightness:s}));case 13:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),f$=function(){function e(t){var n=this;O(this,e),I(this,"loaded",!0),I(this,"img",void 0),I(this,"tw",128),I(this,"th",128),I(this,"runner",void 0),I(this,"pathPrefix",void 0),I(this,"imageData",void 0),I(this,"destroy",(function(){n.runner&&n.runner.dispose()})),this.pathPrefix=t}var t,n,r,o;return M(e,[{key:"load",value:(o=R(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.pathPrefix,n=new zZ.exports.Runner({modelPath:t+"/models/align/model.json",fileCount:1,feedShape:{fw:this.tw,fh:this.th},needPreheat:!1}),e.next=4,n.init();case 4:this.runner=n;case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"preheat",value:(r=R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.runner.preheat();case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"predict",value:(n=R(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.runner.predictWithFeed(t);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"run",value:(t=R(regeneratorRuntime.mark((function e(t,n){var r,o,i,a,s,u,c,l,f,h,d,p,v,g,m,y,b,w,A,x,T,P;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.loaded){e.next=4;break}return e.next=3,this.load();case 3:this.loaded=!0;case 4:if(o=V(n,4),i=o[0],a=o[1],s=o[2],u=o[3],c=this.tw,l=this.th,f=QZ(s,u,i,a,1.5),h=f.size,d=f.x,p=f.y,"function"!=typeof window.createImageBitmap){e.next=20;break}return e.next=10,createImageBitmap(t,d,p,h,h,{resizeWidth:c,resizeHeight:l});case 10:v=e.sent,(g=document.createElement("canvas")).width=c,g.height=l,null==(m=g.getContext("2d"))||m.drawImage(v,0,0),y=null==m?void 0:m.getImageData(0,0,c,l),this.imageData=y,e.next=22;break;case 20:b=YZ({image:t,width:s,height:u,x0:i,y0:a,targetWidth:c,targetHeight:l,scale:1.5}),w=b.imageData,this.imageData=w;case 22:return A={data:JZ(null===(r=this.imageData)||void 0===r?void 0:r.data,l,c),shape:[1,3,l,c],name:"image"},e.next=25,this.predict(A);case 25:return x=e.sent,T=x[0]["save_infer_model/scale_0.tmp_0"],P=x[1]["save_infer_model/scale_1.tmp_0"],e.abrupt("return",{pts:T,occlusion:P});case 29:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),e}();I(f$,"DEFAULT_WIDTH",128),I(f$,"DEFAULT_HEIGHT",128);var h$=function(){function e(t){var n=this;O(this,e),I(this,"runner",void 0),I(this,"pathPrefix",void 0),I(this,"preheat",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.runner.preheat();case 2:case"end":return e.stop()}}),e)})))),I(this,"destroy",(function(){n.runner&&n.runner.dispose()})),this.pathPrefix=t}var t,n,r;return M(e,[{key:"load",value:(r=R(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.pathPrefix,r=new zZ.exports.Runner({modelPath:n+"/models/eyes/model.json",feedShape:{fw:e.DEFAULT_WIDTH,fh:e.DEFAULT_HEIGHT},fill:"#000",needPreheat:!1}),t.next=4,r.init();case 4:this.runner=r;case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"run",value:(n=R(regeneratorRuntime.mark((function e(t,n){var r,o,i,a,s,u,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ZZ(t),o=[13,14,15,16,17,18,19,20].map(r),e.next=4,this.getEyeFeedData(o,n);case 4:return i=e.sent,e.next=7,this.runner.predictWithFeed(i);case 7:return a=e.sent,s=[30,31,32,33,34,35,36,37].map(r),e.next=11,this.getEyeFeedData(s,n);case 11:return u=e.sent,e.next=14,this.runner.predictWithFeed(u);case 14:return c=e.sent,e.abrupt("return",{leftRes:a,rightRes:c});case 16:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getEyeFeedData",value:(t=R(regeneratorRuntime.mark((function t(n,r){var o,i,a,s,u,c,l,f,h,d,p,v;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e$(n),i=V(o,4),a=i[0],s=i[1],u=i[2],c=i[3],l=u-a,f=c-s,h=null,"function"!=typeof window.createImageBitmap){t.next=11;break}return t.next=8,createImageBitmap(r);case 8:h=t.sent,t.next=14;break;case 11:return t.next=13,KZ(r,f$.DEFAULT_WIDTH,f$.DEFAULT_HEIGHT,!1,null,null);case 13:h=t.sent;case 14:return d=YZ({image:h,width:l,height:f,x0:a,y0:s,targetWidth:e.DEFAULT_WIDTH,targetHeight:e.DEFAULT_HEIGHT,scale:1.8}),p=d.imageData,v={data:JZ(null==p?void 0:p.data,e.DEFAULT_HEIGHT,e.DEFAULT_WIDTH),shape:[1,3,e.DEFAULT_HEIGHT,e.DEFAULT_WIDTH],name:"image"},t.abrupt("return",v);case 17:case"end":return t.stop()}}),t)}))),function(e,n){return t.apply(this,arguments)})}]),e}();I(h$,"DEFAULT_WIDTH",56),I(h$,"DEFAULT_HEIGHT",36);var d$,p$=zZ.exports.coreUtils.findVarByKey,v$=function(){function e(t){var n=this;O(this,e),I(this,"img",void 0),I(this,"runner",void 0),I(this,"pathPrefix",void 0),I(this,"sliceMeans",void 0),I(this,"destroy",(function(){n.runner&&n.runner.dispose()})),this.pathPrefix=t}var t,n;return M(e,[{key:"load",value:(n=R(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.pathPrefix,n=new zZ.exports.Runner({modelPath:t+"/models/pd_paddle/model.json",needPreheat:!1}),e.next=4,n.init();case 4:this.runner=n;case 5:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getMean",value:function(e){var t=e.getContext("2d").getImageData(0,0,e.width,e.height);return function(e,t,n){for(var r=t*n,o=[0,0,0],i=0;i<t;i++)for(var a=0;a<n;a++)for(var s=0;s<3;s++)o[s]+=e[i*n*4+4*a+s];return o.map((function(e){return e/r}))}(null==t?void 0:t.data,null==t?void 0:t.width,null==t?void 0:t.height)}},{key:"predict",value:(t=R(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u,c,l=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.runner.weightMap,r=t.slice(Math.floor(.14*t.length),Math.ceil(.89*t.length)),this.sliceMeans=r,o=r.length,i=r.flat(1/0),a=function(e){Array.from(e,(function(e){var t=e.tensorId,n=p$(l.runner.model.vars,t.slice(t.indexOf("_")+1));n.shape=n.shape.map((function(e){switch(e){case 256:return o;case 255:return o-1;default:return e}}))}))},s=function(e){var t=n[e];if(null==t||!t.opData)return"continue";var r=t.opData,o=t.inputs,i=t.outputs,s=r.inputTensors,u=void 0===s?[]:s,c=r.outputTensors,f=void 0===c?[]:c,h=r.iLayer;a(u),a(f);var d={},p={};Object.keys(i).forEach((function(e){i[e].forEach((function(t){p[e]||(p[e]=[]),p[e].push(t.name)}))})),Object.keys(o).forEach((function(e){o[e].forEach((function(t){d[e]||(d[e]=[]),d[e].push(t.name)}))})),t.inputs=d,t.outputs=p,t.opData=new zZ.exports.OpData(t,h,l.runner.model,!1,l.runner.modelName)},u=0;case 8:if(!(u<18)){e.next=15;break}if("continue"!==s(u)){e.next=12;break}return e.abrupt("continue",12);case 12:u++,e.next=8;break;case 15:return this.runner.isExecuted=!1,e.next=18,this.runner.predictWithFeed(i,null,[1,1,o,3],!0);case 18:return c=e.sent,e.abrupt("return",c);case 20:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"conversion2DArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=e.length,r=n/t,o=[],i=0;i<r;i++){var a=e.slice(i*t,i*t+t);o.push(a)}return o}},{key:"getAverageArray",value:function(e,t){var n=[];return e.forEach((function(e,r){t.forEach((function(t,o){if(r===o){var i=t[e];n.push(i)}}))})),n}},{key:"getAverage",value:function(e){return e.reduce((function(e,t){return e+t}))/e.length}},{key:"calculateAverage",value:function(e,t){var n=this.conversion2DArray(t),r=this.getAverageArray(e,n);return this.getAverage(r)}}]),e}(),g$={code:"".concat(Math.round(Math.random())),modelPath:"",needToEncryptDataURL:!1,needToRecord:!1,constraints:{video:!0,audio:!1},timeout:15e3,actionTimeout:1e4,minFaceRatio:.2,maxFaceRatio:.8,randomMotionDetection:!0,isOriginImage:!0,colorRunAction:!0,autoloadModels:!0,maxSizeKB:70,trackingThreshold:1,occlusion:{eye:.8,mouse:.8,nose:.8,leftFace:.8,rightFace:.8,chin:.8},outputImgType:"image/jpeg"};!function(e){e[e.silence=0]="silence",e[e.action=1]="action",e[e.colorful=2]="colorful"}(d$||(d$={}));var m$=!0,y$=!0;function b$(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function w$(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,o=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return o.apply(this,arguments);var i=function(e){var t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,i),o.apply(this,[e,i])};var i=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return i.apply(this,arguments);if(!this._eventMap[t].has(n))return i.apply(this,arguments);var r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,i.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}}function A$(e){return"boolean"!=typeof e?new Error("Argument type: "+S(e)+". Please use a boolean."):(m$=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function x$(e){return"boolean"!=typeof e?new Error("Argument type: "+S(e)+". Please use a boolean."):(y$=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function T$(){if("object"===("undefined"==typeof window?"undefined":S(window))){if(m$)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function P$(e,t){y$&&console.warn(e+" is deprecated, please use "+t+" instead.")}function C$(e){var t={browser:null,version:null};if(void 0===e||!e.navigator)return t.browser="Not a browser.",t;var n=e.navigator;if(n.mozGetUserMedia)t.browser="firefox",t.version=b$(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection&&!e.RTCIceGatherer)t.browser="chrome",t.version=b$(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=b$(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t}function _$(e){return"[object Object]"===Object.prototype.toString.call(e)}function E$(e){return _$(e)?Object.keys(e).reduce((function(t,n){var r=_$(e[n]),o=r?E$(e[n]):e[n],i=r&&!Object.keys(o).length;return void 0===o||i?t:Object.assign(t,I({},n,o))}),{}):e}function S$(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach((function(r){r.endsWith("Id")?S$(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach((function(t){S$(e,e.get(t),n)}))})))}function k$(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",o=new Map;if(null===t)return o;var i=[];return e.forEach((function(e){"track"===e.type&&e.trackIdentifier===t.id&&i.push(e)})),i.forEach((function(t){e.forEach((function(n){n.type===r&&n.trackId===t.id&&S$(e,n,o)}))})),o}var R$=T$;function O$(e,t){var n=e&&e.navigator;if(n.mediaDevices){var r=function(e){if("object"!==S(e)||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach((function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r="object"===S(e[n])?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var o=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];var i={};"number"==typeof r.ideal?(i[o("min",n)]=r.ideal,t.optional.push(i),(i={})[o("max",n)]=r.ideal,t.optional.push(i)):(i[o("",n)]=r.ideal,t.optional.push(i))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[o("",n)]=r.exact):["min","max"].forEach((function(e){void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[o(e,n)]=r[e])}))}})),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},o=function(e,o){if(t.version>=61)return o(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"===S(e.audio)){var i=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};i((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),i(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"===S(e.video)){var a=e.video.facingMode;a=a&&("object"===S(a)?a:{ideal:a});var s,u=t.version<66;if(a&&("user"===a.exact||"environment"===a.exact||"user"===a.ideal||"environment"===a.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||u))if(delete e.video.facingMode,"environment"===a.exact||"environment"===a.ideal?s=["back","rear"]:"user"!==a.exact&&"user"!==a.ideal||(s=["front"]),s)return n.mediaDevices.enumerateDevices().then((function(t){var n=(t=t.filter((function(e){return"videoinput"===e.kind}))).find((function(e){return s.some((function(t){return e.label.toLowerCase().includes(t)}))}));return!n&&t.length&&s.includes("back")&&(n=t[t.length-1]),n&&(e.video.deviceId=a.exact?{exact:n.deviceId}:{ideal:n.deviceId}),e.video=r(e.video),R$("chrome: "+JSON.stringify(e)),o(e)}));e.video=r(e.video)}return R$("chrome: "+JSON.stringify(e)),o(e)},i=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){o(e,(function(e){n.webkitGetUserMedia(e,t,(function(e){r&&r(i(e))}))}))}.bind(n),n.mediaDevices.getUserMedia){var a=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(e){return o(e,(function(e){return a(e).then((function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw t.getTracks().forEach((function(e){e.stop()})),new DOMException("","NotFoundError");return t}),(function(e){return Promise.reject(i(e))}))}))}}}}function F$(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function M$(e){if("object"===S(e)&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var n=this;return this._ontrackpoly||(this._ontrackpoly=function(t){t.stream.addEventListener("addtrack",(function(r){var o;o=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find((function(e){return e.track&&e.track.id===r.track.id})):{track:r.track};var i=new Event("track");i.track=r.track,i.receiver=o,i.transceiver={receiver:o},i.streams=[t.stream],n.dispatchEvent(i)})),t.stream.getTracks().forEach((function(r){var o;o=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find((function(e){return e.track&&e.track.id===r.id})):{track:r};var i=new Event("track");i.track=r,i.receiver=o,i.transceiver={receiver:o},i.streams=[t.stream],n.dispatchEvent(i)}))},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else w$(e,"track",(function(e){return e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e}))}function I$(e){if("object"===S(e)&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){var t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){var o=n.apply(this,arguments);return o||(o=t(this,e),this._senders.push(o)),o};var r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);var t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}var o=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._senders=this._senders||[],o.apply(this,[e]),e.getTracks().forEach((function(e){n._senders.push(t(n,e))}))};var i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;this._senders=this._senders||[],i.apply(this,[e]),e.getTracks().forEach((function(e){var n=t._senders.find((function(t){return t.track===e}));n&&t._senders.splice(t._senders.indexOf(n),1)}))}}else if("object"===S(e)&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){var a=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var e=this,t=a.apply(this,[]);return t.forEach((function(t){return t._pc=e})),t},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function D$(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var e=this,n=Array.prototype.slice.call(arguments),r=n[0],o=n[1],i=n[2];if(arguments.length>0&&"function"==typeof r)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof r))return t.apply(this,[]);var a=function(e){var t={};return e.result().forEach((function(e){var n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach((function(t){n[t]=e.stat(t)})),t[n.id]=n})),t},s=function(e){return new Map(Object.keys(e).map((function(t){return[t,e[t]]})))};if(arguments.length>=2){var u=function(e){o(s(a(e)))};return t.apply(this,[u,r])}return new Promise((function(n,r){t.apply(e,[function(e){n(s(a(e)))},r])})).then(o,i)}}}function L$(e){if("object"===S(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver){if(!("getStats"in e.RTCRtpSender.prototype)){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n});var n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){var e=this;return this._pc.getStats().then((function(t){return k$(t,e.track,!0)}))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){var r=e.RTCPeerConnection.prototype.getReceivers;r&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,t=r.apply(this,[]);return t.forEach((function(t){return t._pc=e})),t}),w$(e,"track",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){var e=this;return this._pc.getStats().then((function(t){return k$(t,e.track,!1)}))}}if("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype){var o=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){var t,n,r,i=arguments[0];return this.getSenders().forEach((function(e){e.track===i&&(t?r=!0:t=e)})),this.getReceivers().forEach((function(e){return e.track===i&&(n?r=!0:n=e),e.track===i})),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return o.apply(this,arguments)}}}}function j$(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((function(t){return e._shimmedLocalStreams[t][0]}))};var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};var n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var t=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach((function(e){if(t.getSenders().find((function(t){return t.track===e})))throw new DOMException("Track already exists.","InvalidAccessError")}));var r=this.getSenders();n.apply(this,arguments);var o=this.getSenders().filter((function(e){return-1===r.indexOf(e)}));this._shimmedLocalStreams[e.id]=[e].concat(o)};var r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};var o=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach((function(n){var r=t._shimmedLocalStreams[n].indexOf(e);-1!==r&&t._shimmedLocalStreams[n].splice(r,1),1===t._shimmedLocalStreams[n].length&&delete t._shimmedLocalStreams[n]})),o.apply(this,arguments)}}function B$(e,t){if(e.RTCPeerConnection){if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return j$(e);var n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this,t=n.apply(this);return this._reverseStreams=this._reverseStreams||{},t.map((function(t){return e._reverseStreams[t.id]}))};var r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){var n=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach((function(e){if(n.getSenders().find((function(t){return t.track===e})))throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[t.id]){var o=new e.MediaStream(t.getTracks());this._streams[t.id]=o,this._reverseStreams[o.id]=t,t=o}r.apply(this,[t])};var o=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},o.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){var r=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var o=[].slice.call(arguments,1);if(1!==o.length||!o[0].getTracks().find((function(e){return e===t})))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");var i=this.getSenders().find((function(e){return e.track===t}));if(i)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var a=this._streams[n.id];if(a)a.addTrack(t),Promise.resolve().then((function(){r.dispatchEvent(new Event("negotiationneeded"))}));else{var s=new e.MediaStream([t]);this._streams[n.id]=s,this._reverseStreams[s.id]=n,this.addStream(s)}return this.getSenders().find((function(e){return e.track===t}))},["createOffer","createAnswer"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],r=I({},t,(function(){var e=this,t=arguments,r=arguments.length&&"function"==typeof arguments[0];return r?n.apply(this,[function(n){var r=s(e,n);t[0].apply(null,[r])},function(e){t[1]&&t[1].apply(null,e)},arguments[2]]):n.apply(this,arguments).then((function(t){return s(e,t)}))}));e.RTCPeerConnection.prototype[t]=r[t]}));var i=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=u(this,arguments[0]),i.apply(this,arguments)):i.apply(this,arguments)};var a=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get:function(){var e=a.get.apply(this);return""===e.type?e:s(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){var t,n=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{},Object.keys(this._streams).forEach((function(r){n._streams[r].getTracks().find((function(t){return e.track===t}))&&(t=n._streams[r])})),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function s(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((function(t){var r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(o.id,"g"),r.id)})),new RTCSessionDescription({type:t.type,sdp:n})}function u(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((function(t){var r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),o.id)})),new RTCSessionDescription({type:t.type,sdp:n})}}function N$(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],r=I({},t,(function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}));e.RTCPeerConnection.prototype[t]=r[t]}))}function V$(e,t){w$(e,"negotiationneeded",(function(e){var n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e}))}var U$=Object.freeze({__proto__:null,shimMediaStream:F$,shimOnTrack:M$,shimGetSendersWithDtmf:I$,shimGetStats:D$,shimSenderReceiverGetStats:L$,shimAddTrackRemoveTrackWithNative:j$,shimAddTrackRemoveTrack:B$,shimPeerConnection:N$,fixNegotiationNeeded:V$,shimGetUserMedia:O$,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then((function(t){var r=n.video&&n.video.width,o=n.video&&n.video.height,i=n.video&&n.video.frameRate;return n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:i||3}},r&&(n.video.mandatory.maxWidth=r),o&&(n.video.mandatory.maxHeight=o),e.navigator.mediaDevices.getUserMedia(n)}))}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}});function W$(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){P$("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var o=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},i=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(e){return"object"===S(e)&&"object"===S(e.audio)&&(e=JSON.parse(JSON.stringify(e)),o(e.audio,"autoGainControl","mozAutoGainControl"),o(e.audio,"noiseSuppression","mozNoiseSuppression")),i(e)},r&&r.prototype.getSettings){var a=r.prototype.getSettings;r.prototype.getSettings=function(){var e=a.apply(this,arguments);return o(e,"mozAutoGainControl","autoGainControl"),o(e,"mozNoiseSuppression","noiseSuppression"),e}}if(r&&r.prototype.applyConstraints){var s=r.prototype.applyConstraints;r.prototype.applyConstraints=function(e){return"audio"===this.kind&&"object"===S(e)&&(e=JSON.parse(JSON.stringify(e)),o(e,"autoGainControl","mozAutoGainControl"),o(e,"noiseSuppression","mozNoiseSuppression")),s.apply(this,[e])}}}}function z$(e){"object"===S(e)&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function H$(e,t){if("object"===S(e)&&(e.RTCPeerConnection||e.mozRTCPeerConnection)){!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],r=I({},t,(function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}));e.RTCPeerConnection.prototype[t]=r[t]}));var n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var e=Array.prototype.slice.call(arguments),o=e[0],i=e[1],a=e[2];return r.apply(this,[o||null]).then((function(e){if(t.version<53&&!i)try{e.forEach((function(e){e.type=n[e.type]||e.type}))}catch(yK){if("TypeError"!==yK.name)throw yK;e.forEach((function(t,r){e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))}))}return e})).then(i,a)}}}function G$(e){if("object"===S(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!("getStats"in e.RTCRtpSender.prototype))){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n});var n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}}function X$(e){if("object"===S(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!("getStats"in e.RTCRtpReceiver.prototype))){var t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n}),w$(e,"track",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}}function Q$(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;P$("removeStream","removeTrack"),this.getSenders().forEach((function(n){n.track&&e.getTracks().includes(n.track)&&t.removeTrack(n)}))})}function Y$(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function q$(e){if("object"===S(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var e=arguments[1],n=e&&"sendEncodings"in e;n&&e.sendEncodings.forEach((function(e){if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));var r=t.apply(this,arguments);if(n){var o=r.sender,i=o.getParameters();(!("encodings"in i)||1===i.encodings.length&&0===Object.keys(i.encodings[0]).length)&&(i.encodings=e.sendEncodings,o.sendEncodings=e.sendEncodings,this.setParametersPromises.push(o.setParameters(i).then((function(){delete o.sendEncodings})).catch((function(){delete o.sendEncodings}))))}return r})}}function K$(e){if("object"===S(e)&&e.RTCRtpSender){var t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){var e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}}function J$(e){if("object"===S(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){var e=arguments,n=this;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return t.apply(n,e)})).finally((function(){n.setParametersPromises=[]})):t.apply(this,arguments)}}}function Z$(e){if("object"===S(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){var e=arguments,n=this;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return t.apply(n,e)})).finally((function(){n.setParametersPromises=[]})):t.apply(this,arguments)}}}var $$=Object.freeze({__proto__:null,shimOnTrack:z$,shimPeerConnection:H$,shimSenderGetStats:G$,shimReceiverGetStats:X$,shimRemoveStream:Q$,shimRTCDataChannel:Y$,shimAddTransceiver:q$,shimGetParameters:K$,shimCreateOffer:J$,shimCreateAnswer:Z$,shimGetUserMedia:W$,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){var r=new DOMException("getDisplayMedia without video constraints is undefined");return r.name="NotFoundError",r.code=8,Promise.reject(r)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}});function e0(e){if("object"===S(e)&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach((function(r){return t.call(n,r,e)})),e.getVideoTracks().forEach((function(r){return t.call(n,r,e)}))},e.RTCPeerConnection.prototype.addTrack=function(e){for(var n=this,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o&&o.forEach((function(e){n._localStreams?n._localStreams.includes(e)||n._localStreams.push(e):n._localStreams=[e]})),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;this._localStreams||(this._localStreams=[]);var n=this._localStreams.indexOf(e);if(-1!==n){this._localStreams.splice(n,1);var r=e.getTracks();this.getSenders().forEach((function(e){r.includes(e.track)&&t.removeTrack(e)}))}})}}function t0(e){if("object"===S(e)&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(e){var t=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=function(e){e.streams.forEach((function(e){if(t._remoteStreams||(t._remoteStreams=[]),!t._remoteStreams.includes(e)){t._remoteStreams.push(e);var n=new Event("addstream");n.stream=e,t.dispatchEvent(n)}}))})}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach((function(t){if(e._remoteStreams||(e._remoteStreams=[]),!(e._remoteStreams.indexOf(t)>=0)){e._remoteStreams.push(t);var n=new Event("addstream");n.stream=t,e.dispatchEvent(n)}}))}),t.apply(e,arguments)}}}function n0(e){if("object"===S(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,o=t.setLocalDescription,i=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){var r=arguments.length>=2?arguments[2]:arguments[0],o=n.apply(this,[r]);return t?(o.then(e,t),Promise.resolve()):o},t.createAnswer=function(e,t){var n=arguments.length>=2?arguments[2]:arguments[0],o=r.apply(this,[n]);return t?(o.then(e,t),Promise.resolve()):o};var s=function(e,t,n){var r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=s,s=function(e,t,n){var r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=s,s=function(e,t,n){var r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=s}}function r0(e){var t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){var n=t.mediaDevices,r=n.getUserMedia.bind(n);t.mediaDevices.getUserMedia=function(e){return r(o0(e))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function o0(e){return e&&void 0!==e.video?Object.assign({},e,{video:E$(e.video)}):e}function i0(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){for(var r=[],o=0;o<e.iceServers.length;o++){var i=e.iceServers[o];!i.hasOwnProperty("urls")&&i.hasOwnProperty("url")?(P$("RTCIceServer.url","RTCIceServer.urls"),(i=JSON.parse(JSON.stringify(i))).urls=i.url,delete i.url,r.push(i)):r.push(e.iceServers[o])}e.iceServers=r}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return t.generateCertificate}})}}function a0(e){"object"===S(e)&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function s0(e){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);var n=this.getTransceivers().find((function(e){return"audio"===e.receiver.track.kind}));!1===e.offerToReceiveAudio&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveAudio||n||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);var r=this.getTransceivers().find((function(e){return"video"===e.receiver.track.kind}));!1===e.offerToReceiveVideo&&r?"sendrecv"===r.direction?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":"recvonly"===r.direction&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):!0!==e.offerToReceiveVideo||r||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function u0(e){"object"!==S(e)||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var c0=Object.freeze({__proto__:null,shimLocalStreamsAPI:e0,shimRemoteStreamsAPI:t0,shimCallbacksAPI:n0,shimGetUserMedia:r0,shimConstraints:o0,shimRTCIceServerUrls:i0,shimTrackEventTransceiver:a0,shimCreateOfferLegacy:s0,shimAudioContext:u0}),l0={exports:{}};!function(e){var t={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map((function(e){return e.trim()}))},t.splitSections=function(e){return e.split("\nm=").map((function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"}))},t.getDescription=function(e){var n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){var n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter((function(e){return 0===e.indexOf(n)}))},t.parseCandidate=function(e){for(var t,n={foundation:(t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "))[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]},r=8;r<t.length;r+=2)switch(t[r]){case"raddr":n.relatedAddress=t[r+1];break;case"rport":n.relatedPort=parseInt(t[r+1],10);break;case"tcptype":n.tcpType=t[r+1];break;case"ufrag":n.ufrag=t[r+1],n.usernameFragment=t[r+1];break;default:void 0===n[t[r]]&&(n[t[r]]=t[r+1])}return n},t.writeCandidate=function(e){var t=[];t.push(e.foundation);var n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);var r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substr(14).split(" ")},t.parseRtpMap=function(e){var t=e.substr(9).split(" "),n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){var t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);var n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){var t=e.substr(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1]}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},t.parseFmtp=function(e){for(var t,n={},r=e.substr(e.indexOf(" ")+1).split(";"),o=0;o<r.length;o++)n[(t=r[o].trim().split("="))[0].trim()]=t[1];return n},t.writeFmtp=function(e){var t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){var r=[];Object.keys(e.parameters).forEach((function(t){void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)})),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){var t=e.substr(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){var t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach((function(e){t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"})),t},t.parseSsrcMedia=function(e){var t=e.indexOf(" "),n={ssrc:parseInt(e.substr(7,t-7),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substr(t+1,r-t-1),n.value=e.substr(r+1)):n.attribute=e.substr(t+1),n},t.parseSsrcGroup=function(e){var t=e.substr(13).split(" ");return{semantics:t.shift(),ssrcs:t.map((function(e){return parseInt(e,10)}))}},t.getMid=function(e){var n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substr(6)},t.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach((function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"})),n},t.parseCryptoLine=function(e){var t=e.substr(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"===S(e.keyParams)?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;var t=e.substr(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){var r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],o=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&o?{usernameFragment:r.substr(12),password:o.substr(10)}:null},t.writeIceParameters=function(e){var t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){for(var n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" "),o=3;o<r.length;o++){var i=r[o],a=t.matchPrefix(e,"a=rtpmap:"+i+" ")[0];if(a){var s=t.parseRtpMap(a),u=t.matchPrefix(e,"a=fmtp:"+i+" ");switch(s.parameters=u.length?t.parseFmtp(u[0]):{},s.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+i+" ").map(t.parseRtcpFb),n.codecs.push(s),s.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(s.name.toUpperCase())}}}return t.matchPrefix(e,"a=extmap:").forEach((function(e){n.headerExtensions.push(t.parseExtmap(e))})),n},t.writeRtpDescription=function(e,n){var r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" UDP/TLS/RTP/SAVPF ",r+=n.codecs.map((function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType})).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach((function(e){r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)}));var o=0;return n.codecs.forEach((function(e){e.maxptime>o&&(o=e.maxptime)})),o>0&&(r+="a=maxptime:"+o+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach((function(e){r+=t.writeExtmap(e)})),r},t.parseRtpEncodingParameters=function(e){var n,r=[],o=t.parseRtpParameters(e),i=-1!==o.fecMechanisms.indexOf("RED"),a=-1!==o.fecMechanisms.indexOf("ULPFEC"),s=t.matchPrefix(e,"a=ssrc:").map((function(e){return t.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute})),u=s.length>0&&s[0].ssrc,c=t.matchPrefix(e,"a=ssrc-group:FID").map((function(e){return e.substr(17).split(" ").map((function(e){return parseInt(e,10)}))}));c.length>0&&c[0].length>1&&c[0][0]===u&&(n=c[0][1]),o.codecs.forEach((function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var t={ssrc:u,codecPayloadType:parseInt(e.parameters.apt,10)};u&&n&&(t.rtx={ssrc:n}),r.push(t),i&&((t=JSON.parse(JSON.stringify(t))).fec={ssrc:u,mechanism:a?"red+ulpfec":"red"},r.push(t))}})),0===r.length&&u&&r.push({ssrc:u});var l=t.matchPrefix(e,"b=");return l.length&&(l=0===l[0].indexOf("b=TIAS:")?parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")?1e3*parseInt(l[0].substr(5),10)*.95-16e3:void 0,r.forEach((function(e){e.maxBitrate=l}))),r},t.parseRtcpParameters=function(e){var n={},r=t.matchPrefix(e,"a=ssrc:").map((function(e){return t.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute}))[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);var o=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=o.length>0,n.compound=0===o.length;var i=t.matchPrefix(e,"a=rtcp-mux");return n.mux=i.length>0,n},t.writeRtcpParameters=function(e){var t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){var n,r=t.matchPrefix(e,"a=msid:");if(1===r.length)return{stream:(n=r[0].substr(7).split(" "))[0],track:n[1]};var o=t.matchPrefix(e,"a=ssrc:").map((function(e){return t.parseSsrcMedia(e)})).filter((function(e){return"msid"===e.attribute}));return o.length>0?{stream:(n=o[0].value.split(" "))[0],track:n[1]}:void 0},t.parseSctpDescription=function(e){var n,r=t.parseMLine(e),o=t.matchPrefix(e,"a=max-message-size:");o.length>0&&(n=parseInt(o[0].substr(19),10)),isNaN(n)&&(n=65536);var i=t.matchPrefix(e,"a=sctp-port:");if(i.length>0)return{port:parseInt(i[0].substr(12),10),protocol:r.fmt,maxMessageSize:n};var a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){var s=a[0].substr(10).split(" ");return{port:parseInt(s[0],10),protocol:s[1],maxMessageSize:n}}},t.writeSctpDescription=function(e,t){var n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,21)},t.writeSessionBoilerplate=function(e,n,r){var o=void 0!==n?n:2;return"v=0\r\no="+(r||"thisisadapterortc")+" "+(e||t.generateSessionId())+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){for(var r=t.splitLines(e),o=0;o<r.length;o++)switch(r[o]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[o].substr(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substr(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){var n=t.splitLines(e)[0].substr(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){var n=t.matchPrefix(e,"o=")[0].substr(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;for(var n=t.splitLines(e),r=0;r<n.length;r++)if(n[r].length<2||"="!==n[r].charAt(1))return!1;return!0},e.exports=t}(l0);var f0=l0.exports,h0=C({__proto__:null,default:f0},[l0.exports]);function d0(e){if(!(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)){var t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"===S(e)&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substr(2)),e.candidate&&e.candidate.length){var n=new t(e),r=f0.parseCandidate(e.candidate),o=Object.assign(n,r);return o.toJSON=function(){return{candidate:o.candidate,sdpMid:o.sdpMid,sdpMLineIndex:o.sdpMLineIndex,usernameFragment:o.usernameFragment}},o}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,w$(e,"icecandidate",(function(t){return t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t}))}}function p0(e,t){if(e.RTCPeerConnection){"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp}});var n=function(e){if(!e||!e.sdp)return!1;var t=f0.splitSections(e.sdp);return t.shift(),t.some((function(e){var t=f0.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")}))},r=function(e){var t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;var n=parseInt(t[1],10);return n!=n?-1:n},o=function(e){var n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n},i=function(e,n){var r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);var o=f0.matchPrefix(e.sdp,"a=max-message-size:");return o.length>0?r=parseInt(o[0].substr(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r},a=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){var e=this.getConfiguration(),s=e.sdpSemantics;"plan-b"===s&&Object.defineProperty(this,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(n(arguments[0])){var u,c=r(arguments[0]),l=o(c),f=i(arguments[0],c);u=0===l&&0===f?Number.POSITIVE_INFINITY:0===l||0===f?Math.max(l,f):Math.min(l,f);var h={};Object.defineProperty(h,"maxMessageSize",{get:function(){return u}}),this._sctp=h}return a.apply(this,arguments)}}}function v0(e){if(e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype){var t=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){var e=t.apply(this,arguments);return n(e,this),e},w$(e,"datachannel",(function(e){return n(e.channel,e.target),e}))}function n(e,t){var n=e.send;e.send=function(){var r=arguments[0],o=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&o>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}}function g0(e){if(e.RTCPeerConnection&&!("connectionState"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((function(e){var n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(e){var t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;var n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}}))}}function m0(e,t){if(e.RTCPeerConnection&&!("chrome"===t.browser&&t.version>=71||"safari"===t.browser&&t.version>=605)){var n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){var r=t.sdp.split("\n").filter((function(e){return"a=extmap-allow-mixed"!==e.trim()})).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:r}):t.sdp=r}return n.apply(this,arguments)}}}function y0(e,t){if(e.RTCPeerConnection&&e.RTCPeerConnection.prototype){var n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}}function b0(e,t){if(e.RTCPeerConnection&&e.RTCPeerConnection.prototype){var n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){var e=this,t=arguments[0]||{};if("object"!==S(t)||t.type&&t.sdp)return n.apply(this,arguments);if(!(t={type:t.type,sdp:t.sdp}).type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":t.type="offer";break;default:t.type="answer"}if(t.sdp||"offer"!==t.type&&"answer"!==t.type)return n.apply(this,[t]);var r="offer"===t.type?this.createOffer:this.createAnswer;return r.apply(this).then((function(t){return n.apply(e,[t])}))})}}var w0=Object.freeze({__proto__:null,shimRTCIceCandidate:d0,shimMaxMessageSize:p0,shimSendThrowTypeError:v0,shimConnectionState:g0,removeExtmapAllowMixed:m0,shimAddIceCandidateNullOrEmpty:y0,shimParameterlessSetLocalDescription:b0});!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.window,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimSafari:!0},r=T$,o=C$(t),i={browserDetails:o,commonShim:w0,extractVersion:b$,disableLog:A$,disableWarnings:x$,sdp:h0};switch(o.browser){case"chrome":if(!U$||!N$||!n.shimChrome)return r("Chrome shim is not included in this adapter release."),i;if(null===o.version)return r("Chrome shim can not determine version, not shimming."),i;r("adapter.js shimming chrome."),i.browserShim=U$,y0(t,o),b0(t),O$(t,o),F$(t),N$(t,o),M$(t),B$(t,o),I$(t),D$(t),L$(t),V$(t,o),d0(t),g0(t),p0(t,o),v0(t),m0(t,o);break;case"firefox":if(!$$||!H$||!n.shimFirefox)return r("Firefox shim is not included in this adapter release."),i;r("adapter.js shimming firefox."),i.browserShim=$$,y0(t,o),b0(t),W$(t,o),H$(t,o),z$(t),Q$(t),G$(t),X$(t),Y$(t),q$(t),K$(t),J$(t),Z$(t),d0(t),g0(t),p0(t,o),v0(t);break;case"safari":if(!c0||!n.shimSafari)return r("Safari shim is not included in this adapter release."),i;r("adapter.js shimming safari."),i.browserShim=c0,y0(t,o),b0(t),i0(t),s0(t),n0(t),e0(t),t0(t),a0(t),r0(t),u0(t),d0(t),p0(t,o),v0(t),m0(t,o);break;default:r("Unsupported browser!")}}({window:"undefined"==typeof window?void 0:window});var A0=["Quark","NokiaBrowser","UCBrowser"],x0=[{os:{name:"Android",version:"6.0"},device:{vendor:"Lenovo",model:"TB3-X70N",type:"tablet"}},{os:{name:"Android",version:"8.0.0"},device:{vendor:"Huawei",model:"EDISON-AL10",type:"mobile"}},{os:{name:"Android",version:"12"},device:{vendor:void 0,model:"PDCM00",type:"mobile"}},{os:{name:"Android",version:"8.0.0"},device:{vendor:"Huawei",model:"KNT-UL10",type:"mobile"}},{os:{name:"Android",version:"12"},device:{vendor:void 0,model:"PDKT00",type:"mobile"}},{os:{name:"Android",version:"6.0.1"},device:{vendor:"OPPO",model:"R9s",type:"mobile"}}],T0=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(f,e);var t,n,r,o,i,a,s,u,c,l=N(f);function f(e){var t;return O(this,f),I(j(t=l.call(this)),"options",void 0),I(j(t),"faceModel",void 0),I(j(t),"alignModel",void 0),I(j(t),"eyesModel",void 0),I(j(t),"pdModel",void 0),I(j(t),"qualityImgs",[]),I(j(t),"finish",!1),I(j(t),"actionIndex",0),I(j(t),"mouthStr",""),I(j(t),"leftEyeStr",""),I(j(t),"rightEyeStr",""),I(j(t),"colorfulStep",-1),I(j(t),"colorRunning",!1),I(j(t),"colorfulInterrupt",!1),I(j(t),"timeoutTimer",-1),I(j(t),"actionTimeoutTimer",-1),I(j(t),"actionFlowTimeoutTimer",-1),I(j(t),"colorfulTimer",-1),I(j(t),"colorfulFlowTimer",-1),I(j(t),"faceLiveDetectionMedia",void 0),I(j(t),"instantiated",!1),I(j(t),"actionType",""),I(j(t),"deferredPromise",void 0),I(j(t),"currentColor",""),I(j(t),"colorfulImages",[]),I(j(t),"colorfulImagesSample",[]),I(j(t),"means",[]),I(j(t),"currentColorfulMap",f.defaultColorMap),I(j(t),"trackingBBox",null),I(j(t),"_throttleFunc",function(e,t,n,r){var o=-1,i=!1,a=0,s=function(){o&&clearTimeout(o)};"boolean"!=typeof t&&(r=n,n=t,t=void 0);var u=function(){for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];var f=Date.now()-a;if(!i){var h=function(){a=Date.now(),n.apply(void 0,c)},d=function(){o=-1};r&&!o&&h(),s(),void 0===r&&f>e?h():!0!==t&&(o=window.setTimeout(r?d:h,void 0===r?e-f:e))}};return u.cancel=function(){s(),i=!0},u}(300,(function(e){t.emit("tip",{code:e,text:TJ[e]})}))),I(j(t),"setOptions",(function(e){t.options=E(E({},t.options),e)})),I(j(t),"loadModels",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.emit("status","loading"),e.next=3,t._loadModels();case 3:return e.next=5,t._preheatModels();case 5:t.emit("status","loading_over");case 6:case"end":return e.stop()}}),e)})))),I(j(t),"start",R(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(WZ.isSupport()){e.next=3;break}return t.emit("fail",["unsupported"]),e.abrupt("return");case 3:if(!t.options.authUrl){e.next=10;break}return e.next=6,t.authVerify();case 6:if(e.sent){e.next=10;break}return t.emit("fail",["auth"]),e.abrupt("return");case 10:if(!t.instantiated){e.next=12;break}return e.abrupt("return");case 12:return t.finish&&(t.finish=!1,t.faceLiveDetectionMedia.cancelFrameDrawing(),t.timeoutTimer=-1,t.actionTimeoutTimer=-1,t.actionFlowTimeoutTimer=-1,t.reset()),e.next=15,t.faceLiveDetectionMedia.createVideoStream().catch((function(e){"NotAllowedError"===e.name?t.emit("fail",["notallowed"]):"NotFoundError"===e.name?t.emit("fail",["notfound"]):"NotReadableError"===e.name?t.emit("fail",["notreadable"]):"OverconstrainedError"===e.name?t.emit("fail",["overconstrained"]):"AbortError"===e.name?t.emit("fail",["abort"]):t.emit("fail",["reject"])}));case 15:if(!t.faceLiveDetectionMedia.hasStream){e.next=29;break}if(t.emit("camera_open"),!t.options.autoloadModels){e.next=29;break}return e.next=20,t.loadModels();case 20:return e.prev=20,e.next=23,null===(n=t.faceLiveDetectionMedia.recorder)||void 0===n?void 0:n.startRecording();case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(20),console.error(e.t0);case 28:t.faceLiveDetectionMedia.frameDrawing();case 29:t.options.solutionType===d$.colorful&&t.setCurrentColorMap(f.defaultColorMap.slice().sort((function(){return Math.random()-.5}))),t.instantiated=!0;case 31:case"end":return e.stop()}}),e,null,[[20,25]])})))),I(j(t),"restart",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.alignModel.preheat();case 2:return e.next=4,t.eyesModel.preheat();case 4:return e.next=6,t.faceModel.preheat();case 6:t.finish&&(t.finish=!1,t.timeoutTimer=-1,t.actionTimeoutTimer=-1,t.actionFlowTimeoutTimer=-1,t.reset(),t.faceLiveDetectionMedia.frameDrawing());case 7:case"end":return e.stop()}}),e)})))),I(j(t),"close",(function(){t.finish=!0,t.faceLiveDetectionMedia.cancelFrameDrawing(),t.faceLiveDetectionMedia.stopVideoStream(),t._clearTimeoutTimer()})),I(j(t),"destroy",R(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.instantiated=!1,t.close(),t.off(),t.faceLiveDetectionMedia.cleanupCanvasMemory(),2===t.options.solutionType||(t.alignModel.destroy(),t.faceModel.destroy(),t.eyesModel.destroy()),!t.options.needToRecord){e.next=8;break}return e.next=8,null===(n=t.faceLiveDetectionMedia.recorder)||void 0===n?void 0:n.destroy();case 8:case"end":return e.stop()}}),e)})))),I(j(t),"stop",(function(){t.finish=!0,t.faceLiveDetectionMedia.cancelFrameDrawing()})),I(j(t),"setMeansSample",R(regeneratorRuntime.mark((function e(){var n,r,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=Math.max(Math.floor(t.colorfulImagesSample.length/60),1),o=[],i=0,a=t.colorfulImagesSample.length;i<a;i+=r)o.push(t.colorfulImagesSample[i]);(n=t.means).push.apply(n,U(o.map((function(e){return t.pdModel.getMean(e).reverse()})))),o=[],t.colorfulImagesSample=[];case 6:case"end":return e.stop()}}),e)})))),I(j(t),"getRecordVideo",R(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=new Blob([],{type:"video/mp4"}),f.isNotSupportMediaRecorderInIOS()){e.next=13;break}return e.prev=2,e.next=5,t._stopRecorder();case 5:return e.next=7,t._getRecordVideoBlob();case 7:n=e.sent,e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),console.error(e.t0);case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[2,10]])})))),I(j(t),"compressImage",R(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.qualityImgs.sort((function(e,t){return c$(t)-c$(e)})).map((function(e){return e.src})));case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})))),I(j(t),"detectionSuccess",R(regeneratorRuntime.mark((function e(){var n,r,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=t.options)||void 0===n||!n.useSecure){e.next=3;break}e.next=14;break;case 3:return e.next=5,t.compressImage();case 5:if(r=e.sent,o=[r[0]],i={images:o},!t.options.needToRecord){e.next=13;break}return e.next=11,t.getRecordVideo();case 11:a=e.sent,i.video=a;case 13:t.emit("success",i);case 14:case"end":return e.stop()}}),e)})))),I(j(t),"_loadModels",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([t.faceModel.load(),t.alignModel.load(),t.eyesModel.load()]);case 2:case"end":return e.stop()}}),e)})))),I(j(t),"_preheatModels",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.alignModel.preheat();case 2:return e.next=4,t.eyesModel.preheat();case 4:case"end":return e.stop()}}),e)})))),I(j(t),"_stopRecorder",R(regeneratorRuntime.mark((function e(){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=t.faceLiveDetectionMedia.recorder)||void 0===n?void 0:n.getState();case 2:if("inactive"===(r=e.sent)||"stopped"===r){e.next=6;break}return e.next=6,null===(o=t.faceLiveDetectionMedia.recorder)||void 0===o?void 0:o.stopRecording();case 6:case"end":return e.stop()}}),e)})))),I(j(t),"_getRecordVideoBlob",R(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=t.faceLiveDetectionMedia.recorder)||void 0===n?void 0:n.getBlob();case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})))),I(j(t),"_clearTimeoutTimer",(function(){window.clearTimeout(t.timeoutTimer),window.clearTimeout(t.actionTimeoutTimer),window.clearTimeout(t.actionFlowTimeoutTimer),window.clearTimeout(t.colorfulFlowTimer),window.clearTimeout(t.colorfulTimer),t.timeoutTimer=-1,t.actionTimeoutTimer=-1,t.actionFlowTimeoutTimer=-1,t.colorfulFlowTimer=-1,t.colorfulTimer=-1})),t._initOptions(e),t._initModels(),t.faceLiveDetectionMedia=new WZ(t.options),t.on("camera_open",R(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.options.autoloadModels||!t.faceLiveDetectionMedia.hasStream){e.next=10;break}return t.faceLiveDetectionMedia.frameDrawing(),e.prev=2,e.next=5,null===(n=t.faceLiveDetectionMedia.recorder)||void 0===n?void 0:n.startRecording();case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),console.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[2,7]])})))),t.options.useSecure,t.faceLiveDetectionMedia.onFrameDrawingFinished(R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.colorRunning?t.faceLiveDetectionMedia.frameInfoCanvas&&t.colorfulImages.push(t.faceLiveDetectionMedia.frameInfoCanvas):(t.colorfulImages=[],t.colorfulImagesSample=[],t.means=[]),t.deferredPromise?t.deferredPromise.finally((function(){t.deferredPromise=null})):t.deferredPromise=t.run(t.actionType);case 2:case"end":return e.stop()}}),e)})))),t}return M(f,[{key:"colorAverageThreshold",get:function(){return"iOS"===(new vK).getOS().name?.1:.05}},{key:"authVerify",value:(c=R(regeneratorRuntime.mark((function e(){var t,n,r,o,i,a,s,u,c,l,f,h,d,p,v,g,m,y,b;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=BZ(),r=null!==(t=this.options.authUrl)&&void 0!==t?t:"",e.next=4,fetch(r,{method:"POST",body:"check_code=".concat(n),headers:new Headers({"Content-Type":"application/x-www-form-urlencoded"})});case 4:return o=e.sent,e.next=7,o.json();case 7:if(i=e.sent,a=i.result.fuse_data,s=NZ(a),u=s.fix,c=s.s,l=s.t,f=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/.exec(l),h=V(f,7),d=h[1],p=h[2],v=h[3],g=h[4],m=h[5],y=h[6],b=+new Date(+d,+p-1,+v,+g,+m,+y),!(+new Date-b>3e5)&&"xybLoveCharlotte"===u&&c===decodeURIComponent(n)){e.next=15;break}return e.abrupt("return",!1);case 15:return e.abrupt("return",!0);case 16:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"run",value:(u=R(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u,c,l,f,h,d,p,v,g,m,y,b,w,A;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.finish||!this.faceLiveDetectionMedia.frameInfoCanvas){e.next=47;break}if(r=this.faceLiveDetectionMedia.frameInfoCanvas.originCanvas,o=r,i="",a=null,"function"!=typeof window.createImageBitmap){e.next=13;break}return e.next=9,createImageBitmap(r);case 9:a=e.sent,this.qualityImgs.length<4&&(i=o.toDataURL(null!==(s=this.options.outputImgType)&&void 0!==s?s:"image/jpeg",.96)),e.next=19;break;case 13:return c={type:null!==(u=this.options.outputImgType)&&void 0!==u?u:"image/jpeg",quality:1},l=this.faceLiveDetectionMedia.grabPicture(c),f=l.originDataURL,e.next=17,DZ(f);case 17:a=e.sent,this.qualityImgs.length<4&&(i=f);case 19:return e.next=21,this.faceTrack(a);case 21:return h=e.sent,d=this.actionIndex,p=this.options.code,v=PJ[null!==(n=null==p?void 0:p[d])&&void 0!==n?n:"0"],e.next=27,this.faceQuality(E(E({},h),{},{img:a}),null!=t?t:"",v);case 27:if(g=e.sent,m=g.angles,y=g.pts,"action"!==t){e.next=35;break}return e.next=33,this.actionCheck(y);case 33:e.next=47;break;case 35:if("colorful"!==t){e.next=38;break}e.next=47;break;case 38:if("colorfulInterrupt"!==t){e.next=43;break}this.colorfulReset(),this.colorfulInterrupt=!1,e.next=47;break;case 43:return e.next=45,LZ(100);case 45:this.qualityImgs.push({angles:m,src:i}),this.setTip("ok");case 47:e.next=52;break;case 49:e.prev=49,e.t0=e.catch(0),this.finish||this.qualityError(e.t0,t);case 52:if(e.prev=52,b=this.options,w=b.solutionType,A=b.code,this.finish){e.next=75;break}if(!(this.qualityImgs.length<4)){e.next=59;break}this.actionType="",e.next=75;break;case 59:if(w!==d$.silence){e.next=64;break}return e.next=62,this.silenceFinish();case 62:e.next=75;break;case 64:if(w!==d$.action){e.next=74;break}if(!(this.actionIndex<A.length)){e.next=70;break}return e.next=68,this.run("action");case 68:e.next=72;break;case 70:return e.next=72,this.actionFinish();case 72:e.next=75;break;case 74:w===d$.colorful&&(this.actionIndex<A.length?this.actionType="action":this.colorfulInterrupt?(this.emit("detection:actionfinished"),this.actionType="colorfulInterrupt"):(this.emit("detection:actionfinished"),this.colorRunning||(this.checkActionTimeout(!0),this.checkActionFlowTimeout(!0),this.startColorful()),this.actionType="colorful"));case 75:return e.finish(52);case 76:case"end":return e.stop()}}),e,this,[[0,49,52,76]])}))),function(e){return u.apply(this,arguments)})},{key:"checkActionTimeout",value:function(e){var t=this;e?(clearTimeout(this.actionTimeoutTimer),this.actionTimeoutTimer=-1):-1===this.actionTimeoutTimer&&(this.actionTimeoutTimer=window.setTimeout((function(){t.emit("fail",["action_timeout"])}),this.options.actionTimeout))}},{key:"checkActionFlowTimeout",value:function(e){var t=this;e?(clearTimeout(this.actionFlowTimeoutTimer),this.actionFlowTimeoutTimer=-1):-1===this.actionFlowTimeoutTimer&&(this.actionFlowTimeoutTimer=window.setTimeout(R(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.finish=!0,e.next=3,t.compressImage();case 3:return n=e.sent,e.next=6,t.getRecordVideo();case 6:r=e.sent,t.emit("fail",["timeout",n,r]);case 8:case"end":return e.stop()}}),e)}))),this.options.timeout))}},{key:"checkTimeout",value:function(e){var t=this;e?(clearTimeout(this.timeoutTimer),this.timeoutTimer=-1):-1===this.timeoutTimer&&(this.timeoutTimer=window.setTimeout(R(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.finish=!0,e.next=3,t.compressImage();case 3:return n=e.sent,e.next=6,t.getRecordVideo();case 6:r=e.sent,t.emit("fail",["timeout",n,r]);case 8:case"end":return e.stop()}}),e)}))),this.options.timeout))}},{key:"faceTrack",value:(s=R(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.faceModel.run(t);case 2:if(n=e.sent,r=n.count,o=n.probability,i=n.bbox,a=n.brightness,s=o>=.3,this.checkTimeout(s),s){e.next=11;break}return e.abrupt("return",Promise.reject(new Error("empty")));case 11:if(!(r>1)){e.next=13;break}return e.abrupt("return",Promise.reject(new Error("multiple")));case 13:return e.abrupt("return",{bbox:i,brightness:a,count:r,probability:o});case 14:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"faceQuality",value:(a=R(regeneratorRuntime.mark((function e(t,n,r){var o,i,a,s,u,c,l,f,h,d,p,v,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.bbox,i=t.brightness,a=t.img,s="action"===n&&"blink"!==r.name&&"mouthopen"!==r.name,!this.trackingBBox){e.next=7;break}if(!a$(o,this.trackingBBox,this.options.trackingThreshold)){e.next=7;break}return this.trackingBBox=null,e.abrupt("return",Promise.reject(new Error("offset")));case 7:if(this.trackingBBox=o,u=o$([a.width,a.height],o,this.options.vbox),c=u.inCover,l=u.ratio,c){e.next=11;break}return e.abrupt("return",Promise.reject(new Error("outside")));case 11:if(!(l>this.options.maxFaceRatio)){e.next=13;break}return e.abrupt("return",Promise.reject(new Error("close")));case 13:if(!(l<this.options.minFaceRatio)){e.next=15;break}return e.abrupt("return",Promise.reject(new Error("far")));case 15:if(!(i>.8)){e.next=17;break}return e.abrupt("return",Promise.reject(new Error("light")));case 17:if(!(i<.3)){e.next=19;break}return e.abrupt("return",Promise.reject(new Error("dark")));case 19:return e.next=21,this.alignModel.run(a,o);case 21:if(f=e.sent,h=f.pts,d=f.occlusion,p=n$(h),!s){e.next=27;break}return e.abrupt("return",{angles:p,pts:h});case 27:if(!(v=this.faceOcclusion(d))){e.next=30;break}return e.abrupt("return",Promise.reject(new Error(v)));case 30:if(g=p.some((function(e){return e>=15||e<=-15})),!g){e.next=33;break}return e.abrupt("return",Promise.reject(new Error("rotate")));case 33:return e.abrupt("return",{angles:p,pts:h});case 34:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return a.apply(this,arguments)})},{key:"faceOcclusion",value:function(e){var t=this.options.occlusion;return e[1]>=t.eye||e[2]>=t.eye?"occlusion_eye":e[3]>=t.nose?"occlusion_nose":e[4]>=t.mouse?"occlusion_mouth":e[5]>=t.chin?"occlusion_chin":e[6]>=t.rightFace?"occlusion_right_face":e[7]>=t.leftFace?"occlusion_left_face":""}},{key:"setTip",value:function(e){this.finish||this._throttleFunc(e)}},{key:"actionPass",value:(i=R(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.options.code,this.actionIndex++,this.emit("detection:progress",this.actionIndex/t.length),this.clearCheckedStatus(),this.emit("action",this.actionIndex,t),this.checkActionTimeout(!0),this.checkTimeout(!0),this.checkActionFlowTimeout(!0),e.next=10,LZ(300);case 10:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"actionCheck",value:(o=R(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u,c,l,f,h,d,p,v,g,m,y,b,w,A,x,T,P,C,_,E,S,k,R,O,F;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.options,o=r.code,i=r.leftYaw,a=r.rightYaw,s=this.actionIndex,u=this.mouthStr,c=PJ[null!==(n=o[s])&&void 0!==n?n:"0"],this.checkActionTimeout(!1),this.checkActionFlowTimeout(!1),"mouthopen"!==c.name){e.next=22;break}if(this.setTip(c.name),l=t$(t),h=u$(f=u+l),d=V(h,2),p=d[0],v=d[1],M=void 0,I=void 0,D=void 0,M=V(n$(t),2),I=M[0],D=M[1],!(I<=-8||I>=12||D<=-15||D>=15)){e.next=14;break}this.mouthStr="",e.next=20;break;case 14:if(!(p>=1&&v>=1)){e.next=19;break}return e.next=17,this.actionPass();case 17:e.next=20;break;case 19:this.mouthStr=f;case 20:e.next=52;break;case 22:if("blink"!==c.name){e.next=47;break}return this.setTip(c.name),g=t$(t),m="".concat(this.mouthStr).concat(g),e.next=28,this.eyesModel.run(t,this.alignModel.imageData);case 28:if(y=e.sent,b=y.leftRes,w=y.rightRes,A=this.getEyeStatus(b),x=this.getEyeStatus(w),T="".concat(this.leftEyeStr).concat(A),P="".concat(this.rightEyeStr).concat(x),C=u$(T),_=V(C,2),E=_[0],S=_[1],k=u$(P),R=V(k,2),O=R[0],F=R[1],!(E>=1&&S>=1&&O>=1&&F>=1)){e.next=42;break}return e.next=40,this.actionPass();case 40:e.next=45;break;case 42:this.leftEyeStr=T,this.rightEyeStr=P,this.mouthStr=m;case 45:e.next=52;break;case 47:if(this.setTip(c.name),!s$(c.name,t,i,a)){e.next=52;break}return e.next=52,this.actionPass();case 52:case"end":return e.stop()}var M,I,D}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getEyeStatus",value:function(e){var t=V(e,2),n=0;return t[0]>t[1]&&(n=1),n}},{key:"clearCheckedStatus",value:function(){this.leftEyeStr="",this.rightEyeStr="",this.mouthStr=""}},{key:"startColorful",value:function(){var e=this;this.colorRunning=!0,this.setTip("color_ready"),this.colorfulTimer=window.setTimeout((function(){0!==e.qualityImgs.length&&e.changeColor()}),1e3)}},{key:"changeColor",value:function(){this.setTip("color_running"),this.setCurrentColor(0)}},{key:"setCurrentColor",value:function(e){var t=this,n=function(){var n=R(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.emit("color",e,t.currentColorfulMap[e]),n.next=3,t.colorfulTimeout(300);case 3:return t.colorfulStep=e,n.next=6,t.colorfulTimeout(700);case 6:if(2!==e){n.next=11;break}return n.next=9,t.colorfulFinish();case 9:n.next=13;break;case 11:t.emit("color",e,AJ(t.currentColorfulMap[e]).alpha(.2)),t.setCurrentColor(e+1);case 13:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();-1!==e&&n().catch((function(e){"qualityError"===e.message&&t.colorfulQualityError()}))}},{key:"colorfulTimeout",value:function(e){var t=this;return new Promise((function(n,r){t.colorfulFlowTimer=window.setTimeout((function(){0===t.qualityImgs.length?r(new Error("")):t.colorfulInterrupt?r(new Error("qualityError")):n()}),e)}))}},{key:"setCurrentColorMap",value:function(e){this.currentColorfulMap=e}},{key:"reset",value:function(){this.actionReset(),this.colorfulReset(),this.qualityImgs=[],this.means=[],this.trackingBBox=null}},{key:"actionReset",value:function(){var e;this.actionIndex=0,this.clearCheckedStatus(),this.emit("action",0,null!==(e=this.options.code)&&void 0!==e?e:"0"),this.emit("detection:progress",0)}},{key:"colorfulReset",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.colorfulStep=-1,this.colorRunning=!1,e&&(this.colorfulInterrupt=!1),window.clearTimeout(this.colorfulTimer),this.colorfulTimer=-1,window.clearTimeout(this.colorfulFlowTimer),this.colorfulFlowTimer=-1,this.emit("color",-1)}},{key:"qualityError",value:function(e,t){this.setTip(e.message),~["empty","multiple","outside","offset"].indexOf(e.message)?("colorful"===t&&(this.colorfulImages=[],this.colorfulImagesSample=[],this.means=[],this.colorfulInterrupt=!0),this.reset()):"colorful"===t&&(this.colorfulImages=[],this.colorfulImagesSample=[],this.means=[],this.colorfulInterrupt=!0)}},{key:"colorfulQualityError",value:function(){this.colorfulReset(!1),this.colorfulInterrupt=!0}},{key:"silenceFinish",value:(r=R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.finish=!0,this.faceLiveDetectionMedia.cancelFrameDrawing(),this.emit("detection:silencefinished"),e.next=5,this.detectionSuccess();case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"actionFinish",value:(n=R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.checkActionTimeout(!0),this.checkActionFlowTimeout(!0),this.emit("detection:actionfinished"),this.setTip("action_over"),e.next=6,this.silenceFinish();case 6:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"colorfulFinish",value:(t=R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.checkActionTimeout(!0),this.checkActionFlowTimeout(!0),this.colorfulReset(),this.setTip("color_detecting"),this.finish=!0,this.faceLiveDetectionMedia.cancelFrameDrawing(),this.alignModel.destroy(),this.faceModel.destroy(),this.eyesModel.destroy(),this.means=[],this.emit("detection:colorfinished"),e.next=13,this.detectionSuccess();case 13:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_initOptions",value:function(e){var t="string"==typeof e.video?document.getElementById(e.video):e.video,n=void 0!==e.occlusion&&("boolean"==typeof e.occlusion?e.occlusion?g$.occlusion:{eye:1,mouse:1,nose:1,leftFace:1,rightFace:1,chin:1}:E(E({},g$.occlusion),e.occlusion));return this.options=E(E(E({},g$),e),{},{video:t,occlusion:n}),(this.options.solutionType===d$.colorful&&this.options.randomMotionDetection||!this.options.code)&&(this.options.code="".concat(Math.round(Math.random()))),this.options.colorRunAction||(this.options.code=""),this}},{key:"_initModels",value:function(){var e,t=null!==(e=this.options.modelPath)&&void 0!==e?e:"";return this.faceModel=new l$(t),this.alignModel=new f$(t),this.eyesModel=new h$(t),this.pdModel=new v$(t),this}}],[{key:"isSupport",value:function(){return e=(new vK).getResult(),t=e.browser,n=e.os,r=e.device,!(t.name&&A0.includes(t.name)||x0.find((function(e){return e.device.vendor===r.vendor&&e.os.name===n.name&&e.os.version===n.version})))&&WZ.isSupport();var e,t,n,r}},{key:"isExtraNotSupport",value:function(){var e,t,n=new vK,r=n.getUA().toLowerCase(),o="iOS"===n.getOS().name&&"UCBrowser"===n.getBrowser().name,i="iOS"===n.getOS().name&&"Quark"===n.getBrowser().name,a="Android"===n.getOS().name&&!(null===(e=/aweme/i.exec(r))||void 0===e||!e[0]),s="Android"===n.getOS().name&&!(null===(t=/newsarticle|ttwebview/i.exec(r))||void 0===t||!t[0]);return o||i||a||s}},{key:"isNotSupportMediaRecorderInIOS",value:function(){var e=this.UA().getOS();return"iOS"===e.name&&!!e.version&&parseFloat(e.version)<14.5}},{key:"UA",value:function(){return new vK}}]),f}(yK);I(T0,"ACTION_CONFIG",PJ),I(T0,"defaultOptions",E({},g$)),I(T0,"defaultColorMap",["#db357f","#1eb848","#371dc0"]),I(T0,"occlusionThreshold",.8);var P0="undefined"==typeof atob?function(e){return Buffer.from(e,"base64").toString("binary")}:atob,C0="undefined"==typeof btoa?function(e){return Buffer.from(e,"binary").toString("base64")}:btoa;function _0(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.length,r=new Uint8Array(t?4*n:n),o=0,i=0;o<n;o++){var a=e.charCodeAt(o);if(t&&55296<=a&&a<=56319){if(++o>=n)throw new Error("Malformed string, low surrogate expected at position "+o);a=(55296^a)<<10|65536|56320^e.charCodeAt(o)}else if(!t&&a>>>8)throw new Error("Wide characters are not allowed.");!t||a<=127?r[i++]=a:a<=2047?(r[i++]=192|a>>6,r[i++]=128|63&a):a<=65535?(r[i++]=224|a>>12,r[i++]=128|a>>6&63,r[i++]=128|63&a):(r[i++]=240|a>>18,r[i++]=128|a>>12&63,r[i++]=128|a>>6&63,r[i++]=128|63&a)}return r.subarray(0,i)}function E0(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.length,r=new Array(n),o=0,i=0;o<n;o++){var a=e[o];if(!t||a<128)r[i++]=a;else if(a>=192&&a<224&&o+1<n)r[i++]=(31&a)<<6|63&e[++o];else if(a>=224&&a<240&&o+2<n)r[i++]=(15&a)<<12|(63&e[++o])<<6|63&e[++o];else{if(!(a>=240&&a<248&&o+3<n))throw new Error("Malformed UTF8 character at byte offset "+o);var s=(7&a)<<18|(63&e[++o])<<12|(63&e[++o])<<6|63&e[++o];s<=65535?r[i++]=s:(s^=65536,r[i++]=55296|s>>10,r[i++]=56320|1023&s)}}var u="",c=16384;for(o=0;o<i;o+=c)u+=String.fromCharCode.apply(String,r.slice(o,o+c<=i?o+c:i));return u}function S0(e){return e instanceof Uint8Array}function k0(e,t){var n=e?e.byteLength:t||65536;if(4095&n||n<=0)throw new Error("heap size must be a positive integer and a multiple of 4096");return e=e||new Uint8Array(new ArrayBuffer(n))}function R0(e,t,n,r,o){var i=e.length-t,a=i<o?i:o;return e.set(n.subarray(r,r+a),t),a}var O0,F0,M0=function(e){c(n,e);var t=y(n);function n(){i(this,n);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.call.apply(t,[this].concat(r))}return s(n)}(p(Error)),I0=function(e){c(n,e);var t=y(n);function n(){i(this,n);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.call.apply(t,[this].concat(r))}return s(n)}(p(Error)),D0=function(e){c(n,e);var t=y(n);function n(){i(this,n);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.call.apply(t,[this].concat(r))}return s(n)}(p(Error)),L0=function(){var e,t,n=!1;function r(n,r){var o=e[(t[n]+t[r])%255];return 0!==n&&0!==r||(o=0),o}var o,i,a,s,u=!1;function c(){function c(n){var r,o,i;for(o=i=function(n){var r=e[255-t[n]];return 0===n&&(r=0),r}(n),r=0;r<4;r++)i^=o=255&(o<<1|o>>>7);return i^=99}n||function(){e=[],t=[];var r,o,i=1;for(r=0;r<255;r++)e[r]=i,o=128&i,i<<=1,i&=255,128===o&&(i^=27),i^=e[r],t[e[r]]=r;e[255]=e[0],t[0]=0,n=!0}(),o=[],i=[],a=[[],[],[],[]],s=[[],[],[],[]];for(var l=0;l<256;l++){var f=c(l);o[l]=f,i[f]=l,a[0][l]=r(2,f)<<24|f<<16|f<<8|r(3,f),s[0][f]=r(14,l)<<24|r(9,l)<<16|r(13,l)<<8|r(11,l);for(var h=1;h<4;h++)a[h][l]=a[h-1][l]>>>8|a[h-1][l]<<24,s[h][f]=s[h-1][f]>>>8|s[h-1][f]<<24}u=!0}var l=function(e,t){u||c();var n=new Uint32Array(t);n.set(o,512),n.set(i,768);for(var r=0;r<4;r++)n.set(a[r],4096+1024*r>>2),n.set(s[r],8192+1024*r>>2);var l=function(e,t,n){"use asm";var r=0,o=0,i=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,g=0,m=0,y=0,b=0,w=0,A=0,x=0,T=0;var P=new e.Uint32Array(n),C=new e.Uint8Array(n);function _(e,t,n,s,u,c,l,f){e=e|0;t=t|0;n=n|0;s=s|0;u=u|0;c=c|0;l=l|0;f=f|0;var h=0,d=0,p=0,v=0,g=0,m=0,y=0,b=0;h=n|0x400,d=n|0x800,p=n|0xc00;u=u^P[(e|0)>>2],c=c^P[(e|4)>>2],l=l^P[(e|8)>>2],f=f^P[(e|12)>>2];for(b=16;(b|0)<=s<<4;b=b+16|0){v=P[(n|u>>22&1020)>>2]^P[(h|c>>14&1020)>>2]^P[(d|l>>6&1020)>>2]^P[(p|f<<2&1020)>>2]^P[(e|b|0)>>2],g=P[(n|c>>22&1020)>>2]^P[(h|l>>14&1020)>>2]^P[(d|f>>6&1020)>>2]^P[(p|u<<2&1020)>>2]^P[(e|b|4)>>2],m=P[(n|l>>22&1020)>>2]^P[(h|f>>14&1020)>>2]^P[(d|u>>6&1020)>>2]^P[(p|c<<2&1020)>>2]^P[(e|b|8)>>2],y=P[(n|f>>22&1020)>>2]^P[(h|u>>14&1020)>>2]^P[(d|c>>6&1020)>>2]^P[(p|l<<2&1020)>>2]^P[(e|b|12)>>2];u=v,c=g,l=m,f=y}r=P[(t|u>>22&1020)>>2]<<24^P[(t|c>>14&1020)>>2]<<16^P[(t|l>>6&1020)>>2]<<8^P[(t|f<<2&1020)>>2]^P[(e|b|0)>>2],o=P[(t|c>>22&1020)>>2]<<24^P[(t|l>>14&1020)>>2]<<16^P[(t|f>>6&1020)>>2]<<8^P[(t|u<<2&1020)>>2]^P[(e|b|4)>>2],i=P[(t|l>>22&1020)>>2]<<24^P[(t|f>>14&1020)>>2]<<16^P[(t|u>>6&1020)>>2]<<8^P[(t|c<<2&1020)>>2]^P[(e|b|8)>>2],a=P[(t|f>>22&1020)>>2]<<24^P[(t|u>>14&1020)>>2]<<16^P[(t|c>>6&1020)>>2]<<8^P[(t|l<<2&1020)>>2]^P[(e|b|12)>>2]}function E(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;_(0x0000,0x0800,0x1000,T,e,t,n,r)}function S(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;var i=0;_(0x0400,0x0c00,0x2000,T,e,r,n,t);i=o,o=a,a=i}function k(e,t,n,s){e=e|0;t=t|0;n=n|0;s=s|0;_(0x0000,0x0800,0x1000,T,f,h,d,p);p=~y&p|y&p+1;d=~m&d|m&d+((p|0)==0);h=~g&h|g&h+((d|0)==0);f=~v&f|v&f+((h|0)==0);r=r^e;o=o^t;i=i^n;a=a^s}function R(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;var o=0,i=0,a=0,f=0,h=0,d=0,p=0,v=0,g=0,m=0;e=e^s,t=t^u,n=n^c,r=r^l;o=b|0,i=w|0,a=A|0,f=x|0;for(;(g|0)<128;g=g+1|0){if(o>>>31){h=h^e,d=d^t,p=p^n,v=v^r}o=o<<1|i>>>31,i=i<<1|a>>>31,a=a<<1|f>>>31,f=f<<1;m=r&1;r=r>>>1|n<<31,n=n>>>1|t<<31,t=t>>>1|e<<31,e=e>>>1;if(m)e=e^0xe1000000}s=h,u=d,c=p,l=v}function O(e){e=e|0;T=e}function F(e,t,n,s){e=e|0;t=t|0;n=n|0;s=s|0;r=e,o=t,i=n,a=s}function M(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;s=e,u=t,c=n,l=r}function I(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;f=e,h=t,d=n,p=r}function D(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;v=e,g=t,m=n,y=r}function L(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;p=~y&p|y&r,d=~m&d|m&n,h=~g&h|g&t,f=~v&f|v&e}function j(e){e=e|0;if(e&15)return-1;C[e|0]=r>>>24,C[e|1]=r>>>16&255,C[e|2]=r>>>8&255,C[e|3]=r&255,C[e|4]=o>>>24,C[e|5]=o>>>16&255,C[e|6]=o>>>8&255,C[e|7]=o&255,C[e|8]=i>>>24,C[e|9]=i>>>16&255,C[e|10]=i>>>8&255,C[e|11]=i&255,C[e|12]=a>>>24,C[e|13]=a>>>16&255,C[e|14]=a>>>8&255,C[e|15]=a&255;return 16}function B(e){e=e|0;if(e&15)return-1;C[e|0]=s>>>24,C[e|1]=s>>>16&255,C[e|2]=s>>>8&255,C[e|3]=s&255,C[e|4]=u>>>24,C[e|5]=u>>>16&255,C[e|6]=u>>>8&255,C[e|7]=u&255,C[e|8]=c>>>24,C[e|9]=c>>>16&255,C[e|10]=c>>>8&255,C[e|11]=c&255,C[e|12]=l>>>24,C[e|13]=l>>>16&255,C[e|14]=l>>>8&255,C[e|15]=l&255;return 16}function N(){E(0,0,0,0);b=r,w=o,A=i,x=a}function V(e,t,n){e=e|0;t=t|0;n=n|0;var s=0;if(t&15)return-1;while((n|0)>=16){W[e&7](C[t|0]<<24|C[t|1]<<16|C[t|2]<<8|C[t|3],C[t|4]<<24|C[t|5]<<16|C[t|6]<<8|C[t|7],C[t|8]<<24|C[t|9]<<16|C[t|10]<<8|C[t|11],C[t|12]<<24|C[t|13]<<16|C[t|14]<<8|C[t|15]);C[t|0]=r>>>24,C[t|1]=r>>>16&255,C[t|2]=r>>>8&255,C[t|3]=r&255,C[t|4]=o>>>24,C[t|5]=o>>>16&255,C[t|6]=o>>>8&255,C[t|7]=o&255,C[t|8]=i>>>24,C[t|9]=i>>>16&255,C[t|10]=i>>>8&255,C[t|11]=i&255,C[t|12]=a>>>24,C[t|13]=a>>>16&255,C[t|14]=a>>>8&255,C[t|15]=a&255;s=s+16|0,t=t+16|0,n=n-16|0}return s|0}function U(e,t,n){e=e|0;t=t|0;n=n|0;var r=0;if(t&15)return-1;while((n|0)>=16){z[e&1](C[t|0]<<24|C[t|1]<<16|C[t|2]<<8|C[t|3],C[t|4]<<24|C[t|5]<<16|C[t|6]<<8|C[t|7],C[t|8]<<24|C[t|9]<<16|C[t|10]<<8|C[t|11],C[t|12]<<24|C[t|13]<<16|C[t|14]<<8|C[t|15]);r=r+16|0,t=t+16|0,n=n-16|0}return r|0}var W=[E,S,undefined,undefined,undefined,undefined,undefined,k];var z=[undefined,R];return{set_rounds:O,set_state:F,set_iv:M,set_nonce:I,set_mask:D,set_counter:L,get_state:j,get_iv:B,gcm_init:N,cipher:V,mac:U}}({Uint8Array:Uint8Array,Uint32Array:Uint32Array},e,t);return l.set_key=function(e,t,r,i,a,u,c,f,h){var d=n.subarray(0,60),p=n.subarray(256,316);d.set([t,r,i,a,u,c,f,h]);for(var v=e,g=1;v<4*e+28;v++){var m=d[v-1];(v%e==0||8===e&&v%e==4)&&(m=o[m>>>24]<<24^o[m>>>16&255]<<16^o[m>>>8&255]<<8^o[255&m]),v%e==0&&(m=m<<8^m>>>24^g<<24,g=g<<1^(128&g?27:0)),d[v]=d[v-e]^m}for(var y=0;y<v;y+=4)for(var b=0;b<4;b++){m=d[v-(4+y)+(4-b)%4];p[y+b]=y<4||y>=v-4?m:s[0][o[m>>>24]]^s[1][o[m>>>16&255]]^s[2][o[m>>>8&255]]^s[3][o[255&m]]}l.set_rounds(e+5)},l};return l.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},l.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},l.MAC={CBC:0,GCM:1},l.HEAP_DATA=16384,l}(),j0=function(){function e(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;i(this,e),this.pos=0,this.len=0,this.mode=o,this.heap=a||k0().subarray(L0.HEAP_DATA),this.asm=s||new L0(null,this.heap.buffer),this.pos=0,this.len=0;var u=t.length;if(16!==u&&24!==u&&32!==u)throw new I0("illegal key size");var c=new DataView(t.buffer,t.byteOffset,t.byteLength);if(this.asm.set_key(u>>2,c.getUint32(0),c.getUint32(4),c.getUint32(8),c.getUint32(12),u>16?c.getUint32(16):0,u>16?c.getUint32(20):0,u>24?c.getUint32(24):0,u>24?c.getUint32(28):0),void 0!==n){if(16!==n.length)throw new I0("illegal iv size");var l=new DataView(n.buffer,n.byteOffset,n.byteLength);this.asm.set_iv(l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12))}else this.asm.set_iv(0,0,0,0);this.padding=r}return s(e,[{key:"AES_Encrypt_process",value:function(e){if(!S0(e))throw new TypeError("data isn't of expected type");for(var t=this.asm,n=this.heap,r=L0.ENC[this.mode],o=L0.HEAP_DATA,i=this.pos,a=this.len,s=0,u=e.length||0,c=0,l=0,f=new Uint8Array(a+u&-16);u>0;)a+=l=R0(n,i+a,e,s,u),s+=l,u-=l,(l=t.cipher(r,o+i,a))&&f.set(n.subarray(i,i+l),c),c+=l,l<a?(i+=l,a-=l):(i=0,a=0);return this.pos=i,this.len=a,f}},{key:"AES_Encrypt_finish",value:function(){var e=this.asm,t=this.heap,n=L0.ENC[this.mode],r=L0.HEAP_DATA,o=this.pos,i=this.len,a=16-i%16,s=i;if(this.hasOwnProperty("padding")){if(this.padding){for(var u=0;u<a;++u)t[o+i+u]=a;s=i+=a}else if(i%16)throw new I0("data length must be a multiple of the block size")}else i+=a;var c=new Uint8Array(s);return i&&e.cipher(n,r+o,i),s&&c.set(t.subarray(o,o+s)),this.pos=0,this.len=0,c}},{key:"AES_Decrypt_process",value:function(e){if(!S0(e))throw new TypeError("data isn't of expected type");var t=this.asm,n=this.heap,r=L0.DEC[this.mode],o=L0.HEAP_DATA,i=this.pos,a=this.len,s=0,u=e.length||0,c=0,l=a+u&-16,f=0,h=0;this.padding&&(l-=f=a+u-l||16);for(var d=new Uint8Array(l);u>0;)a+=h=R0(n,i+a,e,s,u),s+=h,u-=h,(h=t.cipher(r,o+i,a-(u?0:f)))&&d.set(n.subarray(i,i+h),c),c+=h,h<a?(i+=h,a-=h):(i=0,a=0);return this.pos=i,this.len=a,d}},{key:"AES_Decrypt_finish",value:function(){var e=this.asm,t=this.heap,n=L0.DEC[this.mode],r=L0.HEAP_DATA,o=this.pos,i=this.len,a=i;if(i>0){if(i%16){if(this.hasOwnProperty("padding"))throw new I0("data length must be a multiple of the block size");i+=16-i%16}if(e.cipher(n,r+o,i),this.hasOwnProperty("padding")&&this.padding){var s=t[o+a-1];if(s<1||s>16||s>a)throw new D0("bad padding");for(var u=0,c=s;c>1;c--)u|=s^t[o+a-c];if(u)throw new D0("bad padding");a-=s}}var l=new Uint8Array(a);return a>0&&l.set(t.subarray(o,o+a)),this.pos=0,this.len=0,l}}]),e}(),B0=68719476704,N0=function(){function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:16,a=arguments.length>4?arguments[4]:void 0;if(i(this,e),this.tagSize=o,this.gamma0=0,this.counter=1,this.aes=a||new j0(t,void 0,!1,"CTR"),this.aes.asm.gcm_init(),this.tagSize<4||this.tagSize>16)throw new I0("illegal tagSize value");var s=n.length||0,u=new Uint8Array(16);12!==s?(this._gcm_mac_process(n),this.aes.heap[0]=0,this.aes.heap[1]=0,this.aes.heap[2]=0,this.aes.heap[3]=0,this.aes.heap[4]=0,this.aes.heap[5]=0,this.aes.heap[6]=0,this.aes.heap[7]=0,this.aes.heap[8]=0,this.aes.heap[9]=0,this.aes.heap[10]=0,this.aes.heap[11]=s>>>29,this.aes.heap[12]=s>>>21&255,this.aes.heap[13]=s>>>13&255,this.aes.heap[14]=s>>>5&255,this.aes.heap[15]=s<<3&255,this.aes.asm.mac(L0.MAC.GCM,L0.HEAP_DATA,16),this.aes.asm.get_iv(L0.HEAP_DATA),this.aes.asm.set_iv(0,0,0,0),u.set(this.aes.heap.subarray(0,16))):(u.set(n),u[15]=1);var c=new DataView(u.buffer);if(this.gamma0=c.getUint32(12),this.aes.asm.set_nonce(c.getUint32(0),c.getUint32(4),c.getUint32(8),0),this.aes.asm.set_mask(0,0,0,4294967295),void 0!==r){if(r.length>B0)throw new I0("illegal adata length");r.length?(this.adata=r,this._gcm_mac_process(r)):this.adata=void 0}else this.adata=void 0;if(this.counter<1||this.counter>4294967295)throw new RangeError("counter must be a positive 32-bit integer");this.aes.asm.set_counter(0,0,0,this.gamma0+this.counter|0)}return s(e,[{key:"encrypt",value:function(e){return this.AES_GCM_encrypt(e)}},{key:"decrypt",value:function(e){return this.AES_GCM_decrypt(e)}},{key:"AES_GCM_Encrypt_process",value:function(e){var t=0,n=e.length||0,r=this.aes.asm,o=this.aes.heap,i=this.counter,a=this.aes.pos,s=this.aes.len,u=0,c=s+n&-16,l=0;if((i-1<<4)+s+n>B0)throw new RangeError("counter overflow");for(var f=new Uint8Array(c);n>0;)s+=l=R0(o,a+s,e,t,n),t+=l,n-=l,l=r.cipher(L0.ENC.CTR,L0.HEAP_DATA+a,s),(l=r.mac(L0.MAC.GCM,L0.HEAP_DATA+a,l))&&f.set(o.subarray(a,a+l),u),i+=l>>>4,u+=l,l<s?(a+=l,s-=l):(a=0,s=0);return this.counter=i,this.aes.pos=a,this.aes.len=s,f}},{key:"AES_GCM_Encrypt_finish",value:function(){var e=this.aes.asm,t=this.aes.heap,n=this.counter,r=this.tagSize,o=this.adata,i=this.aes.pos,a=this.aes.len,s=new Uint8Array(a+r);e.cipher(L0.ENC.CTR,L0.HEAP_DATA+i,a+15&-16),a&&s.set(t.subarray(i,i+a));for(var u=a;15&u;u++)t[i+u]=0;e.mac(L0.MAC.GCM,L0.HEAP_DATA+i,u);var c=void 0!==o?o.length:0,l=(n-1<<4)+a;return t[0]=0,t[1]=0,t[2]=0,t[3]=c>>>29,t[4]=c>>>21,t[5]=c>>>13&255,t[6]=c>>>5&255,t[7]=c<<3&255,t[8]=t[9]=t[10]=0,t[11]=l>>>29,t[12]=l>>>21&255,t[13]=l>>>13&255,t[14]=l>>>5&255,t[15]=l<<3&255,e.mac(L0.MAC.GCM,L0.HEAP_DATA,16),e.get_iv(L0.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(L0.ENC.CTR,L0.HEAP_DATA,16),s.set(t.subarray(0,r),a),this.counter=1,this.aes.pos=0,this.aes.len=0,s}},{key:"AES_GCM_Decrypt_process",value:function(e){var t=0,n=e.length||0,r=this.aes.asm,o=this.aes.heap,i=this.counter,a=this.tagSize,s=this.aes.pos,u=this.aes.len,c=0,l=u+n>a?u+n-a&-16:0,f=u+n-l,h=0;if((i-1<<4)+u+n>B0)throw new RangeError("counter overflow");for(var d=new Uint8Array(l);n>f;)u+=h=R0(o,s+u,e,t,n-f),t+=h,n-=h,h=r.mac(L0.MAC.GCM,L0.HEAP_DATA+s,h),(h=r.cipher(L0.DEC.CTR,L0.HEAP_DATA+s,h))&&d.set(o.subarray(s,s+h),c),i+=h>>>4,c+=h,s=0,u=0;return n>0&&(u+=R0(o,0,e,t,n)),this.counter=i,this.aes.pos=s,this.aes.len=u,d}},{key:"AES_GCM_Decrypt_finish",value:function(){var e=this.aes.asm,t=this.aes.heap,n=this.tagSize,r=this.adata,o=this.counter,i=this.aes.pos,a=this.aes.len,s=a-n;if(a<n)throw new M0("authentication tag not found");for(var u=new Uint8Array(s),c=new Uint8Array(t.subarray(i+s,i+a)),l=s;15&l;l++)t[i+l]=0;e.mac(L0.MAC.GCM,L0.HEAP_DATA+i,l),e.cipher(L0.DEC.CTR,L0.HEAP_DATA+i,l),s&&u.set(t.subarray(i,i+s));var f=void 0!==r?r.length:0,h=(o-1<<4)+a-n;t[0]=0,t[1]=0,t[2]=0,t[3]=f>>>29,t[4]=f>>>21,t[5]=f>>>13&255,t[6]=f>>>5&255,t[7]=f<<3&255,t[8]=t[9]=t[10]=0,t[11]=h>>>29,t[12]=h>>>21&255,t[13]=h>>>13&255,t[14]=h>>>5&255,t[15]=h<<3&255,e.mac(L0.MAC.GCM,L0.HEAP_DATA,16),e.get_iv(L0.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(L0.ENC.CTR,L0.HEAP_DATA,16);for(var d=0,p=0;p<n;++p)d|=c[p]^t[p];if(d)throw new D0("data integrity check failed");return this.counter=1,this.aes.pos=0,this.aes.len=0,u}},{key:"AES_GCM_decrypt",value:function(e){var t=this.AES_GCM_Decrypt_process(e),n=this.AES_GCM_Decrypt_finish(),r=new Uint8Array(t.length+n.length);return t.length&&r.set(t),n.length&&r.set(n,t.length),r}},{key:"AES_GCM_encrypt",value:function(e){var t=this.AES_GCM_Encrypt_process(e),n=this.AES_GCM_Encrypt_finish(),r=new Uint8Array(t.length+n.length);return t.length&&r.set(t),n.length&&r.set(n,t.length),r}},{key:"_gcm_mac_process",value:function(e){for(var t=this.aes.heap,n=this.aes.asm,r=0,o=e.length||0,i=0;o>0;){for(r+=i=R0(t,0,e,r,o),o-=i;15&i;)t[i++]=0;n.mac(L0.MAC.GCM,L0.HEAP_DATA,i)}}}],[{key:"encrypt",value:function(t,n,r,o,i){return new e(n,r,o,i).encrypt(t)}},{key:"decrypt",value:function(t,n,r,o,i){return new e(n,r,o,i).decrypt(t)}}]),e}(),V0=function(e,t){var n,r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[];if(t=t||o.length,e)for(n=0;n<e;n++)i[n]=o[0|Math.random()*t];else for(i[8]=i[13]=i[18]=i[23]="-",i[14]="4",n=0;n<36;n++)i[n]||(r=0|16*Math.random(),i[n]=o[19===n?3&r|8:r]);return i.join("")},U0=function(e){"object"===n(e)&&(e=JSON.stringify(e));var t="".concat(V0(3),":").concat(V0(3),":").concat(V0(3),":").concat(V0(4)),r=V0(12),o=N0.encrypt(_0(e),_0(t),_0(r));return{key:t,iv:r,eyptStr:C0(E0(o))}},W0=function(e,t,n){var r=N0.decrypt(function(e){return _0(P0(e))}(e),_0(t),_0(n));return E0(r)},z0=function(){function e(){i(this,e),u(this,"data",Object.create(null)),u(this,"currentLang","zh-CN")}return s(e,[{key:"trans",value:function(e,t){var n;return(null===(n=this.data[null!=t?t:this.currentLang])||void 0===n?void 0:n[e])||e}},{key:"add",value:function(e,n){this.data[e]=t(t({},this.data[e]),n)}},{key:"setCurrentLang",value:function(e){this.currentLang=e}}]),e}(),H0=new z0;H0.setCurrentLang("zh-CN");var G0="Loading...",X0="FaceTheScreen",Q0="DetectionCompleted",Y0="WellLit",q0="FacePhone",K0="DoNotCoverFace",J0="XhrError",Z0="CheckError",$0="CheckNetFail",e1="Rejected",t1="Auth",n1="Unsupported",r1="NotAllowed",o1="NotFound",i1="NotReadable",a1="OverConstrained",s1="Abort",u1="PdFail",c1="GetConfNetFail",l1="GetConfFail",f1="TipEmpty",h1="TipMultiple",d1="TipOutside",p1="TipClose",v1="TipFar",g1="TipLight",m1="TipDark",y1="TipRotate",b1="TipBlink",w1="TipMouthopen",A1="TipHeadRight",x1="TipHeadLeft",T1="TipLookup",P1="TipLookdown",C1="TipActionOver",_1="TipColorReady",E1="TipColorRunning",S1="TipOK",k1="TipTimeout",R1="FailTipUnsupported",O1="FailTipNotAllowed",F1="FailTipNotFound",M1="FailTipNotReadable",I1="FailTipOverConstrained",D1="FailTipAbort",L1="FailTipPDFail",j1="FailTipTimeout",B1="FailTipReject",N1="FailTipAuth",V1="VideoActionOpenMouth",U1="VideoActionWink",W1="VideoTipTesting",z1="VideoTipDuration",H1="VideoTipCameraFail",G1="VideoTipSelfRecord",X1="VideoTipBrightenEnv",Q1="VideoTipBlink35",Y1="VideoTipOpenMouth35",q1="VideoTipVideoLen35",K1="VideoStartRecord",J1="VideoTipVideoTooLarge",Z1="VideoTipVideoUseless";H0.add("zh-CN",(u(O0={},G0,"准备中..."),u(O0,X0,"请正对屏幕"),u(O0,Q0,"检测完成"),u(O0,Y0,"光线充足"),u(O0,q0,"正对手机"),u(O0,K0,"脸无遮挡"),u(O0,J0,"网络请求错误"),u(O0,Z0,"校验不通过"),u(O0,$0,"校验接口网络错误"),u(O0,e1,"浏览器没有摄像头权限或⽤户拒绝授权"),u(O0,t1,"鉴权不通过"),u(O0,n1,"浏览器不支持"),u(O0,r1,"用户拒绝了相机权限"),u(O0,o1,"找不到摄像头"),u(O0,i1,"异常硬件导致无法读取摄像头"),u(O0,a1,"摄像头分辨率过低"),u(O0,s1,"未知问题导致摄像头无法被使用"),u(O0,u1,"炫瞳检测失败"),u(O0,c1,"获取配置接口网络错误"),u(O0,l1,"获取配置失败,请检查接入配置是否正确"),u(O0,f1,"未检测到⼈脸"),u(O0,h1,"请保持单⼈⼊镜"),u(O0,d1,"请将⼈脸移⼊框内"),u(O0,p1,"请远离屏幕"),u(O0,v1,"请靠近屏幕"),u(O0,g1,"请调暗环境光线"),u(O0,m1,"请调亮环境光线"),u(O0,y1,"请保持正脸"),u(O0,b1,"眨眨眼"),u(O0,w1,"张张嘴"),u(O0,A1,"向右转头"),u(O0,x1,"向左转头"),u(O0,T1,"向上抬头"),u(O0,P1,"向下低头"),u(O0,C1,"动作核验完成"),u(O0,_1,"屏幕即将闪烁,请保持正脸"),u(O0,E1,"变光中,请保持正脸"),u(O0,S1,"请保持不动"),u(O0,k1,"采集超时"),u(O0,R1,"该浏览器不支持"),u(O0,O1,"请开启相机权限"),u(O0,F1,"找不到摄像头"),u(O0,M1,"异常硬件导致无法读取摄像头"),u(O0,I1,"摄像头分辨率过低"),u(O0,D1,"未知错误导致无法读取摄像头"),u(O0,L1,"炫瞳检测失败"),u(O0,j1,"检测超时"),u(O0,B1,"获取相机权限失败"),u(O0,N1,"认证不通过"),u(O0,V1,"张嘴"),u(O0,U1,"眨眼"),u(O0,W1,"检测中,请耐心等待"),u(O0,z1,"视频长度和手机的网络速度会影响视频式活体的检测时间,如果视频中面部不完整可能会检测失败"),u(O0,H1,"打开摄像头失败"),u(O0,G1,"请自行录制一段视频进行验证"),u(O0,X1,"请在明亮环境下录制 3~5 秒"),u(O0,Q1,"请在录制过程中眨眼 3~5 次"),u(O0,Y1,"请在录制过程中张嘴 3~5 次"),u(O0,q1,"请保持完整面部轮廓在视频中"),u(O0,K1,"开始录制"),u(O0,J1,"当前视频大于 15M,请重新上传"),u(O0,Z1,"未采集到有效视频,请重新上传"),O0)),H0.add("en-US",(u(F0={},G0,"Loading"),u(F0,X0,"Face the screen"),u(F0,Q0,"Detection completed"),u(F0,Y0,"Keep well lit"),u(F0,q0,"Facing the phone"),u(F0,K0,"Do not cover the face"),u(F0,J0,"Network request error"),u(F0,Z0,"Verification failed"),u(F0,$0,"check interface network error"),u(F0,e1,"The browser does not have the camera permission or the user refuses to authorize"),u(F0,t1,"Authentication failed"),u(F0,n1,"Browser does not support"),u(F0,r1,"User denied camera permission"),u(F0,o1,"Camera not found"),u(F0,i1,"Abnormal hardware makes it impossible to read the camera"),u(F0,a1,"Camera resolution is too low"),u(F0,s1,"An unknown problem prevents the camera from being used"),u(F0,u1,"Dazzling detection failed"),u(F0,c1,"Get config interface network error"),u(F0,l1,"Failed to obtain the configuration, please check whether the access configuration is correct"),u(F0,f1,"No face detected"),u(F0,h1,"Stay single"),u(F0,d1,"Move the face into the frame"),u(F0,p1,"Stay away from the screen"),u(F0,v1,"Move closer to the screen"),u(F0,g1,"Dim the ambient light"),u(F0,m1,"Brighten the ambient light"),u(F0,y1,"Keep a straight face"),u(F0,b1,"Wink"),u(F0,w1,"Open mouth"),u(F0,A1,"Turn head right"),u(F0,x1,"Turn head left"),u(F0,T1,"Look up"),u(F0,P1,"Look down"),u(F0,C1,"Action verification completed"),u(F0,_1,"The screen is about to flash, please keep facing the screen"),u(F0,E1,"During dimming, please keep facing the screen"),u(F0,S1,"Please stay still"),u(F0,k1,"Collection timeout"),u(F0,R1,"This browser does not support"),u(F0,O1,"Please enable camera permission"),u(F0,F1,"Camera not found"),u(F0,M1,"Can not read the camera"),u(F0,I1,"Camera resolution is too low"),u(F0,D1,"An unknown error prevented the camera from being read"),u(F0,L1,"Dazzling detection failed"),u(F0,j1,"Detection timeout"),u(F0,B1,"Failed to get camera permission"),u(F0,N1,"Authentication failed"),u(F0,V1,"open mouth"),u(F0,U1,"wink"),u(F0,W1,"Testing, please wait"),u(F0,z1,"The length of the video and the network speed of the mobile phone will affect the detection time of video-based liveness, If the face in the video is incomplete, the detection may fail"),u(F0,H1,"Failed to open camera"),u(F0,G1,"Please record a video yourself to verify"),u(F0,X1,"Please record for 3-5 seconds in a bright environment"),u(F0,Q1,"Please blink 3-5 times during recording"),u(F0,Y1,"Please open mouth 3-5 times during recording"),u(F0,q1,"Don not get too close to the camera, keep full facial contours in the video"),u(F0,K1,"Start recording"),u(F0,J1,"The video is larger than 15M, please re-upload"),u(F0,Z1,"No valid video captured, please upload again"),F0));var $1="ne-live-detection",e2="tip",t2="action",n2="color",r2="loading",o2="update-config",i2="video-change",a2="update-record-step",s2="ready",u2="verify",c2="error",l2="timeout",f2="checking",h2="check-done",d2={XHR_ERROR:[-8001,J0],CHECK_ERROR:[1e4,Z0],CHECK_NET_FAIL:[10001,$0],REJECTED:[11e3,e1],AUTH:[11001,t1],UNSUPPORT:[11002,n1],NOT_ALLOWED:[11003,r1],NOT_FOUND:[11004,o1],NOT_READABLE:[11005,i1],OVER_CONSTRAINED:[11006,a1],ABORT:[11007,s1],PD_FAIL:[11008,u1],GET_CONF_NET_FAIL:[12e3,c1],GET_CONF_FAIL:[12001,l1]},p2=2,v2=3,g2={EMPTY:["empty",f1],MULTIPLE:["multiple",h1],OUTSIDE:["outside",d1],CLOSE:["close",p1],FAR:["far",v1],LIGHT:["light",g1],DARK:["dark",m1],ROTATE:["rotate",y1],BLINK:["blink",b1],MOUTHOPEN:["mouthopen",w1],HEADRIGHT:["headright",A1],HEADLEFT:["headleft",x1],LOOKUP:["lookup",T1],LOOKDOWN:["lookdown",P1],ACTION_OVER:["action_over",C1],COLOR_READY:["color_ready",_1],COLOR_RUNNING:["color_running",E1],OK:["ok",S1],TIMEOUT:["timeout",k1]},m2={UNSUPPORTED:["unsupported",R1],NOT_ALLOWED:["notallowed",O1],NOT_FOUND:["notfound",F1],NOT_READABLE:["notreadable",M1],OVER_CONSTRAINED:["overconstrained",I1],ABORT:["abort",D1],PD_FAIL:["pdFail",L1],TIMEOUT:["timeout",j1],REJECT:["reject",B1],AUTH:["auth",N1]},y2=1,b2=["3",V1],w2=[3,"视频活体"],A2=["debugLog","调试日志"],x2=["apiError","接口错误"],T2={"Access-Control-Allow-Origin":"*"};function P2(e){return C2.apply(this,arguments)}function C2(){return C2=o(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u,c,l,f,h,d=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d.length>1&&void 0!==d[1]?d[1]:function(){},r=d.length>2&&void 0!==d[2]?d[2]:function(){},o=t.apiServer,i=t.url,a=t.method,s=void 0===a?"post":a,u=t.timeout,c=void 0===u?6e3:u,l=t.headers,f=t.data,Object.assign(T2,l),h=new Promise((function(e,t){var a=new XMLHttpRequest;if(!a){var u=new Error("cannot creat an XMLHTTP instance");r(d2.XHR_ERROR[0],u)}a.onreadystatechange=function(){var r=void 0!==XMLHttpRequest.DONE?XMLHttpRequest.DONE:4;if(a.readyState===r)if(a.status>=200&&a.status<300||304===a.status){var o;try{o=JSON.parse(a.response)}catch(x3){o=a.response}null==n||n(a.responseURL),e(o)}else{var i=new Error("网络请求错误");i.res={target:a.responseURL,status:a.status,response:a.response},t(i)}};var h="".concat(o).concat(i),d=s;if("GET"===s.toUpperCase()){var p=[];for(var v in f)Object.prototype.hasOwnProperty.call(f,v)&&p.push("".concat(v,"=").concat(f[v]));h=h+"?"+p.join("&"),d="get"}for(var g in"POST"===s.toUpperCase()&&(d="post"),a.open(d,h,!0),a.setRequestHeader("content-type","text/plain;charset=UTF-8"),a.timeout=c,l)Object.prototype.hasOwnProperty.call(l,g)&&a.setRequestHeader(g,l[g]);a.send("get"===d?null:JSON.stringify(f))})),e.abrupt("return",h);case 6:case"end":return e.stop()}}),e)}))),C2.apply(this,arguments)}var _2=Object.prototype.toString;function E2(e){return"string"==typeof e||"[object String]"===_2.call(e)}function S2(e){return"function"==typeof e||"[object Function]"===_2.call(e)}function k2(e){return"object"===("undefined"==typeof HTMLElement?"undefined":n(HTMLElement))?e instanceof HTMLElement:e&&"object"===n(e)&&1===e.nodeType&&"string"==typeof e.nodeName}var R2=/([\w-]+)?(?:#([\w-]+))?((?:\.(?:[\w-]+))*)/;function O2(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:$1,i=""===o?"":"_",a=[];e&&(a=null!==(r=R2.exec(e))&&void 0!==r?r:[]);var s=document.createElement(a[1]||"div");return a[2]&&(s.id=a[2]),a[3]&&(s.className=a[3].replace(/\./g," ".concat(o).concat(i)).trim()),t&&Object.keys(t).forEach((function(e){var n=t[e];void 0!==n&&(/^on\w+$/.test(e)?s[e]=n:s.setAttribute(e,n))})),n&&(E2(n)?s.innerHTML=n:n.forEach((function(e){return s.appendChild(e)}))),s}function F2(e){return e?E2(e)?document.querySelector(e):k2(e)?e:null:null}function M2(e){e&&(e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e))}function I2(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$1;if(!(t=t.trim()))return e;if(e.classList)t.split(" ").forEach((function(t){e.classList.add("".concat(n,"_").concat(t))}));else{var r=e.className&&e.className.baseVal||"";e.setAttribute("class",(r?"".concat(r," "):"")+t.split(" ").map((function(e){return n+e})).join(" "))}return e}function D2(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$1;return e.classList.remove("".concat(n,"_").concat(t)),e}function L2(e){if(e)for(var t=e.childNodes,n=t.length-1;n>=0;n--)e.removeChild(t[n])}var j2=function(){function e(t,n,r,o){i(this,e),this.node=t,this.type=n,this.handler=r,this.options=o,t.addEventListener(n,r,this.options)}return s(e,[{key:"dispose",value:function(){this.handler&&(this.node.removeEventListener(this.type,this.handler,this.options),this.node=null,this.handler=null,this.options=null)}}]),e}(),B2=new Map;function N2(e,t){var n;return B2.has(e)||B2.set(e,[]),null===(n=B2.get(e))||void 0===n||n.push(t),t}function V2(e){var t;B2.has(e)&&(null===(t=B2.get(e))||void 0===t||t.forEach((function(e){e.dispose()})),B2.delete(e))}var U2=function(){function e(){i(this,e),this._events=Object.create(null)}return s(e,[{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(!this._events[e])return!1;var i=x(this._events[e]);return i.forEach((function(e){e.apply(t,r)})),!0}},{key:"on",value:function(e,t){if("function"!=typeof t)throw new TypeError("The event-triggered callback must be a function.");return this._events[e]?this._events[e].push(t):this._events[e]=[t],{dispose:this.off.bind(this,e,t)}}},{key:"once",value:function(e,t){var n=this;return this.on(e,(function r(){null==t||t.apply(n),n.off(e,r)}))}},{key:"off",value:function(e,t){if(!this._events[e])return this;if(!t)return this._events[e]&&(this._events[e].length=0),this;for(var n=this._events[e].length,r=0;r<n;r++)if(this._events[e][r]===t){this._events[e].splice(r,1);break}return this}},{key:"removeAllListeners",value:function(e){return e?this._events[e]&&(this._events[e].length=0):this._events=Object.create(null),this}}]),e}();function W2(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{return JSON.parse(e)}catch(n){return t}}function z2(e){return e?e.split("?")[0]:e}function H2(e,t){var n=e;if(("string"==typeof n||"number"==typeof n)&&(n=parseFloat(String(n)),!Number.isNaN(n)))return n.toFixed(t)}var G2="[NELiveDetection]",X2={log:function(e,t){var n,r=["info","warn","error"];"string"==typeof e&&r.includes(e)?null===(n=console)||void 0===n||n[e]("".concat(G2," ").concat(t)):X2.error('[Inner util error]: log "type" must be one of the ['.concat(r.join(", "),"]}]"))},warn:function(e){X2.log("warn",e)},error:function(e){X2.log("error",e)},assert:function(e,t,n){if(!e)throw null==n||n(t),new Error("".concat(G2," ").concat(t))}};function Q2(e,t){e&&null!=t&&t.type&&null!=t&&t.name&&null!=t&&t.value&&e.collect(t.type,t.name,t.value)}var Y2=window.performance||window.msPerformance||window.webkitPerformance||{},q2=Y2&&"getEntriesByName"in Y2;function K2(e){if(e&&q2){return function(t){var n,r,o=null===(n=Y2.getEntriesByName(t))||void 0===n?void 0:n[0];if(o){var i=function(e){if(!e)return{};var t=document.createElement("a");return t.href=e,{source:e,protocol:t.protocol.replace(":",""),host:t.hostname,port:t.port,query:t.search,hash:t.hash.replace("#",""),path:t.pathname.replace(/^([^/])/,"/$1"),segments:t.pathname.replace(/^\//,"").split("/")}}(t),a=null!==(r=i.path)&&void 0!==r?r:"-",s=JSON.stringify({tc:H2(o.responseEnd-(o.domainLookupStart||o.connectStart),1),dc:H2(o.domainLookupEnd-o.domainLookupStart,1),cc:H2(o.connectEnd-o.connectStart,1),rc:H2(o.responseStart-o.requestStart,1),rr:H2(o.responseEnd-o.responseStart,1),url:t,host:i.host,https:"https"===i.protocol});e.collectAsync("netPerformance",a,s)}}}}function J2(e,t,n){return{type:A2[0],name:e,value:JSON.stringify({type:"confErr",conf:t,log:n})}}var Z2={mode:"mount",businessKey:"",container:void 0,diameter:220,audio:!1,fallback:!0,footerTip:!0,lang:"zh-CN",preload:!1};function $2(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t({model:"DUB-AL20 Google Chrome",osVersion:"8.1.0",sdkType:"3",terminal:"1",version:"3.1.2"},e)}var e3=function(){return e3=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},e3.apply(this,arguments)};var t3,n3={userData:null,name:location.hostname+"_snaker",init:function(){if(!n3.userData)try{n3.userData=document.createElement("INPUT"),n3.userData.type="hidden",n3.userData.style.display="none",n3.userData.addBehavior("#default#userData"),n3.userData&&document.body.appendChild(n3.userData);var e=new Date;e.setDate(e.getDate()+365),n3.userData.expires=e.toUTCString()}catch(x3){return console.log("userData is disabled!"),!1}return!0},setItem:function(e,t){n3.init()&&n3.userData&&(n3.userData.load(n3.name),n3.userData.setAttribute(e,t),n3.userData.save(n3.name))},getItem:function(e){return n3.init()&&n3.userData?(n3.userData.load(n3.name),n3.userData.getAttribute(e)||""):""},removeItem:function(e){n3.init()&&n3.userData&&(n3.userData.load(n3.name),n3.userData.removeAttribute(e),n3.userData.save(n3.name))}};try{t3=localStorage||n3}catch(T3){t3=n3}var r3=function(){function e(e){this.name=e}return e.prototype.push=function(e){if(e)try{var t=t3.getItem(this.name);t3.setItem(this.name,t?t+","+e:e)}catch(x3){console.log("localstorage or userData is disabled!")}},e.prototype.length=function(){try{var e=t3.getItem(this.name)||"";return e?e.split(",").length:0}catch(x3){return console.log("localstorage or userData is disabled!"),0}},e.prototype.pop=function(e){var t;void 0===e&&(e=1);try{var n=t3.getItem(this.name),r=n?n.split(","):[];t=r.splice(0,e),t3.setItem(this.name,r.join(","))}catch(x3){t=[],console.log("localstorage or userData is disabled!")}return t},e.prototype.clear=function(){try{t3.removeItem(this.name)}catch(x3){console.log("localstorage or userData is disabled!")}},e}(),o3=function(){function e(e){if(!e.pid)throw new Error("product id is required!");var t=e.pid,n=e.bid,r=e.url,o=e.random,i=e.limit,a=e.disabled,s=e.version;this.pid=t,this.bid=n,this.random=o||1,this.limit=i||5,this.disabled=a,this.version=s||"",this.url=r||"https://da.dun.163.com/sn.gif",this.prefix="__snaker__id",this.cache=new r3(this.prefix);var u=function(e){var t=new RegExp("(^|;)[ ]*"+e+"=([^;]*)").exec(document.cookie);return t?decodeURIComponent(t[2]):""}(this.prefix);u?this.uuid=u:(this.uuid=function(){for(var e="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",t="",n=0,r=e.length;n<16;n++)t+=e.charAt(Math.floor(Math.random()*r));return t}(),function(e,t,n){var r,o=e+"="+encodeURIComponent(t)+";";n&&((r=new Date).setTime(r.getTime()+n),o+="expires="+r.toUTCString()),document.cookie=o}(this.prefix,this.uuid,31536e6))}return e.prototype.setUser=function(e){if("string"==typeof e)this.user={uid:e};else for(var t in this.user={uid:e.uid},e)e.hasOwnProperty(t)&&"uid"!==t&&(this.user["$user_"+t]=e[t])},e.prototype.serialize=function(e,t){var n,r,o=this,i=o.pid,a=o.bid,s=o.uuid,u=o.user,c=o.version,l=e.type,f=e.name,h=e.value,d=screen.width+"x"+screen.height,p=(n=location.href,r=200,n.substring(0,r)),v=(new Date).getTime()+"",g=e3(e3({pid:i,bid:a,uuid:s,type:l,name:f,version:c,value:h,res:d,pu:p,nts:v},t),u),m=[];for(var y in g)g.hasOwnProperty(y)&&void 0!==g[y]&&m.push(encodeURIComponent(y+"=")+encodeURIComponent(encodeURIComponent(g[y])));return m.join("%26")},e.prototype.sendRequest=function(e,t){this.disabled||(new Image(1,1).src=e+"?d="+t)},e.prototype.report=function(e,t,n,r,o){if(!(this.disabled||this.random<Math.random())){var i=this.serialize({type:e,name:t,value:n},o||{});r?(this.cache.push(i),this.cache.length()>=this.limit&&this.flush()):this.sendRequest(this.url,i)}},e.prototype.track=function(e,t,n,r){this.report(e,t,n,!1,r)},e.prototype.trackAsync=function(e,t,n,r){this.report(e,t,n,!0,r)},e.prototype.flush=function(){for(var e="",t=this.cache.pop(this.limit);t.length;){var n=t.pop()||"";n&&((e=e?e+","+n:n).length>1800&&(this.sendRequest(this.url,e),e=""))}e&&this.sendRequest(this.url,e)},e}(),i3=function(){function e(n){i(this,e),this.snaker=new o3(t(t({},n),{},{pid:"liveperson",version:"2.3.1"})),this.extraParams={tt:"web",dataVersion:"v1"}}return s(e,[{key:"collect",value:function(e,n,r){this.snaker.track(e,n,r,t({},this.extraParams))}},{key:"collectAsync",value:function(e,n,r){this.snaker.trackAsync(e,n,r,t({},this.extraParams))}}]),e}(),a3=function(){function e(t,n,r,o,a){i(this,e),n&&!E2(n)&&k2(n)?this.el=n:this.el=O2(n,r,o,a),t&&t.appendChild(this.el)}return s(e,[{key:"injectStyle",value:function(e){Object.assign(this.el.style,e)}},{key:"dispose",value:function(){M2(this.el),V2(this)}}]),e}(),s3=function(e){c(n,e);var t=y(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,".tip",{},H0.trans(X0))).neLiveDetection=r,N2(g(o),r.on(e2,o.updateTip.bind(g(o)))),o}return s(n,[{key:"updateTip",value:function(e){var t=e.code,n=e.type,r=void 0===n?"tip":n;this.code=t,this.text=function(e,t){var n=null;return"tip"===e&&Object.keys(g2).forEach((function(e){g2[e][0]===t&&(n=H0.trans(g2[e][1]))})),"fail"===e&&Object.keys(m2).forEach((function(e){m2[e][0]===t&&(n=H0.trans(m2[e][1]))})),n}(r,t),this.el.textContent=this.text}}]),n}(a3),u3="color_circle--active",c3=function(e){c(n,e);var t=y(n);function n(e,r,o){var a;return i(this,n),(a=t.call(this,e,".color")).neLiveDetection=r,a.opts=o,a.colors=[],a.initColors(),N2(g(a),r.on(o2,a.initColors.bind(g(a)))),N2(g(a),r.on(n2,a.updateActiveColor.bind(g(a)))),a}return s(n,[{key:"initColors",value:function(){var e=this;L2(this.el);var t=this.neLiveDetection.options.colorMap,n=void 0===t?[]:t;this.colors=n.map((function(t,n){var r=O2(".color_circle");return I2(r,"color_circle-".concat(n)),r.style.background=t,r.style.cssText=";background:".concat(t,";width:").concat(e.opts.size,"px;height:").concat(e.opts.size,"px"),e.el.appendChild(r),r})),this.activeColor=-1,this.updateActiveColor(this.activeColor)}},{key:"updateActiveColor",value:function(e){this.colors.forEach((function(t,n){n===e?I2(t,u3):D2(t,u3)}))}}]),n}(a3),l3="camera_loading-text--show",f3=function(e){c(n,e);var t=y(n);function n(e,r){var o;i(this,n),(o=t.call(this,e,".camera")).neLiveDetection=r,o.loading=!0,o.cameraInner=O2(".camera_inner");var a=O2("video#".concat($1,"_camera_video"),{muted:!0,autoplay:!0,"x5-playsinline":"",playsinline:"","webkit-playsinline":""},"Please update your browser."),s=O2("img.camera_loading-bg",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAggAAAIICAYAAAAL/BZjAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAABWNSURBVHic7d1NctvGFoDRbnkjHrm0C8NzUmvIW4mllSTZgsi54WVQo6xEeINQjiyQEn8A9N85o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BWDkDuxEHZTBAK550JQG6EQR0EQiW8MwHIgTioh0CoiGkCkIowqI9AqJCXKwFLEgd1EggV86QDMCdhUDeBUDnTBGAO4qB+AqERLjECUxAG7fAehEZ4CyNwLXHQFhOEBpkmAOcQBm0SCI3ySCTwEWHQNoHQOKEAvBVjfHh+fu63222f+iykIxAIIQgF4F+mBrwQCPzG/QRokzDgLYHAiGkCtEMYcIxA4CihAPWKMT6EEII44BiBwIeEAtRDGHAqgcDJhAKUzTqBcwgEziYUoCzCgEsIBC4mFCBvwoBrCASuJhQgL8KAKQgEJiMUIC1hwJQEApMTCrAcTyUwF4HAbIQCzEcYMDeBwOxWq1V3c3PTeYUzXM8agaUIBBZlqgCXEQYsTSCQhFCAj1kjkJJAICmhAGOmBeRAIJANsUDj+hjjT2FALgQC2XkVCiGIBSpnWkCuBAJZM1WgRu4WUAKBQDHEAiUTBZRGIFCcV+9V+BrEApmzQqBUAoGiua9AhvoY48/n5+d+u932qQ8DlxIIVGO1WnUhhGANQQKeQKA6AoFqubPAnNwpoHYCgSaIBaYgCmiJQKA5LjlyBvcJaJZAoHmCgVcEAewJBHjDkxFNEQRwhECADwiGqvQxxp8huEcAHxEIcKY3j1OGIBpy9SsGTAjgfAIBJvASDe4yJGMyABMTCDCTA9EQgnC41q8QCEEMwJwEAiRwJB5CEBAhvIkA6wFIQyBAZl7HQwghvAmIEMqNiP7lH94GQAghiADIi0CAgr3ERAj/BUUIB6PimO7D/+LVD/ZDXv+wD+G/H/gh+KEPJfs/XWuM0SFottoAAAAASUVORK5CYII="}),u=O2("div.camera_loading-circle"),c=O2("span.camera_loading-msg",{},H0.trans(G0));return o.cameraLoadingText=O2(".camera_loading-text",{},[s,u,c]),N2(g(o),new c3(o.el,r,{size:r.options.diameter})),o.circleBg=O2(".camera_circle-bg"),o.circleAni=O2(".camera_circle-animation"),o.updateCameraDiameter(),o.cameraInner.appendChild(a),o.cameraInner.appendChild(o.cameraLoadingText),[o.cameraInner,o.circleBg,o.circleAni].forEach((function(e){o.el.appendChild(e)})),o.updateLoadingStatus(!0),N2(g(o),r.on(r2,o.updateLoadingStatus.bind(g(o)))),N2(g(o),r.on(e2,o.updateCircleAni.bind(g(o)))),o}return s(n,[{key:"updateCameraDiameter",value:function(){var e=this.neLiveDetection.options.diameter,t=function(e,t){e.style.width="".concat(t,"px"),e.style.height="".concat(t,"px")};t(this.cameraInner,e),[this.circleBg,this.circleAni].forEach((function(n){t(n,e+12)}))}},{key:"updateLoadingStatus",value:function(e){var t=Boolean(e);this.loading=Boolean(e),t?I2(this.cameraLoadingText,l3):D2(this.cameraLoadingText,l3)}},{key:"updateCircleAni",value:function(e){var t=e.type,n=function(e,t){if(""!==t){var n=[g2.EMPTY[0],g2.MULTIPLE[0],g2.OUTSIDE[0],g2.CLOSE[0],g2.FAR[0],g2.LIGHT[0],g2.DARK[0],g2.ROTATE[0],g2.TIMEOUT[0]],r=Object.values(m2).map((function(e){return e[0]}));return"fail"===e&&r.includes(t)?"#FC8D74":"tip"===e?n.includes(t)?"#FC8D74":"#5FD6A9":void 0}}(void 0===t?"tip":t,e.code);n&&(this.circleAni.style.borderColor=n)}}]),n}(a3),h3="progress_step--active",d3=function(e){c(n,e);var t=y(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,".progress")).neLiveDetection=r,o.steps=[],o.initSteps(),N2(g(o),r.on(o2,o.initSteps.bind(g(o)))),N2(g(o),r.on(t2,o.updateActiveIndex.bind(g(o)))),o}return s(n,[{key:"initSteps",value:function(){var e=this;L2(this.el);var t=this.neLiveDetection.options.code,n=void 0===t?"":t;this.steps=n.split("").map((function(e,t){return O2(".progress_step",{},"<span>".concat(t+1,"</span>"))})),this.steps.forEach((function(t){e.el.appendChild(t)})),this.activeIndex=0,this.updateActiveStep(this.activeIndex)}},{key:"updateActiveStep",value:function(e){this.steps.forEach((function(t,n){n===e?I2(t,h3):D2(t,h3)}))}},{key:"updateActiveIndex",value:function(e){this.activeIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.max(Math.min(e,n),t)}(e,0,this.steps.length-1),this.updateActiveStep(this.activeIndex)}}]),n}(a3),p3=function(e){c(n,e);var t=y(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,".footer")).neLiveDetection=r,o.iconTips=[["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAYAAADG4PRLAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAm3SURBVHgB7Z1RdhM5FoavqhyThD5nMisYswLICnBW0GEFTR4GhukHyAMJDA84Dwxj0+cEHvowYeacMCvosALMCnCvoGtWMJmHtkPsKvW9drlPSGxJVVZJKrm+F7op2VTpt1RX915dAVRUVFRUVCwnDDzk5cu3jbAWHgPwW5zDBv7VSRInu0+fPojAM7wTcCJe8DkV7iKnKOKmbyIG4BlBGB7OEI/YCEMalX7hnYA4bW7PvYJTKniGhwIK2QDPWDYBvaMSsORUApacSsCSUwlYcrwTED0Tp7BEeCdgwlhv3jWe8A/gGd4JyEfxzqxRSH/HOX8EnuGdgOTrjNHniVKe0P+PhWO8G3voByW0OrOXKQqggon+0CagKAowGo62nj37vgdLRKfz4y1gtY9FR0W0TaGiKEBtpfbxxYsfvXMkz0MgHqE1KqLxHTg/CgBLJKJEvDE6oyLaBFRYf3kvoop4KdqiItoEFK2/LuCtiGQDKIqndT2qTcB5668ZbKys1PyLjIeBkni616PaBJxYVaMtFRE5wK0ffvj3n8ATXrx4RzNKQ9Zu0jejLZ3LiBpoZG/v+x6+B1BEnEok8/xwOLyBf/wXFqTVOt6or503wyBucF67iZ2Encnp325cahoxYBEaEKcJT36GBLpfvqz2Wq0dI77TqXjUR6CRQrLSxi9ziYiDfv2PeTuPRLt+ffQQxWjidNSEBUBRu5yNPiQjdpJ3ZBweHm8Mh+e/zHveosRLv7sYhCLy5GB//0ELMoKGQhM9G88XFW0eJGYcx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5j1fOOtmRhXUDC9FBEoPZThpu93j+tp2S4gAbRk5fU1/5SXY5gTckhYmSNYcUPQU5mFdZMvgd1OwQ5xdSdpuD0UH8ymXyoipDkLu/cmeCwmNi4Jgn4Wly4zWmcCkgYHk86TYAWOZilRRYRLo7IJyuuD/5yLiBhYQb9SID4+HzL3Zucks4tMs6e5s44L/G8xFIEJGgi+GJ80UerMj6dJIWx6OTrAYkJIQxsrk7iLbkK0nuA1+iaWts0ZR+rXpqAKUm7qHfmrgISFCQ7CWV4HG26F0Zv/intHnW5AqdGf3xaGctl6x4w4RcV7Pu9oMsM4yVpB1AipQtIRJXJoZ8nl6WilLKe8CpmImCKTWucCXFbt15W7s9VzFTAlLoJGe+fBttVOJ20EgKmVF5ISTMu4f75efugKkN/lRIwJU7Dk9g+MlW6RimUkfibl0oKmJJEjl3WYo+YZF0oERKNCfGxStZ2FZUWcJpUTIxeu5zzexpnWRgiAwlAS9mOL84Wj+oyO1IbAS9DIyZ0rgIdiyAk9zmHu7S/N2VkU2b25czx79nZjGHfUQZxhrYIaBuV6dW8DQ0NDQ0NDQ0NDQ0NDQ1V5i/47TibkqZqYQAAAABJRU5ErkJggg==",H0.trans(K0)]],N2(g(o),r.on(o2,o.initFooter.bind(g(o)))),o}return s(n,[{key:"initFooter",value:function(){var e=this;L2(this.el),this.neLiveDetection.options.footerTip&&this.iconTips.forEach((function(t){var n=O2(".footer_icon-wrap");[O2("img.footer_icon",{src:t[0]}),O2("p.footer_text",{},t[1])].forEach((function(e){n.appendChild(e)})),e.el.appendChild(n)}))}}]),n}(a3),v3=function(e){c(n,e);var t=y(n);function n(e,r){var o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"center";return i(this,n),(o=t.call(this,e,".toast")).position=a,I2(o.el,"toast_".concat(a)),k2(r)&&o.el.appendChild(r),E2(r)&&(o.el.innerHTML=r),o}return s(n,[{key:"dispose",value:function(){w(l(n.prototype),"dispose",this).call(this),clearTimeout(this.timer)}}]),n}(a3),g3=function(){function e(t){i(this,e),u(this,"toasts",[]),this.container=t}return s(e,[{key:"show",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e5,r=this.toasts.find((function(e){return e.position===t}));return r?(clearTimeout(r.timer),k2(e)&&(L2(r.el),r.el.appendChild(e)),E2(e)&&(r.el.innerHTML=e)):(r=new v3(this.container,e,t),this.toasts.push(r)),n>0&&(r.timer=setTimeout(this.close.bind(this,r),n)),r}},{key:"close",value:function(e){if(e)return this.toasts=this.toasts.filter((function(t){return t!==e})),void e.dispose();this.toasts.forEach((function(e){e.dispose()})),this.toasts.length=0}},{key:"dispose",value:function(){this.toasts&&(this.close(),this.toasts=null,this.container=null)}}]),e}(),m3=function(e){c(n,e);var t=y(n);function n(e,r){var o;i(this,n),(o=t.call(this,e,".record-start")).neLiveDetection=r,o.toast=N2(g(o),new g3(o.el));var a=document.createDocumentFragment(),s=O2("img.record-tip-icon",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAMAAABKCk6nAAABnlBMVEUAAAD/iin/jhv/jRz/mCf/jhz/fgv/jhf/jhj/jh3/jxr/jh3/jyD/jxz/jhz/jhr/jx3/jxz/jx3/kB3/jx3/kB3/kB3/kB3/jxz/jxv/jx3/jhz/jx3/jx3/jx3/kB3/jx3/jx3/kB7/jx3/kB3/jxz/kB3/kx3/kBz/kB7/kB3/kB3/jhz/jx3/jx3/jx3/jx3/jx3/kB3/jh3/jhz/jx3/tEr/kB3/jx3/jx3/kB3/kR7/pjj/jh3/jxv/qj3/kB3/kx//liH/mCf/pDX/jxz/s0r/kiH/miv/kiD/kiH/lCP/r0b/kR//kB3/rkT/kR7/kiD/q0D/kiD/pjr/jhv/pDf/tUv/qj7/rEL/oDL/qT3/rUL/rkT/r0X/oTP/nS//myz/rEH/qj//////qDz/lST/pjn/nS7/pDf/mCf/nCz/qz//nzD/kyH/mSn/ozX/r0T/rEH/kR//sEb/qT3/liX/miv/oDL/kB3/rUL/s0n/oTP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},H0.trans(H1)),c=O2("span.record-tip-sub",{},H0.trans(G1));o.conditionWrapper=O2("div.record-condition-wrapper"),[H0.trans(X1),H0.trans(Q1),H0.trans(q1)].forEach((function(e,t){var n=O2("div.record-condition-inner"),r=O2("span.record-condition-text",{},e);1===t&&I2(r,"record-condition-text--uni");var i=O2("img.record-condition-icon",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABxRSURBVHgB7XxbbFzbed6/LvsyMxxSI2l0pGPK1VEP5ITMSZMKtdHWxaFRwEXgvhQoT4Og6S1unTpA4Rgu0KJAOESBIK2LoGiQPgVG89CmOTyo81AbaF9MtXbROBbycEImUY4V2VR0G0nkcDgz+7Iu+f61ZyhStyPqLic/tbX3zOzLWt/+139d6yf6c/qBIjHeKvI4xua9r/b472UjSc+RAASDQhUgd7bwmQJQ1Ol0xAS4znInbAIfO9QRy51l6e+cTzTeh+9eELiCnjUx5zAc6GR4mBAByHC8vFw9f4lokeZ22zK/ui7WFuZ8ddwO3691ux4nEa2Mz1lc93xhZ3kZuyWPvVjCXggRnuXDo8QzR/WZABg4pIIrsEjHe9nBcYcYsCVaW1kRiwBjHeCs0jmihbepf/6COHv2LG2uXXxom1rzpz2dP0/ncdzsXw0AtbtjsBcXw56ftQsggyn4HYa+PnVAnzaAVSMnQ4yHHoYgOCSAxhzUBXcRvU3tdlfSOk6ZI9pJpsRr+jq+P0WDq10xe5JocH1TXMHPr9MJ2nwt87RB1DjRBgCXqGle8x+E+39AU/nxAEor2/QXAGibOXelArOzBzDmUIgHR08ZyKcmAyv55ivBT8wFy2Jx5V25NrcmaHVVzi9iKK6RWmjPydrofdVotCXNkpqdIXWyZ5Tdfl0NBl1N06R6g0SbqePqGLbBzLbO8bl5ONF1/F4fNPTW8KY+im2qe1zSNuFeA7kxk8s27t2i07J1elPyMxdpRS6uvCM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6bbtGZzH2+jyt21w/CHbmMvbK//Zryyv+2/gGfOB40SVRRvLuGrIPl3wqls+RxoHJ8JClZBj4NLES8yhVBXjHpcRDaEkyM815qR2xbXtcWFuJvZX11beEfOL87vfhbqolfNa5S4OUAPwlaJxXXzarZFfvUThx+Xfw6IfLnaG/eK776rJvuM7d8rAV25lQGcPS4mHlWj6M0V7gBiDu792/p/TDxD9KRmZRUHELHkWAAAAAElFTkSuQmCC"});n.appendChild(i),n.appendChild(r),o.conditionWrapper.appendChild(n)})),[s,u,c,o.conditionWrapper].forEach((function(e){return a.appendChild(e)}));var l=O2(".record-btn-wrapper");return o.recordBtn=O2("button.record-btn",{"aria-label":H0.trans(K1)},H0.trans(K1)),o.recordFileInput=O2("input.record-file-input",{type:"file",accept:"video/*",capture:"camcorder"}),[o.recordBtn,o.recordFileInput].forEach((function(e){return l.appendChild(e)})),a.appendChild(l),o.el.appendChild(a),function(e,t,n,r,o){var i=new j2(t,n,r,o);e&&N2(e,i)}(g(o),o.recordFileInput,"change",o.uploadVideo.bind(g(o))),N2(g(o),r.on(o2,o.updateSolutionTip.bind(g(o)))),o}return s(n,[{key:"show",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.el.style.display=e?"flex":"none"}},{key:"updateSolutionTip",value:function(){var e=this.neLiveDetection.options.videoActions,t=void 0===e?[]:e,n=this.conditionWrapper.childNodes[1];if(n){var r=n.childNodes[1];r&&(r.innerHTML=t[0]===b2[0]?H0.trans(Y1):H0.trans(Q1))}}},{key:"uploadVideo",value:function(e){var t=this,n=e.target.files;if(n&&n.length>0){this.neLiveDetection.emit(a2,"checking");var r=n[0];if(r.size>15728640)return this.neLiveDetection.emit(a2,"start"),void this.toast.show(H0.trans(J1),"top");var o=new FileReader;o.readAsDataURL(r),o.addEventListener("loadend",(function(){var e=o.result;null!==e&&t.neLiveDetection.emit(i2,e)}))}else this.neLiveDetection.emit(a2,"start"),this.toast.show(H0.trans(Z1),"top")}}]),n}(a3),y3=function(e){c(n,e);var t=y(n);function n(e){var r;i(this,n),r=t.call(this,e,".record-checking");var o=document.createDocumentFragment(),a=O2(".record-ani-wrapper");[O2(".record-ani-scan"),O2("img.record-ani-img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACgCAYAAADNecSHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABP4SURBVHgB7Z1vchvH0cZ7FqDK7+ukDJ/A6w+psiWmDJ3A0AksnUCw5FTlm6QTCDqBpG+piiyBJzB5AkMnEFyxZFflQ6AThKnIjiMRO+lndhZagNiZ2b/YBedXRQkkhySw+6C7p6dnWtCe84exHB4QDSmgUAj6RBINBFFI+JqZOX+c8sdCSnotI5qf8eO/T8Wc9hhBe0Q4loP/IxoFffqSJI1w4yEAqp4ZX7l5dEbP/8OPF1NxSntC5wXx2ViGQUA3+d0/4k9HtBtmLMCTZUTHP0/FgjpMJwUBS/D/Ad3ZsQiymLOLeRxFNOuiODolCLYGo36P7rAbuE7dYLpc0hELY0YdoROCgBB6PbpP7bMGrszYahy9eiqm1HJaLYg9EMImmLE8aLMwWimIPRTCJjN2JV+3McZolSAQLH4YsBAE3aWKEJJOpaAFIa8g6QeJ3EKP5iKiF8afE3SNf3YQSZW/+FJPX0dULYgxHrRJGK0RxOe35fWA6CHFSaPCaAHg5p+IgOY/Ptke0F25zcbbwMtvxdZrc/iNHHGSashX7iuqRiCtciM7F4S2Cg/5mYypIFoEx3wLj96c0dwlUVRUEGnw3H/fo1EUz3puUjlaYS12KggdKzyj4lZBJYR+iWiaN1tYhSDS6NzIdf4huLyQirGQAd149dfdpcd3JojD2xL5hEdUjBnfrgdZ7sCFqgWRRrkVqSxeIavBPzthF/KAdkDjgijpIkoLIaFOQSQgrc4WcEJFhCHo0cEZPZg3vE7SqCDUBerTd2zmbSuNm1QmhIQmBJGgA9FnBVzJguOKa03GFQE1hH63fJ9HDAgW+SLe45tzrUoxNA2e+8un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dVHLiPJx9MuyvtlEFo1aiDSH38iJLL6PA/HFURmLUaeFKGERYgTde/lE2Fc4a2BnggAFg800C76tD36N6Dhvxq5qQSCf8CFO54sPZBtREThewFaHH59U5xrzslNBAB11T/hh2RT2NFrSyX94gc1FHFUIAiL4gGjIz/8mKsOcUs7ZwEXcrToVnZedCyIBswl+Mvcr6uuNcy1OeGYzz3IrRQWh3EHAuQO2BDxgWFIEyipE7CJ++lYcUwtojSBAhdZik5nqcS7pOc/nF3hsq15+u6SrB3zD2YSjnzjaXQ/5YoWlBZCCf9fjX5c02bVVSNMqQSQUSd50jBkKinYZK2TRSkEkVOxG2kBrhZDQakEkKGHEp/CPqJu0XggJnRBEAucuRhwKjom60aKBY4TjQNDjLgghoVOCSECMgSP49AHfbSvDgzV4/uaMHrUpWHSlk4JIo9dHrpdKCJVHieCsT9Of/9JsqrlqOi+INEgU/b5HoyULg18YpoojqhgsRaNxOruD5z0Wwr+XbomwrrBXgtgG0uO9iMKl5DyCoE8o3iyLXIK1/bGgOGfBcctrQn/0Hs2xlE97zP8A1ewNTlKigEAAAAAASUVORK5CYII="})].forEach((function(e){return a.appendChild(e)}));var s=O2("span.record-tip-main",{},H0.trans(W1)),u=O2("span.record-tip-third",{},H0.trans(z1));return[a,s,u].forEach((function(e){return o.appendChild(e)})),r.el.appendChild(o),r}return s(n,[{key:"show",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.el.style.display=e?"flex":"none"}}]),n}(a3),b3=function(e){c(n,e);var t=y(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,".record")).neLiveDetection=r,o.start=N2(g(o),new m3(o.el,o.neLiveDetection)),o.checking=N2(g(o),new y3(o.el)),N2(g(o),r.on(a2,o.updateStep.bind(g(o)))),o}return s(n,[{key:"show",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.el.style.display=e?"block":"none",this.updateStep("start")}},{key:"updateStep",value:function(e){switch(e){case"start":this.start.show(),this.checking.show(!1);break;case"checking":this.start.show(!1),this.checking.show()}}}]),n}(a3),w3=["checkImages"],A3=function(e){c(b,e);var n,r,a,u,l,f,h,d,p,m=y(b);function b(e){var n,r;return i(this,b),(r=m.call(this)).cameraOpened=!1,r.loadOver=!1,r.collector=new i3({bid:e.businessKey}),r.netCollector=new i3({bid:e.businessKey,limit:9,random:.3}),r.request=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return function(){var r=o(regeneratorRuntime.mark((function r(o){var i,a,s=arguments;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=s.length>1&&void 0!==s[1]?s[1]:function(){},a=t(t({},e),o),r.abrupt("return",P2(a,n,i));case 3:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()}({apiServer:null!==(n=e.apiServer)&&void 0!==n?n:"https://verify.dun.163yun.com"},K2(r.netCollector)),r.options=function(e,n){var r=t(t({},Z2),e),o=r.businessKey,i=r.container;X2.assert(Boolean(o)&&/^[a-zA-Z0-9]+$/.test(o),'Correct "businessKey" is required',(function(e){Q2(n,J2("businessKey",r,e))}));var a=F2(i);return X2.assert(Boolean(a),'Correct "container" is required',(function(e){Q2(n,J2("container",r,e))})),r}(e,r.collector),r.container=F2(r.options.container),H0.setCurrentLang(r.options.lang),r.el=O2("div.".concat($1),{},void 0,""),r.tip=N2(g(r),new s3(r.el,g(r))),r.camera=N2(g(r),new f3(r.el,g(r))),r.progress=N2(g(r),new d3(r.el,g(r))),r.footer=N2(g(r),new p3(r.el,g(r))),r.record=N2(g(r),new b3(r.el,g(r))),N2(g(r),r.on(i2,r.videoChange.bind(g(r)))),r}return s(b,[{key:"mount",value:function(e){var t,n=this.options.onMount;e&&(this.container=null!==(t=F2(e))&&void 0!==t?t:this.container);this.container&&(this.container.appendChild(this.el),n&&n(this),this.initBdFaceSdk())}},{key:"mergeOptionsFromServer",value:(p=o(regeneratorRuntime.mark((function e(){var n,r,o,i,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getConfigs();case 2:n=e.sent,r=n.token,o=n.h5Colors,i=n.h5Actions,a=n.solutionType,s=n.videoActions,this.options=t(t({},this.options),{},{token:r,colorMap:o,code:(null==i?void 0:i.join(""))||"",solutionType:a,videoActions:s}),this.emit(o2);case 10:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"initBdFaceSdk",value:(d=o(regeneratorRuntime.mark((function e(){var t,n,r,o,i,a,s,u,c,l=this,f=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!(f.length>0&&void 0!==f[0])||f[0],e.next=3,this.canUseSDK();case 3:return n=e.sent,r=this.options.onReady,e.next=7,this.mergeOptionsFromServer();case 7:n?(o=this.options,i=o.code,a=o.solutionType,s=o.audio,u=o.preload,this.bdFaceSdk=new T0({video:"".concat($1,"_camera_video"),solutionType:a,code:i,modelPath:"https://cstaticdun.126.net/live-detection",autoloadModels:!u,randomMotionDetection:!1,needToRecord:!1,minFaceRatio:.2,maxFaceRatio:.8,leftYaw:15,rightYaw:15,constraints:{video:{width:{min:640,ideal:640,max:640},height:{min:480,ideal:480,max:480}},audio:s}}),u&&this.bdFaceSdk.loadModels(),(c=this.bdFaceSdk).on("camera_open",(function(){l.cameraOpened=!0,l.loadOver&&l.emit(r2,!1)})),c.on("status",(function(e){"loading"===e?l.emit(r2,!0):"loading_over"===e&&(l.loadOver=!0,l.cameraOpened&&l.emit(r2,!1))})),c.on("tip",(function(e){var t=e.code;l.emit(e2,{code:t}),t===g2.TIMEOUT[0]&&l.emit(l2,t)})),c.on("action",(function(e){l.emit(t2,e)})),c.on("color",(function(e){l.emit(n2,e)})),c.on("success",this.onSuccess.bind(this)),c.on("fail",this.onFail.bind(this))):this.onFail(["unsupported"]),t&&(this.emit(s2),r&&r(this));case 9:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"start",value:function(){this.bdFaceSdk&&this.bdFaceSdk.start()}},{key:"restart",value:(h=o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.emit(r2,!0),this.cameraOpened=!1,this.loadOver=!1,this.bdFaceSdk&&this.bdFaceSdk.destroy(),this.bdFaceSdk=null,e.next=7,this.initBdFaceSdk(!1);case 7:this.start();case 8:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"dispose",value:function(){this.el&&(this.bdFaceSdk&&this.bdFaceSdk.destroy(),this.bdFaceSdk=null,V2(this),this.removeAllListeners(),M2(this.el),this.el=null)}},{key:"canUseSDK",value:(f=o(regeneratorRuntime.mark((function e(){var t,n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=(t=T0).UA(),S2(t.isSupport)&&t.isSupport()){e.next=6;break}return e.abrupt("return",!1);case 6:if(r=n.getOS(),o=n.getBrowser(),i=["quark","ucbrowser","nokiabrowser"],!o.name||!i.includes(o.name.toLowerCase())){e.next=11;break}return e.abrupt("return",!1);case 11:if(!navigator.standalone||"iOS"!==r.name||"Safari"!==o.name||!o.version.startsWith("18.0")){e.next=13;break}return e.abrupt("return",!1);case 13:if(!S2(this.options.isSupport)||this.options.isSupport({osName:r.name,osVersion:r.version,browserName:o.name,browserVersion:o.version})){e.next=16;break}return e.abrupt("return",!1);case 16:return e.abrupt("return",!0);case 19:return e.prev=19,e.t0=e.catch(0),console.error("Error checking SDK support:",e.t0),e.abrupt("return",!1);case 23:case"end":return e.stop()}}),e,this,[[0,19]])}))),function(){return f.apply(this,arguments)})},{key:"onSuccess",value:(l=o(regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.emit(e2,{text:H0.trans(Q0)}),e.next=3,this.check(t.images);case 3:n=e.sent,r=n.status,o=n.token,r===y2?this.emit(u2,o):this.collectCheckUnpassError("image",{status:r,token:o});case 7:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"onFail",value:(u=o(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=A(t,1),r=n[0],this.emit(e2,{type:"fail",code:r}),o={unsupported:{code:d2.UNSUPPORT,handler:function(){u.options.fallback&&u.record.show()}},notallowed:{code:d2.NOT_ALLOWED},notfound:{code:d2.NOT_FOUND},notreadable:{code:d2.NOT_READABLE},overconstrained:{code:d2.OVER_CONSTRAINED},abort:{code:d2.ABORT},reject:{code:d2.REJECTED},auth:{code:d2.AUTH},pdFail:{code:d2.PD_FAIL},action_timeout:{handler:function(){return u.emit(l2,r)}},timeout:{handler:function(){return u.emit(l2,r)}}},(i=o[r])&&(i.code&&((s=new Error(H0.trans(i.code[1]))).name=i.code[0].toString(),this.emit(c2,s)),null===(a=i.handler)||void 0===a||a.call(i));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"getConfigs",value:(a=o(regeneratorRuntime.mark((function e(){var t,n,r,o,i,a,s,u,c,l,f,h,d,p,v,g,m,y;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.options.businessKey,n={businessKey:t,timestamp:Date.now(),sdkType:v2,nonce:V0(32)},r=U0(JSON.stringify(n)),o=r.key,i=r.eyptStr,a=r.iv,s={d:i,rk:a+o},c="/v1/liveperson/getConf",e.prev=5,e.next=8,this.request({method:"post",url:c,data:s,headers:$2()});case 8:u=e.sent,200!==(null===(l=u)||void 0===l?void 0:l.code)&&(f=new Error(H0.trans(d2.GET_CONF_FAIL[1])),h=d2.GET_CONF_FAIL[0].toString(),f.name=h,this.emit(c2,f),Q2(this.collector,{type:x2[0],name:"getConf",value:JSON.stringify({errType:u.code||h,msg:u.msg||f.message,pathname:c,method:"post",status:200,params:n,response:u})})),e.next=20;break;case 12:e.prev=12,e.t0=e.catch(5),(m=e.t0).message=H0.trans(d2.GET_CONF_NET_FAIL[1]),y=d2.GET_CONF_NET_FAIL[0].toString(),m.name=y,this.emit(c2,m),Q2(this.collector,{type:x2[0],name:"getConf",value:JSON.stringify({errType:y,target:z2(null===(d=m.res)||void 0===d?void 0:d.target),msg:m.message,pathname:c,method:"post",status:null===(p=m.res)||void 0===p?void 0:p.status,params:n,response:W2(null===(v=m.res)||void 0===v?void 0:v.response,null===(g=m.res)||void 0===g?void 0:g.response)})});case 20:return e.abrupt("return",u?JSON.parse(W0(u.result,o,a)):{});case 21:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(){return a.apply(this,arguments)})},{key:"check",value:(r=o(regeneratorRuntime.mark((function e(n){var r,o,i,a,s,u,c,l,f,h,d,p,g,m,y,b,w,A,x,T,P,C=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=!(C.length>1&&void 0!==C[1])||C[1],o=C.length>2?C[2]:void 0,r&&this.emit(f2),i=this.options,a=i.businessKey,s=i.token,u=i.solutionType,c={businessKey:a,checkImages:n.map((function(e){return e.substring(e.indexOf(",")+1)})),nonce:V0(32),picType:p2,timestamp:Date.now(),token:s,solutionType:null!=o?o:u,sdkType:v2},l=U0(JSON.stringify(c)),f=l.key,h=l.eyptStr,d=l.iv,p={d:h,rk:d+f},m="/v1/liveperson/check",e.prev=8,e.next=11,this.request({method:"post",url:m,data:p,headers:t({},$2()),timeout:15e3},K2(this.netCollector));case 11:g=e.sent,e.next=23;break;case 14:e.prev=14,e.t0=e.catch(8),(x=e.t0).message=H0.trans(d2.CHECK_NET_FAIL[1]),T=d2.CHECK_NET_FAIL[0].toString(),x.name=T,this.emit(c2,x),P=v(c,w3),Q2(this.collector,{type:x2[0],name:"check",value:JSON.stringify({errType:T,target:z2(null===(y=x.res)||void 0===y?void 0:y.target),msg:x.message,pathname:m,method:"post",status:null===(b=x.res)||void 0===b?void 0:b.status,params:P,response:W2(null===(w=x.res)||void 0===w?void 0:w.response,null===(A=x.res)||void 0===A?void 0:A.response)})});case 23:return r&&this.emit(h2),e.abrupt("return",g?JSON.parse(W0(g.result,f,d)):{});case 25:case"end":return e.stop()}}),e,this,[[8,14]])}))),function(e){return r.apply(this,arguments)})},{key:"videoChange",value:(n=o(regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.check([t],!1,w2[0]);case 2:n=e.sent,r=n.status,o=n.token,r===y2?this.emit(u2,o):this.collectCheckUnpassError("video",{status:r,token:o});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"collectCheckUnpassError",value:function(e,t){var n=new Error(H0.trans(d2.CHECK_ERROR[1])),r=d2.CHECK_ERROR[0].toString();n.name=r,this.emit(c2,n),Q2(this.collector,{type:x2[0],name:"check",value:JSON.stringify({errType:r,msg:n.message,pathname:"/v1/liveperson/check",method:"post",response:t,action:e})})}}]),b}(U2);return A3}));
1
+ // v2.3.2
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).NELiveDetection=t()}(this,(function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){u(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var a=e.apply(t,n);function s(e){r(a,o,i,s,u,"next",e)}function u(e){r(a,o,i,s,u,"throw",e)}s(void 0)}))}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(yK){return!1}}function d(e,t,n){return d=h()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&f(o,n.prototype),o},d.apply(null,arguments)}function p(e){var t="function"==typeof Map?new Map:void 0;return p=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return d(e,arguments,l(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f(r,e)},p(e)}function v(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return g(e)}function y(e){var t=h();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function b(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=b(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},w.apply(this,arguments)}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||T(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function C(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function k(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function R(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){k(i,r,o,a,s,"next",e)}function s(e){k(i,r,o,a,s,"throw",e)}a(void 0)}))}}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t,n){return t&&M(e.prototype,t),n&&M(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function L(e,t){return L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},L(e,t)}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(yK){return!1}}();return function(){var n,r=D(e);if(t){var o=D(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return B(this,n)}}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||W(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||W(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){if(e){if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=W(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function G(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,Q(e,t,"get"))}function X(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,Q(e,t,"set"),n),n}function Q(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Y(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}var q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},K=function(e){return e&&e.Math==Math&&e},J=K("object"==("undefined"==typeof globalThis?"undefined":S(globalThis))&&globalThis)||K("object"==("undefined"==typeof window?"undefined":S(window))&&window)||K("object"==("undefined"==typeof self?"undefined":S(self))&&self)||K("object"==S(q)&&q)||function(){return this}()||Function("return this")(),Z={},$=function(e){try{return!!e()}catch(t){return!0}},ee=!$((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),te=!$((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ne=te,re=Function.prototype.call,oe=ne?re.bind(re):function(){return re.apply(re,arguments)},ie={},ae={}.propertyIsEnumerable,se=Object.getOwnPropertyDescriptor,ue=se&&!ae.call({1:2},1);ie.f=ue?function(e){var t=se(this,e);return!!t&&t.enumerable}:ae;var ce,le,fe=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},he=te,de=Function.prototype,pe=de.bind,ve=de.call,ge=he&&pe.bind(ve,ve),me=he?function(e){return e&&ge(e)}:function(e){return e&&function(){return ve.apply(e,arguments)}},ye=me,be=ye({}.toString),we=ye("".slice),Ae=function(e){return we(be(e),8,-1)},xe=me,Te=$,Pe=Ae,Ce=J.Object,_e=xe("".split),Ee=Te((function(){return!Ce("z").propertyIsEnumerable(0)}))?function(e){return"String"==Pe(e)?_e(e,""):Ce(e)}:Ce,Se=J.TypeError,ke=function(e){if(null==e)throw Se("Can't call method on "+e);return e},Re=Ee,Oe=ke,Me=function(e){return Re(Oe(e))},Fe=function(e){return"function"==typeof e},Ie=Fe,De=function(e){return"object"==S(e)?null!==e:Ie(e)},Le=J,je=Fe,Be=function(e){return je(e)?e:void 0},Ne=function(e,t){return arguments.length<2?Be(Le[e]):Le[e]&&Le[e][t]},Ve=me({}.isPrototypeOf),Ue=Ne("navigator","userAgent")||"",We=J,ze=Ue,He=We.process,Ge=We.Deno,Xe=He&&He.versions||Ge&&Ge.version,Qe=Xe&&Xe.v8;Qe&&(le=(ce=Qe.split("."))[0]>0&&ce[0]<4?1:+(ce[0]+ce[1])),!le&&ze&&(!(ce=ze.match(/Edge\/(\d+)/))||ce[1]>=74)&&(ce=ze.match(/Chrome\/(\d+)/))&&(le=+ce[1]);var Ye=le,qe=Ye,Ke=$,Je=!!Object.getOwnPropertySymbols&&!Ke((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&qe&&qe<41})),Ze=Je&&!Symbol.sham&&"symbol"==S(Symbol.iterator),$e=Ne,et=Fe,tt=Ve,nt=Ze,rt=J.Object,ot=nt?function(e){return"symbol"==S(e)}:function(e){var t=$e("Symbol");return et(t)&&tt(t.prototype,rt(e))},it=J.String,at=function(e){try{return it(e)}catch(t){return"Object"}},st=Fe,ut=at,ct=J.TypeError,lt=function(e){if(st(e))return e;throw ct(ut(e)+" is not a function")},ft=lt,ht=function(e,t){var n=e[t];return null==n?void 0:ft(n)},dt=oe,pt=Fe,vt=De,gt=J.TypeError,mt=function(e,t){var n,r;if("string"===t&&pt(n=e.toString)&&!vt(r=dt(n,e)))return r;if(pt(n=e.valueOf)&&!vt(r=dt(n,e)))return r;if("string"!==t&&pt(n=e.toString)&&!vt(r=dt(n,e)))return r;throw gt("Can't convert object to primitive value")},yt={exports:{}},bt=J,wt=Object.defineProperty,At=function(e,t){try{wt(bt,e,{value:t,configurable:!0,writable:!0})}catch(n){bt[e]=t}return t},xt=At,Tt="__core-js_shared__",Pt=J[Tt]||xt(Tt,{}),Ct=Pt;(yt.exports=function(e,t){return Ct[e]||(Ct[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.2",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.2/LICENSE",source:"https://github.com/zloirock/core-js"});var _t=ke,Et=J.Object,St=function(e){return Et(_t(e))},kt=St,Rt=me({}.hasOwnProperty),Ot=Object.hasOwn||function(e,t){return Rt(kt(e),t)},Mt=me,Ft=0,It=Math.random(),Dt=Mt(1..toString),Lt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Dt(++Ft+It,36)},jt=J,Bt=yt.exports,Nt=Ot,Vt=Lt,Ut=Je,Wt=Ze,zt=Bt("wks"),Ht=jt.Symbol,Gt=Ht&&Ht.for,Xt=Wt?Ht:Ht&&Ht.withoutSetter||Vt,Qt=function(e){if(!Nt(zt,e)||!Ut&&"string"!=typeof zt[e]){var t="Symbol."+e;Ut&&Nt(Ht,e)?zt[e]=Ht[e]:zt[e]=Wt&&Gt?Gt(t):Xt(t)}return zt[e]},Yt=oe,qt=De,Kt=ot,Jt=ht,Zt=mt,$t=Qt,en=J.TypeError,tn=$t("toPrimitive"),nn=function(e,t){if(!qt(e)||Kt(e))return e;var n,r=Jt(e,tn);if(r){if(void 0===t&&(t="default"),n=Yt(r,e,t),!qt(n)||Kt(n))return n;throw en("Can't convert object to primitive value")}return void 0===t&&(t="number"),Zt(e,t)},rn=nn,on=ot,an=function(e){var t=rn(e,"string");return on(t)?t:t+""},sn=De,un=J.document,cn=sn(un)&&sn(un.createElement),ln=function(e){return cn?un.createElement(e):{}},fn=ln,hn=!ee&&!$((function(){return 7!=Object.defineProperty(fn("div"),"a",{get:function(){return 7}}).a})),dn=ee,pn=oe,vn=ie,gn=fe,mn=Me,yn=an,bn=Ot,wn=hn,An=Object.getOwnPropertyDescriptor;Z.f=dn?An:function(e,t){if(e=mn(e),t=yn(t),wn)try{return An(e,t)}catch(n){}if(bn(e,t))return gn(!pn(vn.f,e,t),e[t])};var xn={},Tn=ee&&$((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Pn=J,Cn=De,_n=Pn.String,En=Pn.TypeError,Sn=function(e){if(Cn(e))return e;throw En(_n(e)+" is not an object")},kn=ee,Rn=hn,On=Tn,Mn=Sn,Fn=an,In=J.TypeError,Dn=Object.defineProperty,Ln=Object.getOwnPropertyDescriptor,jn="enumerable",Bn="configurable",Nn="writable";xn.f=kn?On?function(e,t,n){if(Mn(e),t=Fn(t),Mn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Nn in n&&!n.writable){var r=Ln(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:Bn in n?n.configurable:r.configurable,enumerable:jn in n?n.enumerable:r.enumerable,writable:!1})}return Dn(e,t,n)}:Dn:function(e,t,n){if(Mn(e),t=Fn(t),Mn(n),Rn)try{return Dn(e,t,n)}catch(r){}if("get"in n||"set"in n)throw In("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Vn=xn,Un=fe,Wn=ee?function(e,t,n){return Vn.f(e,t,Un(1,n))}:function(e,t,n){return e[t]=n,e},zn={exports:{}},Hn=Fe,Gn=Pt,Xn=me(Function.toString);Hn(Gn.inspectSource)||(Gn.inspectSource=function(e){return Xn(e)});var Qn,Yn,qn,Kn=Gn.inspectSource,Jn=Fe,Zn=Kn,$n=J.WeakMap,er=Jn($n)&&/native code/.test(Zn($n)),tr=yt.exports,nr=Lt,rr=tr("keys"),or=function(e){return rr[e]||(rr[e]=nr(e))},ir={},ar=er,sr=J,ur=me,cr=De,lr=Wn,fr=Ot,hr=Pt,dr=or,pr=ir,vr="Object already initialized",gr=sr.TypeError,mr=sr.WeakMap;if(ar||hr.state){var yr=hr.state||(hr.state=new mr),br=ur(yr.get),wr=ur(yr.has),Ar=ur(yr.set);Qn=function(e,t){if(wr(yr,e))throw new gr(vr);return t.facade=e,Ar(yr,e,t),t},Yn=function(e){return br(yr,e)||{}},qn=function(e){return wr(yr,e)}}else{var xr=dr("state");pr[xr]=!0,Qn=function(e,t){if(fr(e,xr))throw new gr(vr);return t.facade=e,lr(e,xr,t),t},Yn=function(e){return fr(e,xr)?e[xr]:{}},qn=function(e){return fr(e,xr)}}var Tr={set:Qn,get:Yn,has:qn,enforce:function(e){return qn(e)?Yn(e):Qn(e,{})},getterFor:function(e){return function(t){var n;if(!cr(t)||(n=Yn(t)).type!==e)throw gr("Incompatible receiver, "+e+" required");return n}}},Pr=ee,Cr=Ot,_r=Function.prototype,Er=Pr&&Object.getOwnPropertyDescriptor,Sr=Cr(_r,"name"),kr={EXISTS:Sr,PROPER:Sr&&"something"===function(){}.name,CONFIGURABLE:Sr&&(!Pr||Pr&&Er(_r,"name").configurable)},Rr=J,Or=Fe,Mr=Ot,Fr=Wn,Ir=At,Dr=Kn,Lr=kr.CONFIGURABLE,jr=Tr.get,Br=Tr.enforce,Nr=String(String).split("String");(zn.exports=function(e,t,n,r){var o,i=!!r&&!!r.unsafe,a=!!r&&!!r.enumerable,s=!!r&&!!r.noTargetGet,u=r&&void 0!==r.name?r.name:t;Or(n)&&("Symbol("===String(u).slice(0,7)&&(u="["+String(u).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Mr(n,"name")||Lr&&n.name!==u)&&Fr(n,"name",u),(o=Br(n)).source||(o.source=Nr.join("string"==typeof u?u:""))),e!==Rr?(i?!s&&e[t]&&(a=!0):delete e[t],a?e[t]=n:Fr(e,t,n)):a?e[t]=n:Ir(t,n)})(Function.prototype,"toString",(function(){return Or(this)&&jr(this).source||Dr(this)}));var Vr={},Ur=Math.ceil,Wr=Math.floor,zr=function(e){var t=+e;return t!=t||0===t?0:(t>0?Wr:Ur)(t)},Hr=zr,Gr=Math.max,Xr=Math.min,Qr=function(e,t){var n=Hr(e);return n<0?Gr(n+t,0):Xr(n,t)},Yr=zr,qr=Math.min,Kr=function(e){return e>0?qr(Yr(e),9007199254740991):0},Jr=Kr,Zr=function(e){return Jr(e.length)},$r=Me,eo=Qr,to=Zr,no=function(e){return function(t,n,r){var o,i=$r(t),a=to(i),s=eo(r,a);if(e&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}},ro={includes:no(!0),indexOf:no(!1)},oo=Ot,io=Me,ao=ro.indexOf,so=ir,uo=me([].push),co=function(e,t){var n,r=io(e),o=0,i=[];for(n in r)!oo(so,n)&&oo(r,n)&&uo(i,n);for(;t.length>o;)oo(r,n=t[o++])&&(~ao(i,n)||uo(i,n));return i},lo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],fo=co,ho=lo.concat("length","prototype");Vr.f=Object.getOwnPropertyNames||function(e){return fo(e,ho)};var po={};po.f=Object.getOwnPropertySymbols;var vo=Ne,go=Vr,mo=po,yo=Sn,bo=me([].concat),wo=vo("Reflect","ownKeys")||function(e){var t=go.f(yo(e)),n=mo.f;return n?bo(t,n(e)):t},Ao=Ot,xo=wo,To=Z,Po=xn,Co=function(e,t,n){for(var r=xo(t),o=Po.f,i=To.f,a=0;a<r.length;a++){var s=r[a];Ao(e,s)||n&&Ao(n,s)||o(e,s,i(t,s))}},_o=$,Eo=Fe,So=/#|\.prototype\./,ko=function(e,t){var n=Oo[Ro(e)];return n==Fo||n!=Mo&&(Eo(t)?_o(t):!!t)},Ro=ko.normalize=function(e){return String(e).replace(So,".").toLowerCase()},Oo=ko.data={},Mo=ko.NATIVE="N",Fo=ko.POLYFILL="P",Io=ko,Do=J,Lo=Z.f,jo=Wn,Bo=zn.exports,No=At,Vo=Co,Uo=Io,Wo=function(e,t){var n,r,o,i,a,s=e.target,u=e.global,c=e.stat;if(n=u?Do:c?Do[s]||No(s,{}):(Do[s]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=Lo(n,r))&&a.value:n[r],!Uo(u?r:s+(c?".":"#")+r,e.forced)&&void 0!==o){if(S(i)==S(o))continue;Vo(i,o)}(e.sham||o&&o.sham)&&jo(i,"sham",!0),Bo(n,r,i,e)}},zo={};zo[Qt("toStringTag")]="z";var Ho="[object z]"===String(zo),Go=J,Xo=Ho,Qo=Fe,Yo=Ae,qo=Qt("toStringTag"),Ko=Go.Object,Jo="Arguments"==Yo(function(){return arguments}()),Zo=Xo?Yo:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Ko(e),qo))?n:Jo?Yo(t):"Object"==(r=Yo(t))&&Qo(t.callee)?"Arguments":r},$o=Zo,ei=J.String,ti=function(e){if("Symbol"===$o(e))throw TypeError("Cannot convert a Symbol value to a string");return ei(e)},ni={},ri=co,oi=lo,ii=Object.keys||function(e){return ri(e,oi)},ai=ee,si=Tn,ui=xn,ci=Sn,li=Me,fi=ii;ni.f=ai&&!si?Object.defineProperties:function(e,t){ci(e);for(var n,r=li(t),o=fi(t),i=o.length,a=0;i>a;)ui.f(e,n=o[a++],r[n]);return e};var hi,di=Ne("document","documentElement"),pi=Sn,vi=ni,gi=lo,mi=ir,yi=di,bi=ln,wi=or("IE_PROTO"),Ai=function(){},xi=function(e){return"<script>"+e+"</"+"script>"},Ti=function(e){e.write(xi("")),e.close();var t=e.parentWindow.Object;return e=null,t},Pi=function(){try{hi=new ActiveXObject("htmlfile")}catch(r){}var e,t;Pi="undefined"!=typeof document?document.domain&&hi?Ti(hi):((t=bi("iframe")).style.display="none",yi.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(xi("document.F=Object")),e.close(),e.F):Ti(hi);for(var n=gi.length;n--;)delete Pi.prototype[gi[n]];return Pi()};mi[wi]=!0;var Ci=Object.create||function(e,t){var n;return null!==e?(Ai.prototype=pi(e),n=new Ai,Ai.prototype=null,n[wi]=e):n=Pi(),void 0===t?n:vi.f(n,t)},_i={},Ei=an,Si=xn,ki=fe,Ri=function(e,t,n){var r=Ei(t);r in e?Si.f(e,r,ki(0,n)):e[r]=n},Oi=Qr,Mi=Zr,Fi=Ri,Ii=J.Array,Di=Math.max,Li=function(e,t,n){for(var r=Mi(e),o=Oi(t,r),i=Oi(void 0===n?r:n,r),a=Ii(Di(i-o,0)),s=0;o<i;o++,s++)Fi(a,s,e[o]);return a.length=s,a},ji=Ae,Bi=Me,Ni=Vr.f,Vi=Li,Ui="object"==("undefined"==typeof window?"undefined":S(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];_i.f=function(e){return Ui&&"Window"==ji(e)?function(e){try{return Ni(e)}catch(t){return Vi(Ui)}}(e):Ni(Bi(e))};var Wi={},zi=Qt;Wi.f=zi;var Hi=J,Gi=Ot,Xi=Wi,Qi=xn.f,Yi=function(e){var t=Hi.Symbol||(Hi.Symbol={});Gi(t,e)||Qi(t,e,{value:Xi.f(e)})},qi=oe,Ki=Ne,Ji=Qt,Zi=zn.exports,$i=function(){var e=Ki("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Ji("toPrimitive");t&&!t[r]&&Zi(t,r,(function(e){return qi(n,this)}))},ea=xn.f,ta=Ot,na=Qt("toStringTag"),ra=function(e,t,n){e&&!n&&(e=e.prototype),e&&!ta(e,na)&&ea(e,na,{configurable:!0,value:t})},oa=lt,ia=te,aa=me(me.bind),sa=function(e,t){return oa(e),void 0===t?e:ia?aa(e,t):function(){return e.apply(t,arguments)}},ua=Ae,ca=Array.isArray||function(e){return"Array"==ua(e)},la=me,fa=$,ha=Fe,da=Zo,pa=Kn,va=function(){},ga=[],ma=Ne("Reflect","construct"),ya=/^\s*(?:class|function)\b/,ba=la(ya.exec),wa=!ya.exec(va),Aa=function(e){if(!ha(e))return!1;try{return ma(va,ga,e),!0}catch(t){return!1}},xa=function(e){if(!ha(e))return!1;switch(da(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return wa||!!ba(ya,pa(e))}catch(t){return!0}};xa.sham=!0;var Ta=!ma||fa((function(){var e;return Aa(Aa.call)||!Aa(Object)||!Aa((function(){e=!0}))||e}))?xa:Aa,Pa=J,Ca=ca,_a=Ta,Ea=De,Sa=Qt("species"),ka=Pa.Array,Ra=function(e){var t;return Ca(e)&&(t=e.constructor,(_a(t)&&(t===ka||Ca(t.prototype))||Ea(t)&&null===(t=t[Sa]))&&(t=void 0)),void 0===t?ka:t},Oa=function(e,t){return new(Ra(e))(0===t?0:t)},Ma=sa,Fa=Ee,Ia=St,Da=Zr,La=Oa,ja=me([].push),Ba=function(e){var t=1==e,n=2==e,r=3==e,o=4==e,i=6==e,a=7==e,s=5==e||i;return function(u,c,l,f){for(var h,d,p=Ia(u),v=Fa(p),g=Ma(c,l),m=Da(v),y=0,b=f||La,w=t?b(u,m):n||a?b(u,0):void 0;m>y;y++)if((s||y in v)&&(d=g(h=v[y],y,p),e))if(t)w[y]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:ja(w,h)}else switch(e){case 4:return!1;case 7:ja(w,h)}return i?-1:r||o?o:w}},Na={forEach:Ba(0),map:Ba(1),filter:Ba(2),some:Ba(3),every:Ba(4),find:Ba(5),findIndex:Ba(6),filterReject:Ba(7)},Va=Wo,Ua=J,Wa=oe,za=me,Ha=ee,Ga=Je,Xa=$,Qa=Ot,Ya=Ve,qa=Sn,Ka=Me,Ja=an,Za=ti,$a=fe,es=Ci,ts=ii,ns=Vr,rs=_i,os=po,is=Z,as=xn,ss=ni,us=ie,cs=zn.exports,ls=yt.exports,fs=ir,hs=Lt,ds=Qt,ps=Wi,vs=Yi,gs=$i,ms=ra,ys=Tr,bs=Na.forEach,ws=or("hidden"),As="Symbol",xs=ys.set,Ts=ys.getterFor(As),Ps=Object.prototype,Cs=Ua.Symbol,_s=Cs&&Cs.prototype,Es=Ua.TypeError,Ss=Ua.QObject,ks=is.f,Rs=as.f,Os=rs.f,Ms=us.f,Fs=za([].push),Is=ls("symbols"),Ds=ls("op-symbols"),Ls=ls("wks"),js=!Ss||!Ss.prototype||!Ss.prototype.findChild,Bs=Ha&&Xa((function(){return 7!=es(Rs({},"a",{get:function(){return Rs(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=ks(Ps,t);r&&delete Ps[t],Rs(e,t,n),r&&e!==Ps&&Rs(Ps,t,r)}:Rs,Ns=function(e,t){var n=Is[e]=es(_s);return xs(n,{type:As,tag:e,description:t}),Ha||(n.description=t),n},Vs=function(e,t,n){e===Ps&&Vs(Ds,t,n),qa(e);var r=Ja(t);return qa(n),Qa(Is,r)?(n.enumerable?(Qa(e,ws)&&e[ws][r]&&(e[ws][r]=!1),n=es(n,{enumerable:$a(0,!1)})):(Qa(e,ws)||Rs(e,ws,$a(1,{})),e[ws][r]=!0),Bs(e,r,n)):Rs(e,r,n)},Us=function(e,t){qa(e);var n=Ka(t),r=ts(n).concat(Gs(n));return bs(r,(function(t){Ha&&!Wa(Ws,n,t)||Vs(e,t,n[t])})),e},Ws=function(e){var t=Ja(e),n=Wa(Ms,this,t);return!(this===Ps&&Qa(Is,t)&&!Qa(Ds,t))&&(!(n||!Qa(this,t)||!Qa(Is,t)||Qa(this,ws)&&this[ws][t])||n)},zs=function(e,t){var n=Ka(e),r=Ja(t);if(n!==Ps||!Qa(Is,r)||Qa(Ds,r)){var o=ks(n,r);return!o||!Qa(Is,r)||Qa(n,ws)&&n[ws][r]||(o.enumerable=!0),o}},Hs=function(e){var t=Os(Ka(e)),n=[];return bs(t,(function(e){Qa(Is,e)||Qa(fs,e)||Fs(n,e)})),n},Gs=function(e){var t=e===Ps,n=Os(t?Ds:Ka(e)),r=[];return bs(n,(function(e){!Qa(Is,e)||t&&!Qa(Ps,e)||Fs(r,Is[e])})),r};Ga||(Cs=function(){if(Ya(_s,this))throw Es("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Za(arguments[0]):void 0,t=hs(e),n=function e(n){this===Ps&&Wa(e,Ds,n),Qa(this,ws)&&Qa(this[ws],t)&&(this[ws][t]=!1),Bs(this,t,$a(1,n))};return Ha&&js&&Bs(Ps,t,{configurable:!0,set:n}),Ns(t,e)},cs(_s=Cs.prototype,"toString",(function(){return Ts(this).tag})),cs(Cs,"withoutSetter",(function(e){return Ns(hs(e),e)})),us.f=Ws,as.f=Vs,ss.f=Us,is.f=zs,ns.f=rs.f=Hs,os.f=Gs,ps.f=function(e){return Ns(ds(e),e)},Ha&&(Rs(_s,"description",{configurable:!0,get:function(){return Ts(this).description}}),cs(Ps,"propertyIsEnumerable",Ws,{unsafe:!0}))),Va({global:!0,wrap:!0,forced:!Ga,sham:!Ga},{Symbol:Cs}),bs(ts(Ls),(function(e){vs(e)})),Va({target:As,stat:!0,forced:!Ga},{useSetter:function(){js=!0},useSimple:function(){js=!1}}),Va({target:"Object",stat:!0,forced:!Ga,sham:!Ha},{create:function(e,t){return void 0===t?es(e):Us(es(e),t)},defineProperty:Vs,defineProperties:Us,getOwnPropertyDescriptor:zs}),Va({target:"Object",stat:!0,forced:!Ga},{getOwnPropertyNames:Hs}),gs(),ms(Cs,As),fs[ws]=!0;var Xs=Je&&!!Symbol.for&&!!Symbol.keyFor,Qs=Wo,Ys=Ne,qs=Ot,Ks=ti,Js=yt.exports,Zs=Xs,$s=Js("string-to-symbol-registry"),eu=Js("symbol-to-string-registry");Qs({target:"Symbol",stat:!0,forced:!Zs},{for:function(e){var t=Ks(e);if(qs($s,t))return $s[t];var n=Ys("Symbol")(t);return $s[t]=n,eu[n]=t,n}});var tu=Wo,nu=Ot,ru=ot,ou=at,iu=Xs,au=(0,yt.exports)("symbol-to-string-registry");tu({target:"Symbol",stat:!0,forced:!iu},{keyFor:function(e){if(!ru(e))throw TypeError(ou(e)+" is not a symbol");if(nu(au,e))return au[e]}});var su=te,uu=Function.prototype,cu=uu.apply,lu=uu.call,fu="object"==("undefined"==typeof Reflect?"undefined":S(Reflect))&&Reflect.apply||(su?lu.bind(cu):function(){return lu.apply(cu,arguments)}),hu=me([].slice),du=Wo,pu=Ne,vu=fu,gu=oe,mu=me,yu=$,bu=ca,wu=Fe,Au=De,xu=ot,Tu=hu,Pu=Je,Cu=pu("JSON","stringify"),_u=mu(/./.exec),Eu=mu("".charAt),Su=mu("".charCodeAt),ku=mu("".replace),Ru=mu(1..toString),Ou=/[\uD800-\uDFFF]/g,Mu=/^[\uD800-\uDBFF]$/,Fu=/^[\uDC00-\uDFFF]$/,Iu=!Pu||yu((function(){var e=pu("Symbol")();return"[null]"!=Cu([e])||"{}"!=Cu({a:e})||"{}"!=Cu(Object(e))})),Du=yu((function(){return'"\\udf06\\ud834"'!==Cu("\udf06\ud834")||'"\\udead"'!==Cu("\udead")})),Lu=function(e,t){var n=Tu(arguments),r=t;if((Au(t)||void 0!==e)&&!xu(e))return bu(t)||(t=function(e,t){if(wu(r)&&(t=gu(r,this,e,t)),!xu(t))return t}),n[1]=t,vu(Cu,null,n)},ju=function(e,t,n){var r=Eu(n,t-1),o=Eu(n,t+1);return _u(Mu,e)&&!_u(Fu,o)||_u(Fu,e)&&!_u(Mu,r)?"\\u"+Ru(Su(e,0),16):e};Cu&&du({target:"JSON",stat:!0,forced:Iu||Du},{stringify:function(e,t,n){var r=Tu(arguments),o=vu(Iu?Lu:Cu,null,r);return Du&&"string"==typeof o?ku(o,Ou,ju):o}});var Bu=po,Nu=St;Wo({target:"Object",stat:!0,forced:!Je||$((function(){Bu.f(1)}))},{getOwnPropertySymbols:function(e){var t=Bu.f;return t?t(Nu(e)):[]}});var Vu=Wo,Uu=ee,Wu=J,zu=me,Hu=Ot,Gu=Fe,Xu=Ve,Qu=ti,Yu=xn.f,qu=Co,Ku=Wu.Symbol,Ju=Ku&&Ku.prototype;if(Uu&&Gu(Ku)&&(!("description"in Ju)||void 0!==Ku().description)){var Zu={},$u=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Qu(arguments[0]),t=Xu(Ju,this)?new Ku(e):void 0===e?Ku():Ku(e);return""===e&&(Zu[t]=!0),t};qu($u,Ku),$u.prototype=Ju,Ju.constructor=$u;var ec="Symbol(test)"==String(Ku("test")),tc=zu(Ju.toString),nc=zu(Ju.valueOf),rc=/^Symbol\((.*)\)[^)]+$/,oc=zu("".replace),ic=zu("".slice);Yu(Ju,"description",{configurable:!0,get:function(){var e=nc(this),t=tc(e);if(Hu(Zu,e))return"";var n=ec?ic(t,7,-1):oc(t,rc,"$1");return""===n?void 0:n}}),Vu({global:!0,forced:!0},{Symbol:$u})}Yi("asyncIterator"),Yi("hasInstance"),Yi("isConcatSpreadable"),Yi("iterator"),Yi("match"),Yi("replace"),Yi("search"),Yi("species"),Yi("split");var ac=$i;Yi("toPrimitive"),ac();var sc=Ne,uc=ra;Yi("toStringTag"),uc(sc("Symbol"),"Symbol"),Yi("unscopables");var cc=$,lc=Ye,fc=Qt("species"),hc=function(e){return lc>=51||!cc((function(){var t=[];return(t.constructor={})[fc]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},dc=Wo,pc=J,vc=$,gc=ca,mc=De,yc=St,bc=Zr,wc=Ri,Ac=Oa,xc=hc,Tc=Ye,Pc=Qt("isConcatSpreadable"),Cc=9007199254740991,_c="Maximum allowed index exceeded",Ec=pc.TypeError,Sc=Tc>=51||!vc((function(){var e=[];return e[Pc]=!1,e.concat()[0]!==e})),kc=xc("concat"),Rc=function(e){if(!mc(e))return!1;var t=e[Pc];return void 0!==t?!!t:gc(e)};dc({target:"Array",proto:!0,forced:!Sc||!kc},{concat:function(e){var t,n,r,o,i,a=yc(this),s=Ac(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(Rc(i=-1===t?a:arguments[t])){if(u+(o=bc(i))>Cc)throw Ec(_c);for(n=0;n<o;n++,u++)n in i&&wc(s,u,i[n])}else{if(u>=Cc)throw Ec(_c);wc(s,u++,i)}return s.length=u,s}});var Oc=St,Mc=Qr,Fc=Zr,Ic=Math.min,Dc=[].copyWithin||function(e,t){var n=Oc(this),r=Fc(n),o=Mc(e,r),i=Mc(t,r),a=arguments.length>2?arguments[2]:void 0,s=Ic((void 0===a?r:Mc(a,r))-i,r-o),u=1;for(i<o&&o<i+s&&(u=-1,i+=s-1,o+=s-1);s-- >0;)i in n?n[o]=n[i]:delete n[o],o+=u,i+=u;return n},Lc=Ci,jc=xn,Bc=Qt("unscopables"),Nc=Array.prototype;null==Nc[Bc]&&jc.f(Nc,Bc,{configurable:!0,value:Lc(null)});var Vc=function(e){Nc[Bc][e]=!0},Uc=Vc;Wo({target:"Array",proto:!0},{copyWithin:Dc}),Uc("copyWithin");var Wc=St,zc=Qr,Hc=Zr,Gc=function(e){for(var t=Wc(this),n=Hc(t),r=arguments.length,o=zc(r>1?arguments[1]:void 0,n),i=r>2?arguments[2]:void 0,a=void 0===i?n:zc(i,n);a>o;)t[o++]=e;return t},Xc=Vc;Wo({target:"Array",proto:!0},{fill:Gc}),Xc("fill");var Qc=Na.filter;Wo({target:"Array",proto:!0,forced:!hc("filter")},{filter:function(e){return Qc(this,e,arguments.length>1?arguments[1]:void 0)}});var Yc=Wo,qc=Na.find,Kc=Vc,Jc="find",Zc=!0;Jc in[]&&Array(1).find((function(){Zc=!1})),Yc({target:"Array",proto:!0,forced:Zc},{find:function(e){return qc(this,e,arguments.length>1?arguments[1]:void 0)}}),Kc(Jc);var $c=Wo,el=Na.findIndex,tl=Vc,nl="findIndex",rl=!0;nl in[]&&Array(1).findIndex((function(){rl=!1})),$c({target:"Array",proto:!0,forced:rl},{findIndex:function(e){return el(this,e,arguments.length>1?arguments[1]:void 0)}}),tl(nl);var ol=ca,il=Zr,al=sa,sl=J.TypeError,ul=function e(t,n,r,o,i,a,s,u){for(var c,l=i,f=0,h=!!s&&al(s,u);f<o;){if(f in r){if(c=h?h(r[f],f,n):r[f],a>0&&ol(c))l=e(t,n,c,il(c),l,a-1)-1;else{if(l>=9007199254740991)throw sl("Exceed the acceptable array length");t[l]=c}l++}f++}return l},cl=ul,ll=St,fl=Zr,hl=zr,dl=Oa;Wo({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=ll(this),n=fl(t),r=dl(t,0);return r.length=cl(r,t,t,n,0,void 0===e?1:hl(e)),r}});var pl=ul,vl=lt,gl=St,ml=Zr,yl=Oa;Wo({target:"Array",proto:!0},{flatMap:function(e){var t,n=gl(this),r=ml(n);return vl(e),(t=yl(n,0)).length=pl(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var bl=oe,wl=Sn,Al=ht,xl=function(e,t,n){var r,o;wl(e);try{if(!(r=Al(e,"return"))){if("throw"===t)throw n;return n}r=bl(r,e)}catch(i){o=!0,r=i}if("throw"===t)throw n;if(o)throw r;return wl(r),n},Tl=Sn,Pl=xl,Cl={},_l=Cl,El=Qt("iterator"),Sl=Array.prototype,kl=function(e){return void 0!==e&&(_l.Array===e||Sl[El]===e)},Rl=Zo,Ol=ht,Ml=Cl,Fl=Qt("iterator"),Il=function(e){if(null!=e)return Ol(e,Fl)||Ol(e,"@@iterator")||Ml[Rl(e)]},Dl=oe,Ll=lt,jl=Sn,Bl=at,Nl=Il,Vl=J.TypeError,Ul=function(e,t){var n=arguments.length<2?Nl(e):t;if(Ll(n))return jl(Dl(n,e));throw Vl(Bl(e)+" is not iterable")},Wl=sa,zl=oe,Hl=St,Gl=function(e,t,n,r){try{return r?t(Tl(n)[0],n[1]):t(n)}catch(o){Pl(e,"throw",o)}},Xl=kl,Ql=Ta,Yl=Zr,ql=Ri,Kl=Ul,Jl=Il,Zl=J.Array,$l=function(e){var t=Hl(e),n=Ql(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=void 0!==o;i&&(o=Wl(o,r>2?arguments[2]:void 0));var a,s,u,c,l,f,h=Jl(t),d=0;if(!h||this==Zl&&Xl(h))for(a=Yl(t),s=n?new this(a):Zl(a);a>d;d++)f=i?o(t[d],d):t[d],ql(s,d,f);else for(l=(c=Kl(t,h)).next,s=n?new this:[];!(u=zl(l,c)).done;d++)f=i?Gl(c,o,[u.value,d],!0):u.value,ql(s,d,f);return s.length=d,s},ef=Qt("iterator"),tf=!1;try{var nf=0,rf={next:function(){return{done:!!nf++}},return:function(){tf=!0}};rf[ef]=function(){return this},Array.from(rf,(function(){throw 2}))}catch(_3){}var of=function(e,t){if(!t&&!tf)return!1;var n=!1;try{var r={};r[ef]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(_3){}return n},af=$l;Wo({target:"Array",stat:!0,forced:!of((function(e){Array.from(e)}))},{from:af});var sf=ro.includes,uf=Vc;Wo({target:"Array",proto:!0},{includes:function(e){return sf(this,e,arguments.length>1?arguments[1]:void 0)}}),uf("includes");var cf=$,lf=function(e,t){var n=[][e];return!!n&&cf((function(){n.call(null,t||function(){return 1},1)}))},ff=Wo,hf=ro.indexOf,df=lf,pf=me([].indexOf),vf=!!pf&&1/pf([1],1,-0)<0,gf=df("indexOf");ff({target:"Array",proto:!0,forced:vf||!gf},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return vf?pf(this,e,t)||0:hf(this,e,t)}});var mf,yf,bf,wf=!$((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Af=J,xf=Ot,Tf=Fe,Pf=St,Cf=wf,_f=or("IE_PROTO"),Ef=Af.Object,Sf=Ef.prototype,kf=Cf?Ef.getPrototypeOf:function(e){var t=Pf(e);if(xf(t,_f))return t[_f];var n=t.constructor;return Tf(n)&&t instanceof n?n.prototype:t instanceof Ef?Sf:null},Rf=$,Of=Fe,Mf=kf,Ff=zn.exports,If=Qt("iterator"),Df=!1;[].keys&&("next"in(bf=[].keys())?(yf=Mf(Mf(bf)))!==Object.prototype&&(mf=yf):Df=!0);var Lf=null==mf||Rf((function(){var e={};return mf[If].call(e)!==e}));Lf&&(mf={}),Of(mf[If])||Ff(mf,If,(function(){return this}));var jf={IteratorPrototype:mf,BUGGY_SAFARI_ITERATORS:Df},Bf=jf.IteratorPrototype,Nf=Ci,Vf=fe,Uf=ra,Wf=Cl,zf=function(){return this},Hf=function(e,t,n,r){var o=t+" Iterator";return e.prototype=Nf(Bf,{next:Vf(+!r,n)}),Uf(e,o,!1),Wf[o]=zf,e},Gf=J,Xf=Fe,Qf=Gf.String,Yf=Gf.TypeError,qf=function(e){if("object"==S(e)||Xf(e))return e;throw Yf("Can't set "+Qf(e)+" as a prototype")},Kf=me,Jf=Sn,Zf=qf,$f=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Kf(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(_3){}return function(n,r){return Jf(n),Zf(r),t?e(n,r):n.__proto__=r,n}}():void 0),eh=Wo,th=oe,nh=kr,rh=Fe,oh=Hf,ih=kf,ah=$f,sh=ra,uh=Wn,ch=zn.exports,lh=Cl,fh=nh.PROPER,hh=nh.CONFIGURABLE,dh=jf.IteratorPrototype,ph=jf.BUGGY_SAFARI_ITERATORS,vh=Qt("iterator"),gh="keys",mh="values",yh="entries",bh=function(){return this},wh=function(e,t,n,r,o,i,a){oh(n,t,r);var s,u,c,l=function(e){if(e===o&&v)return v;if(!ph&&e in d)return d[e];switch(e){case gh:case mh:case yh:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[vh]||d["@@iterator"]||o&&d[o],v=!ph&&p||l(o),g="Array"==t&&d.entries||p;if(g&&(s=ih(g.call(new e)))!==Object.prototype&&s.next&&(ih(s)!==dh&&(ah?ah(s,dh):rh(s[vh])||ch(s,vh,bh)),sh(s,f,!0)),fh&&o==mh&&p&&p.name!==mh&&(hh?uh(d,"name",mh):(h=!0,v=function(){return th(p,this)})),o)if(u={values:l(mh),keys:i?v:l(gh),entries:l(yh)},a)for(c in u)(ph||h||!(c in d))&&ch(d,c,u[c]);else eh({target:t,proto:!0,forced:ph||h},u);return d[vh]!==v&&ch(d,vh,v,{name:o}),lh[t]=v,u},Ah=Me,xh=Vc,Th=Cl,Ph=Tr,Ch=xn.f,_h=wh,Eh=ee,Sh="Array Iterator",kh=Ph.set,Rh=Ph.getterFor(Sh),Oh=_h(Array,"Array",(function(e,t){kh(this,{type:Sh,target:Ah(e),index:0,kind:t})}),(function(){var e=Rh(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),Mh=Th.Arguments=Th.Array;if(xh("keys"),xh("values"),xh("entries"),Eh&&"values"!==Mh.name)try{Ch(Mh,"name",{value:"values"})}catch(_3){}var Fh=Wo,Ih=Ee,Dh=Me,Lh=lf,jh=me([].join),Bh=Ih!=Object,Nh=Lh("join",",");Fh({target:"Array",proto:!0,forced:Bh||!Nh},{join:function(e){return jh(Dh(this),void 0===e?",":e)}});var Vh=fu,Uh=Me,Wh=zr,zh=Zr,Hh=lf,Gh=Math.min,Xh=[].lastIndexOf,Qh=!!Xh&&1/[1].lastIndexOf(1,-0)<0,Yh=Hh("lastIndexOf"),qh=Qh||!Yh?function(e){if(Qh)return Vh(Xh,this,arguments)||0;var t=Uh(this),n=zh(t),r=n-1;for(arguments.length>1&&(r=Gh(r,Wh(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:Xh;Wo({target:"Array",proto:!0,forced:qh!==[].lastIndexOf},{lastIndexOf:qh});var Kh=Na.map;Wo({target:"Array",proto:!0,forced:!hc("map")},{map:function(e){return Kh(this,e,arguments.length>1?arguments[1]:void 0)}});var Jh=Wo,Zh=$,$h=Ta,ed=Ri,td=J.Array;Jh({target:"Array",stat:!0,forced:Zh((function(){function e(){}return!(td.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new($h(this)?this:td)(t);t>e;)ed(n,e,arguments[e++]);return n.length=t,n}});var nd=lt,rd=St,od=Ee,id=Zr,ad=J.TypeError,sd=function(e){return function(t,n,r,o){nd(n);var i=rd(t),a=od(i),s=id(i),u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in a){o=a[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw ad("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in a&&(o=n(o,a[u],u,i));return o}},ud={left:sd(!1),right:sd(!0)},cd="process"==Ae(J.process),ld=ud.left,fd=Ye,hd=cd;Wo({target:"Array",proto:!0,forced:!lf("reduce")||!hd&&fd>79&&fd<83},{reduce:function(e){var t=arguments.length;return ld(this,e,t,t>1?arguments[1]:void 0)}});var dd=ud.right,pd=Ye,vd=cd;Wo({target:"Array",proto:!0,forced:!lf("reduceRight")||!vd&&pd>79&&pd<83},{reduceRight:function(e){return dd(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var gd=Wo,md=ca,yd=me([].reverse),bd=[1,2];gd({target:"Array",proto:!0,forced:String(bd)===String(bd.reverse())},{reverse:function(){return md(this)&&(this.length=this.length),yd(this)}});var wd=Wo,Ad=J,xd=ca,Td=Ta,Pd=De,Cd=Qr,_d=Zr,Ed=Me,Sd=Ri,kd=Qt,Rd=hu,Od=hc("slice"),Md=kd("species"),Fd=Ad.Array,Id=Math.max;wd({target:"Array",proto:!0,forced:!Od},{slice:function(e,t){var n,r,o,i=Ed(this),a=_d(i),s=Cd(e,a),u=Cd(void 0===t?a:t,a);if(xd(i)&&(n=i.constructor,(Td(n)&&(n===Fd||xd(n.prototype))||Pd(n)&&null===(n=n[Md]))&&(n=void 0),n===Fd||void 0===n))return Rd(i,s,u);for(r=new(void 0===n?Fd:n)(Id(u-s,0)),o=0;s<u;s++,o++)s in i&&Sd(r,o,i[s]);return r.length=o,r}});var Dd=Li,Ld=Math.floor,jd=function(e,t){for(var n,r,o=e.length,i=1;i<o;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},Bd=function(e,t,n,r){for(var o=t.length,i=n.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?r(t[a],n[s])<=0?t[a++]:n[s++]:a<o?t[a++]:n[s++];return e},Nd=function e(t,n){var r=t.length,o=Ld(r/2);return r<8?jd(t,n):Bd(t,e(Dd(t,0,o),n),e(Dd(t,o),n),n)},Vd=Ue.match(/firefox\/(\d+)/i),Ud=!!Vd&&+Vd[1],Wd=/MSIE|Trident/.test(Ue),zd=Ue.match(/AppleWebKit\/(\d+)\./),Hd=!!zd&&+zd[1],Gd=Wo,Xd=me,Qd=lt,Yd=St,qd=Zr,Kd=ti,Jd=$,Zd=Nd,$d=lf,ep=Ud,tp=Wd,np=Ye,rp=Hd,op=[],ip=Xd(op.sort),ap=Xd(op.push),sp=Jd((function(){op.sort(void 0)})),up=Jd((function(){op.sort(null)})),cp=$d("sort"),lp=!Jd((function(){if(np)return np<70;if(!(ep&&ep>3)){if(tp)return!0;if(rp)return rp<603;var e,t,n,r,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)op.push({k:t+r,v:n})}for(op.sort((function(e,t){return t.v-e.v})),r=0;r<op.length;r++)t=op[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}}));Gd({target:"Array",proto:!0,forced:sp||!up||!cp||!lp},{sort:function(e){void 0!==e&&Qd(e);var t=Yd(this);if(lp)return void 0===e?ip(t):ip(t,e);var n,r,o=[],i=qd(t);for(r=0;r<i;r++)r in t&&ap(o,t[r]);for(Zd(o,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Kd(t)>Kd(n)?1:-1}}(e)),n=o.length,r=0;r<n;)t[r]=o[r++];for(;r<i;)delete t[r++];return t}});var fp=Ne,hp=xn,dp=ee,pp=Qt("species"),vp=function(e){var t=fp(e),n=hp.f;dp&&t&&!t[pp]&&n(t,pp,{configurable:!0,get:function(){return this}})};vp("Array");var gp=Wo,mp=J,yp=Qr,bp=zr,wp=Zr,Ap=St,xp=Oa,Tp=Ri,Pp=hc("splice"),Cp=mp.TypeError,_p=Math.max,Ep=Math.min,Sp=9007199254740991,kp="Maximum allowed length exceeded";gp({target:"Array",proto:!0,forced:!Pp},{splice:function(e,t){var n,r,o,i,a,s,u=Ap(this),c=wp(u),l=yp(e,c),f=arguments.length;if(0===f?n=r=0:1===f?(n=0,r=c-l):(n=f-2,r=Ep(_p(bp(t),0),c-l)),c+n-r>Sp)throw Cp(kp);for(o=xp(u,r),i=0;i<r;i++)(a=l+i)in u&&Tp(o,i,u[a]);if(o.length=r,n<r){for(i=l;i<c-r;i++)s=i+n,(a=i+r)in u?u[s]=u[a]:delete u[s];for(i=c;i>c-r+n;i--)delete u[i-1]}else if(n>r)for(i=c-r;i>l;i--)s=i+n-1,(a=i+r-1)in u?u[s]=u[a]:delete u[s];for(i=0;i<n;i++)u[i+l]=arguments[i+2];return u.length=c-r+n,o}}),Vc("flat"),Vc("flatMap");var Rp="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Op=zn.exports,Mp=function(e,t,n){for(var r in t)Op(e,r,t[r],n);return e},Fp=Ve,Ip=J.TypeError,Dp=function(e,t){if(Fp(t,e))return e;throw Ip("Incorrect invocation")},Lp=zr,jp=Kr,Bp=J.RangeError,Np=function(e){if(void 0===e)return 0;var t=Lp(e),n=jp(t);if(t!==n)throw Bp("Wrong length or index");return n},Vp=J.Array,Up=Math.abs,Wp=Math.pow,zp=Math.floor,Hp=Math.log,Gp=Math.LN2,Xp={pack:function(e,t,n){var r,o,i,a=Vp(n),s=8*n-t-1,u=(1<<s)-1,c=u>>1,l=23===t?Wp(2,-24)-Wp(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=Up(e))!=e||e===1/0?(o=e!=e?1:0,r=u):(r=zp(Hp(e)/Gp),e*(i=Wp(2,-r))<1&&(r--,i*=2),(e+=r+c>=1?l/i:l*Wp(2,1-c))*i>=2&&(r++,i/=2),r+c>=u?(o=0,r=u):r+c>=1?(o=(e*i-1)*Wp(2,t),r+=c):(o=e*Wp(2,c-1)*Wp(2,t),r=0));t>=8;)a[h++]=255&o,o/=256,t-=8;for(r=r<<t|o,s+=t;s>0;)a[h++]=255&r,r/=256,s-=8;return a[--h]|=128*f,a},unpack:function(e,t){var n,r=e.length,o=8*r-t-1,i=(1<<o)-1,a=i>>1,s=o-7,u=r-1,c=e[u--],l=127&c;for(c>>=7;s>0;)l=256*l+e[u--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;s>0;)n=256*n+e[u--],s-=8;if(0===l)l=1-a;else{if(l===i)return n?NaN:c?-1/0:1/0;n+=Wp(2,t),l-=a}return(c?-1:1)*n*Wp(2,l-t)}},Qp=J,Yp=me,qp=ee,Kp=Rp,Jp=kr,Zp=Wn,$p=Mp,ev=$,tv=Dp,nv=zr,rv=Kr,ov=Np,iv=Xp,av=kf,sv=$f,uv=Vr.f,cv=xn.f,lv=Gc,fv=Li,hv=ra,dv=Jp.PROPER,pv=Jp.CONFIGURABLE,vv=Tr.get,gv=Tr.set,mv="ArrayBuffer",yv="DataView",bv="Wrong index",wv=Qp.ArrayBuffer,Av=wv,xv=Av&&Av.prototype,Tv=Qp.DataView,Pv=Tv&&Tv.prototype,Cv=Object.prototype,_v=Qp.Array,Ev=Qp.RangeError,Sv=Yp(lv),kv=Yp([].reverse),Rv=iv.pack,Ov=iv.unpack,Mv=function(e){return[255&e]},Fv=function(e){return[255&e,e>>8&255]},Iv=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Dv=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Lv=function(e){return Rv(e,23,4)},jv=function(e){return Rv(e,52,8)},Bv=function(e,t){cv(e.prototype,t,{get:function(){return vv(this)[t]}})},Nv=function(e,t,n,r){var o=ov(n),i=vv(e);if(o+t>i.byteLength)throw Ev(bv);var a=vv(i.buffer).bytes,s=o+i.byteOffset,u=fv(a,s,s+t);return r?u:kv(u)},Vv=function(e,t,n,r,o,i){var a=ov(n),s=vv(e);if(a+t>s.byteLength)throw Ev(bv);for(var u=vv(s.buffer).bytes,c=a+s.byteOffset,l=r(+o),f=0;f<t;f++)u[c+f]=l[i?f:t-f-1]};if(Kp){var Uv=dv&&wv.name!==mv;if(ev((function(){wv(1)}))&&ev((function(){new wv(-1)}))&&!ev((function(){return new wv,new wv(1.5),new wv(NaN),Uv&&!pv})))Uv&&pv&&Zp(wv,"name",mv);else{(Av=function(e){return tv(this,xv),new wv(ov(e))}).prototype=xv;for(var Wv,zv=uv(wv),Hv=0;zv.length>Hv;)(Wv=zv[Hv++])in Av||Zp(Av,Wv,wv[Wv]);xv.constructor=Av}sv&&av(Pv)!==Cv&&sv(Pv,Cv);var Gv=new Tv(new Av(2)),Xv=Yp(Pv.setInt8);Gv.setInt8(0,2147483648),Gv.setInt8(1,2147483649),!Gv.getInt8(0)&&Gv.getInt8(1)||$p(Pv,{setInt8:function(e,t){Xv(this,e,t<<24>>24)},setUint8:function(e,t){Xv(this,e,t<<24>>24)}},{unsafe:!0})}else xv=(Av=function(e){tv(this,xv);var t=ov(e);gv(this,{bytes:Sv(_v(t),0),byteLength:t}),qp||(this.byteLength=t)}).prototype,Pv=(Tv=function(e,t,n){tv(this,Pv),tv(e,xv);var r=vv(e).byteLength,o=nv(t);if(o<0||o>r)throw Ev("Wrong offset");if(o+(n=void 0===n?r-o:rv(n))>r)throw Ev("Wrong length");gv(this,{buffer:e,byteLength:n,byteOffset:o}),qp||(this.buffer=e,this.byteLength=n,this.byteOffset=o)}).prototype,qp&&(Bv(Av,"byteLength"),Bv(Tv,"buffer"),Bv(Tv,"byteLength"),Bv(Tv,"byteOffset")),$p(Pv,{getInt8:function(e){return Nv(this,1,e)[0]<<24>>24},getUint8:function(e){return Nv(this,1,e)[0]},getInt16:function(e){var t=Nv(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Nv(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Dv(Nv(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Dv(Nv(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Ov(Nv(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Ov(Nv(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Vv(this,1,e,Mv,t)},setUint8:function(e,t){Vv(this,1,e,Mv,t)},setInt16:function(e,t){Vv(this,2,e,Fv,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Vv(this,2,e,Fv,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Vv(this,4,e,Iv,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Vv(this,4,e,Iv,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Vv(this,4,e,Lv,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Vv(this,8,e,jv,t,arguments.length>2?arguments[2]:void 0)}});hv(Av,mv),hv(Tv,yv);var Qv={ArrayBuffer:Av,DataView:Tv},Yv=vp,qv="ArrayBuffer",Kv=Qv.ArrayBuffer;Wo({global:!0,forced:J.ArrayBuffer!==Kv},{ArrayBuffer:Kv}),Yv(qv);var Jv,Zv,$v,eg=Rp,tg=ee,ng=J,rg=Fe,og=De,ig=Ot,ag=Zo,sg=at,ug=Wn,cg=zn.exports,lg=xn.f,fg=Ve,hg=kf,dg=$f,pg=Qt,vg=Lt,gg=ng.Int8Array,mg=gg&&gg.prototype,yg=ng.Uint8ClampedArray,bg=yg&&yg.prototype,wg=gg&&hg(gg),Ag=mg&&hg(mg),xg=Object.prototype,Tg=ng.TypeError,Pg=pg("toStringTag"),Cg=vg("TYPED_ARRAY_TAG"),_g=vg("TYPED_ARRAY_CONSTRUCTOR"),Eg=eg&&!!dg&&"Opera"!==ag(ng.opera),Sg=!1,kg={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Rg={BigInt64Array:8,BigUint64Array:8},Og=function(e){if(!og(e))return!1;var t=ag(e);return ig(kg,t)||ig(Rg,t)};for(Jv in kg)($v=(Zv=ng[Jv])&&Zv.prototype)?ug($v,_g,Zv):Eg=!1;for(Jv in Rg)($v=(Zv=ng[Jv])&&Zv.prototype)&&ug($v,_g,Zv);if((!Eg||!rg(wg)||wg===Function.prototype)&&(wg=function(){throw Tg("Incorrect invocation")},Eg))for(Jv in kg)ng[Jv]&&dg(ng[Jv],wg);if((!Eg||!Ag||Ag===xg)&&(Ag=wg.prototype,Eg))for(Jv in kg)ng[Jv]&&dg(ng[Jv].prototype,Ag);if(Eg&&hg(bg)!==Ag&&dg(bg,Ag),tg&&!ig(Ag,Pg))for(Jv in Sg=!0,lg(Ag,Pg,{get:function(){return og(this)?this[Cg]:void 0}}),kg)ng[Jv]&&ug(ng[Jv],Cg,Jv);var Mg={NATIVE_ARRAY_BUFFER_VIEWS:Eg,TYPED_ARRAY_CONSTRUCTOR:_g,TYPED_ARRAY_TAG:Sg&&Cg,aTypedArray:function(e){if(Og(e))return e;throw Tg("Target is not a typed array")},aTypedArrayConstructor:function(e){if(rg(e)&&(!dg||fg(wg,e)))return e;throw Tg(sg(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(tg){if(n)for(var o in kg){var i=ng[o];if(i&&ig(i.prototype,e))try{delete i.prototype[e]}catch(_3){try{i.prototype[e]=t}catch(a){}}}Ag[e]&&!n||cg(Ag,e,n?t:Eg&&mg[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(tg){if(dg){if(n)for(r in kg)if((o=ng[r])&&ig(o,e))try{delete o[e]}catch(_3){}if(wg[e]&&!n)return;try{return cg(wg,e,n?t:Eg&&wg[e]||t)}catch(_3){}}for(r in kg)!(o=ng[r])||o[e]&&!n||cg(o,e,t)}},isView:function(e){if(!og(e))return!1;var t=ag(e);return"DataView"===t||ig(kg,t)||ig(Rg,t)},isTypedArray:Og,TypedArray:wg,TypedArrayPrototype:Ag};Wo({target:"ArrayBuffer",stat:!0,forced:!Mg.NATIVE_ARRAY_BUFFER_VIEWS},{isView:Mg.isView});var Fg=Ta,Ig=at,Dg=J.TypeError,Lg=function(e){if(Fg(e))return e;throw Dg(Ig(e)+" is not a constructor")},jg=Sn,Bg=Lg,Ng=Qt("species"),Vg=function(e,t){var n,r=jg(e).constructor;return void 0===r||null==(n=jg(r)[Ng])?t:Bg(n)},Ug=Wo,Wg=me,zg=$,Hg=Sn,Gg=Qr,Xg=Kr,Qg=Vg,Yg=Qv.ArrayBuffer,qg=Qv.DataView,Kg=qg.prototype,Jg=Wg(Yg.prototype.slice),Zg=Wg(Kg.getUint8),$g=Wg(Kg.setUint8);Ug({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:zg((function(){return!new Yg(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(Jg&&void 0===t)return Jg(Hg(this),e);for(var n=Hg(this).byteLength,r=Gg(e,n),o=Gg(void 0===t?n:t,n),i=new(Qg(this,Yg))(Xg(o-r)),a=new qg(this),s=new qg(i),u=0;r<o;)$g(s,u++,Zg(a,r++));return i}});var em=St,tm=nn;Wo({target:"Date",proto:!0,forced:$((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=em(this),n=tm(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}});var nm=Sn,rm=mt,om=J.TypeError,im=Ot,am=zn.exports,sm=function(e){if(nm(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw om("Incorrect hint");return rm(this,e)},um=Qt("toPrimitive"),cm=Date.prototype;im(cm,um)||am(cm,um,sm);var lm=Fe,fm=De,hm=xn,dm=kf,pm=Qt("hasInstance"),vm=Function.prototype;pm in vm||hm.f(vm,pm,{value:function(e){if(!lm(this)||!fm(e))return!1;var t=this.prototype;if(!fm(t))return e instanceof this;for(;e=dm(e);)if(t===e)return!0;return!1}});var gm=ee,mm=kr.EXISTS,ym=me,bm=xn.f,wm=Function.prototype,Am=ym(wm.toString),xm=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Tm=ym(xm.exec);gm&&!mm&&bm(wm,"name",{configurable:!0,get:function(){try{return Tm(xm,Am(this))[1]}catch(_3){return""}}}),ra(J.JSON,"JSON",!0);var Pm={exports:{}},Cm=$((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),_m=$,Em=De,Sm=Ae,km=Cm,Rm=Object.isExtensible,Om=_m((function(){Rm(1)}))||km?function(e){return!!Em(e)&&((!km||"ArrayBuffer"!=Sm(e))&&(!Rm||Rm(e)))}:Rm,Mm=!$((function(){return Object.isExtensible(Object.preventExtensions({}))})),Fm=Wo,Im=me,Dm=ir,Lm=De,jm=Ot,Bm=xn.f,Nm=Vr,Vm=_i,Um=Om,Wm=Mm,zm=!1,Hm=Lt("meta"),Gm=0,Xm=function(e){Bm(e,Hm,{value:{objectID:"O"+Gm++,weakData:{}}})},Qm=Pm.exports={enable:function(){Qm.enable=function(){},zm=!0;var e=Nm.f,t=Im([].splice),n={};n[Hm]=1,e(n).length&&(Nm.f=function(n){for(var r=e(n),o=0,i=r.length;o<i;o++)if(r[o]===Hm){t(r,o,1);break}return r},Fm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Vm.f}))},fastKey:function(e,t){if(!Lm(e))return"symbol"==S(e)?e:("string"==typeof e?"S":"P")+e;if(!jm(e,Hm)){if(!Um(e))return"F";if(!t)return"E";Xm(e)}return e[Hm].objectID},getWeakData:function(e,t){if(!jm(e,Hm)){if(!Um(e))return!0;if(!t)return!1;Xm(e)}return e[Hm].weakData},onFreeze:function(e){return Wm&&zm&&Um(e)&&!jm(e,Hm)&&Xm(e),e}};Dm[Hm]=!0;var Ym=sa,qm=oe,Km=Sn,Jm=at,Zm=kl,$m=Zr,ey=Ve,ty=Ul,ny=Il,ry=xl,oy=J.TypeError,iy=function(e,t){this.stopped=e,this.result=t},ay=iy.prototype,sy=function(e,t,n){var r,o,i,a,s,u,c,l=n&&n.that,f=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),p=Ym(t,l),v=function(e){return r&&ry(r,"normal",e),new iy(!0,e)},g=function(e){return f?(Km(e),d?p(e[0],e[1],v):p(e[0],e[1])):d?p(e,v):p(e)};if(h)r=e;else{if(!(o=ny(e)))throw oy(Jm(e)+" is not iterable");if(Zm(o)){for(i=0,a=$m(e);a>i;i++)if((s=g(e[i]))&&ey(ay,s))return s;return new iy(!1)}r=ty(e,o)}for(u=r.next;!(c=qm(u,r)).done;){try{s=g(c.value)}catch(_3){ry(r,"throw",_3)}if("object"==S(s)&&s&&ey(ay,s))return s}return new iy(!1)},uy=Fe,cy=De,ly=$f,fy=function(e,t,n){var r,o;return ly&&uy(r=t.constructor)&&r!==n&&cy(o=r.prototype)&&o!==n.prototype&&ly(e,o),e},hy=Wo,dy=J,py=me,vy=Io,gy=zn.exports,my=Pm.exports,yy=sy,by=Dp,wy=Fe,Ay=De,xy=$,Ty=of,Py=ra,Cy=fy,_y=function(e,t,n){var r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=r?"set":"add",a=dy[e],s=a&&a.prototype,u=a,c={},l=function(e){var t=py(s[e]);gy(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!Ay(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return o&&!Ay(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!Ay(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(vy(e,!wy(a)||!(o||s.forEach&&!xy((function(){(new a).entries().next()})))))u=n.getConstructor(t,e,r,i),my.enable();else if(vy(e,!0)){var f=new u,h=f[i](o?{}:-0,1)!=f,d=xy((function(){f.has(1)})),p=Ty((function(e){new a(e)})),v=!o&&xy((function(){for(var e=new a,t=5;t--;)e[i](t,t);return!e.has(-0)}));p||((u=t((function(e,t){by(e,s);var n=Cy(new a,e,u);return null!=t&&yy(t,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=s,s.constructor=u),(d||v)&&(l("delete"),l("has"),r&&l("get")),(v||h)&&l(i),o&&s.clear&&delete s.clear}return c[e]=u,hy({global:!0,forced:u!=a},c),Py(u,e),o||n.setStrong(u,e,r),u},Ey=xn.f,Sy=Ci,ky=Mp,Ry=sa,Oy=Dp,My=sy,Fy=wh,Iy=vp,Dy=ee,Ly=Pm.exports.fastKey,jy=Tr.set,By=Tr.getterFor,Ny={getConstructor:function(e,t,n,r){var o=e((function(e,o){Oy(e,i),jy(e,{type:t,index:Sy(null),first:void 0,last:void 0,size:0}),Dy||(e.size=0),null!=o&&My(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=By(t),s=function(e,t,n){var r,o,i=a(e),s=u(e,t);return s?s.value=n:(i.last=s={index:o=Ly(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=s),r&&(r.next=s),Dy?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},u=function(e,t){var n,r=a(e),o=Ly(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return ky(i,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,Dy?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=u(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),Dy?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=Ry(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),ky(i,n?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),Dy&&Ey(i,"size",{get:function(){return a(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=By(t),i=By(r);Fy(e,t,(function(e,t){jy(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),Iy(t)}};_y("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Ny);var Vy=Math.log,Uy=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Vy(1+e)},Wy=Wo,zy=Uy,Hy=Math.acosh,Gy=Math.log,Xy=Math.sqrt,Qy=Math.LN2;Wy({target:"Math",stat:!0,forced:!Hy||710!=Math.floor(Hy(Number.MAX_VALUE))||Hy(1/0)!=1/0},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Gy(e)+Qy:zy(e-1+Xy(e-1)*Xy(e+1))}});var Yy=Wo,qy=Math.asinh,Ky=Math.log,Jy=Math.sqrt;Yy({target:"Math",stat:!0,forced:!(qy&&1/qy(0)>0)},{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Ky(t+Jy(t*t+1)):t}});var Zy=Wo,$y=Math.atanh,eb=Math.log;Zy({target:"Math",stat:!0,forced:!($y&&1/$y(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:eb((1+e)/(1-e))/2}});var tb=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1},nb=Wo,rb=tb,ob=Math.abs,ib=Math.pow;nb({target:"Math",stat:!0},{cbrt:function(e){return rb(e=+e)*ib(ob(e),1/3)}});var ab=Wo,sb=Math.floor,ub=Math.log,cb=Math.LOG2E;ab({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-sb(ub(e+.5)*cb):32}});var lb=Math.expm1,fb=Math.exp,hb=!lb||lb(10)>22025.465794806718||lb(10)<22025.465794806718||-2e-17!=lb(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:fb(e)-1}:lb,db=Wo,pb=hb,vb=Math.cosh,gb=Math.abs,mb=Math.E;db({target:"Math",stat:!0,forced:!vb||vb(710)===1/0},{cosh:function(e){var t=pb(gb(e)-1)+1;return(t+1/(t*mb*mb))*(mb/2)}});var yb=hb;Wo({target:"Math",stat:!0,forced:yb!=Math.expm1},{expm1:yb});var bb=tb,wb=Math.abs,Ab=Math.pow,xb=Ab(2,-52),Tb=Ab(2,-23),Pb=Ab(2,127)*(2-Tb),Cb=Ab(2,-126),_b=Math.fround||function(e){var t,n,r=wb(e),o=bb(e);return r<Cb?o*(r/Cb/Tb+1/xb-1/xb)*Cb*Tb:(n=(t=(1+Tb/xb)*r)-(t-r))>Pb||n!=n?o*(1/0):o*n};Wo({target:"Math",stat:!0},{fround:_b});var Eb=Wo,Sb=Math.hypot,kb=Math.abs,Rb=Math.sqrt;Eb({target:"Math",stat:!0,forced:!!Sb&&Sb(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,r,o=0,i=0,a=arguments.length,s=0;i<a;)s<(n=kb(arguments[i++]))?(o=o*(r=s/n)*r+1,s=n):o+=n>0?(r=n/s)*r:n;return s===1/0?1/0:s*Rb(o)}});var Ob=Wo,Mb=$,Fb=Math.imul;Ob({target:"Math",stat:!0,forced:Mb((function(){return-5!=Fb(4294967295,5)||2!=Fb.length}))},{imul:function(e,t){var n=65535,r=+e,o=+t,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)}});var Ib=Math.log,Db=Math.LOG10E;Wo({target:"Math",stat:!0},{log10:Math.log10||function(e){return Ib(e)*Db}}),Wo({target:"Math",stat:!0},{log1p:Uy});var Lb=Wo,jb=Math.log,Bb=Math.LN2;Lb({target:"Math",stat:!0},{log2:function(e){return jb(e)/Bb}}),Wo({target:"Math",stat:!0},{sign:tb});var Nb=Wo,Vb=$,Ub=hb,Wb=Math.abs,zb=Math.exp,Hb=Math.E;Nb({target:"Math",stat:!0,forced:Vb((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return Wb(e=+e)<1?(Ub(e)-Ub(-e))/2:(zb(e-1)-zb(-e-1))*(Hb/2)}});var Gb=Wo,Xb=hb,Qb=Math.exp;Gb({target:"Math",stat:!0},{tanh:function(e){var t=Xb(e=+e),n=Xb(-e);return t==1/0?1:n==1/0?-1:(t-n)/(Qb(e)+Qb(-e))}}),ra(Math,"Math",!0);var Yb=Wo,qb=Math.ceil,Kb=Math.floor;Yb({target:"Math",stat:!0},{trunc:function(e){return(e>0?Kb:qb)(e)}});var Jb=me(1..valueOf),Zb="\t\n\v\f\r                 \u2028\u2029\ufeff",$b=ke,ew=ti,tw=me("".replace),nw="[\t\n\v\f\r                 \u2028\u2029\ufeff]",rw=RegExp("^"+nw+nw+"*"),ow=RegExp(nw+nw+"*$"),iw=function(e){return function(t){var n=ew($b(t));return 1&e&&(n=tw(n,rw,"")),2&e&&(n=tw(n,ow,"")),n}},aw={start:iw(1),end:iw(2),trim:iw(3)},sw=ee,uw=J,cw=me,lw=Io,fw=zn.exports,hw=Ot,dw=fy,pw=Ve,vw=ot,gw=nn,mw=$,yw=Vr.f,bw=Z.f,ww=xn.f,Aw=Jb,xw=aw.trim,Tw="Number",Pw=uw.Number,Cw=Pw.prototype,_w=uw.TypeError,Ew=cw("".slice),Sw=cw("".charCodeAt),kw=function(e){var t=gw(e,"number");return"bigint"==typeof t?t:Rw(t)},Rw=function(e){var t,n,r,o,i,a,s,u,c=gw(e,"number");if(vw(c))throw _w("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=xw(c),43===(t=Sw(c,0))||45===t){if(88===(n=Sw(c,2))||120===n)return NaN}else if(48===t){switch(Sw(c,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+c}for(a=(i=Ew(c,2)).length,s=0;s<a;s++)if((u=Sw(i,s))<48||u>o)return NaN;return parseInt(i,r)}return+c};if(lw(Tw,!Pw(" 0o1")||!Pw("0b1")||Pw("+0x1"))){for(var Ow,Mw=function(e){var t=arguments.length<1?0:Pw(kw(e)),n=this;return pw(Cw,n)&&mw((function(){Aw(n)}))?dw(Object(t),n,Mw):t},Fw=sw?yw(Pw):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Iw=0;Fw.length>Iw;Iw++)hw(Pw,Ow=Fw[Iw])&&!hw(Mw,Ow)&&ww(Mw,Ow,bw(Pw,Ow));Mw.prototype=Cw,Cw.constructor=Mw,fw(uw,Tw,Mw)}Wo({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)});var Dw=J.isFinite,Lw=Number.isFinite||function(e){return"number"==typeof e&&Dw(e)};Wo({target:"Number",stat:!0},{isFinite:Lw});var jw=De,Bw=Math.floor,Nw=Number.isInteger||function(e){return!jw(e)&&isFinite(e)&&Bw(e)===e};Wo({target:"Number",stat:!0},{isInteger:Nw}),Wo({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var Vw=Wo,Uw=Nw,Ww=Math.abs;Vw({target:"Number",stat:!0},{isSafeInteger:function(e){return Uw(e)&&Ww(e)<=9007199254740991}}),Wo({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991}),Wo({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991});var zw=J,Hw=$,Gw=ti,Xw=aw.trim,Qw=me("".charAt),Yw=zw.parseFloat,qw=zw.Symbol,Kw=qw&&qw.iterator,Jw=1/Yw("\t\n\v\f\r                 \u2028\u2029\ufeff-0")!=-1/0||Kw&&!Hw((function(){Yw(Object(Kw))}))?function(e){var t=Xw(Gw(e)),n=Yw(t);return 0===n&&"-"==Qw(t,0)?-0:n}:Yw,Zw=Jw;Wo({target:"Number",stat:!0,forced:Number.parseFloat!=Zw},{parseFloat:Zw});var $w=J,eA=$,tA=me,nA=ti,rA=aw.trim,oA=Zb,iA=$w.parseInt,aA=$w.Symbol,sA=aA&&aA.iterator,uA=/^[+-]?0x/i,cA=tA(uA.exec),lA=8!==iA(oA+"08")||22!==iA(oA+"0x16")||sA&&!eA((function(){iA(Object(sA))}))?function(e,t){var n=rA(nA(e));return iA(n,t>>>0||(cA(uA,n)?16:10))}:iA,fA=lA;Wo({target:"Number",stat:!0,forced:Number.parseInt!=fA},{parseInt:fA});var hA=zr,dA=ti,pA=ke,vA=J.RangeError,gA=function(e){var t=dA(pA(this)),n="",r=hA(e);if(r<0||r==1/0)throw vA("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},mA=Wo,yA=J,bA=me,wA=zr,AA=Jb,xA=gA,TA=$,PA=yA.RangeError,CA=yA.String,_A=Math.floor,EA=bA(xA),SA=bA("".slice),kA=bA(1..toFixed),RA=function e(t,n,r){return 0===n?r:n%2==1?e(t,n-1,r*t):e(t*t,n/2,r)},OA=function(e,t,n){for(var r=-1,o=n;++r<6;)o+=t*e[r],e[r]=o%1e7,o=_A(o/1e7)},MA=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=_A(r/t),r=r%t*1e7},FA=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=CA(e[t]);n=""===n?r:n+EA("0",7-r.length)+r}return n};mA({target:"Number",proto:!0,forced:TA((function(){return"0.000"!==kA(8e-5,3)||"1"!==kA(.9,0)||"1.25"!==kA(1.255,2)||"1000000000000000128"!==kA(0xde0b6b3a7640080,0)}))||!TA((function(){kA({})}))},{toFixed:function(e){var t,n,r,o,i=AA(this),a=wA(e),s=[0,0,0,0,0,0],u="",c="0";if(a<0||a>20)throw PA("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return CA(i);if(i<0&&(u="-",i=-i),i>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(i*RA(2,69,1))-69)<0?i*RA(2,-t,1):i/RA(2,t,1),n*=4503599627370496,(t=52-t)>0){for(OA(s,0,n),r=a;r>=7;)OA(s,1e7,0),r-=7;for(OA(s,RA(10,r,1),0),r=t-1;r>=23;)MA(s,1<<23),r-=23;MA(s,1<<r),OA(s,1,1),MA(s,2),c=FA(s)}else OA(s,0,n),OA(s,1<<-t,0),c=FA(s)+EA("0",a);return c=a>0?u+((o=c.length)<=a?"0."+EA("0",a-o)+c:SA(c,0,o-a)+"."+SA(c,o-a)):u+c}});var IA=ee,DA=me,LA=oe,jA=$,BA=ii,NA=po,VA=ie,UA=St,WA=Ee,zA=Object.assign,HA=Object.defineProperty,GA=DA([].concat),XA=!zA||jA((function(){if(IA&&1!==zA({b:1},zA(HA({},"a",{enumerable:!0,get:function(){HA(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=zA({},e)[n]||BA(zA({},t)).join("")!=r}))?function(e,t){for(var n=UA(e),r=arguments.length,o=1,i=NA.f,a=VA.f;r>o;)for(var s,u=WA(arguments[o++]),c=i?GA(BA(u),i(u)):BA(u),l=c.length,f=0;l>f;)s=c[f++],IA&&!LA(a,u,s)||(n[s]=u[s]);return n}:zA,QA=XA;Wo({target:"Object",stat:!0,forced:Object.assign!==QA},{assign:QA});var YA=J,qA=Hd,KA=!$((function(){if(!(qA&&qA<535)){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete YA[e]}})),JA=lt,ZA=St,$A=xn;ee&&Wo({target:"Object",proto:!0,forced:KA},{__defineGetter__:function(e,t){$A.f(ZA(this),e,{get:JA(t),enumerable:!0,configurable:!0})}});var ex=Wo,tx=ee,nx=ni.f;ex({target:"Object",stat:!0,forced:Object.defineProperties!==nx,sham:!tx},{defineProperties:nx});var rx=Wo,ox=ee,ix=xn.f;rx({target:"Object",stat:!0,forced:Object.defineProperty!==ix,sham:!ox},{defineProperty:ix});var ax=lt,sx=St,ux=xn;ee&&Wo({target:"Object",proto:!0,forced:KA},{__defineSetter__:function(e,t){ux.f(sx(this),e,{set:ax(t),enumerable:!0,configurable:!0})}});var cx=ee,lx=me,fx=ii,hx=Me,dx=lx(ie.f),px=lx([].push),vx=function(e){return function(t){for(var n,r=hx(t),o=fx(r),i=o.length,a=0,s=[];i>a;)n=o[a++],cx&&!dx(r,n)||px(s,e?[n,r[n]]:r[n]);return s}},gx={entries:vx(!0),values:vx(!1)},mx=gx.entries;Wo({target:"Object",stat:!0},{entries:function(e){return mx(e)}});var yx=Wo,bx=Mm,wx=$,Ax=De,xx=Pm.exports.onFreeze,Tx=Object.freeze;yx({target:"Object",stat:!0,forced:wx((function(){Tx(1)})),sham:!bx},{freeze:function(e){return Tx&&Ax(e)?Tx(xx(e)):e}});var Px=sy,Cx=Ri;Wo({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Px(e,(function(e,n){Cx(t,e,n)}),{AS_ENTRIES:!0}),t}});var _x=Wo,Ex=$,Sx=Me,kx=Z.f,Rx=ee,Ox=Ex((function(){kx(1)}));_x({target:"Object",stat:!0,forced:!Rx||Ox,sham:!Rx},{getOwnPropertyDescriptor:function(e,t){return kx(Sx(e),t)}});var Mx=wo,Fx=Me,Ix=Z,Dx=Ri;Wo({target:"Object",stat:!0,sham:!ee},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Fx(e),o=Ix.f,i=Mx(r),a={},s=0;i.length>s;)void 0!==(n=o(r,t=i[s++]))&&Dx(a,t,n);return a}});var Lx=Wo,jx=$,Bx=_i.f;Lx({target:"Object",stat:!0,forced:jx((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:Bx});var Nx=St,Vx=kf,Ux=wf;Wo({target:"Object",stat:!0,forced:$((function(){Vx(1)})),sham:!Ux},{getPrototypeOf:function(e){return Vx(Nx(e))}});var Wx=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Wo({target:"Object",stat:!0},{is:Wx});var zx=Om;Wo({target:"Object",stat:!0,forced:Object.isExtensible!==zx},{isExtensible:zx});var Hx=Wo,Gx=$,Xx=De,Qx=Ae,Yx=Cm,qx=Object.isFrozen;Hx({target:"Object",stat:!0,forced:Gx((function(){qx(1)}))||Yx},{isFrozen:function(e){return!Xx(e)||(!(!Yx||"ArrayBuffer"!=Qx(e))||!!qx&&qx(e))}});var Kx=Wo,Jx=$,Zx=De,$x=Ae,eT=Cm,tT=Object.isSealed;Kx({target:"Object",stat:!0,forced:Jx((function(){tT(1)}))||eT},{isSealed:function(e){return!Zx(e)||(!(!eT||"ArrayBuffer"!=$x(e))||!!tT&&tT(e))}});var nT=St,rT=ii;Wo({target:"Object",stat:!0,forced:$((function(){rT(1)}))},{keys:function(e){return rT(nT(e))}});var oT=Wo,iT=ee,aT=KA,sT=St,uT=an,cT=kf,lT=Z.f;iT&&oT({target:"Object",proto:!0,forced:aT},{__lookupGetter__:function(e){var t,n=sT(this),r=uT(e);do{if(t=lT(n,r))return t.get}while(n=cT(n))}});var fT=Wo,hT=ee,dT=KA,pT=St,vT=an,gT=kf,mT=Z.f;hT&&fT({target:"Object",proto:!0,forced:dT},{__lookupSetter__:function(e){var t,n=pT(this),r=vT(e);do{if(t=mT(n,r))return t.set}while(n=gT(n))}});var yT=Wo,bT=De,wT=Pm.exports.onFreeze,AT=Mm,xT=$,TT=Object.preventExtensions;yT({target:"Object",stat:!0,forced:xT((function(){TT(1)})),sham:!AT},{preventExtensions:function(e){return TT&&bT(e)?TT(wT(e)):e}});var PT=Wo,CT=De,_T=Pm.exports.onFreeze,ET=Mm,ST=$,kT=Object.seal;PT({target:"Object",stat:!0,forced:ST((function(){kT(1)})),sham:!ET},{seal:function(e){return kT&&CT(e)?kT(_T(e)):e}}),Wo({target:"Object",stat:!0},{setPrototypeOf:$f});var RT=Zo,OT=Ho?{}.toString:function(){return"[object "+RT(this)+"]"},MT=Ho,FT=zn.exports,IT=OT;MT||FT(Object.prototype,"toString",IT,{unsafe:!0});var DT=gx.values;Wo({target:"Object",stat:!0},{values:function(e){return DT(e)}});Wo({global:!0,forced:parseFloat!=Jw},{parseFloat:Jw});Wo({global:!0,forced:parseInt!=lA},{parseInt:lA});var LT,jT,BT,NT,VT=J.TypeError,UT=function(e,t){if(e<t)throw VT("Not enough arguments");return e},WT=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ue),zT=J,HT=fu,GT=sa,XT=Fe,QT=Ot,YT=$,qT=di,KT=hu,JT=ln,ZT=UT,$T=WT,eP=cd,tP=zT.setImmediate,nP=zT.clearImmediate,rP=zT.process,oP=zT.Dispatch,iP=zT.Function,aP=zT.MessageChannel,sP=zT.String,uP=0,cP={},lP="onreadystatechange";try{LT=zT.location}catch(_3){}var fP=function(e){if(QT(cP,e)){var t=cP[e];delete cP[e],t()}},hP=function(e){return function(){fP(e)}},dP=function(e){fP(e.data)},pP=function(e){zT.postMessage(sP(e),LT.protocol+"//"+LT.host)};tP&&nP||(tP=function(e){ZT(arguments.length,1);var t=XT(e)?e:iP(e),n=KT(arguments,1);return cP[++uP]=function(){HT(t,void 0,n)},jT(uP),uP},nP=function(e){delete cP[e]},eP?jT=function(e){rP.nextTick(hP(e))}:oP&&oP.now?jT=function(e){oP.now(hP(e))}:aP&&!$T?(NT=(BT=new aP).port2,BT.port1.onmessage=dP,jT=GT(NT.postMessage,NT)):zT.addEventListener&&XT(zT.postMessage)&&!zT.importScripts&&LT&&"file:"!==LT.protocol&&!YT(pP)?(jT=pP,zT.addEventListener("message",dP,!1)):jT=lP in JT("script")?function(e){qT.appendChild(JT("script")).onreadystatechange=function(){qT.removeChild(this),fP(e)}}:function(e){setTimeout(hP(e),0)});var vP,gP,mP,yP,bP,wP,AP,xP,TP={set:tP,clear:nP},PP=J,CP=/ipad|iphone|ipod/i.test(Ue)&&void 0!==PP.Pebble,_P=/web0s(?!.*chrome)/i.test(Ue),EP=J,SP=sa,kP=Z.f,RP=TP.set,OP=WT,MP=CP,FP=_P,IP=cd,DP=EP.MutationObserver||EP.WebKitMutationObserver,LP=EP.document,jP=EP.process,BP=EP.Promise,NP=kP(EP,"queueMicrotask"),VP=NP&&NP.value;VP||(vP=function(){var e,t;for(IP&&(e=jP.domain)&&e.exit();gP;){t=gP.fn,gP=gP.next;try{t()}catch(_3){throw gP?yP():mP=void 0,_3}}mP=void 0,e&&e.enter()},OP||IP||FP||!DP||!LP?!MP&&BP&&BP.resolve?((AP=BP.resolve(void 0)).constructor=BP,xP=SP(AP.then,AP),yP=function(){xP(vP)}):IP?yP=function(){jP.nextTick(vP)}:(RP=SP(RP,EP),yP=function(){RP(vP)}):(bP=!0,wP=LP.createTextNode(""),new DP(vP).observe(wP,{characterData:!0}),yP=function(){wP.data=bP=!bP}));var UP=VP||function(e){var t={fn:e,next:void 0};mP&&(mP.next=t),gP||(gP=t,yP()),mP=t},WP=J,zP=function(e,t){var n=WP.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},HP=function(e){try{return{error:!1,value:e()}}catch(_3){return{error:!0,value:_3}}},GP=function(){this.head=null,this.tail=null};GP.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var XP=GP,QP=J.Promise,YP="object"==("undefined"==typeof window?"undefined":S(window))&&"object"!=("undefined"==typeof Deno?"undefined":S(Deno)),qP=J,KP=QP,JP=Fe,ZP=Io,$P=Kn,eC=Qt,tC=YP,nC=Ye;KP&&KP.prototype;var rC=eC("species"),oC=!1,iC=JP(qP.PromiseRejectionEvent),aC=ZP("Promise",(function(){var e=$P(KP),t=e!==String(KP);if(!t&&66===nC)return!0;if(nC>=51&&/native code/.test(e))return!1;var n=new KP((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[rC]=r,!(oC=n.then((function(){}))instanceof r)||!t&&tC&&!iC})),sC={CONSTRUCTOR:aC,REJECTION_EVENT:iC,SUBCLASSING:oC},uC={},cC=lt,lC=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=cC(t),this.reject=cC(n)};uC.f=function(e){return new lC(e)};var fC,hC,dC,pC=Wo,vC=cd,gC=J,mC=oe,yC=zn.exports,bC=Mp,wC=$f,AC=ra,xC=vp,TC=lt,PC=Fe,CC=De,_C=Dp,EC=Vg,SC=TP.set,kC=UP,RC=zP,OC=HP,MC=XP,FC=Tr,IC=QP,DC=uC,LC="Promise",jC=sC.CONSTRUCTOR,BC=sC.REJECTION_EVENT,NC=sC.SUBCLASSING,VC=FC.getterFor(LC),UC=FC.set,WC=IC&&IC.prototype,zC=IC,HC=WC,GC=gC.TypeError,XC=gC.document,QC=gC.process,YC=DC.f,qC=YC,KC=!!(XC&&XC.createEvent&&gC.dispatchEvent),JC="unhandledrejection",ZC=function(e){var t;return!(!CC(e)||!PC(t=e.then))&&t},$C=function(e,t){var n,r,o,i=t.value,a=1==t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(a||(2===t.rejection&&o_(t),t.rejection=1),!0===s?n=i:(l&&l.enter(),n=s(i),l&&(l.exit(),o=!0)),n===e.promise?c(GC("Promise-chain cycle")):(r=ZC(n))?mC(r,n,u,c):u(n)):c(i)}catch(_3){l&&!o&&l.exit(),c(_3)}},e_=function(e,t){e.notified||(e.notified=!0,kC((function(){for(var n,r=e.reactions;n=r.get();)$C(n,e);e.notified=!1,t&&!e.rejection&&n_(e)})))},t_=function(e,t,n){var r,o;KC?((r=XC.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),gC.dispatchEvent(r)):r={promise:t,reason:n},!BC&&(o=gC["on"+e])?o(r):e===JC&&RC("Unhandled promise rejection",n)},n_=function(e){mC(SC,gC,(function(){var t,n=e.facade,r=e.value;if(r_(e)&&(t=OC((function(){vC?QC.emit("unhandledRejection",r,n):t_(JC,n,r)})),e.rejection=vC||r_(e)?2:1,t.error))throw t.value}))},r_=function(e){return 1!==e.rejection&&!e.parent},o_=function(e){mC(SC,gC,(function(){var t=e.facade;vC?QC.emit("rejectionHandled",t):t_("rejectionhandled",t,e.value)}))},i_=function(e,t,n){return function(r){e(t,r,n)}},a_=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,e_(e,!0))},s_=function e(t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===n)throw GC("Promise can't be resolved itself");var o=ZC(n);o?kC((function(){var r={done:!1};try{mC(o,n,i_(e,r,t),i_(a_,r,t))}catch(_3){a_(r,_3,t)}})):(t.value=n,t.state=1,e_(t,!1))}catch(_3){a_({done:!1},_3,t)}}};if(jC&&(HC=(zC=function(e){_C(this,HC),TC(e),mC(fC,this);var t=VC(this);try{e(i_(s_,t),i_(a_,t))}catch(_3){a_(t,_3)}}).prototype,(fC=function(e){UC(this,{type:LC,done:!1,notified:!1,parent:!1,reactions:new MC,rejection:!1,state:0,value:void 0})}).prototype=bC(HC,{then:function(e,t){var n=VC(this),r=YC(EC(this,zC));return n.parent=!0,r.ok=!PC(e)||e,r.fail=PC(t)&&t,r.domain=vC?QC.domain:void 0,0==n.state?n.reactions.add(r):kC((function(){$C(r,n)})),r.promise}}),hC=function(){var e=new fC,t=VC(e);this.promise=e,this.resolve=i_(s_,t),this.reject=i_(a_,t)},DC.f=YC=function(e){return e===zC||undefined===e?new hC(e):qC(e)},PC(IC)&&WC!==Object.prototype)){dC=WC.then,NC||yC(WC,"then",(function(e,t){var n=this;return new zC((function(e,t){mC(dC,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete WC.constructor}catch(_3){}wC&&wC(WC,HC)}pC({global:!0,wrap:!0,forced:jC},{Promise:zC}),AC(zC,LC,!1),xC(LC);var u_=QP,c_=sC.CONSTRUCTOR||!of((function(e){u_.all(e).then(void 0,(function(){}))})),l_=oe,f_=lt,h_=uC,d_=HP,p_=sy;Wo({target:"Promise",stat:!0,forced:c_},{all:function(e){var t=this,n=h_.f(t),r=n.resolve,o=n.reject,i=d_((function(){var n=f_(t.resolve),i=[],a=0,s=1;p_(e,(function(e){var u=a++,c=!1;s++,l_(n,t,e).then((function(e){c||(c=!0,i[u]=e,--s||r(i))}),o)})),--s||r(i)}));return i.error&&o(i.value),n.promise}});var v_=Wo,g_=sC.CONSTRUCTOR,m_=QP,y_=Ne,b_=Fe,w_=zn.exports,A_=m_&&m_.prototype;if(v_({target:"Promise",proto:!0,forced:g_,real:!0},{catch:function(e){return this.then(void 0,e)}}),b_(m_)){var x_=y_("Promise").prototype.catch;A_.catch!==x_&&w_(A_,"catch",x_,{unsafe:!0})}var T_=oe,P_=lt,C_=uC,__=HP,E_=sy;Wo({target:"Promise",stat:!0,forced:c_},{race:function(e){var t=this,n=C_.f(t),r=n.reject,o=__((function(){var o=P_(t.resolve);E_(e,(function(e){T_(o,t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var S_=oe,k_=uC;Wo({target:"Promise",stat:!0,forced:sC.CONSTRUCTOR},{reject:function(e){var t=k_.f(this);return S_(t.reject,void 0,e),t.promise}});var R_=Sn,O_=De,M_=uC,F_=function(e,t){if(R_(e),O_(t)&&t.constructor===e)return t;var n=M_.f(e);return(0,n.resolve)(t),n.promise},I_=Wo,D_=sC.CONSTRUCTOR,L_=F_;Ne("Promise"),I_({target:"Promise",stat:!0,forced:D_},{resolve:function(e){return L_(this,e)}});var j_=Wo,B_=QP,N_=$,V_=Ne,U_=Fe,W_=Vg,z_=F_,H_=zn.exports,G_=B_&&B_.prototype;if(j_({target:"Promise",proto:!0,real:!0,forced:!!B_&&N_((function(){G_.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=W_(this,V_("Promise")),n=U_(e);return this.then(n?function(n){return z_(t,e()).then((function(){return n}))}:e,n?function(n){return z_(t,e()).then((function(){throw n}))}:e)}}),U_(B_)){var X_=V_("Promise").prototype.finally;G_.finally!==X_&&H_(G_,"finally",X_,{unsafe:!0})}var Q_=fu,Y_=lt,q_=Sn;Wo({target:"Reflect",stat:!0,forced:!$((function(){Reflect.apply((function(){}))}))},{apply:function(e,t,n){return Q_(Y_(e),t,q_(n))}});var K_=me,J_=lt,Z_=De,$_=Ot,eE=hu,tE=te,nE=J.Function,rE=K_([].concat),oE=K_([].join),iE={},aE=function(e,t,n){if(!$_(iE,t)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";iE[t]=nE("C,a","return new C("+oE(r,",")+")")}return iE[t](e,n)},sE=tE?nE.bind:function(e){var t=J_(this),n=t.prototype,r=eE(arguments,1),o=function(){var n=rE(r,eE(arguments));return this instanceof o?aE(t,n.length,n):t.apply(e,n)};return Z_(n)&&(o.prototype=n),o},uE=Wo,cE=fu,lE=sE,fE=Lg,hE=Sn,dE=De,pE=Ci,vE=$,gE=Ne("Reflect","construct"),mE=Object.prototype,yE=[].push,bE=vE((function(){function e(){}return!(gE((function(){}),[],e)instanceof e)})),wE=!vE((function(){gE((function(){}))})),AE=bE||wE;uE({target:"Reflect",stat:!0,forced:AE,sham:AE},{construct:function(e,t){fE(e),hE(t);var n=arguments.length<3?e:fE(arguments[2]);if(wE&&!bE)return gE(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return cE(yE,r,t),new(cE(lE,e,r))}var o=n.prototype,i=pE(dE(o)?o:mE),a=cE(e,i,t);return dE(a)?a:i}});var xE=ee,TE=Sn,PE=an,CE=xn;Wo({target:"Reflect",stat:!0,forced:$((function(){Reflect.defineProperty(CE.f({},1,{value:1}),1,{value:2})})),sham:!xE},{defineProperty:function(e,t,n){TE(e);var r=PE(t);TE(n);try{return CE.f(e,r,n),!0}catch(_3){return!1}}});var _E=Wo,EE=Sn,SE=Z.f;_E({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=SE(EE(e),t);return!(n&&!n.configurable)&&delete e[t]}});var kE=Ot,RE=function(e){return void 0!==e&&(kE(e,"value")||kE(e,"writable"))},OE=oe,ME=De,FE=Sn,IE=RE,DE=Z,LE=kf;Wo({target:"Reflect",stat:!0},{get:function e(t,n){var r,o,i=arguments.length<3?t:arguments[2];return FE(t)===i?t[n]:(r=DE.f(t,n))?IE(r)?r.value:void 0===r.get?void 0:OE(r.get,i):ME(o=LE(t))?e(o,n,i):void 0}});var jE=Sn,BE=Z;Wo({target:"Reflect",stat:!0,sham:!ee},{getOwnPropertyDescriptor:function(e,t){return BE.f(jE(e),t)}});var NE=Sn,VE=kf;Wo({target:"Reflect",stat:!0,sham:!wf},{getPrototypeOf:function(e){return VE(NE(e))}}),Wo({target:"Reflect",stat:!0},{has:function(e,t){return t in e}});var UE=Sn,WE=Om;Wo({target:"Reflect",stat:!0},{isExtensible:function(e){return UE(e),WE(e)}}),Wo({target:"Reflect",stat:!0},{ownKeys:wo});var zE=Ne,HE=Sn;Wo({target:"Reflect",stat:!0,sham:!Mm},{preventExtensions:function(e){HE(e);try{var t=zE("Object","preventExtensions");return t&&t(e),!0}catch(_3){return!1}}});var GE=Wo,XE=oe,QE=Sn,YE=De,qE=RE,KE=xn,JE=Z,ZE=kf,$E=fe;var eS=$((function(){var e=function(){},t=KE.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}));GE({target:"Reflect",stat:!0,forced:eS},{set:function e(t,n,r){var o,i,a,s=arguments.length<4?t:arguments[3],u=JE.f(QE(t),n);if(!u){if(YE(i=ZE(t)))return e(i,n,r,s);u=$E(0)}if(qE(u)){if(!1===u.writable||!YE(s))return!1;if(o=JE.f(s,n)){if(o.get||o.set||!1===o.writable)return!1;o.value=r,KE.f(s,n,o)}else KE.f(s,n,$E(0,r))}else{if(void 0===(a=u.set))return!1;XE(a,s,r)}return!0}});var tS=Sn,nS=qf,rS=$f;rS&&Wo({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){tS(e),nS(t);try{return rS(e,t),!0}catch(_3){return!1}}});var oS=De,iS=Ae,aS=Qt("match"),sS=function(e){var t;return oS(e)&&(void 0!==(t=e[aS])?!!t:"RegExp"==iS(e))},uS=Sn,cS=function(){var e=uS(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},lS=oe,fS=Ot,hS=Ve,dS=cS,pS=RegExp.prototype,vS=function(e){var t=e.flags;return void 0!==t||"flags"in pS||fS(e,"flags")||!hS(pS,e)?t:lS(dS,e)},gS=$,mS=J.RegExp,yS=gS((function(){var e=mS("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),bS=yS||gS((function(){return!mS("a","y").sticky})),wS={BROKEN_CARET:yS||gS((function(){var e=mS("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:bS,UNSUPPORTED_Y:yS},AS=xn.f,xS=$,TS=J.RegExp,PS=xS((function(){var e=TS(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),CS=$,_S=J.RegExp,ES=CS((function(){var e=_S("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),SS=ee,kS=J,RS=me,OS=Io,MS=fy,FS=Wn,IS=Vr.f,DS=Ve,LS=sS,jS=ti,BS=vS,NS=wS,VS=function(e,t,n){n in e||AS(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},US=zn.exports,WS=$,zS=Ot,HS=Tr.enforce,GS=vp,XS=PS,QS=ES,YS=Qt("match"),qS=kS.RegExp,KS=qS.prototype,JS=kS.SyntaxError,ZS=RS(KS.exec),$S=RS("".charAt),ek=RS("".replace),tk=RS("".indexOf),nk=RS("".slice),rk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,ok=/a/g,ik=/a/g,ak=new qS(ok)!==ok,sk=NS.MISSED_STICKY,uk=NS.UNSUPPORTED_Y,ck=SS&&(!ak||sk||XS||QS||WS((function(){return ik[YS]=!1,qS(ok)!=ok||qS(ik)==ik||"/a/i"!=qS(ok,"i")})));if(OS("RegExp",ck)){for(var lk=function(e,t){var n,r,o,i,a,s,u=DS(KS,this),c=LS(e),l=void 0===t,f=[],h=e;if(!u&&c&&l&&e.constructor===lk)return e;if((c||DS(KS,e))&&(e=e.source,l&&(t=BS(h))),e=void 0===e?"":jS(e),t=void 0===t?"":jS(t),h=e,XS&&"dotAll"in ok&&(r=!!t&&tk(t,"s")>-1)&&(t=ek(t,/s/g,"")),n=t,sk&&"sticky"in ok&&(o=!!t&&tk(t,"y")>-1)&&uk&&(t=ek(t,/y/g,"")),QS&&(i=function(e){for(var t,n=e.length,r=0,o="",i=[],a={},s=!1,u=!1,c=0,l="";r<=n;r++){if("\\"===(t=$S(e,r)))t+=$S(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:ZS(rk,nk(e,r+1))&&(r+=2,u=!0),o+=t,c++;continue;case">"===t&&u:if(""===l||zS(a,l))throw new JS("Invalid capture group name");a[l]=!0,i[i.length]=[l,c],u=!1,l="";continue}u?l+=t:o+=t}return[o,i]}(e),e=i[0],f=i[1]),a=MS(qS(e,t),u?this:KS,lk),(r||o||f.length)&&(s=HS(a),r&&(s.dotAll=!0,s.raw=lk(function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=$S(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+$S(e,++r);return o}(e),n)),o&&(s.sticky=!0),f.length&&(s.groups=f)),e!==h)try{FS(a,"source",""===h?"(?:)":h)}catch(_3){}return a},fk=IS(qS),hk=0;fk.length>hk;)VS(lk,qS,fk[hk++]);KS.constructor=lk,lk.prototype=KS,US(kS,"RegExp",lk)}GS("RegExp");var dk=oe,pk=me,vk=ti,gk=cS,mk=wS,yk=yt.exports,bk=Ci,wk=Tr.get,Ak=PS,xk=ES,Tk=yk("native-string-replace",String.prototype.replace),Pk=RegExp.prototype.exec,Ck=Pk,_k=pk("".charAt),Ek=pk("".indexOf),Sk=pk("".replace),kk=pk("".slice),Rk=function(){var e=/a/,t=/b*/g;return dk(Pk,e,"a"),dk(Pk,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Ok=mk.BROKEN_CARET,Mk=void 0!==/()??/.exec("")[1];(Rk||Mk||Ok||Ak||xk)&&(Ck=function(e){var t,n,r,o,i,a,s,u=this,c=wk(u),l=vk(e),f=c.raw;if(f)return f.lastIndex=u.lastIndex,t=dk(Ck,f,l),u.lastIndex=f.lastIndex,t;var h=c.groups,d=Ok&&u.sticky,p=dk(gk,u),v=u.source,g=0,m=l;if(d&&(p=Sk(p,"y",""),-1===Ek(p,"g")&&(p+="g"),m=kk(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==_k(l,u.lastIndex-1))&&(v="(?: "+v+")",m=" "+m,g++),n=new RegExp("^(?:"+v+")",p)),Mk&&(n=new RegExp("^"+v+"$(?!\\s)",p)),Rk&&(r=u.lastIndex),o=dk(Pk,d?n:u,m),d?o?(o.input=kk(o.input,g),o[0]=kk(o[0],g),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:Rk&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),Mk&&o&&o.length>1&&dk(Tk,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&h)for(o.groups=a=bk(null),i=0;i<h.length;i++)a[(s=h[i])[0]]=o[s[1]];return o});var Fk=Ck;Wo({target:"RegExp",proto:!0,forced:/./.exec!==Fk},{exec:Fk});var Ik=ee,Dk=xn,Lk=cS,jk=$,Bk=RegExp.prototype;Ik&&jk((function(){return"sy"!==Object.getOwnPropertyDescriptor(Bk,"flags").get.call({dotAll:!0,sticky:!0})}))&&Dk.f(Bk,"flags",{configurable:!0,get:Lk});var Nk=kr.PROPER,Vk=zn.exports,Uk=Sn,Wk=ti,zk=$,Hk=vS,Gk="toString",Xk=RegExp.prototype.toString,Qk=zk((function(){return"/a/b"!=Xk.call({source:"a",flags:"b"})})),Yk=Nk&&Xk.name!=Gk;(Qk||Yk)&&Vk(RegExp.prototype,Gk,(function(){var e=Uk(this);return"/"+Wk(e.source)+"/"+Wk(Hk(e))}),{unsafe:!0}),_y("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Ny);var qk=me,Kk=zr,Jk=ti,Zk=ke,$k=qk("".charAt),eR=qk("".charCodeAt),tR=qk("".slice),nR=function(e){return function(t,n){var r,o,i=Jk(Zk(t)),a=Kk(n),s=i.length;return a<0||a>=s?e?"":void 0:(r=eR(i,a))<55296||r>56319||a+1===s||(o=eR(i,a+1))<56320||o>57343?e?$k(i,a):r:e?tR(i,a,a+2):o-56320+(r-55296<<10)+65536}},rR={codeAt:nR(!1),charAt:nR(!0)},oR=rR.codeAt;Wo({target:"String",proto:!0},{codePointAt:function(e){return oR(this,e)}});var iR,aR=sS,sR=J.TypeError,uR=function(e){if(aR(e))throw sR("The method doesn't accept regular expressions");return e},cR=Qt("match"),lR=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[cR]=!1,"/./"[e](t)}catch(r){}}return!1},fR=Wo,hR=me,dR=Z.f,pR=Kr,vR=ti,gR=uR,mR=ke,yR=lR,bR=hR("".endsWith),wR=hR("".slice),AR=Math.min,xR=yR("endsWith");fR({target:"String",proto:!0,forced:!!(xR||(iR=dR(String.prototype,"endsWith"),!iR||iR.writable))&&!xR},{endsWith:function(e){var t=vR(mR(this));gR(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=void 0===n?r:AR(pR(n),r),i=vR(e);return bR?bR(t,i,o):wR(t,o-i.length,o)===i}});var TR=Wo,PR=me,CR=Qr,_R=J.RangeError,ER=String.fromCharCode,SR=String.fromCodePoint,kR=PR([].join);TR({target:"String",stat:!0,forced:!!SR&&1!=SR.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],CR(t,1114111)!==t)throw _R(t+" is not a valid code point");n[o]=t<65536?ER(t):ER(55296+((t-=65536)>>10),t%1024+56320)}return kR(n,"")}});var RR=Wo,OR=uR,MR=ke,FR=ti,IR=lR,DR=me("".indexOf);RR({target:"String",proto:!0,forced:!IR("includes")},{includes:function(e){return!!~DR(FR(MR(this)),FR(OR(e)),arguments.length>1?arguments[1]:void 0)}});var LR=rR.charAt,jR=ti,BR=Tr,NR=wh,VR="String Iterator",UR=BR.set,WR=BR.getterFor(VR);NR(String,"String",(function(e){UR(this,{type:VR,string:jR(e),index:0})}),(function(){var e,t=WR(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=LR(n,r),t.index+=e.length,{value:e,done:!1})}));var zR=me,HR=zn.exports,GR=Fk,XR=$,QR=Qt,YR=Wn,qR=QR("species"),KR=RegExp.prototype,JR=function(e,t,n,r){var o=QR(e),i=!XR((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!XR((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[qR]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!a||n){var s=zR(/./[o]),u=t(o,""[e],(function(e,t,n,r,o){var a=zR(e),u=t.exec;return u===GR||u===KR.exec?i&&!o?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}}));HR(String.prototype,e,u[0]),HR(KR,o,u[1])}r&&YR(KR[o],"sham",!0)},ZR=rR.charAt,$R=function(e,t,n){return t+(n?ZR(e,t).length:1)},eO=oe,tO=Sn,nO=Fe,rO=Ae,oO=Fk,iO=J.TypeError,aO=function(e,t){var n=e.exec;if(nO(n)){var r=eO(n,e,t);return null!==r&&tO(r),r}if("RegExp"===rO(e))return eO(oO,e,t);throw iO("RegExp#exec called on incompatible receiver")},sO=oe,uO=Sn,cO=Kr,lO=ti,fO=ke,hO=ht,dO=$R,pO=aO;JR("match",(function(e,t,n){return[function(t){var n=fO(this),r=null==t?void 0:hO(t,e);return r?sO(r,t,n):new RegExp(t)[e](lO(n))},function(e){var r=uO(this),o=lO(e),i=n(t,r,o);if(i.done)return i.value;if(!r.global)return pO(r,o);var a=r.unicode;r.lastIndex=0;for(var s,u=[],c=0;null!==(s=pO(r,o));){var l=lO(s[0]);u[c]=l,""===l&&(r.lastIndex=dO(o,cO(r.lastIndex),a)),c++}return 0===c?null:u}]}));var vO=me,gO=Kr,mO=ti,yO=ke,bO=vO(gA),wO=vO("".slice),AO=Math.ceil,xO=function(e){return function(t,n,r){var o,i,a=mO(yO(t)),s=gO(n),u=a.length,c=void 0===r?" ":mO(r);return s<=u||""==c?a:((i=bO(c,AO((o=s-u)/c.length))).length>o&&(i=wO(i,0,o)),e?a+i:i+a)}},TO={start:xO(!1),end:xO(!0)},PO=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Ue),CO=TO.end;Wo({target:"String",proto:!0,forced:PO},{padEnd:function(e){return CO(this,e,arguments.length>1?arguments[1]:void 0)}});var _O=TO.start;Wo({target:"String",proto:!0,forced:PO},{padStart:function(e){return _O(this,e,arguments.length>1?arguments[1]:void 0)}});var EO=Wo,SO=me,kO=Me,RO=St,OO=ti,MO=Zr,FO=SO([].push),IO=SO([].join);EO({target:"String",stat:!0},{raw:function(e){for(var t=kO(RO(e).raw),n=MO(t),r=arguments.length,o=[],i=0;n>i;){if(FO(o,OO(t[i++])),i===n)return IO(o,"");i<r&&FO(o,OO(arguments[i]))}}}),Wo({target:"String",proto:!0},{repeat:gA});var DO=me,LO=St,jO=Math.floor,BO=DO("".charAt),NO=DO("".replace),VO=DO("".slice),UO=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,WO=/\$([$&'`]|\d{1,2})/g,zO=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,u=WO;return void 0!==o&&(o=LO(o),u=UO),NO(i,u,(function(i,u){var c;switch(BO(u,0)){case"$":return"$";case"&":return e;case"`":return VO(t,0,n);case"'":return VO(t,a);case"<":c=o[VO(u,1,-1)];break;default:var l=+u;if(0===l)return i;if(l>s){var f=jO(l/10);return 0===f?i:f<=s?void 0===r[f-1]?BO(u,1):r[f-1]+BO(u,1):i}c=r[l-1]}return void 0===c?"":c}))},HO=fu,GO=oe,XO=me,QO=JR,YO=$,qO=Sn,KO=Fe,JO=zr,ZO=Kr,$O=ti,eM=ke,tM=$R,nM=ht,rM=zO,oM=aO,iM=Qt("replace"),aM=Math.max,sM=Math.min,uM=XO([].concat),cM=XO([].push),lM=XO("".indexOf),fM=XO("".slice),hM="$0"==="a".replace(/./,"$0"),dM=!!/./[iM]&&""===/./[iM]("a","$0");QO("replace",(function(e,t,n){var r=dM?"$":"$0";return[function(e,n){var r=eM(this),o=null==e?void 0:nM(e,iM);return o?GO(o,e,r,n):GO(t,$O(r),e,n)},function(e,o){var i=qO(this),a=$O(e);if("string"==typeof o&&-1===lM(o,r)&&-1===lM(o,"$<")){var s=n(t,i,a,o);if(s.done)return s.value}var u=KO(o);u||(o=$O(o));var c=i.global;if(c){var l=i.unicode;i.lastIndex=0}for(var f=[];;){var h=oM(i,a);if(null===h)break;if(cM(f,h),!c)break;""===$O(h[0])&&(i.lastIndex=tM(a,ZO(i.lastIndex),l))}for(var d,p="",v=0,g=0;g<f.length;g++){for(var m=$O((h=f[g])[0]),y=aM(sM(JO(h.index),a.length),0),b=[],w=1;w<h.length;w++)cM(b,void 0===(d=h[w])?d:String(d));var A=h.groups;if(u){var x=uM([m],b,y,a);void 0!==A&&cM(x,A);var T=$O(HO(o,void 0,x))}else T=rM(m,a,y,b,A,o);y>=v&&(p+=fM(a,v,y)+T,v=y+m.length)}return p+fM(a,v)}]}),!!YO((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!hM||dM);var pM=oe,vM=Sn,gM=ke,mM=Wx,yM=ti,bM=ht,wM=aO;JR("search",(function(e,t,n){return[function(t){var n=gM(this),r=null==t?void 0:bM(t,e);return r?pM(r,t,n):new RegExp(t)[e](yM(n))},function(e){var r=vM(this),o=yM(e),i=n(t,r,o);if(i.done)return i.value;var a=r.lastIndex;mM(a,0)||(r.lastIndex=0);var s=wM(r,o);return mM(r.lastIndex,a)||(r.lastIndex=a),null===s?-1:s.index}]}));var AM=fu,xM=oe,TM=me,PM=JR,CM=sS,_M=Sn,EM=ke,SM=Vg,kM=$R,RM=Kr,OM=ti,MM=ht,FM=Li,IM=aO,DM=Fk,LM=$,jM=wS.UNSUPPORTED_Y,BM=4294967295,NM=Math.min,VM=[].push,UM=TM(/./.exec),WM=TM(VM),zM=TM("".slice),HM=!LM((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));PM("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=OM(EM(this)),o=void 0===n?BM:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!CM(e))return xM(t,r,e,o);for(var i,a,s,u=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,f=new RegExp(e.source,c+"g");(i=xM(DM,f,r))&&!((a=f.lastIndex)>l&&(WM(u,zM(r,l,i.index)),i.length>1&&i.index<r.length&&AM(VM,u,FM(i,1)),s=i[0].length,l=a,u.length>=o));)f.lastIndex===i.index&&f.lastIndex++;return l===r.length?!s&&UM(f,"")||WM(u,""):WM(u,zM(r,l)),u.length>o?FM(u,0,o):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:xM(t,this,e,n)}:t,[function(t,n){var o=EM(this),i=null==t?void 0:MM(t,e);return i?xM(i,t,o,n):xM(r,OM(o),t,n)},function(e,o){var i=_M(this),a=OM(e),s=n(r,i,a,o,r!==t);if(s.done)return s.value;var u=SM(i,RegExp),c=i.unicode,l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(jM?"g":"y"),f=new u(jM?"^(?:"+i.source+")":i,l),h=void 0===o?BM:o>>>0;if(0===h)return[];if(0===a.length)return null===IM(f,a)?[a]:[];for(var d=0,p=0,v=[];p<a.length;){f.lastIndex=jM?0:p;var g,m=IM(f,jM?zM(a,p):a);if(null===m||(g=NM(RM(f.lastIndex+(jM?p:0)),a.length))===d)p=kM(a,p,c);else{if(WM(v,zM(a,d,p)),v.length===h)return v;for(var y=1;y<=m.length-1;y++)if(WM(v,m[y]),v.length===h)return v;p=d=g}}return WM(v,zM(a,d)),v}]}),!HM,jM);var GM=Wo,XM=me,QM=Z.f,YM=Kr,qM=ti,KM=uR,JM=ke,ZM=lR,$M=XM("".startsWith),eF=XM("".slice),tF=Math.min,nF=ZM("startsWith"),rF=!nF&&!!function(){var e=QM(String.prototype,"startsWith");return e&&!e.writable}();GM({target:"String",proto:!0,forced:!rF&&!nF},{startsWith:function(e){var t=qM(JM(this));KM(e);var n=YM(tF(arguments.length>1?arguments[1]:void 0,t.length)),r=qM(e);return $M?$M(t,r,n):eF(t,n,n+r.length)===r}});var oF=kr.PROPER,iF=$,aF=Zb,sF=function(e){return iF((function(){return!!aF[e]()||"​…᠎"!=="​…᠎"[e]()||oF&&aF[e].name!==e}))},uF=aw.trim;Wo({target:"String",proto:!0,forced:sF("trim")},{trim:function(){return uF(this)}});var cF=aw.end,lF=sF("trimEnd")?function(){return cF(this)}:"".trimEnd;Wo({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==lF},{trimRight:lF});Wo({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==lF},{trimEnd:lF});var fF=aw.start,hF=sF("trimStart")?function(){return fF(this)}:"".trimStart;Wo({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==hF},{trimLeft:hF});Wo({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==hF},{trimStart:hF});var dF=ke,pF=ti,vF=/"/g,gF=me("".replace),mF=function(e,t,n,r){var o=pF(dF(e)),i="<"+t;return""!==n&&(i+=" "+n+'="'+gF(pF(r),vF,"&quot;")+'"'),i+">"+o+"</"+t+">"},yF=$,bF=function(e){return yF((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))},wF=mF;Wo({target:"String",proto:!0,forced:bF("anchor")},{anchor:function(e){return wF(this,"a","name",e)}});var AF=mF;Wo({target:"String",proto:!0,forced:bF("big")},{big:function(){return AF(this,"big","","")}});var xF=mF;Wo({target:"String",proto:!0,forced:bF("blink")},{blink:function(){return xF(this,"blink","","")}});var TF=mF;Wo({target:"String",proto:!0,forced:bF("bold")},{bold:function(){return TF(this,"b","","")}});var PF=mF;Wo({target:"String",proto:!0,forced:bF("fixed")},{fixed:function(){return PF(this,"tt","","")}});var CF=mF;Wo({target:"String",proto:!0,forced:bF("fontcolor")},{fontcolor:function(e){return CF(this,"font","color",e)}});var _F=mF;Wo({target:"String",proto:!0,forced:bF("fontsize")},{fontsize:function(e){return _F(this,"font","size",e)}});var EF=mF;Wo({target:"String",proto:!0,forced:bF("italics")},{italics:function(){return EF(this,"i","","")}});var SF=mF;Wo({target:"String",proto:!0,forced:bF("link")},{link:function(e){return SF(this,"a","href",e)}});var kF=mF;Wo({target:"String",proto:!0,forced:bF("small")},{small:function(){return kF(this,"small","","")}});var RF=mF;Wo({target:"String",proto:!0,forced:bF("strike")},{strike:function(){return RF(this,"strike","","")}});var OF=mF;Wo({target:"String",proto:!0,forced:bF("sub")},{sub:function(){return OF(this,"sub","","")}});var MF=mF;Wo({target:"String",proto:!0,forced:bF("sup")},{sup:function(){return MF(this,"sup","","")}});var FF={exports:{}},IF=J,DF=$,LF=of,jF=Mg.NATIVE_ARRAY_BUFFER_VIEWS,BF=IF.ArrayBuffer,NF=IF.Int8Array,VF=!jF||!DF((function(){NF(1)}))||!DF((function(){new NF(-1)}))||!LF((function(e){new NF,new NF(null),new NF(1.5),new NF(e)}),!0)||DF((function(){return 1!==new NF(new BF(2),1,void 0).length})),UF=zr,WF=J.RangeError,zF=function(e){var t=UF(e);if(t<0)throw WF("The argument can't be less than 0");return t},HF=J.RangeError,GF=function(e,t){var n=zF(e);if(n%t)throw HF("Wrong offset");return n},XF=sa,QF=oe,YF=Lg,qF=St,KF=Zr,JF=Ul,ZF=Il,$F=kl,eI=Mg.aTypedArrayConstructor,tI=function(e){var t,n,r,o,i,a,s=YF(this),u=qF(e),c=arguments.length,l=c>1?arguments[1]:void 0,f=void 0!==l,h=ZF(u);if(h&&!$F(h))for(a=(i=JF(u,h)).next,u=[];!(o=QF(a,i)).done;)u.push(o.value);for(f&&c>2&&(l=XF(l,arguments[2])),n=KF(u),r=new(eI(s))(n),t=0;n>t;t++)r[t]=f?l(u[t],t):u[t];return r},nI=Wo,rI=J,oI=oe,iI=ee,aI=VF,sI=Mg,uI=Qv,cI=Dp,lI=fe,fI=Wn,hI=Nw,dI=Kr,pI=Np,vI=GF,gI=an,mI=Ot,yI=Zo,bI=De,wI=ot,AI=Ci,xI=Ve,TI=$f,PI=Vr.f,CI=tI,_I=Na.forEach,EI=vp,SI=xn,kI=Z,RI=fy,OI=Tr.get,MI=Tr.set,FI=SI.f,II=kI.f,DI=Math.round,LI=rI.RangeError,jI=uI.ArrayBuffer,BI=jI.prototype,NI=uI.DataView,VI=sI.NATIVE_ARRAY_BUFFER_VIEWS,UI=sI.TYPED_ARRAY_CONSTRUCTOR,WI=sI.TYPED_ARRAY_TAG,zI=sI.TypedArray,HI=sI.TypedArrayPrototype,GI=sI.aTypedArrayConstructor,XI=sI.isTypedArray,QI="BYTES_PER_ELEMENT",YI="Wrong length",qI=function(e,t){GI(e);for(var n=0,r=t.length,o=new e(r);r>n;)o[n]=t[n++];return o},KI=function(e,t){FI(e,t,{get:function(){return OI(this)[t]}})},JI=function(e){var t;return xI(BI,e)||"ArrayBuffer"==(t=yI(e))||"SharedArrayBuffer"==t},ZI=function(e,t){return XI(e)&&!wI(t)&&t in e&&hI(+t)&&t>=0},$I=function(e,t){return t=gI(t),ZI(e,t)?lI(2,e[t]):II(e,t)},eD=function(e,t,n){return t=gI(t),!(ZI(e,t)&&bI(n)&&mI(n,"value"))||mI(n,"get")||mI(n,"set")||n.configurable||mI(n,"writable")&&!n.writable||mI(n,"enumerable")&&!n.enumerable?FI(e,t,n):(e[t]=n.value,e)};iI?(VI||(kI.f=$I,SI.f=eD,KI(HI,"buffer"),KI(HI,"byteOffset"),KI(HI,"byteLength"),KI(HI,"length")),nI({target:"Object",stat:!0,forced:!VI},{getOwnPropertyDescriptor:$I,defineProperty:eD}),FF.exports=function(e,t,n){var r=e.match(/\d+$/)[0]/8,o=e+(n?"Clamped":"")+"Array",i="get"+e,a="set"+e,s=rI[o],u=s,c=u&&u.prototype,l={},f=function(e,t){FI(e,t,{get:function(){return function(e,t){var n=OI(e);return n.view[i](t*r+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var i=OI(e);n&&(o=(o=DI(o))<0?0:o>255?255:255&o),i.view[a](t*r+i.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};VI?aI&&(u=t((function(e,t,n,o){return cI(e,c),RI(bI(t)?JI(t)?void 0!==o?new s(t,vI(n,r),o):void 0!==n?new s(t,vI(n,r)):new s(t):XI(t)?qI(u,t):oI(CI,u,t):new s(pI(t)),e,u)})),TI&&TI(u,zI),_I(PI(s),(function(e){e in u||fI(u,e,s[e])})),u.prototype=c):(u=t((function(e,t,n,o){cI(e,c);var i,a,s,l=0,h=0;if(bI(t)){if(!JI(t))return XI(t)?qI(u,t):oI(CI,u,t);i=t,h=vI(n,r);var d=t.byteLength;if(void 0===o){if(d%r)throw LI(YI);if((a=d-h)<0)throw LI(YI)}else if((a=dI(o)*r)+h>d)throw LI(YI);s=a/r}else s=pI(t),i=new jI(a=s*r);for(MI(e,{buffer:i,byteOffset:h,byteLength:a,length:s,view:new NI(i)});l<s;)f(e,l++)})),TI&&TI(u,zI),c=u.prototype=AI(HI)),c.constructor!==u&&fI(c,"constructor",u),fI(c,UI,u),WI&&fI(c,WI,o),l[o]=u,nI({global:!0,forced:u!=s,sham:!VI},l),QI in u||fI(u,QI,r),QI in c||fI(c,QI,r),EI(o)}):FF.exports=function(){},(0,FF.exports)("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,FF.exports)("Float64",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,FF.exports)("Int8",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,FF.exports)("Int16",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,FF.exports)("Int32",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,FF.exports)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,FF.exports)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0),(0,FF.exports)("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,FF.exports)("Uint32",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var tD=Mg,nD=me(Dc),rD=tD.aTypedArray;(0,tD.exportTypedArrayMethod)("copyWithin",(function(e,t){return nD(rD(this),e,t,arguments.length>2?arguments[2]:void 0)}));var oD=Na.every,iD=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("every",(function(e){return oD(iD(this),e,arguments.length>1?arguments[1]:void 0)}));var aD=oe,sD=Gc,uD=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return aD(sD,uD(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}));var cD=Zr,lD=Vg,fD=Mg.TYPED_ARRAY_CONSTRUCTOR,hD=Mg.aTypedArrayConstructor,dD=function(e){return hD(lD(e,e[fD]))},pD=function(e,t){for(var n=0,r=cD(t),o=new e(r);r>n;)o[n]=t[n++];return o},vD=dD,gD=Na.filter,mD=function(e,t){return pD(vD(e),t)},yD=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("filter",(function(e){var t=gD(yD(this),e,arguments.length>1?arguments[1]:void 0);return mD(this,t)}));var bD=Na.find,wD=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("find",(function(e){return bD(wD(this),e,arguments.length>1?arguments[1]:void 0)}));var AD=Na.findIndex,xD=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("findIndex",(function(e){return AD(xD(this),e,arguments.length>1?arguments[1]:void 0)}));var TD=Na.forEach,PD=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("forEach",(function(e){TD(PD(this),e,arguments.length>1?arguments[1]:void 0)})),(0,Mg.exportTypedArrayStaticMethod)("from",tI,VF);var CD=ro.includes,_D=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("includes",(function(e){return CD(_D(this),e,arguments.length>1?arguments[1]:void 0)}));var ED=ro.indexOf,SD=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("indexOf",(function(e){return ED(SD(this),e,arguments.length>1?arguments[1]:void 0)}));var kD=J,RD=$,OD=me,MD=Mg,FD=Oh,ID=Qt("iterator"),DD=kD.Uint8Array,LD=OD(FD.values),jD=OD(FD.keys),BD=OD(FD.entries),ND=MD.aTypedArray,VD=MD.exportTypedArrayMethod,UD=DD&&DD.prototype,WD=!RD((function(){UD[ID].call([1])})),zD=!!UD&&UD.values&&UD[ID]===UD.values&&"values"===UD.values.name,HD=function(){return LD(ND(this))};VD("entries",(function(){return BD(ND(this))}),WD),VD("keys",(function(){return jD(ND(this))}),WD),VD("values",HD,WD||!zD,{name:"values"}),VD(ID,HD,WD||!zD,{name:"values"});var GD=Mg.aTypedArray,XD=Mg.exportTypedArrayMethod,QD=me([].join);XD("join",(function(e){return QD(GD(this),e)}));var YD=fu,qD=qh,KD=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return YD(qD,KD(this),t>1?[e,arguments[1]]:[e])}));var JD=Na.map,ZD=dD,$D=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("map",(function(e){return JD($D(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(ZD(e))(t)}))}));var eL=Mg.aTypedArrayConstructor;(0,Mg.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(eL(this))(t);t>e;)n[e]=arguments[e++];return n}),VF);var tL=ud.left,nL=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return tL(nL(this),e,t,t>1?arguments[1]:void 0)}));var rL=ud.right,oL=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return rL(oL(this),e,t,t>1?arguments[1]:void 0)}));var iL=Mg.aTypedArray,aL=Mg.exportTypedArrayMethod,sL=Math.floor;aL("reverse",(function(){for(var e,t=this,n=iL(t).length,r=sL(n/2),o=0;o<r;)e=t[o],t[o++]=t[--n],t[n]=e;return t}));var uL=J,cL=oe,lL=Mg,fL=Zr,hL=GF,dL=St,pL=$,vL=uL.RangeError,gL=uL.Int8Array,mL=gL&&gL.prototype,yL=mL&&mL.set,bL=lL.aTypedArray,wL=lL.exportTypedArrayMethod,AL=!pL((function(){var e=new Uint8ClampedArray(2);return cL(yL,e,{length:1,0:3},1),3!==e[1]})),xL=AL&&lL.NATIVE_ARRAY_BUFFER_VIEWS&&pL((function(){var e=new gL(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));wL("set",(function(e){bL(this);var t=hL(arguments.length>1?arguments[1]:void 0,1),n=dL(e);if(AL)return cL(yL,this,n,t);var r=this.length,o=fL(n),i=0;if(o+t>r)throw vL("Wrong length");for(;i<o;)this[t+i]=n[i++]}),!AL||xL);var TL=dD,PL=hu,CL=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("slice",(function(e,t){for(var n=PL(CL(this),e,t),r=TL(this),o=0,i=n.length,a=new r(i);i>o;)a[o]=n[o++];return a}),$((function(){new Int8Array(1).slice()})));var _L=Na.some,EL=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("some",(function(e){return _L(EL(this),e,arguments.length>1?arguments[1]:void 0)}));var SL=me,kL=$,RL=lt,OL=Nd,ML=Ud,FL=Wd,IL=Ye,DL=Hd,LL=Mg.aTypedArray,jL=Mg.exportTypedArrayMethod,BL=J.Uint16Array,NL=BL&&SL(BL.prototype.sort),VL=!(!NL||kL((function(){NL(new BL(2),null)}))&&kL((function(){NL(new BL(2),{})}))),UL=!!NL&&!kL((function(){if(IL)return IL<74;if(ML)return ML<67;if(FL)return!0;if(DL)return DL<602;var e,t,n=new BL(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(NL(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));jL("sort",(function(e){return void 0!==e&&RL(e),UL?NL(this,e):OL(LL(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!UL||VL);var WL=Kr,zL=Qr,HL=dD,GL=Mg.aTypedArray;(0,Mg.exportTypedArrayMethod)("subarray",(function(e,t){var n=GL(this),r=n.length,o=zL(e,r);return new(HL(n))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,WL((void 0===t?r:zL(t,r))-o))}));var XL=fu,QL=Mg,YL=$,qL=hu,KL=J.Int8Array,JL=QL.aTypedArray,ZL=QL.exportTypedArrayMethod,$L=[].toLocaleString,ej=!!KL&&YL((function(){$L.call(new KL(1))}));ZL("toLocaleString",(function(){return XL($L,ej?qL(JL(this)):JL(this),qL(arguments))}),YL((function(){return[1,2].toLocaleString()!=new KL([1,2]).toLocaleString()}))||!YL((function(){KL.prototype.toLocaleString.call([1,2])})));var tj=Mg.exportTypedArrayMethod,nj=$,rj=me,oj=J.Uint8Array,ij=oj&&oj.prototype||{},aj=[].toString,sj=rj([].join);nj((function(){aj.call({})}))&&(aj=function(){return sj(this)});var uj=ij.toString!=aj;tj("toString",aj,uj);var cj=me,lj=Mp,fj=Pm.exports.getWeakData,hj=Sn,dj=De,pj=Dp,vj=sy,gj=Ot,mj=Tr.set,yj=Tr.getterFor,bj=Na.find,wj=Na.findIndex,Aj=cj([].splice),xj=0,Tj=function(e){return e.frozen||(e.frozen=new Pj)},Pj=function(){this.entries=[]},Cj=function(e,t){return bj(e.entries,(function(e){return e[0]===t}))};Pj.prototype={get:function(e){var t=Cj(this,e);if(t)return t[1]},has:function(e){return!!Cj(this,e)},set:function(e,t){var n=Cj(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=wj(this.entries,(function(t){return t[0]===e}));return~t&&Aj(this.entries,t,1),!!~t}};var _j,Ej={getConstructor:function(e,t,n,r){var o=e((function(e,o){pj(e,i),mj(e,{type:t,id:xj++,frozen:void 0}),null!=o&&vj(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=yj(t),s=function(e,t,n){var r=a(e),o=fj(hj(t),!0);return!0===o?Tj(r).set(t,n):o[r.id]=n,e};return lj(i,{delete:function(e){var t=a(this);if(!dj(e))return!1;var n=fj(e);return!0===n?Tj(t).delete(e):n&&gj(n,t.id)&&delete n[t.id]},has:function(e){var t=a(this);if(!dj(e))return!1;var n=fj(e);return!0===n?Tj(t).has(e):n&&gj(n,t.id)}}),lj(i,n?{get:function(e){var t=a(this);if(dj(e)){var n=fj(e);return!0===n?Tj(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),o}},Sj=J,kj=me,Rj=Mp,Oj=Pm.exports,Mj=_y,Fj=Ej,Ij=De,Dj=Om,Lj=Tr.enforce,jj=er,Bj=!Sj.ActiveXObject&&"ActiveXObject"in Sj,Nj=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Vj=Mj("WeakMap",Nj,Fj);if(jj&&Bj){_j=Fj.getConstructor(Nj,"WeakMap",!0),Oj.enable();var Uj=Vj.prototype,Wj=kj(Uj.delete),zj=kj(Uj.has),Hj=kj(Uj.get),Gj=kj(Uj.set);Rj(Uj,{delete:function(e){if(Ij(e)&&!Dj(e)){var t=Lj(this);return t.frozen||(t.frozen=new _j),Wj(this,e)||t.frozen.delete(e)}return Wj(this,e)},has:function(e){if(Ij(e)&&!Dj(e)){var t=Lj(this);return t.frozen||(t.frozen=new _j),zj(this,e)||t.frozen.has(e)}return zj(this,e)},get:function(e){if(Ij(e)&&!Dj(e)){var t=Lj(this);return t.frozen||(t.frozen=new _j),zj(this,e)?Hj(this,e):t.frozen.get(e)}return Hj(this,e)},set:function(e,t){if(Ij(e)&&!Dj(e)){var n=Lj(this);n.frozen||(n.frozen=new _j),zj(this,e)?Gj(this,e,t):n.frozen.set(e,t)}else Gj(this,e,t);return this}})}_y("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Ej);var Xj=Error,Qj=me("".replace),Yj=String(Xj("zxcasd").stack),qj=/\n\s*at [^:]*:[^\n]*/,Kj=qj.test(Yj),Jj=De,Zj=Wn,$j=ti,eB=fe,tB=!$((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",eB(1,7)),7!==e.stack)})),nB=Wo,rB=J,oB=Ve,iB=kf,aB=$f,sB=Co,uB=Ci,cB=Wn,lB=fe,fB=function(e,t){if(Kj&&"string"==typeof e&&!Xj.prepareStackTrace)for(;t--;)e=Qj(e,qj,"");return e},hB=function(e,t){Jj(t)&&"cause"in t&&Zj(e,"cause",t.cause)},dB=sy,pB=function(e,t){return void 0===e?arguments.length<2?"":t:$j(e)},vB=tB,gB=Qt("toStringTag"),mB=rB.Error,yB=[].push,bB=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,o=oB(wB,this);aB?n=aB(new mB,o?iB(this):wB):(n=o?this:uB(wB),cB(n,gB,"Error")),void 0!==t&&cB(n,"message",pB(t)),vB&&cB(n,"stack",fB(n.stack,1)),hB(n,r);var i=[];return dB(e,yB,{that:i}),cB(n,"errors",i),n};aB?aB(bB,mB):sB(bB,mB,{name:!0});var wB=bB.prototype=uB(mB.prototype,{constructor:lB(1,bB),message:lB(1,""),name:lB(1,"AggregateError")});nB({global:!0},{AggregateError:bB});var AB=ee,xB=Vc,TB=St,PB=Zr,CB=xn.f;AB&&(CB(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=TB(this),t=PB(e);return 0==t?0:t-1}}),xB("lastIndex"));var _B=ee,EB=Vc,SB=St,kB=Zr,RB=xn.f;_B&&(RB(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=SB(this),t=kB(e);return 0==t?void 0:e[t-1]},set:function(e){var t=SB(this),n=kB(t);return t[0==n?0:n-1]=e}}),EB("lastItem"));var OB=J,MB=Ne,FB=Ci,IB=De,DB=OB.Object,LB=OB.TypeError,jB=MB("Map"),BB=MB("WeakMap"),NB=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=FB(null)};NB.prototype.get=function(e,t){return this[e]||(this[e]=t())},NB.prototype.next=function(e,t,n){var r=n?this.objectsByIndex[e]||(this.objectsByIndex[e]=new BB):this.primitives||(this.primitives=new jB),o=r.get(t);return o||r.set(t,o=new NB),o};var VB=new NB,UB=function(){var e,t,n=VB,r=arguments.length;for(e=0;e<r;e++)IB(t=arguments[e])&&(n=n.next(e,t,!0));if(this===DB&&n===VB)throw LB("Composite keys must contain a non-primitive component");for(e=0;e<r;e++)IB(t=arguments[e])||(n=n.next(e,t,!1));return n},WB=Wo,zB=fu,HB=UB,GB=Ne,XB=Ci,QB=J.Object,YB=function(){var e=GB("Object","freeze");return e?e(XB(null)):XB(null)};WB({global:!0,forced:!0},{compositeKey:function(){return zB(HB,QB,arguments).get("object",YB)}});var qB=UB,KB=Ne,JB=fu;Wo({global:!0,forced:!0},{compositeSymbol:function(){return 1==arguments.length&&"string"==typeof arguments[0]?KB("Symbol").for(arguments[0]):JB(qB,null,arguments).get("symbol",KB("Symbol"))}}),Wo({global:!0},{globalThis:J});var ZB=oe,$B=lt,eN=Sn,tN=function(){for(var e,t=eN(this),n=$B(t.delete),r=!0,o=0,i=arguments.length;o<i;o++)e=ZB(n,t,arguments[o]),r=r&&e;return!!r};Wo({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:tN});var nN=oe,rN=function(e){return nN(Map.prototype.entries,e)},oN=Sn,iN=sa,aN=rN,sN=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=oN(this),n=aN(t),r=iN(e,arguments.length>1?arguments[1]:void 0);return!sN(n,(function(e,n,o){if(!r(n,e,t))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var uN=Ne,cN=sa,lN=oe,fN=lt,hN=Sn,dN=Vg,pN=rN,vN=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=hN(this),n=pN(t),r=cN(e,arguments.length>1?arguments[1]:void 0),o=new(dN(t,uN("Map"))),i=fN(o.set);return vN(n,(function(e,n){r(n,e,t)&&lN(i,o,e,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}});var gN=Sn,mN=sa,yN=rN,bN=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=gN(this),n=yN(t),r=mN(e,arguments.length>1?arguments[1]:void 0);return bN(n,(function(e,n,o){if(r(n,e,t))return o(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var wN=Sn,AN=sa,xN=rN,TN=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=wN(this),n=xN(t),r=AN(e,arguments.length>1?arguments[1]:void 0);return TN(n,(function(e,n,o){if(r(n,e,t))return o(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var PN=sa,CN=oe,_N=lt,EN=Lg,SN=sy,kN=[].push,RN=function(e){var t,n,r,o,i=arguments.length,a=i>1?arguments[1]:void 0;return EN(this),(t=void 0!==a)&&_N(a),null==e?new this:(n=[],t?(r=0,o=PN(a,i>2?arguments[2]:void 0),SN(e,(function(e){CN(kN,n,o(e,r++))}))):SN(e,kN,{that:n}),new this(n))};Wo({target:"Map",stat:!0,forced:!0},{from:RN});var ON=Wo,MN=oe,FN=lt,IN=Ul,DN=sy,LN=me([].push);ON({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){FN(t);var n=IN(e),r=new this,o=FN(r.has),i=FN(r.get),a=FN(r.set);return DN(n,(function(e){var n=t(e);MN(o,r,n)?LN(MN(i,r,n),e):MN(a,r,n,[e])}),{IS_ITERATOR:!0}),r}});var jN=Sn,BN=rN,NN=function(e,t){return e===t||e!=e&&t!=t},VN=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return VN(BN(jN(this)),(function(t,n,r){if(NN(n,e))return r()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var UN=oe,WN=sy,zN=lt;Wo({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new this;zN(t);var r=zN(n.set);return WN(e,(function(e){UN(r,n,t(e),e)})),n}});var HN=Sn,GN=rN,XN=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){return XN(GN(HN(this)),(function(t,n,r){if(n===e)return r(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var QN=Ne,YN=sa,qN=oe,KN=lt,JN=Sn,ZN=Vg,$N=rN,eV=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=JN(this),n=$N(t),r=YN(e,arguments.length>1?arguments[1]:void 0),o=new(ZN(t,QN("Map"))),i=KN(o.set);return eV(n,(function(e,n){qN(i,o,r(n,e,t),n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}});var tV=Ne,nV=sa,rV=oe,oV=lt,iV=Sn,aV=Vg,sV=rN,uV=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=iV(this),n=sV(t),r=nV(e,arguments.length>1?arguments[1]:void 0),o=new(aV(t,tV("Map"))),i=oV(o.set);return uV(n,(function(e,n){rV(i,o,e,r(n,e,t))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}});var cV=lt,lV=Sn,fV=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{merge:function(e){for(var t=lV(this),n=cV(t.set),r=arguments.length,o=0;o<r;)fV(arguments[o++],n,{that:t,AS_ENTRIES:!0});return t}});var hV=hu,dV=function(){return new this(hV(arguments))};Wo({target:"Map",stat:!0,forced:!0},{of:dV});var pV=Wo,vV=Sn,gV=lt,mV=rN,yV=sy,bV=J.TypeError;pV({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=vV(this),n=mV(t),r=arguments.length<2,o=r?void 0:arguments[1];if(gV(e),yV(n,(function(n,i){r?(r=!1,o=i):o=e(o,i,n,t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r)throw bV("Reduce of empty map with no initial value");return o}});var wV=Sn,AV=sa,xV=rN,TV=sy;Wo({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=wV(this),n=xV(t),r=AV(e,arguments.length>1?arguments[1]:void 0);return TV(n,(function(e,n,o){if(r(n,e,t))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var PV=Wo,CV=oe,_V=Sn,EV=lt,SV=J.TypeError;PV({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=_V(this),r=EV(n.get),o=EV(n.has),i=EV(n.set),a=arguments.length;EV(t);var s=CV(o,n,e);if(!s&&a<3)throw SV("Updating absent value");var u=s?CV(r,n,e):EV(a>2?arguments[2]:void 0)(e,n);return CV(i,n,e,t(u,e,n)),n}});var kV=Wo,RV=Math.min,OV=Math.max;kV({target:"Math",stat:!0,forced:!0},{clamp:function(e,t,n){return RV(n,OV(t,e))}}),Wo({target:"Math",stat:!0,forced:!0},{DEG_PER_RAD:Math.PI/180});var MV=Wo,FV=180/Math.PI;MV({target:"Math",stat:!0,forced:!0},{degrees:function(e){return e*FV}});var IV=Math.scale||function(e,t,n,r,o){var i=+e,a=+t,s=+n,u=+r,c=+o;return i!=i||a!=a||s!=s||u!=u||c!=c?NaN:i===1/0||i===-1/0?i:(i-a)*(c-u)/(s-a)+u},DV=IV,LV=_b;Wo({target:"Math",stat:!0,forced:!0},{fscale:function(e,t,n,r,o){return LV(DV(e,t,n,r,o))}}),Wo({target:"Math",stat:!0,forced:!0},{iaddh:function(e,t,n,r){var o=e>>>0,i=n>>>0;return(t>>>0)+(r>>>0)+((o&i|(o|i)&~(o+i>>>0))>>>31)|0}}),Wo({target:"Math",stat:!0,forced:!0},{imulh:function(e,t){var n=65535,r=+e,o=+t,i=r&n,a=o&n,s=r>>16,u=o>>16,c=(s*a>>>0)+(i*a>>>16);return s*u+(c>>16)+((i*u>>>0)+(c&n)>>16)}}),Wo({target:"Math",stat:!0,forced:!0},{isubh:function(e,t,n,r){var o=e>>>0,i=n>>>0;return(t>>>0)-(r>>>0)-((~o&i|~(o^i)&o-i>>>0)>>>31)|0}}),Wo({target:"Math",stat:!0,forced:!0},{RAD_PER_DEG:180/Math.PI});var jV=Wo,BV=Math.PI/180;jV({target:"Math",stat:!0,forced:!0},{radians:function(e){return e*BV}}),Wo({target:"Math",stat:!0,forced:!0},{scale:IV});var NV=Wo,VV=J,UV=Sn,WV=Lw,zV=Hf,HV=Tr,GV="Seeded Random",XV="Seeded Random Generator",QV=HV.set,YV=HV.getterFor(XV),qV=VV.TypeError,KV=zV((function(e){QV(this,{type:XV,seed:e%2147483647})}),GV,(function(){var e=YV(this);return{value:(1073741823&(e.seed=(1103515245*e.seed+12345)%2147483647))/1073741823,done:!1}}));NV({target:"Math",stat:!0,forced:!0},{seededPRNG:function(e){var t=UV(e).seed;if(!WV(t))throw qV('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new KV(t)}}),Wo({target:"Math",stat:!0,forced:!0},{signbit:function(e){return(e=+e)==e&&0==e?1/e==-1/0:e<0}}),Wo({target:"Math",stat:!0,forced:!0},{umulh:function(e,t){var n=65535,r=+e,o=+t,i=r&n,a=o&n,s=r>>>16,u=o>>>16,c=(s*a>>>0)+(i*a>>>16);return s*u+(c>>>16)+((i*u>>>0)+(c&n)>>>16)}});var JV=Wo,ZV=J,$V=me,eU=zr,tU=lA,nU="Invalid number representation",rU=ZV.RangeError,oU=ZV.SyntaxError,iU=ZV.TypeError,aU=/^[\da-z]+$/,sU=$V("".charAt),uU=$V(aU.exec),cU=$V(1..toString),lU=$V("".slice);JV({target:"Number",stat:!0,forced:!0},{fromString:function(e,t){var n,r,o=1;if("string"!=typeof e)throw iU(nU);if(!e.length)throw oU(nU);if("-"==sU(e,0)&&(o=-1,!(e=lU(e,1)).length))throw oU(nU);if((n=void 0===t?10:eU(t))<2||n>36)throw rU("Invalid radix");if(!uU(aU,e)||cU(r=tU(e,n),n)!==e)throw oU(nU);return o*r}});var fU=J,hU=Fe,dU=Qt("observable"),pU=fU.Observable,vU=pU&&pU.prototype,gU=!(hU(pU)&&hU(pU.from)&&hU(pU.of)&&hU(vU.subscribe)&&hU(vU[dU])),mU=Wo,yU=oe,bU=ee,wU=vp,AU=lt,xU=Fe,TU=Sn,PU=De,CU=Dp,_U=ht,EU=xn.f,SU=zn.exports,kU=Mp,RU=zP,OU=Tr,MU=gU,FU=Qt("observable"),IU="Observable",DU="Subscription",LU="SubscriptionObserver",jU=OU.getterFor,BU=OU.set,NU=jU(IU),VU=jU(DU),UU=jU(LU),WU=function(e){this.observer=TU(e),this.cleanup=void 0,this.subscriptionObserver=void 0};WU.prototype={type:DU,clean:function(){var e=this.cleanup;if(e){this.cleanup=void 0;try{e()}catch(_3){RU(_3)}}},close:function(){if(!bU){var e=this.facade,t=this.subscriptionObserver;e.closed=!0,t&&(t.closed=!0)}this.observer=void 0},isClosed:function(){return void 0===this.observer}};var zU=function(e,t){var n,r=BU(this,new WU(e));bU||(this.closed=!1);try{(n=_U(e,"start"))&&yU(n,e,this)}catch(_3){RU(_3)}if(!r.isClosed()){var o=r.subscriptionObserver=new HU(r);try{var i=t(o),a=i;null!=i&&(r.cleanup=xU(i.unsubscribe)?function(){a.unsubscribe()}:AU(i))}catch(_3){return void o.error(_3)}r.isClosed()&&r.clean()}};zU.prototype=kU({},{unsubscribe:function(){var e=VU(this);e.isClosed()||(e.close(),e.clean())}}),bU&&EU(zU.prototype,"closed",{configurable:!0,get:function(){return VU(this).isClosed()}});var HU=function(e){BU(this,{type:LU,subscriptionState:e}),bU||(this.closed=!1)};HU.prototype=kU({},{next:function(e){var t=UU(this).subscriptionState;if(!t.isClosed()){var n=t.observer;try{var r=_U(n,"next");r&&yU(r,n,e)}catch(_3){RU(_3)}}},error:function(e){var t=UU(this).subscriptionState;if(!t.isClosed()){var n=t.observer;t.close();try{var r=_U(n,"error");r?yU(r,n,e):RU(e)}catch(o){RU(o)}t.clean()}},complete:function(){var e=UU(this).subscriptionState;if(!e.isClosed()){var t=e.observer;e.close();try{var n=_U(t,"complete");n&&yU(n,t)}catch(_3){RU(_3)}e.clean()}}}),bU&&EU(HU.prototype,"closed",{configurable:!0,get:function(){return UU(this).subscriptionState.isClosed()}});var GU=function(e){CU(this,XU),BU(this,{type:IU,subscriber:AU(e)})},XU=GU.prototype;kU(XU,{subscribe:function(e){var t=arguments.length;return new zU(xU(e)?{next:e,error:t>1?arguments[1]:void 0,complete:t>2?arguments[2]:void 0}:PU(e)?e:{},NU(this).subscriber)}}),SU(XU,FU,(function(){return this})),mU({global:!0,forced:MU},{Observable:GU}),wU(IU);var QU=Wo,YU=Ne,qU=oe,KU=Sn,JU=Ta,ZU=Ul,$U=ht,eW=sy,tW=gU,nW=Qt("observable");QU({target:"Observable",stat:!0,forced:tW},{from:function(e){var t=JU(this)?this:YU("Observable"),n=$U(KU(e),nW);if(n){var r=KU(qU(n,e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}var o=ZU(e);return new t((function(e){eW(o,(function(t,n){if(e.next(t),e.closed)return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}),e.complete()}))}});var rW=Wo,oW=Ne,iW=Ta,aW=gU,sW=oW("Array");rW({target:"Observable",stat:!0,forced:aW},{of:function(){for(var e=iW(this)?this:oW("Observable"),t=arguments.length,n=sW(t),r=0;r<t;)n[r]=arguments[r++];return new e((function(e){for(var r=0;r<t;r++)if(e.next(n[r]),e.closed)return;e.complete()}))}});var uW=oe,cW=lt,lW=uC,fW=HP,hW=sy;Wo({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=lW.f(t),r=n.resolve,o=n.reject,i=fW((function(){var n=cW(t.resolve),o=[],i=0,a=1;hW(e,(function(e){var s=i++,u=!1;a++,uW(n,t,e).then((function(e){u||(u=!0,o[s]={status:"fulfilled",value:e},--a||r(o))}),(function(e){u||(u=!0,o[s]={status:"rejected",reason:e},--a||r(o))}))})),--a||r(o)}));return i.error&&o(i.value),n.promise}});var dW=oe,pW=lt,vW=Ne,gW=uC,mW=HP,yW=sy,bW="No one promise resolved";Wo({target:"Promise",stat:!0},{any:function(e){var t=this,n=vW("AggregateError"),r=gW.f(t),o=r.resolve,i=r.reject,a=mW((function(){var r=pW(t.resolve),a=[],s=0,u=1,c=!1;yW(e,(function(e){var l=s++,f=!1;u++,dW(r,t,e).then((function(e){f||c||(c=!0,o(e))}),(function(e){f||c||(f=!0,a[l]=e,--u||i(new n(a,bW)))}))})),--u||i(new n(a,bW))}));return a.error&&i(a.value),r.promise}});var wW=uC,AW=HP;Wo({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=wW.f(this),n=AW(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var xW=Ne,TW=me,PW=yt.exports,CW=xW("Map"),_W=xW("WeakMap"),EW=TW([].push),SW=PW("metadata"),kW=SW.store||(SW.store=new _W),RW=function(e,t,n){var r=kW.get(e);if(!r){if(!n)return;kW.set(e,r=new CW)}var o=r.get(t);if(!o){if(!n)return;r.set(t,o=new CW)}return o},OW={store:kW,getMap:RW,has:function(e,t,n){var r=RW(t,n,!1);return void 0!==r&&r.has(e)},get:function(e,t,n){var r=RW(t,n,!1);return void 0===r?void 0:r.get(e)},set:function(e,t,n,r){RW(n,r,!0).set(e,t)},keys:function(e,t){var n=RW(e,t,!1),r=[];return n&&n.forEach((function(e,t){EW(r,t)})),r},toKey:function(e){return void 0===e||"symbol"==S(e)?e:String(e)}},MW=Sn,FW=OW.toKey,IW=OW.set;Wo({target:"Reflect",stat:!0},{defineMetadata:function(e,t,n){var r=arguments.length<4?void 0:FW(arguments[3]);IW(e,t,MW(n),r)}});var DW=Sn,LW=OW.toKey,jW=OW.getMap,BW=OW.store;Wo({target:"Reflect",stat:!0},{deleteMetadata:function(e,t){var n=arguments.length<3?void 0:LW(arguments[2]),r=jW(DW(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var o=BW.get(t);return o.delete(n),!!o.size||BW.delete(t)}});var NW=Sn,VW=kf,UW=OW.has,WW=OW.get,zW=OW.toKey,HW=function e(t,n,r){if(UW(t,n,r))return WW(t,n,r);var o=VW(n);return null!==o?e(t,o,r):void 0};Wo({target:"Reflect",stat:!0},{getMetadata:function(e,t){var n=arguments.length<3?void 0:zW(arguments[2]);return HW(e,NW(t),n)}});var GW=me,XW=lt,QW=Zr,YW=St,qW=Oa,KW=Ne("Map"),JW=KW.prototype,ZW=GW(JW.forEach),$W=GW(JW.has),ez=GW(JW.set),tz=GW([].push),nz=Wo,rz=me,oz=OW,iz=Sn,az=kf,sz=function(e){var t,n,r,o=YW(this),i=QW(o),a=qW(o,0),s=new KW,u=null!=e?XW(e):function(e){return e};for(t=0;t<i;t++)r=u(n=o[t]),$W(s,r)||ez(s,r,n);return ZW(s,(function(e){tz(a,e)})),a},uz=rz(sz),cz=rz([].concat),lz=oz.keys,fz=oz.toKey,hz=function e(t,n){var r=lz(t,n),o=az(t);if(null===o)return r;var i=e(o,n);return i.length?r.length?uz(cz(r,i)):i:r};nz({target:"Reflect",stat:!0},{getMetadataKeys:function(e){var t=arguments.length<2?void 0:fz(arguments[1]);return hz(iz(e),t)}});var dz=Sn,pz=OW.get,vz=OW.toKey;Wo({target:"Reflect",stat:!0},{getOwnMetadata:function(e,t){var n=arguments.length<3?void 0:vz(arguments[2]);return pz(e,dz(t),n)}});var gz=Sn,mz=OW.keys,yz=OW.toKey;Wo({target:"Reflect",stat:!0},{getOwnMetadataKeys:function(e){var t=arguments.length<2?void 0:yz(arguments[1]);return mz(gz(e),t)}});var bz=Sn,wz=kf,Az=OW.has,xz=OW.toKey,Tz=function e(t,n,r){if(Az(t,n,r))return!0;var o=wz(n);return null!==o&&e(t,o,r)};Wo({target:"Reflect",stat:!0},{hasMetadata:function(e,t){var n=arguments.length<3?void 0:xz(arguments[2]);return Tz(e,bz(t),n)}});var Pz=Sn,Cz=OW.has,_z=OW.toKey;Wo({target:"Reflect",stat:!0},{hasOwnMetadata:function(e,t){var n=arguments.length<3?void 0:_z(arguments[2]);return Cz(e,Pz(t),n)}});var Ez=Sn,Sz=OW.toKey,kz=OW.set;Wo({target:"Reflect",stat:!0},{metadata:function(e,t){return function(n,r){kz(e,t,Ez(n),Sz(r))}}});var Rz=oe,Oz=lt,Mz=Sn,Fz=function(){for(var e=Mz(this),t=Oz(e.add),n=0,r=arguments.length;n<r;n++)Rz(t,e,arguments[n]);return e};Wo({target:"Set",proto:!0,real:!0,forced:!0},{addAll:Fz}),Wo({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:tN});var Iz=Ne,Dz=oe,Lz=lt,jz=Sn,Bz=Vg,Nz=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){var t=jz(this),n=new(Bz(t,Iz("Set")))(t),r=Lz(n.delete);return Nz(e,(function(e){Dz(r,n,e)})),n}});var Vz=oe,Uz=function(e){return Vz(Set.prototype.values,e)},Wz=Sn,zz=sa,Hz=Uz,Gz=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=Wz(this),n=Hz(t),r=zz(e,arguments.length>1?arguments[1]:void 0);return!Gz(n,(function(e,n){if(!r(e,e,t))return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var Xz=Ne,Qz=oe,Yz=lt,qz=Sn,Kz=sa,Jz=Vg,Zz=Uz,$z=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=qz(this),n=Zz(t),r=Kz(e,arguments.length>1?arguments[1]:void 0),o=new(Jz(t,Xz("Set"))),i=Yz(o.add);return $z(n,(function(e){r(e,e,t)&&Qz(i,o,e)}),{IS_ITERATOR:!0}),o}});var eH=Sn,tH=sa,nH=Uz,rH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=eH(this),n=nH(t),r=tH(e,arguments.length>1?arguments[1]:void 0);return rH(n,(function(e,n){if(r(e,e,t))return n(e)}),{IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),Wo({target:"Set",stat:!0,forced:!0},{from:RN});var oH=Ne,iH=oe,aH=lt,sH=Sn,uH=Vg,cH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){var t=sH(this),n=new(uH(t,oH("Set"))),r=aH(t.has),o=aH(n.add);return cH(e,(function(e){iH(r,t,e)&&iH(o,n,e)})),n}});var lH=oe,fH=lt,hH=Sn,dH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){var t=hH(this),n=fH(t.has);return!dH(e,(function(e,r){if(!0===lH(n,t,e))return r()}),{INTERRUPTED:!0}).stopped}});var pH=Ne,vH=oe,gH=lt,mH=Fe,yH=Sn,bH=Ul,wH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){var t=bH(this),n=yH(e),r=n.has;return mH(r)||(n=new(pH("Set"))(e),r=gH(n.has)),!wH(t,(function(e,t){if(!1===vH(r,n,e))return t()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var AH=oe,xH=lt,TH=Sn,PH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){var t=TH(this),n=xH(t.has);return!PH(e,(function(e,r){if(!1===AH(n,t,e))return r()}),{INTERRUPTED:!0}).stopped}});var CH=Wo,_H=Sn,EH=ti,SH=Uz,kH=sy,RH=me([].join),OH=[].push;CH({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=_H(this),n=SH(t),r=void 0===e?",":EH(e),o=[];return kH(n,OH,{that:o,IS_ITERATOR:!0}),RH(o,r)}});var MH=Ne,FH=sa,IH=oe,DH=lt,LH=Sn,jH=Vg,BH=Uz,NH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=LH(this),n=BH(t),r=FH(e,arguments.length>1?arguments[1]:void 0),o=new(jH(t,MH("Set"))),i=DH(o.add);return NH(n,(function(e){IH(i,o,r(e,e,t))}),{IS_ITERATOR:!0}),o}}),Wo({target:"Set",stat:!0,forced:!0},{of:dV});var VH=Wo,UH=lt,WH=Sn,zH=Uz,HH=sy,GH=J.TypeError;VH({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=WH(this),n=zH(t),r=arguments.length<2,o=r?void 0:arguments[1];if(UH(e),HH(n,(function(n){r?(r=!1,o=n):o=e(o,n,n,t)}),{IS_ITERATOR:!0}),r)throw GH("Reduce of empty set with no initial value");return o}});var XH=Sn,QH=sa,YH=Uz,qH=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=XH(this),n=YH(t),r=QH(e,arguments.length>1?arguments[1]:void 0);return qH(n,(function(e,n){if(r(e,e,t))return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var KH=Ne,JH=oe,ZH=lt,$H=Sn,eG=Vg,tG=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){var t=$H(this),n=new(eG(t,KH("Set")))(t),r=ZH(n.delete),o=ZH(n.add);return tG(e,(function(e){JH(r,n,e)||JH(o,n,e)})),n}});var nG=Ne,rG=lt,oG=Sn,iG=Vg,aG=sy;Wo({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){var t=oG(this),n=new(iG(t,nG("Set")))(t);return aG(e,rG(n.add),{that:n}),n}});var sG=rR.charAt,uG=ke,cG=zr,lG=ti;Wo({target:"String",proto:!0,forced:!0},{at:function(e){var t=lG(uG(this)),n=t.length,r=cG(e),o=r>=0?r:n+r;return o<0||o>=n?void 0:sG(t,o)}});var fG=Wo,hG=Hf,dG=ke,pG=ti,vG=Tr,gG=rR.codeAt,mG=rR.charAt,yG="String Iterator",bG=vG.set,wG=vG.getterFor(yG),AG=hG((function(e){bG(this,{type:yG,string:e,index:0})}),"String",(function(){var e,t=wG(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=mG(n,r),t.index+=e.length,{value:{codePoint:gG(e,0),position:r},done:!1})}));fG({target:"String",proto:!0,forced:!0},{codePoints:function(){return new AG(pG(dG(this)))}});var xG=Wo,TG=J,PG=oe,CG=me,_G=Hf,EG=ke,SG=Kr,kG=ti,RG=Sn,OG=sS,MG=vS,FG=ht,IG=zn.exports,DG=$,LG=Vg,jG=$R,BG=aO,NG=Tr,VG=Qt("matchAll"),UG="RegExp String",WG="RegExp String Iterator",zG=NG.set,HG=NG.getterFor(WG),GG=RegExp.prototype,XG=TG.TypeError,QG=CG("".indexOf),YG=CG("".matchAll),qG=!!YG&&!DG((function(){YG("a",/./)})),KG=_G((function(e,t,n,r){zG(this,{type:WG,regexp:e,string:t,global:n,unicode:r,done:!1})}),UG,(function(){var e=HG(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=BG(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""===kG(r[0])&&(t.lastIndex=jG(n,SG(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),JG=function(e){var t,n,r,o=RG(this),i=kG(e),a=LG(o,RegExp),s=kG(MG(o));return t=new a(a===RegExp?o.source:o,s),n=!!~QG(s,"g"),r=!!~QG(s,"u"),t.lastIndex=SG(o.lastIndex),new KG(t,i,n,r)};xG({target:"String",proto:!0,forced:qG},{matchAll:function(e){var t,n,r,o=EG(this);if(null!=e){if(OG(e)&&(t=kG(EG(MG(e))),!~QG(t,"g")))throw XG("`.matchAll` does not allow non-global regexes");if(qG)return YG(o,e);if(r=FG(e,VG))return PG(r,e,o)}else if(qG)return YG(o,e);return n=kG(o),new RegExp(e,"g")[VG](n)}}),VG in GG||IG(GG,VG,JG);var ZG=Wo,$G=J,eX=oe,tX=me,nX=ke,rX=Fe,oX=sS,iX=ti,aX=ht,sX=vS,uX=zO,cX=Qt("replace"),lX=$G.TypeError,fX=tX("".indexOf);tX("".replace);var hX=tX("".slice),dX=Math.max,pX=function(e,t,n){return n>e.length?-1:""===t?n:fX(e,t,n)};ZG({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,o,i,a,s,u,c,l=nX(this),f=0,h=0,d="";if(null!=e){if(oX(e)&&(n=iX(nX(sX(e))),!~fX(n,"g")))throw lX("`.replaceAll` does not allow non-global regexes");if(r=aX(e,cX))return eX(r,e,l,t)}for(o=iX(l),i=iX(e),(a=rX(t))||(t=iX(t)),s=i.length,u=dX(1,s),f=pX(o,i,0);-1!==f;)c=a?iX(t(i,f,o)):uX(i,o,f,[],void 0,t),d+=hX(o,h,f)+c,h=f+s,f=pX(o,i,f+u);return h<o.length&&(d+=hX(o,h)),d}}),Yi("dispose"),Yi("observable"),Yi("patternMatch"),Wo({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:tN}),Wo({target:"WeakMap",stat:!0,forced:!0},{from:RN}),Wo({target:"WeakMap",stat:!0,forced:!0},{of:dV}),Wo({target:"WeakSet",proto:!0,real:!0,forced:!0},{addAll:Fz}),Wo({target:"WeakSet",proto:!0,real:!0,forced:!0},{deleteAll:tN}),Wo({target:"WeakSet",stat:!0,forced:!0},{from:RN}),Wo({target:"WeakSet",stat:!0,forced:!0},{of:dV});var vX={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},gX=ln("span").classList,mX=gX&&gX.constructor&&gX.constructor.prototype,yX=mX===Object.prototype?void 0:mX,bX=Na.forEach,wX=lf("forEach")?[].forEach:function(e){return bX(this,e,arguments.length>1?arguments[1]:void 0)},AX=J,xX=vX,TX=yX,PX=wX,CX=Wn,_X=function(e){if(e&&e.forEach!==PX)try{CX(e,"forEach",PX)}catch(_3){e.forEach=PX}};for(var EX in xX)xX[EX]&&_X(AX[EX]&&AX[EX].prototype);_X(TX);var SX=J,kX=vX,RX=yX,OX=Oh,MX=Wn,FX=Qt,IX=FX("iterator"),DX=FX("toStringTag"),LX=OX.values,jX=function(e,t){if(e){if(e[IX]!==LX)try{MX(e,IX,LX)}catch(_3){e[IX]=LX}if(e[DX]||MX(e,DX,t),kX[t])for(var n in OX)if(e[n]!==OX[n])try{MX(e,n,OX[n])}catch(_3){e[n]=OX[n]}}};for(var BX in kX)jX(SX[BX]&&SX[BX].prototype,BX);jX(RX,"DOMTokenList");var NX=TP.clear;Wo({global:!0,bind:!0,enumerable:!0,forced:J.clearImmediate!==NX},{clearImmediate:NX});var VX=TP.set;Wo({global:!0,bind:!0,enumerable:!0,forced:J.setImmediate!==VX},{setImmediate:VX});var UX=Wo,WX=UP,zX=lt,HX=UT,GX=cd,XX=J.process;UX({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){HX(arguments.length,1),zX(e);var t=GX&&XX.domain;WX(t?t.bind(e):e)}});var QX=$,YX=Qt("iterator"),qX=!QX((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[YX]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),KX=me,JX=2147483647,ZX=/[^\0-\u007E]/,$X=/[.\u3002\uFF0E\uFF61]/g,eQ="Overflow: input needs wider integers to process",tQ=J.RangeError,nQ=KX($X.exec),rQ=Math.floor,oQ=String.fromCharCode,iQ=KX("".charCodeAt),aQ=KX([].join),sQ=KX([].push),uQ=KX("".replace),cQ=KX("".split),lQ=KX("".toLowerCase),fQ=function(e){return e+22+75*(e<26)},hQ=function(e,t,n){var r=0;for(e=n?rQ(e/700):e>>1,e+=rQ(e/t);e>455;)e=rQ(e/35),r+=36;return rQ(r+36*e/(e+38))},dQ=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=iQ(e,n++);if(o>=55296&&o<=56319&&n<r){var i=iQ(e,n++);56320==(64512&i)?sQ(t,((1023&o)<<10)+(1023&i)+65536):(sQ(t,o),n--)}else sQ(t,o)}return t}(e);var n,r,o=e.length,i=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&sQ(t,oQ(r));var u=t.length,c=u;for(u&&sQ(t,"-");c<o;){var l=JX;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<l&&(l=r);var f=c+1;if(l-i>rQ((JX-a)/f))throw tQ(eQ);for(a+=(l-i)*f,i=l,n=0;n<e.length;n++){if((r=e[n])<i&&++a>JX)throw tQ(eQ);if(r==i){for(var h=a,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(h<p)break;var v=h-p,g=36-p;sQ(t,oQ(fQ(p+v%g))),h=rQ(v/g),d+=36}sQ(t,oQ(fQ(h))),s=hQ(a,f,c==u),a=0,c++}}a++,i++}return aQ(t,"")},pQ=Wo,vQ=J,gQ=oe,mQ=me,yQ=ee,bQ=qX,wQ=zn.exports,AQ=Mp,xQ=ra,TQ=Hf,PQ=Tr,CQ=Dp,_Q=Fe,EQ=Ot,SQ=sa,kQ=Zo,RQ=Sn,OQ=De,MQ=ti,FQ=Ci,IQ=fe,DQ=Ul,LQ=Il,jQ=UT,BQ=Nd,NQ=Qt("iterator"),VQ="URLSearchParams",UQ="URLSearchParamsIterator",WQ=PQ.set,zQ=PQ.getterFor(VQ),HQ=PQ.getterFor(UQ),GQ=Object.getOwnPropertyDescriptor,XQ=function(e){if(!yQ)return vQ[e];var t=GQ(vQ,e);return t&&t.value},QQ=XQ("fetch"),YQ=XQ("Request"),qQ=XQ("Headers"),KQ=YQ&&YQ.prototype,JQ=qQ&&qQ.prototype,ZQ=vQ.RegExp,$Q=vQ.TypeError,eY=vQ.decodeURIComponent,tY=vQ.encodeURIComponent,nY=mQ("".charAt),rY=mQ([].join),oY=mQ([].push),iY=mQ("".replace),aY=mQ([].shift),sY=mQ([].splice),uY=mQ("".split),cY=mQ("".slice),lY=/\+/g,fY=Array(4),hY=function(e){return fY[e-1]||(fY[e-1]=ZQ("((?:%[\\da-f]{2}){"+e+"})","gi"))},dY=function(e){try{return eY(e)}catch(_3){return e}},pY=function(e){var t=iY(e,lY," "),n=4;try{return eY(t)}catch(_3){for(;n;)t=iY(t,hY(n--),dY);return t}},vY=/[!'()~]|%20/g,gY={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},mY=function(e){return gY[e]},yY=function(e){return iY(tY(e),vY,mY)},bY=TQ((function(e,t){WQ(this,{type:UQ,iterator:DQ(zQ(e).entries),kind:t})}),"Iterator",(function(){var e=HQ(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),wY=function(e){this.entries=[],this.url=null,void 0!==e&&(OQ(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===nY(e,0)?cY(e,1):e:MQ(e)))};wY.prototype={type:VQ,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,o,i,a,s,u=LQ(e);if(u)for(n=(t=DQ(e,u)).next;!(r=gQ(n,t)).done;){if(i=(o=DQ(RQ(r.value))).next,(a=gQ(i,o)).done||(s=gQ(i,o)).done||!gQ(i,o).done)throw $Q("Expected sequence with length 2");oY(this.entries,{key:MQ(a.value),value:MQ(s.value)})}else for(var c in e)EQ(e,c)&&oY(this.entries,{key:c,value:MQ(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=uY(e,"&"),o=0;o<r.length;)(t=r[o++]).length&&(n=uY(t,"="),oY(this.entries,{key:pY(aY(n)),value:pY(rY(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],oY(n,yY(e.key)+"="+yY(e.value));return rY(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var AY=function(){CQ(this,xY);var e=arguments.length>0?arguments[0]:void 0;WQ(this,new wY(e))},xY=AY.prototype;if(AQ(xY,{append:function(e,t){jQ(arguments.length,2);var n=zQ(this);oY(n.entries,{key:MQ(e),value:MQ(t)}),n.updateURL()},delete:function(e){jQ(arguments.length,1);for(var t=zQ(this),n=t.entries,r=MQ(e),o=0;o<n.length;)n[o].key===r?sY(n,o,1):o++;t.updateURL()},get:function(e){jQ(arguments.length,1);for(var t=zQ(this).entries,n=MQ(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){jQ(arguments.length,1);for(var t=zQ(this).entries,n=MQ(e),r=[],o=0;o<t.length;o++)t[o].key===n&&oY(r,t[o].value);return r},has:function(e){jQ(arguments.length,1);for(var t=zQ(this).entries,n=MQ(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){jQ(arguments.length,1);for(var n,r=zQ(this),o=r.entries,i=!1,a=MQ(e),s=MQ(t),u=0;u<o.length;u++)(n=o[u]).key===a&&(i?sY(o,u--,1):(i=!0,n.value=s));i||oY(o,{key:a,value:s}),r.updateURL()},sort:function(){var e=zQ(this);BQ(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=zQ(this).entries,r=SQ(e,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new bY(this,"keys")},values:function(){return new bY(this,"values")},entries:function(){return new bY(this,"entries")}},{enumerable:!0}),wQ(xY,NQ,xY.entries,{name:"entries"}),wQ(xY,"toString",(function(){return zQ(this).serialize()}),{enumerable:!0}),xQ(AY,VQ),pQ({global:!0,forced:!bQ},{URLSearchParams:AY}),!bQ&&_Q(qQ)){var TY=mQ(JQ.has),PY=mQ(JQ.set),CY=function(e){if(OQ(e)){var t,n=e.body;if(kQ(n)===VQ)return t=e.headers?new qQ(e.headers):new qQ,TY(t,"content-type")||PY(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),FQ(e,{body:IQ(0,MQ(n)),headers:IQ(0,t)})}return e};if(_Q(QQ)&&pQ({global:!0,enumerable:!0,noTargetGet:!0,forced:!0},{fetch:function(e){return QQ(e,arguments.length>1?CY(arguments[1]):{})}}),_Q(YQ)){var _Y=function(e){return CQ(this,KQ),new YQ(e,arguments.length>1?CY(arguments[1]):{})};KQ.constructor=_Y,_Y.prototype=KQ,pQ({global:!0,forced:!0,noTargetGet:!0},{Request:_Y})}}var EY,SY={URLSearchParams:AY,getState:zQ},kY=Wo,RY=ee,OY=qX,MY=J,FY=sa,IY=me,DY=ni.f,LY=zn.exports,jY=Dp,BY=Ot,NY=XA,VY=$l,UY=Li,WY=rR.codeAt,zY=function(e){var t,n,r=[],o=cQ(uQ(lQ(e),$X,"."),".");for(t=0;t<o.length;t++)n=o[t],sQ(r,nQ(ZX,n)?"xn--"+dQ(n):n);return aQ(r,".")},HY=ti,GY=ra,XY=UT,QY=SY,YY=Tr,qY=YY.set,KY=YY.getterFor("URL"),JY=QY.URLSearchParams,ZY=QY.getState,$Y=MY.URL,eq=MY.TypeError,tq=MY.parseInt,nq=Math.floor,rq=Math.pow,oq=IY("".charAt),iq=IY(/./.exec),aq=IY([].join),sq=IY(1..toString),uq=IY([].pop),cq=IY([].push),lq=IY("".replace),fq=IY([].shift),hq=IY("".split),dq=IY("".slice),pq=IY("".toLowerCase),vq=IY([].unshift),gq="Invalid scheme",mq="Invalid host",yq="Invalid port",bq=/[a-z]/i,wq=/[\d+-.a-z]/i,Aq=/\d/,xq=/^0x/i,Tq=/^[0-7]+$/,Pq=/^\d+$/,Cq=/^[\da-f]+$/i,_q=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Eq=/[\0\t\n\r #/:<>?@[\\\]^|]/,Sq=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,kq=/[\t\n\r]/g,Rq=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)vq(t,e%256),e=nq(e/256);return aq(t,".")}if("object"==S(e)){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=sq(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Oq={},Mq=NY({},Oq,{" ":1,'"':1,"<":1,">":1,"`":1}),Fq=NY({},Mq,{"#":1,"?":1,"{":1,"}":1}),Iq=NY({},Fq,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Dq=function(e,t){var n=WY(e,0);return n>32&&n<127&&!BY(t,e)?e:encodeURIComponent(e)},Lq={ftp:21,file:null,http:80,https:443,ws:80,wss:443},jq=function(e,t){var n;return 2==e.length&&iq(bq,oq(e,0))&&(":"==(n=oq(e,1))||!t&&"|"==n)},Bq=function(e){var t;return e.length>1&&jq(dq(e,0,2))&&(2==e.length||"/"===(t=oq(e,2))||"\\"===t||"?"===t||"#"===t)},Nq=function(e){return"."===e||"%2e"===pq(e)},Vq={},Uq={},Wq={},zq={},Hq={},Gq={},Xq={},Qq={},Yq={},qq={},Kq={},Jq={},Zq={},$q={},eK={},tK={},nK={},rK={},oK={},iK={},aK={},sK=function e(t,n,r){var o,i,a,s=HY(t);if(n){if(i=this.parse(s))throw eq(i);this.searchParams=null}else{if(void 0!==r&&(o=new e(r,!0)),i=this.parse(s,null,o))throw eq(i);(a=ZY(new JY)).bindURL(this),this.searchParams=a}};sK.prototype={type:"URL",parse:function(e,t,n){var r,o,i,a,s,u=this,c=t||Vq,l=0,f="",h=!1,d=!1,p=!1;for(e=HY(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=lq(e,Sq,"")),e=lq(e,kq,""),r=VY(e);l<=r.length;){switch(o=r[l],c){case Vq:if(!o||!iq(bq,o)){if(t)return gq;c=Wq;continue}f+=pq(o),c=Uq;break;case Uq:if(o&&(iq(wq,o)||"+"==o||"-"==o||"."==o))f+=pq(o);else{if(":"!=o){if(t)return gq;f="",c=Wq,l=0;continue}if(t&&(u.isSpecial()!=BY(Lq,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&Lq[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?c=$q:u.isSpecial()&&n&&n.scheme==u.scheme?c=zq:u.isSpecial()?c=Qq:"/"==r[l+1]?(c=Hq,l++):(u.cannotBeABaseURL=!0,cq(u.path,""),c=oK)}break;case Wq:if(!n||n.cannotBeABaseURL&&"#"!=o)return gq;if(n.cannotBeABaseURL&&"#"==o){u.scheme=n.scheme,u.path=UY(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=aK;break}c="file"==n.scheme?$q:Gq;continue;case zq:if("/"!=o||"/"!=r[l+1]){c=Gq;continue}c=Yq,l++;break;case Hq:if("/"==o){c=qq;break}c=rK;continue;case Gq:if(u.scheme=n.scheme,o==EY)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=UY(n.path),u.query=n.query;else if("/"==o||"\\"==o&&u.isSpecial())c=Xq;else if("?"==o)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=UY(n.path),u.query="",c=iK;else{if("#"!=o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=UY(n.path),u.path.length--,c=rK;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=UY(n.path),u.query=n.query,u.fragment="",c=aK}break;case Xq:if(!u.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=rK;continue}c=qq}else c=Yq;break;case Qq:if(c=Yq,"/"!=o||"/"!=oq(f,l+1))continue;l++;break;case Yq:if("/"!=o&&"\\"!=o){c=qq;continue}break;case qq:if("@"==o){h&&(f="%40"+f),h=!0,i=VY(f);for(var v=0;v<i.length;v++){var g=i[v];if(":"!=g||p){var m=Dq(g,Iq);p?u.password+=m:u.username+=m}else p=!0}f=""}else if(o==EY||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(h&&""==f)return"Invalid authority";l-=VY(f).length+1,f="",c=Kq}else f+=o;break;case Kq:case Jq:if(t&&"file"==u.scheme){c=tK;continue}if(":"!=o||d){if(o==EY||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(u.isSpecial()&&""==f)return mq;if(t&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",c=nK,t)return;continue}"["==o?d=!0:"]"==o&&(d=!1),f+=o}else{if(""==f)return mq;if(a=u.parseHost(f))return a;if(f="",c=Zq,t==Jq)return}break;case Zq:if(!iq(Aq,o)){if(o==EY||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()||t){if(""!=f){var y=tq(f,10);if(y>65535)return yq;u.port=u.isSpecial()&&y===Lq[u.scheme]?null:y,f=""}if(t)return;c=nK;continue}return yq}f+=o;break;case $q:if(u.scheme="file","/"==o||"\\"==o)c=eK;else{if(!n||"file"!=n.scheme){c=rK;continue}if(o==EY)u.host=n.host,u.path=UY(n.path),u.query=n.query;else if("?"==o)u.host=n.host,u.path=UY(n.path),u.query="",c=iK;else{if("#"!=o){Bq(aq(UY(r,l),""))||(u.host=n.host,u.path=UY(n.path),u.shortenPath()),c=rK;continue}u.host=n.host,u.path=UY(n.path),u.query=n.query,u.fragment="",c=aK}}break;case eK:if("/"==o||"\\"==o){c=tK;break}n&&"file"==n.scheme&&!Bq(aq(UY(r,l),""))&&(jq(n.path[0],!0)?cq(u.path,n.path[0]):u.host=n.host),c=rK;continue;case tK:if(o==EY||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&jq(f))c=rK;else if(""==f){if(u.host="",t)return;c=nK}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),t)return;f="",c=nK}continue}f+=o;break;case nK:if(u.isSpecial()){if(c=rK,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=EY&&(c=rK,"/"!=o))continue}else u.fragment="",c=aK;else u.query="",c=iK;break;case rK:if(o==EY||"/"==o||"\\"==o&&u.isSpecial()||!t&&("?"==o||"#"==o)){if(".."===(s=pq(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==o||"\\"==o&&u.isSpecial()||cq(u.path,"")):Nq(f)?"/"==o||"\\"==o&&u.isSpecial()||cq(u.path,""):("file"==u.scheme&&!u.path.length&&jq(f)&&(u.host&&(u.host=""),f=oq(f,0)+":"),cq(u.path,f)),f="","file"==u.scheme&&(o==EY||"?"==o||"#"==o))for(;u.path.length>1&&""===u.path[0];)fq(u.path);"?"==o?(u.query="",c=iK):"#"==o&&(u.fragment="",c=aK)}else f+=Dq(o,Fq);break;case oK:"?"==o?(u.query="",c=iK):"#"==o?(u.fragment="",c=aK):o!=EY&&(u.path[0]+=Dq(o,Oq));break;case iK:t||"#"!=o?o!=EY&&("'"==o&&u.isSpecial()?u.query+="%27":u.query+="#"==o?"%23":Dq(o,Oq)):(u.fragment="",c=aK);break;case aK:o!=EY&&(u.fragment+=Dq(o,Mq))}l++}},parseHost:function(e){var t,n,r;if("["==oq(e,0)){if("]"!=oq(e,e.length-1))return mq;if(t=function(e){var t,n,r,o,i,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,h=function(){return oq(e,f)};if(":"==h()){if(":"!=oq(e,1))return;f+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=n=0;n<4&&iq(Cq,h());)t=16*t+tq(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,c>6)return;for(r=0;h();){if(o=null,r>0){if(!("."==h()&&r<4))return;f++}if(!iq(Aq,h()))return;for(;iq(Aq,h());){if(i=tq(h(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;f++}u[c]=256*u[c]+o,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u}(dq(e,1,-1)),!t)return mq;this.host=t}else if(this.isSpecial()){if(e=zY(e),iq(_q,e))return mq;if(t=function(e){var t,n,r,o,i,a,s,u=hq(e,".");if(u.length&&""==u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(o=u[r]))return e;if(i=10,o.length>1&&"0"==oq(o,0)&&(i=iq(xq,o)?16:8,o=dq(o,8==i?1:2)),""===o)a=0;else{if(!iq(10==i?Pq:8==i?Tq:Cq,o))return e;a=tq(o,i)}cq(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=rq(256,5-t))return null}else if(a>255)return null;for(s=uq(n),r=0;r<n.length;r++)s+=n[r]*rq(256,3-r);return s}(e),null===t)return mq;this.host=t}else{if(iq(Eq,e))return mq;for(t="",n=VY(e),r=0;r<n.length;r++)t+=Dq(n[r],Oq);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return BY(Lq,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&jq(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==o?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=Rq(o),null!==i&&(c+=":"+i)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+aq(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw eq(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new uK(e.path[0]).origin}catch(_3){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Rq(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(HY(e)+":",Vq)},getUsername:function(){return this.username},setUsername:function(e){var t=VY(HY(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Dq(t[n],Iq)}},getPassword:function(){return this.password},setPassword:function(e){var t=VY(HY(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Dq(t[n],Iq)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Rq(e):Rq(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Kq)},getHostname:function(){var e=this.host;return null===e?"":Rq(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Jq)},getPort:function(){var e=this.port;return null===e?"":HY(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=HY(e))?this.port=null:this.parse(e,Zq))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+aq(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,nK))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=HY(e))?this.query=null:("?"==oq(e,0)&&(e=dq(e,1)),this.query="",this.parse(e,iK)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=HY(e))?("#"==oq(e,0)&&(e=dq(e,1)),this.fragment="",this.parse(e,aK)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var uK=function(e){var t=jY(this,cK),n=XY(arguments.length,1)>1?arguments[1]:void 0,r=qY(t,new sK(e,!1,n));RY||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},cK=uK.prototype,lK=function(e,t){return{get:function(){return KY(this)[e]()},set:t&&function(e){return KY(this)[t](e)},configurable:!0,enumerable:!0}};if(RY&&DY(cK,{href:lK("serialize","setHref"),origin:lK("getOrigin"),protocol:lK("getProtocol","setProtocol"),username:lK("getUsername","setUsername"),password:lK("getPassword","setPassword"),host:lK("getHost","setHost"),hostname:lK("getHostname","setHostname"),port:lK("getPort","setPort"),pathname:lK("getPathname","setPathname"),search:lK("getSearch","setSearch"),searchParams:lK("getSearchParams"),hash:lK("getHash","setHash")}),LY(cK,"toJSON",(function(){return KY(this).serialize()}),{enumerable:!0}),LY(cK,"toString",(function(){return KY(this).serialize()}),{enumerable:!0}),$Y){var fK=$Y.createObjectURL,hK=$Y.revokeObjectURL;fK&&LY(uK,"createObjectURL",FY(fK,$Y)),hK&&LY(uK,"revokeObjectURL",FY(hK,$Y))}GY(uK,"URL"),kY({global:!0,forced:!OY,sham:!RY},{URL:uK});var dK=oe;Wo({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return dK(URL.prototype.toString,this)}});!function(e){var t=function(e){var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(M){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?p:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(M){return{type:"throw",arg:M}}}e.wrap=c;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",v={};function g(){}function m(){}function y(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,A=w&&w(w(R([])));A&&A!==n&&r.call(A,i)&&(b=A);var x=y.prototype=g.prototype=Object.create(b);function T(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(o,i,a,s){var u=l(e[o],e,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"===S(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function C(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function R(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:O}}function O(){return{value:t,done:!0}}return m.prototype=y,u(x,"constructor",y),u(y,"constructor",m),m.displayName=u(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},T(P.prototype),u(P.prototype,a,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new P(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},T(x),u(x,s,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=R,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return s.type="throw",s.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(n){"object"===("undefined"==typeof globalThis?"undefined":S(globalThis))?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}({exports:{}});var pK={exports:{}};!function(e,t){!function(n,r){var o="function",i="undefined",a="object",s="string",u="model",c="name",l="type",f="vendor",h="version",d="architecture",p="console",v="mobile",g="tablet",m="smarttv",y="wearable",b="embedded",w="Amazon",A="Apple",x="ASUS",T="BlackBerry",P="Firefox",C="Google",_="Huawei",E="LG",k="Microsoft",R="Motorola",O="Opera",M="Samsung",F="Sony",I="Xiaomi",D="Zebra",L="Facebook",j=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},B=function(e,t){return S(e)===s&&-1!==N(t).indexOf(N(e))},N=function(e){return e.toLowerCase()},V=function(e,t){if(S(e)===s)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),S(t)===i?e:e.substring(0,255)},U=function(e,t){for(var n,i,s,u,c,l,f=0;f<t.length&&!c;){var h=t[f],d=t[f+1];for(n=i=0;n<h.length&&!c;)if(c=h[n++].exec(e))for(s=0;s<d.length;s++)l=c[++i],S(u=d[s])===a&&u.length>0?2===u.length?S(u[1])==o?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?S(u[1])!==o||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):r:this[u[0]]=l?u[1].call(this,l,u[2]):r:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):r):this[u]=l||r;f+=2}},W=function(e,t){for(var n in t)if(S(t[n])===a&&t[n].length>0){for(var o=0;o<t[n].length;o++)if(B(t[n][o],e))return"?"===n?r:n}else if(B(t[n],e))return"?"===n?r:n;return e},z={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},H={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,h],[/opios[\/ ]+([\w\.]+)/i],[h,[c,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[h,[c,O]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[c,h],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[c,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[h,[c,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[c,"IE"]],[/yabrowser\/([\w\.]+)/i],[h,[c,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure Browser"],h],[/\bfocus\/([\w\.]+)/i],[h,[c,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[h,[c,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[c,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[c,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[h,[c,P]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 Browser"],h],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c,h],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,L],h],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[c,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[c,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[c,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,"Chrome WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[c,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,h],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[h,[c,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[h,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[h,W,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[c,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[c,h]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[d,"amd64"]],[/(ia32(?=;))/i],[[d,N]],[/((?:i[346]|x)86)[;\)]/i],[[d,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[d,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[d,"armhf"]],[/windows (ce|mobile); ppc;/i],[[d,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[d,/ower/,"",N]],[/(sun4\w)[;\)]/i],[[d,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[d,N]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[f,M],[l,g]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[f,M],[l,v]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[f,A],[l,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[f,A],[l,g]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[f,_],[l,g]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[u,[f,_],[l,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[f,I],[l,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[f,I],[l,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[f,"OPPO"],[l,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[f,"Vivo"],[l,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[f,"Realme"],[l,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[f,R],[l,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[f,R],[l,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[f,E],[l,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[f,E],[l,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[f,"Lenovo"],[l,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[f,"Nokia"],[l,v]],[/(pixel c)\b/i],[u,[f,C],[l,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[f,C],[l,v]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[f,F],[l,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[f,F],[l,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[f,"OnePlus"],[l,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[f,w],[l,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[f,w],[l,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,f,[l,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[f,T],[l,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[f,x],[l,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[f,x],[l,v]],[/(nexus 9)/i],[u,[f,"HTC"],[l,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[f,[u,/_/g," "],[l,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[f,"Acer"],[l,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[f,"Meizu"],[l,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[f,"Sharp"],[l,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,u,[l,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,u,[l,g]],[/(surface duo)/i],[u,[f,k],[l,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[f,"Fairphone"],[l,v]],[/(u304aa)/i],[u,[f,"AT&T"],[l,v]],[/\bsie-(\w*)/i],[u,[f,"Siemens"],[l,v]],[/\b(rct\w+) b/i],[u,[f,"RCA"],[l,g]],[/\b(venue[\d ]{2,7}) b/i],[u,[f,"Dell"],[l,g]],[/\b(q(?:mv|ta)\w+) b/i],[u,[f,"Verizon"],[l,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[f,"Barnes & Noble"],[l,g]],[/\b(tm\d{3}\w+) b/i],[u,[f,"NuVision"],[l,g]],[/\b(k88) b/i],[u,[f,"ZTE"],[l,g]],[/\b(nx\d{3}j) b/i],[u,[f,"ZTE"],[l,v]],[/\b(gen\d{3}) b.+49h/i],[u,[f,"Swiss"],[l,v]],[/\b(zur\d{3}) b/i],[u,[f,"Swiss"],[l,g]],[/\b((zeki)?tb.*\b) b/i],[u,[f,"Zeki"],[l,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],u,[l,g]],[/\b(ns-?\w{0,9}) b/i],[u,[f,"Insignia"],[l,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[f,"NextBook"],[l,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],u,[l,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],u,[l,v]],[/\b(ph-1) /i],[u,[f,"Essential"],[l,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[f,"Envizen"],[l,g]],[/\b(trio[-\w\. ]+) b/i],[u,[f,"MachSpeed"],[l,g]],[/\btu_(1491) b/i],[u,[f,"Rotor"],[l,g]],[/(shield[\w ]+) b/i],[u,[f,"Nvidia"],[l,g]],[/(sprint) (\w+)/i],[f,u,[l,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[f,k],[l,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[f,D],[l,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[f,D],[l,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,u,[l,p]],[/droid.+; (shield) bui/i],[u,[f,"Nvidia"],[l,p]],[/(playstation [345portablevi]+)/i],[u,[f,F],[l,p]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[f,k],[l,p]],[/smart-tv.+(samsung)/i],[f,[l,m]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[f,M],[l,m]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,E],[l,m]],[/(apple) ?tv/i],[f,[u,"Apple TV"],[l,m]],[/crkey/i],[[u,"Chromecast"],[f,C],[l,m]],[/droid.+aft(\w)( bui|\))/i],[u,[f,w],[l,m]],[/\(dtv[\);].+(aquos)/i],[u,[f,"Sharp"],[l,m]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[f,V],[u,V],[l,m]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,m]],[/((pebble))app/i],[f,u,[l,y]],[/droid.+; (glass) \d/i],[u,[f,C],[l,y]],[/droid.+; (wt63?0{2,3})\)/i],[u,[f,D],[l,y]],[/(quest( 2)?)/i],[u,[f,L],[l,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[l,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[l,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[l,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,g]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[l,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[c,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,h],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c,[h,W,z]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,"Windows"],[h,W,z]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,"Mac OS"],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[h,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,h],[/\(bb(10);/i],[h,[c,T]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[c,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[c,"webOS"]],[/crkey\/([\d\.]+)/i],[h,[c,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[c,"Chromium OS"],h],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,h],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[c,h]]},G=function e(t,o){if(S(t)===a&&(o=t,t=r),!(this instanceof e))return new e(t,o).getResult();var u=t||(S(n)!==i&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),c=o?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(H,o):H;return this.getBrowser=function(){var e={};return e.name=r,e.version=r,U.call(e,u,c.browser),e.major=function(e){return S(e)===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r}(e.version),e},this.getCPU=function(){var e={};return e.architecture=r,U.call(e,u,c.cpu),e},this.getDevice=function(){var e={};return e.vendor=r,e.model=r,e.type=r,U.call(e,u,c.device),e},this.getEngine=function(){var e={};return e.name=r,e.version=r,U.call(e,u,c.engine),e},this.getOS=function(){var e={};return e.name=r,e.version=r,U.call(e,u,c.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return u},this.setUA=function(e){return u=S(e)===s&&e.length>255?V(e,255):e,this},this.setUA(u),this};G.VERSION="1.0.2",G.BROWSER=j([c,h,"major"]),G.CPU=j([d]),G.DEVICE=j([u,f,l,p,v,m,g,y,b]),G.ENGINE=G.OS=j([c,h]),e.exports&&(t=e.exports=G),t.UAParser=G;var X=S(n)!==i&&(n.jQuery||n.Zepto);if(X&&!X.ua){var Q=new G;X.ua=Q.getResult(),X.ua.get=function(){return Q.getUA()},X.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)X.ua[n]=t[n]}}}("object"===("undefined"==typeof window?"undefined":S(window))?window:q)}(pK,pK.exports);var vK=pK.exports;function gK(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function mK(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(gK(arguments[t]));return e}var yK=function(){function e(){this._reset()}return e.prototype._reset=function(){this.eventsMap={}},e.prototype.on=function(e,t,n){return void 0===n&&(n=this),this.eventsMap[e]||(this.eventsMap[e]=[]),this.eventsMap[e].push([t,n]),this},e.prototype.once=function(e,t,n){var r=this;void 0===n&&(n=this);var o=function o(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];r.off(e,o),t.apply(n,i)};return o.listener=t,this.on(e,o),this},e.prototype.off=function(e,t){if(!e&&!t)return this._reset(),this;if(!e)return this;if(!t)return this.eventsMap[e]=[],this;var n=this.eventsMap[e];if(!n)return this;for(var r=n.length,o=0;o<r;o++){var i=gK(n[o],1)[0];i!==t&&i.listener!==t||n.splice(o,1)}return this},e.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.eventsMap[e];if(r)for(var o=mK(r),i=o.length,a=0;a<i;a++){var s=gK(o[a],2),u=s[0],c=s[1];u&&"function"==typeof u&&u.apply(c,t)}},e}(),bK={exports:{}},wK={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},AK={exports:{}},xK=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))},TK=Array.prototype.concat,PK=Array.prototype.slice,CK=AK.exports=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];xK(o)?t=TK.call(t,PK.call(o)):t.push(o)}return t};CK.wrap=function(e){return function(){return e(CK(arguments))}};var _K=wK,EK=AK.exports,SK=Object.hasOwnProperty,kK=Object.create(null);for(var RK in _K)SK.call(_K,RK)&&(kK[_K[RK]]=RK);var OK=bK.exports={to:{},get:{}};function MK(e,t,n){return Math.min(Math.max(t,e),n)}function FK(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}OK.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=OK.get.hsl(e),n="hsl";break;case"hwb":t=OK.get.hwb(e),n="hwb";break;default:t=OK.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},OK.get.rgb=function(e){if(!e)return null;var t,n,r,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=t[2],t=t[1],n=0;n<3;n++){var i=2*n;o[n]=parseInt(t.slice(i,i+2),16)}r&&(o[3]=parseInt(r,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(r=(t=t[1])[3],n=0;n<3;n++)o[n]=parseInt(t[n]+t[n],16);r&&(o[3]=parseInt(r+r,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(t[n+1],0);t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:SK.call(_K,t[1])?((o=_K[t[1]])[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=MK(o[n],0,255);return o[3]=MK(o[3],0,1),o},OK.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,MK(parseFloat(t[2]),0,100),MK(parseFloat(t[3]),0,100),MK(isNaN(n)?1:n,0,1)]}return null},OK.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,MK(parseFloat(t[2]),0,100),MK(parseFloat(t[3]),0,100),MK(isNaN(n)?1:n,0,1)]}return null},OK.to.hex=function(){var e=EK(arguments);return"#"+FK(e[0])+FK(e[1])+FK(e[2])+(e[3]<1?FK(Math.round(255*e[3])):"")},OK.to.rgb=function(){var e=EK(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},OK.to.rgb.percent=function(){var e=EK(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},OK.to.hsl=function(){var e=EK(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},OK.to.hwb=function(){var e=EK(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},OK.to.keyword=function(e){return kK[e.slice(0,3)]};for(var IK=wK,DK={},LK=0,jK=Object.keys(IK);LK<jK.length;LK++){var BK=jK[LK];DK[IK[BK]]=BK}for(var NK={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},VK=NK,UK=0,WK=Object.keys(NK);UK<WK.length;UK++){var zK=WK[UK];if(!("channels"in NK[zK]))throw new Error("missing channels property: "+zK);if(!("labels"in NK[zK]))throw new Error("missing channel labels property: "+zK);if(NK[zK].labels.length!==NK[zK].channels)throw new Error("channel and label counts mismatch: "+zK);var HK=NK[zK],GK=HK.channels,XK=HK.labels;delete NK[zK].channels,delete NK[zK].labels,Object.defineProperty(NK[zK],"channels",{value:GK}),Object.defineProperty(NK[zK],"labels",{value:XK})}NK.rgb.hsl=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255,i=Math.min(n,r,o),a=Math.max(n,r,o),s=a-i;a===i?t=0:n===a?t=(r-o)/s:r===a?t=2+(o-n)/s:o===a&&(t=4+(n-r)/s),(t=Math.min(60*t,360))<0&&(t+=360);var u=(i+a)/2;return[t,100*(a===i?0:u<=.5?s/(a+i):s/(2-a-i)),100*u]},NK.rgb.hsv=function(e){var t,n,r,o,i,a=e[0]/255,s=e[1]/255,u=e[2]/255,c=Math.max(a,s,u),l=c-Math.min(a,s,u),f=function(e){return(c-e)/6/l+.5};return 0===l?(o=0,i=0):(i=l/c,t=f(a),n=f(s),r=f(u),a===c?o=r-n:s===c?o=1/3+t-r:u===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},NK.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[NK.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,r))),100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},NK.rgb.cmyk=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},NK.rgb.keyword=function(e){var t=DK[e];if(t)return t;for(var n,r,o,i=1/0,a=0,s=Object.keys(IK);a<s.length;a++){var u=s[a],c=(r=e,o=IK[u],Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));c<i&&(i=c,n=u)}return n},NK.keyword.rgb=function(e){return IK[e]},NK.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},NK.rgb.lab=function(e){var t=NK.rgb.xyz(e),n=t[0],r=t[1],o=t[2];return r/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},NK.hsl.rgb=function(e){var t,n,r,o=e[0]/360,i=e[1]/100,a=e[2]/100;if(0===i)return[r=255*a,r,r];for(var s=2*a-(t=a<.5?a*(1+i):a+i-a*i),u=[0,0,0],c=0;c<3;c++)(n=o+1/3*-(c-1))<0&&n++,n>1&&n--,r=6*n<1?s+6*(t-s)*n:2*n<1?t:3*n<2?s+(t-s)*(2/3-n)*6:s,u[c]=255*r;return u},NK.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,o=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,o*=i<=1?i:2-i,[t,100*(0===r?2*o/(i+o):2*n/(r+n)),100*((r+n)/2)]},NK.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*i),u=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,u,a];case 1:return[s,r,a];case 2:return[a,r,u];case 3:return[a,s,r];case 4:return[u,a,r];case 5:return[r,a,s]}},NK.hsv.hsl=function(e){var t,n,r=e[0],o=e[1]/100,i=e[2]/100,a=Math.max(i,.01);n=(2-o)*i;var s=(2-o)*a;return t=o*a,[r,100*(t=(t/=s<=1?s:2-s)||0),100*(n/=2)]},NK.hwb.rgb=function(e){var t,n=e[0]/360,r=e[1]/100,o=e[2]/100,i=r+o;i>1&&(r/=i,o/=i);var a=Math.floor(6*n),s=1-o;t=6*n-a,0!=(1&a)&&(t=1-t);var u,c,l,f=r+t*(s-r);switch(a){default:case 6:case 0:u=s,c=f,l=r;break;case 1:u=f,c=s,l=r;break;case 2:u=r,c=s,l=f;break;case 3:u=r,c=f,l=s;break;case 4:u=f,c=r,l=s;break;case 5:u=s,c=r,l=f}return[255*u,255*c,255*l]},NK.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},NK.xyz.rgb=function(e){var t,n,r,o=e[0]/100,i=e[1]/100,a=e[2]/100;return n=-.9689*o+1.8758*i+.0415*a,r=.0557*o+-.204*i+1.057*a,t=(t=3.2406*o+-1.5372*i+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},NK.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},NK.lab.xyz=function(e){var t,n,r,o=e[0];t=e[1]/500+(n=(o+16)/116),r=n-e[2]/200;var i=Math.pow(n,3),a=Math.pow(t,3),s=Math.pow(r,3);return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},NK.lab.lch=function(e){var t,n=e[0],r=e[1],o=e[2];return(t=360*Math.atan2(o,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+o*o),t]},NK.lch.lab=function(e){var t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},NK.rgb.ansi16=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=V(e,3),r=n[0],o=n[1],i=n[2],a=null===t?NK.rgb.hsv(e)[2]:t;if(0===(a=Math.round(a/50)))return 30;var s=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===a&&(s+=60),s},NK.hsv.ansi16=function(e){return NK.rgb.ansi16(NK.hsv.rgb(e),e[2])},NK.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},NK.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},NK.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},NK.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},NK.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},NK.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255,i=Math.max(Math.max(n,r),o),a=Math.min(Math.min(n,r),o),s=i-a;return t=s<=0?0:i===n?(r-o)/s%6:i===r?2+(o-n)/s:4+(n-r)/s,t/=6,[360*(t%=1),100*s,100*(s<1?a/(1-s):0)]},NK.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},NK.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},NK.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var o,i=[0,0,0],a=t%1*6,s=a%1,u=1-s;switch(Math.floor(a)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=u,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=u,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=u}return o=(1-n)*r,[255*(n*i[0]+o),255*(n*i[1]+o),255*(n*i[2]+o)]},NK.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},NK.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},NK.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},NK.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},NK.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},NK.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},NK.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},NK.gray.hsl=function(e){return[0,0,e[0]]},NK.gray.hsv=NK.gray.hsl,NK.gray.hwb=function(e){return[0,100,e[0]]},NK.gray.cmyk=function(e){return[0,0,0,e[0]]},NK.gray.lab=function(e){return[e[0],0,0]},NK.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},NK.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var QK=VK;function YK(e){var t=function(){for(var e={},t=Object.keys(QK),n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var r=n.pop(),o=Object.keys(QK[r]),i=o.length,a=0;a<i;a++){var s=o[a],u=t[s];-1===u.distance&&(u.distance=t[r].distance+1,u.parent=r,n.unshift(s))}return t}function qK(e,t){return function(n){return t(e(n))}}function KK(e,t){for(var n=[t[e].parent,e],r=QK[t[e].parent][e],o=t[e].parent;t[o].parent;)n.unshift(t[o].parent),r=qK(QK[t[o].parent][o],r),o=t[o].parent;return r.conversion=n,r}var JK=VK,ZK=function(e){for(var t=YK(e),n={},r=Object.keys(t),o=r.length,i=0;i<o;i++){var a=r[i];null!==t[a].parent&&(n[a]=KK(a,t))}return n},$K={};Object.keys(JK).forEach((function(e){$K[e]={},Object.defineProperty($K[e],"channels",{value:JK[e].channels}),Object.defineProperty($K[e],"labels",{value:JK[e].labels});var t=ZK(e);Object.keys(t).forEach((function(n){var r=t[n];$K[e][n]=function(e){var t=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];if(null==o)return o;o.length>1&&(n=o);var i=e(n);if("object"===S(i))for(var a=i.length,s=0;s<a;s++)i[s]=Math.round(i[s]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}(r),$K[e][n].raw=function(e){var t=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];return null==o?o:(o.length>1&&(n=o),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))}));for(var eJ=$K,tJ=bK.exports,nJ=eJ,rJ=["keyword","gray","hex"],oJ={},iJ=0,aJ=Object.keys(nJ);iJ<aJ.length;iJ++){var sJ=aJ[iJ];oJ[U(nJ[sJ].labels).sort().join("")]=sJ}var uJ={};function cJ(e,t){if(!(this instanceof cJ))return new cJ(e,t);if(t&&t in rJ&&(t=null),t&&!(t in nJ))throw new Error("Unknown model: "+t);var n,r;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof cJ)this.model=e.model,this.color=U(e.color),this.valpha=e.valpha;else if("string"==typeof e){var o=tJ.get(e);if(null===o)throw new Error("Unable to parse color from string: "+e);this.model=o.model,r=nJ[this.model].channels,this.color=o.value.slice(0,r),this.valpha="number"==typeof o.value[r]?o.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=nJ[this.model].channels;var i=Array.prototype.slice.call(e,0,r);this.color=gJ(i,r),this.valpha="number"==typeof e[r]?e[r]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var a=Object.keys(e);"alpha"in e&&(a.splice(a.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);var s=a.sort().join("");if(!(s in oJ))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=oJ[s];var u=nJ[this.model].labels,c=[];for(n=0;n<u.length;n++)c.push(e[u[n]]);this.color=gJ(c)}if(uJ[this.model])for(r=nJ[this.model].channels,n=0;n<r;n++){var l=uJ[this.model][n];l&&(this.color[n]=l(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}cJ.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var t=this.model in tJ.to?this:this.rgb(),n=1===(t=t.round("number"==typeof e?e:1)).valpha?t.color:[].concat(U(t.color),[this.valpha]);return tJ.to[t.model](n)},percentString:function(e){var t=this.rgb().round("number"==typeof e?e:1),n=1===t.valpha?t.color:[].concat(U(t.color),[this.valpha]);return tJ.to.rgb.percent(n)},array:function(){return 1===this.valpha?U(this.color):[].concat(U(this.color),[this.valpha])},object:function(){for(var e={},t=nJ[this.model].channels,n=nJ[this.model].labels,r=0;r<t;r++)e[n[r]]=this.color[r];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray:function(){var e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject:function(){var e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round:function(e){return e=Math.max(e||0,0),new cJ([].concat(U(this.color.map(function(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}(e))),[this.valpha]),this.model)},alpha:function(e){return void 0!==e?new cJ([].concat(U(this.color),[Math.max(0,Math.min(1,e))]),this.model):this.valpha},red:dJ("rgb",0,pJ(255)),green:dJ("rgb",1,pJ(255)),blue:dJ("rgb",2,pJ(255)),hue:dJ(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:dJ("hsl",1,pJ(100)),lightness:dJ("hsl",2,pJ(100)),saturationv:dJ("hsv",1,pJ(100)),value:dJ("hsv",2,pJ(100)),chroma:dJ("hcg",1,pJ(100)),gray:dJ("hcg",2,pJ(100)),white:dJ("hwb",1,pJ(100)),wblack:dJ("hwb",2,pJ(100)),cyan:dJ("cmyk",0,pJ(100)),magenta:dJ("cmyk",1,pJ(100)),yellow:dJ("cmyk",2,pJ(100)),black:dJ("cmyk",3,pJ(100)),x:dJ("xyz",0,pJ(95.047)),y:dJ("xyz",1,pJ(100)),z:dJ("xyz",2,pJ(108.833)),l:dJ("lab",0,pJ(100)),a:dJ("lab",1),b:dJ("lab",2),keyword:function(e){return void 0!==e?new cJ(e):nJ[this.model].keyword(this.color)},hex:function(e){return void 0!==e?new cJ(e):tJ.to.hex(this.rgb().round().color)},hexa:function(e){if(void 0!==e)return new cJ(e);var t=this.rgb().round().color,n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),tJ.to.hex(t)+n},rgbNumber:function(){var e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity:function(){var e,t=[],n=H(this.rgb().color.entries());try{for(n.s();!(e=n.n()).done;){var r=V(e.value,2),o=r[0],i=r[1]/255;t[o]=i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}}catch(a){n.e(a)}finally{n.f()}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return cJ.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];return n=(n=(n+e)%360)<0?360+n:n,t.color[0]=n,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+S(e));var n=e.rgb(),r=this.rgb(),o=void 0===t?.5:t,i=2*o-1,a=n.alpha()-r.alpha(),s=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,u=1-s;return cJ.rgb(s*n.red()+u*r.red(),s*n.green()+u*r.green(),s*n.blue()+u*r.blue(),n.alpha()*o+r.alpha()*(1-o))}};for(var lJ=function(){var e=hJ[fJ];if(rJ.includes(e))return"continue";var t=nJ[e].channels;cJ.prototype[e]=function(){if(this.model===e)return new cJ(this);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.length>0?new cJ(n,e):new cJ([].concat(U(vJ(nJ[this.model][e].raw(this.color))),[this.valpha]),e)},cJ[e]=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=r[0];return"number"==typeof i&&(i=gJ(r,t)),new cJ(i,e)}},fJ=0,hJ=Object.keys(nJ);fJ<hJ.length;fJ++)lJ();function dJ(e,t,n){var r,o=H(e=Array.isArray(e)?e:[e]);try{for(o.s();!(r=o.n()).done;){var i=r.value;(uJ[i]||(uJ[i]=[]))[t]=n}}catch(a){o.e(a)}finally{o.f()}return e=e[0],function(r){var o;return void 0!==r?(n&&(r=n(r)),(o=this[e]()).color[t]=r,o):(o=this[e]().color[t],n&&(o=n(o)),o)}}function pJ(e){return function(t){return Math.max(0,Math.min(e,t))}}function vJ(e){return Array.isArray(e)?e:[e]}function gJ(e,t){for(var n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}var mJ,yJ,bJ,wJ,AJ=cJ;!function(e){e[e.red=1]="red",e[e.green=2]="green",e[e.blue=3]="blue"}(bJ||(bJ={})),I(mJ={},bJ.red,"#db357f"),I(mJ,bJ.green,"#1eb848"),I(mJ,bJ.blue,"#371dc0"),function(e){e[e.Total=0]="Total",e[e.Eye=1]="Eye",e[e.LeftEye=2]="LeftEye",e[e.RightEye=3]="RightEye",e[e.Nose=4]="Nose",e[e.Mouth=5]="Mouth",e[e.LeftFace=6]="LeftFace",e[e.RightFace=7]="RightFace",e[e.Chin=8]="Chin"}(wJ||(wJ={})),I(yJ={},wJ.Total,"total"),I(yJ,wJ.LeftFace,"occlusion_eye"),I(yJ,wJ.Eye,"occlusion_left_eye"),I(yJ,wJ.RightEye,"occlusion_right_eye"),I(yJ,wJ.Nose,"occlusion_nose"),I(yJ,wJ.Mouth,"occlusion_mouth"),I(yJ,wJ.LeftFace,"occlusion_left_face"),I(yJ,wJ.RightFace,"occlusion_right_face"),I(yJ,wJ.Chin,"occlusion_chin");var xJ,TJ={empty:"未检测到人脸",multiple:"请保持单人入镜",outside:"请将人脸移入框内",close:"请远离屏幕",far:"请靠近屏幕",light:"请调暗环境光线",dark:"请调亮环境光线",rotate:"请保持正脸",offset:"人脸偏移",ok:"请保持不动",blink:"眨眨眼",mouthopen:"张张嘴",headright:"向右转头",headleft:"向左转头",lookup:"向上抬头",lookdown:"向下低头",timeout:"采集超时",action_over:"动作核验完成",color_ready:"屏幕即将闪烁,请保持正脸",color_running:"变光中,请保持正脸",color_detecting:"炫瞳检测中",occlusion_eye:"请勿遮挡眼睛",occlusion_left_eye:"请勿遮挡左眼",occlusion_right_eye:"请勿遮挡右眼",occlusion_nose:"请勿遮挡鼻子",occlusion_mouth:"请勿遮挡嘴巴",occlusion_left_face:"请勿遮挡左脸",occlusion_right_face:"请勿遮挡右脸",occlusion_chin:"请勿遮挡下巴"};!function(e){e[e.silence=0]="silence",e[e.action=1]="action",e[e.colorful=2]="colorful"}(xJ||(xJ={}));var PJ={0:{text:"眨眼",tip:"眨眨眼",name:"blink",name2:"blink2",duration:1150},1:{text:"张嘴",tip:"张张嘴",name:"mouthopen",name2:"mouthopen2",duration:1150},2:{text:"右转",tip:"向右转头",name:"headright",name2:"headright2",duration:2200},3:{text:"左转",tip:"向左转头",name:"headleft",name2:"headleft2",duration:2200},4:{text:"抬头",tip:"向上抬头",name:"lookup",name2:"lookup2",duration:2200},5:{text:"低头",tip:"向下低头",name:"lookdown",name2:"lookdown2",duration:2200},6:{text:"左右转头",tip:"左右转头",name:"headshake",duration:2200}},CJ={exports:{}};!function(e){!function(){var t,n="Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";if(m="object"===("undefined"==typeof process?"undefined":S(process))&&"object"===S(process.versions)&&process.versions.node&&!process.browser){var r=process.versions.node.toString().replace("v","");n="Nodejs/"+r+" (NodeOS) AppleWebKit/"+r+" (KHTML, like Gecko) Nodejs/"+r+" Nodejs/"+r}t=void 0!==q?q:window,"undefined"==typeof window&&("undefined"==typeof window&&void 0!==q&&(q.navigator={userAgent:n,getUserMedia:function(){}},t.window=q),"undefined"==typeof location&&(t.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(t.screen={width:0,height:0}));var o=window.navigator;void 0!==o?(void 0!==o.webkitGetUserMedia&&(o.getUserMedia=o.webkitGetUserMedia),void 0!==o.mozGetUserMedia&&(o.getUserMedia=o.mozGetUserMedia)):o={getUserMedia:function(){},userAgent:n};var i=!!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test(o.userAgent||""),a=!(-1===o.userAgent.indexOf("Edge")||!o.msSaveOrOpenBlob&&!o.msSaveBlob),s=!!window.opera||o.userAgent.indexOf(" OPR/")>=0,u=o.userAgent.toLowerCase().indexOf("firefox")>-1&&"netscape"in window&&/ rv:/.test(o.userAgent),c=/^((?!chrome|android).)*safari/i.test(o.userAgent),l=!!window.chrome&&!s,f="undefined"!=typeof document&&!!document.documentMode&&!a;function h(e,t){var n=0,r=!1,o=window.setInterval((function(){e()&&(window.clearInterval(o),t(r)),n++>50&&(window.clearInterval(o),t(r=!0))}),10)}var d={Android:function(){return o.userAgent.match(/Android/i)},BlackBerry:function(){return o.userAgent.match(/BlackBerry|BB10/i)},iOS:function(){return o.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return o.userAgent.match(/Opera Mini/i)},Windows:function(){return o.userAgent.match(/IEMobile/i)},any:function(){return d.Android()||d.BlackBerry()||d.iOS()||d.Opera()||d.Windows()},getOsName:function(){var e="Unknown OS";return d.Android()&&(e="Android"),d.BlackBerry()&&(e="BlackBerry"),d.iOS()&&(e="iOS"),d.Opera()&&(e="Opera Mini"),d.Windows()&&(e="Windows"),e}};var p="Unknown OS",v="Unknown OS Version";var g=function(){for(var e,t=o.appVersion,n=o.userAgent,r="-",i=[{s:"Chrome OS",r:/CrOS/},{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Windows Vista",r:/Windows NT 6.0/},{s:"Windows Server 2003",r:/Windows NT 5.2/},{s:"Windows XP",r:/(Windows NT 5.1|Windows XP)/},{s:"Windows 2000",r:/(Windows NT 5.0|Windows 2000)/},{s:"Windows ME",r:/(Win 9x 4.90|Windows ME)/},{s:"Windows 98",r:/(Windows 98|Win98)/},{s:"Windows 95",r:/(Windows 95|Win95|Windows_95)/},{s:"Windows NT 4.0",r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:"Windows CE",r:/Windows CE/},{s:"Windows 3.11",r:/Win16/},{s:"Android",r:/Android/},{s:"Open BSD",r:/OpenBSD/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"QNX",r:/QNX/},{s:"UNIX",r:/UNIX/},{s:"BeOS",r:/BeOS/},{s:"OS/2",r:/OS\/2/},{s:"Search Bot",r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}],a=0;e=i[a];a++)if(e.r.test(n)){r=e.s;break}var s="-";switch(/Windows/.test(r)&&(/Windows (.*)/.test(r)&&(s=/Windows (.*)/.exec(r)[1]),r="Windows"),r){case"Mac OS X":/Mac OS X (10[\.\_\d]+)/.test(n)&&(s=/Mac OS X (10[\.\_\d]+)/.exec(n)[1]);break;case"Android":/Android ([\.\_\d]+)/.test(n)&&(s=/Android ([\.\_\d]+)/.exec(n)[1]);break;case"iOS":/OS (\d+)_(\d+)_?(\d+)?/.test(n)&&(s=/OS (\d+)_(\d+)_?(\d+)?/.exec(t))&&s.length>3&&(s=s[1]+"."+s[2]+"."+(0|s[3]))}return{osName:r,osVersion:s}}();g&&g.osName&&"-"!=g.osName?(p=g.osName,v=g.osVersion):d.any()&&"Android"==(p=d.getOsName())&&(v=function(e){var t=(e=(e||o.userAgent).toLowerCase()).match(/android\s([0-9\.]*)/);return!!t&&t[1]}());var m="object"===("undefined"==typeof process?"undefined":S(process))&&"object"===S(process.versions)&&process.versions.node;"Unknown OS"===p&&m&&(p="Nodejs",v=process.versions.node.toString().replace("v",""));var y=!1,b=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(e){"undefined"!=typeof document&&"function"==typeof document.createElement&&(!y&&e in document.createElement("canvas")&&(y=!0),!b&&e in document.createElement("video")&&(b=!0))}));var w=/^(192\.168\.|169\.254\.|10\.|172\.(1[6-9]|2\d|3[01]))/,A=/([0-9]{1,3}(\.[0-9]{1,3}){3})/,x=/[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7}/;var T=[],P=[],C=[],_=[];o.mediaDevices&&o.mediaDevices.enumerateDevices&&(o.enumerateDevices=function(e){var t=o.mediaDevices.enumerateDevices();t&&t.then?o.mediaDevices.enumerateDevices().then(e).catch((function(){e([])})):e([])});var E=!1;("undefined"!=typeof MediaStreamTrack&&"getSources"in MediaStreamTrack||o.mediaDevices&&o.mediaDevices.enumerateDevices)&&(E=!0);var k=!1,R=!1,O=!1,M=!1,F=!1;var I=window.DetectRTC||{};I.browser=function(){o.appVersion;var e,t,n,r=o.userAgent,i=o.appName,h=""+parseFloat(o.appVersion),d=parseInt(o.appVersion,10);if(s){i="Opera";try{d=(h=o.userAgent.split("OPR/")[1].split(" ")[0]).split(".")[0]}catch(yK){h="0.0.0.0",d=0}}else f?((t=r.indexOf("rv:"))>0?h=r.substring(t+3):(t=r.indexOf("MSIE"),h=r.substring(t+5)),i="IE"):l?(t=r.indexOf("Chrome"),i="Chrome",h=r.substring(t+7)):c?-1!==r.indexOf("CriOS")?(t=r.indexOf("CriOS"),i="Chrome",h=r.substring(t+6)):-1!==r.indexOf("FxiOS")?(t=r.indexOf("FxiOS"),i="Firefox",h=r.substring(t+6)):(t=r.indexOf("Safari"),i="Safari",h=r.substring(t+7),-1!==(t=r.indexOf("Version"))&&(h=r.substring(t+8)),-1!==o.userAgent.indexOf("Version/")&&(h=o.userAgent.split("Version/")[1].split(" ")[0])):u?(t=r.indexOf("Firefox"),i="Firefox",h=r.substring(t+8)):(e=r.lastIndexOf(" ")+1)<(t=r.lastIndexOf("/"))&&(i=r.substring(e,t),h=r.substring(t+1),i.toLowerCase()===i.toUpperCase()&&(i=o.appName));return a&&(i="Edge",h=o.userAgent.split("Edge/")[1]),-1!==(n=h.search(/[; \)]/))&&(h=h.substring(0,n)),d=parseInt(""+h,10),isNaN(d)&&(h=""+parseFloat(o.appVersion),d=parseInt(o.appVersion,10)),{fullVersion:h,version:d,name:i,isPrivateBrowsing:!1}}(),function(e){var t;try{if(window.webkitRequestFileSystem)window.webkitRequestFileSystem(window.TEMPORARY,1,(function(){t=!1}),(function(e){t=!0}));else if(window.indexedDB&&/Firefox/.test(window.navigator.userAgent)){var n;try{(n=window.indexedDB.open("test")).onerror=function(){return!0}}catch(yK){t=!0}void 0===t&&h((function(){return"done"===n.readyState}),(function(e){e||(t=!n.result)}))}else if(function(e){var t=e.toLowerCase();if(0===t.indexOf("msie")&&0===t.indexOf("trident"))return!1;var n=/(?:msie|rv:)\s?([\d\.]+)/.exec(t);return!!(n&&parseInt(n[1],10)>=10)}(window.navigator.userAgent)){t=!1;try{window.indexedDB||(t=!0)}catch(yK){t=!0}}else if(window.localStorage&&/Safari/.test(window.navigator.userAgent)){try{window.localStorage.setItem("test",1)}catch(yK){t=!0}void 0===t&&(t=!1,window.localStorage.removeItem("test"))}}catch(yK){t=!1}h((function(){return void 0!==t}),(function(n){e(t)}))}((function(e){I.browser.isPrivateBrowsing=!!e})),I.browser["is"+I.browser.name]=!0,I.osName=p,I.osVersion=v,"object"===("undefined"==typeof process?"undefined":S(process))&&"object"===S(process.versions)&&process.versions["node-webkit"];var D=!1;["RTCPeerConnection","webkitRTCPeerConnection","mozRTCPeerConnection","RTCIceGatherer"].forEach((function(e){D||e in window&&(D=!0)})),I.isWebRTCSupported=D,I.isORTCSupported="undefined"!=typeof RTCIceGatherer;var L=!1;((I.browser.isChrome&&I.browser.version>=35||I.browser.isFirefox&&I.browser.version>=34||I.browser.isEdge&&I.browser.version>=17||"Android"===I.osName&&I.browser.isChrome)&&(L=!0),(o.getDisplayMedia||o.mediaDevices&&o.mediaDevices.getDisplayMedia)&&(L=!0),/^(https:|chrome-extension:)$/g.test(location.protocol||""))||("undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(I.browser.isChrome||I.browser.isEdge||I.browser.isOpera)||I.browser.isFirefox)&&(L=!1);I.isScreenCapturingSupported=L;var j={isSupported:!1,isCreateMediaStreamSourceSupported:!1};["AudioContext","webkitAudioContext","mozAudioContext","msAudioContext"].forEach((function(e){j.isSupported||e in window&&(j.isSupported=!0,window[e]&&"createMediaStreamSource"in window[e].prototype&&(j.isCreateMediaStreamSourceSupported=!0))})),I.isAudioContextSupported=j.isSupported,I.isCreateMediaStreamSourceSupported=j.isCreateMediaStreamSourceSupported;var B=!1;I.browser.isChrome&&I.browser.version>31&&(B=!0),I.isRtpDataChannelsSupported=B;var N=!1;(I.browser.isFirefox&&I.browser.version>28||I.browser.isChrome&&I.browser.version>25||I.browser.isOpera&&I.browser.version>=11)&&(N=!0),I.isSctpDataChannelsSupported=N,I.isMobileDevice=i;var V=!1;(o.getUserMedia||o.mediaDevices&&o.mediaDevices.getUserMedia)&&(V=!0),I.browser.isChrome&&I.browser.version>=46&&!/^(https:|chrome-extension:)$/g.test(location.protocol||"")&&"undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(V="Requires HTTPs"),"Nodejs"===I.osName&&(V=!1),I.isGetUserMediaSupported=V;var U="";screen.width&&(U+=(screen.width?screen.width:"")+" x "+(screen.height?screen.height:""));I.displayResolution=U,I.displayAspectRatio=function(e,t){var n=function e(t,n){return 0==n?t:e(n,t%n)}(e,t);return e/n/(t/n)}(screen.width,screen.height).toFixed(2),I.isCanvasSupportsStreamCapturing=y,I.isVideoSupportsStreamCapturing=b,"Chrome"==I.browser.name&&I.browser.version>=53&&(I.isCanvasSupportsStreamCapturing||(I.isCanvasSupportsStreamCapturing="Requires chrome flag: enable-experimental-web-platform-features"),I.isVideoSupportsStreamCapturing||(I.isVideoSupportsStreamCapturing="Requires chrome flag: enable-experimental-web-platform-features")),I.DetectLocalIPAddress=function(e,t){if(I.isWebRTCSupported){var n=!0,r=!0;!function(e,t){if("undefined"==typeof document||"function"!=typeof document.getElementById)return;var n={},r=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;if(!r){var o=document.getElementById("iframe");if(!o)return;var i=o.contentWindow;r=i.RTCPeerConnection||i.mozRTCPeerConnection||i.webkitRTCPeerConnection}if(!r)return;var a=null;"Chrome"===I.browser&&I.browser.version<58&&(a={optional:[{RtpDataChannels:!0}]});var s=new r({iceServers:[{urls:"stun:stun.l.google.com:19302"}]},a);t&&(s.addStream?s.addStream(t):s.addTrack&&t.getTracks()[0]&&s.addTrack(t.getTracks()[0],t));function u(t){if(t){var r=A.exec(t);if(r){var o=r[1],i=t.match(w),a=!0;void 0===n[o]&&e(o,i,a),n[o]=!0}}else e()}if(s.onicecandidate=function(e){e.candidate&&e.candidate.candidate?u(e.candidate.candidate):u()},!t)try{s.createDataChannel("sctp",{})}catch(yK){}I.isPromisesSupported?s.createOffer().then((function(e){s.setLocalDescription(e).then(c)})):s.createOffer((function(e){s.setLocalDescription(e,c,(function(){}))}),(function(){}));function c(){s.localDescription.sdp.split("\n").forEach((function(e){e&&0===e.indexOf("a=candidate:")&&u(e)}))}}((function(t){t?t.match(w)?e("Local: "+t,n=!1,r):t.match(x)?e("Public: "+t,n,r=!1):e("Public: "+t,n,r):e()}),t)}},I.isWebSocketsSupported="WebSocket"in window&&2===window.WebSocket.CLOSING,I.isWebSocketsBlocked=!I.isWebSocketsSupported,"Nodejs"===I.osName&&(I.isWebSocketsSupported=!0,I.isWebSocketsBlocked=!1),I.checkWebSocketsSupport=function(e){e=e||function(){};try{var t,n=new WebSocket("wss://echo.websocket.org:443/");n.onopen=function(){I.isWebSocketsBlocked=!1,t=(new Date).getTime(),n.send("ping")},n.onmessage=function(){I.WebsocketLatency=(new Date).getTime()-t+"ms",e(),n.close(),n=null},n.onerror=function(){I.isWebSocketsBlocked=!0,e()}}catch(yK){I.isWebSocketsBlocked=!0,e()}},I.load=function(e){!function(e){if(E)if(!o.enumerateDevices&&window.MediaStreamTrack&&window.MediaStreamTrack.getSources&&(o.enumerateDevices=window.MediaStreamTrack.getSources.bind(window.MediaStreamTrack)),!o.enumerateDevices&&o.enumerateDevices&&(o.enumerateDevices=o.enumerateDevices.bind(o)),o.enumerateDevices){T=[],P=[],C=[],_=[],k=!1,R=!1,O=!1,M=!1,F=!1;var t={};o.enumerateDevices((function(n){T=[],P=[],C=[],_=[],n.forEach((function(e){var n={};for(var r in e)try{"function"!=typeof e[r]&&(n[r]=e[r])}catch(yK){}t[n.deviceId+n.label+n.kind]||("audio"===n.kind&&(n.kind="audioinput"),"video"===n.kind&&(n.kind="videoinput"),n.deviceId||(n.deviceId=n.id),n.id||(n.id=n.deviceId),n.label?("videoinput"!==n.kind||F||(F=!0),"audioinput"!==n.kind||M||(M=!0)):(n.isCustomLabel=!0,"videoinput"===n.kind?n.label="Camera "+(_.length+1):"audioinput"===n.kind?n.label="Microphone "+(P.length+1):"audiooutput"===n.kind?n.label="Speaker "+(C.length+1):n.label="Please invoke getUserMedia once.",void 0!==I&&I.browser.isChrome&&I.browser.version>=46&&!/^(https:|chrome-extension:)$/g.test(location.protocol||"")&&"undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(n.label="HTTPs is required to get label of this "+n.kind+" device.")),"audioinput"===n.kind&&(k=!0,-1===P.indexOf(n)&&P.push(n)),"audiooutput"===n.kind&&(R=!0,-1===C.indexOf(n)&&C.push(n)),"videoinput"===n.kind&&(O=!0,-1===_.indexOf(n)&&_.push(n)),T.push(n),t[n.deviceId+n.label+n.kind]=n)})),void 0!==I&&(I.MediaDevices=T,I.hasMicrophone=k,I.hasSpeakers=R,I.hasWebcam=O,I.isWebsiteHasWebcamPermissions=F,I.isWebsiteHasMicrophonePermissions=M,I.audioInputDevices=P,I.audioOutputDevices=C,I.videoInputDevices=_),e&&e()}))}else e&&e();else e&&e()}(e=e||function(){})},I.MediaDevices=void 0!==T?T:[],I.hasMicrophone=k,I.hasSpeakers=R,I.hasWebcam=O,I.isWebsiteHasWebcamPermissions=F,I.isWebsiteHasMicrophonePermissions=M,I.audioInputDevices=P,I.audioOutputDevices=C,I.videoInputDevices=_;var W=!1;"undefined"!=typeof document&&"function"==typeof document.createElement&&"setSinkId"in document.createElement("video")&&(W=!0),I.isSetSinkIdSupported=W;var z=!1;I.browser.isFirefox&&"undefined"!=typeof mozRTCPeerConnection?"getSenders"in mozRTCPeerConnection.prototype&&(z=!0):I.browser.isChrome&&"undefined"!=typeof webkitRTCPeerConnection&&"getSenders"in webkitRTCPeerConnection.prototype&&(z=!0),I.isRTPSenderReplaceTracksSupported=z;var H=!1;I.browser.isFirefox&&I.browser.version>38&&(H=!0),I.isRemoteStreamProcessingSupported=H;var G=!1;"undefined"!=typeof MediaStreamTrack&&"applyConstraints"in MediaStreamTrack.prototype&&(G=!0),I.isApplyConstraintsSupported=G;var X=!1;I.browser.isFirefox&&I.browser.version>=43&&(X=!0),I.isMultiMonitorScreenCapturingSupported=X,I.isPromisesSupported=!!("Promise"in window),I.version="1.4.1",void 0===I&&(window.DetectRTC={});var Q=window.MediaStream;void 0===Q&&"undefined"!=typeof webkitMediaStream&&(Q=webkitMediaStream),I.MediaStream=void 0!==Q&&"function"==typeof Q&&Object.keys(Q.prototype),"undefined"!=typeof MediaStreamTrack?I.MediaStreamTrack=Object.keys(MediaStreamTrack.prototype):I.MediaStreamTrack=!1;var Y=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;I.RTCPeerConnection=void 0!==Y&&Object.keys(Y.prototype),window.DetectRTC=I,e.exports=I}()}(CJ);var _J=CJ.exports,EJ={exports:{}};function SJ(e,t,n){function r(r){n&&!n(e,t)||r.stopImmediatePropagation()}return e.addEventListener(t,r),r}function kJ(e,t,n,r){function o(e){n[t]=e}r&&o(e[t]),Object.defineProperty(e,t,{get:function(){return n[t]},set:o})}function RJ(e,t,n){n.addEventListener(t,(function(){return e.dispatchEvent(new Event(t))}))}function OJ(e,t){Promise.resolve().then((function(){e.dispatchEvent(new Event(t))}))}!function(e){function t(e,o){if(!e)throw"First parameter is required.";o=new n(e,o=o||{type:"video"});var i=this;function a(t){t&&(o.initCallback=function(){t(),t=o.initCallback=null});var n=new r(e,o);(d=new n(e,o)).record(),h("recording"),o.disableLogs||console.log("Initialized recorderType:",d.constructor.name,"for output-type:",o.type)}function s(e){if(e=e||function(){},d){if("paused"===i.state)return i.resumeRecording(),void setTimeout((function(){s(e)}),1);"recording"===i.state||o.disableLogs||console.warn('Recording state should be: "recording", however current state is: ',i.state),o.disableLogs||console.log("Stopped recording "+o.type+" stream."),"gif"!==o.type?d.stop(t):(d.stop(),t()),h("stopped")}else v();function t(t){if(d){Object.keys(d).forEach((function(e){"function"!=typeof d[e]&&(i[e]=d[e])}));var n=d.blob;if(!n){if(!t)throw"Recording failed.";d.blob=n=t}if(n&&!o.disableLogs&&console.log(n.type,"->",m(n.size)),e){var r;try{r=l.createObjectURL(n)}catch(yK){}"function"==typeof e.call?e.call(i,r):e(r)}o.autoWriteToDisk&&c((function(e){var t={};t[o.type+"Blob"]=e,R.Store(t)}))}else"function"==typeof e.call?e.call(i,""):e("")}}function u(e){postMessage((new FileReaderSync).readAsDataURL(e))}function c(e,t){if(!e)throw"Pass a callback function over getDataURL.";var n=t?t.blob:(d||{}).blob;if(!n)return o.disableLogs||console.warn("Blob encoder did not finish its job yet."),void setTimeout((function(){c(e,t)}),1e3);if("undefined"==typeof Worker||navigator.mozGetUserMedia){var r=new FileReader;r.readAsDataURL(n),r.onload=function(t){e(t.target.result)}}else{var i=function(e){try{var t=l.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),n=new Worker(t);return l.revokeObjectURL(t),n}catch(yK){}}(u);i.onmessage=function(t){e(t.data)},i.postMessage(n)}}function f(e){e=e||0,"paused"!==i.state?"stopped"!==i.state&&(e>=i.recordingDuration?s(i.onRecordingStopped):(e+=1e3,setTimeout((function(){f(e)}),1e3))):setTimeout((function(){f(e)}),1e3)}function h(e){i&&(i.state=e,"function"==typeof i.onStateChanged.call?i.onStateChanged.call(i,e):i.onStateChanged(e))}var d,p='It seems that recorder is destroyed or "startRecording" is not invoked for '+o.type+" recorder.";function v(){!0!==o.disableLogs&&console.warn(p)}var g={startRecording:function(t){return o.disableLogs||console.log("RecordRTC version: ",i.version),t&&(o=new n(e,t)),o.disableLogs||console.log("started recording "+o.type+" stream."),d?(d.clearRecordedData(),d.record(),h("recording"),i.recordingDuration&&f(),i):(a((function(){i.recordingDuration&&f()})),i)},stopRecording:s,pauseRecording:function(){d?"recording"===i.state?(h("paused"),d.pause(),o.disableLogs||console.log("Paused recording.")):o.disableLogs||console.warn("Unable to pause the recording. Recording state: ",i.state):v()},resumeRecording:function(){d?"paused"===i.state?(h("recording"),d.resume(),o.disableLogs||console.log("Resumed recording.")):o.disableLogs||console.warn("Unable to resume the recording. Recording state: ",i.state):v()},initRecorder:a,setRecordingDuration:function(e,t){if(void 0===e)throw"recordingDuration is required.";if("number"!=typeof e)throw"recordingDuration must be a number.";return i.recordingDuration=e,i.onRecordingStopped=t||function(){},{onRecordingStopped:function(e){i.onRecordingStopped=e}}},clearRecordedData:function(){d?(d.clearRecordedData(),o.disableLogs||console.log("Cleared old recorded data.")):v()},getBlob:function(){if(d)return d.blob;v()},getDataURL:c,toURL:function(){if(d)return l.createObjectURL(d.blob);v()},getInternalRecorder:function(){return d},save:function(e){d?y(d.blob,e):v()},getFromDisk:function(e){d?t.getFromDisk(o.type,e):v()},setAdvertisementArray:function(e){o.advertisement=[];for(var t=e.length,n=0;n<t;n++)o.advertisement.push({duration:n,image:e[n]})},blob:null,bufferSize:0,sampleRate:0,buffer:null,reset:function(){"recording"!==i.state||o.disableLogs||console.warn("Stop an active recorder."),d&&"function"==typeof d.clearRecordedData&&d.clearRecordedData(),d=null,h("inactive"),i.blob=null},onStateChanged:function(e){o.disableLogs||console.log("Recorder state changed:",e)},state:"inactive",getState:function(){return i.state},destroy:function(){var e=o.disableLogs;o={disableLogs:!0},i.reset(),h("destroyed"),g=i=null,x.AudioContextConstructor&&(x.AudioContextConstructor.close(),x.AudioContextConstructor=null),o.disableLogs=e,o.disableLogs||console.log("RecordRTC is destroyed.")},version:"5.6.2"};if(!this)return i=g,g;for(var b in g)this[b]=g[b];return i=this,g}function n(e,t){return t.recorderType||t.type||(t.audio&&t.video?t.type="video":t.audio&&!t.video&&(t.type="audio")),t.recorderType&&!t.type&&(t.recorderType===E||t.recorderType===_||t.recorderType===I?t.type="video":t.recorderType===O?t.type="gif":t.recorderType===C?t.type="audio":t.recorderType===P&&(w(e,"audio").length&&w(e,"video").length||!w(e,"audio").length&&w(e,"video").length?t.type="video":w(e,"audio").length&&!w(e,"video").length&&(t.type="audio"))),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(t.mimeType||(t.mimeType="video/webm"),t.type||(t.type=t.mimeType.split("/")[0]),t.bitsPerSecond),t.type||(t.mimeType&&(t.type=t.mimeType.split("/")[0]),t.type||(t.type="audio")),t}function r(e,t){var n;return(p||f||h)&&(n=C),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&!p&&(n=P),"video"===t.type&&(p||h)&&(n=E,"undefined"!=typeof ReadableStream&&(n=I)),"gif"===t.type&&(n=O),"canvas"===t.type&&(n=_),T()&&n!==_&&n!==O&&"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(w(e,"video").length||w(e,"audio").length)&&("audio"===t.type?"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("audio/webm")&&(n=P):"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("video/webm")&&(n=P)),e instanceof Array&&e.length&&(n=F),t.recorderType&&(n=t.recorderType),!t.disableLogs&&n&&n.name&&console.log("Using recorderType:",n.name||n.constructor.name),!n&&v&&(n=P),n}function o(e){this.addStream=function(t){t&&(e=t)},this.mediaType={audio:!0,video:!0},this.startRecording=function(){var n,r=this.mediaType,o=this.mimeType||{audio:null,video:null,gif:null};if("function"!=typeof r.audio&&T()&&!w(e,"audio").length&&(r.audio=!1),"function"!=typeof r.video&&T()&&!w(e,"video").length&&(r.video=!1),"function"!=typeof r.gif&&T()&&!w(e,"video").length&&(r.gif=!1),!r.audio&&!r.video&&!r.gif)throw"MediaStream must have either audio or video tracks.";if(r.audio&&(n=null,"function"==typeof r.audio&&(n=r.audio),this.audioRecorder=new t(e,{type:"audio",bufferSize:this.bufferSize,sampleRate:this.sampleRate,numberOfAudioChannels:this.numberOfAudioChannels||2,disableLogs:this.disableLogs,recorderType:n,mimeType:o.audio,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp}),r.video||this.audioRecorder.startRecording()),r.video){n=null,"function"==typeof r.video&&(n=r.video);var i=e;if(T()&&r.audio&&"function"==typeof r.audio){var a=w(e,"video")[0];d?((i=new g).addTrack(a),n&&n===E&&(n=P)):(i=new g).addTrack(a)}this.videoRecorder=new t(i,{type:"video",video:this.video,canvas:this.canvas,frameInterval:this.frameInterval||10,disableLogs:this.disableLogs,recorderType:n,mimeType:o.video,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp,workerPath:this.workerPath,webAssemblyPath:this.webAssemblyPath,frameRate:this.frameRate,bitrate:this.bitrate}),r.audio||this.videoRecorder.startRecording()}if(r.audio&&r.video){var s=this,u=!0===T();(r.audio instanceof C&&r.video||!0!==r.audio&&!0!==r.video&&r.audio!==r.video)&&(u=!1),!0===u?(s.audioRecorder=null,s.videoRecorder.startRecording()):s.videoRecorder.initRecorder((function(){s.audioRecorder.initRecorder((function(){s.videoRecorder.startRecording(),s.audioRecorder.startRecording()}))}))}r.gif&&(n=null,"function"==typeof r.gif&&(n=r.gif),this.gifRecorder=new t(e,{type:"gif",frameRate:this.frameRate||200,quality:this.quality||10,disableLogs:this.disableLogs,recorderType:n,mimeType:o.gif}),this.gifRecorder.startRecording())},this.stopRecording=function(e){e=e||function(){},this.audioRecorder&&this.audioRecorder.stopRecording((function(t){e(t,"audio")})),this.videoRecorder&&this.videoRecorder.stopRecording((function(t){e(t,"video")})),this.gifRecorder&&this.gifRecorder.stopRecording((function(t){e(t,"gif")}))},this.pauseRecording=function(){this.audioRecorder&&this.audioRecorder.pauseRecording(),this.videoRecorder&&this.videoRecorder.pauseRecording(),this.gifRecorder&&this.gifRecorder.pauseRecording()},this.resumeRecording=function(){this.audioRecorder&&this.audioRecorder.resumeRecording(),this.videoRecorder&&this.videoRecorder.resumeRecording(),this.gifRecorder&&this.gifRecorder.resumeRecording()},this.getBlob=function(e){var t={};return this.audioRecorder&&(t.audio=this.audioRecorder.getBlob()),this.videoRecorder&&(t.video=this.videoRecorder.getBlob()),this.gifRecorder&&(t.gif=this.gifRecorder.getBlob()),e&&e(t),t},this.destroy=function(){this.audioRecorder&&(this.audioRecorder.destroy(),this.audioRecorder=null),this.videoRecorder&&(this.videoRecorder.destroy(),this.videoRecorder=null),this.gifRecorder&&(this.gifRecorder.destroy(),this.gifRecorder=null)},this.getDataURL=function(e){function t(e,t){if("undefined"!=typeof Worker){var n=function(e){var t,n=l.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),r=new Worker(n);if(void 0!==l)t=l;else{if("undefined"==typeof webkitURL)throw"Neither URL nor webkitURL detected.";t=webkitURL}return t.revokeObjectURL(n),r}((function(e){postMessage((new FileReaderSync).readAsDataURL(e))}));n.onmessage=function(e){t(e.data)},n.postMessage(e)}else{var r=new FileReader;r.readAsDataURL(e),r.onload=function(e){t(e.target.result)}}}this.getBlob((function(n){n.audio&&n.video?t(n.audio,(function(r){t(n.video,(function(t){e({audio:r,video:t})}))})):n.audio?t(n.audio,(function(t){e({audio:t})})):n.video&&t(n.video,(function(t){e({video:t})}))}))},this.writeToDisk=function(){t.writeToDisk({audio:this.audioRecorder,video:this.videoRecorder,gif:this.gifRecorder})},this.save=function(e){(e=e||{audio:!0,video:!0,gif:!0}).audio&&this.audioRecorder&&this.audioRecorder.save("string"==typeof e.audio?e.audio:""),e.video&&this.videoRecorder&&this.videoRecorder.save("string"==typeof e.video?e.video:""),e.gif&&this.gifRecorder&&this.gifRecorder.save("string"==typeof e.gif?e.gif:"")}}t.version="5.6.2",e.exports=t,t.getFromDisk=function(e,t){if(!t)throw"callback is mandatory.";console.log("Getting recorded "+("all"===e?"blobs":e+" blob ")+" from disk!"),R.Fetch((function(n,r){"all"!==e&&r===e+"Blob"&&t&&t(n),"all"===e&&t&&t(n,r.replace("Blob",""))}))},t.writeToDisk=function(e){console.log("Writing recorded blob(s) to disk!"),(e=e||{}).audio&&e.video&&e.gif?e.audio.getDataURL((function(t){e.video.getDataURL((function(n){e.gif.getDataURL((function(e){R.Store({audioBlob:t,videoBlob:n,gifBlob:e})}))}))})):e.audio&&e.video?e.audio.getDataURL((function(t){e.video.getDataURL((function(e){R.Store({audioBlob:t,videoBlob:e})}))})):e.audio&&e.gif?e.audio.getDataURL((function(t){e.gif.getDataURL((function(e){R.Store({audioBlob:t,gifBlob:e})}))})):e.video&&e.gif?e.video.getDataURL((function(t){e.gif.getDataURL((function(e){R.Store({videoBlob:t,gifBlob:e})}))})):e.audio?e.audio.getDataURL((function(e){R.Store({audioBlob:e})})):e.video?e.video.getDataURL((function(e){R.Store({videoBlob:e})})):e.gif&&e.gif.getDataURL((function(e){R.Store({gifBlob:e})}))},o.getFromDisk=t.getFromDisk,o.writeToDisk=t.writeToDisk,t.MRecordRTC=o;var i;(i=void 0!==q?q:null)&&"undefined"==typeof window&&void 0!==q&&(q.navigator={userAgent:"Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45",getUserMedia:function(){}},q.console||(q.console={}),void 0!==q.console.log&&void 0!==q.console.error||(q.console.error=q.console.log=q.console.log||function(){console.log(arguments)}),"undefined"==typeof document&&(i.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var e={getContext:function(){return e},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return e},i.HTMLVideoElement=function(){}),"undefined"==typeof location&&(i.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(i.screen={width:0,height:0}),void 0===l&&(i.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),i.window=q);var a=window.requestAnimationFrame;if(void 0===a)if("undefined"!=typeof webkitRequestAnimationFrame)a=webkitRequestAnimationFrame;else if("undefined"!=typeof mozRequestAnimationFrame)a=mozRequestAnimationFrame;else if("undefined"!=typeof msRequestAnimationFrame)a=msRequestAnimationFrame;else if(void 0===a){var s=0;a=function(e,t){var n=(new Date).getTime(),r=Math.max(0,16-(n-s)),o=setTimeout((function(){e(n+r)}),r);return s=n+r,o}}var u=window.cancelAnimationFrame;void 0===u&&("undefined"!=typeof webkitCancelAnimationFrame?u=webkitCancelAnimationFrame:"undefined"!=typeof mozCancelAnimationFrame?u=mozCancelAnimationFrame:"undefined"!=typeof msCancelAnimationFrame?u=msCancelAnimationFrame:void 0===u&&(u=function(e){clearTimeout(e)}));var c=window.AudioContext;void 0===c&&("undefined"!=typeof webkitAudioContext&&(c=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(c=mozAudioContext));var l=window.URL;void 0===l&&"undefined"!=typeof webkitURL&&(l=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var f=!(-1===navigator.userAgent.indexOf("Edge")||!navigator.msSaveBlob&&!navigator.msSaveOrOpenBlob),h=!!window.opera||-1!==navigator.userAgent.indexOf("OPR/"),d=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&"netscape"in window&&/ rv:/.test(navigator.userAgent),p=!h&&!f&&!!navigator.webkitGetUserMedia||b()||-1!==navigator.userAgent.toLowerCase().indexOf("chrome/"),v=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);v&&!p&&-1!==navigator.userAgent.indexOf("CriOS")&&(v=!1,p=!0);var g=window.MediaStream;function m(e){if(0===e)return"0 Bytes";var t=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);return(e/Math.pow(1e3,t)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB"][t]}function y(e,t){if(!e)throw"Blob object is required.";if(!e.type)try{e.type="video/webm"}catch(yK){}var n=(e.type||"video/webm").split("/")[1];if(-1!==n.indexOf(";")&&(n=n.split(";")[0]),t&&-1!==t.indexOf(".")){var r=t.split(".");t=r[0],n=r[1]}var o=(t||Math.round(9999999999*Math.random())+888888888)+"."+n;if(void 0!==navigator.msSaveOrOpenBlob)return navigator.msSaveOrOpenBlob(e,o);if(void 0!==navigator.msSaveBlob)return navigator.msSaveBlob(e,o);var i=document.createElement("a");i.href=l.createObjectURL(e),i.download=o,i.style="display:none;opacity:0;color:transparent;",(document.body||document.documentElement).appendChild(i),"function"==typeof i.click?i.click():(i.target="_blank",i.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))),l.revokeObjectURL(i.href)}function b(){return"undefined"!=typeof window&&"object"===S(window.process)&&"renderer"===window.process.type||(!("undefined"==typeof process||"object"!==S(process.versions)||!process.versions.electron)||"object"===("undefined"==typeof navigator?"undefined":S(navigator))&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}function w(e,t){return e&&e.getTracks?e.getTracks().filter((function(e){return e.kind===(t||"audio")})):[]}function A(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}void 0===g&&"undefined"!=typeof webkitMediaStream&&(g=webkitMediaStream),void 0!==g&&void 0===g.prototype.stop&&(g.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))}),t.invokeSaveAsDialog=y,t.getTracks=w,t.getSeekableBlob=function(e,t){if("undefined"==typeof EBML)throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");var n=new EBML.Reader,r=new EBML.Decoder,o=EBML.tools,i=new FileReader;i.onload=function(e){r.decode(this.result).forEach((function(e){n.read(e)})),n.stop();var i=o.makeMetadataSeekable(n.metadatas,n.duration,n.cues),a=this.result.slice(n.metadataSize),s=new Blob([i,a],{type:"video/webm"});t(s)},i.readAsArrayBuffer(e)},t.bytesToSize=m,t.isElectron=b;var x={};function T(){if(d||v||f)return!0;var e,t,n=navigator.userAgent,r=""+parseFloat(navigator.appVersion),o=parseInt(navigator.appVersion,10);return(p||h)&&(e=n.indexOf("Chrome"),r=n.substring(e+7)),-1!==(t=r.indexOf(";"))&&(r=r.substring(0,t)),-1!==(t=r.indexOf(" "))&&(r=r.substring(0,t)),o=parseInt(""+r,10),isNaN(o)&&(r=""+parseFloat(navigator.appVersion),o=parseInt(navigator.appVersion,10)),o>=49}function P(e,t){var n=this;if(void 0===e)throw'First argument "MediaStream" is required.';if("undefined"==typeof MediaRecorder)throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";if("audio"===(t=t||{mimeType:"video/webm"}).type){var r;if(w(e,"video").length&&w(e,"audio").length)navigator.mozGetUserMedia?(r=new g).addTrack(w(e,"audio")[0]):r=new g(w(e,"audio")),e=r;t.mimeType&&-1!==t.mimeType.toString().toLowerCase().indexOf("audio")||(t.mimeType=p?"audio/webm":"audio/ogg"),t.mimeType&&"audio/ogg"!==t.mimeType.toString().toLowerCase()&&navigator.mozGetUserMedia&&(t.mimeType="audio/ogg")}var o,i=[];function a(){n.timestamps.push((new Date).getTime()),"function"==typeof t.onTimeStamp&&t.onTimeStamp(n.timestamps[n.timestamps.length-1],n.timestamps)}function s(e){return o&&o.mimeType?o.mimeType:e.mimeType||"video/webm"}function u(){i=[],o=null,n.timestamps=[]}this.getArrayOfBlobs=function(){return i},this.record=function(){n.blob=null,n.clearRecordedData(),n.timestamps=[],c=[],i=[];var r=t;t.disableLogs||console.log("Passing following config over MediaRecorder API.",r),o&&(o=null),p&&!T()&&(r="video/vp8"),"function"==typeof MediaRecorder.isTypeSupported&&r.mimeType&&(MediaRecorder.isTypeSupported(r.mimeType)||(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",r.mimeType),r.mimeType="audio"===t.type?"audio/webm":"video/webm"));try{o=new MediaRecorder(e,r),t.mimeType=r.mimeType}catch(yK){o=new MediaRecorder(e)}r.mimeType&&!MediaRecorder.isTypeSupported&&"canRecordMimeType"in o&&!1===o.canRecordMimeType(r.mimeType)&&(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",r.mimeType)),o.ondataavailable=function(e){if(e.data&&c.push("ondataavailable: "+m(e.data.size)),"number"!=typeof t.timeSlice)!e.data||!e.data.size||e.data.size<100||n.blob?n.recordingCallback&&(n.recordingCallback(new Blob([],{type:s(r)})),n.recordingCallback=null):(n.blob=t.getNativeBlob?e.data:new Blob([e.data],{type:s(r)}),n.recordingCallback&&(n.recordingCallback(n.blob),n.recordingCallback=null));else if(e.data&&e.data.size&&(i.push(e.data),a(),"function"==typeof t.ondataavailable)){var o=t.getNativeBlob?e.data:new Blob([e.data],{type:s(r)});t.ondataavailable(o)}},o.onstart=function(){c.push("started")},o.onpause=function(){c.push("paused")},o.onresume=function(){c.push("resumed")},o.onstop=function(){c.push("stopped")},o.onerror=function(e){e&&(e.name||(e.name="UnknownError"),c.push("error: "+e),t.disableLogs||(-1!==e.name.toString().toLowerCase().indexOf("invalidstate")?console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.",e):-1!==e.name.toString().toLowerCase().indexOf("notsupported")?console.error("MIME type (",r.mimeType,") is not supported.",e):-1!==e.name.toString().toLowerCase().indexOf("security")?console.error("MediaRecorder security error",e):"OutOfMemory"===e.name?console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"IllegalStreamModification"===e.name?console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"OtherRecordingError"===e.name?console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"GenericError"===e.name?console.error("The UA cannot provide the codec or recording option that has been requested.",e):console.error("MediaRecorder Error",e)),function(e){if(!n.manuallyStopped&&o&&"inactive"===o.state)return delete t.timeslice,void o.start(6e5);setTimeout(void 0,1e3)}(),"inactive"!==o.state&&"stopped"!==o.state&&o.stop())},"number"==typeof t.timeSlice?(a(),o.start(t.timeSlice)):o.start(36e5),t.initCallback&&t.initCallback()},this.timestamps=[],this.stop=function(e){e=e||function(){},n.manuallyStopped=!0,o&&(this.recordingCallback=e,"recording"===o.state&&o.stop(),"number"==typeof t.timeSlice&&setTimeout((function(){n.blob=new Blob(i,{type:s(t)}),n.recordingCallback(n.blob)}),100))},this.pause=function(){o&&"recording"===o.state&&o.pause()},this.resume=function(){o&&"paused"===o.state&&o.resume()},this.clearRecordedData=function(){o&&"recording"===o.state&&n.stop(u),u()},this.getInternalRecorder=function(){return o},this.blob=null,this.getState=function(){return o&&o.state||"inactive"};var c=[];this.getAllStates=function(){return c},void 0===t.checkForInactiveTracks&&(t.checkForInactiveTracks=!1);n=this;!function r(){if(o&&!1!==t.checkForInactiveTracks)return!1===function(){if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}()?(t.disableLogs||console.log("MediaStream seems stopped."),void n.stop()):void setTimeout(r,1e3)}(),this.name="MediaStreamRecorder",this.toString=function(){return this.name}}function C(e,n){if(!w(e,"audio").length)throw"Your stream has no audio tracks.";var r,o=this,i=[],a=[],s=!1,u=0,c=2,f=(n=n||{}).desiredSampRate;function h(){if(!1===n.checkForInactiveTracks)return!0;if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}function d(e,t){function n(e,t){var n,r=e.numberOfAudioChannels,o=e.leftBuffers.slice(0),i=e.rightBuffers.slice(0),a=e.sampleRate,s=e.internalInterleavedLength,u=e.desiredSampRate;function c(e,t,n){var r=Math.round(e.length*(t/n)),o=[],i=Number((e.length-1)/(r-1));o[0]=e[0];for(var a=1;a<r-1;a++){var s=a*i,u=Number(Math.floor(s)).toFixed(),c=Number(Math.ceil(s)).toFixed(),f=s-u;o[a]=l(e[u],e[c],f)}return o[r-1]=e[e.length-1],o}function l(e,t,n){return e+(t-e)*n}function f(e,t){for(var n=new Float64Array(t),r=0,o=e.length,i=0;i<o;i++){var a=e[i];n.set(a,r),r+=a.length}return n}function h(e,t,n){for(var r=n.length,o=0;o<r;o++)e.setUint8(t+o,n.charCodeAt(o))}2===r&&(o=f(o,s),i=f(i,s),u&&(o=c(o,u,a),i=c(i,u,a))),1===r&&(o=f(o,s),u&&(o=c(o,u,a))),u&&(a=u),2===r&&(n=function(e,t){for(var n=e.length+t.length,r=new Float64Array(n),o=0,i=0;i<n;)r[i++]=e[o],r[i++]=t[o],o++;return r}(o,i)),1===r&&(n=o);var d=n.length,p=new ArrayBuffer(44+2*d),v=new DataView(p);h(v,0,"RIFF"),v.setUint32(4,36+2*d,!0),h(v,8,"WAVE"),h(v,12,"fmt "),v.setUint32(16,16,!0),v.setUint16(20,1,!0),v.setUint16(22,r,!0),v.setUint32(24,a,!0),v.setUint32(28,a*r*2,!0),v.setUint16(32,2*r,!0),v.setUint16(34,16,!0),h(v,36,"data"),v.setUint32(40,2*d,!0);for(var g=d,m=44,y=0;y<g;y++)v.setInt16(m,32767*n[y],!0),m+=2;if(t)return t({buffer:p,view:v});postMessage({buffer:p,view:v})}if(e.noWorker)n(e,(function(e){t(e.buffer,e.view)}));else{var r,o,i,a=(r=n,o=l.createObjectURL(new Blob([r.toString(),";this.onmessage = function (eee) {"+r.name+"(eee.data);}"],{type:"application/javascript"})),(i=new Worker(o)).workerURL=o,i);a.onmessage=function(e){t(e.data.buffer,e.data.view),l.revokeObjectURL(a.workerURL),a.terminate()},a.postMessage(e)}}!0===n.leftChannel&&(c=1),1===n.numberOfAudioChannels&&(c=1),(!c||c<1)&&(c=2),n.disableLogs||console.log("StereoAudioRecorder is set to record number of channels: "+c),void 0===n.checkForInactiveTracks&&(n.checkForInactiveTracks=!0),this.record=function(){if(!1===h())throw"Please make sure MediaStream is active.";A(),T=b=!1,s=!0,void 0!==n.timeSlice&&C()},this.stop=function(e){e=e||function(){},s=!1,d({desiredSampRate:f,sampleRate:y,numberOfAudioChannels:c,internalInterleavedLength:u,leftBuffers:i,rightBuffers:1===c?[]:a,noWorker:n.noWorker},(function(t,n){o.blob=new Blob([n],{type:"audio/wav"}),o.buffer=new ArrayBuffer(n.buffer.byteLength),o.view=n,o.sampleRate=f||y,o.bufferSize=m,o.length=u,T=!1,e&&e(o.blob)}))},void 0===t.Storage&&(t.Storage={AudioContextConstructor:null,AudioContext:window.AudioContext||window.webkitAudioContext}),t.Storage.AudioContextConstructor&&"closed"!==t.Storage.AudioContextConstructor.state||(t.Storage.AudioContextConstructor=new t.Storage.AudioContext);var p=t.Storage.AudioContextConstructor,v=p.createMediaStreamSource(e),g=[0,256,512,1024,2048,4096,8192,16384],m=void 0===n.bufferSize?4096:n.bufferSize;if(-1===g.indexOf(m)&&(n.disableLogs||console.log("Legal values for buffer-size are "+JSON.stringify(g,null,"\t"))),p.createJavaScriptNode)r=p.createJavaScriptNode(m,c,c);else{if(!p.createScriptProcessor)throw"WebAudio API has no support on this browser.";r=p.createScriptProcessor(m,c,c)}v.connect(r),n.bufferSize||(m=r.bufferSize);var y=void 0!==n.sampleRate?n.sampleRate:p.sampleRate||44100;(y<22050||y>96e3)&&(n.disableLogs||console.log("sample-rate must be under range 22050 and 96000.")),n.disableLogs||n.desiredSampRate&&console.log("Desired sample-rate: "+n.desiredSampRate);var b=!1;function A(){i=[],a=[],u=0,T=!1,s=!1,b=!1,p=null,o.leftchannel=i,o.rightchannel=a,o.numberOfAudioChannels=c,o.desiredSampRate=f,o.sampleRate=y,o.recordingLength=u,P={left:[],right:[],recordingLength:0}}function x(){r&&(r.onaudioprocess=null,r.disconnect(),r=null),v&&(v.disconnect(),v=null),A()}this.pause=function(){b=!0},this.resume=function(){if(!1===h())throw"Please make sure MediaStream is active.";if(!s)return n.disableLogs||console.log("Seems recording has been restarted."),void this.record();b=!1},this.clearRecordedData=function(){n.checkForInactiveTracks=!1,s&&this.stop(x),x()},this.name="StereoAudioRecorder",this.toString=function(){return this.name};var T=!1;r.onaudioprocess=function(e){if(!b)if(!1===h()&&(n.disableLogs||console.log("MediaStream seems stopped."),r.disconnect(),s=!1),s){T||(T=!0,n.onAudioProcessStarted&&n.onAudioProcessStarted(),n.initCallback&&n.initCallback());var t=e.inputBuffer.getChannelData(0),l=new Float32Array(t);if(i.push(l),2===c){var f=e.inputBuffer.getChannelData(1),d=new Float32Array(f);a.push(d)}u+=m,o.recordingLength=u,void 0!==n.timeSlice&&(P.recordingLength+=m,P.left.push(l),2===c&&P.right.push(d))}else v&&(v.disconnect(),v=null)},p.createMediaStreamDestination?r.connect(p.createMediaStreamDestination()):r.connect(p.destination),this.leftchannel=i,this.rightchannel=a,this.numberOfAudioChannels=c,this.desiredSampRate=f,this.sampleRate=y,o.recordingLength=u;var P={left:[],right:[],recordingLength:0};function C(){s&&"function"==typeof n.ondataavailable&&void 0!==n.timeSlice&&(P.left.length?(d({desiredSampRate:f,sampleRate:y,numberOfAudioChannels:c,internalInterleavedLength:P.recordingLength,leftBuffers:P.left,rightBuffers:1===c?[]:P.right},(function(e,t){var r=new Blob([t],{type:"audio/wav"});n.ondataavailable(r),setTimeout(C,n.timeSlice)})),P={left:[],right:[],recordingLength:0}):setTimeout(C,n.timeSlice))}}function _(e,t){if("undefined"==typeof html2canvas)throw"Please link: https://www.webrtc-experiment.com/screenshot.js";(t=t||{}).frameInterval||(t.frameInterval=10);var n=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(e){e in document.createElement("canvas")&&(n=!0)}));var r,o,i,a=!(!window.webkitRTCPeerConnection&&!window.webkitGetUserMedia||!window.chrome),s=50,u=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(a&&u&&u[2]&&(s=parseInt(u[2],10)),a&&s<52&&(n=!1),t.useWhammyRecorder&&(n=!1),n)if(t.disableLogs||console.log("Your browser supports both MediRecorder API and canvas.captureStream!"),e instanceof HTMLCanvasElement)r=e;else{if(!(e instanceof CanvasRenderingContext2D))throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";r=e.canvas}else navigator.mozGetUserMedia&&(t.disableLogs||console.error("Canvas recording is NOT supported in Firefox."));this.record=function(){if(i=!0,n&&!t.useWhammyRecorder){var e;"captureStream"in r?e=r.captureStream(25):"mozCaptureStream"in r?e=r.mozCaptureStream(25):"webkitCaptureStream"in r&&(e=r.webkitCaptureStream(25));try{var a=new g;a.addTrack(w(e,"video")[0]),e=a}catch(yK){}if(!e)throw"captureStream API are NOT available.";(o=new P(e,{mimeType:t.mimeType||"video/webm"})).record()}else d.frames=[],h=(new Date).getTime(),f();t.initCallback&&t.initCallback()},this.getWebPImages=function(n){if("canvas"===e.nodeName.toLowerCase()){var r=d.frames.length;d.frames.forEach((function(e,n){var o=r-n;t.disableLogs||console.log(o+"/"+r+" frames remaining"),t.onEncodingCallback&&t.onEncodingCallback(o,r);var i=e.image.toDataURL("image/webp",1);d.frames[n].image=i})),t.disableLogs||console.log("Generating WebM"),n()}else n()},this.stop=function(e){i=!1;var r=this;n&&o?o.stop(e):this.getWebPImages((function(){d.compile((function(n){t.disableLogs||console.log("Recording finished!"),r.blob=n,r.blob.forEach&&(r.blob=new Blob([],{type:"video/webm"})),e&&e(r.blob),d.frames=[]}))}))};var c=!1;function l(){d.frames=[],i=!1,c=!1}function f(){if(c)return h=(new Date).getTime(),setTimeout(f,500);if("canvas"===e.nodeName.toLowerCase()){var n=(new Date).getTime()-h;return h=(new Date).getTime(),d.frames.push({image:(r=document.createElement("canvas"),o=r.getContext("2d"),r.width=e.width,r.height=e.height,o.drawImage(e,0,0),r),duration:n}),void(i&&setTimeout(f,t.frameInterval))}var r,o;html2canvas(e,{grabMouse:void 0===t.showMousePointer||t.showMousePointer,onrendered:function(e){var n=(new Date).getTime()-h;if(!n)return setTimeout(f,t.frameInterval);h=(new Date).getTime(),d.frames.push({image:e.toDataURL("image/webp",1),duration:n}),i&&setTimeout(f,t.frameInterval)}})}this.pause=function(){c=!0,o instanceof P&&o.pause()},this.resume=function(){c=!1,o instanceof P?o.resume():i||this.record()},this.clearRecordedData=function(){i&&this.stop(l),l()},this.name="CanvasRecorder",this.toString=function(){return this.name};var h=(new Date).getTime(),d=new k.Video(100)}function E(e,t){function n(e){e=void 0!==e?e:10;var t=(new Date).getTime()-u;return t?i?(u=(new Date).getTime(),setTimeout(n,100)):(u=(new Date).getTime(),s.paused&&s.play(),f.drawImage(s,0,0,l.width,l.height),c.frames.push({duration:t,image:l.toDataURL("image/webp")}),void(o||setTimeout(n,e,e))):setTimeout(n,e,e)}function r(e,t,n,r,o){var i=document.createElement("canvas");i.width=l.width,i.height=l.height;var a=i.getContext("2d"),s=[],u=-1===t,c=t&&t>0&&t<=e.length?t:e.length,f=0,h=0,d=0,p=Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2)),v=n&&n>=0&&n<=1?n:0,g=r&&r>=0&&r<=1?r:0,m=!1;!function(e){var t=-1,n=e.length;!function r(){++t!==n?setTimeout((function(){e.functionToLoop(r,t)}),1):e.callback()}()}({length:c,functionToLoop:function(t,n){var r,o,i,c=function(){!m&&i-r<=i*g||(u&&(m=!0),s.push(e[n])),t()};if(m)c();else{var y=new Image;y.onload=function(){a.drawImage(y,0,0,l.width,l.height);var e=a.getImageData(0,0,l.width,l.height);r=0,o=e.data.length,i=e.data.length/4;for(var t=0;t<o;t+=4){var n={r:e.data[t],g:e.data[t+1],b:e.data[t+2]};Math.sqrt(Math.pow(n.r-f,2)+Math.pow(n.g-h,2)+Math.pow(n.b-d,2))<=p*v&&r++}c()},y.src=e[n].image}},callback:function(){(s=s.concat(e.slice(c))).length<=0&&s.push(e[e.length-1]),o(s)}})}(t=t||{}).frameInterval||(t.frameInterval=10),t.disableLogs||console.log("Using frames-interval:",t.frameInterval),this.record=function(){t.width||(t.width=320),t.height||(t.height=240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),l.width=t.canvas.width||320,l.height=t.canvas.height||240,f=l.getContext("2d"),t.video&&t.video instanceof HTMLVideoElement?(s=t.video.cloneNode(),t.initCallback&&t.initCallback()):(s=document.createElement("video"),A(e,s),s.onloadedmetadata=function(){t.initCallback&&t.initCallback()},s.width=t.video.width,s.height=t.video.height),s.muted=!0,s.play(),u=(new Date).getTime(),c=new k.Video,t.disableLogs||(console.log("canvas resolutions",l.width,"*",l.height),console.log("video width/height",s.width||l.width,"*",s.height||l.height)),n(t.frameInterval)};var o=!1;this.stop=function(e){e=e||function(){},o=!0;var n=this;setTimeout((function(){r(c.frames,-1,null,null,(function(r){c.frames=r,t.advertisement&&t.advertisement.length&&(c.frames=t.advertisement.concat(c.frames)),c.compile((function(t){n.blob=t,n.blob.forEach&&(n.blob=new Blob([],{type:"video/webm"})),e&&e(n.blob)}))}))}),10)};var i=!1;function a(){c.frames=[],o=!0,i=!1}this.pause=function(){i=!0},this.resume=function(){i=!1,o&&this.record()},this.clearRecordedData=function(){o||this.stop(a),a()},this.name="WhammyRecorder",this.toString=function(){return this.name};var s,u,c,l=document.createElement("canvas"),f=l.getContext("2d")}void 0!==c?x.AudioContext=c:"undefined"!=typeof webkitAudioContext&&(x.AudioContext=webkitAudioContext),t.Storage=x,t.MediaStreamRecorder=P,t.StereoAudioRecorder=C,t.CanvasRecorder=_,t.WhammyRecorder=E;var k=function(){function e(e){this.frames=[],this.duration=e||1,this.quality=.8}function t(e){function t(e,t,n){return[{data:e,id:231}].concat(n.map((function(e){var n=function(e){var t=0;e.keyframe&&(t|=128);e.invisible&&(t|=8);e.lacing&&(t|=e.lacing<<1);e.discardable&&(t|=1);if(e.trackNum>127)throw"TrackNumber > 127 not supported";var n=[128|e.trackNum,e.timecode>>8,255&e.timecode,t].map((function(e){return String.fromCharCode(e)})).join("")+e.frame;return n}({discardable:0,frame:e.data.slice(4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math.round(t)});return t+=e.duration,{data:n,id:163}})))}function n(e){for(var t=[];e>0;)t.push(255&e),e>>=8;return new Uint8Array(t.reverse())}function r(e){var t=[];e=(e.length%8?new Array(9-e.length%8).join("0"):"")+e;for(var n=0;n<e.length;n+=8)t.push(parseInt(e.substr(n,8),2));return new Uint8Array(t)}function o(e){for(var t=[],i=0;i<e.length;i++){var a=e[i].data;"object"===S(a)&&(a=o(a)),"number"==typeof a&&(a=r(a.toString(2))),"string"==typeof a&&(a=new Uint8Array(a.split("").map((function(e){return e.charCodeAt(0)}))));var s=a.size||a.byteLength||a.length,u=Math.ceil(Math.ceil(Math.log(s)/Math.log(2))/8),c=s.toString(2),l=new Array(7*u+7+1-c.length).join("0")+c,f=new Array(u).join("0")+"1"+l;t.push(n(e[i].id)),t.push(r(f)),t.push(a)}return new Blob(t,{type:"video/webm"})}function i(e,t){return parseInt(e.substr(t+4,4).split("").map((function(e){var t=e.charCodeAt(0).toString(2);return new Array(8-t.length+1).join("0")+t})).join(""),2)}function a(e){for(var t=0,n={};t<e.length;){var r=e.substr(t,4),o=i(e,t),s=e.substr(t+4+4,o);t+=8+o,n[r]=n[r]||[],"RIFF"===r||"LIST"===r?n[r].push(a(s)):n[r].push(s)}return n}var s=new function(e){var n=function(e){if(!e[0])return void postMessage({error:"Something went wrong. Maybe WebP format is not supported in the current browser."});for(var t=e[0].width,n=e[0].height,r=e[0].duration,o=1;o<e.length;o++)r+=e[o].duration;return{duration:r,width:t,height:n}}(e);if(!n)return[];for(var r,i=[{id:440786851,data:[{data:1,id:17030},{data:1,id:17143},{data:4,id:17138},{data:8,id:17139},{data:"webm",id:17026},{data:2,id:17031},{data:2,id:17029}]},{id:408125543,data:[{id:357149030,data:[{data:1e6,id:2807729},{data:"whammy",id:19840},{data:"whammy",id:22337},{data:(r=n.duration,[].slice.call(new Uint8Array(new Float64Array([r]).buffer),0).map((function(e){return String.fromCharCode(e)})).reverse().join("")),id:17545}]},{id:374648427,data:[{id:174,data:[{data:1,id:215},{data:1,id:29637},{data:0,id:156},{data:"und",id:2274716},{data:"V_VP8",id:134},{data:"VP8",id:2459272},{data:1,id:131},{id:224,data:[{data:n.width,id:176},{data:n.height,id:186}]}]}]}]}],a=0,s=0;a<e.length;){var u=[],c=0;do{u.push(e[a]),c+=e[a].duration,a++}while(a<e.length&&c<3e4);var l={id:524531317,data:t(s,0,u)};i[1].data.push(l),s+=c}return o(i)}(e.map((function(e){var t=function(e){for(var t=e.RIFF[0].WEBP[0],n=t.indexOf("*"),r=0,o=[];r<4;r++)o[r]=t.charCodeAt(n+3+r);return{width:16383&(o[1]<<8|o[0]),height:16383&(o[3]<<8|o[2]),data:t,riff:e}}(a(atob(e.image.slice(23))));return t.duration=e.duration,t})));postMessage(s)}return e.prototype.add=function(e,t){if("canvas"in e&&(e=e.canvas),"toDataURL"in e&&(e=e.toDataURL("image/webp",this.quality)),!/^data:image\/webp;base64,/gi.test(e))throw"Input must be formatted properly as a base64 encoded DataURI of type image/webp";this.frames.push({image:e,duration:t||this.duration})},e.prototype.compile=function(e){var n,r,o,i=(n=t,r=l.createObjectURL(new Blob([n.toString(),"this.onmessage = function (eee) {"+n.name+"(eee.data);}"],{type:"application/javascript"})),o=new Worker(r),l.revokeObjectURL(r),o);i.onmessage=function(t){t.data.error?console.error(t.data.error):e(t.data)},i.postMessage(this.frames)},{Video:e}}();t.Whammy=k;var R={init:function(){var e=this;if("undefined"!=typeof indexedDB&&void 0!==indexedDB.open){var t,n=this.dbName||location.href.replace(/\/|:|#|%|\.|\[|\]/g,""),r=indexedDB.open(n,1);r.onerror=e.onError,r.onsuccess=function(){((t=r.result).onerror=e.onError,t.setVersion)?1!==t.version?t.setVersion(1).onsuccess=function(){o(t),i()}:i():i()},r.onupgradeneeded=function(e){o(e.target.result)}}else console.error("IndexedDB API are not available in this browser.");function o(t){t.createObjectStore(e.dataStoreName)}function i(){var n=t.transaction([e.dataStoreName],"readwrite");function r(t){n.objectStore(e.dataStoreName).get(t).onsuccess=function(n){e.callback&&e.callback(n.target.result,t)}}e.videoBlob&&n.objectStore(e.dataStoreName).put(e.videoBlob,"videoBlob"),e.gifBlob&&n.objectStore(e.dataStoreName).put(e.gifBlob,"gifBlob"),e.audioBlob&&n.objectStore(e.dataStoreName).put(e.audioBlob,"audioBlob"),r("audioBlob"),r("videoBlob"),r("gifBlob")}},Fetch:function(e){return this.callback=e,this.init(),this},Store:function(e){return this.audioBlob=e.audioBlob,this.videoBlob=e.videoBlob,this.gifBlob=e.gifBlob,this.init(),this},onError:function(e){console.error(JSON.stringify(e,null,"\t"))},dataStoreName:"recordRTC",dbName:null};function O(e,t){if("undefined"==typeof GIFEncoder){var n=document.createElement("script");n.src="https://www.webrtc-experiment.com/gif-recorder.js",(document.body||document.documentElement).appendChild(n)}t=t||{};var r=e instanceof CanvasRenderingContext2D||e instanceof HTMLCanvasElement;this.record=function(){"undefined"!=typeof GIFEncoder&&c?(r||(t.width||(t.width=l.offsetWidth||320),t.height||(t.height=l.offsetHeight||240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),i.width=t.canvas.width||320,i.height=t.canvas.height||240,l.width=t.video.width||320,l.height=t.video.height||240),(h=new GIFEncoder).setRepeat(0),h.setDelay(t.frameRate||200),h.setQuality(t.quality||10),h.start(),"function"==typeof t.onGifRecordingStarted&&t.onGifRecordingStarted(),d=a((function e(n){if(!0!==p.clearedRecordedData){if(o)return setTimeout((function(){e(n)}),100);d=a(e),void 0===S(f)&&(f=n),n-f<90||(!r&&l.paused&&l.play(),r||s.drawImage(l,0,0,i.width,i.height),t.onGifPreview&&t.onGifPreview(i.toDataURL("image/png")),h.addFrame(s),f=n)}})),t.initCallback&&t.initCallback()):setTimeout(p.record,1e3)},this.stop=function(e){e=e||function(){},d&&u(d),this.blob=new Blob([new Uint8Array(h.stream().bin)],{type:"image/gif"}),e(this.blob),h.stream().bin=[]};var o=!1;this.pause=function(){o=!0},this.resume=function(){o=!1},this.clearRecordedData=function(){p.clearedRecordedData=!0,h&&(h.stream().bin=[])},this.name="GifRecorder",this.toString=function(){return this.name};var i=document.createElement("canvas"),s=i.getContext("2d");r&&(e instanceof CanvasRenderingContext2D?i=(s=e).canvas:e instanceof HTMLCanvasElement&&(s=e.getContext("2d"),i=e));var c=!0;if(!r){var l=document.createElement("video");l.muted=!0,l.autoplay=!0,l.playsInline=!0,c=!1,l.onloadedmetadata=function(){c=!0},A(e,l),l.play()}var f,h,d=null,p=this}function M(e,t){t=t||"multi-streams-mixer";var n=[],r=!1,o=document.createElement("canvas"),i=o.getContext("2d");o.style.opacity=0,o.style.position="absolute",o.style.zIndex=-1,o.style.top="-1000em",o.style.left="-1000em",o.className=t,(document.body||document.documentElement).appendChild(o),this.disableLogs=!1,this.frameInterval=10,this.width=360,this.height=240,this.useGainNode=!0;var a=this,s=window.AudioContext;void 0===s&&("undefined"!=typeof webkitAudioContext&&(s=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(s=mozAudioContext));var u=window.URL;void 0===u&&"undefined"!=typeof webkitURL&&(u=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var c=window.MediaStream;void 0===c&&"undefined"!=typeof webkitMediaStream&&(c=webkitMediaStream),void 0!==c&&void 0===c.prototype.stop&&(c.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))});var l={};function f(){if(!r){var e=n.length,t=!1,i=[];if(n.forEach((function(e){e.stream||(e.stream={}),e.stream.fullcanvas?t=e:i.push(e)})),t)o.width=t.stream.width,o.height=t.stream.height;else if(i.length){o.width=e>1?2*i[0].width:i[0].width;var s=1;3!==e&&4!==e||(s=2),5!==e&&6!==e||(s=3),7!==e&&8!==e||(s=4),9!==e&&10!==e||(s=5),o.height=i[0].height*s}else o.width=a.width||360,o.height=a.height||240;t&&t instanceof HTMLVideoElement&&h(t),i.forEach((function(e,t){h(e,t)})),setTimeout(f,a.frameInterval)}}function h(e,t){if(!r){var n=0,o=0,a=e.width,s=e.height;1===t&&(n=e.width),2===t&&(o=e.height),3===t&&(n=e.width,o=e.height),4===t&&(o=2*e.height),5===t&&(n=e.width,o=2*e.height),6===t&&(o=3*e.height),7===t&&(n=e.width,o=3*e.height),void 0!==e.stream.left&&(n=e.stream.left),void 0!==e.stream.top&&(o=e.stream.top),void 0!==e.stream.width&&(a=e.stream.width),void 0!==e.stream.height&&(s=e.stream.height),i.drawImage(e,n,o,a,s),"function"==typeof e.stream.onRender&&e.stream.onRender(i,n,o,a,s,t)}}function d(e){var n=document.createElement("video");return function(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}(e,n),n.className=t,n.muted=!0,n.volume=0,n.width=e.width||a.width||360,n.height=e.height||a.height||240,n.play(),n}function p(t){n=[],(t=t||e).forEach((function(e){if(e.getTracks().filter((function(e){return"video"===e.kind})).length){var t=d(e);t.stream=e,n.push(t)}}))}void 0!==s?l.AudioContext=s:"undefined"!=typeof webkitAudioContext&&(l.AudioContext=webkitAudioContext),this.startDrawingFrames=function(){f()},this.appendStreams=function(t){if(!t)throw"First parameter is required.";t instanceof Array||(t=[t]),t.forEach((function(t){var r=new c;if(t.getTracks().filter((function(e){return"video"===e.kind})).length){var o=d(t);o.stream=t,n.push(o),r.addTrack(t.getTracks().filter((function(e){return"video"===e.kind}))[0])}if(t.getTracks().filter((function(e){return"audio"===e.kind})).length){var i=a.audioContext.createMediaStreamSource(t);a.audioDestination=a.audioContext.createMediaStreamDestination(),i.connect(a.audioDestination),r.addTrack(a.audioDestination.stream.getTracks().filter((function(e){return"audio"===e.kind}))[0])}e.push(r)}))},this.releaseStreams=function(){n=[],r=!0,a.gainNode&&(a.gainNode.disconnect(),a.gainNode=null),a.audioSources.length&&(a.audioSources.forEach((function(e){e.disconnect()})),a.audioSources=[]),a.audioDestination&&(a.audioDestination.disconnect(),a.audioDestination=null),a.audioContext&&a.audioContext.close(),a.audioContext=null,i.clearRect(0,0,o.width,o.height),o.stream&&(o.stream.stop(),o.stream=null)},this.resetVideoStreams=function(e){!e||e instanceof Array||(e=[e]),p(e)},this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=function(){r=!1;var t=function(){var e;p(),"captureStream"in o?e=o.captureStream():"mozCaptureStream"in o?e=o.mozCaptureStream():a.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var t=new c;return e.getTracks().filter((function(e){return"video"===e.kind})).forEach((function(e){t.addTrack(e)})),o.stream=t,t}(),n=function(){l.AudioContextConstructor||(l.AudioContextConstructor=new l.AudioContext);a.audioContext=l.AudioContextConstructor,a.audioSources=[],!0===a.useGainNode&&(a.gainNode=a.audioContext.createGain(),a.gainNode.connect(a.audioContext.destination),a.gainNode.gain.value=0);var t=0;if(e.forEach((function(e){if(e.getTracks().filter((function(e){return"audio"===e.kind})).length){t++;var n=a.audioContext.createMediaStreamSource(e);!0===a.useGainNode&&n.connect(a.gainNode),a.audioSources.push(n)}})),!t)return;return a.audioDestination=a.audioContext.createMediaStreamDestination(),a.audioSources.forEach((function(e){e.connect(a.audioDestination)})),a.audioDestination.stream}();return n&&n.getTracks().filter((function(e){return"audio"===e.kind})).forEach((function(e){t.addTrack(e)})),e.forEach((function(e){e.fullcanvas})),t}}function F(e,t){e=e||[];var n,r,o=this;(t=t||{elementClass:"multi-streams-mixer",mimeType:"video/webm",video:{width:360,height:240}}).frameInterval||(t.frameInterval=10),t.video||(t.video={}),t.video.width||(t.video.width=360),t.video.height||(t.video.height=240),this.record=function(){var o;n=new M(e,t.elementClass||"multi-streams-mixer"),(o=[],e.forEach((function(e){w(e,"video").forEach((function(e){o.push(e)}))})),o).length&&(n.frameInterval=t.frameInterval||10,n.width=t.video.width||360,n.height=t.video.height||240,n.startDrawingFrames()),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(n.getMixedStream()),(r=new P(n.getMixedStream(),t)).record()},this.stop=function(e){r&&r.stop((function(t){o.blob=t,e(t),o.clearRecordedData()}))},this.pause=function(){r&&r.pause()},this.resume=function(){r&&r.resume()},this.clearRecordedData=function(){r&&(r.clearRecordedData(),r=null),n&&(n.releaseStreams(),n=null)},this.addStreams=function(o){if(!o)throw"First parameter is required.";o instanceof Array||(o=[o]),e.concat(o),r&&n&&(n.appendStreams(o),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(n.getMixedStream()))},this.resetVideoStreams=function(e){n&&(!e||e instanceof Array||(e=[e]),n.resetVideoStreams(e))},this.getMixer=function(){return n},this.name="MultiStreamRecorder",this.toString=function(){return this.name}}function I(e,t){var n,r,o;function i(){return new ReadableStream({start:function(r){var o=document.createElement("canvas"),i=document.createElement("video"),a=!0;i.srcObject=e,i.muted=!0,i.height=t.height,i.width=t.width,i.volume=0,i.onplaying=function(){o.width=t.width,o.height=t.height;var e=o.getContext("2d"),s=1e3/t.frameRate,u=setInterval((function(){if(n&&(clearInterval(u),r.close()),a&&(a=!1,t.onVideoProcessStarted&&t.onVideoProcessStarted()),e.drawImage(i,0,0),"closed"!==r._controlledReadableStream.state)try{r.enqueue(e.getImageData(0,0,t.width,t.height))}catch(yK){}}),s)},i.play()}})}function a(e,u){if(!t.workerPath&&!u)return n=!1,void fetch("https://unpkg.com/webm-wasm@latest/dist/webm-worker.js").then((function(t){t.arrayBuffer().then((function(t){a(e,t)}))}));if(!t.workerPath&&u instanceof ArrayBuffer){var c=new Blob([u],{type:"text/javascript"});t.workerPath=l.createObjectURL(c)}t.workerPath||console.error("workerPath parameter is missing."),(r=new Worker(t.workerPath)).postMessage(t.webAssemblyPath||"https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"),r.addEventListener("message",(function(e){"READY"===e.data?(r.postMessage({width:t.width,height:t.height,bitrate:t.bitrate||1200,timebaseDen:t.frameRate||30,realtime:t.realtime}),i().pipeTo(new WritableStream({write:function(e){n?console.error("Got image, but recorder is finished!"):r.postMessage(e.data.buffer,[e.data.buffer])}}))):e.data&&(o||s.push(e.data))}))}"undefined"!=typeof ReadableStream&&"undefined"!=typeof WritableStream||console.error("Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js"),(t=t||{}).width=t.width||640,t.height=t.height||480,t.frameRate=t.frameRate||30,t.bitrate=t.bitrate||1200,t.realtime=t.realtime||!0,this.record=function(){s=[],o=!1,this.blob=null,a(e),"function"==typeof t.initCallback&&t.initCallback()},this.pause=function(){o=!0},this.resume=function(){o=!1};var s=[];this.stop=function(e){n=!0;var t=this;!function(e){r?(r.addEventListener("message",(function(t){null===t.data&&(r.terminate(),r=null,e&&e())})),r.postMessage(null)):e&&e()}((function(){t.blob=new Blob(s,{type:"video/webm"}),e(t.blob)}))},this.name="WebAssemblyRecorder",this.toString=function(){return this.name},this.clearRecordedData=function(){s=[],o=!1,this.blob=null},this.blob=null}t.DiskStorage=R,t.GifRecorder=O,t.MultiStreamRecorder=F,t.RecordRTCPromisesHandler=function(e,n){if(!this)throw'Use "new RecordRTCPromisesHandler()"';if(void 0===e)throw'First argument "MediaStream" is required.';var r=this;r.recordRTC=new t(e,n),this.startRecording=function(){return new Promise((function(e,t){try{r.recordRTC.startRecording(),e()}catch(yK){t(yK)}}))},this.stopRecording=function(){return new Promise((function(e,t){try{r.recordRTC.stopRecording((function(n){r.blob=r.recordRTC.getBlob(),r.blob&&r.blob.size?e(n):t("Empty blob.",r.blob)}))}catch(yK){t(yK)}}))},this.pauseRecording=function(){return new Promise((function(e,t){try{r.recordRTC.pauseRecording(),e()}catch(yK){t(yK)}}))},this.resumeRecording=function(){return new Promise((function(e,t){try{r.recordRTC.resumeRecording(),e()}catch(yK){t(yK)}}))},this.getDataURL=function(e){return new Promise((function(e,t){try{r.recordRTC.getDataURL((function(t){e(t)}))}catch(yK){t(yK)}}))},this.getBlob=function(){return new Promise((function(e,t){try{e(r.recordRTC.getBlob())}catch(yK){t(yK)}}))},this.getInternalRecorder=function(){return new Promise((function(e,t){try{e(r.recordRTC.getInternalRecorder())}catch(yK){t(yK)}}))},this.reset=function(){return new Promise((function(e,t){try{e(r.recordRTC.reset())}catch(yK){t(yK)}}))},this.destroy=function(){return new Promise((function(e,t){try{e(r.recordRTC.destroy())}catch(yK){t(yK)}}))},this.getState=function(){return new Promise((function(e,t){try{e(r.recordRTC.getState())}catch(yK){t(yK)}}))},this.blob=null,this.version="5.6.2"},t.WebAssemblyRecorder=I}(EJ);var MJ="object"===("undefined"==typeof document?"undefined":S(document))&&"object-fit"in document.head.style&&!matchMedia("(-webkit-video-playable-inline)").matches,FJ="bfred-it:iphone-inline-video",IJ="bfred-it:iphone-inline-video:event",DJ="bfred-it:iphone-inline-video:nativeplay",LJ="bfred-it:iphone-inline-video:nativepause";var jJ,BJ=[],NJ=0;function VJ(e,t,n){(jJ||0)+200<Date.now()&&(e[IJ]=!0,jJ=Date.now()),n||(e.currentTime=t),BJ[++NJ%3]=100*t|0}function UJ(e){return e.driver.currentTime>=e.video.duration}function WJ(e){var t=this;t.video.readyState>=t.video.HAVE_FUTURE_DATA?(t.hasAudio||(t.driver.currentTime=t.video.currentTime+e*t.video.playbackRate/1e3,t.video.loop&&UJ(t)&&(t.driver.currentTime=0)),VJ(t.video,t.driver.currentTime)):t.video.networkState===t.video.NETWORK_IDLE&&0===t.video.buffered.length&&t.video.load(),t.video.ended&&(delete t.video[IJ],t.video.pause(!0))}function zJ(){var e=this,t=e[FJ];e.webkitDisplayingFullscreen?e[DJ]():("data:"!==t.driver.src&&t.driver.src!==e.src&&(VJ(e,0,!0),t.driver.src=e.src),e.paused&&(t.paused=!1,0===e.buffered.length&&e.load(),t.driver.play(),t.updater.start(),t.hasAudio||(OJ(e,"play"),t.video.readyState>=t.video.HAVE_ENOUGH_DATA&&OJ(e,"playing"))))}function HJ(e){var t=this,n=t[FJ];n.driver.pause(),n.updater.stop(),t.webkitDisplayingFullscreen&&t[LJ](),n.paused&&!e||(n.paused=!0,n.hasAudio||OJ(t,"pause"),t.ended&&!t.webkitDisplayingFullscreen&&(t[IJ]=!0,OJ(t,"ended")))}function GJ(e,t){var n={};e[FJ]=n,n.paused=!0,n.hasAudio=t,n.video=e,n.updater=function(e,t,n,r){var o,i;function a(n){o=t(a,r),e(n-(i||n)),i=n}return{start:function(){o||a(0)},stop:function(){n(o),o=null,i=0}}}(WJ.bind(n),requestAnimationFrame,cancelAnimationFrame),t?n.driver=function(e){var t=new Audio;return RJ(e,"play",t),RJ(e,"playing",t),RJ(e,"pause",t),t.crossOrigin=e.crossOrigin,t.src=e.src||e.currentSrc||"data:",t}(e):(e.addEventListener("canplay",(function(){e.paused||OJ(e,"playing")})),n.driver={src:e.src||e.currentSrc||"data:",muted:!0,paused:!0,pause:function(){n.driver.paused=!0},play:function(){n.driver.paused=!1,UJ(n)&&VJ(e,0)},get ended(){return UJ(n)}}),e.addEventListener("emptied",(function(){var r=!n.driver.src||"data:"===n.driver.src;n.driver.src&&n.driver.src!==e.src&&(VJ(e,0,!0),n.driver.src=e.src,r||!t&&e.autoplay?n.driver.play():n.updater.stop())}),!1),e.addEventListener("webkitbeginfullscreen",(function(){e.paused?t&&0===n.driver.buffered.length&&n.driver.load():(e.pause(),e[DJ]())})),t&&(e.addEventListener("webkitendfullscreen",(function(){n.driver.currentTime=e.currentTime})),e.addEventListener("seeking",(function(){BJ.indexOf(100*e.currentTime|0)<0&&(n.driver.currentTime=e.currentTime)})))}function XJ(e){var t=e[IJ];return delete e[IJ],!e.webkitDisplayingFullscreen&&!t}function QJ(e,t){if(void 0===t&&(t={}),!e[FJ]){if(!t.everywhere){if(!MJ)return;if(!(t.iPad||t.ipad?/iPhone|iPod|iPad/:/iPhone|iPod/).test(navigator.userAgent))return}e.pause();var n=e.autoplay;e.autoplay=!1,GJ(e,!e.muted),function(e){var t=e[FJ];e[DJ]=e.play,e[LJ]=e.pause,e.play=zJ,e.pause=HJ,kJ(e,"paused",t.driver),kJ(e,"muted",t.driver,!0),kJ(e,"playbackRate",t.driver,!0),kJ(e,"ended",t.driver),kJ(e,"loop",t.driver,!0),SJ(e,"seeking",(function(e){return!e.webkitDisplayingFullscreen})),SJ(e,"seeked",(function(e){return!e.webkitDisplayingFullscreen})),SJ(e,"timeupdate",XJ),SJ(e,"ended",XJ)}(e),e.classList.add("IIV"),e.muted&&n&&(e.play(),e.addEventListener("playing",(function t(){e.autoplay=!0,e.removeEventListener("playing",t)}))),/iPhone|iPod|iPad/.test(navigator.platform)||console.warn("iphone-inline-video is not guaranteed to work in emulated environments")}}var YJ={exports:{}},qJ={exports:{}};(function(){var e,t,n,r,o,i;"undefined"!=typeof performance&&null!==performance&&performance.now?qJ.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(qJ.exports=function(){return(e()-o)/1e6},t=process.hrtime,r=(e=function(){var e;return 1e9*(e=t())[0]+e[1]})(),i=1e9*process.uptime(),o=r-i):Date.now?(qJ.exports=function(){return Date.now()-n},n=Date.now()):(qJ.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(q);for(var KJ=qJ.exports,JJ="undefined"==typeof window?q:window,ZJ=["moz","webkit"],$J="AnimationFrame",eZ=JJ["request"+$J],tZ=JJ["cancel"+$J]||JJ["cancelRequest"+$J],nZ=0;!eZ&&nZ<ZJ.length;nZ++)eZ=JJ[ZJ[nZ]+"Request"+$J],tZ=JJ[ZJ[nZ]+"Cancel"+$J]||JJ[ZJ[nZ]+"CancelRequest"+$J];if(!eZ||!tZ){var rZ=0,oZ=0,iZ=[];eZ=function(e){if(0===iZ.length){var t=KJ(),n=Math.max(0,16.666666666666668-(t-rZ));rZ=n+t,setTimeout((function(){var e=iZ.slice(0);iZ.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(rZ)}catch(yK){setTimeout((function(){throw yK}),0)}}),Math.round(n))}return iZ.push({handle:++oZ,callback:e,cancelled:!1}),oZ},tZ=function(e){for(var t=0;t<iZ.length;t++)iZ[t].handle===e&&(iZ[t].cancelled=!0)}}YJ.exports=function(e){return eZ.call(JJ,e)},YJ.exports.cancel=function(){tZ.apply(JJ,arguments)},YJ.exports.polyfill=function(e){e||(e=JJ),e.requestAnimationFrame=eZ,e.cancelAnimationFrame=tZ};var aZ=YJ.exports,sZ=function(e,t){return sZ=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},sZ(e,t)};function uZ(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}sZ(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var cZ=function(){return cZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cZ.apply(this,arguments)};function lZ(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(yK){i(yK)}}function s(e){try{u(r.throw(e))}catch(yK){i(yK)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function fZ(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(yK){i=[6,yK],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function hZ(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function dZ(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(_3){o={error:_3}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function pZ(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function vZ(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}var gZ,mZ=function(){function e(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}return e.Undefined=new e(void 0),e}(),yZ=function(){function e(){this._first=mZ.Undefined,this._last=mZ.Undefined,this._size=0}return Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.isEmpty=function(){return this._first===mZ.Undefined},e.prototype.clear=function(){for(var e=this._first;e!==mZ.Undefined;){var t=e.next;e.prev=mZ.Undefined,e.next=mZ.Undefined,e=t}this._first=mZ.Undefined,this._last=mZ.Undefined,this._size=0},e.prototype.unshift=function(e){return this._insert(e,!1)},e.prototype.push=function(e){return this._insert(e,!0)},e.prototype._insert=function(e,t){var n=this,r=new mZ(e);if(this._first===mZ.Undefined)this._first=r,this._last=r;else if(t){var o=this._last;this._last=r,r.prev=o,o.next=r}else{var i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;var a=!1;return function(){a||(a=!0,n._remove(r))}},e.prototype.shift=function(){if(this._first!==mZ.Undefined){var e=this._first.element;return this._remove(this._first),e}},e.prototype.pop=function(){if(this._last!==mZ.Undefined){var e=this._last.element;return this._remove(this._last),e}},e.prototype._remove=function(e){if(e.prev!==mZ.Undefined&&e.next!==mZ.Undefined){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===mZ.Undefined&&e.next===mZ.Undefined?(this._first=mZ.Undefined,this._last=mZ.Undefined):e.next===mZ.Undefined?(this._last=this._last.prev,this._last.next=mZ.Undefined):e.prev===mZ.Undefined&&(this._first=this._first.next,this._first.prev=mZ.Undefined);this._size-=1},e.prototype[Symbol.iterator]=function(){var e;return fZ(this,(function(t){switch(t.label){case 0:e=this._first,t.label=1;case 1:return e===mZ.Undefined?[3,3]:[4,e.element];case 2:return t.sent(),e=e.next,[3,1];case 3:return[2]}}))},e}();!function(e){e.is=function(e){return e&&"object"===S(e)&&"function"==typeof e[Symbol.iterator]};var t=Object.freeze([]);e.empty=function(){return t},e.single=function(e){return fZ(this,(function(t){switch(t.label){case 0:return[4,e];case 1:return t.sent(),[2]}}))},e.from=function(e){return e||t},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){var n,r;try{for(var o=hZ(e),i=o.next();!i.done;i=o.next()){if(t(i.value))return!0}}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1},e.find=function(e,t){var n,r;try{for(var o=hZ(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(t(a))return a}}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.filter=function(e,t){var n,r,o,i,a,s;return fZ(this,(function(u){switch(u.label){case 0:u.trys.push([0,5,6,7]),n=hZ(e),r=n.next(),u.label=1;case 1:return r.done?[3,4]:(o=r.value,t(o)?[4,o]:[3,3]);case 2:u.sent(),u.label=3;case 3:return r=n.next(),[3,1];case 4:return[3,7];case 5:return i=u.sent(),a={error:i},[3,7];case 6:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(a)throw a.error}return[7];case 7:return[2]}}))},e.map=function(e,t){var n,r,o,i,a,s,u;return fZ(this,(function(c){switch(c.label){case 0:n=0,c.label=1;case 1:c.trys.push([1,6,7,8]),r=hZ(e),o=r.next(),c.label=2;case 2:return o.done?[3,5]:(i=o.value,[4,t(i,n++)]);case 3:c.sent(),c.label=4;case 4:return o=r.next(),[3,2];case 5:return[3,8];case 6:return a=c.sent(),s={error:a},[3,8];case 7:try{o&&!o.done&&(u=r.return)&&u.call(r)}finally{if(s)throw s.error}return[7];case 8:return[2]}}))},e.concat=function(){var e,t,n,r,o,i,a,s,u,c,l,f,h=[];for(e=0;e<arguments.length;e++)h[e]=arguments[e];return fZ(this,(function(e){switch(e.label){case 0:e.trys.push([0,11,12,13]),t=hZ(h),n=t.next(),e.label=1;case 1:if(n.done)return[3,10];r=n.value,e.label=2;case 2:e.trys.push([2,7,8,9]),l=void 0,o=hZ(r),i=o.next(),e.label=3;case 3:return i.done?[3,6]:[4,i.value];case 4:e.sent(),e.label=5;case 5:return i=o.next(),[3,3];case 6:return[3,9];case 7:return a=e.sent(),l={error:a},[3,9];case 8:try{i&&!i.done&&(f=o.return)&&f.call(o)}finally{if(l)throw l.error}return[7];case 9:return n=t.next(),[3,1];case 10:return[3,13];case 11:return s=e.sent(),u={error:s},[3,13];case 12:try{n&&!n.done&&(c=t.return)&&c.call(t)}finally{if(u)throw u.error}return[7];case 13:return[2]}}))},e.concatNested=function(e){var t,n,r,o,i,a,s,u,c,l,f;return fZ(this,(function(h){switch(h.label){case 0:h.trys.push([0,11,12,13]),t=hZ(e),n=t.next(),h.label=1;case 1:if(n.done)return[3,10];r=n.value,h.label=2;case 2:h.trys.push([2,7,8,9]),l=void 0,o=hZ(r),i=o.next(),h.label=3;case 3:return i.done?[3,6]:[4,i.value];case 4:h.sent(),h.label=5;case 5:return i=o.next(),[3,3];case 6:return[3,9];case 7:return a=h.sent(),l={error:a},[3,9];case 8:try{i&&!i.done&&(f=o.return)&&f.call(o)}finally{if(l)throw l.error}return[7];case 9:return n=t.next(),[3,1];case 10:return[3,13];case 11:return s=h.sent(),u={error:s},[3,13];case 12:try{n&&!n.done&&(c=t.return)&&c.call(t)}finally{if(u)throw u.error}return[7];case 13:return[2]}}))},e.reduce=function(e,t,n){var r,o,i=n;try{for(var a=hZ(e),s=a.next();!s.done;s=a.next()){i=t(i,s.value)}}catch(u){r={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i},e.slice=function(e,t,n){return void 0===n&&(n=e.length),fZ(this,(function(r){switch(r.label){case 0:t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length),r.label=1;case 1:return t<n?[4,e[t]]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},e.consume=function(t,n){var r;void 0===n&&(n=Number.POSITIVE_INFINITY);var o=[];if(0===n)return[o,t];for(var i=t[Symbol.iterator](),a=0;a<n;a++){var s=i.next();if(s.done)return[o,e.empty()];o.push(s.value)}return[o,(r={},r[Symbol.iterator]=function(){return i},r)]},e.equals=function(e,t,n){void 0===n&&(n=function(e,t){return e===t});for(var r=e[Symbol.iterator](),o=t[Symbol.iterator]();;){var i=r.next(),a=o.next();if(i.done!==a.done)return!1;if(i.done)return!0;if(!n(i.value,a.value))return!1}}}(gZ||(gZ={}));var bZ=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}return e.prototype.addListener=function(e){var t=this;return this.listeners.push(e),function(){t._removeListener(e)}},e.prototype.emit=function(e){this.listeners.forEach((function(t){t(e)}))},e.prototype._removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},e.prototype.setUnexpectedErrorHandler=function(e){this.unexpectedErrorHandler=e},e.prototype.getUnexpectedErrorHandler=function(){return this.unexpectedErrorHandler},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}(),wZ=new bZ;function AZ(e){var t;(t=e)instanceof Error&&t.name===xZ&&t.message===xZ||wZ.onUnexpectedError(e)}var xZ="Canceled";!function(e){function t(){var t=e.call(this,xZ)||this;return t.name=t.message,t}uZ(t,e)}(Error),function(e){function t(t){var n=e.call(this,"NotImplemented")||this;return t&&(n.message=t),n}uZ(t,e)}(Error),function(e){function t(t){var n=e.call(this,"NotSupported")||this;return t&&(n.message=t),n}uZ(t,e)}(Error);var TZ=function(e){function t(t){var n=e.call(this,"Encountered errors while disposing of store. Errors: ["+t.join(", ")+"]")||this;return n.errors=t,n}return uZ(t,e),t}(Error);function PZ(e){var t,n;if(gZ.is(e)){var r=[];try{for(var o=hZ(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(a)try{a.dispose()}catch(yK){r.push(yK)}}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}if(1===r.length)throw r[0];if(r.length>1)throw new TZ(r);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function CZ(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=_Z((function(){return PZ(e)}));return n}function _Z(e){return{dispose:vZ((function(){e()}))}}var EZ=function(){function e(){this._toDispose=new Set,this._isDisposed=!1}return e.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this.clear())},e.prototype.clear=function(){try{PZ(this._toDispose.values())}finally{this._toDispose.clear()}},e.prototype.add=function(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t},e.DISABLE_DISPOSED_WARNING=!1,e}(),SZ=function(){function e(){this._store=new EZ,this._store}return e.prototype.dispose=function(){this._store.dispose()},e.prototype._register=function(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)},e.None=Object.freeze({dispose:function(){}}),e}();!function(){function e(){this._isDisposed=!1}Object.defineProperty(e.prototype,"value",{get:function(){return this._isDisposed?void 0:this._value},set:function(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),this._value=e)},enumerable:!1,configurable:!0}),e.prototype.clear=function(){this.value=void 0},e.prototype.dispose=function(){var e;this._isDisposed=!0,null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0},e.prototype.clearAndLeak=function(){var e=this._value;return this._value=void 0,e}}();var kZ,RZ="object"===("undefined"==typeof self?"undefined":S(self))?self:"object"===("undefined"==typeof global?"undefined":S(global))?global:{},OZ=RZ.performance&&"function"==typeof RZ.performance.now,MZ=function(){function e(e){this._highResolution=OZ&&e,this._startTime=this._now(),this._stopTime=-1}return e.create=function(t){return void 0===t&&(t=!0),new e(t)},e.prototype.stop=function(){this._stopTime=this._now()},e.prototype.elapsed=function(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime},e.prototype._now=function(){return this._highResolution?RZ.performance.now():Date.now()},e}();!function(e){function t(e){return function(t,n,r){void 0===n&&(n=null);var o,i=!1;return o=e((function(e){if(!i)return o?o.dispose():i=!0,t.call(n,e)}),null,r),i&&o.dispose(),o}}function n(e,t){return a((function(n,r,o){return void 0===r&&(r=null),e((function(e){return n.call(r,t(e))}),null,o)}))}function r(e,t){return a((function(n,r,o){return void 0===r&&(r=null),e((function(e){t(e),n.call(r,e)}),null,o)}))}function o(e,t){return a((function(n,r,o){return void 0===r&&(r=null),e((function(e){return t(e)&&n.call(r,e)}),null,o)}))}function i(e,t,r){var o=r;return n(e,(function(e){return o=t(o,e)}))}function a(e){var t,n=new IZ({onFirstListenerAdd:function(){t=e(n.fire,n)},onLastListenerRemove:function(){t.dispose()}});return n.event}function s(e,t,n,r,o){var i;void 0===n&&(n=100),void 0===r&&(r=!1);var a=void 0,s=void 0,u=0,c=new IZ({leakWarningThreshold:o,onFirstListenerAdd:function(){i=e((function(e){u++,a=t(a,e),r&&!s&&(c.fire(a),a=void 0),clearTimeout(s),s=setTimeout((function(){var e=a;a=void 0,s=void 0,(!r||u>1)&&c.fire(e),u=0}),n)}))},onLastListenerRemove:function(){i.dispose()}});return c.event}function u(e,t){void 0===t&&(t=function(e,t){return e===t});var n,r=!0;return o(e,(function(e){var o=r||!t(e,n);return r=!1,n=e,o}))}e.None=function(){return SZ.None},e.once=t,e.map=n,e.forEach=r,e.filter=o,e.signal=function(e){return e},e.any=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n,r){return void 0===n&&(n=null),CZ.apply(void 0,pZ([],dZ(e.map((function(e){return e((function(e){return t.call(n,e)}),null,r)}))),!1))}},e.reduce=i,e.debounce=s,e.latch=u,e.split=function(t,n){return[e.filter(t,n),e.filter(t,(function(e){return!n(e)}))]},e.buffer=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]);var r=n.slice(),o=e((function(e){r?r.push(e):a.fire(e)})),i=function(){r&&r.forEach((function(e){return a.fire(e)})),r=null},a=new IZ({onFirstListenerAdd:function(){o||(o=e((function(e){return a.fire(e)})))},onFirstListenerDidAdd:function(){r&&(t?setTimeout(i):i())},onLastListenerRemove:function(){o&&o.dispose(),o=null}});return a.event};var c=function(){function e(e){this.event=e}return e.prototype.map=function(t){return new e(n(this.event,t))},e.prototype.forEach=function(t){return new e(r(this.event,t))},e.prototype.filter=function(t){return new e(o(this.event,t))},e.prototype.reduce=function(t,n){return new e(i(this.event,t,n))},e.prototype.latch=function(){return new e(u(this.event))},e.prototype.debounce=function(t,n,r,o){return void 0===n&&(n=100),void 0===r&&(r=!1),new e(s(this.event,t,n,r,o))},e.prototype.on=function(e,t,n){return this.event(e,t,n)},e.prototype.once=function(e,n,r){return t(this.event)(e,n,r)},e}();e.chain=function(e){return new c(e)},e.fromNodeEventEmitter=function(e,t,n){void 0===n&&(n=function(e){return e});var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.fire(n.apply(void 0,pZ([],dZ(e),!1)))},o=new IZ({onFirstListenerAdd:function(){return e.on(t,r)},onLastListenerRemove:function(){return e.removeListener(t,r)}});return o.event},e.fromDOMEventEmitter=function(e,t,n){void 0===n&&(n=function(e){return e});var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.fire(n.apply(void 0,pZ([],dZ(e),!1)))},o=new IZ({onFirstListenerAdd:function(){return e.addEventListener(t,r)},onLastListenerRemove:function(){return e.removeEventListener(t,r)}});return o.event},e.toPromise=function(e){return new Promise((function(n){return t(e)(n)}))}}(kZ||(kZ={}));var FZ=function(){function e(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=t+"_"+e._idPool++}return e.prototype.start=function(e){this._stopWatch=new MZ(!0),this._listenerCount=e},e.prototype.stop=function(){if(this._stopWatch){var e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info("did FIRE "+this._name+": elapsed_ms: "+e.toFixed(5)+", listener: "+this._listenerCount+" (elapsed_overall: "+this._elapsedOverall.toFixed(2)+", invocations: "+this._invocationCount+")"),this._stopWatch=void 0}},e._idPool=0,e}(),IZ=function(){function e(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new FZ(this._options._profName):void 0}return Object.defineProperty(e.prototype,"event",{get:function(){var e=this;return this._event||(this._event=function(t,n,r){var o;e._listeners||(e._listeners=new yZ);var i=e._listeners.isEmpty();i&&e._options&&e._options.onFirstListenerAdd&&e._options.onFirstListenerAdd(e);var a=e._listeners.push(n?[t,n]:t);i&&e._options&&e._options.onFirstListenerDidAdd&&e._options.onFirstListenerDidAdd(e),e._options&&e._options.onListenerDidAdd&&e._options.onListenerDidAdd(e,t,n);var s=null===(o=e._leakageMon)||void 0===o?void 0:o.check(e._listeners.size),u=_Z((function(){(s&&s(),e._disposed)||(a(),e._options&&e._options.onLastListenerRemove&&(e._listeners&&!e._listeners.isEmpty()||e._options.onLastListenerRemove(e)))}));return r instanceof EZ?r.add(u):Array.isArray(r)&&r.push(u),u}),this._event},enumerable:!1,configurable:!0}),e.prototype.fire=function(e){var t,n,r,o;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new yZ);try{for(var i=hZ(this._listeners),a=i.next();!a.done;a=i.next()){var s=a.value;this._deliveryQueue.push([s,e])}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}for(null===(r=this._perfMon)||void 0===r||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){var u=dZ(this._deliveryQueue.shift(),2),c=(s=u[0],u[1]);try{"function"==typeof s?s.call(void 0,c):s[0].call(s[1],c)}catch(yK){AZ(yK)}}null===(o=this._perfMon)||void 0===o||o.stop()}},e.prototype.dispose=function(){var e,t,n,r,o;this._disposed||(this._disposed=!0,null===(e=this._listeners)||void 0===e||e.clear(),null===(t=this._deliveryQueue)||void 0===t||t.clear(),null===(r=null===(n=this._options)||void 0===n?void 0:n.onLastListenerRemove)||void 0===r||r.call(n),null===(o=this._leakageMon)||void 0===o||o.dispose())},e}();function DZ(e){return new Promise((function(t,n){var r=new Image;r.src=e,r.onload=function(){return t(r)},r.onerror=function(){return n(new Error(""))}}))}function LZ(e){return new Promise((function(t){setTimeout(t,e)}))}function jZ(e,t){return e+Math.round(Math.random()*(t-e))}function BZ(){for(var e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",t=e.length-1,n="";n.length<16;)n+=e[jZ(0,t)];return encodeURIComponent(n)}function NZ(e){for(var t=[186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138],n=window.atob(e),r=n.length,o=t.length,i="",a=0;a<r;a++)i+=String.fromCharCode(n.charCodeAt(a)^t[a%o]);var s=i.slice(0,4)+i.slice(12,16)+i.slice(24,28)+i.slice(36,40);return{t:i.slice(8,12)+i.slice(20,24)+i.slice(32,36)+i.substr(-2),s:s,fix:i.slice(4,8)+i.slice(16,20)+i.slice(28,32)+i.slice(40,-2)}}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}uZ(t,e),t.prototype.fireAsync=function(e,t,n){return lZ(this,void 0,void 0,(function(){var r,o,i,a,s,u,c;return fZ(this,(function(l){switch(l.label){case 0:if(!this._listeners)return[2];this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new yZ);try{for(r=hZ(this._listeners),o=r.next();!o.done;o=r.next())i=o.value,this._asyncDeliveryQueue.push([i,e])}catch(f){u={error:f}}finally{try{o&&!o.done&&(c=r.return)&&c.call(r)}finally{if(u)throw u.error}}a=function(){var e,t,r,o,i;return fZ(this,(function(a){switch(a.label){case 0:e=dZ(s._asyncDeliveryQueue.shift(),2),t=e[0],r=e[1],o=[],i=cZ(cZ({},r),{waitUntil:function(e){if(Object.isFrozen(o))throw new Error("waitUntil can NOT be called asynchronous");n&&(e=n(e,"function"==typeof t?t:t[0])),o.push(e)}});try{"function"==typeof t?t.call(void 0,i):t[0].call(t[1],i)}catch(yK){return AZ(yK),[2,"continue"]}return Object.freeze(o),[4,Promise.allSettled(o).then((function(e){var t,n;try{for(var r=(t=void 0,hZ(e)),o=r.next();!o.done;o=r.next()){var i=o.value;"rejected"===i.status&&AZ(i.reason)}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}))];case 1:return a.sent(),[2]}}))},s=this,l.label=1;case 1:return this._asyncDeliveryQueue.size>0&&!t.isCancellationRequested?[5,a()]:[3,3];case 2:return l.sent(),[3,1];case 3:return[2]}}))}))}}(IZ),function(e){function t(t){var n,r=e.call(this,t)||this;return r._delay=null!==(n=t.delay)&&void 0!==n?n:100,r}uZ(t,e),t.prototype.fire=function(t){var n=this;this._handle||(this.pause(),this._handle=setTimeout((function(){n._handle=void 0,n.resume()}),this._delay)),e.prototype.fire.call(this,t)}}(function(e){function t(t){var n=e.call(this,t)||this;return n._isPaused=0,n._eventQueue=new yZ,n._mergeFn=null==t?void 0:t.merge,n}return uZ(t,e),t.prototype.pause=function(){this._isPaused++},t.prototype.resume=function(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){var t=Array.from(this._eventQueue);this._eventQueue.clear(),e.prototype.fire.call(this,this._mergeFn(t))}else for(;!this._isPaused&&0!==this._eventQueue.size;)e.prototype.fire.call(this,this._eventQueue.shift())},t.prototype.fire=function(t){this._listeners&&(0!==this._isPaused?this._eventQueue.push(t):e.prototype.fire.call(this,t))},t}(IZ)),function(e){function t(t){var n=e.call(this,t)||this;return n._queuedEvents=[],n._mergeFn=null==t?void 0:t.merge,n}uZ(t,e),t.prototype.fire=function(t){var n=this;this._queuedEvents.push(t),1===this._queuedEvents.length&&queueMicrotask((function(){n._mergeFn?e.prototype.fire.call(n,n._mergeFn(n._queuedEvents)):n._queuedEvents.forEach((function(t){return e.prototype.fire.call(n,t)})),n._queuedEvents=[]}))}}(IZ),function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new IZ({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!1,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);return _Z(vZ((function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)})))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach((function(t){return e.hook(t)}))},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach((function(t){return e.unhook(t)}))},e.prototype.hook=function(e){var t=this;e.listener=e.event((function(e){return t.emitter.fire(e)}))},e.prototype.unhook=function(e){e.listener&&e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()}}(),function(){function e(){var e=this;this.listening=!1,this.inputEvent=kZ.None,this.inputEventListener=SZ.None,this.emitter=new IZ({onFirstListenerDidAdd:function(){e.listening=!0,e.inputEventListener=e.inputEvent(e.emitter.fire,e.emitter)},onLastListenerRemove:function(){e.listening=!1,e.inputEventListener.dispose()}}),this.event=this.emitter.event}Object.defineProperty(e.prototype,"input",{set:function(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()}}();var VZ=new WeakMap,UZ=new WeakMap,WZ=function(){function e(t){var n,r,o,i,a=this;O(this,e),I(this,"frameInfo",null),I(this,"frameInfoCanvas",null),I(this,"recorder",void 0),Y(this,VZ,{writable:!0,value:void 0}),Y(this,UZ,{writable:!0,value:void 0}),I(this,"_videoElement",void 0),I(this,"_originSizeCanvasAndCtx",void 0),I(this,"_frameDrawingHandler",-1),I(this,"_onFrameDrawingFinished",new IZ),I(this,"createVideoStream",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!G(a,VZ).useSecure){e.next=3;break}e.next=10;break;case 3:return e.t0=X,e.t1=a,e.t2=UZ,e.next=8,navigator.mediaDevices.getUserMedia(G(a,VZ).constraints);case 8:e.t3=e.sent,(0,e.t0)(e.t1,e.t2,e.t3);case 10:return e.next=12,a.processVideoStream();case 12:case"end":return e.stop()}}),e)})))),I(this,"processVideoStream",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{a._videoElement.srcObject=G(a,UZ)}catch(yK){a._videoElement.src=URL.createObjectURL(G(a,UZ))}finally{G(a,VZ).needToRecord&&(a.recorder=new EJ.exports.RecordRTCPromisesHandler(G(a,UZ),{type:"video",mimeType:"video/mp4",frameRate:15,videoBitsPerSecond:2e5}))}return e.next=3,a._videoElement.play();case 3:case"end":return e.stop()}}),e)})))),I(this,"stopVideoStream",(function(){if(a.hasStream)try{a._videoElement.srcObject=null,G(a,UZ).getTracks().forEach((function(e){return e.stop()}))}catch(yK){}})),I(this,"grabPicture",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.grabPictureCfg,n=a.grabPictureCanvas(),r=n.originCanvas,o=r.toDataURL(t.type,t.quality);return{originDataURL:o}})),I(this,"grabPictureCanvas",(function(){var e=V(a._originSizeCanvasAndCtx,2),t=e[0],n=e[1],r=a._originSizeCanvasDimensions,o=r.width,i=r.height;return t.width=o,t.height=i,null==n||n.drawImage(a._videoElement,0,0,o,i),{originCanvas:a._originSizeCanvasAndCtx[0]}})),I(this,"frameDrawing",(function(){a._frameDrawingHandler=aZ((function e(){a.frameInfoCanvas=a.grabPictureCanvas(),a._onFrameDrawingFinished.fire(),a._frameDrawingHandler=aZ(e)}))})),I(this,"cancelFrameDrawing",(function(){a._frameDrawingHandler&&(aZ.cancel(a._frameDrawingHandler),a._frameDrawingHandler=-1)})),I(this,"cleanupCanvasMemory",(function(){var e=V(a._originSizeCanvasAndCtx,1)[0];e.width=0,e.height=0})),X(this,VZ,t),this._createVideo(),this._bindVideoEvents(),this._originSizeCanvasAndCtx=(n=this._originSizeCanvasDimensions.width,r=this._originSizeCanvasDimensions.height,o=document.createElement("canvas"),i=o.getContext("2d"),o.width=n,o.height=r,[o,i]),G(this,VZ).useSecure}return F(e,[{key:"hasStream",get:function(){return!!G(this,UZ)}},{key:"onFrameDrawingFinished",get:function(){return this._onFrameDrawingFinished.event}},{key:"_originSizeCanvasDimensions",get:function(){return{width:this._videoElement.videoWidth,height:this._videoElement.videoHeight}}},{key:"_maxSizeCanvasDimensions",get:function(){var e=this._videoElement.getBoundingClientRect(),t=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:960,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:960,o=Math.max(e/n,t/r,1);return{w:e/o,h:t/o,scale:1/o}}(e.width,e.height,640,640);return{width:t.w,height:t.h}}},{key:"_createVideo",value:function(){var e=this;this._videoElement=G(this,VZ).video;var t={playsInline:!0,autoPlay:!0,muted:!0,"webkit-playsinline":!0,"x5-video-player-type":"h5","x5-video-player-fullscreen":!1,style:"transform:scale(-1, 1);width:100%;height:100%;object-fit:cover;"};return Object.keys(t).forEach((function(n){e._videoElement.setAttribute(n,t[n])})),this._videoElement.getBoundingClientRect()}},{key:"_bindVideoEvents",value:function(){var e=this;this._videoElement.addEventListener("webkitbeginfullscreen",(function(){var t,n;null===(t=(n=e._videoElement).webkitExitFullscreen)||void 0===t||t.call(n),QJ(e._videoElement),e._videoElement.play().catch((function(){}))})),this._videoElement.addEventListener("loadedmetadata",(function(){e._videoElement.play().catch((function(){}))}))}}],[{key:"isSupport",value:function(){return _J.isGetUserMediaSupported}}]),e}();I(WZ,"grabPictureCfg",{type:"image/jpeg",quality:.96});var zZ={exports:{}};!function(e,t){e.exports=function(){var e={911:function(e,t){var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},994:function(e,t,n){n.r(t),n.d(t,{GLOBALS:function(){return b},OpData:function(){return pe},PaddlejsBackend:function(){return Ce},Runner:function(){return Pe},Tensor:function(){return fe},Transformer:function(){return C},coreUtils:function(){return r},env:function(){return v},interfaces:function(){return o},nchw2nhwc:function(){return X},nhwc2nchw:function(){return Q},registerBackend:function(){return A},registerOp:function(){return w}});var r={};n.r(r),n.d(r,{AddItemToVars:function(){return u},delUselessData:function(){return l},findVarByKey:function(){return s},getGlobalInterface:function(){return i},getOrMakeGlobalProperty:function(){return a},traverseVars:function(){return c}});var o={};function i(){var e;if("undefined"!=typeof window)e=window;else if(void 0!==n.g)e=n.g;else{if("undefined"==typeof self)throw new Error("Could not find a global object");e=self}return e}function a(e,t){var n=i();return n[e]||(n[e]=t),n[e]}function s(e,t){return Array.isArray(e)?e.find((function(e){return e.name===t})):e[t]}function u(e,t){var n=Array.isArray(e),r=Array.isArray(t)?t:[t];n?r.forEach((function(t){for(var n=null,r=0;r<e.length;r++)if(e[r].name===t.name){n=r;break}null!==n?e[n]=t:e.push(t)})):r.forEach((function(t){e[t.name]=t}))}function c(e,t){Array.isArray(e)?e.forEach((function(e){t(e)})):Object.keys(e).forEach((function(n){t(e[n])}))}function l(e){if(e.ops=null,e.vars instanceof Array)for(var t=0;t<e.vars.length;t++)e.vars[t].data&&delete e.vars[t].data;else for(var n in e.vars)e.vars[n].data&&delete e.vars[n].data}n.r(o),n.d(o,{BufferType:function(){return f},GraphType:function(){return p},UniformType:function(){return d},WasmMemoryType:function(){return h}});var f,h,d,p,v=a("env",new(function(){function e(){this.ENV={}}return e.prototype.set=function(e,t){this.ENV[e]=t},e.prototype.get=function(e){return this.ENV[e]},e}())),g=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},m=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},y=function(){function e(e){this.urlConf={dir:"",main:""},this.separateChunk=!0,this.chunkNum=1,this.dataType="binary",this.params={type:"fetch"},this.inNode=!1,this.isLocalFile=!1,this.realFetch=function(){throw new Error("ERROR: empty fetch funciton")};var t=e,n="model.json";if(e.endsWith(".json")){var r=e.lastIndexOf("/")+1;t=e.substr(0,r),n=e.substr(r)}else"/"!==e.charAt(e.length-1)&&(t=e+"/");this.isLocalFile=0!==t.indexOf("http"),this.urlConf={dir:this.isLocalFile?"/"===t.charAt(0)?""+t:"/"+t:t,main:n},this.inNode="node"===v.get("platform")}return e.prototype.load=function(t){return g(this,void 0,void 0,(function(){var n,r;return m(this,(function(o){switch(o.label){case 0:return(r=t)?[3,2]:[4,this.fetchModel()];case 1:r=o.sent(),o.label=2;case 2:return n=r,this.separateChunk=!!n.chunkNum&&n.chunkNum>0,this.chunkNum=this.separateChunk?n.chunkNum:0,this.separateChunk?"binary"!==this.dataType?[3,4]:[4,this.fetchChunks().then((function(t){return e.allocateParamsVar(n.vars,t)}))]:[3,4];case 3:o.sent(),o.label=4;case 4:return[2,n]}}))}))},e.prototype.fetchOneChunk=function(e){return g(this,void 0,void 0,(function(){return m(this,(function(t){switch(t.label){case 0:return v.get("fetch")?[4,v.get("fetch")(e,{type:"arrayBuffer"})]:[3,2];case 1:return[2,t.sent()];case 2:return[2,this.fetch(e).then((function(e){return e.arrayBuffer()}))]}}))}))},e.prototype.fetchJson=function(e){return this.fetch(e).then((function(e){return e.json()}))},e.prototype.getFileName=function(e){return"chunk_"+e+".dat"},e.prototype.fetchChunks=function(){return g(this,void 0,void 0,(function(){var e,t,n;return m(this,(function(r){for(e=this.chunkNum,t=[],n=1;n<=e;n++)t.push(this.fetchOneChunk(this.urlConf.dir+this.getFileName(n)));return[2,Promise.all(t).then((function(e){var t,n=0,r=[];e.forEach((function(e){t=new Float32Array(e),r.push(t),n+=t.length}));var o=new Float32Array(n),i=0;return r.forEach((function(e){e.forEach((function(e){o[i]=e,i+=1}))})),o}))]}))}))},e.allocateParamsVar=function(e,t){var n,r=0,o=Array.isArray(t)?t:Object.values(t);c(e,(function(e){n=e.shape.reduce((function(e,t){return e*t})),e.persistable&&(e.data=o.slice(r,r+n),r+=n)}))},e.prototype.fetch=function(e,t){if(v.get("fetch"))return v.get("fetch")(e,t||{});var r=(t||this.params).method||"get",o=new(this.inNode?n(911).Headers:Headers);return this.realFetch=this.inNode?this.isLocalFile?this.fetchLocalFile:n(911):window.fetch.bind(window),this.realFetch(e,{method:r,headers:o})},e.prototype.fetchLocalFile=function(e){var t=n(993);return new Promise((function(n,r){try{n(t.readFileSync(e,"utf8"))}catch(e){r(e)}}))},e.prototype.fetchModel=function(){var e=this,t=this.params,n=this.urlConf.dir+this.urlConf.main,r=null;return"fetch"===t.type&&(r=new Promise((function(r,o){e.fetch(n,t).then((function(t){return v.get("fetch")?t:e.isLocalFile&&e.inNode?JSON.parse(t):t.json()})).then((function(e){return r(e)})).then((function(e){return o(e)}))}))),r},e}();!function(e){e.FrameBuffer="frameBuffer",e.ColorBuffer="colorBuffer"}(f||(f={})),function(e){e.memory100="100",e.memory200="200",e.memory300="300",e.memory400="400",e.memory500="500",e.memory600="600",e.memory700="700",e.memory800="800",e.memory900="900"}(h||(h={})),function(e){e.uniform1f="1f",e.uniform1fv="1fv",e.uniform1i="1i",e.uniform1iv="1iv",e.uniform2f="2f",e.uniform2fv="2fv",e.uniform2i="2i",e.uniform2iv="2iv",e.uniform3f="3f",e.uniform3fv="3fv",e.uniform3i="3i",e.uniform3iv="3iv",e.uniform4f="4f",e.uniform4fv="4fv",e.uniform4i="4i",e.uniform4iv="4iv"}(d||(d={})),function(e){e.SingleOutput="single",e.MultipleOutput="multiple",e.MultipleInput="multipleInput"}(p||(p={}));var b={opRegistry:{ops:{}},backend:"",backendInstance:null};function w(e,t){var n=e.conf,r=e.params,o=e.main,i=e.mainFunc,a=e.textureFuncConf,s=e.commonFuncConf,u=e.behaviors,c=void 0===u?[]:u,l=b.backend+"_"+t;b.opRegistry.ops[l]||(b.opRegistry.ops[l]={name:t,conf:n,params:r,main:o,mainFunc:i,textureFuncConf:a,commonFuncConf:s,behaviors:c})}function A(e,t,n){e&&(b.backend=e),t&&(b.backendInstance=t),n&&Object.keys(n).forEach((function(e){w(n[e],e)}))}b=a("GLOBALS",b);var x=i();x.ImageBitmap||(x.ImageBitmap=function(){});var T,P=function(){function e(e,t){this.id="",this.type="",this.inputs={},this.outputs={},this.attrs={},this.subAttrs=[],this.next="",this.opData=null,this.isPacked=!1,this.bufferType=f.FrameBuffer,this.uniform=null;var n=e.inputs,r=e.outputs,o=e.attrs,i=void 0===o?{}:o,a=e.type,s=e.isPacked,u=void 0!==s&&s,c=e.bufferType,l=void 0===c?f.FrameBuffer:c,h=e.uniform,d=void 0===h?null:h;this.id=a+"_"+ +new Date+"_"+t,this.inputs=n,this.outputs=r,this.attrs=i,this.subAttrs=e["sub-attrs"]||[],this.uniform=d,this.type=a,this.isPacked=u,this.bufferType=l,this.next="",this.opData=null}return Object.defineProperty(e.prototype,"inputsName",{get:function(){var e=this,t=[];return Object.keys(this.inputs).forEach((function(n){t.push(e.inputs[n][0])})),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"outputsName",{get:function(){return this.outputs.Output||this.outputs.Out||this.outputs.Y},enumerable:!1,configurable:!0}),e.prototype.execute=function(e){b.backendInstance.runProgram(this.opData,e)},e}(),C=function(e){this.name=e},_=(T=function(e,t){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),E={conv2d:function(e,t){var n=e.attrs.strides,r=e.inputs.Input[0],o=e.inputs.Filter[0];if("image"===r)return!1;var i=s(t,r).shape,a=s(t,o).shape;return!n.find((function(e){return e>1}))&&i[i.length-1-2]%4==0&&4===a.length&&a[0]%4==0&&a[1]%4==0}};function k(e){return{type:"packed_2_unpacked",attrs:{},inputs:{Input:[e.inputName]},outputs:{Output:[e.outputName]}}}function R(e){return{type:"unpacked_2_packed",attrs:{},inputs:{Input:[e.inputName]},outputs:{Output:[e.outputName]}}}function O(e,t){Object.keys(e.inputs).forEach((function(t){e.inputs[t]=[e.inputs[t]+"_packed"]})),Object.keys(e.outputs).forEach((function(t){e.outputs[t]=[e.outputs[t]+"_packed"]})),e.type=e.type+"_packing",e.id=e.type+"_"+ +new Date+"_"+t.length,e.isPacked=!0}var M,F,I=function(e){function t(){return e.call(this,"TexturePacking")||this}return _(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if("webgl"===b.backend&&v.get("webgl_pack_channel")){var n=e[0],r=e[1],o=e[2],i="depthwise_conv2d"===n.type?"conv2d":n.type,a=E[i];if(a&&a(n,r)){var s=n.inputs,u=n.outputs,c=s.Input[0],l=u.Output?u.Output[0]:u.Out[0],f=R({inputName:c,outputName:c+"_packed"}),h=o.length;o.push(new P(f,h)),O(n,o);var d=k({inputName:l+"_packed",outputName:l}),p=o.length+1;o.push(new P(d,p))}}},t}(C),D=(M=function(e,t){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}M(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),L=function(e){function t(){return e.call(this,"FormatInputsX")||this}return D(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0];if(["concat","connect","fc","rnn_origin","rnn_matmul","stack"].includes(n.type)){var r=n.inputs;if(("rnn_origin"===n.type||"rnn_matmul"===n.type)&&r.WeightList.length>0)r.WeightList.forEach((function(e,t){r["weightlist_"+t]=[e]}));else{var o=r.X||r.Input;if("wasm"!==v.get("backend"))o.length>1&&(o.forEach((function(e,t){r["origin"+(t>0?"_"+t:"")]=[e]})),delete r.X,delete r.Input);else{if(o.length>4)throw Error("Not yet supporting concat input tensors more than 4.");if(o.length>1){var i=o[0],a=o[1],s=o[2],u=o[3];r.X=[i],a&&(r.Y=[a]),s&&(r.Z=[s],n.type+="_mul"),u&&(r.M=[u])}}}}},t}(C),j=(F=function(e,t){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),B=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function N(e,t){var n=s(t,e);return n?n.shape:[]}function V(e,t,n,r){for(var o=B(t),i=0,a=0,s=e;a<s.length;a++)i+=N(s[a],r)[n];return o[n]=i,{name:e[e.length-1]+"_out",shape:o}}var U=function(e){function t(){return e.call(this,"splitOp")||this}return j(t,e),t.prototype.transform=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t[0],o=t[1],i=0,a=r.length;i<a;i++){var s=r[i];if("concat"===s.type&&(null===(e=s.inputs)||void 0===e?void 0:e.X)&&!(s.inputs.X.length<=4)){var c=s.attrs,l=s.inputs,f=s.outputs,h=l.X,d=h.length,p=Math.ceil((d-4)/3)+1,v=f.Out[0],g=N(v,o),m=c.axis||0;m=m>-1?m:g.length+m;for(var y=[],b=[],w=h.slice(0,4),A=void 0,x=0;x<p;x++){var T=0===x?w:h.slice(3*x+1,3*(x+1)+1),P=V(T,g,m,o);0!==x&&T.splice(0,0,A.name),P.shape[m]+=A?A.shape[m]:0;var C={Out:[P.name]};b.push({attrs:c,inputs:{X:T},outputs:C,type:"concat"}),y.push(P),A=P}b[p-1].outputs.Out=[v],r.splice.apply(r,B([i,1],b)),u(o,y)}}},t}(C),W=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function z(e){if(e.length<4){for(var t=[],n=0;n<4-e.length;n++)t.push(1);return t.concat(e)}return W(e)}function H(e){return e.reduce((function(e,t){return e+t}))}function G(e,t){var n=e.length;return 4-n+(t>-1?t:n+t)}function X(e,t){for(var n=t[0],r=t[1],o=t[2],i=t[3],a=r*i,s=r*o*i,u=[],c=0;c<n;c++)for(var l=0;l<r;l++)for(var f=0;f<o;f++)for(var h=0;h<i;h++)u.push(e[c*s+f*a+h*r+l]);return new Float32Array(u)}function Q(e,t){for(var n=t[0],r=t[1],o=t[2],i=t[3],a=o*i,s=r*o*i,u=[],c=0;c<n;c++)for(var l=0;l<i;l++)for(var f=0;f<r;f++)for(var h=0;h<o;h++)u.push(e[c*s+f*a+h*i+l]);return new Float32Array(u)}function Y(e,t,n,r){if("nhwc"===t){var o=n[0],i=n[1],a=Q(e,[o,n[2],n[3],i*(r?4:1)]);return new Float32Array(a)}return new Float32Array(e)}function q(e){for(var t,n=e.data,r=e.shape,o=W(r).reverse(),i=0,a=o.length-1;i<a;i++)t=K(t||n,o[i]);return t}function K(e,t){for(var n=[],r=0,o=e.length;r<o;r+=t)n.push(e.slice(r,r+t));return n}var J,Z,$,ee=(J=function(e,t){return(J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}J(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),te="fetch_pack",ne=function(e){function t(){return e.call(this,"PackOut")||this}return ee(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(v.get("webgl_pack_output")&&1!==v.get("webglVersion")){var n=e[0],r=e[1],o=n.find((function(e){return"fetch"===e.type})),i=o.inputs.X[0],a=z(s(r,i).shape),c=a[0],l=a[1],f=a[2],h=a[3],d={attrs:{},inputs:{X:[i]},outputs:{Y:[te]},type:"pack_out"},p=l*h,g=Math.ceil(c*f/4),m={name:te,shape:[1,1,g,p],persistable:!1};o.inputs.X=[te],o.attrs.origin_shape=[c,l,f,h],n.push(d),u(r,[m])}},t}(C),re=(Z=function(e,t){return(Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}Z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),oe="img_pre_processed",ie="img_origin",ae=function(e){function t(){return e.call(this,"FeedProcess")||this}return re(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=e[1],o=e[2];if(o.webglFeedProcess||v.get("webgl_gpu_pipeline")){var i=o.mean,a=void 0===i?[0,0,0]:i,c=o.std,l=void 0===c?[1,1,1]:c,f=o.scale,h=void 0===f?[1,1]:f,p=o.pos,g=void 0===p?[0,0]:p,m=o.feedShape,y=s(r,"image"),b=y.shape,w=b[2],A=b[3];y.shape=[1,1,w,A];var x=Object.assign({},y);x.name=oe,x.shape=[1,3,m.fh,m.fw],x.persistable=!1,delete x.data;var T=Object.assign({},y);T.name=ie,T.shape=[1,1,m.fh,m.fw],T.persistable=!1,delete T.data,u(r,[T,x]);for(var P=n.filter((function(e){var t=e.inputs;return Object.keys(t).find((function(e){return"image"===t[e][0]}))})),C=function(e){var t=e.inputs;Object.keys(t).forEach((function(e){"image"===t[e][0]&&(t[e][0]=oe)}))},_=0,E=P;_<E.length;_++)C(E[_]);var S={attrs:{mean:a,std:l},inputs:{X:[ie]},outputs:{Y:[oe]},type:"feedPost"},k={attrs:{mean:a,std:l,scale:h,pos:g},inputs:{X:["image"]},outputs:{Y:[ie]},type:"imgFeed",uniform:{u_scale:{type:d.uniform2fv,value:[1,1]},u_pos:{type:d.uniform2fv,value:[0,0]},u_keep_ratio:{type:d.uniform1i,value:1}},isPacked:!0};n.splice(1,0,S),n.splice(1,0,k)}},t}(C),se={preTransforms:[new U,new ne,new ae],transforms:[new L,new I],postTransforms:[]},ue=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function ce(e,t){return e&&e[t]||[]}!function(e){e.PreTransforms="preTransforms",e.Transforms="transforms",e.PostTransforms="postTransforms"}($||($={}));var le=function(){function e(e,t){this.weightMap=[],this.ops=[],this.vars=[],this.config={},this.type=p.SingleOutput,this.plugins=null,this.ops=e.ops,this.vars=e.vars,this.type=t.type||this.type,this.plugins=t.plugins,this.config=t,e.feedShape&&(this.config.feedShape=e.feedShape)}return e.prototype.createGraph=function(){return this.preTransforms(),this.createOpsMap(),this.arrangeMap(),this.postTransforms(),this.weightMap},e.prototype.preTransforms=function(){var e=this;ue(se.preTransforms,ce(this.plugins,$.PreTransforms)).forEach((function(t){t.transform(e.ops,e.vars,e.config)}))},e.prototype.transforms=function(e,t){var n=this;ue(se.transforms,ce(this.plugins,$.Transforms)).forEach((function(r){r.transform(e,n.vars,t)}))},e.prototype.postTransforms=function(){var e=this;ue(se.postTransforms,ce(this.plugins,$.PostTransforms)).forEach((function(t){t.transform(e.weightMap,e.vars,e.type)}))},e.prototype.createOpsMap=function(){for(var e=[],t=0;t<this.ops.length;t++){var n=e.length,r=this.ops[t],o=new P(r,n);this.transforms(o,e),e.push(o)}this.weightMap=e},e.prototype.arrangeMap=function(){for(var e=[],t={},n={},r=0;r<this.weightMap.length;r++)for(var o=this.weightMap[r],i=0;i<o.outputsName.length;i++){var a=o.outputsName[i];n[a]?n[a]++:n[a]=1,t[o.id]=r}for(r=0;r<this.weightMap.length;r++)for(o=this.weightMap[r],e[r]=0,i=0;i<o.inputsName.length;i++)n[o.inputsName[i]]&&e[r]++;this.topoSort(this.weightMap,e,t)},e.prototype.topoSort=function(e,t,n){for(var r=[],o=e.slice(0),i=0;i<t.length;i++)0===t[i]&&r.push(e[i]);for(var a=null,s=0,u=r;s<u.length;s++){var c=u[s];a=this.topoSortInner(e,t,n,c,o,a)}},e.prototype.topoSortInner=function(e,t,n,r,o,i){for(var a=[r],s=i,u=r;a.length>0;){s&&(e[n[s.id]].next=u.id),s=u,u=a.pop()||{};for(var c=0;c<u.outputsName.length;c++)for(var l=0;l<o.length;l++)for(var f=0;f<o[l].inputsName.length;f++)if(o[l].inputsName[f]===u.outputsName[c]&&(t[n[o[l].id]]--,0===t[n[o[l].id]])){a.push(e[n[o[l].id]]),o.splice(l,1),l--;break}}return e[n[s.id]].next=u.id,u},e.prototype.getFeedExecutor=function(){return this.weightMap.find((function(e){return"feed"===e.type}))},e.prototype.getFetchExecutor=function(){return this.weightMap.find((function(e){return"fetch"===e.type}))},e.prototype.getExecutorById=function(e){return this.weightMap.find((function(t){return t.id===e}))},e}(),fe=function(){function e(e){this.opts={},this.isPacked=!1,this.name="",this.tensorId="",this.total=1,this.shape=[],this.unformattedShapeLength=0,this.shape_texture=[],this.exceedMax=!1,this.data=null,this.persistable=!1,this.interpType="NEAREST",this.dataLayout="",this.runtime=0,this.binding=0;var t=e.isPacked,n=void 0!==t&&t,r=e.name,o=e.runtime,i=void 0===o?0:o,a=e.persistable,s=void 0!==a&&a,u=e.type,c=e.dataLayout,l=e.interpType,f=void 0===l?"NEAREST":l,h=e.shape,d=e.data,p=e.binding,v=void 0===p?0:p;this.opts=e,this.isPacked=n,this.name=r,this.runtime=i,this.binding=v,this.persistable=s,this.interpType=f,this.tensorId=u,this.dataLayout=c,this.unformattedShapeLength=h.length,this.shape=z(h),this.total=this.shape.reduce((function(e,t){return e*t})),e.noLayout||d&&d.length&&(this.data=Y(d,this.dataLayout,this.shape,this.isPacked),e.data=null)}return Object.defineProperty(e.prototype,"width_texture",{get:function(){var e=this.shape_texture.length;return this.shape_texture[e-1]||1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height_texture",{get:function(){var e=this.shape_texture.length;return this.shape_texture[e-2]||1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width_shape",{get:function(){var e=this.shape.length;return this.shape[e-1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height_shape",{get:function(){var e=this.shape.length;return this.shape[e-2]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"channel",{get:function(){var e=this.shape.length;return this.shape[e-3]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length_shape",{get:function(){return this.shape.length||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length_unformatted_shape",{get:function(){return this.unformattedShapeLength||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"total_shape",{get:function(){return this.total},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numbers_shape",{get:function(){for(var e=[],t=this.shape.length,n=0;n<t-1;n++){var r=this.shape.slice(n+1).reduce((function(e,t){return e*t}));e.push(r)}return e.push(1),e},enumerable:!1,configurable:!0}),e}(),he={adaptPaddings:function(){for(var e in this.processedAttrs)if(Object.prototype.hasOwnProperty.call(this.processedAttrs,e)&&"paddings"===e){var t=this.processedAttrs[e],n=t[0],r=t[1];return void(0===n&&1===r&&(this.processedAttrs[e][1]=0))}},setAdaptive:function(){this.processedAttrs.adaptive&&2===this.processedAttrs.ksize.length&&1===this.processedAttrs.ksize[0]&&1===this.processedAttrs.ksize[1]&&(this.processedAttrs.adaptive=!1,this.processedAttrs.global_pooling=!0)},isGlobalPooling:function(){var e,t=this.tensorDataMap.origin,n=(null===(e=null==t?void 0:t.shape)||void 0===e?void 0:e.length)||0;n>2&&this.processedAttrs.global_pooling&&(this.processedAttrs.ksize=[t.shape[n-2],t.shape[n-1]])},setPacked:function(){var e=this.processedAttrs.ispacked;this.tensorDataMap.origin&&e&&this.name.indexOf("pool")>-1&&(this.name+="_winograd")},mergeAttrs:function(){this.processedAttrs=this.subAttrs.reduce((function(e,t){return Object.assign(e,t)}),{})},isApplySeparableConv:function(){if(!this.isPackedOp){var e=this.processedAttrs.groups,t=this.tensorDataMap.filter;if("depthwise_conv2d"===this.name&&(this.name="conv2d"),t){var n=t.shape,r=n[0],o=n[1];r===e&&1===o&&(this.name+="_depthwise")}}},batchComputeConv2d:function(){var e=this.tensorDataMap.filter.shape[1];this.processedAttrs.filter_nearest_vec4=4*Math.floor(e/4),this.processedAttrs.filter_remainder_vec4=e%4},processBias:function(){var e=this.tensorDataMap.bias;if(e&&this.isPackedOp){e.packed=!0;var t=e.shape,n=[t[t.length-1]/4,1,1];e.shape=n}},isAdaptiveAvg:function(){var e=this.processedAttrs,t=e.adaptive,n=e.pooling_type;t&&"avg"===n&&(this.name+="_avg_adaptive")},isMax:function(){var e="max"===this.processedAttrs.pooling_type?1:0;this.processedAttrs.pooling_type=e,1===e&&(this.name+="_max")},transToPrelu:function(){this.processedAttrs.multi_value="0.0",this.processedAttrs.active_function="prelu"},transToRelu6:function(){this.processedAttrs.multi_value=this.processedAttrs.threshold,this.processedAttrs.active_function="relu6"},transToHardSigmoid:function(){this.processedAttrs.multi_value=this.processedAttrs.slope||.2,this.processedAttrs.bias_value=this.processedAttrs.offset||.5,this.processedAttrs.active_function="hardSigmoid"},transToLeakyrelu:function(){this.processedAttrs.multi_value=this.processedAttrs.alpha,this.processedAttrs.active_function="leakyRelu",this.name="relu"},transToPow:function(){this.processedAttrs.multi_value=this.processedAttrs.factor||2,this.processedAttrs.active_function="pow_func",this.name="pow"},transToSigmoid:function(){this.processedAttrs.active_function="sigmoid"},transToSqrt:function(){this.processedAttrs.active_function="sqrt"},transToTanh:function(){this.processedAttrs.active_function="tanh_func"},transToAbs:function(){this.processedAttrs.active_function="abs_func"},transToExp:function(){this.processedAttrs.active_function="exp"},transToScale:function(){var e=this.processedAttrs.scale;this.processedAttrs.multi_value=void 0!==e?e:1,this.processedAttrs.bias_value=this.processedAttrs.bias||0;var t=this.processedAttrs.bias_after_scale;this.processedAttrs.active_function=t||void 0===t?"scale":"scaleWidthBias"},setActiveFunc:function(){var e=this.name.replace("conv2d-elementwise_add-","");this.processedAttrs=Object.assign({active_function:"scale",multi_value:"1.0",bias_value:"0.0",fuse_relu:!1},this.processedAttrs),"leaky_relu"===e&&(this.processedAttrs.multi_value=this.processedAttrs.alpha,this.processedAttrs.active_function="leakyRelu")},normalizePerm:function(){var e=this.tensorDataMap.origin.shape.length,t=this.processedAttrs.axis,n=t.length;if(n-e>0&&(n=(t=t.map((function(e){return e-1})).filter((function(e){return e>=0}))).length),n>4)throw Error("op transpoes2 axis length exceeds maximum length 4, get "+n);for(var r=new Array(n).fill(0),o=0;o<n;o++)r[t[o]]=o;var i=[];for(o=0;o<4;o++)i[o]=r[o]||0;this.processedAttrs.perm_arr=i,this.processedAttrs.perm_size=n},normalizeDim:function(){for(var e=this.tensorDataMap.origin.shape,t=z(e),n=this.processedAttrs,r=n.axis,o=n.dim,i=G(e,void 0!==r?r:Array.isArray(o)&&o.length?o[0]:o),a=[],s=0;s<t[i];s++)a[s]=s;if(this.processedAttrs.target_length=a.length,this.processedAttrs.target_value=a,this.processedAttrs.inputs_dim=t[i],this.processedAttrs.dim=i,0===this.processedAttrs.num&&(this.processedAttrs.num=Object.values(this.tensorDataMap).filter((function(e){return"out"===e.tensorName})).length||1),"wasm"===v.get("backend")){this.processedAttrs.fourInputs=!1;var u=this.tensorDataMap.counter;if(u){var c=z(u.shape);this.processedAttrs.counter_num=c[i]}var l=this.tensorDataMap.appender;if(l){var f=z(l.shape);this.processedAttrs.append_num=f[i]}var h=this.tensorDataMap.fourth;if(h){this.processedAttrs.fourInputs=!0;var d=z(h.shape);this.processedAttrs.fourth_num=d[i]}}},processElementwiseAxis:function(){var e=this.tensorDataMap.origin.shape,t=this.tensorDataMap.counter.shape,n=void 0===this.processedAttrs.axis?-1:this.processedAttrs.axis;this.processedAttrs.counterLen=t.length,H(e)===H(t)?(this.processedAttrs.axis=0,this.processedAttrs.counterLen=4):(-1===n&&(n=e.length-t.length),this.processedAttrs.axis=G(e,n))},genElementwiseCounterPos:function(){for(var e=this.processedAttrs,t=e.counterLen,n=["0","0","0","0"],r=e.axis,o=4-t;o<4;o++)n[o]="oPos["+r+++"]";this.processedAttrs.counterPos=n.join(",")},flattenShape:function(){var e=Object.values(this.tensorDataMap).find((function(e){return e.shape.length>2}));if(e){var t=z(e.shape);e.shape=[t[0]*t[2],t[1]*t[3]]}},reshape:function(){var e=this.tensorDataMap.origin,t=this.tensorDataMap.counter,n=this.tensorDataMap.out;if(t.shape.length>e.shape.length){var r=t;t=e,e=r}if(e.shape.length>2&&2===t.shape.length){var o=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]);var n=e.reduce((function(e,t){return e*t}));return 1===t.length?[1,n]:[t[0],n/t[0]]}(e.shape,n.shape);e.shape=o}},checkIsMerge:function(){var e=this.name.replace("conv2d-elementwise_add-","");this.name="conv2d_elementwise_add","leaky_relu"===e&&(this.processedAttrs.alpha&&(this.processedAttrs.multi_value=this.processedAttrs.alpha),this.processedAttrs.active_function="leakyRelu")}},de=function(){return(de=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},pe=function(){function e(e,t,n,r,o){this.name="",this.isPackedOp=!1,this.processedAttrs={},this.subAttrs=[],this.uniform=null,this.inputTensors=[],this.outputTensors=[],this.dataLayout="",this.iLayer=0,this.program=[],this.isFinalOp=!1,this.bufferType=f.FrameBuffer,this.tensorDataMap={},this.tensorData=[];var i=e.type,a=e.inputs,s=e.outputs,u=e.attrs,c=e.isPacked,l=e.bufferType,h=void 0===l?f.FrameBuffer:l,d=e.uniform,p=void 0===d?null:d;this.modelName=o,this.subAttrs=e.subAttrs,this.name=i,this.isPackedOp=c,this.bufferType=h,this.dataLayout=n.dataLayout||"",this.iLayer=t,this.isFinalOp=r,this.uniform=p,this.initExtendedAttrs(u),this.constructTensorData(a,s,n.vars),this.buildTensor();var v=this.buildShaderParams();this.buildProgram(v)}return e.prototype.initExtendedAttrs=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];this.processedAttrs[t]=n}},e.prototype.constructTensorData=function(e,t,n){var r=this;Object.keys(t).forEach((function(e){t[e].forEach((function(o,i){t[e][i]=r.getTensorVar(o,n)}))})),Object.keys(e).forEach((function(t){e[t]=[r.getTensorVar(e[t][0],n)]}));var o=function(e){if(Object.prototype.hasOwnProperty.call(t,e))try{var n=t[e]||[{}],o=i.getExactTensorName(e,"output");o&&n.forEach((function(e,t){e.tensorName=o,r.tensorDataMap[o+"_"+t]=de(de({},e),{tensorName:o,runtime:t})}))}catch(e){console.error(e)}},i=this;for(var a in t)o(a);for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=e[a].length>0?e[a]:[{}],u=this.getExactTensorName(a,"input");if(u){var c=s[0];c.tensorName=u,this.tensorDataMap[u]=de(de({},c),{tensorName:u})}}},e.prototype.getExactTensorName=function(e,t){return"input"===t?{input:"origin",x:"origin",y:"counter",w:"weight"}[e.toLowerCase()]||e.toLowerCase():{output:"out",y:"out",out:"out",scale:"scale",bias:"bias",mean:"mean",variance:"variance",mask:"out",boxes:"out",variances:"out"}[e.toLowerCase()]},e.prototype.getTensorVar=function(e,t){var n=s(t,e.replace(/_packed$/,""));return n&&e.endsWith("_packed")?function(e,t){var n=3===e.shape.length?W([1],e.shape):e.shape,r=n[0],o=n[1],i=n[2],a=n[3],s=Object.assign({},e);if(s.name=t,s.packed=!1,o%4==0){var u=o/4;s.packed=!0,s.shape=[r,u,i,a]}return s}(n,e):n},e.prototype.buildProgram=function(e){var t=this,n=this.name,r=b.backend+"_"+n,o=b.opRegistry.ops[r];try{if(!o&&"wasm"!==v.get("backend"))throw new Error("[unregistered op] "+n);var i=this.inputTensors;this.program=this.outputTensors.map((function(n,r){return b.backendInstance.createProgram({op:o,outTensor:n,inputTensors:i,shaderParams:e[r],runtime:r,isFinalOp:t.isFinalOp})}))}catch(e){console.error(e)}},e.prototype.processTensorDataAndAttrs=function(){var e=this;try{this.name.indexOf("conv2d-elementwise_add")>-1?this.name="conv2d_elementwise_add":this.name.indexOf("max_pool2d_with_index")>-1&&(this.name="pool2d_max");var t=b.backend+"_"+this.name;(b.opRegistry.ops[t]&&b.opRegistry.ops[t].behaviors||[]).forEach((function(t){try{he[t].call(e)}catch(e){console.error(e)}}))}catch(e){console.error(e)}},e.prototype.buildTensor=function(){var e=this;this.processTensorDataAndAttrs();var t=Object.values(this.tensorDataMap);t.forEach((function(t,n){var r,o=t.tensorName,i=new fe({type:e.modelName+"_"+t.name,name:o,shape:t.shape,data:t.data||null,persistable:t.persistable||!1,interpType:t.interpType||"NEAREST",isPacked:e.isPackedOp||t.packed||!1,binding:n,noLayout:null===(r=b.backendInstance)||void 0===r?void 0:r.noLayout,dataLayout:e.dataLayout,runtime:t.runtime||0});"out"===o?e.outputTensors.push(i):e.inputTensors.push(i),t.shape=i.shape,t.total=i.total})),this.tensorDataMap=null,this.tensorData=t},e.prototype.buildShaderParams=function(){var e=this,t=[];return this.outputTensors.forEach((function(){var n=JSON.parse(JSON.stringify(e.processedAttrs));t.push(n)})),t},e}(),ve=function(){return(ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ge=function(){function e(){this.targetContext={},this.gapFillWith="#fff",this.mean=[0,0,0],this.std=[1,1,1],this.bgr=!1,this.pixelWidth=1,this.pixelHeight=1,this.inputFeed=[],this.targetCanvas=v.get("canvas2d")||document.createElement("canvas"),this.targetContext=this.targetCanvas.getContext("2d")}return e.prototype.process=function(e,t,n){var r=t.fill,o=t.mean,i=t.std,a=t.bgr,s=t.keepRatio,u=void 0===s||s,c=t.scale,l=void 0===c?0:c,f=t.normalizeScale,h=void 0===f?1:f,d=t.normalizeType,p=n.fc,v=void 0===p?3:p,g=n.fh,m=n.fw,y=e,b={gapFillWith:r||this.gapFillWith,mean:o||this.mean,std:i||this.std,bgr:a||this.bgr,keepRatio:u,scale:l,targetSize:{width:m,height:g},normalizeScale:h,normalizeType:d,targetShape:[1,v,g,m]};return this.fromPixels(y,b)||[]},e.prototype.fromPixels=function(e,t){var n=[],r={gapFillWith:t.gapFillWith,dx:0,dy:0,dWidth:t.targetSize.width,dHeight:t.targetSize.height},o=e,i=e.path&&e.width&&e.height;if(!i&&!(e instanceof ImageBitmap||e instanceof HTMLVideoElement||e instanceof HTMLImageElement||e instanceof HTMLCanvasElement))return[{data:n,shape:t.shape||t.targetShape,name:"image",persistable:!0}];this.pixelWidth=e.naturalWidth||e.width,this.pixelHeight=e.naturalHeight||e.height;var a=v.get("webgl_gpu_pipeline")||t.webglFeedProcess;return this.fitToTargetSize(i?o.path:o,r,ve(ve({},t),{inGPU:a})),n=this.getImageData(r),a?[{data:n=Float32Array.from(n.data),shape:[1,1,r.dHeight,r.dWidth],name:"image",persistable:!0}]:[{data:n=this.allReshapeToRGB(n,t),shape:t.targetShape||t.shape,name:"image",persistable:!0}]},e.prototype.allReshapeToRGB=function(e,t){for(var n=t.mean,r=t.std,o=t.targetShape,i=t.bgr,a=t.normalizeType,s=void 0===a?0:a,u=t.normalizeScale,c=void 0===u?1:u,l=o[1],f=o[2],h=o[3],d=e.data||e,p=new Float32Array(f*h*l),v=0,g=0;g<f;++g)for(var m=g*h,y=0;y<h;++y)for(var b=m+y,w=0;w<l;++w){var A=d[i?4*b+(2-w):4*b+w];switch(s){case 1:A=(A-128)/128;break;case 2:break;default:A/=255}p[v]=A,p[v]-=n[w],p[v]/=r[w],p[v]*=c,v++}return new Float32Array(Q(p,[1,f,h,l]))},e.prototype.fitToTargetSize=function(e,t,n){var r=n||{},o=r.keepRatio,i=void 0===o||o,a=r.inGPU,s=void 0!==a&&a,u=r.scale,c=void 0===u?0:u,l=t.dWidth,f=t.dHeight,h=s?this.pixelWidth:l,d=s?this.pixelHeight:f,p=s?this.pixelWidth:l,v=s?this.pixelHeight:f;if(c){if(p-l<0||v-f<0)throw new Error("scale size smaller than target size");this.pixelWidth>this.pixelHeight?(v=c,p=Math.round(v*this.pixelWidth/this.pixelHeight)):(p=c,v=Math.round(p*this.pixelHeight/this.pixelWidth)),this.targetCanvas.width=h=p,this.targetCanvas.height=d=v,t.dx=(p-l)/2,t.dy=(v-f)/2}else i&&(l/f*this.pixelHeight/this.pixelWidth>=1?s?(h=Math.round(v*l/f),Math.floor((h-p)/2)):(p=Math.round(v*this.pixelWidth/this.pixelHeight),Math.floor((l-p)/2)):s?(d=Math.round(p*f/l),Math.floor((d-v)/2)):(v=Math.round(p*this.pixelHeight/this.pixelWidth),Math.floor((f-v)/2))),this.targetCanvas.width=t.dWidth=h,this.targetCanvas.height=t.dHeight=d;this.targetContext.fillStyle=t.gapFillWith,this.targetContext.fillRect(0,0,this.targetCanvas.width,this.targetCanvas.height),this.targetContext.drawImage(e,0,0,p,v)},e.prototype.getImageData=function(e){var t=e.dx,n=e.dy,r=e.dWidth,o=e.dHeight;return this.targetContext.getImageData(t,n,r,o)},e.prototype.cover=function(e,t,n,r){var o=n,i=r;return n/r*t/e>=1?o=Math.round(i*e/t):i=Math.round(o*t/e),[o/n,i/r]},e}(),me=function(){return(me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function ye(e,t,n){for(var r=[],o=0,i=e.length;o<i;o++){var a=e[o];a>t&&r.push({score:a,i:o})}return r.sort((function(e,t){return t.score-e.score})).slice(0,n)}function be(e){var t=e[0],n=e[1],r=e[2],o=e[3];return r<t||o<n?0:(r-t)*(o-n)}function we(e,t){if(t[0]>e[2]||t[2]<e[0]||t[1]>e[3]||t[3]<e[1])return 0;var n=be(e),r=be(t),o=function(e,t){var n=e[0],r=e[1],o=e[2],i=e[3],a=t[0],s=t[1],u=t[2],c=t[3],l=Math.max(n,a),f=Math.max(r,s);return(Math.min(o,u)-l)*(Math.min(i,c)-f)}(e,t);return o/(n+r-o)}var Ae={multiclass_nms:function(e,t){var n=e[0],r=void 0===n?[]:n,o=e[1],i=void 0===o?[]:o,a=q(r),s=q(i);if(!a||!s)return[];if(a=a[0],s=s[0],!(a&&a.length&&s&&s.length))return[];for(var u=t.nms_top_k,c=void 0===u?100:u,l=t.nms_eta,f=void 0===l?1:l,h=t.keep_top_k,d=void 0===h?100:h,p=t.background_label,v=void 0===p?0:p,g=t.nms_threshold,m=void 0===g?.3:g,y=t.score_threshold,b=void 0===y?0:y,w=[],A=0,x=s.length;A<x;A++){var T=[];if(A!==v){var P=ye(s[A],b,c);if(P&&P.length){var C=P.shift(),_=a[C.i];for(T.push(me(me({},C),{box:_,label:A}));P.length;){var E=P.shift();_=a[E.i];for(var S=!0,k=0,R=T;k<R.length;k++)if(we(_,R[k].box)>m){S=!1;break}S&&T.push(me(me({},E),{box:_,label:A})),S&&f<1&&m>.5&&(m*=f)}w=w.concat(T)}}}var O=w.sort((function(e,t){return t.score-e.score})).slice(0,d).sort((function(e,t){return e.label-t.label})).map((function(e){return function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}([e.label,e.score],e.box)}));return O&&O.length?O:[]}},xe=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Te=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Pe=function(){function e(e){this.runnerConfig={},this.isPaused=!1,this.model={},this.weightMap=[],this.isExecuted=!1,this.test=!1,this.graphGenerator={},this.mediaProcessor=null,this.needPreheat=!0,this.feedShape={},this.runnerConfig=Object.assign({},e),this.needPreheat=void 0===e.needPreheat||e.needPreheat,this.modelName=e.modelName||Date.now().toString(),this.weightMap=[],v.set("ns",i()),"node"!==v.get("platform")&&(this.mediaProcessor=new ge)}return e.prototype.init=function(e){return xe(this,void 0,void 0,(function(){var t;return Te(this,(function(n){switch(n.label){case 0:return b.backendInstance?(this.isExecuted=!1,"wasm"!==v.get("backend")?[3,2]:[4,Promise.all([this.load(),b.backendInstance.init()])]):(console.error("ERROR: Haven't register backend"),[2]);case 1:return n.sent(),[3,5];case 2:return[4,b.backendInstance.init()];case 3:return n.sent(),[4,this.load(e)];case 4:n.sent(),n.label=5;case 5:return this.genFeedData(),this.genGraph(),this.genOpData(),"wasm"!==v.get("backend")?[3,7]:(this.model=Object.assign(this.model,this.runnerConfig),t=this.model,[4,b.backendInstance.initWasm(this.model,this.weightMap)]);case 6:return t.index=n.sent(),[2,[]];case 7:return this.needPreheat?[4,this.preheat()]:[3,9];case 8:return[2,n.sent()];case 9:return[2]}}))}))},e.prototype.load=function(e){return xe(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,u;return Te(this,(function(c){switch(c.label){case 0:return t=this.runnerConfig,n=t.modelPath,r=t.modelObj,o=void 0===r?null:r,n?(i=new y(n),a=this,[4,i.load(e)]):[3,2];case 1:return a.model=c.sent(),[3,3];case 2:(null==o?void 0:o.model)&&(null==o?void 0:o.params)&&(s=o.model,u=o.params,y.allocateParamsVar(s.vars,u),this.model=s),c.label=3;case 3:return[2]}}))}))},e.prototype.genGraph=function(){this.graphGenerator=new le(this.model,this.runnerConfig),this.weightMap=this.graphGenerator.createGraph()},e.prototype.genOpData=function(){var e=this,t=0;this.weightMap.forEach((function(n,r){var o=n.type;if("feed"!==o&&"fetch"!==o){t++;var i=r===e.weightMap.length-2,a=new pe(n,t,e.model,i,e.modelName);n.opData=a}})),l(this.model)},e.prototype.preheat=function(){return xe(this,void 0,void 0,(function(){var e;return Te(this,(function(t){switch(t.label){case 0:return[4,this.checkModelLoaded()];case 1:return t.sent(),[4,this.execute()];case 2:return e=t.sent(),this.isExecuted=!0,[2,e]}}))}))},e.prototype.checkModelLoaded=function(){return xe(this,void 0,void 0,(function(){return Te(this,(function(e){switch(e.label){case 0:return this.model?[3,2]:[4,this.load()];case 1:e.sent(),e.label=2;case 2:return 0===this.weightMap.length&&(console.info("It's better to preheat the model before running."),this.genFeedData(),this.genGraph(),this.genOpData(),this.isExecuted=!1),[2]}}))}))},e.prototype.predict=function(e,t){return xe(this,void 0,void 0,(function(){var n,r,o;return Te(this,(function(i){switch(i.label){case 0:return this.isPaused||!this.mediaProcessor?[2]:(n=[],n=this.runnerConfig.webglFeedProcess?[e]:this.mediaProcessor.process(e,this.runnerConfig,this.feedShape),r=[],"wasm"!==v.get("backend")?[3,3]:[4,b.backendInstance.predict(n[0].data,this.model.index)]);case 1:return i.sent(),[4,this.read()];case 2:return o=i.sent(),r=this.postProcess(o),[3,5];case 3:return this.updateFeedData(n),[4,this.execute()];case 4:r=i.sent(),i.label=5;case 5:return this.isExecuted=!0,[2,t?t(r):r]}}))}))},e.prototype.predictWithFeed=function(e,t,n,r){var o;return xe(this,void 0,void 0,(function(){var i,a,s,u,c,l,f,h,d,p,g,m,y;return Te(this,(function(w){switch(w.label){case 0:return i=this.feedShape,a=i.fc,s=void 0===a?3:a,u=i.fw,c=i.fh,Array.isArray(e)?(null===(o=e[0])||void 0===o?void 0:o.data)?((p=e[0].data)instanceof Float32Array||(e[0].data=new Float32Array(p)),l=e):l=[{data:new Float32Array(e),shape:n||[1,s,c,u],name:"image",persistable:!0}]:ArrayBuffer.isView(e)?l=[{data:e,shape:n||[1,s,c,u],name:"image",persistable:!0}]:(h=(f=e).width,d=f.height,p=f.data,l=[{data:new Float32Array(p),shape:n||[1,s,d||c,h||u],name:"image",persistable:!0}]),r||((g=l[0]).data=Y(g.data,"nhwc",g.shape,!1)),m=[],"wasm"!==v.get("backend")?[3,3]:[4,b.backendInstance.predict(l[0].data,this.model.index)];case 1:return w.sent(),[4,this.read()];case 2:return y=w.sent(),m=this.postProcess(y),[3,5];case 3:return this.updateFeedData(l),[4,this.execute()];case 4:m=w.sent(),w.label=5;case 5:return this.isExecuted=!0,[2,t?t(m):m]}}))}))},e.prototype.genFeedData=function(){var e,t=this.runnerConfig,n=t.type,r=t.feedShape,o=t.webglFeedProcess;this.feedShape=this.model.feedShape||r;var i,a=this.feedShape,c=a.fc,l=void 0===c?3:c,f=a.fh,h=a.fw,d=this.model,g=d.vars,m=d.feed;if(n===p.MultipleInput){var y=this.model.ops&&this.model.ops[0]&&(null===(e=this.model.ops[0].inputs)||void 0===e?void 0:e.X);y.length>1&&(i=y.map((function(e){var t=s(g,e),n=t.shape.reverse(),r=n[0],o=n[1],i=n[2],a=n[3],u=void 0===a?1:a;return t.data=new Float32Array(u*i*o*r),t})))}else{i=m||s(g,"image");var b="wasm"!==v.get("backend")&&o?4:l,w={name:"image",shape:[1,l,f,h]};i=Object.assign(w,i,{data:new Float32Array(b*f*h).fill(1),persistable:!0}),"wasm"!==v.get("backend")&&o&&(i.shape[1]=4)}u(g,i)},e.prototype.updateFeedData=function(e){for(var t=e[0],n=0,r=this.weightMap.filter((function(e){return e.opData?e.opData.inputTensors.find((function(e){return e.tensorId.endsWith("_image")})):null}));n<r.length;n++){for(var o=r[n],i=0,a=o.opData.inputTensors;i<a.length;i++){var s=a[i];s.tensorId.endsWith("_image")&&(s.data=t.data)}var u=this.runnerConfig,c=u.webglFeedProcess,l=void 0!==c&&c,f=u.keepRatio,h=void 0===f||f;if(l||v.get("webgl_gpu_pipeline")){var d=o.opData.inputTensors.find((function(e){return e.tensorId.endsWith("_image")})),p=t.shape||[1,1,t.height,t.width],g=new Uint8Array(t.data||[]);if(t.width&&t.height&&!t.data){var m=t.naturalWidth||t.width;p=[1,1,t.naturalHeight||t.height,m],g=t}var y=d.opts;y.shape=p;var b=o.opData,w=new fe(y);w.data=g,b.inputTensors=[w];var A=p.slice(-2),x=A[0],T=A[1],P=b.outputTensors[0].shape.slice(-2),C=P[0],_=P[1],E=this.mediaProcessor.cover(T,x,_,C);o.uniform.u_scale.value=E,o.uniform.u_keep_ratio.value=+h}}},e.prototype.execute=function(){return xe(this,void 0,void 0,(function(){var e,t;return Te(this,(function(n){switch(n.label){case 0:return e=this.graphGenerator.getFeedExecutor(),this.executeOp(e),[4,this.read()];case 1:return t=n.sent(),[2,this.postProcess(t)]}}))}))},e.prototype.postProcess=function(e){var t="wasm"===v.get("backend");if(v.get("debug"))return e;var n=e,r=this.model,o=r.multiOutputs,i=r.postOps;if(o)if(t)n=o.map((function(t,n){var r;return(r={})[t.name]=e[n],r}));else{var a=0;n=o.map((function(t){var n,r=t.shape.reduce((function(e,t){return e*t})),o=e.slice(a,r+a);return a+=r,(n={})[t.name]=o,n}))}if(o&&i&&i.length)for(var s=function(e,t){var r=i[e],o=r.type,a=r.attrs,s=r.inputs,u=Ae[o];if(!u)return{value:void 0};var c=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(n),l=Object.keys(s).map((function(e){var t=s[e],n=t.name,r=t.shape,o=c.filter((function(e){return e[n]}));return o&&o[0]&&o[0][n]?{name:e,tensorId:n,data:o[0][n],shape:r}:(console.error("未获取到"+n+"的数据"),null)}));n=u(l,a)},u=0,c=i.length;u<c;u++){var l=s(u);if("object"==S(l))return l.value}return n},e.prototype.executeOp=function(e){var t;if("fetch"!==e.type)if("feed"!==e.type&&e.execute(this.isExecuted),v.get("debug")&&(null===(t=e.opData)||void 0===t?void 0:t.outputTensors)&&e.opData.outputTensors[e.opData.outputTensors.length-1]&&e.opData.outputTensors[e.opData.outputTensors.length-1].tensorId===this.modelName+"_"+(v.get("ns").layerName||v.get("layerName")))console.info(e.opData.name+"_"+e.opData.iLayer,"runner op");else if(e.next){var n=e.next,r=this.graphGenerator.getExecutorById(n);this.executeOp(r)}},e.prototype.read=function(){return xe(this,void 0,void 0,(function(){var e,t,n;return Te(this,(function(r){switch(r.label){case 0:return e=this.graphGenerator.getFetchExecutor(),t=s(this.model.vars,e.inputs.X[0]),n={name:t.name,shape:e.attrs.origin_shape||t.shape,index:this.model.index},[4,b.backendInstance.read(n)];case 1:return[2,r.sent()]}}))}))},e.prototype.stopPredict=function(){this.isPaused=!0},e.prototype.dispose=function(){for(var e=0,t=this.weightMap;e<t.length;e++){var n=t[e];if(n.opData){var r=n.opData;b.backendInstance.dispose&&b.backendInstance.dispose(r)}}this.weightMap=[],this.model=null},e}(),Ce=function(){}},993:function(){}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==("undefined"==typeof globalThis?"undefined":S(globalThis)))return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==("undefined"==typeof window?"undefined":S(window)))return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(994)}()}(zZ);!function(e,t){e.exports=function(){var e={293:function(e,t,n){n.r(t),n.d(t,{GLHelper:function(){return y},glInstance:function(){return Te},ops:function(){return xe},webgl_types:function(){return r}});var r={};n.r(r),n.d(r,{UniformType:function(){return a}});var o={};n.r(o),n.d(o,{abs_func:function(){return j},exp_func:function(){return L},hardSigmoid:function(){return M},leakyRelu:function(){return S},pow_func:function(){return I},prelu:function(){return _},relu6:function(){return E},scale:function(){return k},scaleWidthBias:function(){return R},sigmoid:function(){return O},sqrt:function(){return F},tanh_func:function(){return D},transferFromNHWCtoNCHW:function(){return C}});var i={};n.r(i),n.d(i,{getPixelsFromTexturePos:function(){return U},getSamplerCode:function(){return z},getTensorPosFromArrayIndex:function(){return V},getValueFromTensorPos:function(){return B},getValueFromTensorPosPacking:function(){return N},moveTexture2PosToReal:function(){return W}});var a,s,u,c,l=n(170);function f(e){for(var t=e.length,n=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(e),r=[];t>1;)n.splice(0,1),r.push(n.reduce((function(e,t){return e*t}))),t--;return r}function h(e,t){if(1===e.length)return"float "+t+" = float("+e[0]+");";for(var n=e.length,r="\n vec"+n+" "+t+" = vec"+n+"(\n ",o=0;o<n;o++)r+="float("+e[o]+"),";return r.slice(0,-1)+");"}function d(e,t,n){if(0===e.length)return"";if(2===l.env.get("webglVersion"))return e.reduce((function(t,r,o){return t+(o<e.length-1?n+"("+r+"), ":n+"("+r+"));")}),n+" "+t+"[] = "+n+"[](");var r=e.reduce((function(e,r,o){return e+"\n "+t+"["+o+"] = "+n+"("+r+");"}),"");return"\n "+n+" "+t+"["+e.length+"];\n "+r+"\n "}function p(e,t,n){if(0===e.length)return"";var r=e.reduce((function(e,t,r){return e+(0===r?"\n "+n+" res = "+n+"(0);\n if (index == "+r+") {\n res = arr["+r+"];\n }":"\n else if (index == "+r+") {\n res = arr["+r+"];\n }")}),"");return"\n "+n+" getValueFromArrByIndex_"+t+"("+n+"["+e.length+"] arr, int index) {\n "+(2===l.env.get("webglVersion")?n+" res = arr[index];":r)+"\n return res;\n }\n "}!function(e){e.uniform1f="1f",e.uniform1fv="1fv",e.uniform1i="1i",e.uniform1iv="1iv",e.uniform2f="2f",e.uniform2fv="2fv",e.uniform2i="2i",e.uniform2iv="2iv",e.uniform3f="3f",e.uniform3fv="3fv",e.uniform3i="3i",e.uniform3iv="3iv",e.uniform4f="4f",e.uniform4fv="4fv",e.uniform4i="4i",e.uniform4iv="4iv"}(a||(a={})),function(e){e.INT_TYPE="int",e.FLOAT_TYPE="float"}(s||(s={})),function(e){e[e.VS_SHADER=0]="VS_SHADER",e[e.FS_SHADER=1]="FS_SHADER"}(u||(u={})),function(e){e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35677]="SAMPLER_2D",e[e.SAMPLER_CUBE=35678]="SAMPLER_CUBE",e[e.FLOAT=5126]="FLOAT",e[e.INT=5124]="INT"}(c||(c={}));var v,g=function(e,t,n){this.size=e,this.type=t,this.location=n},m=function(e,t,n){this.size=e,this.type=t,this.location=n},y=function(){function e(){}return e.getWebglVersion=function(){return l.env.get("webglVersion")},e.createCanvas=function(){return l.env.get("canvas")||document&&document.createElement("canvas")},e.setWebglVersion=function(e){l.env.set("webglVersion",e)},e.setWebGLRenderingContext=function(e){return this.gl=e,e},e.getWebGLRenderingContext=function(){return this.gl?this.gl:this.createWebGLRenderingContext()},e.createWebGLRenderingContext=function(){if(this.gl)return this.gl;var e=this.createCanvas();if(!e)return null;e.addEventListener&&e.addEventListener("webglcontextlost",(function(e){throw e.preventDefault(),Error("webgl context is lost~")}),!1);var t=e.getContext("webgl2",this.WEBGL_ATTRIBUTES);return t?l.env.set("webglVersion",2):(l.env.set("webglVersion",1),t=e.getContext("webgl",this.WEBGL_ATTRIBUTES)||e.getContext("experimental-webgl",this.WEBGL_ATTRIBUTES)),t},e.printStates=function(e){console.log("1. isBlendEnable = "+e.isEnabled(e.BLEND)),console.log("2. isCullFaceEnable = "+e.isEnabled(e.CULL_FACE)),console.log("3. isDepthTestEnable = "+e.isEnabled(e.DEPTH_TEST)),console.log("4. isDitherEnable = "+e.isEnabled(e.DITHER)),console.log("5. isPolygonOffsetFillEnable = "+e.isEnabled(e.POLYGON_OFFSET_FILL)),console.log("6. isSampleAlphtToCoverageEnable = "+e.isEnabled(e.SAMPLE_ALPHA_TO_COVERAGE)),console.log("7. isSampleCoverageEnable = "+e.isEnabled(e.SAMPLE_COVERAGE)),console.log("8. isScissorTestEnable = "+e.isEnabled(e.SCISSOR_TEST)),console.log("9. isStencilTestEnable = "+e.isEnabled(e.STENCIL_TEST))},e.printWebGLInfo=function(e){console.log("renderer = "+e.getParameter(e.RENDERER)),console.log("version = "+e.getParameter(e.VERSION)),console.log("vendor = "+e.getParameter(e.VENDOR)),console.log("glsl version = "+e.getParameter(e.SHADING_LANGUAGE_VERSION))},e.printWebGLTextureInfo=function(e){console.log("MAX_COMBINED_TEXTURE_IMAGE_UNITS = ",e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),console.log("MAX_TEXTURE_IMAGE_UNITS = ",e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),console.log("MAX_TEXTURE_SIZE = ",e.getParameter(e.MAX_TEXTURE_SIZE)),console.log("MAX_CUBE_MAP_TEXTURE_SIZE = ",e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE))},e.triggerContextLostEvent=function(e){var t=e.getExtension("WEBGL_lose_context");null!==t&&t.loseContext()},e.checkGLError=function(e){var t=e.getError();return 0!==t&&(console.log("WebGL Error NO: ",t),!0)},e.setDefaultState=function(e){e.clearColor(0,0,0,0),e.clearDepth(1),e.enable(e.DEPTH_TEST),e.enable(e.CULL_FACE),e.enable(e.SCISSOR_TEST)},e.setViewport=function(e,t){e.viewport(t[0],t[1],t[2],t[3])},e.initShader=function(e,t,n){var r=this.createShader(e,t);return this.compileShader(e,n,r),r},e.createShader=function(e,t){var n;if(null===(n=t===u.VS_SHADER?e.createShader(e.VERTEX_SHADER):e.createShader(e.FRAGMENT_SHADER)))throw new Error("WebGLShader创建失败!");return n},e.compileShader=function(e,t,n){return e.shaderSource(n,t),e.compileShader(n),!1!==e.getShaderParameter(n,e.COMPILE_STATUS)||(console.error(e.getShaderInfoLog(n)),e.deleteShader(n),!1)},e.createProgram=function(e){var t=e.createProgram();if(null===t)throw new Error("WebGLProgram创建失败!");return t},e.linkProgram=function(e,t,n,r,o,i){return void 0===o&&(o=null),void 0===i&&(i=null),e.attachShader(t,n),e.attachShader(t,r),null!==o&&o(e,t),e.linkProgram(t),!1===e.getProgramParameter(t,e.LINK_STATUS)?(console.error(e.getProgramInfoLog(t)),e.deleteShader(n),e.deleteShader(r),e.deleteProgram(t),!1):(e.validateProgram(t),!1===e.getProgramParameter(t,e.VALIDATE_STATUS)?(console.error(e.getProgramInfoLog(t)),e.deleteShader(n),e.deleteShader(r),e.deleteProgram(t),!1):(null!==i&&i(e,t),!0))},e.getProgramActiveAttribs=function(e,t,n){for(var r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),o=0;o<r;o++){var i=e.getActiveAttrib(t,o);i&&(n[i.name]=new m(i.size,i.type,e.getAttribLocation(t,i.name)))}},e.getProgramAtciveUniforms=function(e,t,n){for(var r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),o=0;o<r;o++){var i=e.getActiveUniform(t,o);if(i){var a=e.getUniformLocation(t,i.name);null!==a&&(n[i.name]=new g(i.size,i.type,a))}}},e.createBuffer=function(e){var t=e.createBuffer();if(null===t)throw new Error("WebGLBuffer创建失败!");return t},e.getColorBufferData=function(e){var t=new Uint8Array(e.drawingBufferWidth*e.drawingBufferHeight*4);return e.readPixels(0,0,e.drawingBufferWidth,e.drawingBufferHeight,e.RGBA,e.UNSIGNED_BYTE,t),t},e.setUniformParam=function(e,t,n,r){switch(n){case a.uniform1f:e.uniform1f(t,r);break;case a.uniform1fv:e.uniform1fv(t,r);break;case a.uniform1i:e.uniform1i(t,r);break;case a.uniform1iv:e.uniform1iv(t,r);break;case a.uniform2f:e.uniform2f(t,r[0],r[1]);break;case a.uniform2fv:e.uniform2fv(t,r);break;case a.uniform2i:e.uniform2i(t,r[0],r[1]);break;case a.uniform2iv:e.uniform2iv(t,r);break;case a.uniform3f:e.uniform3f(t,r[0],r[1],r[2]);break;case a.uniform3fv:e.uniform3fv(t,r);break;case a.uniform3i:e.uniform3i(t,r[0],r[1],r[2]);break;case a.uniform3iv:e.uniform3iv(t,r);break;case a.uniform4f:e.uniform4f(t,r[0],r[1],r[2],r[3]);break;case a.uniform4fv:e.uniform4fv(t,r);break;case a.uniform4i:e.uniform4i(t,r[0],r[1],r[2],r[3]);break;case a.uniform4iv:e.uniform4iv(t,r);break;default:console.error("["+n+"]: unknown uniform type")}},e.genTextureInfoFromTensorShape=function(e,t){var n=e||4096,r=t.shape,o=void 0===r?[]:r,i=o[0],a=o[1],s=o[2],u=o[3];if(i*s<=n&&a*u<=n)t.shape_texture=[i*s,a*u];else{var c=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(o).sort((function(e,t){return e-t})),f=c[0],h=c[1],d=c[2],p=f*c[3],v=h*d;if(p>n||v>n){var g=[p,v].sort((function(e,t){return e-t})),m=g[0],y=g[1],b=function(e,t){var n=t;if(e%n==0)return n;for(;n<e&&e%n!=0;)n++;return n}(y,Math.ceil(y/n));if(p=m*b,v=Math.ceil(y/b),l.env.get("debug")&&console.error("大小超限",o,[v,p]),p>n||v>n)throw new Error("Requested texture size ["+p+"x"+v+"] greater than WebGL maximum on this browser / GPU ["+n+"x"+n+"].")}t.shape_texture=[v,p]}},e.WEBGL_ATTRIBUTES={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0,powerPreference:"high-performance"},e.gl=null,e}();!function(e){e[e.GL_REPEAT=0]="GL_REPEAT",e[e.GL_MIRRORED_REPEAT=1]="GL_MIRRORED_REPEAT",e[e.GL_CLAMP_TO_EDGE=2]="GL_CLAMP_TO_EDGE"}(v||(v={}));var b=function(){function e(){}return e.getTextureConfig=function(e){var t,n,r,o,i,a,s,u,c=e,f=!0,h=!0;return 2===l.env.get("webglVersion")?(t=c.getExtension("EXT_color_buffer_float"),r=c.HALF_FLOAT,o=c.R32F,i=c.RGBA32F,a=c.R16F,s=c.RGBA16F,n=c.RED,u=c.RGBA32F):(o=c.RGBA,a=c.RGBA,s=c.RGBA,i=c.RGBA,n=c.RGBA,u=c.RGBA,t=c.getExtension("OES_texture_float"),r=c.getExtension("OES_texture_half_float").HALF_FLOAT_OES,f=this.isDownloadFloatTextureEnabled(c,u),h=this.isFloatTextureReadPixelsEnabledMethod(c,1,f)),{textureFloat:t,textureHalfFloat:r,internalFormat:o,internalFormatPacked:i,internalFormatHalfFloat:a,internalFormatPackedHalfFloat:s,textureFormat:n,downloadInternalFormat:u,frameBufferSupportFloat:f,isFloatTextureReadPixelsEnabled:h}},e.isFloatTextureReadPixelsEnabledMethod=function(e,t,n){var r=e;if(0===t)return!1;if(1===t){if(null==r.getExtension("OES_texture_float"))return!1}else if(null==r.getExtension("EXT_color_buffer_float")||null==r.getExtension("EXT_color_buffer_half_float"))return!1;var o=r.createFramebuffer(),i=r.createTexture();r.bindTexture(r.TEXTURE_2D,i);var a=2===t?r.RGBA32F:r.RGBA;r.texImage2D(r.TEXTURE_2D,0,a,1,1,0,r.RGBA,n?r.FLOAT:r.getExtension("OES_texture_half_float").HALF_FLOAT_OES,null),r.bindFramebuffer(r.FRAMEBUFFER,o),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,i,0);var s=r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE;r.readPixels(0,0,1,1,r.RGBA,r.FLOAT,new Float32Array(4));var u=r.getError()===r.NO_ERROR;return s&&u},e.isDownloadFloatTextureEnabled=function(e,t){var n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n),e.texImage2D(e.TEXTURE_2D,0,t,1,1,0,e.RGBA,e.FLOAT,null);var r=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0);var o=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(n),e.deleteFramebuffer(r),o},e.uploadDataToTexture=function(e,t,n,r){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);var o=n.width_texture,i=n.height_texture,a=n.data,s=e.RGBA,u=e.RGBA,c=e.FLOAT,f=a;if(a instanceof Uint8Array||a instanceof Uint8ClampedArray)c=e.UNSIGNED_BYTE;else{if(!(a instanceof Float32Array||a instanceof Array))return void e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,a);if(2===l.env.get("webglVersion")){var h=l.env.get("webgl_force_half_float_texture");s=r?h?t.internalFormatPackedHalfFloat:t.internalFormatPacked:h?t.internalFormatHalfFloat:t.internalFormat,u=r?e.RGBA:t.textureFormat}else{for(var d=new Float32Array(o*i*4),p=0;p<a.length;p++)r?d[p]=a[p]:(d[4*p]=a[p],d[4*p+1]=0,d[4*p+2]=0,d[4*p+3]=0);f=d}}e.texImage2D(e.TEXTURE_2D,0,s,o,i,0,u,c,f)},e.genOutputTexture=function(e,t,n,r){var o=n.interpType,i=n.width_texture,a=n.height_texture,s=e.createTexture();e.bindTexture(e.TEXTURE_2D,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,"LINEAR"===o?e.LINEAR:e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,"LINEAR"===o?e.LINEAR:e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);var u=l.env.get("webgl_force_half_float_texture"),c=u?t.internalFormatPackedHalfFloat:t.internalFormatPacked,f=2===l.env.get("webglVersion")?u?e.HALF_FLOAT:e.FLOAT:t.frameBufferSupportFloat?e.FLOAT:t.textureHalfFloat,h=r?t.isFloatTextureReadPixelsEnabled?f:e.UNSIGNED_BYTE:null;return e.texImage2D(e.TEXTURE_2D,0,c,i,a,0,e.RGBA,r?h:f,null),e.bindTexture(e.TEXTURE_2D,null),s},e}(),w=["\n precision highp float;\n precision highp int;\n\n attribute vec4 position;\n varying vec2 vCoord;\n\n void main() {\n vCoord.x = (position.x + 1.0) / 2.0;\n vCoord.y = (position.y + 1.0) / 2.0;\n gl_Position = position;\n }\n ","#version 300 es\n in vec4 position;\n out vec2 vCoord;\n\n void main() {\n vCoord.x = (position.x + 1.0) / 2.0;\n vCoord.y = (position.y + 1.0) / 2.0;\n gl_Position = position;\n }\n "],A=new Float32Array([-1,1,-1,-1,1,1,1,-1]),x=["length_shape","length_unformatted_shape","width_shape","height_shape","width_texture","height_texture","offset_x","offset_y","channel","total_shape","numbers_shape"],T={float:["multi_value","bias_value"],bool:["fuse_relu"]};function P(){return"\n "+(l.env.get("useModAdaptor")?"\n int calMod(int a, int b) {\n float modV = mod(float(a), float(b));\n if (modV == float(b)) {\n modV = 0.0;\n }\n return int(modV);\n }\n ":"\n int calMod(int a, int b) {\n return a - a / b * b;\n }\n ")+"\n "+(l.env.get("useDivisionAdaptor")?"\n int calDivision(int a, int b) {\n return int(float(a) / (float(b) - 0.0001));\n }\n ":"\n int calDivision(int a, int b) {\n return a / b;\n }\n ")+"\n \n float tanh_calc(float num) {\n float res = (exp(2.0 * num) - 1.0) / (exp(2.0 * num) + 1.0);\n return res;\n }\n \n "}var C="\nivec4 transferFromNHWCtoNCHW(\n int sumVal,\n const int channel,\n const int width_shape,\n const int height_shape,\n const int total_shape) {\n\n int n_origin = int(total_shape/(channel * width_shape * height_shape));\n int new_a = calMod(sumVal, width_shape);\n sumVal = int((sumVal - new_a) / width_shape);\n int new_b = calMod(sumVal, height_shape);\n sumVal = int((sumVal - new_b) / height_shape);\n int new_g = calMod(sumVal, channel);\n sumVal = int((sumVal - new_g) / channel);\n int new_r = calMod(sumVal, n_origin);\n return ivec4(new_r,new_g,new_b,new_a);\n}\n",_="\nfloat prelu(float x, float p, float b) {\n float result = x;\n if (x < 0.0) {\n result = x * p;\n }\n\n return result;\n}",E="\nfloat relu6(float x, float threshold, float b) {\n float result = min(max(0.0, x), threshold);\n return result;\n}",S="\nfloat leakyRelu(float x, float p, float b) {\n float result = max(x, x * p);\n return result;\n}",k="\nfloat scale(float x, float p, float b) {\n float result = p * x + b;\n return result;\n}",R="\nfloat scaleWidthBias(float x, float p, float b) {\n float result = p * (x + b);\n return result;\n}",O="\nfloat sigmoid(float x, float y, float z) {\n float result = 1.0 / (1.0 + exp(-x));\n return result;\n}",M="\n float hardSigmoid(float x, float slope, float offset) {\n float result = max(0.0, min(1.0, slope * x + offset));\n return result;\n }\n",F="\n float sqrt(float x, float slope, float offset) {\n return sqrt(x);\n }\n",I="\n float pow_func(float x, float factor, float offset) {\n return pow(x, factor);\n }\n",D="\nfloat tanh_func(float x, float y, float z) {\n return tanh_calc(x);\n}",L="\nfloat exp_func(float x, float y, float z) {\n float result = exp(x);\n return result;\n}",j="\nfloat abs_func(float x, float y, float z) {\n return abs(x);\n}";function B(e,t){var n=t.width_shape,r=t.height_shape,o=t.channel,i=t.width_texture;return"\n float getValueFromTensorPos_"+e+"(int n, int c, int h, int w) {\n int index = n * "+n*r*o+" + c * "+n*r+" + h * "+n+" + w;\n // 0.01 hack: 在 PC/WISE 机器上,出现某个值(比如 index 为 3520) float(index) 和 float(3520) 返回值不同的情况,目前 +0.01 hack\n int pos_w = int(mod(float(index) + 0.01, float("+i+")));\n int pos_h = index / int("+i+");\n vec4 pixels = TEXTURE2D(texture_"+e+",\n vec2(\n (float(pos_w) + 0.5) / float("+i+"),\n (float(pos_h) + 0.5) / float("+t.height_texture+")\n )\n );\n return pixels.r;\n }"}function N(e,t){var n=t.channel,r=t.height_shape,o=t.width_texture,i=t.height_texture,a=t.width_shape;return"\n vec4 getValueFromTensorPosPacking_"+e+"(int n, int c, int h, int w) {\n int index = n * "+a*r*n+" + c * "+a*r+" + h * "+a+" + w;\n // 0.01 hack: 在 PC/WISE 设备上,出现某个值(比如 index 为 3520) float(index) 和 float(3520) 返回值不同的情况,目前 +0.01 hack\n int pos_w = int(mod(float(index) + 0.01, float("+o+")));\n int pos_h = index / int("+o+");\n vec4 pixels = TEXTURE2D(texture_"+e+",\n vec2(\n (float(pos_w) + 0.5) / float("+o+"),\n (float(pos_h) + 0.5) / float("+i+")\n )\n );\n return pixels;\n }"}function V(e,t){var n=t.numbers_shape,r=t.length_shape;if(1===r)return"\n int getTensorPosFromArrayIndex_"+e+"(int n) {\n return calMod(n, "+n[0]+");\n }\n ";for(var o="ivec"+r+"("+n.join(", ")+")",i="pos[0] = n / "+n[0]+";",a=1;a<r;a++)i+="\n n = calMod(n, "+n[a-1]+");\n pos["+a+"] = calDivision(n, "+n[a]+");\n ";return"\n ivec"+r+" shapeVec_"+e+" = "+o+";\n ivec"+r+" getTensorPosFromArrayIndex_"+e+"(int n) {\n ivec"+r+" pos;\n "+i+"\n return pos;\n }\n "}function U(e){return"\n #define getPixelsFromTexturePos_"+e+"(pos) TEXTURE2D(texture_"+e+", pos)\n "}function W(e,t){return"\n vec2 moveTexture2PosToReal_"+e+"(vec2 v) {\n vec2 v2;\n v2.x = v.x * float("+t.width_texture+");\n v2.y = v.y * float("+t.height_texture+");\n return v2;\n }\n "}function z(e){return"uniform sampler2D texture_"+e+";"}function H(e,t,n,r,a){var s,u,c="",f=t.name,h=t.mainFunc,d=t.textureFuncConf,p=void 0===d?{}:d,v=t.commonFuncConf;try{var g=function(e,t,n){for(var r={},o=Object.assign({},t),i=[],a=0,s=e;a<s.length;a++){for(var u=s[a],c=u.name,l={},f=0,h=x;f<h.length;f++)void 0!==u[y=h[f]]&&(l[y]=u[y]);r[c]=l,i.push(c)}for(var d=0,p=Object.keys(T);d<p.length;d++)for(var v=p[d],g=0,m=T[v];g<m.length;g++){var y;void 0!==t[y=m[g]]&&(o[y]=v+"("+t[y]+")")}return t.active_function&&(o.active_function=t.active_function),o.runtime=n,{textureParams:r,opParams:o,active_function:t.active_function}}(n,r,a),m=g.textureParams,y=g.opParams,b=g.active_function,w=2===l.env.get("webglVersion")?" #version 300 es\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n #else\n precision mediump float;\n precision mediump int;\n #endif \n ":" #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n #else\n precision highp float;\n precision highp int;\n #endif\n ",A=function(e){var t=e.frameBufferSupportFloat,n=e.isFinalOp,r=e.isFloatTextureReadPixelsEnabled;return 2===l.env.get("webglVersion")?"\n // 顶点shader透传的材质坐标\n in vec2 vCoord;\n out vec4 outColor;\n void setOutput(float result) {\n result = fuse_op(result);\n outColor.r = result;\n }\n void setPackedOutput(vec4 result) {\n outColor = result;\n }\n int calCeil(int a, int b) {\n return int(ceil(float(a) / float(b)));\n }\n "+P()+"\n ":t?"\n varying vec2 vCoord;\n varying vec4 outColor;\n void setOutput(float result) {\n result = fuse_op(result);\n gl_FragColor.r = result;\n }\n void setPackedOutput(vec4 result) {\n gl_FragColor = result;\n }\n int calCeil(int a, int b) {\n return int(ceil(float(a) / float(b)));\n }\n "+P()+"\n ":n&&!r?"\n varying vec2 vCoord;\n varying vec4 outColor;\n\n const float FLOAT_MAX = 1.70141184e38;\n const float FLOAT_MIN = 1.17549435e-38;\n\n #define isnan(value) isnan_custom(value)\n bool isnan_custom(float val) {\n return (val > 0. || val < 1. || val == 0.) ? false : true;\n }\n\n "+P()+"\n\n int calCeil(int a, int b) {\n return int(ceil(float(a) / float(b)));\n }\n\n lowp vec4 encode_float(highp float v) {\n if (isnan(v)) {\n return vec4(255, 255, 255, 255);\n }\n\n highp float av = abs(v);\n\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n highp float e = floor(log2(av));\n highp float m = exp2(fract(log2(av))) - 1.0;\n\n c[2] = floor(128.0 * m);\n m -= c[2] / 128.0;\n c[1] = floor(32768.0 * m);\n m -= c[1] / 32768.0;\n c[0] = floor(8388608.0 * m);\n\n highp float ebias = e + 127.0;\n c[3] = floor(ebias / 2.0);\n ebias -= c[3] * 2.0;\n c[2] += floor(ebias) * 128.0;\n\n c[3] += 128.0 * step(0.0, -v);\n\n return c / 255.0;\n }\n\n void setOutput(float result) {\n result = fuse_op(result);\n gl_FragColor = encode_float(result);\n }\n ":"\n #define isnan(value) isnan_custom(value)\n bool isnan_custom(float val) {\n return (val > 0. || val < 1. || val == 0.) ? false : true;\n }\n\n varying vec2 vCoord;\n varying vec4 outColor;\n void setOutput(float result) {\n result = fuse_op(result);\n if(isnan(result)) {\n gl_FragColor.r = 0.0;\n }else {\n gl_FragColor.r = result;\n }\n }\n\n void setPackedOutput(vec4 result) {\n gl_FragColor = result;\n }\n\n "+P()+"\n\n int calCeil(int a, int b) {\n return int(ceil(float(a) / float(b)));\n }\n "}(e),C=function(e){var t="",n="";if(e.fuse_opt)for(var r in e.fuse_opt){var i=r,a=0,s=0;switch(r){case"scale":var u=e.fuse_opt.scale.bias_after_scale;a=void 0!==(l=e.fuse_opt.scale.scale)?l:1,s=e.fuse_opt.scale.bias||0,!1===u&&void 0!==u&&(i="scaleWidthBias");break;case"relu":i="prelu";break;case"relu6":a=e.fuse_opt[r].threshold;break;case"hard_sigmoid":i="hardSigmoid",a=e.fuse_opt[r].slope||.2,s=e.fuse_opt[r].offset||.5;break;case"leakyRelu":a=e.fuse_opt[r].alpha;break;case"pow":i="pow_func",a=e.fuse_opt[r].factor||2;break;case"tanh":i="tanh_func";break;case"exp":i="exp_func";break;case"abs":i="abs_func"}if("hard_swish"===r){var c=void 0!==e.fuse_opt.hard_swish.offset?e.fuse_opt.hard_swish.offset:3,l=void 0!==e.fuse_opt.hard_swish.scale?e.fuse_opt.hard_swish.scale:6;n+="res = res * min(max(0.0, res + float("+c+")), float("+(void 0!==e.fuse_opt.hard_swish.threshold?e.fuse_opt.hard_swish.threshold:6)+")) / float("+l+");"}else"dropout"===r?n+="\n if ("+("downgrade_in_infer"===e.fuse_opt.dropout.dropout_implementation)+") {\n res = res * (1.0 - float("+e.fuse_opt.dropout.dropout_prob+"));\n }":(t+=o[i],n+="res = "+i+"(res, float("+a+"), float("+s+"));")}return"\n "+t+"\n\n float fuse_op(float x) {\n float res = x;\n "+n+"\n return res;\n }\n "}(y),_=function(e,t,n,r){if(!e)return"";var o=Object.assign({},e);o["@all"]&&function(e,t){var n=t.filter((function(e){return"out"!==e.name})),r=e["@all"];n.forEach((function(t){var n=t.name;e[n]?e[n].concat(r):e[n]=r})),delete e["@all"]}(o,r);for(var a="",s="",u=0,c=Object.keys(o);u<c.length;u++){var l=c[u];if(t[l]){s+=z(l);for(var f=0,h=o[l];f<h.length;f++){var d=h[f];if(i[d])try{a+=i[d](l,t[l],n)}catch(e){console.error(e)}}}}return"\n "+s+"\n "+a+"\n "}(p,m,y,n),E=function(e){return void 0===e?"":"\n int layer_run_time = "+e+";\n "}(a),S=function(e){var t,n,r,o,i;return"\n \n vec2 _2d_shape_texture_out = vec2(float("+e.width_texture+"), float("+e.height_texture+"));\n \n "+(n=(t=e).height_shape,r=t.width_shape,"\n ivec4 getOutputTensorPos() {\n vec2 outCoord = vCoord.xy * (_2d_shape_texture_out);\n int index = int(outCoord.x) + int(outCoord.y) * int("+t.width_texture+");\n\n int n1 = int(index / "+(o=r*n*t.channel)+");\n int c1 = int(calMod(index, "+o+") / "+(i=r*n)+");\n int h1 = int(calMod(index, "+i+") / "+r+");\n int w1 = calMod(index, "+r+");\n return ivec4(n1, c1, h1, w1);\n }\n \n ")}(m.out),k=function(e){if(!e)return"";for(var t="",n=0,r=e;n<r.length;n++){var i=r[n];o[i]&&(t+=o[i])}return t}(v);s=c=" "+w+"\n "+C+"\n "+A+"\n "+k+"\n "+(b?o[b]:"")+"\n "+_+"\n "+E+"\n "+S+"\n "+h(m,y)+"\n ",u=1===l.env.get("webglVersion")?"texture2D":"texture",c=s.replace(/\bTEXTURE2D\b/g,u)}catch(e){console.error("["+f+"]: "+e)}return c}var G,X=function(){function e(e,t,n,r){var o=e;this.vShader=t;try{this.fShader=this.initShader(o,n,"fragment"),this.shape=r&&r.shape;var i=this.program=o.createProgram();o.attachShader(i,this.vShader),o.attachShader(i,this.fShader),o.linkProgram(i)}catch(e){throw new Error(e)}}return e.prototype.initShader=function(e,t,n){void 0===n&&(n="vertex");var r,o="vertex"===n?e.VERTEX_SHADER:e.FRAGMENT_SHADER;if("vertex"===n&&this.vShader)r=this.vShader;else if(r=e.createShader(o),"vertex"===n&&(this.vShader=r),e.shaderSource(r,t),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw new Error("compile: "+e.getShaderInfoLog(r));return r},e.prototype.setProgram=function(e,t,n){e.useProgram(this.program),n||this.runVertexShader(e,t)},e.prototype.runVertexShader=function(e,t){var n=e.getAttribLocation(this.program,"position");e.enableVertexAttribArray(n),e.bindBuffer(e.ARRAY_BUFFER,t),e.vertexAttribPointer(n,2,e.FLOAT,!1,0,0)},e.Sampler="uSampler",e}(),Q=(G=function(e,t){return(G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}G(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Y=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},q=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},K=function(e){function t(){var t=e.call(this)||this;return t.cacheTextures={},t.uniformLocations={},t.texturesMap={},t.queryList=[],t.currentTexture=null,t.width_shape_out=1,t.height_shape_out=1,t.width_texture_out=1,t.height_texture_out=1,t.channel=0,t.total_shape=0,t}return Q(t,e),t.prototype.init=function(){return Y(this,void 0,void 0,(function(){var e;return q(this,(function(t){return e=this.gl=y.createWebGLRenderingContext(),this.gl?(this.glVersion=y.getWebglVersion(),this.textureConf=b.getTextureConfig(e),this.MAX_TEXTURE_SIZE=l.env.get("MAX_TEXTURE_SIZE")||e.getParameter(e.MAX_TEXTURE_SIZE),e.disable(e.DEPTH_TEST),e.disable(e.STENCIL_TEST),e.disable(e.BLEND),e.disable(e.DITHER),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SAMPLE_COVERAGE),e.enable(e.SCISSOR_TEST),e.enable(e.CULL_FACE),e.cullFace(e.BACK),this.vertexBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,A,e.STATIC_DRAW),this.vShader=y.initShader(e,u.VS_SHADER,w[this.glVersion-1]),this.frameBuffer=e.createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,this.frameBuffer),this.pbo=e.createBuffer(),[2]):[2]}))}))},t.prototype.createProgram=function(e){var t=this,n=e.op,r=e.outTensor,o=e.inputTensors,i=e.shaderParams,a=e.runtime,s=e.isFinalOp,u=null;try{var c=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}([r],o);c.forEach((function(e){return y.genTextureInfoFromTensorShape(t.MAX_TEXTURE_SIZE,e)}));var l=H(this.textureConf,n,c,i,a);(u=new X(this.gl,this.vShader,l,r)).fsCode=l;var f=b.genOutputTexture(this.gl,this.textureConf,r,s);this.texturesMap[r.tensorId]=f,this.program=u}catch(e){console.error("webgl createProgram: "+n.name+" -- "+e)}return u},t.prototype.runProgram=function(e,t){var n=this,r=function(e,t){if(2===t&&l.env.get("performance")){var n=e.getExtension("EXT_disjoint_timer_query_webgl2");if(!n)return;var r=e.createQuery();return e.beginQuery(n.TIME_ELAPSED_EXT,r),r}return null}(this.gl,this.glVersion),o=e.isPackedOp;e.program.forEach((function(r,i){var a=e.outputTensors[i],s=a.tensorId;n.setOutProps(a),"frameBuffer"===e.bufferType?n.attachFrameBuffer(s):n.attachColorBuffer(),r.setProgram(n.gl,n.vertexBuffer,t),n.program=r,n.render(e,t,i,o)})),e.tensorData=null,r&&(this.queryList.push({name:e.name,query:r,count:1}),r=function(e,t,n){if(2===t&&l.env.get("performance")){var r=e.getExtension("EXT_disjoint_timer_query_webgl2");if(!r)return;e.endQuery(r.TIME_ELAPSED_EXT)}return n}(this.gl,this.glVersion,r))},t.prototype.read=function(e){return Y(this,void 0,void 0,(function(){var t,n,r;return q(this,(function(o){switch(o.label){case 0:return l.env.get("webgl_gpu_pipeline")?(t=this.gl,this.frameBuffer=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer),[2,[]]):(n=this.createPBO(),[4,this.createAndWaitForFence()]);case 1:return o.sent(),r=e?e.shape:[],[2,this.downloadFloat32TensorFromBuffer(n,r)]}}))}))},t.prototype.createPBO=function(){var e,t=this.textureConf;if(2===this.glVersion){var n=this.gl,r=this.pbo;n.bindBuffer(n.PIXEL_PACK_BUFFER,r);var o=16*this.width_texture_out*this.height_texture_out;return n.bufferData(n.PIXEL_PACK_BUFFER,o,n.STREAM_READ),n.readPixels(0,0,this.width_texture_out,this.height_texture_out,n.RGBA,n.FLOAT,0),n.bindBuffer(n.PIXEL_PACK_BUFFER,null),r}var i=this.gl,a=i.FLOAT;return t.isFloatTextureReadPixelsEnabled?e=new Float32Array(this.width_texture_out*this.height_texture_out*4):(e=new Uint8Array(this.width_texture_out*this.height_texture_out*4),a=i.UNSIGNED_BYTE),i.readPixels(0,0,this.width_texture_out,this.height_texture_out,i.RGBA,a,e),t.isFloatTextureReadPixelsEnabled?e:new Float32Array(e.buffer)},t.prototype.createAndWaitForFence=function(){return Y(this,void 0,void 0,(function(){var e,t,n,r,o=this;return q(this,(function(i){return e=this.gl,t=null!=e.fenceSync,n=function(){return!0},t&&(r=e.fenceSync(e.SYNC_GPU_COMMANDS_COMPLETE,0),e.flush(),n=function(){var t=e.clientWaitSync(r,0,0);return t===e.ALREADY_SIGNALED||t===e.CONDITION_SATISFIED}),[2,new Promise((function(e){o.pollItem(n,e)}))]}))}))},t.prototype.pollItem=function(e,t){!function n(){e()?t():setTimeout(n,1)}()},t.prototype.downloadFloat32TensorFromBuffer=function(e,t){var n=4*this.width_texture_out*this.height_texture_out;if(2===this.glVersion){var r=this.gl,o=new Float32Array(n);r.bindBuffer(r.PIXEL_PACK_BUFFER,e),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,o),r.bindBuffer(r.PIXEL_PACK_BUFFER,null);var i=[];if(l.env.get("webgl_pack_output"))return Array.from(o).slice(0,function(e){return e.reduce((function(e,t){return e*t}),1)}(t));for(var a=0;a<this.width_texture_out*this.height_texture_out;a++)i.push(o[4*a]);return i}var s=e,u=[];for(a=0;a<this.width_texture_out*this.height_texture_out;a++){var c=this.textureConf.isFloatTextureReadPixelsEnabled?4*a:a;u.push(s[c])}return u},t.prototype.setOutProps=function(e){var t=e.width_shape,n=void 0===t?1:t,r=e.height_shape,o=void 0===r?1:r,i=e.width_texture,a=void 0===i?1:i,s=e.height_texture,u=void 0===s?1:s,c=e.channel,l=void 0===c?0:c,f=e.total_shape,h=void 0===f?0:f;this.width_shape_out=n,this.height_shape_out=o,this.width_texture_out=a,this.height_texture_out=u,this.channel=l,this.total_shape=h},t.prototype.attachColorBuffer=function(){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,null),e.canvas.width=this.width_shape_out,e.canvas.height=this.height_shape_out,e.viewport(0,0,e.canvas.width,e.canvas.height),e.scissor(0,0,e.canvas.width,e.canvas.height)},t.prototype.attachFrameBuffer=function(e){this.currentTexture=this.texturesMap[e];var t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.currentTexture,0),t.viewport(0,0,this.width_texture_out,this.height_texture_out),t.scissor(0,0,this.width_texture_out,this.height_texture_out)},t.prototype.render=function(e,t,n,r){var o=this;void 0===t&&(t=!1),void 0===r&&(r=!1);var i=e.inputTensors,a=void 0===i?[]:i,s=e.uniform,u=void 0===s?null:s,c=e.iLayer,l=void 0===c?0:c,f=e.modelName,h=this.gl,d=0;a.forEach((function(e){o.initTexture(d,e,r);var i=o.getUniformLoc("texture_"+e.name,l,t,n,f);i&&h.uniform1i(i,d++)})),u&&this.setUniform(u,l,t,n,f),h.drawArrays(h.TRIANGLE_STRIP,0,4)},t.prototype.initTexture=function(e,t,n){var r,o=this.gl,i=this.textureConf,a=t.tensorId,s=n||t.isPacked,u=t.data;if(t.persistable){this.cacheTextures=this.cacheTextures||{};var c=this.cacheTextures[a];c?(r=c,u&&y.genTextureInfoFromTensorShape(this.MAX_TEXTURE_SIZE,t)):(r=o.createTexture(),this.cacheTextures[a]=r)}else r=this.texturesMap[a];o.activeTexture(o["TEXTURE"+e]),o.bindTexture(o.TEXTURE_2D,r),u&&(b.uploadDataToTexture(o,i,t,s),t.data=null)},t.prototype.setUniform=function(e,t,n,r,o){var i=this,a=Object.keys(e),s=this.gl;a.forEach((function(a){var u=e[a].type,c=e[a].value,l=i.getUniformLoc(a,t,n,r,o);y.setUniformParam(s,l,u,c)}))},t.prototype.getUniformLoc=function(e,t,n,r,o){var i=o+"_";if(n)return this.uniformLocations[i+t][e+r];var a=this.gl.getUniformLocation(this.program.program,e);return this.uniformLocations[i+t]=this.uniformLocations[i+t]||{},this.uniformLocations[i+t][e+r]=a,a},t.prototype.dispose=function(e){for(var t=0,n=e.inputTensors;t<n.length;t++){var r=n[t].tensorId;this.texturesMap[r]&&this.gl.deleteTexture(this.texturesMap[r]),this.cacheTextures[r]&&this.gl.deleteTexture(this.cacheTextures[r]),this.cacheTextures[r]=null,this.texturesMap[r]=null}},t}(l.PaddlejsBackend),J={mainFunc:function(e,t){var n=e.origin,r=e.filter,o=e.out,i=e.bias,a=t.groups,s=void 0===a?1:a,u=t.strides,c=void 0===u?[]:u,l=t.paddings,f=void 0===l?[]:l,h=t.dilations,d=void 0===h?[]:h,p=t.fuse_relu,v=t.filter_nearest_vec4,g=t.filter_remainder_vec4,m=t.act_type,y=void 0===m?"":m,b=t.padding_algorithm,w=void 0===b?"":b,A=t.hard_swish_offset,x=void 0===A?3:A,T=t.hard_swish_scale,P=void 0===T?6:T,C=t.hard_swish_threshold,_=void 0===C?6:C,E=c[0],S=void 0===E?1:E,k=c[1],R=void 0===k?1:k,O=f[0],M=void 0===O?0:O,F=f[1],I=void 0===F?0:F,D=d[0],L=void 0===D?1:D,j=d[1],B=void 0===j?1:j;return"SAME"===w&&Math.ceil((n.width_shape-r.width_shape)/S)+1!==o.width_shape&&(M=1,I=1),"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n int x = oPos.a;\n int c = oPos.g;\n int y = oPos.b;\n int b = oPos.r;\n float res = 0.0;\n\n // 获取output的坐标\n int oTensorChannel = (c / ("+o.channel+" / "+s+")) * "+r.channel+";\n int oy = y * "+S+" - "+M+";\n for (int fy = 0; fy < "+r.height_shape+"; fy++) {\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n oy += "+L+";\n continue;\n }\n int ox = x * "+R+" - "+I+";\n for (int fx = 0; fx < "+r.width_shape+"; fx++) {\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n ox += "+B+";\n continue;\n }\n // channel计算\n for (int j = 0; j < "+v+"; j += 4) {\n vec4 fValues = vec4(\n getValueFromTensorPos_filter(c, j, fy, fx),\n getValueFromTensorPos_filter(c, j + 1, fy, fx),\n getValueFromTensorPos_filter(c, j + 2, fy, fx),\n getValueFromTensorPos_filter(c, j + 3, fy, fx)\n );\n\n vec4 oValues = vec4(\n getValueFromTensorPos_origin(b, oTensorChannel + j, oy, ox),\n getValueFromTensorPos_origin(b, oTensorChannel + j + 1, oy, ox),\n getValueFromTensorPos_origin(b, oTensorChannel + j + 2, oy, ox),\n getValueFromTensorPos_origin(b, oTensorChannel + j + 3, oy, ox)\n );\n\n res += dot(fValues, oValues);\n }\n\n if ("+g+" == 1) {\n res += dot(\n getValueFromTensorPos_filter(c, "+v+", fy, fx),\n getValueFromTensorPos_origin(b, oTensorChannel + "+v+", oy, ox));\n } else if ("+g+" == 2) {\n vec2 fValues = vec2(\n getValueFromTensorPos_filter(c, "+v+", fy, fx),\n getValueFromTensorPos_filter(c, "+v+" + 1, fy, fx)\n );\n vec2 oValues = vec2(\n getValueFromTensorPos_origin(b, oTensorChannel + "+v+", oy, ox),\n getValueFromTensorPos_origin(b, oTensorChannel + "+v+" + 1, oy, ox)\n );\n res += dot(fValues, oValues);\n } else if ("+g+" == 3) {\n vec3 fValues = vec3(\n getValueFromTensorPos_filter(c, "+v+", fy, fx),\n getValueFromTensorPos_filter(c, "+v+" + 1, fy, fx),\n getValueFromTensorPos_filter(c, "+v+" + 2, fy, fx)\n );\n vec3 oValues = vec3(\n getValueFromTensorPos_origin(b, oTensorChannel + "+v+", oy, ox),\n getValueFromTensorPos_origin(b, oTensorChannel + "+v+" + 1, oy, ox),\n getValueFromTensorPos_origin(b, oTensorChannel + "+v+" + 2, oy, ox)\n );\n res += dot(fValues, oValues);\n }\n\n ox += "+B+";\n }\n oy += "+L+";\n }\n\n "+(i?"res += getValueFromTensorPos_bias(0, 0, 0, c);":"")+"\n\n if ("+p+") {\n res = max(0.0, res);\n }\n else if ("+("relu6"===y)+") {\n res = min(max(0.0, res), 6.0);\n }\n else if ("+("hard_swish"===y)+") {\n res = res * min(\n max(0.0, res + float("+x+")),\n float("+_+")\n ) / float("+P+");\n }\n\n setOutput(res);\n }\n "},textureFuncConf:{filter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"],bias:["getValueFromTensorPos"]},behaviors:["adaptPaddings","isApplySeparableConv","batchComputeConv2d","processBias"]};function Z(e,t){var n=e[0],r=e[1],o=e[2],i=e[3];if(1===n&&1===r)return[[1,1,o],3,[i],1,[o,i]];var a=e.slice(0,t),s=e.slice(t);return[a,a.length,s,s.length,[a.reduce((function(e,t){return e*t})),s.reduce((function(e,t){return e*t}))]]}function $(e,t,n){if(1===n)return"\n int getTensorPosFromArrayIndex_"+e+"(int n) {\n return calMod(n, "+t[0]+");\n }\n ";var r=f(t);return r.push(1),"\n ivec"+n+" shapeVec_"+e+" = ivec"+n+"("+r.join(", ")+");\n ivec"+n+" getTensorPosFromArrayIndex_"+e+"(int n) {\n ivec"+n+" pos;\n pos[0] = n / shapeVec_"+e+"[0];\n for (int i = 1; i < "+n+"; i++) {\n n = calMod(n, shapeVec_"+e+"[i - 1]);\n pos[i] = n / shapeVec_"+e+"[i];\n }\n return pos;\n }\n "}function ee(e){return 1===e?"int":"ivec"+e}function te(e){var t=e.total_shape,n=e.channel,r=e.height_shape,o=e.width_shape;return[t/n/r/o,n,r,o]}var ne={mainFunc:function(e,t){var n=e.origin,r=t.transpose_X,o=void 0!==r&&r,i=t.transpose_Y,a=void 0!==i&&i,s=t.trans_x,u=void 0!==s&&s,c=t.trans_y,l=o||u,f=a||void 0!==c&&c;return"\n void main() {\n float res = 0.0;\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n ivec4 origin_pos = out_pos;\n if ("+l+") {\n origin_pos[3] = origin_pos[2];\n }\n ivec4 counter_pos = out_pos;\n if ("+f+") {\n counter_pos[2] = counter_pos[3];\n }\n\n for (int j = 0; j < "+(l?n.height_shape:n.width_shape)+"; j++) {\n if ("+l+") {\n origin_pos[2] = j;\n }\n else {\n origin_pos[3] = j;\n }\n if ("+f+") {\n counter_pos[3] = j;\n }\n else {\n counter_pos[2] = j;\n }\n float o = getValueFromTensorPos_origin(origin_pos[0], origin_pos[1], origin_pos[2], origin_pos[3]);\n float c = getValueFromTensorPos_counter(counter_pos[0], counter_pos[1], counter_pos[2], counter_pos[3]);\n \n res += c * o;\n }\n setOutput(res);\n }\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]}};function re(e,t){var n=e[0],r=e[1],o=e[2],i=e[3];if(1===n&&1===r)return[[1,1,o],3,[i],1,[o,i]];var a=e.slice(0,t),s=e.slice(t);return[a,a.length,s,s.length,[a.reduce((function(e,t){return e*t})),s.reduce((function(e,t){return e*t}))]]}function oe(e,t,n){if(1===n)return"\n int getTensorPosFromArrayIndex_"+e+"(int n) {\n return calMod(n, "+t[0]+");\n }\n ";var r=f(t);return r.push(1),"\n ivec"+n+" shapeVec_"+e+" = ivec"+n+"("+r.join(", ")+");\n ivec"+n+" getTensorPosFromArrayIndex_"+e+"(int n) {\n ivec"+n+" pos;\n pos[0] = n / shapeVec_"+e+"[0];\n for (int i = 1; i < "+n+"; i++) {\n n = calMod(n, shapeVec_"+e+"[i - 1]);\n pos[i] = n / shapeVec_"+e+"[i];\n }\n return pos;\n }\n "}function ie(e){return 1===e?"int":"ivec"+e}function ae(e){var t=e.total_shape,n=e.channel,r=e.height_shape,o=e.width_shape;return[t/n/r/o,n,r,o]}var se={mainFunc:function(e,t){var n=e.origin,r=e.out;return"\n // start函数\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n int sumVal = oPos.a\n + oPos.b * "+r.width_shape+"\n + oPos.g * "+r.height_shape+" * "+r.width_shape+"\n + oPos.r * "+r.channel+" * "+r.width_shape+" * "+r.height_shape+";\n ivec4 new_oPos = transferFromNHWCtoNCHW(\n sumVal,\n "+n.channel+",\n "+n.width_shape+",\n "+n.height_shape+",\n "+n.total_shape+"\n );\n float o = getValueFromTensorPos_origin(new_oPos.r, new_oPos.g, new_oPos.b, new_oPos.a);\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},commonFuncConf:["transferFromNHWCtoNCHW"]},ue={mainFunc:function(e,t){var n=e.out,r=e.origin,o=t.align_mode,i=void 0===o?1:o,a=t.align_corners,s=void 0===a||a;return"\n // start函数\n\n vec4 getData(float n, float scale, bool align_flag, int in_len) {\n float m = align_flag ? ((n + 0.5) / scale - 0.5) : (n / scale);\n int a1 = int(floor(m));\n a1 = a1 > 0 ? a1 : 0;\n int a2 = (a1 + 1) < (in_len - 1) ? (a1 + 1) : (in_len - 1);\n\n float idx_src = (n + 0.5) / scale - 0.5;\n idx_src = idx_src > 0.0 ? idx_src : 0.0;\n float b1 = align_flag ? (idx_src - float(a1)) : (n / scale - float(a1));\n float b2 = 1.0 - b1;\n return vec4(float(a1), float(a2), b1, b2);\n }\n\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n\n bool align_flag = "+i+" == 0 && !"+s+";\n\n float scale_x = 0.0;\n float scale_y = 0.0;\n if ("+s+") {\n scale_x = float("+n.width_shape+" - 1) / float("+r.width_shape+" - 1);\n scale_y = float("+n.height_shape+" - 1) / float("+r.height_shape+" - 1);\n }\n else {\n scale_x = float("+n.width_shape+") / float("+r.width_shape+");\n scale_y = float("+n.height_shape+") / float("+r.height_shape+");\n }\n\n vec4 vx = getData(float(oPos.a), scale_x, align_flag, "+r.width_shape+");\n vec4 vy = getData(float(oPos.b), scale_y, align_flag, "+r.height_shape+");\n\n int x1 = int(vx.r);\n int x2 = int(vx.g);\n float x3 = vx.b;\n float x4 = vx.a;\n int y1 = int(vy.r);\n int y2 = int(vy.g);\n float y3 = vy.b;\n float y4 = vy.a;\n\n float value11 = getValueFromTensorPos_origin(oPos.r, oPos.g, y1, x1);\n float value12 = getValueFromTensorPos_origin(oPos.r, oPos.g, y2, x1);\n float value21 = getValueFromTensorPos_origin(oPos.r, oPos.g, y1, x2);\n float value22 = getValueFromTensorPos_origin(oPos.r, oPos.g, y2, x2);\n float value = x4 * y4 * value11 + x4 * y3 * value12 + x3 * y4 * value21 + x3 * y3 * value22;\n setOutput(float(value));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},ce=ue,le={mainFunc:function(e,t){var n=e.out,r=e.origin,o=t.align_mode,i=void 0===o?1:o,a=t.align_corners,s=void 0===a||a,u=n.width_shape,c=r.width_shape;return"\n // start函数\n\n vec4 getData(float n, float scale, bool align_flag, int in_len) {\n float m = align_flag ? ((n + 0.5) / scale - 0.5) : (n / scale);\n // int a1 = int(floor(m + 0.5));\n int a1 = int(m);\n a1 = a1 > 0 ? a1 : 0;\n int a2 = a1 < (in_len - 1) ? (a1 + 1) : in_len;\n\n float idx_src = (n + 0.5) / scale - 0.5;\n idx_src = idx_src > 0.0 ? idx_src : 0.0;\n float b1 = align_flag ? (idx_src - float(a1)) : (n / scale - float(a1));\n float b2 = 1.0 - b1;\n return vec4(float(a1), float(a2), b1, b2);\n }\n\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n\n bool align_flag = "+i+" == 0 && !"+s+";\n\n float scale = float("+(s?(u-1)/(c-1):u/c)+");\n\n vec4 v = getData(float(oPos.a), scale, align_flag, "+c+");\n\n float v1 = v.r;\n float v2 = v.g;\n float v3 = v.b;\n float v4 = v.a;\n\n float value1 = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, int(v1));\n float value2 = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, int(v2));\n float value = v4 * value1 + v3 * value2;\n // setOutput(float(int(v1)));\n setOutput(float(value));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},fe=le,he={relu:["transToPrelu"],relu6:["transToRelu6"],leaky_relu:["transToLeakyrelu"],transToLeakyrelu:["transToLeakyrelu"],scale:["transToScale"],sigmoid:["transToSigmoid"],hard_sigmoid:["transToHardSigmoid"],pow:["transToPow"],exp:["transToExp"],sqrt:["transToSqrt"],tanh:["transToTanh"],abs:["transToAbs"]};function de(e,t){var n=t.multi_value,r=void 0===n?1:n,o=t.bias_value,i=void 0===o?0:o;return"\n // start函数\n void main(void) {\n // 输出数据\n float o = getPixelsFromTexturePos_origin(vCoord).r;\n float res = "+t.active_function+"(o, float("+r+"), float("+i+"));\n setOutput(res);\n }\n "}function pe(e){return{mainFunc:de,textureFuncConf:{origin:["getPixelsFromTexturePos"]},behaviors:he[e]}}var ve={mainFunc:function(e,t){var n=e.origin,r=e.out,o=t.axes,i=n.length_unformatted_shape,a=r.length_unformatted_shape,s=Array.isArray(o)?o:[o],u=4-i,c=s.map((function(e){return-1===e?3:e+u})),l=["oPos.r","oPos.g","oPos.b","oPos.a"].slice(-1*a),f=[0,1,2,3];return Array.from(c,(function(e){return f.splice(e,1,-1)})),"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n o = getValueFromTensorPos_origin("+f.reverse().map((function(e){return-1===e?"0":l.pop()||"0"})).reverse().join(",")+");\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},ge={mainFunc:function(e,t){var n=e.origin,r=e.out,o=t.align_corners;return"\n // start函数\n int getData(float n, float scale, bool align_corners) {\n float m = align_corners ? (n / scale + 0.5) : (n / scale);\n return int(floor(m));\n }\n\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n \n float scale_x = 0.0;\n float scale_y = 0.0;\n if ("+o+") {\n scale_x = float("+r.width_shape+" -1) / float("+n.width_shape+" - 1);\n scale_y = float("+r.height_shape+" - 1) / float("+n.height_shape+" - 1);\n }\n else {\n scale_x = float("+r.width_shape+") / float("+n.width_shape+");\n scale_y = float("+r.height_shape+") / float("+n.height_shape+");\n }\n \n int vx = getData(float(oPos.a), scale_x, "+o+");\n int vy = getData(float(oPos.b), scale_y, "+o+");\n \n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, vy, vx);\n setOutput(float(o));\n}\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},commonFuncConf:["transferFromNHWCtoNCHW"]},me=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},ye={mainFunc:function(e,t){var n=e.origin,r=e.image,o=e.out,i=t.variances,a=void 0===i?[.1,.1,.2,.2]:i,s=t.fixed_sizes,u=t.fixed_ratios,c=t.densities,l=t.flatten_to_2d,d=t.clip,p=t.step_w,v=void 0===p?0:p,g=t.step_h,m=void 0===g?0:g,y=t.offset,b=void 0===y?.5:y,w=t.runtime,A=void 0===w?0:w,x=r.height_shape,T=r.width_shape,P=n.height_shape,C=n.width_shape,_=o.total_shape,E=o.channel,S=o.height_shape,k=o.width_shape,R=_/E/S/k,O=f([R,E,S,k]),M=v,F=m;0!==v&&0!==m||(M=T/C,F=x/P);var I=Math.round(.5*(M+F)),D=u.map((function(e){return Math.sqrt(e)})),L=1===D.length?"sqrt_fixed_ratios":"sqrt_fixed_ratios[r]",j=u.length,B=S,N=R,U=E;l&&(N=P,U=C,B=S/P/C);var W=f([N,U,B,k]),z=V("out1",{numbers_shape:me(W,[1]),length_shape:4}),H=c.map((function(e){return e*e*j})),G=H.length,X=function(e){var t="ivec2 calRemain(int remain, int curAccIndex, int s) {",n=e.length;if(1===n)t+="\n int accIndex0 = density_acc_shape;\n\n if (remain >= accIndex0) {\n s++;\n remain -= accIndex0;\n }\n else {\n return ivec2(remain, s);\n }\n ";else for(var r=0;r<n;r++)t+="\n int accIndex"+r+" = density_acc_shape["+r+"];\n\n if (remain >= accIndex"+r+") {\n s++;\n remain -= accIndex"+r+";\n }\n else {\n return ivec2(remain, s);\n }\n ";return t+"\n }\n "}(H),Q=d?"v = min(max(v, 0.), 1.);":"",Y=1===G?"density_acc_shape":"density_acc_shape[0]",q="\n float getFloat4TensorVal(vec4 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n else if (index == 2) {\n return tensor[2];\n }\n else if (index == 3) {\n return tensor[3];\n }\n }\n float getFloat3TensorVal(vec3 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n else if (index == 2) {\n return tensor[2];\n }\n }\n float getFloat2TensorVal(vec2 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n }\n float getFloat1TensorVal(float tensor, int index) {\n return tensor;\n }\n int getInt4TensorVal(ivec4 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n else if (index == 2) {\n return tensor[2];\n }\n else if (index == 3) {\n return tensor[3];\n }\n }\n int getInt3TensorVal(ivec3 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n else if (index == 2) {\n return tensor[2];\n }\n }\n int getInt2TensorVal(ivec2 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n }\n\n int getInt1TensorVal(int tensor, int index) {\n return tensor;\n }\n\n "+z+"\n \n "+h(c,"densities")+"\n "+h(s,"fixed_sizes")+"\n "+h(D,"sqrt_fixed_ratios")+"\n "+function(e,t){if(1===e.length)return"int "+t+" = int("+e[0]+");";for(var n=e.length,r="\n ivec"+n+" "+t+" = ivec"+n+"(\n ",o=0;o<n;o++)r+=e[o]+",";return r.slice(0,-1)+");"}(H,"density_acc_shape")+"\n \n "+X+"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n int rr = int(oPos.r);\n int gg = int(oPos.g);\n int bb = int(oPos.b);\n int aa = int(oPos.a);\n\n // 输出坐标转换为输入坐标\n int index = rr * "+O[0]+" + gg * "+O[1]+" + bb * "+O[2]+" + aa;\n ivec4 realOutPos = getTensorPosFromArrayIndex_out1(index);\n int h = realOutPos.r;\n int w = realOutPos.g;\n int b = realOutPos.b;\n int a = realOutPos.a;\n ";return 1===A?"\n "+h(a,"variances")+"\n "+q+"\n setOutput(getFloat4TensorVal(variances, aa));\n }":"\n "+q+"\n // 求idx 对应的 s, r, di, dj\n int s = 0;\n int remain = b;\n int curAccIndex = "+Y+";\n\n ivec2 remainInfo = calRemain(remain, curAccIndex, s);\n remain = remainInfo[0];\n s = remainInfo[1];\n int density = int(getFloat"+c.length+"TensorVal(densities, s));\n int r = int(floor(float(remain / density / density)));\n remain -= r * density * density;\n\n float di = floor(float(remain / density));\n float dj = float(remain - int(di) * density);\n\n float center_x = (float(w) + float("+b+")) * float("+M+");\n float center_y = (float(h) + float("+b+")) * float("+F+");\n float fixed_size = getFloat"+s.length+"TensorVal(fixed_sizes, s);\n float shift = float("+I+") / float(density);\n\n float v = 0.0;\n if (a == 0 || a == 2) {\n float box_width_ratio = fixed_size * "+L+";\n float density_center_x = center_x - float("+I+") / 2. + shift / 2.;\n float center_x_temp = density_center_x + dj * shift;\n if (a == 0) {\n v = max((center_x_temp - box_width_ratio / 2.) / float("+T+"), 0.);\n }\n else {\n v = min((center_x_temp + box_width_ratio / 2.) / float("+T+"), 1.);\n }\n }\n else {\n float box_height_ratio = fixed_size / "+L+";\n float density_center_y = center_y - float("+I+") / 2. + shift / 2.;\n float center_y_temp = density_center_y + di * shift;\n if (a == 1) {\n v = max((center_y_temp - box_height_ratio / 2.) / float("+x+"), 0.);\n }\n else {\n v = min((center_y_temp + box_height_ratio / 2.) / float("+x+"), 1.);\n }\n }\n\n "+Q+"\n\n setOutput(v);\n }\n "},textureFuncConf:{image:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]}},be={mainFunc:function(e,t){var n=e.origin,r=e.image,o=e.out,i=t.variances,a=void 0===i?[.1,.1,.2,.2]:i,u=t.flip,c=t.clip,l=t.step_w,f=void 0===l?0:l,v=t.step_h,g=void 0===v?0:v,m=t.offset,y=void 0===m?.5:m,b=t.runtime,w=void 0===b?0:b,A=t.min_sizes,x=void 0===A?[]:A,T=t.max_sizes,P=void 0===T?[]:T,C=t.aspect_ratios,_=void 0===C?[]:C,E=t.min_max_aspect_ratios_order,S=void 0!==E&&E,k=r.height_shape,R=r.width_shape,O=n.height_shape,M=n.width_shape,F=o.channel,I=o.height_shape,D=f,L=g;0!==f&&0!==g||(D=R/M,L=k/O);var j=[1];_.forEach((function(e){1!==e&&(j.push(Math.sqrt(e)),u&&j.push(Math.sqrt(1/e)))}));var B=j.length,N="\n "+d(x,"min_sizes",s.FLOAT_TYPE)+"\n "+d(P,"max_sizes",s.FLOAT_TYPE)+"\n "+d(j,"aspect_ratios",s.FLOAT_TYPE)+"\n ",V=c?"res = min(max(res, 0.), 1.);":"",U="\n float getFloat4TensorVal(vec4 tensor, int index) {\n if (index == 0) {\n return tensor[0];\n }\n else if (index == 1) {\n return tensor[1];\n }\n else if (index == 2) {\n return tensor[2];\n }\n else if (index == 3) {\n return tensor[3];\n }\n }\n\n \n "+p(x,"min_sizes",s.FLOAT_TYPE)+"\n "+p(P,"max_sizes",s.FLOAT_TYPE)+"\n "+p(j,"aspect_ratios",s.FLOAT_TYPE)+"\n \n\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n int nn = int(oPos.r);\n int cc = int(oPos.g);\n int hh = int(oPos.b);\n int ww = int(oPos.a);\n\n\n "+N+"\n\n ";return 1===w?"\n "+h(a,"variances")+"\n "+U+"\n float res = 0.0;\n res = getFloat4TensorVal(variances, ww);\n setOutput(float(res));\n }":"\n "+U+"\n int idx = nn * "+F*I+" + cc * "+I+" + hh;\n int as_num = "+B+";\n float offset = "+y+";\n \n int feature_width = "+M+";\n int num_priors = "+I+";\n float step_width = float("+D+");\n float step_height = float("+L+");\n\n float im_width = float("+R+");\n float im_height = float("+k+");\n\n bool min_max_aspect_ratios_order = "+S+";\n\n // 求idx 对应的 h w p m\n int h = int(idx / (num_priors * feature_width));\n int w = calMod(idx / num_priors, feature_width);\n int p = calMod(idx, num_priors);\n int m = "+(P.length>0)+" ? int(p / (as_num + 1)) : int(p / as_num);\n float cx = (float(w) + offset) * step_width;\n float cy = (float(h) + offset) * step_height;\n float min_size = getValueFromArrByIndex_min_sizes(min_sizes, m);\n float bw = 0.0;\n float bh = 0.0;\n\n "+(P.length>0?"\n int s = calMod(p, as_num + 1);\n if ("+!S+") {\n if (s < as_num) {\n float ar = getValueFromArrByIndex_aspect_ratios(aspect_ratios, s);\n bw = min_size * ar / 2.0;\n bh = min_size / ar / 2.0;\n }\n else {\n float max_size = getValueFromArrByIndex_max_sizes(max_sizes, m);\n bw = sqrt(min_size * max_size) / 2.0;\n bh = bw;\n }\n }\n else {\n if (s == 0) {\n bh = min_size / 2.0;\n bw = bh;\n }\n else if (s == 1) {\n float max_size = getValueFromArrByIndex_max_sizes(max_sizes, m);\n bw = sqrt(min_size * max_size) / 2.0;\n bh = bw;\n }\n else {\n float ar = getValueFromArrByIndex_aspect_ratios(aspect_ratios, s - 1);\n bw = min_size * sqrt(ar) / 2.0;\n bh = min_size / sqrt(ar) / 2.0;\n }\n }":"\n int s = calMod(p, as_num);\n float ar = getValueFromArrByIndex_aspect_ratios(aspect_ratios, s);\n bw = min_size * ar / 2.0;\n bh = min_size / ar / 2.0;\n ")+"\n float res = 0.0;\n if (ww == 0) {\n res = (cx - bw) / im_width;\n }\n else if (ww == 1) {\n res = (cy - bh) / im_height;\n }\n else if (ww == 2) {\n res = (cx + bw) / im_width;\n }\n else {\n res = (cy + bh) / im_height;\n }\n\n "+V+"\n\n setOutput(float(res));\n }\n "},textureFuncConf:{image:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]},behaviors:[]},we={mainFunc:function(e,t){for(var n=e.out,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["out"]),o=r.origin,i=o.width_shape,a=o.height_shape,s=o.channel,u=o.total_shape,c=o.length_unformatted_shape,l=[u/(i*a*s),s,a,i].slice(4-c),f=Object.keys(r).length,h=t.axis<0?t.axis+l.length+1:t.axis,d=1,p=1,v=0;v<h;v++)d*=l[v];for(v=h;v<l.length;v++)p*=l[v];var g=n.total_shape/d,m="";return m=Array.from(Array(f).keys()).reduce((function(e,t){return e+(0===t?"\n if (i == 0) {\n ivec4 co = getTensorPosFromArrayIndex_origin(j);\n o = getValueFromTensorPos_origin(co.r, co.g, co.b, co.a);\n }":"\n else if (i == "+t+") {\n ivec4 co = getTensorPosFromArrayIndex_origin_"+t+"(j);\n o = getValueFromTensorPos_origin_"+t+"(co.r, co.g, co.b, co.a);\n }")}),m),"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n int sumVal = oPos.a\n + oPos.b * "+n.width_shape+"\n + oPos.g * "+n.height_shape+" * "+n.width_shape+"\n + oPos.r * "+n.channel+" * "+n.width_shape+" * "+n.height_shape+";\n\n int index = calMod(sumVal, "+g+");\n\n int layer = sumVal / "+g+";\n\n int i = index / "+p+";\n int j = calMod(index, "+p+") + layer * "+p+";\n\n float o = 0.0;\n "+m+"\n setOutput(float(o));\n }\n "},textureFuncConf:{"@all":["getValueFromTensorPos","getTensorPosFromArrayIndex"]}},Ae={mainFunc:function(e,t){var n=e.origin,r=t.starts,o=t.axes,i=n.length_unformatted_shape,a=n.width_shape,s=n.height_shape,u=n.channel,c=Array.isArray(o)?o:[o];if(1!==c.length)throw Error("[slice op feature]: axes only support one dim");var l=c[0],f=["(oPos[0])","(oPos[1])","(oPos[2])","(oPos[3])"];return f[l=-1===l?3:4-i+l]="(oPos["+l+"]+ start)","\n void main(void) {\n int start = "+r[0]+";\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n int sumVal = "+f[3]+"\n + "+f[2]+" * "+a+"\n + "+f[1]+" * "+s*a+"\n + "+f[0]+" * "+u*a*s+";\n\n float res = 0.0;\n ivec4 co = getTensorPosFromArrayIndex_origin(sumVal);\n res = getValueFromTensorPos_origin(co.r, co.g, co.b, co.a);\n setOutput(float(res));\n }\n "},textureFuncConf:{origin:["getTensorPosFromArrayIndex","getValueFromTensorPos"]}},xe={arg_max:{mainFunc:function(e,t){var n=e.origin,r=t.axis,o=void 0===r?-1:r,i=t.flatten,a=n.total_shape,s=n.height_shape,u=n.width_shape,c=n.channel,l=n.length_unformatted_shape,f=a/(u*s*c),h=o<0?3:4-l+o,d=[f,c,s,u][h];return"\n\n void main() {\n ivec4 oPos = getOutputTensorPos();\n float o = 0.0;\n int pos = 0;\n if ("+!i+") {\n if ("+h+" == 1) {\n float tmp = getValueFromTensorPos_origin(oPos.g, 0, oPos.b, oPos.a);\n for (int index = 0; index < "+d+"; index++) {\n o = getValueFromTensorPos_origin(oPos.g, index, oPos.b, oPos.a);\n if (o > tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n else if ("+h+" == 2) {\n float tmp = getValueFromTensorPos_origin(oPos.g, oPos.b, 0, oPos.a);\n for (int index = 0; index < "+d+"; index++) {\n o = getValueFromTensorPos_origin(oPos.g, oPos.b, index, oPos.a);\n if (o > tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n else if ("+h+" == 3) {\n float tmp = getValueFromTensorPos_origin(oPos.g, oPos.b, oPos.a, 0);\n for (int index = 0; index < "+d+"; index++) {\n o = getValueFromTensorPos_origin(oPos.g, oPos.b, oPos.a, index);\n if (o > tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n else {\n float tmp = getValueFromTensorPos_origin(0, oPos.g, oPos.b, oPos.a);\n for (int index = 0; index < "+d+"; index++) {\n o = getValueFromTensorPos_origin(index, oPos.g, oPos.b, oPos.a);\n if (o > tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n }\n else {\n int index = 0;\n float tmp = getValueFromTensorPos_origin(0, 0, 0, 0);\n for (int n = 0; n < "+f+"; n++) {\n for (int c = 0; c < "+c+"; c++) {\n for (int h = 0; h < "+s+"; h++) {\n for (int w = 0; w < "+u+"; w++) {\n o = getValueFromTensorPos_origin(n, c, h, w);\n if (o > tmp) {\n tmp = o;\n pos = index;\n }\n index++;\n }\n }\n }\n }\n }\n setOutput(float(pos));\n }"},textureFuncConf:{origin:["getValueFromTensorPos"]}},arg_min:{mainFunc:function(e,t){for(var n=e.origin,r=t.axis,o=void 0===r?-1:r,i=t.flatten,a=n.total_shape,s=n.height_shape,u=n.width_shape,c=n.channel,l=a/(u*s*c),f=[l,c,s,u],h=0,d=0;d<4&&!(f[d]>1);d++)h++;var p=o<0?4-h+o:o,v=f[p=h+p];return"\n void main() {\n ivec4 oPos = getOutputTensorPos();\n float o = 0.0;\n int pos = 0;\n if ("+!i+") {\n if ("+p+" == 1) {\n float tmp = getValueFromTensorPos_origin(oPos.g, 0, oPos.b, oPos.a);\n for (int index = 0; index < "+v+"; index++) {\n o = getValueFromTensorPos_origin(oPos.g, index, oPos.b, oPos.a);\n if (o < tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n else if ("+p+" == 2) {\n float tmp = getValueFromTensorPos_origin(oPos.g, oPos.b, 0, oPos.a);\n for (int index = 0; index < "+v+"; index++) {\n o = getValueFromTensorPos_origin(oPos.g, oPos.b, index, oPos.a);\n if (o < tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n else if ("+p+" == 3) {\n float tmp = getValueFromTensorPos_origin(oPos.g, oPos.b, oPos.a, 0);\n for (int index = 0; index < "+v+"; index++) {\n o = getValueFromTensorPos_origin(oPos.g, oPos.b, oPos.a, index);\n if (o < tmp) {\n tmp = o;\n pos = index;\n }\n } \n }\n else {\n float tmp = getValueFromTensorPos_origin(0, oPos.g, oPos.b, oPos.a);\n for (int index = 0; index < "+v+"; index++) {\n o = getValueFromTensorPos_origin(index, oPos.g, oPos.b, oPos.a);\n if (o < tmp) {\n tmp = o;\n pos = index;\n }\n }\n }\n }\n else {\n int index = 0;\n float tmp = getValueFromTensorPos_origin(0, 0, 0, 0);\n for (int n = 0; n < "+l+"; n++) {\n for (int c = 0; c < "+c+"; c++) {\n for (int h = 0; h < "+s+"; h++) {\n for (int w = 0; w < "+u+"; w++) {\n o = getValueFromTensorPos_origin(n, c, h, w);\n if (o < tmp) {\n tmp = o;\n pos = index;\n }\n index++;\n }\n }\n }\n }\n }\n setOutput(float(pos));\n }"},textureFuncConf:{origin:["getValueFromTensorPos"]}},conv2d:J,conv2d_packing:{mainFunc:function(e,t){var n=e.origin,r=e.filter,o=e.out,i=e.bias,a=t.groups,s=void 0===a?1:a,u=t.strides,c=void 0===u?[]:u,l=t.paddings,f=void 0===l?[]:l,h=t.dilations,d=void 0===h?[]:h,p=t.fuse_relu,v=t.act_type,g=t.hard_swish_offset,m=void 0===g?3:g,y=t.hard_swish_scale,b=void 0===y?6:y,w=t.hard_swish_threshold,A=void 0===w?6:w,x=c[0],T=void 0===x?1:x,P=c[1],C=void 0===P?1:P,_=f[0],E=void 0===_?0:_,S=f[1],k=void 0===S?0:S,R=d[0],O=void 0===R?1:R,M=d[1],F=void 0===M?1:M;return"\n void main() {\n ivec4 oPos = getOutputTensorPos();\n int x = oPos.a;\n int c = oPos.g;\n int y = oPos.b;\n int b = oPos.r;\n vec4 res = vec4(0.0, 0.0, 0.0, 0.0);\n\n int oy = y * "+T+" - "+E+";\n for (int fy = 0; fy < "+r.height_shape+"; fy++) {\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n oy += "+O+";\n continue;\n }\n int ox = x * "+C+" - "+k+";\n for (int fx = 0; fx < "+r.width_shape+"; fx++) {\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n ox += "+F+";\n continue;\n }\n // channel计算\n for (int j = 0; j < "+r.channel+"; j += 1) {\n int c0 = (c / ("+o.channel+" * 4 / "+s+")) * "+r.channel+" + j;\n vec4 fValue = getValueFromTensorPosPacking_filter(c * 4, j, fy, fx);\n vec4 oValue = getValueFromTensorPosPacking_origin(b, c0, oy, ox);\n\n for (int packed_index = 0; packed_index < 4; packed_index++) {\n if (packed_index == 0) {\n res.r += dot(fValue, oValue);\n } else if (packed_index == 1) {\n int c1 = ((c + 1) / ("+o.channel+" * 4 / "+s+")) * "+r.channel+" + j;\n oValue = getValueFromTensorPosPacking_origin(b, c1, oy, ox);\n fValue = getValueFromTensorPosPacking_filter(c * 4 + 1, j, fy, fx);\n res.g += dot(fValue, oValue);\n } else if (packed_index == 2) {\n int c2 = ((c + 2) / ("+o.channel+" * 4 / "+s+")) * "+r.channel+" + j;\n oValue = getValueFromTensorPosPacking_origin(b, c2, oy, ox);\n fValue = getValueFromTensorPosPacking_filter(c * 4 + 2, j, fy, fx);\n res.b += dot(fValue, oValue);\n } else if (packed_index == 3) {\n int c3 = ((c + 3) / ("+o.channel+" * 4 / "+s+")) * "+r.channel+" + j;\n oValue = getValueFromTensorPosPacking_origin(b, c3, oy, ox);\n fValue = getValueFromTensorPosPacking_filter(c * 4 + 3, j, fy, fx);\n res.a += dot(fValue, oValue);\n }\n }\n }\n ox += "+F+";\n }\n oy += "+O+";\n }\n\n "+(i?"res += getValueFromTensorPosPacking_bias(0, c, 0, 0);":"")+"\n\n if ("+p+") {\n res = max(vec4(0.0, 0.0, 0.0, 0.0), res);\n }\n else if ("+("relu6"===v)+") {\n res = min(max(vec4(0.0, 0.0, 0.0, 0.0), res), vec4(6.0, 6.0, 6.0, 6.0));\n }\n else if ("+("hard_swish"===v)+") {\n res = res * min(\n max(vec4(0.0, 0.0, 0.0, 0.0), res + vec4("+m+")),\n vec4("+A+")\n ) / vec4("+b+");\n }\n\n setPackedOutput(res);\n }\n "},textureFuncConf:{filter:["getValueFromTensorPosPacking"],origin:["getValueFromTensorPosPacking"],bias:["getValueFromTensorPosPacking"]},behaviors:["adaptPaddings","isApplySeparableConv","batchComputeConv2d","processBias"]},conv2d_transpose:{mainFunc:function(e,t){var n=e.origin,r=e.filter,o=e.out,i=e.bias,a=t.groups,s=void 0===a?1:a,u=t.strides,c=void 0===u?[]:u,l=t.paddings,f=void 0===l?[]:l,h=t.dilations,d=void 0===h?[]:h,p=t.fuse_relu,v=t.act_type,g=c[0],m=void 0===g?1:g,y=c[1],b=void 0===y?1:y,w=f[0],A=void 0===w?0:w,x=f[1],T=void 0===x?0:x;T=r.height_shape-T-1,A=r.width_shape-A-1;var P=d[0],C=void 0===P?1:P,_=d[1],E=void 0===_?1:_;return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n int x = oPos.a;\n int c = oPos.g;\n int y = oPos.b;\n int b = oPos.r;\n float res = 0.0;\n int temp_x = 0;\n int temp_y = 0;\n float o = 0.0;\n float f = 0.0;\n\n // 获取output的坐标\n int oTensorChannel = int(c * "+s+" / "+o.channel+") * "+n.channel+";\n int oy = y - "+T+";\n const int groupLen = int("+n.channel+" / "+s+");\n int groupIndex = int(c / groupLen);\n\n for (int fy = 0; fy < "+r.height_shape+"; fy++) {\n if (oy < 0) {\n oy += "+C+";\n continue;\n }\n int ox = x - "+A+";\n for (int fx = 0; fx < "+r.width_shape+"; fx++) {\n\n if (ox < 0) {\n ox += "+E+";\n continue;\n }\n // channel计算\n for (int j = 0; j < groupLen; j++) {\n int curIndex = j + b * groupLen;\n if (calMod(ox, int("+b+")) == 0 && calMod(oy, int("+m+")) == 0) {\n temp_x = int(floor(float(ox) / float("+b+")));\n temp_y = int(floor(float(oy) / float("+m+")));\n if (temp_x < "+n.width_shape+" && temp_y < "+n.height_shape+") {\n o = getValueFromTensorPos_origin(b, curIndex , temp_y, temp_x);\n f = getValueFromTensorPos_filter(\n curIndex,\n int(c / "+s+"),\n "+r.height_shape+"-1-fy,\n "+r.width_shape+"-1-fx\n );\n res += f * o;\n }\n }\n }\n ox += "+E+";\n }\n oy += "+C+";\n }\n \n "+(i?"res += getValueFromTensorPos_bias(0, 0, 0, c);":"")+"\n \n if ("+p+") {\n res = max(0.0, res);\n }\n else if ("+("relu6"===v)+") {\n res = min(max(0.0, res), 6.0);\n }\n \n setOutput(float(res));\n }\n"},textureFuncConf:{filter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"],bias:["getValueFromTensorPos"]},behaviors:["adaptPaddings","isApplySeparableConv","batchComputeConv2d","processBias"]},depthwise_conv2d:J,conv2d_depthwise:J,conv2d_elementwise_add:{mainFunc:function(e,t){var n=e.origin,r=e.filter,o=e.out,i=e.counter,a=t.active_function,s=t.groups,u=void 0===s?1:s,c=t.axis,l=t.strides,f=void 0===l?[]:l,h=t.paddings,d=void 0===h?[]:h,p=t.dilations,v=void 0===p?[]:p,g=t.multi_value,m=t.bias_value,y=f[0],b=void 0===y?1:y,w=f[1],A=void 0===w?1:w,x=d[0],T=void 0===x?0:x,P=d[1],C=void 0===P?0:P,_=v[0],E=void 0===_?1:_,S=v[1],k=void 0===S?1:S;return"\n // start函数\n\n float getValueFromCounter(int index) {\n float xPos = float(index) / float("+i.width_shape+");\n vec4 pixels = TEXTURE2D(texture_counter, vec2(xPos, 0.5));\n return pixels.r;\n }\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n\n int x = oPos.a;\n int c = oPos.g;\n int y = oPos.b;\n int b = oPos.r;\n int addAxis = oPos["+c+"];\n float res = getValueFromCounter(addAxis);\n\n // 获取output的坐标\n int oTensorChannel = (c / ("+o.channel+" / "+u+")) * "+r.channel+";\n int oy = y * "+b+" - "+T+";\n for (int fy = 0; fy < "+r.height_shape+"; fy++) {\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n oy += "+E+";\n continue;\n }\n int ox = x * "+A+" - "+C+";\n for (int fx = 0; fx < "+r.width_shape+"; fx++) {\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n ox += "+k+";\n continue;\n }\n // channel计算\n for (int j = 0; j < "+r.channel+"; j++) {\n float f = getValueFromTensorPos_filter(c, j, fy, fx);\n float o = getValueFromTensorPos_origin(b, oTensorChannel + j, oy, ox);\n res += f * o;\n }\n ox += "+k+";\n }\n oy += "+E+";\n }\n setOutput("+a+"(res, "+g+", "+m+"));\n }\n"},textureFuncConf:{filter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"],counter:["getValueFromTensorPos"]},behaviors:["mergeAttrs","checkIsMerge","setActiveFunc"]},pool2d:{mainFunc:function(e,t){var n=e.origin,r=t.strides,o=void 0===r?[]:r,i=t.paddings,a=void 0===i?[]:i,s=t.pooling_type,u=t.ksize,c=o[0],l=void 0===c?1:c,f=o[1],h=void 0===f?1:f,d=a[0],p=void 0===d?0:d,v=a[1],g=void 0===v?0:v,m=u[0],y=u[1];return"\n // start函数\n void main(void) {\n float res = 0.0;\n if ("+s+" == 1) {\n res = -1.70141184e38;\n }\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n // X、Y方向的移动步长\n int count_pool = 0;\n int oy_base = out_pos[2] * "+l+" - "+p+";\n int ox_base = out_pos[3] * "+h+" - "+g+";\n for (int fy = 0; fy < "+m+"; fy++) {\n int oy = oy_base + fy;\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n continue;\n }\n for (int fx = 0; fx < "+y+"; fx++) {\n int ox = ox_base + fx;\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n continue;\n }\n // origin数据\n float curr = getValueFromTensorPos_origin(out_pos[0], out_pos[1], oy, ox);\n if ("+s+" == 1) {\n if (curr > res) {\n res = curr;\n }\n } else {\n res += curr;\n // 在平均池化模式忽略填充值(exclusive默认为true)\n count_pool++;\n }\n }\n }\n if ("+s+" != 1) {\n res = res / float(count_pool);\n }\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["isAdaptiveAvg","isMax","setPacked","setAdaptive","isGlobalPooling"]},pool2d_max:{mainFunc:function(e,t){var n=e.origin,r=t.strides,o=void 0===r?[]:r,i=t.paddings,a=void 0===i?[]:i,s=t.ksize,u=t.global_pooling,c=t.runtime,l=o[0],f=void 0===l?1:l,h=o[1],d=void 0===h?1:h,p=a[0],v=void 0===p?0:p,g=a[1],m=void 0===g?0:g,y=s[0],b=s[1],w=function(e){var t=e.total_shape,n=e.channel,r=e.height_shape,o=e.width_shape;return[t/n/r/o,n,r,o]}(n),A="",x="setOutput(float(res));";return 1===c&&!0===u&&(A="\n if (curr > res) {\n index = "+w[2]*w[3]+" * out_pos[1] + "+w[3]+" * oy + ox;\n }\n ",x="setOutput(float(res));"),"\n // start函数\n void main(void) {\n float res = -1.70141184e25;\n int index = 0;\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n int b = out_pos[0];\n int c = out_pos[1];\n int y = out_pos[2];\n int x = out_pos[3];\n // X、Y方向的移动步长\n int oy_base = out_pos[2] * "+f+" - "+v+";\n int ox_base = out_pos[3] * "+d+" - "+m+";\n for (int fy = 0; fy < "+y+"; fy++) {\n int oy = oy_base + fy;\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n continue;\n }\n for (int fx = 0; fx < "+b+"; fx++) {\n int ox = ox_base + fx;\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n continue;\n }\n // origin数据\n float curr = getValueFromTensorPos_origin(out_pos[0], out_pos[1], oy, ox);\n "+A+"\n res = max(res, curr);\n }\n }\n "+x+"\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["isMax","setPacked","setAdaptive","isGlobalPooling"]},pool2d_winograd:{mainFunc:function(e,t){var n=e.origin,r=e.pool,o=t.strides,i=void 0===o?[]:o,a=t.paddings,s=void 0===a?[]:a,u=t.type_pool,c=i[0],l=void 0===c?1:c,f=i[1],h=void 0===f?1:f,d=s[0],p=void 0===d?0:d,v=s[1],g=void 0===v?0:v,m=n.height_shape,y=n.width_texture,b=n.height_texture;return"\n\n float getValueFromTensorPosPacked_origin(int r, int g, int b, int a) {\n int y = b / 2;\n int yOffset = calMod(b, 2);\n int x = a / 2;\n int xOffset = calMod(a, 2);\n int height = "+m+" + "+n.offset_y+";\n vec4 pixels = TEXTURE2D(\n texture_origin,\n vec2((float(x) + 0.5) / float("+y+"),\n (float(g * height / 2 + y) + 0.5) / float("+b+"))\n );\n int index = 0;\n if (xOffset == 0 && yOffset == 0) {\n return pixels[0];\n }\n else if (xOffset == 1 && yOffset == 0) {\n return pixels[1];\n }\n else if (xOffset == 0 && yOffset == 1) {\n return pixels[2];\n }\n return pixels[3];\n }\n\n // start函数\n void main(void) {\n float res = (-1.0 / exp(-20.0));\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n // int b = out_pos[0];\n // int c = out_pos[1];\n // int y = out_pos[2];\n // int x = out_pos[3];\n // X、Y方向的移动步长\n int count_pool = 0;\n int oy_base = out_pos[2] * "+l+" - "+p+";\n int ox_base = out_pos[3] * "+h+" - "+g+";\n\n for (int fy = 0; fy < "+r.height_shape+"; fy++) {\n int oy = oy_base + fy;\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n continue;\n }\n for (int fx = 0; fx < "+r.width_shape+"; fx++) {\n int ox = ox_base + fx;\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n continue;\n }\n // origin数据\n float curr = getValueFromTensorPosPacked_origin(out_pos[0], out_pos[1], oy, ox);\n if ("+u+" == 1) {\n if (curr > res) {\n res = curr;\n }\n } else {\n res += curr;\n // 在平均池化模式忽略填充值(exclusive默认为true)\n count_pool++;\n }\n }\n }\n if ("+u+" != 1) {\n res = res / float(count_pool);\n }\n setOutput(res);\n }\n "},behaviors:["isMax","setPacked","setAdaptive","isGlobalPooling"]},elementwise_add:{mainFunc:function(e,t){var n=t.counterPos,r=t.Scale_y,o=void 0===r?1:r,i=t.Scale_x,a=void 0===i?1:i,s=t.Scale_out,u=void 0===s?1:s;return"\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n\n float c = getValueFromTensorPos_counter("+n+");\n float res = float("+u/o+") * c + float("+u/a+") * o;\n setOutput(float(res));\n }\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]},behaviors:["processElementwiseAxis","genElementwiseCounterPos"]},elementwise_mul:{mainFunc:function(e,t){var n=e.counter,r=t.counterPos,o=t.Scale_y,i=void 0===o?1:o,a=t.Scale_x,s=void 0===a?1:a,u=t.Scale_out,c=void 0===u?1:u;return"\n ivec4 formatNCHW(int n, int c, int h, int w) {\n int newN = n;\n int newC = c;\n int newH = h;\n int newW = w;\n\n if (n >= "+n.height_texture/n.height_shape+") {\n newN = int("+n.height_texture/n.height_shape+");\n }\n if (c >= "+n.channel+") {\n newC = int("+(n.channel-1)+");\n }\n if (h >= "+n.height_shape+") {\n newH = "+(n.height_shape-1)+";\n }\n if (w >= "+n.width_shape+") {\n newW = "+(n.width_shape-1)+";\n }\n return ivec4(newN, newC, newH, newW);\n }\n\n // start函数\n void main() {\n // 输出数据\n ivec4 oPos1 = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos1.r, oPos1.g, oPos1.b, oPos1.a);\n ivec4 oPos = formatNCHW(oPos1.r, oPos1.g, oPos1.b, oPos1.a);\n\n float c = getValueFromTensorPos_counter("+r+");\n float res = float("+c/s+") * o * float("+1/i+") * c;\n setOutput(float(res));\n }\n\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]},behaviors:["processElementwiseAxis","genElementwiseCounterPos"]},elementwise_div:{mainFunc:function(e,t){var n=e.counter,r=t.counterPos,o=t.Scale_y,i=void 0===o?1:o,a=t.Scale_x,s=void 0===a?1:a,u=t.Scale_out,c=void 0===u?1:u;return"\n ivec4 formatNCHW(int n, int c, int h, int w) {\n int newN = n;\n int newC = c;\n int newH = h;\n int newW = w;\n\n if (n >= "+n.height_texture/n.height_shape+") {\n newN = int("+n.height_texture/n.height_shape+");\n }\n if (c >= "+n.channel+") {\n newC = int("+(n.channel-1)+");\n }\n if (h >= "+n.height_shape+") {\n newH = "+(n.height_shape-1)+";\n }\n if (w >= "+n.width_shape+") {\n newW = "+(n.width_shape-1)+";\n }\n return ivec4(newN, newC, newH, newW);\n }\n\n // start函数\n void main() {\n // 输出数据\n ivec4 oPos1 = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos1.r, oPos1.g, oPos1.b, oPos1.a);\n ivec4 oPos = formatNCHW(oPos1.r, oPos1.g, oPos1.b, oPos1.a);\n\n float c = getValueFromTensorPos_counter("+r+");\n float res = float("+c+") * (float("+1/s+") * o / (float("+1/i+") * c));\n setOutput(float(res));\n }\n\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]},behaviors:["processElementwiseAxis","genElementwiseCounterPos"]},elementwise_pow:{mainFunc:function(e,t){var n=t.counterPos,r=t.Scale_y,o=void 0===r?1:r,i=t.Scale_x,a=void 0===i?1:i,s=t.Scale_out,u=void 0===s?1:s;return"\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n\n float c = getValueFromTensorPos_counter("+n+");\n float res = pow(float("+u/a+") * o, float("+u/o+") * c);\n setOutput(float(res));\n }\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]},behaviors:["processElementwiseAxis","genElementwiseCounterPos"]},elementwise_sub:{mainFunc:function(e,t){var n=t.counterPos,r=t.Scale_y,o=void 0===r?1:r,i=t.Scale_x,a=void 0===i?1:i,s=t.Scale_out,u=void 0===s?1:s;return"\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n\n float c = getValueFromTensorPos_counter("+n+");\n float res = float("+u/a+") * o - float("+u/o+") * c;\n setOutput(float(res));\n }\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]},behaviors:["processElementwiseAxis","genElementwiseCounterPos"]},mul:{mainFunc:function(e,t){var n=e.origin,r=e.counter,o=t.x_num_col_dims,i=t.y_num_col_dims,a=te(n),s=te(r),u=Z(a,o),c=u[0],l=u[1],f=u[2],h=u[3],d=u[4],p=Z(s,i),v=p[0],g=p[1],m=p[2],y=p[3];return"\n "+$("x1",c,l)+"\n "+$("x2",f,h)+"\n "+$("y1",v,g)+"\n "+$("y2",m,y)+"\n\n // start函数\n void main(void) {\n float res = 0.0;\n // 获取output的坐标\n ivec4 opos = getOutputTensorPos();\n float temp = 0.0;\n\n // output is 2D\n int b = opos.b;\n int a = opos.a;\n\n "+ee(l)+" x1 = getTensorPosFromArrayIndex_x1(b);\n "+ee(y)+" y2 = getTensorPosFromArrayIndex_y2(a);\n\n for (int j = 0; j < "+d[1]+"; j++) {\n "+ee(h)+" x2 = getTensorPosFromArrayIndex_x2(j);\n "+ee(g)+" y1 = getTensorPosFromArrayIndex_y1(j);\n\n ivec4 xPos = ivec4("+ee(l)+"(x1), "+ee(h)+"(x2));\n ivec4 yPos = ivec4("+ee(g)+"(y1), "+ee(y)+"(y2));\n\n float o = getValueFromTensorPos_origin(xPos.r, xPos.g, xPos.b, xPos.a);\n float c = getValueFromTensorPos_counter(yPos.r, yPos.g, yPos.b, yPos.a);\n res += c * o;\n }\n\n setOutput(res);\n }\n "},textureFuncConf:{counter:["getValueFromTensorPos"],origin:["getValueFromTensorPos"]}},matmul:ne,matmul_v2:ne,fc:{mainFunc:function(e,t){var n=e.origin,r=e.weight,o=t.x_num_col_dims,i=t.y_num_col_dims,a=t.activation_type,s=ae(n),u=ae(r),c=re(s,o),l=c[0],f=c[1],h=c[2],d=c[3],p=c[4],v=re(u,i),g=v[0],m=v[1],y=v[2],b=v[3];return"\n "+oe("x1",l,f)+"\n "+oe("x2",h,d)+"\n "+oe("y1",g,m)+"\n "+oe("y2",y,b)+"\n\n // start函数\n void main(void) {\n float res = 0.0;\n // 获取output的坐标\n ivec4 opos = getOutputTensorPos();\n float bias = getValueFromTensorPos_bias(opos.r, opos.g, opos.b, opos.a);\n float temp = 0.0;\n\n // output is 2D\n int b = opos.b;\n int a = opos.a;\n\n "+ie(f)+" x1 = getTensorPosFromArrayIndex_x1(b);\n "+ie(b)+" y2 = getTensorPosFromArrayIndex_y2(a);\n\n for (int j = 0; j < "+p[1]+"; j++) {\n "+ie(d)+" x2 = getTensorPosFromArrayIndex_x2(j);\n "+ie(m)+" y1 = getTensorPosFromArrayIndex_y1(j);\n\n ivec4 xPos = ivec4("+ie(f)+"(x1), "+ie(d)+"(x2));\n ivec4 yPos = ivec4("+ie(m)+"(y1), "+ie(b)+"(y2));\n\n float o = getValueFromTensorPos_origin(xPos.r, xPos.g, xPos.b, xPos.a);\n float c = getValueFromTensorPos_weight(yPos.r, yPos.g, yPos.b, yPos.a);\n res += c * o;\n }\n\n res = res + bias;\n\n if ("+("relu"===a)+") {\n res = max(0.0, res);\n }\n setOutput(res);\n }\n "},textureFuncConf:{weight:["getValueFromTensorPos"],origin:["getValueFromTensorPos"],bias:["getValueFromTensorPos"]}},dropout:{mainFunc:function(e,t){return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n if ("+("downgrade_in_infer"===t.dropout_implementation)+") {\n o = o * (1.0 - float("+t.dropout_prob+"));\n }\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},concat:{mainFunc:function(e,t){var n=t.dim,r=Object.keys(e).filter((function(e){return"out"!==e})).map((function(t){return e[t]})).map((function(e){var t=e.width_shape,r=e.height_shape,o=e.channel;return[e.total_shape/(t*r*o),o,r,t][n]})),o=r.map((function(e,t){return r.slice(0,t+1).reduce((function(e,t){return e+t}),0)})),i="";return o.forEach((function(e,t){i+=0===t?"\n if (oPos["+n+"] < "+e+") {\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n }\n ":"\n else if (oPos["+n+"] < "+e+") {\n oPos["+n+"] = oPos["+n+"] - "+o[t-1]+";\n o = getValueFromTensorPos_origin_"+t+"(oPos.r, oPos.g, oPos.b, oPos.a);\n }\n "})),"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n "+i+"\n setOutput(float(o));\n }\n "},textureFuncConf:{"@all":["getValueFromTensorPos"]},behaviors:["normalizeDim"]},concat_mul:{mainFunc:function(e,t){var n=t.dim,r=Object.keys(e).filter((function(e){return"out"!==e})).map((function(t){return e[t]})).map((function(e){var t=e.width_shape,r=e.height_shape,o=e.channel;return[e.total_shape/(t*r*o),o,r,t][n]})),o=r.map((function(e,t){return r.slice(0,t+1).reduce((function(e,t){return e+t}),0)})),i="";return o.forEach((function(e,t){i+=0===t?"\n if (oPos["+n+"] < "+e+") {\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n }":"\n else if (oPos["+n+"] < "+e+") {\n oPos["+n+"] = oPos["+n+"] - "+o[t-1]+";\n o = getValueFromTensorPos_origin_"+t+"(oPos.r, oPos.g, oPos.b, oPos.a);\n }\n "})),"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n "+i+"\n setOutput(float(o));\n }\n "},textureFuncConf:{"@all":["getValueFromTensorPos"]},behaviors:["normalizeDim"]},split:{mainFunc:function(e,t){var n=t.target_length,r=t.num,o=t.dim,i=t.sections;return"\n // start函数\n void main(void) {\n int length = int("+(i&&i.length>1?i[0]:n/r)+");\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n oPos["+o+"] = oPos["+o+"] + layer_run_time * length;\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["normalizeDim"]},softmax:{mainFunc:function(e,t){var n=e.origin,r=t.axis,o=n.length_unformatted_shape,i=!r||r<0?(r||-1)+4:r+o;return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n const int n = int("+n.total_shape+"/"+n.channel+"/"+n.height_shape+"/"+n.width_shape+");\n float o = getValueFromTensorPos_origin(oPos[0], oPos[1], oPos[2], oPos[3]);\n // 输出坐标转换为输入坐标\n float total = 0.0;\n float res = 0.0;\n if ("+i+" == 0) {\n for (int i = 0; i < n; i++){\n float temp = getValueFromTensorPos_origin(i, oPos[1], oPos[2], oPos[3]);\n total += exp(temp);\n }\n res = exp(o) / total;\n }\n else if ("+i+" == 1) {\n for (int i = 0; i < "+n.channel+"; i++){\n float temp = getValueFromTensorPos_origin(oPos[0], i, oPos[2], oPos[3]);\n total += exp(temp);\n }\n res = exp(o) / total;\n }\n else {\n for (int i = 0; i < "+n.width_shape+"; i++){\n float temp = getValueFromTensorPos_origin(oPos[0], oPos[1], oPos[2], i);\n total += exp(temp);\n }\n res = exp(o) / total;\n }\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},batchnorm:{mainFunc:function(e,t){var n=e.bias,r=e.scale,o=e.mean,i=e.variance,a=e.origin,s=t.epsilon,u="oPos["+(4-a.length_unformatted_shape+1)+"]";return"\n // start函数\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n\n // 归一化数据\n vec4 scale = getPixelsFromTexturePos_scale(\n vec2(float("+u+") / float("+r.width_texture+") + 0.00001, 0.0));\n vec4 bias = getPixelsFromTexturePos_bias(\n vec2(float("+u+") / float("+n.width_texture+") + 0.00001, 0.0));\n vec4 mean = getPixelsFromTexturePos_mean(\n vec2((float("+u+")) / float("+o.width_texture+") + 0.00001, 0.0));\n vec4 variance = getPixelsFromTexturePos_variance(\n vec2((float("+u+")) / float("+i.width_texture+") + 0.00001,\n 0.0)\n );\n\n float x = (o - mean[0]) / sqrt(variance[0] + "+s+");\n float res = scale[0] * x + bias[0];\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],scale:["getPixelsFromTexturePos"],bias:["getPixelsFromTexturePos"],mean:["getPixelsFromTexturePos"],variance:["getPixelsFromTexturePos"]}},reshape:se,reshape2:se,bilinear_interp:ue,linear_interp:le,transpose2:{mainFunc:function(e,t){var n=t.perm_arr,r=t.perm_size,o=n[0],i=n[1],a=n[2];return"\n // start函数\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n\n // 转置 坐标变换\n float o = 0.0;\n if ("+r+" == 1) {\n o = getValueFromTensorPos_origin(oPos[0], oPos[1], oPos[2], oPos[3]);\n }\n else if ("+r+" == 2) {\n o = getValueFromTensorPos_origin(\n oPos[0], oPos[1],\n oPos[(2 + "+o+") > 3 ? 3 : (2 + "+o+")],\n oPos[(2 + "+i+") > 3 ? 3 : (2 + "+i+")]\n );\n }\n else if ("+r+" == 3) {\n o = getValueFromTensorPos_origin(\n oPos[0],\n oPos[(1 + "+o+") > 3 ? 3 : (1 + "+o+")],\n oPos[(1 + "+i+") > 3 ? 3 : (1 + "+i+")],\n oPos[(1 + "+a+") > 3 ? 3 : (1 + "+a+")]\n );\n }\n else if ("+r+" == 4) {\n o = getValueFromTensorPos_origin(\n oPos["+o+"],\n oPos["+i+"],\n oPos["+a+"],\n oPos["+n[3]+"]\n );\n }\n\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["normalizePerm"]},unpacked_2_packed:{mainFunc:function(e,t){return"\n // start函数\n void main() {\n ivec4 oPos = getOutputTensorPos();\n vec4 out4;\n for (int i = 0; i < 4; i++) {\n vec4 o = getValueFromTensorPosPacking_origin(oPos[0], oPos[1] * 4 + i, oPos[2], oPos[3]);\n out4[i] = o[0];\n }\n setPackedOutput(out4);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPosPacking"]}},packed_2_unpacked:{mainFunc:function(e,t){return"\n // start函数\n void main() {\n ivec4 oPos = getOutputTensorPos();\n float res = 0.0;\n int c1 = calMod(oPos[1], 4);\n vec4 o = getValueFromTensorPosPacking_origin(oPos[0], oPos[1] / 4, oPos[2], oPos[3]);\n\n if (c1 == 0) {\n res = o.r;\n } else if (c1 == 1) {\n res = o.g;\n } else if (c1 == 2) {\n res = o.b;\n } else if (c1 == 3) {\n res = o.a;\n }\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPosPacking"]}},unsqueeze2:{mainFunc:function(e,t){for(var n=e.out,r=t.axes,o=n.length_unformatted_shape,i=(Array.isArray(r)?r:[r]).map((function(e){return-1===e?3:e})),a=[0,1,2,3].slice(4-o),s=0,u=i;s<u.length;s++){var c=u[s];a.splice(c,1)}for(var l=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(Array.from(new Array(4-a.length),(function(){return-1})),a),f=[],h=0,d=l.length;h<d;h++){var p=l[h],v=-1===p?"0":"oPos["+p+"]";f.push(v)}return"\n void main() {\n ivec4 oPos = getOutputTensorPos();\n float o = 0.0;\n o = getValueFromTensorPos_origin("+f.join(",")+");\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},flatten_contiguous_range:{mainFunc:function(e,t){var n=e.origin,r=e.out;return"\n void main() {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n int sumVal = oPos.a\n + oPos.b * "+r.width_shape+"\n + oPos.g * "+r.height_shape+" * "+r.width_shape+"\n + oPos.r * "+r.channel+" * "+r.width_shape+" * "+r.height_shape+";\n ivec4 new_oPos = transferFromNHWCtoNCHW(\n sumVal,\n "+n.channel+",\n "+n.width_shape+",\n "+n.height_shape+",\n "+n.total_shape+"\n );\n float o = getValueFromTensorPos_origin(new_oPos.r, new_oPos.g, new_oPos.b, new_oPos.a);\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},commonFuncConf:["transferFromNHWCtoNCHW"]},flatten2:se,greater_than:{mainFunc:function(e,t){return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float x = getValueFromTensorPos_input(oPos.r, oPos.g, oPos.b, oPos.a);\n float y = getValueFromTensorPos_counter(oPos.r, oPos.g, oPos.b, oPos.a);\n\n setOutput(bool(x >= y));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],counter:["getValueFromTensorPos"]}},reduce_sum:{mainFunc:function(e,t){return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n for (int i = 0; i < "+t.inputs_dim+"; i++) {\n oPos["+t.dim+"] = i;\n o += getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);;\n }\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["normalizeDim"]},reduce_mean:{mainFunc:function(e,t){var n=t.inputs_dim;return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n for (int i = 0; i < "+n+"; i++) {\n oPos["+t.dim+"] = i;\n o += getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n }\n o = o / float("+n+");\n setOutput(o);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["normalizeDim"]},reduce_max:{mainFunc:function(e,t){return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float o = 0.0;\n for (int i = 0; i < "+t.inputs_dim+"; i++) {\n oPos["+t.dim+"] = i;\n o = max(o, getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a));\n }\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["normalizeDim"]},where:{mainFunc:function(e,t){return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n float x = getValueFromTensorPos_input(oPos.r, oPos.g, oPos.b, oPos.a);\n float y = getValueFromTensorPos_counter(oPos.r, oPos.g, oPos.b, oPos.a);\n float condition = getValueFromTensorPos_condition(oPos.r, oPos.g, oPos.b, oPos.a);\n float o = 0.0;\n\n if (bool(condition)) {\n o = x;\n }\n else {\n o = y;\n }\n setOutput(o);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],counter:["getValueFromTensorPos"],condition:["getValueFromTensorPos"]}},connect:{mainFunc:function(e,t){var n=e.out,r=n.total_shape,o=n.width_shape,i=n.height_shape,a=n.channel,s=f([r/(o*i*a),a,i,o]),u=Object.keys(e).filter((function(e){return"out"!==e})).map((function(t){return e[t].total_shape})),c=u.map((function(e,t){return u.slice(0,t+1).reduce((function(e,t){return e+t}),0)})),l="";return c.forEach((function(e,t){l+=0===t?"\n if (sumVal < "+e+") {\n co = getTensorPosFromArrayIndex_origin(sumVal);\n o = getValueFromTensorPos_origin(co.r, co.g, co.b, co.a);\n }":"\n else if (sumVal < "+e+") {\n co = getTensorPosFromArrayIndex_origin_"+t+"(sumVal - "+c[t-1]+");\n o = getValueFromTensorPos_origin_"+t+"(co.r, co.g, co.b, co.a);\n }\n "})),"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n float o = 0.0;\n ivec4 co;\n int sumVal = oPos.b * "+s[2]+" + oPos.a;\n "+l+"\n setOutput(float(o));\n }\n "},textureFuncConf:{"@all":["getValueFromTensorPos","getTensorPosFromArrayIndex"]}},hard_swish:{mainFunc:function(e,t){var n=t.offset,r=void 0===n?3:n,o=t.scale,i=void 0===o?6:o,a=t.threshold;return"\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n float res = o * min(max(0.0, o + float("+r+")), float("+(void 0===a?6:a)+")) / float("+i+");\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},nearest_interp:ge,nearest_interp_v2:ge,cast:{mainFunc:function(e,t){var n="";switch(t.out_dtype){case 0:n="\n float res_bool = 0.0;\n if (o != 0.0) {\n res_bool = 1.0;\n }\n setOutput(res_bool);";break;case 1:case 2:case 3:n="\n int res_int = int(o);\n setOutput(float(res_int));";break;default:n=" \n float res_float = o;\n setOutput(res_float);"}return"\n void main() {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n "+n+"\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},fill_constant_batch_size_like:{mainFunc:function(e,t){return"\n // start函数\n void main(void) {\n float res = float("+t.value+");\n setOutput(res);\n }\n"}},rnn_matmul:{mainFunc:function(e,t){var n=e.weightlist_0,r=t.input_axis,o=t.state_axis,i=t.batch,a=t.reverse,s=void 0!==a&&a?i-r-1:r;return"\n void main() {\n float res = 0.0;\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n \n if ("+(0===r)+") {\n res = getValueFromTensorPos_origin(out_pos[0], "+s+", out_pos[2], out_pos[3]);\n setOutput(res);\n return;\n }\n \n ivec4 origin_pos = out_pos;\n ivec4 weight_pos = out_pos;\n\n weight_pos[1] = 0;\n weight_pos[2] = weight_pos[3];\n\n float o = 0.0;\n float w_hh = 0.0;\n float prestate_h = 0.0;\n res = getValueFromTensorPos_origin(out_pos[0], "+s+", out_pos[2], out_pos[3]);\n for (int j = 0; j < "+n.width_shape+"; j++) {\n prestate_h = getValueFromTensorPos_prestate(origin_pos[0], origin_pos[1], origin_pos[2], j);\n w_hh = getValueFromTensorPos_weightlist_0(out_pos[0], "+o+", out_pos[3], j);\n o += w_hh * prestate_h;\n }\n res += o;\n\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],prestate:["getValueFromTensorPos"],weightlist_0:["getValueFromTensorPos"]}},rnn_hidden:{mainFunc:function(e,t){var n=t.state_axis,r=t.hidden_size;return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n float origin = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n float cell = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a + "+r+");\n float appender = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a + "+2*r+");\n float fourth = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a + "+3*r+");\n float counter = getValueFromTensorPos_counter(oPos.r, "+n+", oPos.b, oPos.a);\n float i = 1.0 / (1.0 + exp(-origin));\n float f = 1.0 / (1.0 + exp(-cell));\n float o = 1.0 / (1.0 + exp(-fourth));\n float c = f * counter + i * tanh_calc(appender);\n float h = o * tanh_calc(c);\n \n setOutput(h);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],counter:["getValueFromTensorPos"]}},rnn_cell:{mainFunc:function(e,t){var n=t.state_axis,r=t.hidden_size;return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n float origin = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a);\n float cell = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a + "+r+");\n float appender = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a + "+2*r+");\n float fourth = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b, oPos.a + "+3*r+");\n float counter = getValueFromTensorPos_counter(oPos.r, "+n+", oPos.b, oPos.a);\n float i = 1.0 / (1.0 + exp(-origin));\n float f = 1.0 / (1.0 + exp(-cell));\n float c = f * counter + i * tanh_calc(appender);\n \n setOutput(c);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],counter:["getValueFromTensorPos"]}},rnn_origin:{mainFunc:function(e,t){var n=e.weightlist_0,r=e.weightlist_1,o=t.state_axis;return"\n void main() {\n float res = 0.0;\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n ivec4 origin_pos = out_pos;\n ivec4 weight_pos = out_pos;\n \n weight_pos[1] = 0;\n weight_pos[2] = weight_pos[3];\n\n float b_ih = getValueFromTensorPos_weightlist_2(0, 0, 0, out_pos[3]);\n float b_hh = getValueFromTensorPos_weightlist_3(0, 0, 0, out_pos[3]);\n \n for (int j = 0; j < "+n.width_shape+"; j++) {\n float o = getValueFromTensorPos_origin(origin_pos[0], origin_pos[1], 0, j);\n float w_ih = getValueFromTensorPos_weightlist_0(0, 0, out_pos[3], j);\n res += w_ih * o;\n }\n res += b_ih;\n\n for (int j = 0; j < "+r.width_shape+"; j++) {\n float prestate = getValueFromTensorPos_prestate(0, 0, 0, j);\n float w_hh = getValueFromTensorPos_weightlist_1(0, "+o+", out_pos[3], j);\n res += w_hh * prestate;\n }\n res += b_hh;\n \n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"],prestate:["getValueFromTensorPos"],weightlist_0:["getValueFromTensorPos"],weightlist_1:["getValueFromTensorPos"],weightlist_2:["getValueFromTensorPos"],weightlist_3:["getValueFromTensorPos"]}},pool2d_avg:{mainFunc:function(e,t){var n=e.origin,r=t.strides,o=void 0===r?[]:r,i=t.paddings,a=void 0===i?[]:i,s=t.ksize,u=o[0],c=void 0===u?1:u,l=o[1],f=void 0===l?1:l,h=a[0],d=void 0===h?0:h,p=a[1],v=void 0===p?0:p,g=s[0],m=s[1];return"\n // start函数\n void main(void) {\n float res = 0.0;\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n // X、Y方向的移动步长\n int oy_base = out_pos[2] * "+c+" - "+d+";\n int ox_base = out_pos[3] * "+f+" - "+v+";\n for (int fy = 0; fy < "+g+"; fy++) {\n int oy = oy_base + fy;\n if (oy >= "+n.height_shape+") {\n break;\n }\n if (oy < 0) {\n continue;\n }\n for (int fx = 0; fx < "+m+"; fx++) {\n int ox = ox_base + fx;\n if (ox >= "+n.width_shape+") {\n break;\n }\n if (ox < 0) {\n continue;\n }\n // origin数据\n float curr = getValueFromTensorPos_origin(out_pos[0], out_pos[1], oy, ox);\n res += curr;\n // 在平均池化模式忽略填充值(exclusive默认为true)\n }\n }\n res = res / float("+g+" * "+m+");\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:["setPacked","setAdaptive","isGlobalPooling"]},pool2d_avg_adaptive:{mainFunc:function(e,t){var n=e.origin,r=t.strides,o=void 0===r?[]:r,i=t.paddings,a=void 0===i?[]:i,s=t.ksize,u=o[0],c=void 0===u?1:u,l=o[1],f=void 0===l?1:l,h=a[0],d=void 0===h?0:h,p=a[1],v=void 0===p?0:p,g=s[0],m=s[1],y=n.height_shape,b=n.width_shape;return"\n // start函数\n void main(void) {\n float res = 0.0;\n // 获取output的坐标\n ivec4 out_pos = getOutputTensorPos();\n int i = out_pos[2] * "+c+" - "+d+";\n int j = out_pos[3] * "+f+" - "+v+";\n int hstart = int(floor(float(i) * float("+y+") / float("+g+")));\n int hend = int(ceil(float(i + 1) * float("+y+") / float("+g+")));\n int wstart = int(floor(float(j) * float("+b+") / float("+m+")));\n int wend = int(ceil(float(j + 1) * float("+b+") / float("+m+")));\n for (int fy = hstart; fy < hend; fy++) {\n for (int fx = wstart; fx < wend; fx++) {\n float curr = getValueFromTensorPos_origin(out_pos[0], out_pos[1], fy, fx);\n res += curr;\n }\n }\n int count_pool = (hend - hstart) * (wend - wstart);\n res = res / float(count_pool);\n setOutput(res);\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},behaviors:[]},prelu:pe("prelu"),relu6:pe("relu6"),leakyRelu:pe("leakyRelu"),scale:pe("scale"),sigmoid:pe("sigmoid"),relu:pe("relu"),hard_sigmoid:pe("hard_sigmoid"),pow:pe("pow"),sqrt:pe("sqrt"),tanh:pe("tanh"),exp:pe("exp"),abs:pe("abs"),squeeze2:ve,pad3d:{mainFunc:function(e,t){var n=e.origin,r=t.paddings,o=t.mode,i=t.value,a=function(e){var t=e.total_shape,n=e.channel,r=e.height_shape,o=e.width_shape;return[t/n/r/o,n,r,o]}(n),s={reflect:"\n int a;\n int b;\n if (oPos.a - "+r[0]+" < 0) {\n a = "+r[0]+" - oPos.a;\n }\n else if (oPos.a - "+r[0]+" >= "+a[3]+") {\n a = "+a[3]+" - (oPos.a - "+r[0]+" - "+a[3]+" + 1) - 1;\n }\n else {\n a = oPos.a - "+r[0]+";\n }\n if (oPos.b - "+r[2]+" < 0) {\n b = "+r[2]+" - oPos.b;\n }\n else if (oPos.b - "+r[2]+" >= "+a[2]+") {\n b = "+a[2]+" - (oPos.b - "+r[2]+" - "+a[2]+" + 1) - 1;\n }\n else {\n b = oPos.b - "+r[2]+";\n }\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, b, a);\n ",replicate:"\n int a;\n int b;\n if (oPos.a - "+r[0]+" < 0) {\n a = 0;\n }\n else if (oPos.a - "+r[0]+" >= "+a[3]+") {\n a = "+a[3]+" - 1;\n }\n else {\n a = oPos.a - "+r[0]+";\n }\n if (oPos.b - "+r[2]+" < 0) {\n b = 0;\n }\n else if (oPos.b - "+r[2]+" >= "+a[2]+") {\n b = "+a[2]+" - 1;\n }\n else {\n b = oPos.b - "+r[2]+";\n }\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, b, a);\n ",circular:"\n int a;\n int b;\n if (oPos.a - "+r[0]+" < 0) {\n a = int(mod(float("+r[0]+" + oPos.a - 1), float("+a[3]+")));\n }\n else if (oPos.a - "+r[0]+" >= "+a[3]+") {\n a = int(mod(float(oPos.a - "+r[0]+" - "+a[3]+"), float("+a[3]+")));\n }\n else {\n a = oPos.a - "+r[0]+";\n }\n if (oPos.b - "+r[2]+" < 0) {\n b = int(mod(float("+r[2]+" + oPos.b - 1), float("+a[2]+")));\n }\n else if (oPos.b - "+r[2]+" >= "+a[2]+") {\n b = int(mod(float(oPos.b - "+r[2]+" - "+a[2]+"), float("+a[2]+")));\n }\n else {\n b = oPos.b - "+r[2]+";\n }\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, b, a);\n ",constant:"",undefined:""};return"\n // start函数\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n float o = "+(i||"0.0")+";\n if (oPos.a - "+r[0]+" >= 0\n && oPos.b - "+r[2]+" >= 0\n && oPos.a - "+r[0]+" < "+a[3]+"\n && oPos.b - "+r[2]+" < "+a[2]+"\n ) {\n o = getValueFromTensorPos_origin(oPos.r, oPos.g, oPos.b - "+r[2]+", oPos.a - "+r[0]+");\n }\n else {\n "+s[o]+"\n }\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]}},bilinear_interp_v2:ce,linear_interp_v2:fe,shuffle_channel:{mainFunc:function(e,t){var n=e.out,r=t.group,o=void 0===r?2:r,i=n.total_shape,a=n.height_shape,s=n.width_shape,u=n.channel,c=[1,0,2,3];return"\n // start函数\n void main(void) {\n // 输出数据\n ivec4 oPos = getOutputTensorPos();\n float o = 0.0;\n\n int sumVal = oPos.a\n + oPos.b * "+s+"\n + oPos.g * "+a+" * "+s+"\n + oPos.r * "+u+" * "+s+" * "+a+";\n\n ivec4 transpose_out_pos = transferFromNHWCtoNCHW(\n sumVal,\n "+o+",\n "+s+",\n "+a+",\n "+i+"\n );\n\n ivec4 transpose_in_pos = ivec4(transpose_out_pos["+c[0]+"],\n transpose_out_pos["+c[1]+"], transpose_out_pos["+c[2]+"], transpose_out_pos["+c[3]+"]);\n int sumVal2 = transpose_in_pos.a\n + transpose_in_pos.b * "+s+"\n + transpose_in_pos.g * "+a+" * "+s+"\n + transpose_in_pos.r * "+u/o+" * "+s+" * "+a+";\n ivec4 origin_oPos = transferFromNHWCtoNCHW(\n sumVal2,\n "+u+",\n "+s+",\n "+a+",\n "+i+"\n );\n\n\n o = getValueFromTensorPos_origin(\n origin_oPos[0],\n origin_oPos[1],\n origin_oPos[2],\n origin_oPos[3]\n );\n\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},commonFuncConf:["transferFromNHWCtoNCHW"]},pack_out:{mainFunc:function(e,t){return"\n\n // start函数\n void main() {\n ivec4 oPos = getOutputTensorPos();\n vec2 outCoord = vCoord.xy * _2d_shape_texture_out;\n int index = int(outCoord.x) + int(outCoord.y) * int("+e.out.width_texture+");\n\n int first = index * 4;\n int sec = index * 4 + 1;\n int third = index * 4 + 2;\n int fourth = index * 4 + 3;\n\n ivec4 rPos = getTensorPosFromArrayIndex_origin(first);\n ivec4 gPos = getTensorPosFromArrayIndex_origin(sec);\n ivec4 bPos = getTensorPosFromArrayIndex_origin(third);\n ivec4 aPos = getTensorPosFromArrayIndex_origin(fourth);\n\n float r = getValueFromTensorPos_origin(rPos.r, rPos.g, rPos.b, rPos.a);\n float g = getValueFromTensorPos_origin(gPos.r, gPos.g, gPos.b, gPos.a);\n float b = getValueFromTensorPos_origin(bPos.r, bPos.g, bPos.b, bPos.a);\n float a = getValueFromTensorPos_origin(aPos.r, aPos.g, aPos.b, aPos.a);\n\n setPackedOutput(vec4(r, g, b, a));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos","getTensorPosFromArrayIndex"]}},nhwc_2_nchw:{mainFunc:function(e,t){var n=e.origin,r=e.out;return"\n void main() {\n ivec4 oPos = getOutputTensorPos();\n // 输出坐标转换为输入坐标\n int sumVal = oPos.a * "+r.channel+"\n + oPos.b * "+r.width_shape+" * "+r.channel+"\n + oPos.g\n + oPos.r * "+r.channel+" * "+r.width_shape+" * "+r.height_shape+";\n ivec4 new_oPos = transferFromNHWCtoNCHW(\n sumVal,\n "+n.channel+",\n "+n.width_shape+",\n "+n.height_shape+",\n "+n.total_shape+"\n );\n float o = getValueFromTensorPos_origin(new_oPos.r, new_oPos.g, new_oPos.b, new_oPos.a);\n setOutput(float(o));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPos"]},commonFuncConf:["transferFromNHWCtoNCHW"]},feedPost:{mainFunc:function(e,t){var n=e.out,r=t.mean,o=void 0===r?[0,0,0]:r,i=t.std,a=void 0===i?[1,1,1]:i,s=n.total_shape,u=n.height_shape,c=n.width_shape,l=n.channel;return"\n // start函数\n void main(void) {\n ivec4 nhwcPos = getOutputTensorPos();\n int sumVal = nhwcPos.a\n + nhwcPos.b * "+c+"\n + nhwcPos.g * "+u+" * "+c+"\n + nhwcPos.r * "+l+" * "+c+" * "+u+";\n\n ivec4 oPos = transferFromNHWCtoNCHW(\n sumVal,\n "+l+",\n "+c+",\n "+u+",\n "+s+"\n );\n float res = 0.0;\n int c1 = int(mod(float(oPos[1]), 4.0));\n int c = oPos[1];\n vec4 o = getValueFromTensorPosPacking_origin(oPos[0], c / 4, oPos[2], oPos[3]);\n\n if (c1 == 0) {\n res = o.r;\n } else if (c1 == 1) {\n res = o.g;\n } else if (c1 == 2) {\n res = o.b;\n } else if (c1 == 3) {\n res = o.a;\n }\n\n if (c == 0) {\n res = (res - float("+o[0]+")) / float("+a[0]+");\n } else if (c == 1) {\n res = (res - float("+o[1]+")) / float("+a[1]+");\n } else if (c == 2) {\n res = (res - float("+o[2]+")) / float("+a[2]+");\n }\n setOutput(float(res));\n }\n "},textureFuncConf:{origin:["getValueFromTensorPosPacking"]},commonFuncConf:["transferFromNHWCtoNCHW"]},imgFeed:{mainFunc:function(){return"\n uniform vec2 u_scale;\n uniform int u_keep_ratio;\n\n void main(void) {\n vec2 outCoord = vCoord.xy;\n // 支持模型不按比例拉伸\n if (u_keep_ratio == 0) {\n vec4 origin = TEXTURE2D(texture_origin, outCoord);\n setPackedOutput(origin);\n return;\n }\n float startX = (1.0 - u_scale.x) / 2.0;\n float endX = startX + u_scale.x;\n float startY = (1.0 - u_scale.y) / 2.0;\n float endY = startY + u_scale.y;\n\n if (outCoord.x >= startX && outCoord.x <= endX && outCoord.y >= startY && outCoord.y <= endY) {\n vec2 newPos = (outCoord - vec2(startX, startY)) / u_scale;\n vec4 origin = TEXTURE2D(texture_origin, newPos);\n setPackedOutput(origin);\n }\n else {\n setPackedOutput(vec4(1.0));\n }\n }\n "},textureFuncConf:{origin:[]}},box_coder:{mainFunc:function(e,t){var n="decode_center_size"===t.code_type;return"\n // start函数\n vec2 getPriorBoxData(int r, int g, int b, int m, int n) {\n float start = getValueFromTensorPos_priorbox(r, g, b, m);\n float end = getValueFromTensorPos_priorbox(r, g, b, n);\n float len = end - start;\n return vec2(start + len / 2.0, len);\n }\n vec2 getBoxVarData(int r, int g, int b, int m, int n) {\n return vec2(\n getValueFromTensorPos_priorboxvar(r, g, b, m),\n getValueFromTensorPos_priorboxvar(r, g, b, n)\n );\n }\n vec2 getTargetBoxData(int r, int g, int b, int m, int n) {\n "+(n?"\n return vec2(\n getValueFromTensorPos_targetbox(r, g, b, m),\n getValueFromTensorPos_targetbox(r, g, b, n)\n );\n ":"\n float start = getValueFromTensorPos_targetbox(r, g, b, m);\n float end = getValueFromTensorPos_targetbox(r, g, b, n);\n float len = end - start;\n return vec2(start + len / 2.0, len);\n ")+"\n }\n\n void main(void) {\n ivec4 oPos = getOutputTensorPos();\n int r = int(oPos.r);\n int g = int(oPos.g);\n int b = int(oPos.b);\n int a = int(oPos.a);\n // 输出坐标转换为输入坐标\n float o = 0.0;\n\n int m = 0;\n int n = 0;\n if (a == 0 || a == "+(n?2:1)+") {\n m = 0;\n n = 2;\n }\n else {\n m = 1;\n n = 3;\n }\n vec2 priorbox = getPriorBoxData(r, g, b, m, n);\n vec2 boxvar = getBoxVarData(r, g, b, m, n);\n vec2 targetbox = getTargetBoxData(r, g, b, m, n);\n float p1 = priorbox.r;\n float p2 = priorbox.g;\n float t1 = targetbox.r;\n float t2 = targetbox.g;\n float v1 = boxvar.r;\n float v2 = boxvar.g;\n\n "+(n?"\n float b1 = p2 * v1 * t1 + p1;\n float b2 = exp(v2 * t2) * p2;\n if (a == 0 || a == 1) {\n o = b1 - b2 / 2.0 ;\n }\n else {\n o = b1 + b2 / 2.0;\n }\n ":"\n if (a == 0 || a == 1) {\n o = (t1 - p1) / p2 / v1;\n }\n else {\n o = log(abs(t2 / p2)) / v2;\n }\n ")+"\n setOutput(float(o));\n }\n "},textureFuncConf:{targetbox:["getValueFromTensorPos"],priorbox:["getValueFromTensorPos"],priorboxvar:["getValueFromTensorPos"]},behaviors:[]},density_prior_box:ye,prior_box:be,stack:we,slice:Ae},Te=new K;(0,l.registerBackend)("webgl",Te,xe)},170:function(e){e.exports=function(){var e={911:function(e,t){var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},994:function(e,t,n){n.r(t),n.d(t,{GLOBALS:function(){return b},OpData:function(){return pe},PaddlejsBackend:function(){return Ce},Runner:function(){return Pe},Tensor:function(){return fe},Transformer:function(){return C},coreUtils:function(){return r},env:function(){return v},interfaces:function(){return o},nchw2nhwc:function(){return X},nhwc2nchw:function(){return Q},registerBackend:function(){return A},registerOp:function(){return w}});var r={};n.r(r),n.d(r,{AddItemToVars:function(){return u},delUselessData:function(){return l},findVarByKey:function(){return s},getGlobalInterface:function(){return i},getOrMakeGlobalProperty:function(){return a},traverseVars:function(){return c}});var o={};function i(){var e;if("undefined"!=typeof window)e=window;else if(void 0!==n.g)e=n.g;else{if("undefined"==typeof self)throw new Error("Could not find a global object");e=self}return e}function a(e,t){var n=i();return n[e]||(n[e]=t),n[e]}function s(e,t){return Array.isArray(e)?e.find((function(e){return e.name===t})):e[t]}function u(e,t){var n=Array.isArray(e),r=Array.isArray(t)?t:[t];n?r.forEach((function(t){for(var n=null,r=0;r<e.length;r++)if(e[r].name===t.name){n=r;break}null!==n?e[n]=t:e.push(t)})):r.forEach((function(t){e[t.name]=t}))}function c(e,t){Array.isArray(e)?e.forEach((function(e){t(e)})):Object.keys(e).forEach((function(n){t(e[n])}))}function l(e){if(e.ops=null,e.vars instanceof Array)for(var t=0;t<e.vars.length;t++)e.vars[t].data&&delete e.vars[t].data;else for(var n in e.vars)e.vars[n].data&&delete e.vars[n].data}n.r(o),n.d(o,{BufferType:function(){return f},GraphType:function(){return p},UniformType:function(){return d},WasmMemoryType:function(){return h}});var f,h,d,p,v=a("env",new(function(){function e(){this.ENV={}}return e.prototype.set=function(e,t){this.ENV[e]=t},e.prototype.get=function(e){return this.ENV[e]},e}())),g=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},m=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},y=function(){function e(e){this.urlConf={dir:"",main:""},this.separateChunk=!0,this.chunkNum=1,this.dataType="binary",this.params={type:"fetch"},this.inNode=!1,this.isLocalFile=!1,this.realFetch=function(){throw new Error("ERROR: empty fetch funciton")};var t=e,n="model.json";if(e.endsWith(".json")){var r=e.lastIndexOf("/")+1;t=e.substr(0,r),n=e.substr(r)}else"/"!==e.charAt(e.length-1)&&(t=e+"/");this.isLocalFile=0!==t.indexOf("http"),this.urlConf={dir:this.isLocalFile?"/"===t.charAt(0)?""+t:"/"+t:t,main:n},this.inNode="node"===v.get("platform")}return e.prototype.load=function(t){return g(this,void 0,void 0,(function(){var n,r;return m(this,(function(o){switch(o.label){case 0:return(r=t)?[3,2]:[4,this.fetchModel()];case 1:r=o.sent(),o.label=2;case 2:return n=r,this.separateChunk=!!n.chunkNum&&n.chunkNum>0,this.chunkNum=this.separateChunk?n.chunkNum:0,this.separateChunk?"binary"!==this.dataType?[3,4]:[4,this.fetchChunks().then((function(t){return e.allocateParamsVar(n.vars,t)}))]:[3,4];case 3:o.sent(),o.label=4;case 4:return[2,n]}}))}))},e.prototype.fetchOneChunk=function(e){return g(this,void 0,void 0,(function(){return m(this,(function(t){switch(t.label){case 0:return v.get("fetch")?[4,v.get("fetch")(e,{type:"arrayBuffer"})]:[3,2];case 1:return[2,t.sent()];case 2:return[2,this.fetch(e).then((function(e){return e.arrayBuffer()}))]}}))}))},e.prototype.fetchJson=function(e){return this.fetch(e).then((function(e){return e.json()}))},e.prototype.getFileName=function(e){return"chunk_"+e+".dat"},e.prototype.fetchChunks=function(){return g(this,void 0,void 0,(function(){var e,t,n;return m(this,(function(r){for(e=this.chunkNum,t=[],n=1;n<=e;n++)t.push(this.fetchOneChunk(this.urlConf.dir+this.getFileName(n)));return[2,Promise.all(t).then((function(e){var t,n=0,r=[];e.forEach((function(e){t=new Float32Array(e),r.push(t),n+=t.length}));var o=new Float32Array(n),i=0;return r.forEach((function(e){e.forEach((function(e){o[i]=e,i+=1}))})),o}))]}))}))},e.allocateParamsVar=function(e,t){var n,r=0,o=Array.isArray(t)?t:Object.values(t);c(e,(function(e){n=e.shape.reduce((function(e,t){return e*t})),e.persistable&&(e.data=o.slice(r,r+n),r+=n)}))},e.prototype.fetch=function(e,t){if(v.get("fetch"))return v.get("fetch")(e,t||{});var r=(t||this.params).method||"get",o=new(this.inNode?n(911).Headers:Headers);return this.realFetch=this.inNode?this.isLocalFile?this.fetchLocalFile:n(911):window.fetch.bind(window),this.realFetch(e,{method:r,headers:o})},e.prototype.fetchLocalFile=function(e){var t=n(993);return new Promise((function(n,r){try{n(t.readFileSync(e,"utf8"))}catch(e){r(e)}}))},e.prototype.fetchModel=function(){var e=this,t=this.params,n=this.urlConf.dir+this.urlConf.main,r=null;return"fetch"===t.type&&(r=new Promise((function(r,o){e.fetch(n,t).then((function(t){return v.get("fetch")?t:e.isLocalFile&&e.inNode?JSON.parse(t):t.json()})).then((function(e){return r(e)})).then((function(e){return o(e)}))}))),r},e}();!function(e){e.FrameBuffer="frameBuffer",e.ColorBuffer="colorBuffer"}(f||(f={})),function(e){e.memory100="100",e.memory200="200",e.memory300="300",e.memory400="400",e.memory500="500",e.memory600="600",e.memory700="700",e.memory800="800",e.memory900="900"}(h||(h={})),function(e){e.uniform1f="1f",e.uniform1fv="1fv",e.uniform1i="1i",e.uniform1iv="1iv",e.uniform2f="2f",e.uniform2fv="2fv",e.uniform2i="2i",e.uniform2iv="2iv",e.uniform3f="3f",e.uniform3fv="3fv",e.uniform3i="3i",e.uniform3iv="3iv",e.uniform4f="4f",e.uniform4fv="4fv",e.uniform4i="4i",e.uniform4iv="4iv"}(d||(d={})),function(e){e.SingleOutput="single",e.MultipleOutput="multiple",e.MultipleInput="multipleInput"}(p||(p={}));var b={opRegistry:{ops:{}},backend:"",backendInstance:null};function w(e,t){var n=e.conf,r=e.params,o=e.main,i=e.mainFunc,a=e.textureFuncConf,s=e.commonFuncConf,u=e.behaviors,c=void 0===u?[]:u,l=b.backend+"_"+t;b.opRegistry.ops[l]||(b.opRegistry.ops[l]={name:t,conf:n,params:r,main:o,mainFunc:i,textureFuncConf:a,commonFuncConf:s,behaviors:c})}function A(e,t,n){e&&(b.backend=e),t&&(b.backendInstance=t),n&&Object.keys(n).forEach((function(e){w(n[e],e)}))}b=a("GLOBALS",b);var x=i();x.ImageBitmap||(x.ImageBitmap=function(){});var T,P=function(){function e(e,t){this.id="",this.type="",this.inputs={},this.outputs={},this.attrs={},this.subAttrs=[],this.next="",this.opData=null,this.isPacked=!1,this.bufferType=f.FrameBuffer,this.uniform=null;var n=e.inputs,r=e.outputs,o=e.attrs,i=void 0===o?{}:o,a=e.type,s=e.isPacked,u=void 0!==s&&s,c=e.bufferType,l=void 0===c?f.FrameBuffer:c,h=e.uniform,d=void 0===h?null:h;this.id=a+"_"+ +new Date+"_"+t,this.inputs=n,this.outputs=r,this.attrs=i,this.subAttrs=e["sub-attrs"]||[],this.uniform=d,this.type=a,this.isPacked=u,this.bufferType=l,this.next="",this.opData=null}return Object.defineProperty(e.prototype,"inputsName",{get:function(){var e=this,t=[];return Object.keys(this.inputs).forEach((function(n){t.push(e.inputs[n][0])})),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"outputsName",{get:function(){return this.outputs.Output||this.outputs.Out||this.outputs.Y},enumerable:!1,configurable:!0}),e.prototype.execute=function(e){b.backendInstance.runProgram(this.opData,e)},e}(),C=function(e){this.name=e},_=(T=function(e,t){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}T(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),E={conv2d:function(e,t){var n=e.attrs.strides,r=e.inputs.Input[0],o=e.inputs.Filter[0];if("image"===r)return!1;var i=s(t,r).shape,a=s(t,o).shape;return!n.find((function(e){return e>1}))&&i[i.length-1-2]%4==0&&4===a.length&&a[0]%4==0&&a[1]%4==0}};function k(e){return{type:"packed_2_unpacked",attrs:{},inputs:{Input:[e.inputName]},outputs:{Output:[e.outputName]}}}function R(e){return{type:"unpacked_2_packed",attrs:{},inputs:{Input:[e.inputName]},outputs:{Output:[e.outputName]}}}function O(e,t){Object.keys(e.inputs).forEach((function(t){e.inputs[t]=[e.inputs[t]+"_packed"]})),Object.keys(e.outputs).forEach((function(t){e.outputs[t]=[e.outputs[t]+"_packed"]})),e.type=e.type+"_packing",e.id=e.type+"_"+ +new Date+"_"+t.length,e.isPacked=!0}var M,F,I=function(e){function t(){return e.call(this,"TexturePacking")||this}return _(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if("webgl"===b.backend&&v.get("webgl_pack_channel")){var n=e[0],r=e[1],o=e[2],i="depthwise_conv2d"===n.type?"conv2d":n.type,a=E[i];if(a&&a(n,r)){var s=n.inputs,u=n.outputs,c=s.Input[0],l=u.Output?u.Output[0]:u.Out[0],f=R({inputName:c,outputName:c+"_packed"}),h=o.length;o.push(new P(f,h)),O(n,o);var d=k({inputName:l+"_packed",outputName:l}),p=o.length+1;o.push(new P(d,p))}}},t}(C),D=(M=function(e,t){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}M(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),L=function(e){function t(){return e.call(this,"FormatInputsX")||this}return D(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0];if(["concat","connect","fc","rnn_origin","rnn_matmul","stack"].includes(n.type)){var r=n.inputs;if(("rnn_origin"===n.type||"rnn_matmul"===n.type)&&r.WeightList.length>0)r.WeightList.forEach((function(e,t){r["weightlist_"+t]=[e]}));else{var o=r.X||r.Input;if("wasm"!==v.get("backend"))o.length>1&&(o.forEach((function(e,t){r["origin"+(t>0?"_"+t:"")]=[e]})),delete r.X,delete r.Input);else{if(o.length>4)throw Error("Not yet supporting concat input tensors more than 4.");if(o.length>1){var i=o[0],a=o[1],s=o[2],u=o[3];r.X=[i],a&&(r.Y=[a]),s&&(r.Z=[s],n.type+="_mul"),u&&(r.M=[u])}}}}},t}(C),j=(F=function(e,t){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),B=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function N(e,t){var n=s(t,e);return n?n.shape:[]}function V(e,t,n,r){for(var o=B(t),i=0,a=0,s=e;a<s.length;a++)i+=N(s[a],r)[n];return o[n]=i,{name:e[e.length-1]+"_out",shape:o}}var U=function(e){function t(){return e.call(this,"splitOp")||this}return j(t,e),t.prototype.transform=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t[0],o=t[1],i=0,a=r.length;i<a;i++){var s=r[i];if("concat"===s.type&&(null===(e=s.inputs)||void 0===e?void 0:e.X)&&!(s.inputs.X.length<=4)){var c=s.attrs,l=s.inputs,f=s.outputs,h=l.X,d=h.length,p=Math.ceil((d-4)/3)+1,v=f.Out[0],g=N(v,o),m=c.axis||0;m=m>-1?m:g.length+m;for(var y=[],b=[],w=h.slice(0,4),A=void 0,x=0;x<p;x++){var T=0===x?w:h.slice(3*x+1,3*(x+1)+1),P=V(T,g,m,o);0!==x&&T.splice(0,0,A.name),P.shape[m]+=A?A.shape[m]:0;var C={Out:[P.name]};b.push({attrs:c,inputs:{X:T},outputs:C,type:"concat"}),y.push(P),A=P}b[p-1].outputs.Out=[v],r.splice.apply(r,B([i,1],b)),u(o,y)}}},t}(C),W=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function z(e){if(e.length<4){for(var t=[],n=0;n<4-e.length;n++)t.push(1);return t.concat(e)}return W(e)}function H(e){return e.reduce((function(e,t){return e+t}))}function G(e,t){var n=e.length;return 4-n+(t>-1?t:n+t)}function X(e,t){for(var n=t[0],r=t[1],o=t[2],i=t[3],a=r*i,s=r*o*i,u=[],c=0;c<n;c++)for(var l=0;l<r;l++)for(var f=0;f<o;f++)for(var h=0;h<i;h++)u.push(e[c*s+f*a+h*r+l]);return new Float32Array(u)}function Q(e,t){for(var n=t[0],r=t[1],o=t[2],i=t[3],a=o*i,s=r*o*i,u=[],c=0;c<n;c++)for(var l=0;l<i;l++)for(var f=0;f<r;f++)for(var h=0;h<o;h++)u.push(e[c*s+f*a+h*i+l]);return new Float32Array(u)}function Y(e,t,n,r){if("nhwc"===t){var o=n[0],i=n[1],a=Q(e,[o,n[2],n[3],i*(r?4:1)]);return new Float32Array(a)}return new Float32Array(e)}function q(e){for(var t,n=e.data,r=e.shape,o=W(r).reverse(),i=0,a=o.length-1;i<a;i++)t=K(t||n,o[i]);return t}function K(e,t){for(var n=[],r=0,o=e.length;r<o;r+=t)n.push(e.slice(r,r+t));return n}var J,Z,$,ee=(J=function(e,t){return(J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}J(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),te="fetch_pack",ne=function(e){function t(){return e.call(this,"PackOut")||this}return ee(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(v.get("webgl_pack_output")&&1!==v.get("webglVersion")){var n=e[0],r=e[1],o=n.find((function(e){return"fetch"===e.type})),i=o.inputs.X[0],a=z(s(r,i).shape),c=a[0],l=a[1],f=a[2],h=a[3],d={attrs:{},inputs:{X:[i]},outputs:{Y:[te]},type:"pack_out"},p=l*h,g=Math.ceil(c*f/4),m={name:te,shape:[1,1,g,p],persistable:!1};o.inputs.X=[te],o.attrs.origin_shape=[c,l,f,h],n.push(d),u(r,[m])}},t}(C),re=(Z=function(e,t){return(Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}Z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),oe="img_pre_processed",ie="img_origin",ae=function(e){function t(){return e.call(this,"FeedProcess")||this}return re(t,e),t.prototype.transform=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=e[1],o=e[2];if(o.webglFeedProcess||v.get("webgl_gpu_pipeline")){var i=o.mean,a=void 0===i?[0,0,0]:i,c=o.std,l=void 0===c?[1,1,1]:c,f=o.scale,h=void 0===f?[1,1]:f,p=o.pos,g=void 0===p?[0,0]:p,m=o.feedShape,y=s(r,"image"),b=y.shape,w=b[2],A=b[3];y.shape=[1,1,w,A];var x=Object.assign({},y);x.name=oe,x.shape=[1,3,m.fh,m.fw],x.persistable=!1,delete x.data;var T=Object.assign({},y);T.name=ie,T.shape=[1,1,m.fh,m.fw],T.persistable=!1,delete T.data,u(r,[T,x]);for(var P=function(e){var t=e.inputs;Object.keys(t).forEach((function(e){"image"===t[e][0]&&(t[e][0]=oe)}))},C=0,_=n.filter((function(e){var t=e.inputs;return Object.keys(t).find((function(e){return"image"===t[e][0]}))}));C<_.length;C++)P(_[C]);var E={attrs:{mean:a,std:l},inputs:{X:[ie]},outputs:{Y:[oe]},type:"feedPost"},S={attrs:{mean:a,std:l,scale:h,pos:g},inputs:{X:["image"]},outputs:{Y:[ie]},type:"imgFeed",uniform:{u_scale:{type:d.uniform2fv,value:[1,1]},u_pos:{type:d.uniform2fv,value:[0,0]},u_keep_ratio:{type:d.uniform1i,value:1}},isPacked:!0};n.splice(1,0,E),n.splice(1,0,S)}},t}(C),se={preTransforms:[new U,new ne,new ae],transforms:[new L,new I],postTransforms:[]},ue=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r};function ce(e,t){return e&&e[t]||[]}!function(e){e.PreTransforms="preTransforms",e.Transforms="transforms",e.PostTransforms="postTransforms"}($||($={}));var le=function(){function e(e,t){this.weightMap=[],this.ops=[],this.vars=[],this.config={},this.type=p.SingleOutput,this.plugins=null,this.ops=e.ops,this.vars=e.vars,this.type=t.type||this.type,this.plugins=t.plugins,this.config=t,e.feedShape&&(this.config.feedShape=e.feedShape)}return e.prototype.createGraph=function(){return this.preTransforms(),this.createOpsMap(),this.arrangeMap(),this.postTransforms(),this.weightMap},e.prototype.preTransforms=function(){var e=this;ue(se.preTransforms,ce(this.plugins,$.PreTransforms)).forEach((function(t){t.transform(e.ops,e.vars,e.config)}))},e.prototype.transforms=function(e,t){var n=this;ue(se.transforms,ce(this.plugins,$.Transforms)).forEach((function(r){r.transform(e,n.vars,t)}))},e.prototype.postTransforms=function(){var e=this;ue(se.postTransforms,ce(this.plugins,$.PostTransforms)).forEach((function(t){t.transform(e.weightMap,e.vars,e.type)}))},e.prototype.createOpsMap=function(){for(var e=[],t=0;t<this.ops.length;t++){var n=e.length,r=this.ops[t],o=new P(r,n);this.transforms(o,e),e.push(o)}this.weightMap=e},e.prototype.arrangeMap=function(){for(var e=[],t={},n={},r=0;r<this.weightMap.length;r++)for(var o=this.weightMap[r],i=0;i<o.outputsName.length;i++){var a=o.outputsName[i];n[a]?n[a]++:n[a]=1,t[o.id]=r}for(r=0;r<this.weightMap.length;r++)for(o=this.weightMap[r],e[r]=0,i=0;i<o.inputsName.length;i++)n[o.inputsName[i]]&&e[r]++;this.topoSort(this.weightMap,e,t)},e.prototype.topoSort=function(e,t,n){for(var r=[],o=e.slice(0),i=0;i<t.length;i++)0===t[i]&&r.push(e[i]);for(var a=null,s=0,u=r;s<u.length;s++){var c=u[s];a=this.topoSortInner(e,t,n,c,o,a)}},e.prototype.topoSortInner=function(e,t,n,r,o,i){for(var a=[r],s=i,u=r;a.length>0;){s&&(e[n[s.id]].next=u.id),s=u,u=a.pop()||{};for(var c=0;c<u.outputsName.length;c++)for(var l=0;l<o.length;l++)for(var f=0;f<o[l].inputsName.length;f++)if(o[l].inputsName[f]===u.outputsName[c]&&(t[n[o[l].id]]--,0===t[n[o[l].id]])){a.push(e[n[o[l].id]]),o.splice(l,1),l--;break}}return e[n[s.id]].next=u.id,u},e.prototype.getFeedExecutor=function(){return this.weightMap.find((function(e){return"feed"===e.type}))},e.prototype.getFetchExecutor=function(){return this.weightMap.find((function(e){return"fetch"===e.type}))},e.prototype.getExecutorById=function(e){return this.weightMap.find((function(t){return t.id===e}))},e}(),fe=function(){function e(e){this.opts={},this.isPacked=!1,this.name="",this.tensorId="",this.total=1,this.shape=[],this.unformattedShapeLength=0,this.shape_texture=[],this.exceedMax=!1,this.data=null,this.persistable=!1,this.interpType="NEAREST",this.dataLayout="",this.runtime=0,this.binding=0;var t=e.isPacked,n=void 0!==t&&t,r=e.name,o=e.runtime,i=void 0===o?0:o,a=e.persistable,s=void 0!==a&&a,u=e.type,c=e.dataLayout,l=e.interpType,f=void 0===l?"NEAREST":l,h=e.shape,d=e.data,p=e.binding,v=void 0===p?0:p;this.opts=e,this.isPacked=n,this.name=r,this.runtime=i,this.binding=v,this.persistable=s,this.interpType=f,this.tensorId=u,this.dataLayout=c,this.unformattedShapeLength=h.length,this.shape=z(h),this.total=this.shape.reduce((function(e,t){return e*t})),e.noLayout||d&&d.length&&(this.data=Y(d,this.dataLayout,this.shape,this.isPacked),e.data=null)}return Object.defineProperty(e.prototype,"width_texture",{get:function(){var e=this.shape_texture.length;return this.shape_texture[e-1]||1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height_texture",{get:function(){var e=this.shape_texture.length;return this.shape_texture[e-2]||1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width_shape",{get:function(){var e=this.shape.length;return this.shape[e-1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height_shape",{get:function(){var e=this.shape.length;return this.shape[e-2]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"channel",{get:function(){var e=this.shape.length;return this.shape[e-3]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length_shape",{get:function(){return this.shape.length||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length_unformatted_shape",{get:function(){return this.unformattedShapeLength||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"total_shape",{get:function(){return this.total},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"numbers_shape",{get:function(){for(var e=[],t=this.shape.length,n=0;n<t-1;n++){var r=this.shape.slice(n+1).reduce((function(e,t){return e*t}));e.push(r)}return e.push(1),e},enumerable:!1,configurable:!0}),e}(),he={adaptPaddings:function(){for(var e in this.processedAttrs)if(Object.prototype.hasOwnProperty.call(this.processedAttrs,e)&&"paddings"===e){var t=this.processedAttrs[e],n=t[0],r=t[1];return void(0===n&&1===r&&(this.processedAttrs[e][1]=0))}},setAdaptive:function(){this.processedAttrs.adaptive&&2===this.processedAttrs.ksize.length&&1===this.processedAttrs.ksize[0]&&1===this.processedAttrs.ksize[1]&&(this.processedAttrs.adaptive=!1,this.processedAttrs.global_pooling=!0)},isGlobalPooling:function(){var e,t=this.tensorDataMap.origin,n=(null===(e=null==t?void 0:t.shape)||void 0===e?void 0:e.length)||0;n>2&&this.processedAttrs.global_pooling&&(this.processedAttrs.ksize=[t.shape[n-2],t.shape[n-1]])},setPacked:function(){var e=this.processedAttrs.ispacked;this.tensorDataMap.origin&&e&&this.name.indexOf("pool")>-1&&(this.name+="_winograd")},mergeAttrs:function(){this.processedAttrs=this.subAttrs.reduce((function(e,t){return Object.assign(e,t)}),{})},isApplySeparableConv:function(){if(!this.isPackedOp){var e=this.processedAttrs.groups,t=this.tensorDataMap.filter;if("depthwise_conv2d"===this.name&&(this.name="conv2d"),t){var n=t.shape,r=n[0],o=n[1];r===e&&1===o&&(this.name+="_depthwise")}}},batchComputeConv2d:function(){var e=this.tensorDataMap.filter.shape[1];this.processedAttrs.filter_nearest_vec4=4*Math.floor(e/4),this.processedAttrs.filter_remainder_vec4=e%4},processBias:function(){var e=this.tensorDataMap.bias;if(e&&this.isPackedOp){e.packed=!0;var t=e.shape,n=[t[t.length-1]/4,1,1];e.shape=n}},isAdaptiveAvg:function(){var e=this.processedAttrs,t=e.adaptive,n=e.pooling_type;t&&"avg"===n&&(this.name+="_avg_adaptive")},isMax:function(){var e="max"===this.processedAttrs.pooling_type?1:0;this.processedAttrs.pooling_type=e,1===e&&(this.name+="_max")},transToPrelu:function(){this.processedAttrs.multi_value="0.0",this.processedAttrs.active_function="prelu"},transToRelu6:function(){this.processedAttrs.multi_value=this.processedAttrs.threshold,this.processedAttrs.active_function="relu6"},transToHardSigmoid:function(){this.processedAttrs.multi_value=this.processedAttrs.slope||.2,this.processedAttrs.bias_value=this.processedAttrs.offset||.5,this.processedAttrs.active_function="hardSigmoid"},transToLeakyrelu:function(){this.processedAttrs.multi_value=this.processedAttrs.alpha,this.processedAttrs.active_function="leakyRelu",this.name="relu"},transToPow:function(){this.processedAttrs.multi_value=this.processedAttrs.factor||2,this.processedAttrs.active_function="pow_func",this.name="pow"},transToSigmoid:function(){this.processedAttrs.active_function="sigmoid"},transToSqrt:function(){this.processedAttrs.active_function="sqrt"},transToTanh:function(){this.processedAttrs.active_function="tanh_func"},transToAbs:function(){this.processedAttrs.active_function="abs_func"},transToExp:function(){this.processedAttrs.active_function="exp"},transToScale:function(){var e=this.processedAttrs.scale;this.processedAttrs.multi_value=void 0!==e?e:1,this.processedAttrs.bias_value=this.processedAttrs.bias||0;var t=this.processedAttrs.bias_after_scale;this.processedAttrs.active_function=t||void 0===t?"scale":"scaleWidthBias"},setActiveFunc:function(){var e=this.name.replace("conv2d-elementwise_add-","");this.processedAttrs=Object.assign({active_function:"scale",multi_value:"1.0",bias_value:"0.0",fuse_relu:!1},this.processedAttrs),"leaky_relu"===e&&(this.processedAttrs.multi_value=this.processedAttrs.alpha,this.processedAttrs.active_function="leakyRelu")},normalizePerm:function(){var e=this.tensorDataMap.origin.shape.length,t=this.processedAttrs.axis,n=t.length;if(n-e>0&&(n=(t=t.map((function(e){return e-1})).filter((function(e){return e>=0}))).length),n>4)throw Error("op transpoes2 axis length exceeds maximum length 4, get "+n);for(var r=new Array(n).fill(0),o=0;o<n;o++)r[t[o]]=o;var i=[];for(o=0;o<4;o++)i[o]=r[o]||0;this.processedAttrs.perm_arr=i,this.processedAttrs.perm_size=n},normalizeDim:function(){for(var e=this.tensorDataMap.origin.shape,t=z(e),n=this.processedAttrs,r=n.axis,o=n.dim,i=G(e,void 0!==r?r:Array.isArray(o)&&o.length?o[0]:o),a=[],s=0;s<t[i];s++)a[s]=s;if(this.processedAttrs.target_length=a.length,this.processedAttrs.target_value=a,this.processedAttrs.inputs_dim=t[i],this.processedAttrs.dim=i,0===this.processedAttrs.num&&(this.processedAttrs.num=Object.values(this.tensorDataMap).filter((function(e){return"out"===e.tensorName})).length||1),"wasm"===v.get("backend")){this.processedAttrs.fourInputs=!1;var u=this.tensorDataMap.counter;if(u){var c=z(u.shape);this.processedAttrs.counter_num=c[i]}var l=this.tensorDataMap.appender;if(l){var f=z(l.shape);this.processedAttrs.append_num=f[i]}var h=this.tensorDataMap.fourth;if(h){this.processedAttrs.fourInputs=!0;var d=z(h.shape);this.processedAttrs.fourth_num=d[i]}}},processElementwiseAxis:function(){var e=this.tensorDataMap.origin.shape,t=this.tensorDataMap.counter.shape,n=void 0===this.processedAttrs.axis?-1:this.processedAttrs.axis;this.processedAttrs.counterLen=t.length,H(e)===H(t)?(this.processedAttrs.axis=0,this.processedAttrs.counterLen=4):(-1===n&&(n=e.length-t.length),this.processedAttrs.axis=G(e,n))},genElementwiseCounterPos:function(){for(var e=this.processedAttrs,t=e.counterLen,n=["0","0","0","0"],r=e.axis,o=4-t;o<4;o++)n[o]="oPos["+r+++"]";this.processedAttrs.counterPos=n.join(",")},flattenShape:function(){var e=Object.values(this.tensorDataMap).find((function(e){return e.shape.length>2}));if(e){var t=z(e.shape);e.shape=[t[0]*t[2],t[1]*t[3]]}},reshape:function(){var e=this.tensorDataMap.origin,t=this.tensorDataMap.counter,n=this.tensorDataMap.out;if(t.shape.length>e.shape.length){var r=t;t=e,e=r}if(e.shape.length>2&&2===t.shape.length){var o=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]);var n=e.reduce((function(e,t){return e*t}));return 1===t.length?[1,n]:[t[0],n/t[0]]}(e.shape,n.shape);e.shape=o}},checkIsMerge:function(){var e=this.name.replace("conv2d-elementwise_add-","");this.name="conv2d_elementwise_add","leaky_relu"===e&&(this.processedAttrs.alpha&&(this.processedAttrs.multi_value=this.processedAttrs.alpha),this.processedAttrs.active_function="leakyRelu")}},de=function(){return(de=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},pe=function(){function e(e,t,n,r,o){this.name="",this.isPackedOp=!1,this.processedAttrs={},this.subAttrs=[],this.uniform=null,this.inputTensors=[],this.outputTensors=[],this.dataLayout="",this.iLayer=0,this.program=[],this.isFinalOp=!1,this.bufferType=f.FrameBuffer,this.tensorDataMap={},this.tensorData=[];var i=e.type,a=e.inputs,s=e.outputs,u=e.attrs,c=e.isPacked,l=e.bufferType,h=void 0===l?f.FrameBuffer:l,d=e.uniform,p=void 0===d?null:d;this.modelName=o,this.subAttrs=e.subAttrs,this.name=i,this.isPackedOp=c,this.bufferType=h,this.dataLayout=n.dataLayout||"",this.iLayer=t,this.isFinalOp=r,this.uniform=p,this.initExtendedAttrs(u),this.constructTensorData(a,s,n.vars),this.buildTensor();var v=this.buildShaderParams();this.buildProgram(v)}return e.prototype.initExtendedAttrs=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];this.processedAttrs[t]=n}},e.prototype.constructTensorData=function(e,t,n){var r=this;Object.keys(t).forEach((function(e){t[e].forEach((function(o,i){t[e][i]=r.getTensorVar(o,n)}))})),Object.keys(e).forEach((function(t){e[t]=[r.getTensorVar(e[t][0],n)]}));var o=function(e){if(Object.prototype.hasOwnProperty.call(t,e))try{var n=t[e]||[{}],o=i.getExactTensorName(e,"output");o&&n.forEach((function(e,t){e.tensorName=o,r.tensorDataMap[o+"_"+t]=de(de({},e),{tensorName:o,runtime:t})}))}catch(e){console.error(e)}},i=this;for(var a in t)o(a);for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=e[a].length>0?e[a]:[{}],u=this.getExactTensorName(a,"input");if(u){var c=s[0];c.tensorName=u,this.tensorDataMap[u]=de(de({},c),{tensorName:u})}}},e.prototype.getExactTensorName=function(e,t){return"input"===t?{input:"origin",x:"origin",y:"counter",w:"weight"}[e.toLowerCase()]||e.toLowerCase():{output:"out",y:"out",out:"out",scale:"scale",bias:"bias",mean:"mean",variance:"variance",mask:"out",boxes:"out",variances:"out"}[e.toLowerCase()]},e.prototype.getTensorVar=function(e,t){var n=s(t,e.replace(/_packed$/,""));return n&&e.endsWith("_packed")?function(e,t){var n=3===e.shape.length?W([1],e.shape):e.shape,r=n[0],o=n[1],i=n[2],a=n[3],s=Object.assign({},e);if(s.name=t,s.packed=!1,o%4==0){var u=o/4;s.packed=!0,s.shape=[r,u,i,a]}return s}(n,e):n},e.prototype.buildProgram=function(e){var t=this,n=this.name,r=b.backend+"_"+n,o=b.opRegistry.ops[r];try{if(!o&&"wasm"!==v.get("backend"))throw new Error("[unregistered op] "+n);var i=this.inputTensors;this.program=this.outputTensors.map((function(n,r){return b.backendInstance.createProgram({op:o,outTensor:n,inputTensors:i,shaderParams:e[r],runtime:r,isFinalOp:t.isFinalOp})}))}catch(e){console.error(e)}},e.prototype.processTensorDataAndAttrs=function(){var e=this;try{this.name.indexOf("conv2d-elementwise_add")>-1?this.name="conv2d_elementwise_add":this.name.indexOf("max_pool2d_with_index")>-1&&(this.name="pool2d_max");var t=b.backend+"_"+this.name;(b.opRegistry.ops[t]&&b.opRegistry.ops[t].behaviors||[]).forEach((function(t){try{he[t].call(e)}catch(e){console.error(e)}}))}catch(e){console.error(e)}},e.prototype.buildTensor=function(){var e=this;this.processTensorDataAndAttrs();var t=Object.values(this.tensorDataMap);t.forEach((function(t,n){var r,o=t.tensorName,i=new fe({type:e.modelName+"_"+t.name,name:o,shape:t.shape,data:t.data||null,persistable:t.persistable||!1,interpType:t.interpType||"NEAREST",isPacked:e.isPackedOp||t.packed||!1,binding:n,noLayout:null===(r=b.backendInstance)||void 0===r?void 0:r.noLayout,dataLayout:e.dataLayout,runtime:t.runtime||0});"out"===o?e.outputTensors.push(i):e.inputTensors.push(i),t.shape=i.shape,t.total=i.total})),this.tensorDataMap=null,this.tensorData=t},e.prototype.buildShaderParams=function(){var e=this,t=[];return this.outputTensors.forEach((function(){var n=JSON.parse(JSON.stringify(e.processedAttrs));t.push(n)})),t},e}(),ve=function(){return(ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ge=function(){function e(){this.targetContext={},this.gapFillWith="#fff",this.mean=[0,0,0],this.std=[1,1,1],this.bgr=!1,this.pixelWidth=1,this.pixelHeight=1,this.inputFeed=[],this.targetCanvas=v.get("canvas2d")||document.createElement("canvas"),this.targetContext=this.targetCanvas.getContext("2d")}return e.prototype.process=function(e,t,n){var r=t.fill,o=t.mean,i=t.std,a=t.bgr,s=t.keepRatio,u=void 0===s||s,c=t.scale,l=void 0===c?0:c,f=n.fc,h=void 0===f?3:f,d=n.fh,p=n.fw,v=e,g={gapFillWith:r||this.gapFillWith,mean:o||this.mean,std:i||this.std,bgr:a||this.bgr,keepRatio:u,scale:l,targetSize:{width:p,height:d},targetShape:[1,h,d,p]};return this.fromPixels(v,g)||[]},e.prototype.fromPixels=function(e,t){var n=[],r={gapFillWith:t.gapFillWith,dx:0,dy:0,dWidth:t.targetSize.width,dHeight:t.targetSize.height},o=e,i=e.path&&e.width&&e.height;if(!i&&!(e instanceof ImageBitmap||e instanceof HTMLVideoElement||e instanceof HTMLImageElement||e instanceof HTMLCanvasElement))return[{data:n,shape:t.shape||t.targetShape,name:"image",persistable:!0}];this.pixelWidth=e.naturalWidth||e.width,this.pixelHeight=e.naturalHeight||e.height;var a=v.get("webgl_gpu_pipeline")||t.webglFeedProcess;return this.fitToTargetSize(i?o.path:o,r,ve(ve({},t),{inGPU:a})),n=this.getImageData(r),a?[{data:n=Float32Array.from(n.data),shape:[1,1,r.dHeight,r.dWidth],name:"image",persistable:!0}]:[{data:n=this.allReshapeToRGB(n,t),shape:t.targetShape||t.shape,name:"image",persistable:!0}]},e.prototype.allReshapeToRGB=function(e,t){for(var n=t.mean,r=t.std,o=t.targetShape,i=t.bgr,a=t.normalizeType,s=void 0===a?0:a,u=o[1],c=o[2],l=o[3],f=e.data||e,h=new Float32Array(c*l*u),d=0,p=0;p<c;++p)for(var v=p*l,g=0;g<l;++g)for(var m=v+g,y=0;y<u;++y){var b=i?4*m+(2-y):4*m+y;h[d]=0===s?f[b]/255:(f[b]-128)/128,h[d]-=n[y],h[d]/=r[y],d++}return new Float32Array(Q(h,[1,c,l,u]))},e.prototype.fitToTargetSize=function(e,t,n){var r=n||{},o=r.keepRatio,i=void 0===o||o,a=r.inGPU,s=void 0!==a&&a,u=r.scale,c=void 0===u?0:u,l=t.dWidth,f=t.dHeight,h=s?this.pixelWidth:l,d=s?this.pixelHeight:f,p=s?this.pixelWidth:l,v=s?this.pixelHeight:f;if(c){if(p-l<0||v-f<0)throw new Error("scale size smaller than target size");this.pixelWidth>this.pixelHeight?(v=c,p=Math.round(v*this.pixelWidth/this.pixelHeight)):(p=c,v=Math.round(p*this.pixelHeight/this.pixelWidth)),this.targetCanvas.width=h=p,this.targetCanvas.height=d=v,t.dx=(p-l)/2,t.dy=(v-f)/2}else i&&(l/f*this.pixelHeight/this.pixelWidth>=1?s?(h=Math.round(v*l/f),Math.floor((h-p)/2)):(p=Math.round(v*this.pixelWidth/this.pixelHeight),Math.floor((l-p)/2)):s?(d=Math.round(p*f/l),Math.floor((d-v)/2)):(v=Math.round(p*this.pixelHeight/this.pixelWidth),Math.floor((f-v)/2))),this.targetCanvas.width=t.dWidth=h,this.targetCanvas.height=t.dHeight=d;this.targetContext.fillStyle=t.gapFillWith,this.targetContext.fillRect(0,0,this.targetCanvas.width,this.targetCanvas.height),this.targetContext.drawImage(e,0,0,p,v)},e.prototype.getImageData=function(e){var t=e.dx,n=e.dy,r=e.dWidth,o=e.dHeight;return this.targetContext.getImageData(t,n,r,o)},e.prototype.cover=function(e,t,n,r){var o=n,i=r;return n/r*t/e>=1?o=Math.round(i*e/t):i=Math.round(o*t/e),[o/n,i/r]},e}(),me=function(){return(me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function ye(e,t,n){for(var r=[],o=0,i=e.length;o<i;o++){var a=e[o];a>t&&r.push({score:a,i:o})}return r.sort((function(e,t){return t.score-e.score})).slice(0,n)}function be(e){var t=e[0],n=e[1],r=e[2],o=e[3];return r<t||o<n?0:(r-t)*(o-n)}function we(e,t){if(t[0]>e[2]||t[2]<e[0]||t[1]>e[3]||t[3]<e[1])return 0;var n=be(e),r=be(t),o=function(e,t){var n=e[0],r=e[1],o=e[2],i=e[3],a=t[0],s=t[1],u=t[2],c=t[3],l=Math.max(n,a),f=Math.max(r,s);return(Math.min(o,u)-l)*(Math.min(i,c)-f)}(e,t);return o/(n+r-o)}var Ae={multiclass_nms:function(e,t){var n=e[0],r=void 0===n?[]:n,o=e[1],i=void 0===o?[]:o,a=q(r),s=q(i);if(!a||!s)return[];if(a=a[0],s=s[0],!(a&&a.length&&s&&s.length))return[];for(var u=t.nms_top_k,c=void 0===u?100:u,l=t.nms_eta,f=void 0===l?1:l,h=t.keep_top_k,d=void 0===h?100:h,p=t.background_label,v=void 0===p?0:p,g=t.nms_threshold,m=void 0===g?.3:g,y=t.score_threshold,b=void 0===y?0:y,w=[],A=0,x=s.length;A<x;A++){var T=[];if(A!==v){var P=ye(s[A],b,c);if(P&&P.length){var C=P.shift(),_=a[C.i];for(T.push(me(me({},C),{box:_,label:A}));P.length;){var E=P.shift();_=a[E.i];for(var S=!0,k=0,R=T;k<R.length;k++)if(we(_,R[k].box)>m){S=!1;break}S&&T.push(me(me({},E),{box:_,label:A})),S&&f<1&&m>.5&&(m*=f)}w=w.concat(T)}}}var O=w.sort((function(e,t){return t.score-e.score})).slice(0,d).sort((function(e,t){return e.label-t.label})).map((function(e){return function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}([e.label,e.score],e.box)}));return O&&O.length?O:[]}},xe=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Te=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},Pe=function(){function e(e){this.runnerConfig={},this.isPaused=!1,this.model={},this.weightMap=[],this.isExecuted=!1,this.test=!1,this.graphGenerator={},this.mediaProcessor=null,this.needPreheat=!0,this.feedShape={},this.runnerConfig=Object.assign({},e),this.needPreheat=void 0===e.needPreheat||e.needPreheat,this.modelName=e.modelName||Date.now().toString(),this.weightMap=[],v.set("ns",i()),"node"!==v.get("platform")&&(this.mediaProcessor=new ge)}return e.prototype.init=function(e){return xe(this,void 0,void 0,(function(){var t;return Te(this,(function(n){switch(n.label){case 0:return b.backendInstance?(this.isExecuted=!1,"wasm"!==v.get("backend")?[3,2]:[4,Promise.all([this.load(),b.backendInstance.init()])]):(console.error("ERROR: Haven't register backend"),[2]);case 1:return n.sent(),[3,5];case 2:return[4,b.backendInstance.init()];case 3:return n.sent(),[4,this.load(e)];case 4:n.sent(),n.label=5;case 5:return this.genFeedData(),this.genGraph(),this.genOpData(),"wasm"!==v.get("backend")?[3,7]:(this.model=Object.assign(this.model,this.runnerConfig),t=this.model,[4,b.backendInstance.initWasm(this.model,this.weightMap)]);case 6:return t.index=n.sent(),[2,[]];case 7:return this.needPreheat?[4,this.preheat()]:[3,9];case 8:return[2,n.sent()];case 9:return[2]}}))}))},e.prototype.load=function(e){return xe(this,void 0,void 0,(function(){var t,n,r,o,i,a,s,u;return Te(this,(function(c){switch(c.label){case 0:return t=this.runnerConfig,n=t.modelPath,r=t.modelObj,o=void 0===r?null:r,n?(i=new y(n),a=this,[4,i.load(e)]):[3,2];case 1:return a.model=c.sent(),[3,3];case 2:(null==o?void 0:o.model)&&(null==o?void 0:o.params)&&(s=o.model,u=o.params,y.allocateParamsVar(s.vars,u),this.model=s),c.label=3;case 3:return[2]}}))}))},e.prototype.genGraph=function(){this.graphGenerator=new le(this.model,this.runnerConfig),this.weightMap=this.graphGenerator.createGraph()},e.prototype.genOpData=function(){var e=this,t=0;this.weightMap.forEach((function(n,r){var o=n.type;if("feed"!==o&&"fetch"!==o){t++;var i=r===e.weightMap.length-2,a=new pe(n,t,e.model,i,e.modelName);n.opData=a}})),l(this.model)},e.prototype.preheat=function(){return xe(this,void 0,void 0,(function(){var e;return Te(this,(function(t){switch(t.label){case 0:return[4,this.checkModelLoaded()];case 1:return t.sent(),[4,this.execute()];case 2:return e=t.sent(),this.isExecuted=!0,[2,e]}}))}))},e.prototype.checkModelLoaded=function(){return xe(this,void 0,void 0,(function(){return Te(this,(function(e){switch(e.label){case 0:return this.model?[3,2]:[4,this.load()];case 1:e.sent(),e.label=2;case 2:return 0===this.weightMap.length&&(console.info("It's better to preheat the model before running."),this.genFeedData(),this.genGraph(),this.genOpData(),this.isExecuted=!1),[2]}}))}))},e.prototype.predict=function(e,t){return xe(this,void 0,void 0,(function(){var n,r,o;return Te(this,(function(i){switch(i.label){case 0:return this.isPaused||!this.mediaProcessor?[2]:(n=[],n=this.runnerConfig.webglFeedProcess?[e]:this.mediaProcessor.process(e,this.runnerConfig,this.feedShape),r=[],"wasm"!==v.get("backend")?[3,3]:[4,b.backendInstance.predict(n[0].data,this.model.index)]);case 1:return i.sent(),[4,this.read()];case 2:return o=i.sent(),r=this.postProcess(o),[3,5];case 3:return this.updateFeedData(n),[4,this.execute()];case 4:r=i.sent(),i.label=5;case 5:return this.isExecuted=!0,[2,t?t(r):r]}}))}))},e.prototype.predictWithFeed=function(e,t,n,r){var o;return xe(this,void 0,void 0,(function(){var i,a,s,u,c,l,f,h,d,p,g,m,y;return Te(this,(function(w){switch(w.label){case 0:return i=this.feedShape,a=i.fc,s=void 0===a?3:a,u=i.fw,c=i.fh,Array.isArray(e)?(null===(o=e[0])||void 0===o?void 0:o.data)?((p=e[0].data)instanceof Float32Array||(e[0].data=new Float32Array(p)),l=e):l=[{data:new Float32Array(e),shape:n||[1,s,c,u],name:"image",persistable:!0}]:ArrayBuffer.isView(e)?l=[{data:e,shape:n||[1,s,c,u],name:"image",persistable:!0}]:(h=(f=e).width,d=f.height,p=f.data,l=[{data:new Float32Array(p),shape:n||[1,s,d||c,h||u],name:"image",persistable:!0}]),r||((g=l[0]).data=Y(g.data,"nhwc",g.shape,!1)),m=[],"wasm"!==v.get("backend")?[3,3]:[4,b.backendInstance.predict(l[0].data,this.model.index)];case 1:return w.sent(),[4,this.read()];case 2:return y=w.sent(),m=this.postProcess(y),[3,5];case 3:return this.updateFeedData(l),[4,this.execute()];case 4:m=w.sent(),w.label=5;case 5:return this.isExecuted=!0,[2,t?t(m):m]}}))}))},e.prototype.genFeedData=function(){var e,t=this.runnerConfig,n=t.type,r=t.feedShape,o=t.webglFeedProcess;this.feedShape=this.model.feedShape||r;var i,a=this.feedShape,c=a.fc,l=void 0===c?3:c,f=a.fh,h=a.fw,d=this.model,g=d.vars,m=d.feed;if(n===p.MultipleInput){var y=this.model.ops&&this.model.ops[0]&&(null===(e=this.model.ops[0].inputs)||void 0===e?void 0:e.X);y.length>1&&(i=y.map((function(e){var t=s(g,e),n=t.shape.reverse(),r=n[0],o=n[1],i=n[2],a=n[3],u=void 0===a?1:a;return t.data=new Float32Array(u*i*o*r),t})))}else{i=m||s(g,"image");var b="wasm"!==v.get("backend")&&o?4:l,w={name:"image",shape:[1,l,f,h]};i=Object.assign(w,i,{data:new Float32Array(b*f*h).fill(1),persistable:!0}),"wasm"!==v.get("backend")&&o&&(i.shape[1]=4)}u(g,i)},e.prototype.updateFeedData=function(e){for(var t=e[0],n=0,r=this.weightMap.filter((function(e){return e.opData?e.opData.inputTensors.find((function(e){return e.tensorId.endsWith("_image")})):null}));n<r.length;n++){for(var o=r[n],i=0,a=o.opData.inputTensors;i<a.length;i++){var s=a[i];s.tensorId.endsWith("_image")&&(s.data=t.data)}var u=this.runnerConfig,c=u.webglFeedProcess,l=void 0!==c&&c,f=u.keepRatio,h=void 0===f||f;if(l||v.get("webgl_gpu_pipeline")){var d=o.opData.inputTensors.find((function(e){return e.tensorId.endsWith("_image")})),p=t.shape||[1,1,t.height,t.width],g=new Uint8Array(t.data||[]);if(t.width&&t.height&&!t.data){var m=t.naturalWidth||t.width;p=[1,1,t.naturalHeight||t.height,m],g=t}var y=d.opts;y.shape=p;var b=o.opData,w=new fe(y);w.data=g,b.inputTensors=[w];var A=p.slice(-2),x=A[0],T=A[1],P=b.outputTensors[0].shape.slice(-2),C=P[0],_=P[1],E=this.mediaProcessor.cover(T,x,_,C);o.uniform.u_scale.value=E,o.uniform.u_keep_ratio.value=+h}}},e.prototype.execute=function(){return xe(this,void 0,void 0,(function(){var e,t;return Te(this,(function(n){switch(n.label){case 0:return e=this.graphGenerator.getFeedExecutor(),this.executeOp(e),[4,this.read()];case 1:return t=n.sent(),[2,this.postProcess(t)]}}))}))},e.prototype.postProcess=function(e){var t="wasm"===v.get("backend");if(v.get("debug"))return e;var n=e,r=this.model,o=r.multiOutputs,i=r.postOps;if(o)if(t)n=o.map((function(t,n){var r;return(r={})[t.name]=e[n],r}));else{var a=0;n=o.map((function(t){var n,r=t.shape.reduce((function(e,t){return e*t})),o=e.slice(a,r+a);return a+=r,(n={})[t.name]=o,n}))}if(o&&i&&i.length)for(var s=function(e,t){var r=i[e],o=r.type,a=r.attrs,s=r.inputs,u=Ae[o];if(!u)return{value:void 0};var c=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}(n),l=Object.keys(s).map((function(e){var t=s[e],n=t.name,r=t.shape,o=c.filter((function(e){return e[n]}));return o&&o[0]&&o[0][n]?{name:e,tensorId:n,data:o[0][n],shape:r}:(console.error("未获取到"+n+"的数据"),null)}));n=u(l,a)},u=0,c=i.length;u<c;u++){var l=s(u);if("object"==S(l))return l.value}return n},e.prototype.executeOp=function(e){var t;if("fetch"!==e.type)if("feed"!==e.type&&e.execute(this.isExecuted),v.get("debug")&&(null===(t=e.opData)||void 0===t?void 0:t.outputTensors)&&e.opData.outputTensors[e.opData.outputTensors.length-1]&&e.opData.outputTensors[e.opData.outputTensors.length-1].tensorId===this.modelName+"_"+(v.get("ns").layerName||v.get("layerName")))console.info(e.opData.name+"_"+e.opData.iLayer,"runner op");else if(e.next){var n=e.next,r=this.graphGenerator.getExecutorById(n);this.executeOp(r)}},e.prototype.read=function(){return xe(this,void 0,void 0,(function(){var e,t,n;return Te(this,(function(r){switch(r.label){case 0:return e=this.graphGenerator.getFetchExecutor(),t=s(this.model.vars,e.inputs.X[0]),n={name:t.name,shape:e.attrs.origin_shape||t.shape,index:this.model.index},[4,b.backendInstance.read(n)];case 1:return[2,r.sent()]}}))}))},e.prototype.stopPredict=function(){this.isPaused=!0},e.prototype.dispose=function(){for(var e=0,t=this.weightMap;e<t.length;e++){var n=t[e];if(n.opData){var r=n.opData;b.backendInstance.dispose&&b.backendInstance.dispose(r)}}this.weightMap=[],this.model=null},e}(),Ce=function(){}},993:function(){}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}return n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==("undefined"==typeof globalThis?"undefined":S(globalThis)))return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==("undefined"==typeof window?"undefined":S(window)))return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(994)}()}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}return n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(293)}()}({exports:{}});var HZ=function(){function e(t){O(this,e),I(this,"arr",void 0),I(this,"shape",void 0),I(this,"row",void 0),I(this,"col",void 0),this.arr=t,this.row=t.length,this.col=t[0].length,this.shape=[this.row,this.col]}return F(e,[{key:"getCol",value:function(){for(var e=this.row,t=this.col,n=this.arr,r=[],o=0;o<e;o++)for(var i=0;i<t;i++)r[i]?r[i].push(n[o][i]):r[i]=[n[o][i]];return r}},{key:"mult",value:function(t){for(var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=this.row,i=t.col,a=[],s=t.getCol(),u=0;u<o;u++){a[u]=[];for(var c=function(e){var t=n.arr[u].reduce((function(t,n,r){return t+n*s[e][r]}),0);a[u][e]=t*r},l=0;l<i;l++)c(l)}return new e(a)}},{key:"multipy",value:function(t){for(var n=this.row,r=this.col,o=this.arr,i=[],a=0;a<n;a++){i[a]=[];for(var s=0;s<r;s++)i[a][s]=o[a][s]*t.arr[a][s]}return new e(i)}},{key:"pointMult",value:function(t){for(var n=this.row,r=this.col,o=this.arr,i=[],a=0;a<n;a++){i[a]=[];for(var s=0;s<r;s++)i[a][s]=o[a][s]*t}return new e(i)}},{key:"minus",value:function(t){for(var n=this.row,r=this.col,o=this.arr,i=[],a=0;a<n;a++){i[a]=[];for(var s=0;s<r;s++)i[a][s]=o[a][s]-t.arr[a][s]}return new e(i)}},{key:"transpose",value:function(){for(var t=this.row,n=this.col,r=this.arr,o=[],i=0;i<n;i++){o[i]=[];for(var a=0;a<t;a++)o[i][a]=r[a][i]}return new e(o)}},{key:"slice",value:function(t,n){return new e(this.arr.slice(t,n))}}]),e}(),GZ=[-.072,-.346,-.333,-.296,-.348,-.472,.156,-.366,-.417,-.361,.309,-.521,-.4796,.3,-.604,-.221,.296,-.512,.235,.296,-.46,.105,.291,-.474,.369,.285,-.512,-.225169,-.0925778,-.407935,-.071,-.023,-.13,.0945821,-.0943744,-.362066,-.649,-.198,-1.269,.593,-.236,-1.119,-.44,.502,-.469,.283,.486,-.376,-.575,.479,-.64,-.207,.444,-.388,.11,.445,-.358,.46,.472,-.51,-.068,-.703,-.387,-.0682077,-.284391,-.291888,-.0662728,-.383458,-.318104,-.142852,-.079903,-.269774,.0108861,-.0784876,-.259027,-.593385,.303609,-.719594,.497715,.276949,-.613964],XZ=new HZ([[-.26844819,-.10333455,.11066706,.28908497,-.12304192,.08628528,-.17137159,.12490889,-.03966109,-.34297211,.47149743,-.19553164,.19625587,-.03433842],[.22797247,.22441092,.22564315,.23023704,-.06674456,-.06389647,-.25005912,-.25659303,-.03265345,-.09075621,-.10026758,.23126454,.23132064,-.50987834],[-.04318945,.01956621,.02928017,-.02391375,.14084831,.1578003,.10779272,.12412716,.37154045,-.58593017,-.54288709,.0211159,.03161699,.19223225],[.25999897,.18569295,.09539778,.02480082,.09373256,.00550533,.05728472,-.07053279,.05620414,.22066479,-.12788923,.22662804,.06103472,-.0885228]]);function QZ(e,t,n,r,o){var i=Math.max(e,t)*o;return{size:i,x:n-(i-e)/2,y:r-(i-t)/2}}function YZ(e){var t=e.image,n=e.width,r=e.height,o=e.x0,i=e.y0,a=e.scale,s=void 0===a?1.2:a,u=e.targetWidth,c=e.targetHeight,l=document.createElement("canvas"),f=l.getContext("2d");l.width=u,l.height=c;var h=QZ(n,r,o,i,s),d=h.size,p=h.x,v=h.y;return null==f||f.drawImage(t,p,v,d,d,0,0,u,c),{ctx:f,imageData:null==f?void 0:f.getImageData(0,0,u,c)}}function qZ(e){var t=e.img,n=e.maxW,r=e.maxH,o=t.width,i=t.height,a=Math.max(o/n,i/r,1),s=o/a,u=i/a,c=document.createElement("canvas"),l=c.getContext("2d");return c.width=n,c.height=r,l.fillStyle="#000",l.fillRect(0,0,n,r),null==l||l.drawImage(t,0,0,s,u),{scale:1/a,imageData:null==l?void 0:l.getImageData(0,0,s,u)}}function KZ(e,t,n,r,o,i,a){return new Promise((function(s){var u=document.createElement("canvas"),c=u.getContext("2d"),l=new Image;u.width=t,u.height=n,null==c||c.putImageData(e,0,0),o&&i&&(null==c||c.fillRect(o[0]*i,o[1]*i,o[2]*i,o[3]*i)),a&&function(e,t){e.fillStyle="#FF0000";for(var n=0;n<t.length;n+=2)e.beginPath(),e.arc(t[n],t[n+1],2,0,2*Math.PI),e.closePath(),e.fill()}(c,a),l.src=u.toDataURL(),l.onload=function(){s(l)},r&&document.body.appendChild(u)}))}function JZ(e,t,n){for(var r=new Float32Array(t*n*3),o=0;o<t;o++)for(var i=0;i<n;i++)for(var a=0;a<3;a++){r[o*n*3+3*i+(0===a?2:2===a?0:a)]=e[o*n*4+4*i+a]/255-.5}return r}function ZZ(e){return function(t){return[e[2*t],e[2*t+1]]}}function $Z(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function e$(e){var t=Math.min.apply(Math,U(e.map((function(e){return V(e,1)[0]})))),n=Math.max.apply(Math,U(e.map((function(e){return V(e,1)[0]}))));return[t,Math.min.apply(Math,U(e.map((function(e){return V(e,2)[1]})))),n,Math.max.apply(Math,U(e.map((function(e){return V(e,2)[1]}))))]}function t$(e){var t=ZZ(e),n=V([58,60,62,64].map(t),4),r=n[0],o=n[1],i=n[2];return $Z(o,n[3])/$Z(r,i)>=.5?1:0}function n$(e){for(var t=[4,5,7,8,9,11,1,2,10,12,13,3,6,20],n=[13,17,30,34,50,53,58,62,57,2,10,21,38,6],r=t.length,o=[],i=[],a=0;a<r;a++)o.push([e[2*n[a]]-e[2*n[0]],e[2*n[a]+1]-e[2*n[0]+1]]),i.push([GZ[3*t[a]]-GZ[3*t[0]],GZ[3*t[a]+1]-GZ[3*t[0]+1],GZ[3*t[a]+2]-GZ[3*t[0]+2]]);var s=function(e,t){for(var n=1e3*Math.sqrt(e.arr.reduce((function(e,t){return e+Math.pow(t[0],2)+Math.pow(t[1],2)}),0)),r=e.arr.map((function(e){return[e[0]/n,e[1]/n]})),o=r.reduce((function(e,t,n){return e[0][n]=[t[0]],e[1][n]=[t[1]],e[2][n]=[1],e}),[[],[],[]]),i=V(o,3),a=i[0],s=i[1],u=i[2],c=new HZ(t.arr.map((function(e){return[].concat(U(e),[1])}))),l=new HZ(a),f=new HZ(s),h=new HZ(u),d=!1,p=0,v=[],g=[],m=[];!d;){var y=XZ.mult(l),b=XZ.mult(f),w=1/Math.sqrt(Math.pow(y.arr[0][0],2)+Math.pow(y.arr[1][0],2)+Math.pow(y.arr[2][0],2)),A=1/Math.sqrt(Math.pow(b.arr[0][0],2)+Math.pow(b.arr[1][0],2)+Math.pow(b.arr[2][0],2)),x=Math.sqrt(w*A),T=y.pointMult(x),P=b.pointMult(x);v=T.slice(0,3),g=P.slice(0,3),m=[[v.arr[1][0]*g.arr[2][0]-v.arr[2][0]*g.arr[1][0]],[v.arr[2][0]*g.arr[0][0]-v.arr[0][0]*g.arr[2][0]],[v.arr[0][0]*g.arr[1][0]-v.arr[1][0]*g.arr[0][0]]];var C=new HZ([].concat(U(m),[[x]])),_=(h=c.mult(C,1/x)).multipy(l),E=h.multipy(f),S=_.minus(l),k=E.minus(f);l=_,f=E;var R=S.transpose().mult(S).arr[0][0],O=k.transpose().mult(k).arr[0][0],M=Math.pow(1e3,2)*R+O;d=p>0&&p<10&&M<1,p+=1}return[[v.arr[0][0],v.arr[1][0],v.arr[2][0]],[g.arr[0][0],g.arr[1][0],g.arr[2][0]],[m[0][0],m[1][0],m[2][0]]]}(new HZ(o),new HZ(i)),u=V(function(e){var t=1e-5,n=e[0][0],r=e[0][1],o=e[0][2],i=e[1][0],a=e[2][0],s=e[2][1],u=e[2][2],c=0,l=0,f=0;if(Math.abs(1-a)<=t||Math.abs(-1-a)<=t)f=0,l=Math.PI/2,c=Math.atan2(r,o);else{l=Math.asin(-a);var h=Math.cos(l);c=Math.atan2(s/h,u/h),f=Math.atan2(i/h,n/h)}return[c,l,f]}(s),3),c=u[0],l=u[1],f=u[2];return[c=180*(c=c>0?c-Math.PI:c+Math.PI)/Math.PI,l=180*l/Math.PI,f=180*f/Math.PI]}function r$(e){for(var t=e.data,n=e.width,r=e.height,o=0,i=n*r,a=0;a<n;a++)for(var s=0;s<r;s++){var u=4*(a*r+s);o+=(.299*t[u]+.587*t[u+1]+.114*t[u+2])/255}return o/i}function o$(e,t,n){var r=V(t,4),o=r[0],i=r[1],a=r[2],s=r[3],u=function(e,t){var n=V(e,2),r=n[0],o=n[1],i=V(t,2),a=i[0],s=i[1],u=a/r,c=s/o,l=Math.max(u,c);return[(r*l-a)/2/l,(o*l-s)/2/l,a/l,s/l]}(e,null!=n?n:[216,216]),c=V(u,4),l=c[0],f=c[1],h=c[2],d=c[3];return{inCover:o>=l&&o+a<=l+h&&i>=f&&i+s<=f+d,ratio:a*s/(Math.PI*Math.pow(h/2,2))}}var i$=function(e,t){var n=V(t,4),r=n[0],o=n[1],i=n[2],a=n[3],s=V(e,4),u=s[0],c=s[1],l=s[2],f=r+i/2,h=o+a/2,d=u+l/2,p=c+s[3]/2,v=Math.sqrt((d-f)*(d-f)+(p-h)*(p-h));return Math.max(v/l,v/i)},a$=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8,r=i$(e,t);return r>n};function s$(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:15,o=n$(t),i=V(o,2),a=i[0],s=i[1];switch(e){case"headleft":return s<=-n;case"headright":return s>=r;case"lookup":return a<=0;case"lookdown":return a>=12;default:return!1}}function u$(e){var t,n=0,r=0,o=H(e);try{for(o.s();!(t=o.n()).done;){var i=t.value;"0"===i&&n++,"1"===i&&r++}}catch(a){o.e(a)}finally{o.f()}return[n,r]}function c$(e){return-e.angles.reduce((function(e,t){return Math.abs(e)+Math.abs(t)}),0)}var l$=function(){function e(t){var n=this;O(this,e),I(this,"loaded",!0),I(this,"bbox",void 0),I(this,"img",void 0),I(this,"tw",320),I(this,"th",240),I(this,"scale",1),I(this,"runner",void 0),I(this,"pathPrefix",void 0),I(this,"preheat",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.runner.preheat();case 1:case"end":return e.stop()}}),e)})))),I(this,"destroy",(function(){n.runner&&n.runner.dispose()})),this.pathPrefix=t}var t,n,r;return F(e,[{key:"load",value:(r=R(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.pathPrefix,n=new zZ.exports.Runner({modelPath:t+"/models/detect/model.json",fileCount:1,feedShape:{fw:this.tw,fh:this.th},targetSize:{height:this.th,width:this.tw},normalizeScale:.007843,mean:[104,117,123],normalizeType:2,bgr:2,needPreheat:!0}),e.next=4,n.init();case 4:this.runner=n;case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"predict",value:(n=R(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u,c,l,f,h,d,p,v;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.runner.predict(t);case 2:if(e.t0=e.sent,e.t0){e.next=5;break}e.t0=[];case 5:if(n=(n=e.t0).filter((function(e){return e[1]>=.3})),0!==(r=n.length)){e.next=10;break}return e.abrupt("return",{count:0,probability:-1,bbox:[0,0,0,0]});case 10:return o=V(n[0],6),i=o[1],a=o[2],s=o[3],u=o[4],c=o[5],l=this.img,f=l.width,h=l.height,d=this.scale,p=320/(f*d),v=240/(h*d),e.abrupt("return",{count:r,probability:i,bbox:[a*f*p,s*h*v,(u-a)*f*p,(c-s)*h*v]});case 16:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"run",value:(t=R(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.loaded){e.next=4;break}return e.next=3,this.load();case 3:this.loaded=!0;case 4:return this.img=t,n=this.tw,r=this.th,o=qZ({img:t,maxW:n,maxH:r}),i=o.scale,a=o.imageData,this.scale=i,s=r$(a),e.next=11,this.predict(t);case 11:return u=e.sent,e.abrupt("return",E(E({},u),{},{brightness:s}));case 13:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}(),f$=function(){function e(t){var n=this;O(this,e),I(this,"loaded",!0),I(this,"img",void 0),I(this,"tw",128),I(this,"th",128),I(this,"runner",void 0),I(this,"pathPrefix",void 0),I(this,"imageData",void 0),I(this,"destroy",(function(){n.runner&&n.runner.dispose()})),this.pathPrefix=t}var t,n,r,o;return F(e,[{key:"load",value:(o=R(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.pathPrefix,n=new zZ.exports.Runner({modelPath:t+"/models/align/model.json",fileCount:1,feedShape:{fw:this.tw,fh:this.th},needPreheat:!1}),e.next=4,n.init();case 4:this.runner=n;case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"preheat",value:(r=R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.runner.preheat();case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"predict",value:(n=R(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.runner.predictWithFeed(t);case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"run",value:(t=R(regeneratorRuntime.mark((function e(t,n){var r,o,i,a,s,u,c,l,f,h,d,p,v,g,m,y,b,w,A,x,T,P;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.loaded){e.next=4;break}return e.next=3,this.load();case 3:this.loaded=!0;case 4:if(o=V(n,4),i=o[0],a=o[1],s=o[2],u=o[3],c=this.tw,l=this.th,f=QZ(s,u,i,a,1.5),h=f.size,d=f.x,p=f.y,"function"!=typeof window.createImageBitmap){e.next=20;break}return e.next=10,createImageBitmap(t,d,p,h,h,{resizeWidth:c,resizeHeight:l});case 10:v=e.sent,(g=document.createElement("canvas")).width=c,g.height=l,null==(m=g.getContext("2d"))||m.drawImage(v,0,0),y=null==m?void 0:m.getImageData(0,0,c,l),this.imageData=y,e.next=22;break;case 20:b=YZ({image:t,width:s,height:u,x0:i,y0:a,targetWidth:c,targetHeight:l,scale:1.5}),w=b.imageData,this.imageData=w;case 22:return A={data:JZ(null===(r=this.imageData)||void 0===r?void 0:r.data,l,c),shape:[1,3,l,c],name:"image"},e.next=25,this.predict(A);case 25:return x=e.sent,T=x[0]["save_infer_model/scale_0.tmp_0"],P=x[1]["save_infer_model/scale_1.tmp_0"],e.abrupt("return",{pts:T,occlusion:P});case 29:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})}]),e}();I(f$,"DEFAULT_WIDTH",128),I(f$,"DEFAULT_HEIGHT",128);var h$=function(){function e(t){var n=this;O(this,e),I(this,"runner",void 0),I(this,"pathPrefix",void 0),I(this,"preheat",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.runner.preheat();case 2:case"end":return e.stop()}}),e)})))),I(this,"destroy",(function(){n.runner&&n.runner.dispose()})),this.pathPrefix=t}var t,n,r;return F(e,[{key:"load",value:(r=R(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.pathPrefix,r=new zZ.exports.Runner({modelPath:n+"/models/eyes/model.json",feedShape:{fw:e.DEFAULT_WIDTH,fh:e.DEFAULT_HEIGHT},fill:"#000",needPreheat:!1}),t.next=4,r.init();case 4:this.runner=r;case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"run",value:(n=R(regeneratorRuntime.mark((function e(t,n){var r,o,i,a,s,u,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ZZ(t),o=[13,14,15,16,17,18,19,20].map(r),e.next=4,this.getEyeFeedData(o,n);case 4:return i=e.sent,e.next=7,this.runner.predictWithFeed(i);case 7:return a=e.sent,s=[30,31,32,33,34,35,36,37].map(r),e.next=11,this.getEyeFeedData(s,n);case 11:return u=e.sent,e.next=14,this.runner.predictWithFeed(u);case 14:return c=e.sent,e.abrupt("return",{leftRes:a,rightRes:c});case 16:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getEyeFeedData",value:(t=R(regeneratorRuntime.mark((function t(n,r){var o,i,a,s,u,c,l,f,h,d,p,v;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e$(n),i=V(o,4),a=i[0],s=i[1],u=i[2],c=i[3],l=u-a,f=c-s,h=null,"function"!=typeof window.createImageBitmap){t.next=11;break}return t.next=8,createImageBitmap(r);case 8:h=t.sent,t.next=14;break;case 11:return t.next=13,KZ(r,f$.DEFAULT_WIDTH,f$.DEFAULT_HEIGHT,!1,null,null);case 13:h=t.sent;case 14:return d=YZ({image:h,width:l,height:f,x0:a,y0:s,targetWidth:e.DEFAULT_WIDTH,targetHeight:e.DEFAULT_HEIGHT,scale:1.8}),p=d.imageData,v={data:JZ(null==p?void 0:p.data,e.DEFAULT_HEIGHT,e.DEFAULT_WIDTH),shape:[1,3,e.DEFAULT_HEIGHT,e.DEFAULT_WIDTH],name:"image"},t.abrupt("return",v);case 17:case"end":return t.stop()}}),t)}))),function(e,n){return t.apply(this,arguments)})}]),e}();I(h$,"DEFAULT_WIDTH",56),I(h$,"DEFAULT_HEIGHT",36);var d$,p$=zZ.exports.coreUtils.findVarByKey,v$=function(){function e(t){var n=this;O(this,e),I(this,"img",void 0),I(this,"runner",void 0),I(this,"pathPrefix",void 0),I(this,"sliceMeans",void 0),I(this,"destroy",(function(){n.runner&&n.runner.dispose()})),this.pathPrefix=t}var t,n;return F(e,[{key:"load",value:(n=R(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.pathPrefix,n=new zZ.exports.Runner({modelPath:t+"/models/pd_paddle/model.json",needPreheat:!1}),e.next=4,n.init();case 4:this.runner=n;case 5:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getMean",value:function(e){var t=e.getContext("2d").getImageData(0,0,e.width,e.height);return function(e,t,n){for(var r=t*n,o=[0,0,0],i=0;i<t;i++)for(var a=0;a<n;a++)for(var s=0;s<3;s++)o[s]+=e[i*n*4+4*a+s];return o.map((function(e){return e/r}))}(null==t?void 0:t.data,null==t?void 0:t.width,null==t?void 0:t.height)}},{key:"predict",value:(t=R(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u,c,l=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.runner.weightMap,r=t.slice(Math.floor(.14*t.length),Math.ceil(.89*t.length)),this.sliceMeans=r,o=r.length,i=r.flat(1/0),a=function(e){Array.from(e,(function(e){var t=e.tensorId,n=p$(l.runner.model.vars,t.slice(t.indexOf("_")+1));n.shape=n.shape.map((function(e){switch(e){case 256:return o;case 255:return o-1;default:return e}}))}))},s=function(e){var t=n[e];if(null==t||!t.opData)return"continue";var r=t.opData,o=t.inputs,i=t.outputs,s=r.inputTensors,u=void 0===s?[]:s,c=r.outputTensors,f=void 0===c?[]:c,h=r.iLayer;a(u),a(f);var d={},p={};Object.keys(i).forEach((function(e){i[e].forEach((function(t){p[e]||(p[e]=[]),p[e].push(t.name)}))})),Object.keys(o).forEach((function(e){o[e].forEach((function(t){d[e]||(d[e]=[]),d[e].push(t.name)}))})),t.inputs=d,t.outputs=p,t.opData=new zZ.exports.OpData(t,h,l.runner.model,!1,l.runner.modelName)},u=0;case 8:if(!(u<18)){e.next=15;break}if("continue"!==s(u)){e.next=12;break}return e.abrupt("continue",12);case 12:u++,e.next=8;break;case 15:return this.runner.isExecuted=!1,e.next=18,this.runner.predictWithFeed(i,null,[1,1,o,3],!0);case 18:return c=e.sent,e.abrupt("return",c);case 20:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"conversion2DArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=e.length,r=n/t,o=[],i=0;i<r;i++){var a=e.slice(i*t,i*t+t);o.push(a)}return o}},{key:"getAverageArray",value:function(e,t){var n=[];return e.forEach((function(e,r){t.forEach((function(t,o){if(r===o){var i=t[e];n.push(i)}}))})),n}},{key:"getAverage",value:function(e){return e.reduce((function(e,t){return e+t}))/e.length}},{key:"calculateAverage",value:function(e,t){var n=this.conversion2DArray(t),r=this.getAverageArray(e,n);return this.getAverage(r)}}]),e}(),g$={code:"".concat(Math.round(Math.random())),modelPath:"",needToEncryptDataURL:!1,needToRecord:!1,constraints:{video:!0,audio:!1},timeout:15e3,actionTimeout:1e4,minFaceRatio:.2,maxFaceRatio:.8,randomMotionDetection:!0,isOriginImage:!0,colorRunAction:!0,autoloadModels:!0,maxSizeKB:70,trackingThreshold:1,occlusion:{eye:.8,mouse:.8,nose:.8,leftFace:.8,rightFace:.8,chin:.8},outputImgType:"image/jpeg"};!function(e){e[e.silence=0]="silence",e[e.action=1]="action",e[e.colorful=2]="colorful"}(d$||(d$={}));var m$=!0,y$=!0;function b$(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function w$(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,o=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return o.apply(this,arguments);var i=function(e){var t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,i),o.apply(this,[e,i])};var i=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return i.apply(this,arguments);if(!this._eventMap[t].has(n))return i.apply(this,arguments);var r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,i.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}}function A$(e){return"boolean"!=typeof e?new Error("Argument type: "+S(e)+". Please use a boolean."):(m$=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function x$(e){return"boolean"!=typeof e?new Error("Argument type: "+S(e)+". Please use a boolean."):(y$=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function T$(){if("object"===("undefined"==typeof window?"undefined":S(window))){if(m$)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function P$(e,t){y$&&console.warn(e+" is deprecated, please use "+t+" instead.")}function C$(e){var t={browser:null,version:null};if(void 0===e||!e.navigator)return t.browser="Not a browser.",t;var n=e.navigator;if(n.mozGetUserMedia)t.browser="firefox",t.version=b$(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection&&!e.RTCIceGatherer)t.browser="chrome",t.version=b$(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=b$(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t}function _$(e){return"[object Object]"===Object.prototype.toString.call(e)}function E$(e){return _$(e)?Object.keys(e).reduce((function(t,n){var r=_$(e[n]),o=r?E$(e[n]):e[n],i=r&&!Object.keys(o).length;return void 0===o||i?t:Object.assign(t,I({},n,o))}),{}):e}function S$(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach((function(r){r.endsWith("Id")?S$(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach((function(t){S$(e,e.get(t),n)}))})))}function k$(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",o=new Map;if(null===t)return o;var i=[];return e.forEach((function(e){"track"===e.type&&e.trackIdentifier===t.id&&i.push(e)})),i.forEach((function(t){e.forEach((function(n){n.type===r&&n.trackId===t.id&&S$(e,n,o)}))})),o}var R$=T$;function O$(e,t){var n=e&&e.navigator;if(n.mediaDevices){var r=function(e){if("object"!==S(e)||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach((function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var r="object"===S(e[n])?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var o=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];var i={};"number"==typeof r.ideal?(i[o("min",n)]=r.ideal,t.optional.push(i),(i={})[o("max",n)]=r.ideal,t.optional.push(i)):(i[o("",n)]=r.ideal,t.optional.push(i))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[o("",n)]=r.exact):["min","max"].forEach((function(e){void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[o(e,n)]=r[e])}))}})),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},o=function(e,o){if(t.version>=61)return o(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"===S(e.audio)){var i=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};i((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),i(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"===S(e.video)){var a=e.video.facingMode;a=a&&("object"===S(a)?a:{ideal:a});var s,u=t.version<66;if(a&&("user"===a.exact||"environment"===a.exact||"user"===a.ideal||"environment"===a.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||u))if(delete e.video.facingMode,"environment"===a.exact||"environment"===a.ideal?s=["back","rear"]:"user"!==a.exact&&"user"!==a.ideal||(s=["front"]),s)return n.mediaDevices.enumerateDevices().then((function(t){var n=(t=t.filter((function(e){return"videoinput"===e.kind}))).find((function(e){return s.some((function(t){return e.label.toLowerCase().includes(t)}))}));return!n&&t.length&&s.includes("back")&&(n=t[t.length-1]),n&&(e.video.deviceId=a.exact?{exact:n.deviceId}:{ideal:n.deviceId}),e.video=r(e.video),R$("chrome: "+JSON.stringify(e)),o(e)}));e.video=r(e.video)}return R$("chrome: "+JSON.stringify(e)),o(e)},i=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){o(e,(function(e){n.webkitGetUserMedia(e,t,(function(e){r&&r(i(e))}))}))}.bind(n),n.mediaDevices.getUserMedia){var a=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(e){return o(e,(function(e){return a(e).then((function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw t.getTracks().forEach((function(e){e.stop()})),new DOMException("","NotFoundError");return t}),(function(e){return Promise.reject(i(e))}))}))}}}}function M$(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function F$(e){if("object"===S(e)&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var n=this;return this._ontrackpoly||(this._ontrackpoly=function(t){t.stream.addEventListener("addtrack",(function(r){var o;o=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find((function(e){return e.track&&e.track.id===r.track.id})):{track:r.track};var i=new Event("track");i.track=r.track,i.receiver=o,i.transceiver={receiver:o},i.streams=[t.stream],n.dispatchEvent(i)})),t.stream.getTracks().forEach((function(r){var o;o=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find((function(e){return e.track&&e.track.id===r.id})):{track:r};var i=new Event("track");i.track=r,i.receiver=o,i.transceiver={receiver:o},i.streams=[t.stream],n.dispatchEvent(i)}))},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else w$(e,"track",(function(e){return e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e}))}function I$(e){if("object"===S(e)&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){var t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){var o=n.apply(this,arguments);return o||(o=t(this,e),this._senders.push(o)),o};var r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);var t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}var o=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._senders=this._senders||[],o.apply(this,[e]),e.getTracks().forEach((function(e){n._senders.push(t(n,e))}))};var i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;this._senders=this._senders||[],i.apply(this,[e]),e.getTracks().forEach((function(e){var n=t._senders.find((function(t){return t.track===e}));n&&t._senders.splice(t._senders.indexOf(n),1)}))}}else if("object"===S(e)&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){var a=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var e=this,t=a.apply(this,[]);return t.forEach((function(t){return t._pc=e})),t},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function D$(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var e=this,n=Array.prototype.slice.call(arguments),r=n[0],o=n[1],i=n[2];if(arguments.length>0&&"function"==typeof r)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof r))return t.apply(this,[]);var a=function(e){var t={};return e.result().forEach((function(e){var n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach((function(t){n[t]=e.stat(t)})),t[n.id]=n})),t},s=function(e){return new Map(Object.keys(e).map((function(t){return[t,e[t]]})))};if(arguments.length>=2){var u=function(e){o(s(a(e)))};return t.apply(this,[u,r])}return new Promise((function(n,r){t.apply(e,[function(e){n(s(a(e)))},r])})).then(o,i)}}}function L$(e){if("object"===S(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver){if(!("getStats"in e.RTCRtpSender.prototype)){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n});var n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){var e=this;return this._pc.getStats().then((function(t){return k$(t,e.track,!0)}))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){var r=e.RTCPeerConnection.prototype.getReceivers;r&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,t=r.apply(this,[]);return t.forEach((function(t){return t._pc=e})),t}),w$(e,"track",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){var e=this;return this._pc.getStats().then((function(t){return k$(t,e.track,!1)}))}}if("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype){var o=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){var t,n,r,i=arguments[0];return this.getSenders().forEach((function(e){e.track===i&&(t?r=!0:t=e)})),this.getReceivers().forEach((function(e){return e.track===i&&(n?r=!0:n=e),e.track===i})),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return o.apply(this,arguments)}}}}function j$(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((function(t){return e._shimmedLocalStreams[t][0]}))};var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};var n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var t=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach((function(e){if(t.getSenders().find((function(t){return t.track===e})))throw new DOMException("Track already exists.","InvalidAccessError")}));var r=this.getSenders();n.apply(this,arguments);var o=this.getSenders().filter((function(e){return-1===r.indexOf(e)}));this._shimmedLocalStreams[e.id]=[e].concat(o)};var r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};var o=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach((function(n){var r=t._shimmedLocalStreams[n].indexOf(e);-1!==r&&t._shimmedLocalStreams[n].splice(r,1),1===t._shimmedLocalStreams[n].length&&delete t._shimmedLocalStreams[n]})),o.apply(this,arguments)}}function B$(e,t){if(e.RTCPeerConnection){if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return j$(e);var n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this,t=n.apply(this);return this._reverseStreams=this._reverseStreams||{},t.map((function(t){return e._reverseStreams[t.id]}))};var r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){var n=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach((function(e){if(n.getSenders().find((function(t){return t.track===e})))throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[t.id]){var o=new e.MediaStream(t.getTracks());this._streams[t.id]=o,this._reverseStreams[o.id]=t,t=o}r.apply(this,[t])};var o=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},o.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){var r=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var o=[].slice.call(arguments,1);if(1!==o.length||!o[0].getTracks().find((function(e){return e===t})))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");var i=this.getSenders().find((function(e){return e.track===t}));if(i)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var a=this._streams[n.id];if(a)a.addTrack(t),Promise.resolve().then((function(){r.dispatchEvent(new Event("negotiationneeded"))}));else{var s=new e.MediaStream([t]);this._streams[n.id]=s,this._reverseStreams[s.id]=n,this.addStream(s)}return this.getSenders().find((function(e){return e.track===t}))},["createOffer","createAnswer"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],r=I({},t,(function(){var e=this,t=arguments,r=arguments.length&&"function"==typeof arguments[0];return r?n.apply(this,[function(n){var r=s(e,n);t[0].apply(null,[r])},function(e){t[1]&&t[1].apply(null,e)},arguments[2]]):n.apply(this,arguments).then((function(t){return s(e,t)}))}));e.RTCPeerConnection.prototype[t]=r[t]}));var i=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=u(this,arguments[0]),i.apply(this,arguments)):i.apply(this,arguments)};var a=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get:function(){var e=a.get.apply(this);return""===e.type?e:s(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){var t,n=this;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{},Object.keys(this._streams).forEach((function(r){n._streams[r].getTracks().find((function(t){return e.track===t}))&&(t=n._streams[r])})),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function s(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((function(t){var r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(o.id,"g"),r.id)})),new RTCSessionDescription({type:t.type,sdp:n})}function u(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((function(t){var r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),o.id)})),new RTCSessionDescription({type:t.type,sdp:n})}}function N$(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],r=I({},t,(function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}));e.RTCPeerConnection.prototype[t]=r[t]}))}function V$(e,t){w$(e,"negotiationneeded",(function(e){var n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e}))}var U$=Object.freeze({__proto__:null,shimMediaStream:M$,shimOnTrack:F$,shimGetSendersWithDtmf:I$,shimGetStats:D$,shimSenderReceiverGetStats:L$,shimAddTrackRemoveTrackWithNative:j$,shimAddTrackRemoveTrack:B$,shimPeerConnection:N$,fixNegotiationNeeded:V$,shimGetUserMedia:O$,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then((function(t){var r=n.video&&n.video.width,o=n.video&&n.video.height,i=n.video&&n.video.frameRate;return n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:i||3}},r&&(n.video.mandatory.maxWidth=r),o&&(n.video.mandatory.maxHeight=o),e.navigator.mediaDevices.getUserMedia(n)}))}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}});function W$(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){P$("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var o=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},i=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(e){return"object"===S(e)&&"object"===S(e.audio)&&(e=JSON.parse(JSON.stringify(e)),o(e.audio,"autoGainControl","mozAutoGainControl"),o(e.audio,"noiseSuppression","mozNoiseSuppression")),i(e)},r&&r.prototype.getSettings){var a=r.prototype.getSettings;r.prototype.getSettings=function(){var e=a.apply(this,arguments);return o(e,"mozAutoGainControl","autoGainControl"),o(e,"mozNoiseSuppression","noiseSuppression"),e}}if(r&&r.prototype.applyConstraints){var s=r.prototype.applyConstraints;r.prototype.applyConstraints=function(e){return"audio"===this.kind&&"object"===S(e)&&(e=JSON.parse(JSON.stringify(e)),o(e,"autoGainControl","mozAutoGainControl"),o(e,"noiseSuppression","mozNoiseSuppression")),s.apply(this,[e])}}}}function z$(e){"object"===S(e)&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function H$(e,t){if("object"===S(e)&&(e.RTCPeerConnection||e.mozRTCPeerConnection)){!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],r=I({},t,(function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}));e.RTCPeerConnection.prototype[t]=r[t]}));var n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var e=Array.prototype.slice.call(arguments),o=e[0],i=e[1],a=e[2];return r.apply(this,[o||null]).then((function(e){if(t.version<53&&!i)try{e.forEach((function(e){e.type=n[e.type]||e.type}))}catch(yK){if("TypeError"!==yK.name)throw yK;e.forEach((function(t,r){e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))}))}return e})).then(i,a)}}}function G$(e){if("object"===S(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!("getStats"in e.RTCRtpSender.prototype))){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n});var n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}}function X$(e){if("object"===S(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!("getStats"in e.RTCRtpReceiver.prototype))){var t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n}),w$(e,"track",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}}function Q$(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;P$("removeStream","removeTrack"),this.getSenders().forEach((function(n){n.track&&e.getTracks().includes(n.track)&&t.removeTrack(n)}))})}function Y$(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function q$(e){if("object"===S(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var e=arguments[1],n=e&&"sendEncodings"in e;n&&e.sendEncodings.forEach((function(e){if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));var r=t.apply(this,arguments);if(n){var o=r.sender,i=o.getParameters();(!("encodings"in i)||1===i.encodings.length&&0===Object.keys(i.encodings[0]).length)&&(i.encodings=e.sendEncodings,o.sendEncodings=e.sendEncodings,this.setParametersPromises.push(o.setParameters(i).then((function(){delete o.sendEncodings})).catch((function(){delete o.sendEncodings}))))}return r})}}function K$(e){if("object"===S(e)&&e.RTCRtpSender){var t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){var e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}}function J$(e){if("object"===S(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){var e=arguments,n=this;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return t.apply(n,e)})).finally((function(){n.setParametersPromises=[]})):t.apply(this,arguments)}}}function Z$(e){if("object"===S(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){var e=arguments,n=this;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return t.apply(n,e)})).finally((function(){n.setParametersPromises=[]})):t.apply(this,arguments)}}}var $$=Object.freeze({__proto__:null,shimOnTrack:z$,shimPeerConnection:H$,shimSenderGetStats:G$,shimReceiverGetStats:X$,shimRemoveStream:Q$,shimRTCDataChannel:Y$,shimAddTransceiver:q$,shimGetParameters:K$,shimCreateOffer:J$,shimCreateAnswer:Z$,shimGetUserMedia:W$,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){var r=new DOMException("getDisplayMedia without video constraints is undefined");return r.name="NotFoundError",r.code=8,Promise.reject(r)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}});function e0(e){if("object"===S(e)&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach((function(r){return t.call(n,r,e)})),e.getVideoTracks().forEach((function(r){return t.call(n,r,e)}))},e.RTCPeerConnection.prototype.addTrack=function(e){for(var n=this,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o&&o.forEach((function(e){n._localStreams?n._localStreams.includes(e)||n._localStreams.push(e):n._localStreams=[e]})),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;this._localStreams||(this._localStreams=[]);var n=this._localStreams.indexOf(e);if(-1!==n){this._localStreams.splice(n,1);var r=e.getTracks();this.getSenders().forEach((function(e){r.includes(e.track)&&t.removeTrack(e)}))}})}}function t0(e){if("object"===S(e)&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(e){var t=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=function(e){e.streams.forEach((function(e){if(t._remoteStreams||(t._remoteStreams=[]),!t._remoteStreams.includes(e)){t._remoteStreams.push(e);var n=new Event("addstream");n.stream=e,t.dispatchEvent(n)}}))})}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach((function(t){if(e._remoteStreams||(e._remoteStreams=[]),!(e._remoteStreams.indexOf(t)>=0)){e._remoteStreams.push(t);var n=new Event("addstream");n.stream=t,e.dispatchEvent(n)}}))}),t.apply(e,arguments)}}}function n0(e){if("object"===S(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,o=t.setLocalDescription,i=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){var r=arguments.length>=2?arguments[2]:arguments[0],o=n.apply(this,[r]);return t?(o.then(e,t),Promise.resolve()):o},t.createAnswer=function(e,t){var n=arguments.length>=2?arguments[2]:arguments[0],o=r.apply(this,[n]);return t?(o.then(e,t),Promise.resolve()):o};var s=function(e,t,n){var r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=s,s=function(e,t,n){var r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=s,s=function(e,t,n){var r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=s}}function r0(e){var t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){var n=t.mediaDevices,r=n.getUserMedia.bind(n);t.mediaDevices.getUserMedia=function(e){return r(o0(e))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function o0(e){return e&&void 0!==e.video?Object.assign({},e,{video:E$(e.video)}):e}function i0(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){for(var r=[],o=0;o<e.iceServers.length;o++){var i=e.iceServers[o];!i.hasOwnProperty("urls")&&i.hasOwnProperty("url")?(P$("RTCIceServer.url","RTCIceServer.urls"),(i=JSON.parse(JSON.stringify(i))).urls=i.url,delete i.url,r.push(i)):r.push(e.iceServers[o])}e.iceServers=r}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return t.generateCertificate}})}}function a0(e){"object"===S(e)&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function s0(e){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);var n=this.getTransceivers().find((function(e){return"audio"===e.receiver.track.kind}));!1===e.offerToReceiveAudio&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveAudio||n||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);var r=this.getTransceivers().find((function(e){return"video"===e.receiver.track.kind}));!1===e.offerToReceiveVideo&&r?"sendrecv"===r.direction?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":"recvonly"===r.direction&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):!0!==e.offerToReceiveVideo||r||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function u0(e){"object"!==S(e)||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var c0=Object.freeze({__proto__:null,shimLocalStreamsAPI:e0,shimRemoteStreamsAPI:t0,shimCallbacksAPI:n0,shimGetUserMedia:r0,shimConstraints:o0,shimRTCIceServerUrls:i0,shimTrackEventTransceiver:a0,shimCreateOfferLegacy:s0,shimAudioContext:u0}),l0={exports:{}};!function(e){var t={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map((function(e){return e.trim()}))},t.splitSections=function(e){return e.split("\nm=").map((function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"}))},t.getDescription=function(e){var n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){var n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter((function(e){return 0===e.indexOf(n)}))},t.parseCandidate=function(e){for(var t,n={foundation:(t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "))[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]},r=8;r<t.length;r+=2)switch(t[r]){case"raddr":n.relatedAddress=t[r+1];break;case"rport":n.relatedPort=parseInt(t[r+1],10);break;case"tcptype":n.tcpType=t[r+1];break;case"ufrag":n.ufrag=t[r+1],n.usernameFragment=t[r+1];break;default:void 0===n[t[r]]&&(n[t[r]]=t[r+1])}return n},t.writeCandidate=function(e){var t=[];t.push(e.foundation);var n=e.component;"rtp"===n?t.push(1):"rtcp"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);var r=e.type;return t.push("typ"),t.push(r),"host"!==r&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substr(14).split(" ")},t.parseRtpMap=function(e){var t=e.substr(9).split(" "),n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){var t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);var n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){var t=e.substr(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1]}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},t.parseFmtp=function(e){for(var t,n={},r=e.substr(e.indexOf(" ")+1).split(";"),o=0;o<r.length;o++)n[(t=r[o].trim().split("="))[0].trim()]=t[1];return n},t.writeFmtp=function(e){var t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){var r=[];Object.keys(e.parameters).forEach((function(t){void 0!==e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)})),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){var t=e.substr(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){var t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach((function(e){t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"})),t},t.parseSsrcMedia=function(e){var t=e.indexOf(" "),n={ssrc:parseInt(e.substr(7,t-7),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substr(t+1,r-t-1),n.value=e.substr(r+1)):n.attribute=e.substr(t+1),n},t.parseSsrcGroup=function(e){var t=e.substr(13).split(" ");return{semantics:t.shift(),ssrcs:t.map((function(e){return parseInt(e,10)}))}},t.getMid=function(e){var n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substr(6)},t.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach((function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"})),n},t.parseCryptoLine=function(e){var t=e.substr(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"===S(e.keyParams)?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;var t=e.substr(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){var r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],o=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&o?{usernameFragment:r.substr(12),password:o.substr(10)}:null},t.writeIceParameters=function(e){var t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){for(var n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" "),o=3;o<r.length;o++){var i=r[o],a=t.matchPrefix(e,"a=rtpmap:"+i+" ")[0];if(a){var s=t.parseRtpMap(a),u=t.matchPrefix(e,"a=fmtp:"+i+" ");switch(s.parameters=u.length?t.parseFmtp(u[0]):{},s.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+i+" ").map(t.parseRtcpFb),n.codecs.push(s),s.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(s.name.toUpperCase())}}}return t.matchPrefix(e,"a=extmap:").forEach((function(e){n.headerExtensions.push(t.parseExtmap(e))})),n},t.writeRtpDescription=function(e,n){var r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" UDP/TLS/RTP/SAVPF ",r+=n.codecs.map((function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType})).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach((function(e){r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)}));var o=0;return n.codecs.forEach((function(e){e.maxptime>o&&(o=e.maxptime)})),o>0&&(r+="a=maxptime:"+o+"\r\n"),n.headerExtensions&&n.headerExtensions.forEach((function(e){r+=t.writeExtmap(e)})),r},t.parseRtpEncodingParameters=function(e){var n,r=[],o=t.parseRtpParameters(e),i=-1!==o.fecMechanisms.indexOf("RED"),a=-1!==o.fecMechanisms.indexOf("ULPFEC"),s=t.matchPrefix(e,"a=ssrc:").map((function(e){return t.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute})),u=s.length>0&&s[0].ssrc,c=t.matchPrefix(e,"a=ssrc-group:FID").map((function(e){return e.substr(17).split(" ").map((function(e){return parseInt(e,10)}))}));c.length>0&&c[0].length>1&&c[0][0]===u&&(n=c[0][1]),o.codecs.forEach((function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var t={ssrc:u,codecPayloadType:parseInt(e.parameters.apt,10)};u&&n&&(t.rtx={ssrc:n}),r.push(t),i&&((t=JSON.parse(JSON.stringify(t))).fec={ssrc:u,mechanism:a?"red+ulpfec":"red"},r.push(t))}})),0===r.length&&u&&r.push({ssrc:u});var l=t.matchPrefix(e,"b=");return l.length&&(l=0===l[0].indexOf("b=TIAS:")?parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")?1e3*parseInt(l[0].substr(5),10)*.95-16e3:void 0,r.forEach((function(e){e.maxBitrate=l}))),r},t.parseRtcpParameters=function(e){var n={},r=t.matchPrefix(e,"a=ssrc:").map((function(e){return t.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute}))[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);var o=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=o.length>0,n.compound=0===o.length;var i=t.matchPrefix(e,"a=rtcp-mux");return n.mux=i.length>0,n},t.writeRtcpParameters=function(e){var t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){var n,r=t.matchPrefix(e,"a=msid:");if(1===r.length)return{stream:(n=r[0].substr(7).split(" "))[0],track:n[1]};var o=t.matchPrefix(e,"a=ssrc:").map((function(e){return t.parseSsrcMedia(e)})).filter((function(e){return"msid"===e.attribute}));return o.length>0?{stream:(n=o[0].value.split(" "))[0],track:n[1]}:void 0},t.parseSctpDescription=function(e){var n,r=t.parseMLine(e),o=t.matchPrefix(e,"a=max-message-size:");o.length>0&&(n=parseInt(o[0].substr(19),10)),isNaN(n)&&(n=65536);var i=t.matchPrefix(e,"a=sctp-port:");if(i.length>0)return{port:parseInt(i[0].substr(12),10),protocol:r.fmt,maxMessageSize:n};var a=t.matchPrefix(e,"a=sctpmap:");if(a.length>0){var s=a[0].substr(10).split(" ");return{port:parseInt(s[0],10),protocol:s[1],maxMessageSize:n}}},t.writeSctpDescription=function(e,t){var n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,21)},t.writeSessionBoilerplate=function(e,n,r){var o=void 0!==n?n:2;return"v=0\r\no="+(r||"thisisadapterortc")+" "+(e||t.generateSessionId())+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,n){for(var r=t.splitLines(e),o=0;o<r.length;o++)switch(r[o]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[o].substr(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substr(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){var n=t.splitLines(e)[0].substr(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){var n=t.matchPrefix(e,"o=")[0].substr(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;for(var n=t.splitLines(e),r=0;r<n.length;r++)if(n[r].length<2||"="!==n[r].charAt(1))return!1;return!0},e.exports=t}(l0);var f0=l0.exports,h0=C({__proto__:null,default:f0},[l0.exports]);function d0(e){if(!(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)){var t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"===S(e)&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substr(2)),e.candidate&&e.candidate.length){var n=new t(e),r=f0.parseCandidate(e.candidate),o=Object.assign(n,r);return o.toJSON=function(){return{candidate:o.candidate,sdpMid:o.sdpMid,sdpMLineIndex:o.sdpMLineIndex,usernameFragment:o.usernameFragment}},o}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,w$(e,"icecandidate",(function(t){return t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t}))}}function p0(e,t){if(e.RTCPeerConnection){"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp}});var n=function(e){if(!e||!e.sdp)return!1;var t=f0.splitSections(e.sdp);return t.shift(),t.some((function(e){var t=f0.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")}))},r=function(e){var t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;var n=parseInt(t[1],10);return n!=n?-1:n},o=function(e){var n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n},i=function(e,n){var r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);var o=f0.matchPrefix(e.sdp,"a=max-message-size:");return o.length>0?r=parseInt(o[0].substr(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r},a=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){var e=this.getConfiguration(),s=e.sdpSemantics;"plan-b"===s&&Object.defineProperty(this,"sctp",{get:function(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(n(arguments[0])){var u,c=r(arguments[0]),l=o(c),f=i(arguments[0],c);u=0===l&&0===f?Number.POSITIVE_INFINITY:0===l||0===f?Math.max(l,f):Math.min(l,f);var h={};Object.defineProperty(h,"maxMessageSize",{get:function(){return u}}),this._sctp=h}return a.apply(this,arguments)}}}function v0(e){if(e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype){var t=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){var e=t.apply(this,arguments);return n(e,this),e},w$(e,"datachannel",(function(e){return n(e.channel,e.target),e}))}function n(e,t){var n=e.send;e.send=function(){var r=arguments[0],o=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&o>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}}function g0(e){if(e.RTCPeerConnection&&!("connectionState"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((function(e){var n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(e){var t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;var n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}}))}}function m0(e,t){if(e.RTCPeerConnection&&!("chrome"===t.browser&&t.version>=71||"safari"===t.browser&&t.version>=605)){var n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){var r=t.sdp.split("\n").filter((function(e){return"a=extmap-allow-mixed"!==e.trim()})).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:r}):t.sdp=r}return n.apply(this,arguments)}}}function y0(e,t){if(e.RTCPeerConnection&&e.RTCPeerConnection.prototype){var n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}}function b0(e,t){if(e.RTCPeerConnection&&e.RTCPeerConnection.prototype){var n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){var e=this,t=arguments[0]||{};if("object"!==S(t)||t.type&&t.sdp)return n.apply(this,arguments);if(!(t={type:t.type,sdp:t.sdp}).type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":t.type="offer";break;default:t.type="answer"}if(t.sdp||"offer"!==t.type&&"answer"!==t.type)return n.apply(this,[t]);var r="offer"===t.type?this.createOffer:this.createAnswer;return r.apply(this).then((function(t){return n.apply(e,[t])}))})}}var w0=Object.freeze({__proto__:null,shimRTCIceCandidate:d0,shimMaxMessageSize:p0,shimSendThrowTypeError:v0,shimConnectionState:g0,removeExtmapAllowMixed:m0,shimAddIceCandidateNullOrEmpty:y0,shimParameterlessSetLocalDescription:b0});!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.window,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimSafari:!0},r=T$,o=C$(t),i={browserDetails:o,commonShim:w0,extractVersion:b$,disableLog:A$,disableWarnings:x$,sdp:h0};switch(o.browser){case"chrome":if(!U$||!N$||!n.shimChrome)return r("Chrome shim is not included in this adapter release."),i;if(null===o.version)return r("Chrome shim can not determine version, not shimming."),i;r("adapter.js shimming chrome."),i.browserShim=U$,y0(t,o),b0(t),O$(t,o),M$(t),N$(t,o),F$(t),B$(t,o),I$(t),D$(t),L$(t),V$(t,o),d0(t),g0(t),p0(t,o),v0(t),m0(t,o);break;case"firefox":if(!$$||!H$||!n.shimFirefox)return r("Firefox shim is not included in this adapter release."),i;r("adapter.js shimming firefox."),i.browserShim=$$,y0(t,o),b0(t),W$(t,o),H$(t,o),z$(t),Q$(t),G$(t),X$(t),Y$(t),q$(t),K$(t),J$(t),Z$(t),d0(t),g0(t),p0(t,o),v0(t);break;case"safari":if(!c0||!n.shimSafari)return r("Safari shim is not included in this adapter release."),i;r("adapter.js shimming safari."),i.browserShim=c0,y0(t,o),b0(t),i0(t),s0(t),n0(t),e0(t),t0(t),a0(t),r0(t),u0(t),d0(t),p0(t,o),v0(t),m0(t,o);break;default:r("Unsupported browser!")}}({window:"undefined"==typeof window?void 0:window});var A0=["Quark","NokiaBrowser","UCBrowser"],x0=[{os:{name:"Android",version:"6.0"},device:{vendor:"Lenovo",model:"TB3-X70N",type:"tablet"}},{os:{name:"Android",version:"8.0.0"},device:{vendor:"Huawei",model:"EDISON-AL10",type:"mobile"}},{os:{name:"Android",version:"12"},device:{vendor:void 0,model:"PDCM00",type:"mobile"}},{os:{name:"Android",version:"8.0.0"},device:{vendor:"Huawei",model:"KNT-UL10",type:"mobile"}},{os:{name:"Android",version:"12"},device:{vendor:void 0,model:"PDKT00",type:"mobile"}},{os:{name:"Android",version:"6.0.1"},device:{vendor:"OPPO",model:"R9s",type:"mobile"}}],T0=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(f,e);var t,n,r,o,i,a,s,u,c,l=N(f);function f(e){var t;return O(this,f),I(j(t=l.call(this)),"options",void 0),I(j(t),"faceModel",void 0),I(j(t),"alignModel",void 0),I(j(t),"eyesModel",void 0),I(j(t),"pdModel",void 0),I(j(t),"qualityImgs",[]),I(j(t),"finish",!1),I(j(t),"actionIndex",0),I(j(t),"mouthStr",""),I(j(t),"leftEyeStr",""),I(j(t),"rightEyeStr",""),I(j(t),"colorfulStep",-1),I(j(t),"colorRunning",!1),I(j(t),"colorfulInterrupt",!1),I(j(t),"timeoutTimer",-1),I(j(t),"actionTimeoutTimer",-1),I(j(t),"actionFlowTimeoutTimer",-1),I(j(t),"colorfulTimer",-1),I(j(t),"colorfulFlowTimer",-1),I(j(t),"faceLiveDetectionMedia",void 0),I(j(t),"instantiated",!1),I(j(t),"actionType",""),I(j(t),"deferredPromise",void 0),I(j(t),"currentColor",""),I(j(t),"colorfulImages",[]),I(j(t),"colorfulImagesSample",[]),I(j(t),"means",[]),I(j(t),"currentColorfulMap",f.defaultColorMap),I(j(t),"trackingBBox",null),I(j(t),"_throttleFunc",function(e,t,n,r){var o=-1,i=!1,a=0,s=function(){o&&clearTimeout(o)};"boolean"!=typeof t&&(r=n,n=t,t=void 0);var u=function(){for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];var f=Date.now()-a;if(!i){var h=function(){a=Date.now(),n.apply(void 0,c)},d=function(){o=-1};r&&!o&&h(),s(),void 0===r&&f>e?h():!0!==t&&(o=window.setTimeout(r?d:h,void 0===r?e-f:e))}};return u.cancel=function(){s(),i=!0},u}(300,(function(e){t.emit("tip",{code:e,text:TJ[e]})}))),I(j(t),"setOptions",(function(e){t.options=E(E({},t.options),e)})),I(j(t),"loadModels",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.emit("status","loading"),e.next=3,t._loadModels();case 3:return e.next=5,t._preheatModels();case 5:t.emit("status","loading_over");case 6:case"end":return e.stop()}}),e)})))),I(j(t),"start",R(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(WZ.isSupport()){e.next=3;break}return t.emit("fail",["unsupported"]),e.abrupt("return");case 3:if(!t.options.authUrl){e.next=10;break}return e.next=6,t.authVerify();case 6:if(e.sent){e.next=10;break}return t.emit("fail",["auth"]),e.abrupt("return");case 10:if(!t.instantiated){e.next=12;break}return e.abrupt("return");case 12:return t.finish&&(t.finish=!1,t.faceLiveDetectionMedia.cancelFrameDrawing(),t.timeoutTimer=-1,t.actionTimeoutTimer=-1,t.actionFlowTimeoutTimer=-1,t.reset()),e.next=15,t.faceLiveDetectionMedia.createVideoStream().catch((function(e){"NotAllowedError"===e.name?t.emit("fail",["notallowed"]):"NotFoundError"===e.name?t.emit("fail",["notfound"]):"NotReadableError"===e.name?t.emit("fail",["notreadable"]):"OverconstrainedError"===e.name?t.emit("fail",["overconstrained"]):"AbortError"===e.name?t.emit("fail",["abort"]):t.emit("fail",["reject"])}));case 15:if(!t.faceLiveDetectionMedia.hasStream){e.next=29;break}if(t.emit("camera_open"),!t.options.autoloadModels){e.next=29;break}return e.next=20,t.loadModels();case 20:return e.prev=20,e.next=23,null===(n=t.faceLiveDetectionMedia.recorder)||void 0===n?void 0:n.startRecording();case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(20),console.error(e.t0);case 28:t.faceLiveDetectionMedia.frameDrawing();case 29:t.options.solutionType===d$.colorful&&t.setCurrentColorMap(f.defaultColorMap.slice().sort((function(){return Math.random()-.5}))),t.instantiated=!0;case 31:case"end":return e.stop()}}),e,null,[[20,25]])})))),I(j(t),"restart",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.alignModel.preheat();case 2:return e.next=4,t.eyesModel.preheat();case 4:return e.next=6,t.faceModel.preheat();case 6:t.finish&&(t.finish=!1,t.timeoutTimer=-1,t.actionTimeoutTimer=-1,t.actionFlowTimeoutTimer=-1,t.reset(),t.faceLiveDetectionMedia.frameDrawing());case 7:case"end":return e.stop()}}),e)})))),I(j(t),"close",(function(){t.finish=!0,t.faceLiveDetectionMedia.cancelFrameDrawing(),t.faceLiveDetectionMedia.stopVideoStream(),t._clearTimeoutTimer()})),I(j(t),"destroy",R(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.instantiated=!1,t.close(),t.off(),t.faceLiveDetectionMedia.cleanupCanvasMemory(),2===t.options.solutionType||(t.alignModel.destroy(),t.faceModel.destroy(),t.eyesModel.destroy()),!t.options.needToRecord){e.next=8;break}return e.next=8,null===(n=t.faceLiveDetectionMedia.recorder)||void 0===n?void 0:n.destroy();case 8:case"end":return e.stop()}}),e)})))),I(j(t),"stop",(function(){t.finish=!0,t.faceLiveDetectionMedia.cancelFrameDrawing()})),I(j(t),"setMeansSample",R(regeneratorRuntime.mark((function e(){var n,r,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=Math.max(Math.floor(t.colorfulImagesSample.length/60),1),o=[],i=0,a=t.colorfulImagesSample.length;i<a;i+=r)o.push(t.colorfulImagesSample[i]);(n=t.means).push.apply(n,U(o.map((function(e){return t.pdModel.getMean(e).reverse()})))),o=[],t.colorfulImagesSample=[];case 6:case"end":return e.stop()}}),e)})))),I(j(t),"getRecordVideo",R(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=new Blob([],{type:"video/mp4"}),f.isNotSupportMediaRecorderInIOS()){e.next=13;break}return e.prev=2,e.next=5,t._stopRecorder();case 5:return e.next=7,t._getRecordVideoBlob();case 7:n=e.sent,e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),console.error(e.t0);case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[2,10]])})))),I(j(t),"compressImage",R(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.qualityImgs.sort((function(e,t){return c$(t)-c$(e)})).map((function(e){return e.src})));case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e)})))),I(j(t),"detectionSuccess",R(regeneratorRuntime.mark((function e(){var n,r,o,i,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=t.options)||void 0===n||!n.useSecure){e.next=3;break}e.next=14;break;case 3:return e.next=5,t.compressImage();case 5:if(r=e.sent,o=[r[0]],i={images:o},!t.options.needToRecord){e.next=13;break}return e.next=11,t.getRecordVideo();case 11:a=e.sent,i.video=a;case 13:t.emit("success",i);case 14:case"end":return e.stop()}}),e)})))),I(j(t),"_loadModels",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([t.faceModel.load(),t.alignModel.load(),t.eyesModel.load()]);case 2:case"end":return e.stop()}}),e)})))),I(j(t),"_preheatModels",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.alignModel.preheat();case 2:return e.next=4,t.eyesModel.preheat();case 4:case"end":return e.stop()}}),e)})))),I(j(t),"_stopRecorder",R(regeneratorRuntime.mark((function e(){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=t.faceLiveDetectionMedia.recorder)||void 0===n?void 0:n.getState();case 2:if("inactive"===(r=e.sent)||"stopped"===r){e.next=6;break}return e.next=6,null===(o=t.faceLiveDetectionMedia.recorder)||void 0===o?void 0:o.stopRecording();case 6:case"end":return e.stop()}}),e)})))),I(j(t),"_getRecordVideoBlob",R(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(n=t.faceLiveDetectionMedia.recorder)||void 0===n?void 0:n.getBlob();case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})))),I(j(t),"_clearTimeoutTimer",(function(){window.clearTimeout(t.timeoutTimer),window.clearTimeout(t.actionTimeoutTimer),window.clearTimeout(t.actionFlowTimeoutTimer),window.clearTimeout(t.colorfulFlowTimer),window.clearTimeout(t.colorfulTimer),t.timeoutTimer=-1,t.actionTimeoutTimer=-1,t.actionFlowTimeoutTimer=-1,t.colorfulFlowTimer=-1,t.colorfulTimer=-1})),t._initOptions(e),t._initModels(),t.faceLiveDetectionMedia=new WZ(t.options),t.on("camera_open",R(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.options.autoloadModels||!t.faceLiveDetectionMedia.hasStream){e.next=10;break}return t.faceLiveDetectionMedia.frameDrawing(),e.prev=2,e.next=5,null===(n=t.faceLiveDetectionMedia.recorder)||void 0===n?void 0:n.startRecording();case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),console.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[2,7]])})))),t.options.useSecure,t.faceLiveDetectionMedia.onFrameDrawingFinished(R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.colorRunning?t.faceLiveDetectionMedia.frameInfoCanvas&&t.colorfulImages.push(t.faceLiveDetectionMedia.frameInfoCanvas):(t.colorfulImages=[],t.colorfulImagesSample=[],t.means=[]),t.deferredPromise?t.deferredPromise.finally((function(){t.deferredPromise=null})):t.deferredPromise=t.run(t.actionType);case 2:case"end":return e.stop()}}),e)})))),t}return F(f,[{key:"colorAverageThreshold",get:function(){return"iOS"===(new vK).getOS().name?.1:.05}},{key:"authVerify",value:(c=R(regeneratorRuntime.mark((function e(){var t,n,r,o,i,a,s,u,c,l,f,h,d,p,v,g,m,y,b;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=BZ(),r=null!==(t=this.options.authUrl)&&void 0!==t?t:"",e.next=4,fetch(r,{method:"POST",body:"check_code=".concat(n),headers:new Headers({"Content-Type":"application/x-www-form-urlencoded"})});case 4:return o=e.sent,e.next=7,o.json();case 7:if(i=e.sent,a=i.result.fuse_data,s=NZ(a),u=s.fix,c=s.s,l=s.t,f=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/.exec(l),h=V(f,7),d=h[1],p=h[2],v=h[3],g=h[4],m=h[5],y=h[6],b=+new Date(+d,+p-1,+v,+g,+m,+y),!(+new Date-b>3e5)&&"xybLoveCharlotte"===u&&c===decodeURIComponent(n)){e.next=15;break}return e.abrupt("return",!1);case 15:return e.abrupt("return",!0);case 16:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"run",value:(u=R(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u,c,l,f,h,d,p,v,g,m,y,b,w,A;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.finish||!this.faceLiveDetectionMedia.frameInfoCanvas){e.next=47;break}if(r=this.faceLiveDetectionMedia.frameInfoCanvas.originCanvas,o=r,i="",a=null,"function"!=typeof window.createImageBitmap){e.next=13;break}return e.next=9,createImageBitmap(r);case 9:a=e.sent,this.qualityImgs.length<4&&(i=o.toDataURL(null!==(s=this.options.outputImgType)&&void 0!==s?s:"image/jpeg",.96)),e.next=19;break;case 13:return c={type:null!==(u=this.options.outputImgType)&&void 0!==u?u:"image/jpeg",quality:1},l=this.faceLiveDetectionMedia.grabPicture(c),f=l.originDataURL,e.next=17,DZ(f);case 17:a=e.sent,this.qualityImgs.length<4&&(i=f);case 19:return e.next=21,this.faceTrack(a);case 21:return h=e.sent,d=this.actionIndex,p=this.options.code,v=PJ[null!==(n=null==p?void 0:p[d])&&void 0!==n?n:"0"],e.next=27,this.faceQuality(E(E({},h),{},{img:a}),null!=t?t:"",v);case 27:if(g=e.sent,m=g.angles,y=g.pts,"action"!==t){e.next=35;break}return e.next=33,this.actionCheck(y);case 33:e.next=47;break;case 35:if("colorful"!==t){e.next=38;break}e.next=47;break;case 38:if("colorfulInterrupt"!==t){e.next=43;break}this.colorfulReset(),this.colorfulInterrupt=!1,e.next=47;break;case 43:return e.next=45,LZ(100);case 45:this.qualityImgs.push({angles:m,src:i}),this.setTip("ok");case 47:e.next=52;break;case 49:e.prev=49,e.t0=e.catch(0),this.finish||this.qualityError(e.t0,t);case 52:if(e.prev=52,b=this.options,w=b.solutionType,A=b.code,this.finish){e.next=75;break}if(!(this.qualityImgs.length<4)){e.next=59;break}this.actionType="",e.next=75;break;case 59:if(w!==d$.silence){e.next=64;break}return e.next=62,this.silenceFinish();case 62:e.next=75;break;case 64:if(w!==d$.action){e.next=74;break}if(!(this.actionIndex<A.length)){e.next=70;break}return e.next=68,this.run("action");case 68:e.next=72;break;case 70:return e.next=72,this.actionFinish();case 72:e.next=75;break;case 74:w===d$.colorful&&(this.actionIndex<A.length?this.actionType="action":this.colorfulInterrupt?(this.emit("detection:actionfinished"),this.actionType="colorfulInterrupt"):(this.emit("detection:actionfinished"),this.colorRunning||(this.checkActionTimeout(!0),this.checkActionFlowTimeout(!0),this.startColorful()),this.actionType="colorful"));case 75:return e.finish(52);case 76:case"end":return e.stop()}}),e,this,[[0,49,52,76]])}))),function(e){return u.apply(this,arguments)})},{key:"checkActionTimeout",value:function(e){var t=this;e?(clearTimeout(this.actionTimeoutTimer),this.actionTimeoutTimer=-1):-1===this.actionTimeoutTimer&&(this.actionTimeoutTimer=window.setTimeout((function(){t.emit("fail",["action_timeout"])}),this.options.actionTimeout))}},{key:"checkActionFlowTimeout",value:function(e){var t=this;e?(clearTimeout(this.actionFlowTimeoutTimer),this.actionFlowTimeoutTimer=-1):-1===this.actionFlowTimeoutTimer&&(this.actionFlowTimeoutTimer=window.setTimeout(R(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.finish=!0,e.next=3,t.compressImage();case 3:return n=e.sent,e.next=6,t.getRecordVideo();case 6:r=e.sent,t.emit("fail",["timeout",n,r]);case 8:case"end":return e.stop()}}),e)}))),this.options.timeout))}},{key:"checkTimeout",value:function(e){var t=this;e?(clearTimeout(this.timeoutTimer),this.timeoutTimer=-1):-1===this.timeoutTimer&&(this.timeoutTimer=window.setTimeout(R(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.finish=!0,e.next=3,t.compressImage();case 3:return n=e.sent,e.next=6,t.getRecordVideo();case 6:r=e.sent,t.emit("fail",["timeout",n,r]);case 8:case"end":return e.stop()}}),e)}))),this.options.timeout))}},{key:"faceTrack",value:(s=R(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.faceModel.run(t);case 2:if(n=e.sent,r=n.count,o=n.probability,i=n.bbox,a=n.brightness,s=o>=.3,this.checkTimeout(s),s){e.next=11;break}return e.abrupt("return",Promise.reject(new Error("empty")));case 11:if(!(r>1)){e.next=13;break}return e.abrupt("return",Promise.reject(new Error("multiple")));case 13:return e.abrupt("return",{bbox:i,brightness:a,count:r,probability:o});case 14:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"faceQuality",value:(a=R(regeneratorRuntime.mark((function e(t,n,r){var o,i,a,s,u,c,l,f,h,d,p,v,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.bbox,i=t.brightness,a=t.img,s="action"===n&&"blink"!==r.name&&"mouthopen"!==r.name,!this.trackingBBox){e.next=7;break}if(!a$(o,this.trackingBBox,this.options.trackingThreshold)){e.next=7;break}return this.trackingBBox=null,e.abrupt("return",Promise.reject(new Error("offset")));case 7:if(this.trackingBBox=o,u=o$([a.width,a.height],o,this.options.vbox),c=u.inCover,l=u.ratio,c){e.next=11;break}return e.abrupt("return",Promise.reject(new Error("outside")));case 11:if(!(l>this.options.maxFaceRatio)){e.next=13;break}return e.abrupt("return",Promise.reject(new Error("close")));case 13:if(!(l<this.options.minFaceRatio)){e.next=15;break}return e.abrupt("return",Promise.reject(new Error("far")));case 15:if(!(i>.8)){e.next=17;break}return e.abrupt("return",Promise.reject(new Error("light")));case 17:if(!(i<.3)){e.next=19;break}return e.abrupt("return",Promise.reject(new Error("dark")));case 19:return e.next=21,this.alignModel.run(a,o);case 21:if(f=e.sent,h=f.pts,d=f.occlusion,p=n$(h),!s){e.next=27;break}return e.abrupt("return",{angles:p,pts:h});case 27:if(!(v=this.faceOcclusion(d))){e.next=30;break}return e.abrupt("return",Promise.reject(new Error(v)));case 30:if(g=p.some((function(e){return e>=15||e<=-15})),!g){e.next=33;break}return e.abrupt("return",Promise.reject(new Error("rotate")));case 33:return e.abrupt("return",{angles:p,pts:h});case 34:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return a.apply(this,arguments)})},{key:"faceOcclusion",value:function(e){var t=this.options.occlusion;return e[1]>=t.eye||e[2]>=t.eye?"occlusion_eye":e[3]>=t.nose?"occlusion_nose":e[4]>=t.mouse?"occlusion_mouth":e[5]>=t.chin?"occlusion_chin":e[6]>=t.rightFace?"occlusion_right_face":e[7]>=t.leftFace?"occlusion_left_face":""}},{key:"setTip",value:function(e){this.finish||this._throttleFunc(e)}},{key:"actionPass",value:(i=R(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.options.code,this.actionIndex++,this.emit("detection:progress",this.actionIndex/t.length),this.clearCheckedStatus(),this.emit("action",this.actionIndex,t),this.checkActionTimeout(!0),this.checkTimeout(!0),this.checkActionFlowTimeout(!0),e.next=10,LZ(300);case 10:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"actionCheck",value:(o=R(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u,c,l,f,h,d,p,v,g,m,y,b,w,A,x,T,P,C,_,E,S,k,R,O,M;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.options,o=r.code,i=r.leftYaw,a=r.rightYaw,s=this.actionIndex,u=this.mouthStr,c=PJ[null!==(n=o[s])&&void 0!==n?n:"0"],this.checkActionTimeout(!1),this.checkActionFlowTimeout(!1),"mouthopen"!==c.name){e.next=22;break}if(this.setTip(c.name),l=t$(t),h=u$(f=u+l),d=V(h,2),p=d[0],v=d[1],F=void 0,I=void 0,D=void 0,F=V(n$(t),2),I=F[0],D=F[1],!(I<=-8||I>=12||D<=-15||D>=15)){e.next=14;break}this.mouthStr="",e.next=20;break;case 14:if(!(p>=1&&v>=1)){e.next=19;break}return e.next=17,this.actionPass();case 17:e.next=20;break;case 19:this.mouthStr=f;case 20:e.next=52;break;case 22:if("blink"!==c.name){e.next=47;break}return this.setTip(c.name),g=t$(t),m="".concat(this.mouthStr).concat(g),e.next=28,this.eyesModel.run(t,this.alignModel.imageData);case 28:if(y=e.sent,b=y.leftRes,w=y.rightRes,A=this.getEyeStatus(b),x=this.getEyeStatus(w),T="".concat(this.leftEyeStr).concat(A),P="".concat(this.rightEyeStr).concat(x),C=u$(T),_=V(C,2),E=_[0],S=_[1],k=u$(P),R=V(k,2),O=R[0],M=R[1],!(E>=1&&S>=1&&O>=1&&M>=1)){e.next=42;break}return e.next=40,this.actionPass();case 40:e.next=45;break;case 42:this.leftEyeStr=T,this.rightEyeStr=P,this.mouthStr=m;case 45:e.next=52;break;case 47:if(this.setTip(c.name),!s$(c.name,t,i,a)){e.next=52;break}return e.next=52,this.actionPass();case 52:case"end":return e.stop()}var F,I,D}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getEyeStatus",value:function(e){var t=V(e,2),n=0;return t[0]>t[1]&&(n=1),n}},{key:"clearCheckedStatus",value:function(){this.leftEyeStr="",this.rightEyeStr="",this.mouthStr=""}},{key:"startColorful",value:function(){var e=this;this.colorRunning=!0,this.setTip("color_ready"),this.colorfulTimer=window.setTimeout((function(){0!==e.qualityImgs.length&&e.changeColor()}),1e3)}},{key:"changeColor",value:function(){this.setTip("color_running"),this.setCurrentColor(0)}},{key:"setCurrentColor",value:function(e){var t=this,n=function(){var n=R(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.emit("color",e,t.currentColorfulMap[e]),n.next=3,t.colorfulTimeout(300);case 3:return t.colorfulStep=e,n.next=6,t.colorfulTimeout(700);case 6:if(2!==e){n.next=11;break}return n.next=9,t.colorfulFinish();case 9:n.next=13;break;case 11:t.emit("color",e,AJ(t.currentColorfulMap[e]).alpha(.2)),t.setCurrentColor(e+1);case 13:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();-1!==e&&n().catch((function(e){"qualityError"===e.message&&t.colorfulQualityError()}))}},{key:"colorfulTimeout",value:function(e){var t=this;return new Promise((function(n,r){t.colorfulFlowTimer=window.setTimeout((function(){0===t.qualityImgs.length?r(new Error("")):t.colorfulInterrupt?r(new Error("qualityError")):n()}),e)}))}},{key:"setCurrentColorMap",value:function(e){this.currentColorfulMap=e}},{key:"reset",value:function(){this.actionReset(),this.colorfulReset(),this.qualityImgs=[],this.means=[],this.trackingBBox=null}},{key:"actionReset",value:function(){var e;this.actionIndex=0,this.clearCheckedStatus(),this.emit("action",0,null!==(e=this.options.code)&&void 0!==e?e:"0"),this.emit("detection:progress",0)}},{key:"colorfulReset",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.colorfulStep=-1,this.colorRunning=!1,e&&(this.colorfulInterrupt=!1),window.clearTimeout(this.colorfulTimer),this.colorfulTimer=-1,window.clearTimeout(this.colorfulFlowTimer),this.colorfulFlowTimer=-1,this.emit("color",-1)}},{key:"qualityError",value:function(e,t){this.setTip(e.message),~["empty","multiple","outside","offset"].indexOf(e.message)?("colorful"===t&&(this.colorfulImages=[],this.colorfulImagesSample=[],this.means=[],this.colorfulInterrupt=!0),this.reset()):"colorful"===t&&(this.colorfulImages=[],this.colorfulImagesSample=[],this.means=[],this.colorfulInterrupt=!0)}},{key:"colorfulQualityError",value:function(){this.colorfulReset(!1),this.colorfulInterrupt=!0}},{key:"silenceFinish",value:(r=R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.finish=!0,this.faceLiveDetectionMedia.cancelFrameDrawing(),this.emit("detection:silencefinished"),e.next=5,this.detectionSuccess();case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"actionFinish",value:(n=R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.checkActionTimeout(!0),this.checkActionFlowTimeout(!0),this.emit("detection:actionfinished"),this.setTip("action_over"),e.next=6,this.silenceFinish();case 6:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"colorfulFinish",value:(t=R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.checkActionTimeout(!0),this.checkActionFlowTimeout(!0),this.colorfulReset(),this.setTip("color_detecting"),this.finish=!0,this.faceLiveDetectionMedia.cancelFrameDrawing(),this.alignModel.destroy(),this.faceModel.destroy(),this.eyesModel.destroy(),this.means=[],this.emit("detection:colorfinished"),e.next=13,this.detectionSuccess();case 13:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"_initOptions",value:function(e){var t="string"==typeof e.video?document.getElementById(e.video):e.video,n=void 0!==e.occlusion&&("boolean"==typeof e.occlusion?e.occlusion?g$.occlusion:{eye:1,mouse:1,nose:1,leftFace:1,rightFace:1,chin:1}:E(E({},g$.occlusion),e.occlusion));return this.options=E(E(E({},g$),e),{},{video:t,occlusion:n}),(this.options.solutionType===d$.colorful&&this.options.randomMotionDetection||!this.options.code)&&(this.options.code="".concat(Math.round(Math.random()))),this.options.colorRunAction||(this.options.code=""),this}},{key:"_initModels",value:function(){var e,t=null!==(e=this.options.modelPath)&&void 0!==e?e:"";return this.faceModel=new l$(t),this.alignModel=new f$(t),this.eyesModel=new h$(t),this.pdModel=new v$(t),this}}],[{key:"isSupport",value:function(){return e=(new vK).getResult(),t=e.browser,n=e.os,r=e.device,!(t.name&&A0.includes(t.name)||x0.find((function(e){return e.device.vendor===r.vendor&&e.os.name===n.name&&e.os.version===n.version})))&&WZ.isSupport();var e,t,n,r}},{key:"isExtraNotSupport",value:function(){var e,t,n=new vK,r=n.getUA().toLowerCase(),o="iOS"===n.getOS().name&&"UCBrowser"===n.getBrowser().name,i="iOS"===n.getOS().name&&"Quark"===n.getBrowser().name,a="Android"===n.getOS().name&&!(null===(e=/aweme/i.exec(r))||void 0===e||!e[0]),s="Android"===n.getOS().name&&!(null===(t=/newsarticle|ttwebview/i.exec(r))||void 0===t||!t[0]);return o||i||a||s}},{key:"isNotSupportMediaRecorderInIOS",value:function(){var e=this.UA().getOS();return"iOS"===e.name&&!!e.version&&parseFloat(e.version)<14.5}},{key:"UA",value:function(){return new vK}}]),f}(yK);I(T0,"ACTION_CONFIG",PJ),I(T0,"defaultOptions",E({},g$)),I(T0,"defaultColorMap",["#db357f","#1eb848","#371dc0"]),I(T0,"occlusionThreshold",.8);var P0="undefined"==typeof atob?function(e){return Buffer.from(e,"base64").toString("binary")}:atob,C0="undefined"==typeof btoa?function(e){return Buffer.from(e,"binary").toString("base64")}:btoa;function _0(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.length,r=new Uint8Array(t?4*n:n),o=0,i=0;o<n;o++){var a=e.charCodeAt(o);if(t&&55296<=a&&a<=56319){if(++o>=n)throw new Error("Malformed string, low surrogate expected at position "+o);a=(55296^a)<<10|65536|56320^e.charCodeAt(o)}else if(!t&&a>>>8)throw new Error("Wide characters are not allowed.");!t||a<=127?r[i++]=a:a<=2047?(r[i++]=192|a>>6,r[i++]=128|63&a):a<=65535?(r[i++]=224|a>>12,r[i++]=128|a>>6&63,r[i++]=128|63&a):(r[i++]=240|a>>18,r[i++]=128|a>>12&63,r[i++]=128|a>>6&63,r[i++]=128|63&a)}return r.subarray(0,i)}function E0(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.length,r=new Array(n),o=0,i=0;o<n;o++){var a=e[o];if(!t||a<128)r[i++]=a;else if(a>=192&&a<224&&o+1<n)r[i++]=(31&a)<<6|63&e[++o];else if(a>=224&&a<240&&o+2<n)r[i++]=(15&a)<<12|(63&e[++o])<<6|63&e[++o];else{if(!(a>=240&&a<248&&o+3<n))throw new Error("Malformed UTF8 character at byte offset "+o);var s=(7&a)<<18|(63&e[++o])<<12|(63&e[++o])<<6|63&e[++o];s<=65535?r[i++]=s:(s^=65536,r[i++]=55296|s>>10,r[i++]=56320|1023&s)}}var u="",c=16384;for(o=0;o<i;o+=c)u+=String.fromCharCode.apply(String,r.slice(o,o+c<=i?o+c:i));return u}function S0(e){return e instanceof Uint8Array}function k0(e,t){var n=e?e.byteLength:t||65536;if(4095&n||n<=0)throw new Error("heap size must be a positive integer and a multiple of 4096");return e=e||new Uint8Array(new ArrayBuffer(n))}function R0(e,t,n,r,o){var i=e.length-t,a=i<o?i:o;return e.set(n.subarray(r,r+a),t),a}var O0,M0,F0=function(e){c(n,e);var t=y(n);function n(){i(this,n);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.call.apply(t,[this].concat(r))}return s(n)}(p(Error)),I0=function(e){c(n,e);var t=y(n);function n(){i(this,n);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.call.apply(t,[this].concat(r))}return s(n)}(p(Error)),D0=function(e){c(n,e);var t=y(n);function n(){i(this,n);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.call.apply(t,[this].concat(r))}return s(n)}(p(Error)),L0=function(){var e,t,n=!1;function r(n,r){var o=e[(t[n]+t[r])%255];return 0!==n&&0!==r||(o=0),o}var o,i,a,s,u=!1;function c(){function c(n){var r,o,i;for(o=i=function(n){var r=e[255-t[n]];return 0===n&&(r=0),r}(n),r=0;r<4;r++)i^=o=255&(o<<1|o>>>7);return i^=99}n||function(){e=[],t=[];var r,o,i=1;for(r=0;r<255;r++)e[r]=i,o=128&i,i<<=1,i&=255,128===o&&(i^=27),i^=e[r],t[e[r]]=r;e[255]=e[0],t[0]=0,n=!0}(),o=[],i=[],a=[[],[],[],[]],s=[[],[],[],[]];for(var l=0;l<256;l++){var f=c(l);o[l]=f,i[f]=l,a[0][l]=r(2,f)<<24|f<<16|f<<8|r(3,f),s[0][f]=r(14,l)<<24|r(9,l)<<16|r(13,l)<<8|r(11,l);for(var h=1;h<4;h++)a[h][l]=a[h-1][l]>>>8|a[h-1][l]<<24,s[h][f]=s[h-1][f]>>>8|s[h-1][f]<<24}u=!0}var l=function(e,t){u||c();var n=new Uint32Array(t);n.set(o,512),n.set(i,768);for(var r=0;r<4;r++)n.set(a[r],4096+1024*r>>2),n.set(s[r],8192+1024*r>>2);var l=function(e,t,n){"use asm";var r=0,o=0,i=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,v=0,g=0,m=0,y=0,b=0,w=0,A=0,x=0,T=0;var P=new e.Uint32Array(n),C=new e.Uint8Array(n);function _(e,t,n,s,u,c,l,f){e=e|0;t=t|0;n=n|0;s=s|0;u=u|0;c=c|0;l=l|0;f=f|0;var h=0,d=0,p=0,v=0,g=0,m=0,y=0,b=0;h=n|0x400,d=n|0x800,p=n|0xc00;u=u^P[(e|0)>>2],c=c^P[(e|4)>>2],l=l^P[(e|8)>>2],f=f^P[(e|12)>>2];for(b=16;(b|0)<=s<<4;b=b+16|0){v=P[(n|u>>22&1020)>>2]^P[(h|c>>14&1020)>>2]^P[(d|l>>6&1020)>>2]^P[(p|f<<2&1020)>>2]^P[(e|b|0)>>2],g=P[(n|c>>22&1020)>>2]^P[(h|l>>14&1020)>>2]^P[(d|f>>6&1020)>>2]^P[(p|u<<2&1020)>>2]^P[(e|b|4)>>2],m=P[(n|l>>22&1020)>>2]^P[(h|f>>14&1020)>>2]^P[(d|u>>6&1020)>>2]^P[(p|c<<2&1020)>>2]^P[(e|b|8)>>2],y=P[(n|f>>22&1020)>>2]^P[(h|u>>14&1020)>>2]^P[(d|c>>6&1020)>>2]^P[(p|l<<2&1020)>>2]^P[(e|b|12)>>2];u=v,c=g,l=m,f=y}r=P[(t|u>>22&1020)>>2]<<24^P[(t|c>>14&1020)>>2]<<16^P[(t|l>>6&1020)>>2]<<8^P[(t|f<<2&1020)>>2]^P[(e|b|0)>>2],o=P[(t|c>>22&1020)>>2]<<24^P[(t|l>>14&1020)>>2]<<16^P[(t|f>>6&1020)>>2]<<8^P[(t|u<<2&1020)>>2]^P[(e|b|4)>>2],i=P[(t|l>>22&1020)>>2]<<24^P[(t|f>>14&1020)>>2]<<16^P[(t|u>>6&1020)>>2]<<8^P[(t|c<<2&1020)>>2]^P[(e|b|8)>>2],a=P[(t|f>>22&1020)>>2]<<24^P[(t|u>>14&1020)>>2]<<16^P[(t|c>>6&1020)>>2]<<8^P[(t|l<<2&1020)>>2]^P[(e|b|12)>>2]}function E(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;_(0x0000,0x0800,0x1000,T,e,t,n,r)}function S(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;var i=0;_(0x0400,0x0c00,0x2000,T,e,r,n,t);i=o,o=a,a=i}function k(e,t,n,s){e=e|0;t=t|0;n=n|0;s=s|0;_(0x0000,0x0800,0x1000,T,f,h,d,p);p=~y&p|y&p+1;d=~m&d|m&d+((p|0)==0);h=~g&h|g&h+((d|0)==0);f=~v&f|v&f+((h|0)==0);r=r^e;o=o^t;i=i^n;a=a^s}function R(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;var o=0,i=0,a=0,f=0,h=0,d=0,p=0,v=0,g=0,m=0;e=e^s,t=t^u,n=n^c,r=r^l;o=b|0,i=w|0,a=A|0,f=x|0;for(;(g|0)<128;g=g+1|0){if(o>>>31){h=h^e,d=d^t,p=p^n,v=v^r}o=o<<1|i>>>31,i=i<<1|a>>>31,a=a<<1|f>>>31,f=f<<1;m=r&1;r=r>>>1|n<<31,n=n>>>1|t<<31,t=t>>>1|e<<31,e=e>>>1;if(m)e=e^0xe1000000}s=h,u=d,c=p,l=v}function O(e){e=e|0;T=e}function M(e,t,n,s){e=e|0;t=t|0;n=n|0;s=s|0;r=e,o=t,i=n,a=s}function F(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;s=e,u=t,c=n,l=r}function I(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;f=e,h=t,d=n,p=r}function D(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;v=e,g=t,m=n,y=r}function L(e,t,n,r){e=e|0;t=t|0;n=n|0;r=r|0;p=~y&p|y&r,d=~m&d|m&n,h=~g&h|g&t,f=~v&f|v&e}function j(e){e=e|0;if(e&15)return-1;C[e|0]=r>>>24,C[e|1]=r>>>16&255,C[e|2]=r>>>8&255,C[e|3]=r&255,C[e|4]=o>>>24,C[e|5]=o>>>16&255,C[e|6]=o>>>8&255,C[e|7]=o&255,C[e|8]=i>>>24,C[e|9]=i>>>16&255,C[e|10]=i>>>8&255,C[e|11]=i&255,C[e|12]=a>>>24,C[e|13]=a>>>16&255,C[e|14]=a>>>8&255,C[e|15]=a&255;return 16}function B(e){e=e|0;if(e&15)return-1;C[e|0]=s>>>24,C[e|1]=s>>>16&255,C[e|2]=s>>>8&255,C[e|3]=s&255,C[e|4]=u>>>24,C[e|5]=u>>>16&255,C[e|6]=u>>>8&255,C[e|7]=u&255,C[e|8]=c>>>24,C[e|9]=c>>>16&255,C[e|10]=c>>>8&255,C[e|11]=c&255,C[e|12]=l>>>24,C[e|13]=l>>>16&255,C[e|14]=l>>>8&255,C[e|15]=l&255;return 16}function N(){E(0,0,0,0);b=r,w=o,A=i,x=a}function V(e,t,n){e=e|0;t=t|0;n=n|0;var s=0;if(t&15)return-1;while((n|0)>=16){W[e&7](C[t|0]<<24|C[t|1]<<16|C[t|2]<<8|C[t|3],C[t|4]<<24|C[t|5]<<16|C[t|6]<<8|C[t|7],C[t|8]<<24|C[t|9]<<16|C[t|10]<<8|C[t|11],C[t|12]<<24|C[t|13]<<16|C[t|14]<<8|C[t|15]);C[t|0]=r>>>24,C[t|1]=r>>>16&255,C[t|2]=r>>>8&255,C[t|3]=r&255,C[t|4]=o>>>24,C[t|5]=o>>>16&255,C[t|6]=o>>>8&255,C[t|7]=o&255,C[t|8]=i>>>24,C[t|9]=i>>>16&255,C[t|10]=i>>>8&255,C[t|11]=i&255,C[t|12]=a>>>24,C[t|13]=a>>>16&255,C[t|14]=a>>>8&255,C[t|15]=a&255;s=s+16|0,t=t+16|0,n=n-16|0}return s|0}function U(e,t,n){e=e|0;t=t|0;n=n|0;var r=0;if(t&15)return-1;while((n|0)>=16){z[e&1](C[t|0]<<24|C[t|1]<<16|C[t|2]<<8|C[t|3],C[t|4]<<24|C[t|5]<<16|C[t|6]<<8|C[t|7],C[t|8]<<24|C[t|9]<<16|C[t|10]<<8|C[t|11],C[t|12]<<24|C[t|13]<<16|C[t|14]<<8|C[t|15]);r=r+16|0,t=t+16|0,n=n-16|0}return r|0}var W=[E,S,undefined,undefined,undefined,undefined,undefined,k];var z=[undefined,R];return{set_rounds:O,set_state:M,set_iv:F,set_nonce:I,set_mask:D,set_counter:L,get_state:j,get_iv:B,gcm_init:N,cipher:V,mac:U}}({Uint8Array:Uint8Array,Uint32Array:Uint32Array},e,t);return l.set_key=function(e,t,r,i,a,u,c,f,h){var d=n.subarray(0,60),p=n.subarray(256,316);d.set([t,r,i,a,u,c,f,h]);for(var v=e,g=1;v<4*e+28;v++){var m=d[v-1];(v%e==0||8===e&&v%e==4)&&(m=o[m>>>24]<<24^o[m>>>16&255]<<16^o[m>>>8&255]<<8^o[255&m]),v%e==0&&(m=m<<8^m>>>24^g<<24,g=g<<1^(128&g?27:0)),d[v]=d[v-e]^m}for(var y=0;y<v;y+=4)for(var b=0;b<4;b++){m=d[v-(4+y)+(4-b)%4];p[y+b]=y<4||y>=v-4?m:s[0][o[m>>>24]]^s[1][o[m>>>16&255]]^s[2][o[m>>>8&255]]^s[3][o[255&m]]}l.set_rounds(e+5)},l};return l.ENC={ECB:0,CBC:2,CFB:4,OFB:6,CTR:7},l.DEC={ECB:1,CBC:3,CFB:5,OFB:6,CTR:7},l.MAC={CBC:0,GCM:1},l.HEAP_DATA=16384,l}(),j0=function(){function e(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;i(this,e),this.pos=0,this.len=0,this.mode=o,this.heap=a||k0().subarray(L0.HEAP_DATA),this.asm=s||new L0(null,this.heap.buffer),this.pos=0,this.len=0;var u=t.length;if(16!==u&&24!==u&&32!==u)throw new I0("illegal key size");var c=new DataView(t.buffer,t.byteOffset,t.byteLength);if(this.asm.set_key(u>>2,c.getUint32(0),c.getUint32(4),c.getUint32(8),c.getUint32(12),u>16?c.getUint32(16):0,u>16?c.getUint32(20):0,u>24?c.getUint32(24):0,u>24?c.getUint32(28):0),void 0!==n){if(16!==n.length)throw new I0("illegal iv size");var l=new DataView(n.buffer,n.byteOffset,n.byteLength);this.asm.set_iv(l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12))}else this.asm.set_iv(0,0,0,0);this.padding=r}return s(e,[{key:"AES_Encrypt_process",value:function(e){if(!S0(e))throw new TypeError("data isn't of expected type");for(var t=this.asm,n=this.heap,r=L0.ENC[this.mode],o=L0.HEAP_DATA,i=this.pos,a=this.len,s=0,u=e.length||0,c=0,l=0,f=new Uint8Array(a+u&-16);u>0;)a+=l=R0(n,i+a,e,s,u),s+=l,u-=l,(l=t.cipher(r,o+i,a))&&f.set(n.subarray(i,i+l),c),c+=l,l<a?(i+=l,a-=l):(i=0,a=0);return this.pos=i,this.len=a,f}},{key:"AES_Encrypt_finish",value:function(){var e=this.asm,t=this.heap,n=L0.ENC[this.mode],r=L0.HEAP_DATA,o=this.pos,i=this.len,a=16-i%16,s=i;if(this.hasOwnProperty("padding")){if(this.padding){for(var u=0;u<a;++u)t[o+i+u]=a;s=i+=a}else if(i%16)throw new I0("data length must be a multiple of the block size")}else i+=a;var c=new Uint8Array(s);return i&&e.cipher(n,r+o,i),s&&c.set(t.subarray(o,o+s)),this.pos=0,this.len=0,c}},{key:"AES_Decrypt_process",value:function(e){if(!S0(e))throw new TypeError("data isn't of expected type");var t=this.asm,n=this.heap,r=L0.DEC[this.mode],o=L0.HEAP_DATA,i=this.pos,a=this.len,s=0,u=e.length||0,c=0,l=a+u&-16,f=0,h=0;this.padding&&(l-=f=a+u-l||16);for(var d=new Uint8Array(l);u>0;)a+=h=R0(n,i+a,e,s,u),s+=h,u-=h,(h=t.cipher(r,o+i,a-(u?0:f)))&&d.set(n.subarray(i,i+h),c),c+=h,h<a?(i+=h,a-=h):(i=0,a=0);return this.pos=i,this.len=a,d}},{key:"AES_Decrypt_finish",value:function(){var e=this.asm,t=this.heap,n=L0.DEC[this.mode],r=L0.HEAP_DATA,o=this.pos,i=this.len,a=i;if(i>0){if(i%16){if(this.hasOwnProperty("padding"))throw new I0("data length must be a multiple of the block size");i+=16-i%16}if(e.cipher(n,r+o,i),this.hasOwnProperty("padding")&&this.padding){var s=t[o+a-1];if(s<1||s>16||s>a)throw new D0("bad padding");for(var u=0,c=s;c>1;c--)u|=s^t[o+a-c];if(u)throw new D0("bad padding");a-=s}}var l=new Uint8Array(a);return a>0&&l.set(t.subarray(o,o+a)),this.pos=0,this.len=0,l}}]),e}(),B0=68719476704,N0=function(){function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:16,a=arguments.length>4?arguments[4]:void 0;if(i(this,e),this.tagSize=o,this.gamma0=0,this.counter=1,this.aes=a||new j0(t,void 0,!1,"CTR"),this.aes.asm.gcm_init(),this.tagSize<4||this.tagSize>16)throw new I0("illegal tagSize value");var s=n.length||0,u=new Uint8Array(16);12!==s?(this._gcm_mac_process(n),this.aes.heap[0]=0,this.aes.heap[1]=0,this.aes.heap[2]=0,this.aes.heap[3]=0,this.aes.heap[4]=0,this.aes.heap[5]=0,this.aes.heap[6]=0,this.aes.heap[7]=0,this.aes.heap[8]=0,this.aes.heap[9]=0,this.aes.heap[10]=0,this.aes.heap[11]=s>>>29,this.aes.heap[12]=s>>>21&255,this.aes.heap[13]=s>>>13&255,this.aes.heap[14]=s>>>5&255,this.aes.heap[15]=s<<3&255,this.aes.asm.mac(L0.MAC.GCM,L0.HEAP_DATA,16),this.aes.asm.get_iv(L0.HEAP_DATA),this.aes.asm.set_iv(0,0,0,0),u.set(this.aes.heap.subarray(0,16))):(u.set(n),u[15]=1);var c=new DataView(u.buffer);if(this.gamma0=c.getUint32(12),this.aes.asm.set_nonce(c.getUint32(0),c.getUint32(4),c.getUint32(8),0),this.aes.asm.set_mask(0,0,0,4294967295),void 0!==r){if(r.length>B0)throw new I0("illegal adata length");r.length?(this.adata=r,this._gcm_mac_process(r)):this.adata=void 0}else this.adata=void 0;if(this.counter<1||this.counter>4294967295)throw new RangeError("counter must be a positive 32-bit integer");this.aes.asm.set_counter(0,0,0,this.gamma0+this.counter|0)}return s(e,[{key:"encrypt",value:function(e){return this.AES_GCM_encrypt(e)}},{key:"decrypt",value:function(e){return this.AES_GCM_decrypt(e)}},{key:"AES_GCM_Encrypt_process",value:function(e){var t=0,n=e.length||0,r=this.aes.asm,o=this.aes.heap,i=this.counter,a=this.aes.pos,s=this.aes.len,u=0,c=s+n&-16,l=0;if((i-1<<4)+s+n>B0)throw new RangeError("counter overflow");for(var f=new Uint8Array(c);n>0;)s+=l=R0(o,a+s,e,t,n),t+=l,n-=l,l=r.cipher(L0.ENC.CTR,L0.HEAP_DATA+a,s),(l=r.mac(L0.MAC.GCM,L0.HEAP_DATA+a,l))&&f.set(o.subarray(a,a+l),u),i+=l>>>4,u+=l,l<s?(a+=l,s-=l):(a=0,s=0);return this.counter=i,this.aes.pos=a,this.aes.len=s,f}},{key:"AES_GCM_Encrypt_finish",value:function(){var e=this.aes.asm,t=this.aes.heap,n=this.counter,r=this.tagSize,o=this.adata,i=this.aes.pos,a=this.aes.len,s=new Uint8Array(a+r);e.cipher(L0.ENC.CTR,L0.HEAP_DATA+i,a+15&-16),a&&s.set(t.subarray(i,i+a));for(var u=a;15&u;u++)t[i+u]=0;e.mac(L0.MAC.GCM,L0.HEAP_DATA+i,u);var c=void 0!==o?o.length:0,l=(n-1<<4)+a;return t[0]=0,t[1]=0,t[2]=0,t[3]=c>>>29,t[4]=c>>>21,t[5]=c>>>13&255,t[6]=c>>>5&255,t[7]=c<<3&255,t[8]=t[9]=t[10]=0,t[11]=l>>>29,t[12]=l>>>21&255,t[13]=l>>>13&255,t[14]=l>>>5&255,t[15]=l<<3&255,e.mac(L0.MAC.GCM,L0.HEAP_DATA,16),e.get_iv(L0.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(L0.ENC.CTR,L0.HEAP_DATA,16),s.set(t.subarray(0,r),a),this.counter=1,this.aes.pos=0,this.aes.len=0,s}},{key:"AES_GCM_Decrypt_process",value:function(e){var t=0,n=e.length||0,r=this.aes.asm,o=this.aes.heap,i=this.counter,a=this.tagSize,s=this.aes.pos,u=this.aes.len,c=0,l=u+n>a?u+n-a&-16:0,f=u+n-l,h=0;if((i-1<<4)+u+n>B0)throw new RangeError("counter overflow");for(var d=new Uint8Array(l);n>f;)u+=h=R0(o,s+u,e,t,n-f),t+=h,n-=h,h=r.mac(L0.MAC.GCM,L0.HEAP_DATA+s,h),(h=r.cipher(L0.DEC.CTR,L0.HEAP_DATA+s,h))&&d.set(o.subarray(s,s+h),c),i+=h>>>4,c+=h,s=0,u=0;return n>0&&(u+=R0(o,0,e,t,n)),this.counter=i,this.aes.pos=s,this.aes.len=u,d}},{key:"AES_GCM_Decrypt_finish",value:function(){var e=this.aes.asm,t=this.aes.heap,n=this.tagSize,r=this.adata,o=this.counter,i=this.aes.pos,a=this.aes.len,s=a-n;if(a<n)throw new F0("authentication tag not found");for(var u=new Uint8Array(s),c=new Uint8Array(t.subarray(i+s,i+a)),l=s;15&l;l++)t[i+l]=0;e.mac(L0.MAC.GCM,L0.HEAP_DATA+i,l),e.cipher(L0.DEC.CTR,L0.HEAP_DATA+i,l),s&&u.set(t.subarray(i,i+s));var f=void 0!==r?r.length:0,h=(o-1<<4)+a-n;t[0]=0,t[1]=0,t[2]=0,t[3]=f>>>29,t[4]=f>>>21,t[5]=f>>>13&255,t[6]=f>>>5&255,t[7]=f<<3&255,t[8]=t[9]=t[10]=0,t[11]=h>>>29,t[12]=h>>>21&255,t[13]=h>>>13&255,t[14]=h>>>5&255,t[15]=h<<3&255,e.mac(L0.MAC.GCM,L0.HEAP_DATA,16),e.get_iv(L0.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(L0.ENC.CTR,L0.HEAP_DATA,16);for(var d=0,p=0;p<n;++p)d|=c[p]^t[p];if(d)throw new D0("data integrity check failed");return this.counter=1,this.aes.pos=0,this.aes.len=0,u}},{key:"AES_GCM_decrypt",value:function(e){var t=this.AES_GCM_Decrypt_process(e),n=this.AES_GCM_Decrypt_finish(),r=new Uint8Array(t.length+n.length);return t.length&&r.set(t),n.length&&r.set(n,t.length),r}},{key:"AES_GCM_encrypt",value:function(e){var t=this.AES_GCM_Encrypt_process(e),n=this.AES_GCM_Encrypt_finish(),r=new Uint8Array(t.length+n.length);return t.length&&r.set(t),n.length&&r.set(n,t.length),r}},{key:"_gcm_mac_process",value:function(e){for(var t=this.aes.heap,n=this.aes.asm,r=0,o=e.length||0,i=0;o>0;){for(r+=i=R0(t,0,e,r,o),o-=i;15&i;)t[i++]=0;n.mac(L0.MAC.GCM,L0.HEAP_DATA,i)}}}],[{key:"encrypt",value:function(t,n,r,o,i){return new e(n,r,o,i).encrypt(t)}},{key:"decrypt",value:function(t,n,r,o,i){return new e(n,r,o,i).decrypt(t)}}]),e}(),V0=function(e,t){var n,r,o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[];if(t=t||o.length,e)for(n=0;n<e;n++)i[n]=o[0|Math.random()*t];else for(i[8]=i[13]=i[18]=i[23]="-",i[14]="4",n=0;n<36;n++)i[n]||(r=0|16*Math.random(),i[n]=o[19===n?3&r|8:r]);return i.join("")},U0=function(e){"object"===n(e)&&(e=JSON.stringify(e));var t="".concat(V0(3),":").concat(V0(3),":").concat(V0(3),":").concat(V0(4)),r=V0(12),o=N0.encrypt(_0(e),_0(t),_0(r));return{key:t,iv:r,eyptStr:C0(E0(o))}},W0=function(e,t,n){var r=N0.decrypt(function(e){return _0(P0(e))}(e),_0(t),_0(n));return E0(r)},z0=function(){function e(){i(this,e),u(this,"data",Object.create(null)),u(this,"currentLang","zh-CN")}return s(e,[{key:"trans",value:function(e,t){var n;return(null===(n=this.data[null!=t?t:this.currentLang])||void 0===n?void 0:n[e])||e}},{key:"add",value:function(e,n){this.data[e]=t(t({},this.data[e]),n)}},{key:"setCurrentLang",value:function(e){this.currentLang=e}}]),e}(),H0=new z0;H0.setCurrentLang("zh-CN");var G0="Loading...",X0="FaceTheScreen",Q0="DetectionCompleted",Y0="WellLit",q0="FacePhone",K0="DoNotCoverFace",J0="XhrError",Z0="CheckError",$0="CheckNetFail",e1="Rejected",t1="Auth",n1="Unsupported",r1="NotAllowed",o1="NotFound",i1="NotReadable",a1="OverConstrained",s1="Abort",u1="PdFail",c1="GetConfNetFail",l1="GetConfFail",f1="TipEmpty",h1="TipMultiple",d1="TipOutside",p1="TipClose",v1="TipFar",g1="TipLight",m1="TipDark",y1="TipRotate",b1="TipBlink",w1="TipMouthopen",A1="TipHeadRight",x1="TipHeadLeft",T1="TipLookup",P1="TipLookdown",C1="TipActionOver",_1="TipColorReady",E1="TipColorRunning",S1="TipOK",k1="TipTimeout",R1="FailTipUnsupported",O1="FailTipNotAllowed",M1="FailTipNotFound",F1="FailTipNotReadable",I1="FailTipOverConstrained",D1="FailTipAbort",L1="FailTipPDFail",j1="FailTipTimeout",B1="FailTipReject",N1="FailTipAuth",V1="VideoActionOpenMouth",U1="VideoActionWink",W1="VideoTipTesting",z1="VideoTipDuration",H1="VideoTipCameraFail",G1="VideoTipSelfRecord",X1="VideoTipBrightenEnv",Q1="VideoTipBlink35",Y1="VideoTipOpenMouth35",q1="VideoTipVideoLen35",K1="VideoStartRecord",J1="VideoTipVideoTooLarge",Z1="VideoTipVideoUseless";H0.add("zh-CN",(u(O0={},G0,"准备中..."),u(O0,X0,"请正对屏幕"),u(O0,Q0,"检测完成"),u(O0,Y0,"光线充足"),u(O0,q0,"正对手机"),u(O0,K0,"脸无遮挡"),u(O0,J0,"网络请求错误"),u(O0,Z0,"校验不通过"),u(O0,$0,"校验接口网络错误"),u(O0,e1,"浏览器没有摄像头权限或⽤户拒绝授权"),u(O0,t1,"鉴权不通过"),u(O0,n1,"浏览器不支持"),u(O0,r1,"用户拒绝了相机权限"),u(O0,o1,"找不到摄像头"),u(O0,i1,"异常硬件导致无法读取摄像头"),u(O0,a1,"摄像头分辨率过低"),u(O0,s1,"未知问题导致摄像头无法被使用"),u(O0,u1,"炫瞳检测失败"),u(O0,c1,"获取配置接口网络错误"),u(O0,l1,"获取配置失败,请检查接入配置是否正确"),u(O0,f1,"未检测到⼈脸"),u(O0,h1,"请保持单⼈⼊镜"),u(O0,d1,"请将⼈脸移⼊框内"),u(O0,p1,"请远离屏幕"),u(O0,v1,"请靠近屏幕"),u(O0,g1,"请调暗环境光线"),u(O0,m1,"请调亮环境光线"),u(O0,y1,"请保持正脸"),u(O0,b1,"眨眨眼"),u(O0,w1,"张张嘴"),u(O0,A1,"向右转头"),u(O0,x1,"向左转头"),u(O0,T1,"向上抬头"),u(O0,P1,"向下低头"),u(O0,C1,"动作核验完成"),u(O0,_1,"屏幕即将闪烁,请保持正脸"),u(O0,E1,"变光中,请保持正脸"),u(O0,S1,"请保持不动"),u(O0,k1,"采集超时"),u(O0,R1,"该浏览器不支持"),u(O0,O1,"请开启相机权限"),u(O0,M1,"找不到摄像头"),u(O0,F1,"异常硬件导致无法读取摄像头"),u(O0,I1,"摄像头分辨率过低"),u(O0,D1,"未知错误导致无法读取摄像头"),u(O0,L1,"炫瞳检测失败"),u(O0,j1,"检测超时"),u(O0,B1,"获取相机权限失败"),u(O0,N1,"认证不通过"),u(O0,V1,"张嘴"),u(O0,U1,"眨眼"),u(O0,W1,"检测中,请耐心等待"),u(O0,z1,"视频长度和手机的网络速度会影响视频式活体的检测时间,如果视频中面部不完整可能会检测失败"),u(O0,H1,"打开摄像头失败"),u(O0,G1,"请自行录制一段视频进行验证"),u(O0,X1,"请在明亮环境下录制 3~5 秒"),u(O0,Q1,"请在录制过程中眨眼 3~5 次"),u(O0,Y1,"请在录制过程中张嘴 3~5 次"),u(O0,q1,"请保持完整面部轮廓在视频中"),u(O0,K1,"开始录制"),u(O0,J1,"当前视频大于 15M,请重新上传"),u(O0,Z1,"未采集到有效视频,请重新上传"),O0)),H0.add("en-US",(u(M0={},G0,"Loading"),u(M0,X0,"Face the screen"),u(M0,Q0,"Detection completed"),u(M0,Y0,"Keep well lit"),u(M0,q0,"Facing the phone"),u(M0,K0,"Do not cover the face"),u(M0,J0,"Network request error"),u(M0,Z0,"Verification failed"),u(M0,$0,"check interface network error"),u(M0,e1,"The browser does not have the camera permission or the user refuses to authorize"),u(M0,t1,"Authentication failed"),u(M0,n1,"Browser does not support"),u(M0,r1,"User denied camera permission"),u(M0,o1,"Camera not found"),u(M0,i1,"Abnormal hardware makes it impossible to read the camera"),u(M0,a1,"Camera resolution is too low"),u(M0,s1,"An unknown problem prevents the camera from being used"),u(M0,u1,"Dazzling detection failed"),u(M0,c1,"Get config interface network error"),u(M0,l1,"Failed to obtain the configuration, please check whether the access configuration is correct"),u(M0,f1,"No face detected"),u(M0,h1,"Stay single"),u(M0,d1,"Move the face into the frame"),u(M0,p1,"Stay away from the screen"),u(M0,v1,"Move closer to the screen"),u(M0,g1,"Dim the ambient light"),u(M0,m1,"Brighten the ambient light"),u(M0,y1,"Keep a straight face"),u(M0,b1,"Wink"),u(M0,w1,"Open mouth"),u(M0,A1,"Turn head right"),u(M0,x1,"Turn head left"),u(M0,T1,"Look up"),u(M0,P1,"Look down"),u(M0,C1,"Action verification completed"),u(M0,_1,"The screen is about to flash, please keep facing the screen"),u(M0,E1,"During dimming, please keep facing the screen"),u(M0,S1,"Please stay still"),u(M0,k1,"Collection timeout"),u(M0,R1,"This browser does not support"),u(M0,O1,"Please enable camera permission"),u(M0,M1,"Camera not found"),u(M0,F1,"Can not read the camera"),u(M0,I1,"Camera resolution is too low"),u(M0,D1,"An unknown error prevented the camera from being read"),u(M0,L1,"Dazzling detection failed"),u(M0,j1,"Detection timeout"),u(M0,B1,"Failed to get camera permission"),u(M0,N1,"Authentication failed"),u(M0,V1,"open mouth"),u(M0,U1,"wink"),u(M0,W1,"Testing, please wait"),u(M0,z1,"The length of the video and the network speed of the mobile phone will affect the detection time of video-based liveness, If the face in the video is incomplete, the detection may fail"),u(M0,H1,"Failed to open camera"),u(M0,G1,"Please record a video yourself to verify"),u(M0,X1,"Please record for 3-5 seconds in a bright environment"),u(M0,Q1,"Please blink 3-5 times during recording"),u(M0,Y1,"Please open mouth 3-5 times during recording"),u(M0,q1,"Don not get too close to the camera, keep full facial contours in the video"),u(M0,K1,"Start recording"),u(M0,J1,"The video is larger than 15M, please re-upload"),u(M0,Z1,"No valid video captured, please upload again"),M0));var $1="ne-live-detection",e2="tip",t2="action",n2="color",r2="loading",o2="update-config",i2="video-change",a2="update-record-step",s2="ready",u2="verify",c2="error",l2="timeout",f2="checking",h2="check-done",d2={XHR_ERROR:[-8001,J0],CHECK_ERROR:[1e4,Z0],CHECK_NET_FAIL:[10001,$0],REJECTED:[11e3,e1],AUTH:[11001,t1],UNSUPPORT:[11002,n1],NOT_ALLOWED:[11003,r1],NOT_FOUND:[11004,o1],NOT_READABLE:[11005,i1],OVER_CONSTRAINED:[11006,a1],ABORT:[11007,s1],PD_FAIL:[11008,u1],GET_CONF_NET_FAIL:[12e3,c1],GET_CONF_FAIL:[12001,l1]},p2=2,v2=3,g2={EMPTY:["empty",f1],MULTIPLE:["multiple",h1],OUTSIDE:["outside",d1],CLOSE:["close",p1],FAR:["far",v1],LIGHT:["light",g1],DARK:["dark",m1],ROTATE:["rotate",y1],BLINK:["blink",b1],MOUTHOPEN:["mouthopen",w1],HEADRIGHT:["headright",A1],HEADLEFT:["headleft",x1],LOOKUP:["lookup",T1],LOOKDOWN:["lookdown",P1],ACTION_OVER:["action_over",C1],COLOR_READY:["color_ready",_1],COLOR_RUNNING:["color_running",E1],OK:["ok",S1],TIMEOUT:["timeout",k1]},m2={UNSUPPORTED:["unsupported",R1],NOT_ALLOWED:["notallowed",O1],NOT_FOUND:["notfound",M1],NOT_READABLE:["notreadable",F1],OVER_CONSTRAINED:["overconstrained",I1],ABORT:["abort",D1],PD_FAIL:["pdFail",L1],TIMEOUT:["timeout",j1],REJECT:["reject",B1],AUTH:["auth",N1]},y2=1,b2=["3",V1],w2=[3,"视频活体"],A2=["debugLog","调试日志"],x2=["apiError","接口错误"],T2={"Access-Control-Allow-Origin":"*"};function P2(e){return C2.apply(this,arguments)}function C2(){return C2=o(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u,c,l,f,h,d=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d.length>1&&void 0!==d[1]?d[1]:function(){},r=d.length>2&&void 0!==d[2]?d[2]:function(){},o=t.apiServer,i=t.url,a=t.method,s=void 0===a?"post":a,u=t.timeout,c=void 0===u?6e3:u,l=t.headers,f=t.data,Object.assign(T2,l),h=new Promise((function(e,t){var a=new XMLHttpRequest;if(!a){var u=new Error("cannot creat an XMLHTTP instance");r(d2.XHR_ERROR[0],u)}a.onreadystatechange=function(){var r=void 0!==XMLHttpRequest.DONE?XMLHttpRequest.DONE:4;if(a.readyState===r)if(a.status>=200&&a.status<300||304===a.status){var o;try{o=JSON.parse(a.response)}catch(_3){o=a.response}null==n||n(a.responseURL),e(o)}else{var i=new Error("网络请求错误");i.res={target:a.responseURL,status:a.status,response:a.response},t(i)}};var h="".concat(o).concat(i),d=s;if("GET"===s.toUpperCase()){var p=[];for(var v in f)Object.prototype.hasOwnProperty.call(f,v)&&p.push("".concat(v,"=").concat(f[v]));h=h+"?"+p.join("&"),d="get"}for(var g in"POST"===s.toUpperCase()&&(d="post"),a.open(d,h,!0),a.setRequestHeader("content-type","text/plain;charset=UTF-8"),a.timeout=c,l)Object.prototype.hasOwnProperty.call(l,g)&&a.setRequestHeader(g,l[g]);a.send("get"===d?null:JSON.stringify(f))})),e.abrupt("return",h);case 6:case"end":return e.stop()}}),e)}))),C2.apply(this,arguments)}var _2=Object.prototype.toString;function E2(e){return"string"==typeof e||"[object String]"===_2.call(e)}function S2(e){return"function"==typeof e||"[object Function]"===_2.call(e)}function k2(e){return"object"===("undefined"==typeof HTMLElement?"undefined":n(HTMLElement))?e instanceof HTMLElement:e&&"object"===n(e)&&1===e.nodeType&&"string"==typeof e.nodeName}var R2=/([\w-]+)?(?:#([\w-]+))?((?:\.(?:[\w-]+))*)/;function O2(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:$1,i=""===o?"":"_",a=[];e&&(a=null!==(r=R2.exec(e))&&void 0!==r?r:[]);var s=document.createElement(a[1]||"div");return a[2]&&(s.id=a[2]),a[3]&&(s.className=a[3].replace(/\./g," ".concat(o).concat(i)).trim()),t&&Object.keys(t).forEach((function(e){var n=t[e];void 0!==n&&(/^on\w+$/.test(e)?s[e]=n:s.setAttribute(e,n))})),n&&(E2(n)?s.innerHTML=n:n.forEach((function(e){return s.appendChild(e)}))),s}function M2(e){return e?E2(e)?document.querySelector(e):k2(e)?e:null:null}function F2(e){e&&(e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e))}function I2(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$1;if(!(t=t.trim()))return e;if(e.classList)t.split(" ").forEach((function(t){e.classList.add("".concat(n,"_").concat(t))}));else{var r=e.className&&e.className.baseVal||"";e.setAttribute("class",(r?"".concat(r," "):"")+t.split(" ").map((function(e){return n+e})).join(" "))}return e}function D2(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$1;return e.classList.remove("".concat(n,"_").concat(t)),e}function L2(e){if(e)for(var t=e.childNodes,n=t.length-1;n>=0;n--)e.removeChild(t[n])}var j2=function(){function e(t,n,r,o){i(this,e),this.node=t,this.type=n,this.handler=r,this.options=o,t.addEventListener(n,r,this.options)}return s(e,[{key:"dispose",value:function(){this.handler&&(this.node.removeEventListener(this.type,this.handler,this.options),this.node=null,this.handler=null,this.options=null)}}]),e}(),B2=new Map;function N2(e,t){var n;return B2.has(e)||B2.set(e,[]),null===(n=B2.get(e))||void 0===n||n.push(t),t}function V2(e){var t;B2.has(e)&&(null===(t=B2.get(e))||void 0===t||t.forEach((function(e){e.dispose()})),B2.delete(e))}var U2=function(){function e(){i(this,e),this._events=Object.create(null)}return s(e,[{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(!this._events[e])return!1;var i=x(this._events[e]);return i.forEach((function(e){e.apply(t,r)})),!0}},{key:"on",value:function(e,t){if("function"!=typeof t)throw new TypeError("The event-triggered callback must be a function.");return this._events[e]?this._events[e].push(t):this._events[e]=[t],{dispose:this.off.bind(this,e,t)}}},{key:"once",value:function(e,t){var n=this;return this.on(e,(function r(){null==t||t.apply(n),n.off(e,r)}))}},{key:"off",value:function(e,t){if(!this._events[e])return this;if(!t)return this._events[e]&&(this._events[e].length=0),this;for(var n=this._events[e].length,r=0;r<n;r++)if(this._events[e][r]===t){this._events[e].splice(r,1);break}return this}},{key:"removeAllListeners",value:function(e){return e?this._events[e]&&(this._events[e].length=0):this._events=Object.create(null),this}}]),e}();function W2(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{return JSON.parse(e)}catch(n){return t}}function z2(e){return e?e.split("?")[0]:e}function H2(e,t){var n=e;if(("string"==typeof n||"number"==typeof n)&&(n=parseFloat(String(n)),!Number.isNaN(n)))return n.toFixed(t)}var G2="[NELiveDetection]",X2={log:function(e,t){var n,r=["info","warn","error"];"string"==typeof e&&r.includes(e)?null===(n=console)||void 0===n||n[e]("".concat(G2," ").concat(t)):X2.error('[Inner util error]: log "type" must be one of the ['.concat(r.join(", "),"]}]"))},warn:function(e){X2.log("warn",e)},error:function(e){X2.log("error",e)},assert:function(e,t,n){if(!e)throw null==n||n(t),new Error("".concat(G2," ").concat(t))}};function Q2(e,t){e&&null!=t&&t.type&&null!=t&&t.name&&null!=t&&t.value&&e.collect(t.type,t.name,t.value)}var Y2=window.performance||window.msPerformance||window.webkitPerformance||{},q2=Y2&&"getEntriesByName"in Y2;function K2(e){if(e&&q2){return function(t){var n,r,o=null===(n=Y2.getEntriesByName(t))||void 0===n?void 0:n[0];if(o){var i=function(e){if(!e)return{};var t=document.createElement("a");return t.href=e,{source:e,protocol:t.protocol.replace(":",""),host:t.hostname,port:t.port,query:t.search,hash:t.hash.replace("#",""),path:t.pathname.replace(/^([^/])/,"/$1"),segments:t.pathname.replace(/^\//,"").split("/")}}(t),a=null!==(r=i.path)&&void 0!==r?r:"-",s=JSON.stringify({tc:H2(o.responseEnd-(o.domainLookupStart||o.connectStart),1),dc:H2(o.domainLookupEnd-o.domainLookupStart,1),cc:H2(o.connectEnd-o.connectStart,1),rc:H2(o.responseStart-o.requestStart,1),rr:H2(o.responseEnd-o.responseStart,1),url:t,host:i.host,https:"https"===i.protocol});e.collectAsync("netPerformance",a,s)}}}}function J2(e,t,n){return{type:A2[0],name:e,value:JSON.stringify({type:"confErr",conf:t,log:n})}}var Z2={mode:"mount",businessKey:"",container:void 0,diameter:220,audio:!1,fallback:!0,footerTip:!0,lang:"zh-CN",preload:!1};function $2(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t({model:"DUB-AL20 Google Chrome",osVersion:"8.1.0",sdkType:"3",terminal:"1",version:"3.1.2"},e)}var e3=function(){return e3=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},e3.apply(this,arguments)};var t3,n3={userData:null,name:location.hostname+"_snaker",init:function(){if(!n3.userData)try{n3.userData=document.createElement("INPUT"),n3.userData.type="hidden",n3.userData.style.display="none",n3.userData.addBehavior("#default#userData"),n3.userData&&document.body.appendChild(n3.userData);var e=new Date;e.setDate(e.getDate()+365),n3.userData.expires=e.toUTCString()}catch(_3){return console.log("userData is disabled!"),!1}return!0},setItem:function(e,t){n3.init()&&n3.userData&&(n3.userData.load(n3.name),n3.userData.setAttribute(e,t),n3.userData.save(n3.name))},getItem:function(e){return n3.init()&&n3.userData?(n3.userData.load(n3.name),n3.userData.getAttribute(e)||""):""},removeItem:function(e){n3.init()&&n3.userData&&(n3.userData.load(n3.name),n3.userData.removeAttribute(e),n3.userData.save(n3.name))}};try{t3=localStorage||n3}catch(E3){t3=n3}var r3=function(){function e(e){this.name=e}return e.prototype.push=function(e){if(e)try{var t=t3.getItem(this.name);t3.setItem(this.name,t?t+","+e:e)}catch(_3){console.log("localstorage or userData is disabled!")}},e.prototype.length=function(){try{var e=t3.getItem(this.name)||"";return e?e.split(",").length:0}catch(_3){return console.log("localstorage or userData is disabled!"),0}},e.prototype.pop=function(e){var t;void 0===e&&(e=1);try{var n=t3.getItem(this.name),r=n?n.split(","):[];t=r.splice(0,e),t3.setItem(this.name,r.join(","))}catch(_3){t=[],console.log("localstorage or userData is disabled!")}return t},e.prototype.clear=function(){try{t3.removeItem(this.name)}catch(_3){console.log("localstorage or userData is disabled!")}},e}(),o3=function(){function e(e){if(!e.pid)throw new Error("product id is required!");var t=e.pid,n=e.bid,r=e.url,o=e.random,i=e.limit,a=e.disabled,s=e.version;this.pid=t,this.bid=n,this.random=o||1,this.limit=i||5,this.disabled=a,this.version=s||"",this.url=r||"https://da.dun.163.com/sn.gif",this.prefix="__snaker__id",this.cache=new r3(this.prefix);var u=function(e){var t=new RegExp("(^|;)[ ]*"+e+"=([^;]*)").exec(document.cookie);return t?decodeURIComponent(t[2]):""}(this.prefix);u?this.uuid=u:(this.uuid=function(){for(var e="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",t="",n=0,r=e.length;n<16;n++)t+=e.charAt(Math.floor(Math.random()*r));return t}(),function(e,t,n){var r,o=e+"="+encodeURIComponent(t)+";";n&&((r=new Date).setTime(r.getTime()+n),o+="expires="+r.toUTCString()),document.cookie=o}(this.prefix,this.uuid,31536e6))}return e.prototype.setUser=function(e){if("string"==typeof e)this.user={uid:e};else for(var t in this.user={uid:e.uid},e)e.hasOwnProperty(t)&&"uid"!==t&&(this.user["$user_"+t]=e[t])},e.prototype.serialize=function(e,t){var n,r,o=this,i=o.pid,a=o.bid,s=o.uuid,u=o.user,c=o.version,l=e.type,f=e.name,h=e.value,d=screen.width+"x"+screen.height,p=(n=location.href,r=200,n.substring(0,r)),v=(new Date).getTime()+"",g=e3(e3({pid:i,bid:a,uuid:s,type:l,name:f,version:c,value:h,res:d,pu:p,nts:v},t),u),m=[];for(var y in g)g.hasOwnProperty(y)&&void 0!==g[y]&&m.push(encodeURIComponent(y+"=")+encodeURIComponent(encodeURIComponent(g[y])));return m.join("%26")},e.prototype.sendRequest=function(e,t){this.disabled||(new Image(1,1).src=e+"?d="+t)},e.prototype.report=function(e,t,n,r,o){if(!(this.disabled||this.random<Math.random())){var i=this.serialize({type:e,name:t,value:n},o||{});r?(this.cache.push(i),this.cache.length()>=this.limit&&this.flush()):this.sendRequest(this.url,i)}},e.prototype.track=function(e,t,n,r){this.report(e,t,n,!1,r)},e.prototype.trackAsync=function(e,t,n,r){this.report(e,t,n,!0,r)},e.prototype.flush=function(){for(var e="",t=this.cache.pop(this.limit);t.length;){var n=t.pop()||"";n&&((e=e?e+","+n:n).length>1800&&(this.sendRequest(this.url,e),e=""))}e&&this.sendRequest(this.url,e)},e}(),i3=function(){function e(n){i(this,e),this.snaker=new o3(t(t({},n),{},{pid:"liveperson",version:"2.3.2"})),this.extraParams={tt:"web",dataVersion:"v1"}}return s(e,[{key:"collect",value:function(e,n,r){this.snaker.track(e,n,r,t({},this.extraParams))}},{key:"collectAsync",value:function(e,n,r){this.snaker.trackAsync(e,n,r,t({},this.extraParams))}}]),e}(),a3=function(){function e(t,n,r,o,a){i(this,e),n&&!E2(n)&&k2(n)?this.el=n:this.el=O2(n,r,o,a),t&&t.appendChild(this.el)}return s(e,[{key:"injectStyle",value:function(e){Object.assign(this.el.style,e)}},{key:"dispose",value:function(){F2(this.el),V2(this)}}]),e}(),s3=function(e){c(n,e);var t=y(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,".tip",{},H0.trans(X0))).neLiveDetection=r,N2(g(o),r.on(e2,o.updateTip.bind(g(o)))),o}return s(n,[{key:"updateTip",value:function(e){var t=e.code,n=e.type,r=void 0===n?"tip":n;this.code=t,this.text=function(e,t){var n=null;return"tip"===e&&Object.keys(g2).forEach((function(e){g2[e][0]===t&&(n=H0.trans(g2[e][1]))})),"fail"===e&&Object.keys(m2).forEach((function(e){m2[e][0]===t&&(n=H0.trans(m2[e][1]))})),n}(r,t),this.el.textContent=this.text}}]),n}(a3),u3="color_circle--active",c3=function(e){c(n,e);var t=y(n);function n(e,r,o){var a;return i(this,n),(a=t.call(this,e,".color")).neLiveDetection=r,a.opts=o,a.colors=[],a.initColors(),N2(g(a),r.on(o2,a.initColors.bind(g(a)))),N2(g(a),r.on(n2,a.updateActiveColor.bind(g(a)))),a}return s(n,[{key:"initColors",value:function(){var e=this;L2(this.el);var t=this.neLiveDetection.options.colorMap,n=void 0===t?[]:t;this.colors=n.map((function(t,n){var r=O2(".color_circle");return I2(r,"color_circle-".concat(n)),r.style.background=t,r.style.cssText=";background:".concat(t,";width:").concat(e.opts.size,"px;height:").concat(e.opts.size,"px"),e.el.appendChild(r),r})),this.activeColor=-1,this.updateActiveColor(this.activeColor)}},{key:"updateActiveColor",value:function(e){this.colors.forEach((function(t,n){n===e?I2(t,u3):D2(t,u3)}))}}]),n}(a3),l3="camera_loading-text--show",f3=function(e){c(n,e);var t=y(n);function n(e,r){var o;i(this,n),(o=t.call(this,e,".camera")).neLiveDetection=r,o.loading=!0,o.cameraInner=O2(".camera_inner");var a=O2("video#".concat($1,"_camera_video"),{muted:!0,autoplay:!0,"x5-playsinline":"",playsinline:"","webkit-playsinline":""},"Please update your browser."),s=O2("img.camera_loading-bg",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAggAAAIICAYAAAAL/BZjAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAABWNSURBVHic7d1NctvGFoDRbnkjHrm0C8NzUmvIW4mllSTZgsi54WVQo6xEeINQjiyQEn8A9N85o1Qqgy6Htj7f2wBDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChbTH0AYFqr1aoLIYSbm5vu5d8Nw/D1wH/aHfh3x/SH/mWM8WcIITw/P/chhLDdbg/+d0B5BAIUarVadS8R8CoAulTneaUP4d94EA5QLoEAhXgJgn0MdKnPc4H+JRoEA+RPIECm3kwIvqc9zSz6YRgeQjBhgBwJBMjIqylBjUHwkX4YhgexAHkQCJCBu7u7+4JXB1MzWYAMCARI5O7u7j6EatcHUzFVgEQEAixsPy0QBWeKMT48Pj7epz4HtEIgwEKEwTRijA+ehID5CQSYmTCYjfUDzEggwEyEwWKEAsxAIMDEhEEa7ijAtAQCTEQYZME0ASYiEGAC4iA7QgGuJBDgCsIgb9YOcDmBABdYrVZdjPF78ObDEpgmwAU+pT4AlGb/BsQ/Qwif056EE32OMf5xe3sbd7tdn/owUAqBAGewUihaJxLgdFY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SsGTAjgfAIBJvASDe4yJGMyABMTCDCTA9EQgnC41q8QCEEMwJwEAiRwJB5CEBAhvIkA6wFIQyBAZl7HQwghvAmIEMqNiP7lH94GQAghiADIi0CAgr3ERAj/BUUIB6PimO7D/+LVD/ZDXv+wD+G/H/gh+KEPJfs/XWuM0SFottoAAAAASUVORK5CYII="}),u=O2("div.camera_loading-circle"),c=O2("span.camera_loading-msg",{},H0.trans(G0));return o.cameraLoadingText=O2(".camera_loading-text",{},[s,u,c]),N2(g(o),new c3(o.el,r,{size:r.options.diameter})),o.circleBg=O2(".camera_circle-bg"),o.circleAni=O2(".camera_circle-animation"),o.updateCameraDiameter(),o.cameraInner.appendChild(a),o.cameraInner.appendChild(o.cameraLoadingText),[o.cameraInner,o.circleBg,o.circleAni].forEach((function(e){o.el.appendChild(e)})),o.updateLoadingStatus(!0),N2(g(o),r.on(r2,o.updateLoadingStatus.bind(g(o)))),N2(g(o),r.on(e2,o.updateCircleAni.bind(g(o)))),o}return s(n,[{key:"updateCameraDiameter",value:function(){var e=this.neLiveDetection.options.diameter,t=function(e,t){e.style.width="".concat(t,"px"),e.style.height="".concat(t,"px")};t(this.cameraInner,e),[this.circleBg,this.circleAni].forEach((function(n){t(n,e+12)}))}},{key:"updateLoadingStatus",value:function(e){var t=Boolean(e);this.loading=Boolean(e),t?I2(this.cameraLoadingText,l3):D2(this.cameraLoadingText,l3)}},{key:"updateCircleAni",value:function(e){var t=e.type,n=function(e,t){if(""!==t){var n=[g2.EMPTY[0],g2.MULTIPLE[0],g2.OUTSIDE[0],g2.CLOSE[0],g2.FAR[0],g2.LIGHT[0],g2.DARK[0],g2.ROTATE[0],g2.TIMEOUT[0]],r=Object.values(m2).map((function(e){return e[0]}));return"fail"===e&&r.includes(t)?"#FC8D74":"tip"===e?n.includes(t)?"#FC8D74":"#5FD6A9":void 0}}(void 0===t?"tip":t,e.code);n&&(this.circleAni.style.borderColor=n)}}]),n}(a3),h3="progress_step--active",d3=function(e){c(n,e);var t=y(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,".progress")).neLiveDetection=r,o.steps=[],o.initSteps(),N2(g(o),r.on(o2,o.initSteps.bind(g(o)))),N2(g(o),r.on(t2,o.updateActiveIndex.bind(g(o)))),o}return s(n,[{key:"initSteps",value:function(){var e=this;L2(this.el);var t=this.neLiveDetection.options.code,n=void 0===t?"":t;this.steps=n.split("").map((function(e,t){return O2(".progress_step",{},"<span>".concat(t+1,"</span>"))})),this.steps.forEach((function(t){e.el.appendChild(t)})),this.activeIndex=0,this.updateActiveStep(this.activeIndex)}},{key:"updateActiveStep",value:function(e){this.steps.forEach((function(t,n){n===e?I2(t,h3):D2(t,h3)}))}},{key:"updateActiveIndex",value:function(e){this.activeIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.max(Math.min(e,n),t)}(e,0,this.steps.length-1),this.updateActiveStep(this.activeIndex)}}]),n}(a3),p3=function(e){c(n,e);var t=y(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,".footer")).neLiveDetection=r,o.iconTips=[["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABwCAYAAADG4PRLAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAm3SURBVHgB7Z1RdhM5FoavqhyThD5nMisYswLICnBW0GEFTR4GhukHyAMJDA84Dwxj0+cEHvowYeacMCvosALMCnCvoGtWMJmHtkPsKvW9drlPSGxJVVZJKrm+F7op2VTpt1RX915dAVRUVFRUVCwnDDzk5cu3jbAWHgPwW5zDBv7VSRInu0+fPojAM7wTcCJe8DkV7iKnKOKmbyIG4BlBGB7OEI/YCEMalX7hnYA4bW7PvYJTKniGhwIK2QDPWDYBvaMSsORUApacSsCSUwlYcrwTED0Tp7BEeCdgwlhv3jWe8A/gGd4JyEfxzqxRSH/HOX8EnuGdgOTrjNHniVKe0P+PhWO8G3voBy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),r.on(o2,o.initFooter.bind(g(o)))),o}return s(n,[{key:"initFooter",value:function(){var e=this;L2(this.el),this.neLiveDetection.options.footerTip&&this.iconTips.forEach((function(t){var n=O2(".footer_icon-wrap");[O2("img.footer_icon",{src:t[0]}),O2("p.footer_text",{},t[1])].forEach((function(e){n.appendChild(e)})),e.el.appendChild(n)}))}}]),n}(a3),v3=function(e){c(n,e);var t=y(n);function n(e,r){var o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"center";return i(this,n),(o=t.call(this,e,".toast")).position=a,I2(o.el,"toast_".concat(a)),k2(r)&&o.el.appendChild(r),E2(r)&&(o.el.innerHTML=r),o}return s(n,[{key:"dispose",value:function(){w(l(n.prototype),"dispose",this).call(this),clearTimeout(this.timer)}}]),n}(a3),g3=function(){function e(t){i(this,e),u(this,"toasts",[]),this.container=t}return s(e,[{key:"show",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e5,r=this.toasts.find((function(e){return e.position===t}));return r?(clearTimeout(r.timer),k2(e)&&(L2(r.el),r.el.appendChild(e)),E2(e)&&(r.el.innerHTML=e)):(r=new v3(this.container,e,t),this.toasts.push(r)),n>0&&(r.timer=setTimeout(this.close.bind(this,r),n)),r}},{key:"close",value:function(e){if(e)return this.toasts=this.toasts.filter((function(t){return t!==e})),void e.dispose();this.toasts.forEach((function(e){e.dispose()})),this.toasts.length=0}},{key:"dispose",value:function(){this.toasts&&(this.close(),this.toasts=null,this.container=null)}}]),e}(),m3=function(e){c(n,e);var t=y(n);function n(e,r){var o;i(this,n),(o=t.call(this,e,".record-start")).neLiveDetection=r,o.toast=N2(g(o),new g3(o.el));var a=document.createDocumentFragment(),s=O2("img.record-tip-icon",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAMAAABKCk6nAAABnlBMVEUAAAD/iin/jhv/jRz/mCf/jhz/fgv/jhf/jhj/jh3/jxr/jh3/jyD/jxz/jhz/jhr/jx3/jxz/jx3/kB3/jx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H7X5g408KwGRkvBwCcVdy1AtzOxTDtnRQWJbqEWb7adg/LxgjM2ElES9b8Uoi1Ps82AJ2X/b+DTkdmrK+JSIurD3tosQ+SpofMFaK5ZSCAuXyfpvCt3bt5IhBIIaiYP5ZG0nzGRwBS3UD5uTTszxQcINE3uvyqaev+07rpVrWae8tv4bDmtsVt7PmkkriW+WhzjbLcea5j9Ww9jlW1XWvVe8GdVjPeB9qKk+Wv04V+qrT9jbjWmnzUWpuM7GeJTzKUSdFEmsdvazW1vteaK/y5QrshuiZEqUH8OxVEjMi81pnK+27zCBPu7SM2GPvXujN0vcs3Sn9EX/IBE1OL9p8lKYAAAAAAAAAAAAAAAAAAAAAAADwED9C2Hfh+KxjRwAAAABJRU5ErkJggg=="}),u=O2("span.record-tip-main",{},H0.trans(H1)),c=O2("span.record-tip-sub",{},H0.trans(G1));o.conditionWrapper=O2("div.record-condition-wrapper"),[H0.trans(X1),H0.trans(Q1),H0.trans(q1)].forEach((function(e,t){var n=O2("div.record-condition-inner"),r=O2("span.record-condition-text",{},e);1===t&&I2(r,"record-condition-text--uni");var i=O2("img.record-condition-icon",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABxRSURBVHgB7XxbbFzbed6/LvsyMxxSI2l0pGPK1VEP5ITMSZMKtdHWxaFRwEXgvhQoT4Og6S1unTpA4Rgu0KJAOESBIK2LoGiQPgVG89CmOTyo81AbaF9MtXbROBbycEImUY4V2VR0G0nkcDgz+7Iu+f61ZyhStyPqLic/tbX3zOzLWt/+139d6yf6c/qBIjHeKvI4xua9r/b472UjSc+RAASDQhUgd7bwmQJQ1Ol0xAS4znInbAIfO9QRy51l6e+cTzTeh+9eELiCnjUx5zAc6GR4mBAByHC8vFw9f4lokeZ22zK/ui7WFuZ8ddwO3691ux4nEa2Mz1lc93xhZ3kZuyWPvVj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RCSqONN11877/BJTElUlZUM5nBOCq2aX7wHtCeiolQP2kkODY9WONxvKFk1Nc3KvbJsdJqpNvbgQ59MbMSdtoDEz/9ndNr2dMGtUQ22mYaABTQ0alhznOy0153zzcDsc7cWbS0ZQZDA6ZplRlupMZlm/92z2j4MPCCoDN/Xp56RLCo2++ZQkadhMjYQHxvHFQgDgsRVVg4KmAx/R0OHBMgf/8ZNmip8mbDspmaU5weeNVfF5YeJu4tMhmCs5MDodFLK9dvi54UdpkHh4TT3bnycY84XOzqLJj3bzKU9RmX/Mcs+PjUID27BnPxjAvVWOOC4EAGMV+nAgKlXzH1efoKdJTLcS9G/YZl9iutFv1pnmxcmdhya6eQ4CSzgXu6HbJfQLcwtwZNwt76RSZNUS/KWxkL2Ob77E3d7ak6VnE6bbtGZzH2+jyt21w/CHbmMvbK//Zryyv+2/gGfOB40SVRRvLuGrIPl3wqls+RxoHJ8JClZBj4NLES8yhVBXjHpcRDaEkyM815qR2xbXtcWFuJvZX11beEfOL87vfhbqolfNa5S4OUAPwlaJxXXzarZFfvUThx+Xfw6IfLnaG/eK776rJvuM7d8rAV25lQGcPS4mHlWj6M0V7gBiDu792/p/TDxD9KRmZRUHELHkWAAAAAElFTkSuQmCC"});n.appendChild(i),n.appendChild(r),o.conditionWrapper.appendChild(n)})),[s,u,c,o.conditionWrapper].forEach((function(e){return a.appendChild(e)}));var l=O2(".record-btn-wrapper");return o.recordBtn=O2("button.record-btn",{"aria-label":H0.trans(K1)},H0.trans(K1)),o.recordFileInput=O2("input.record-file-input",{type:"file",accept:"video/*",capture:"camcorder"}),[o.recordBtn,o.recordFileInput].forEach((function(e){return l.appendChild(e)})),a.appendChild(l),o.el.appendChild(a),function(e,t,n,r,o){var i=new j2(t,n,r,o);e&&N2(e,i)}(g(o),o.recordFileInput,"change",o.uploadVideo.bind(g(o))),N2(g(o),r.on(o2,o.updateSolutionTip.bind(g(o)))),o}return s(n,[{key:"show",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.el.style.display=e?"flex":"none"}},{key:"updateSolutionTip",value:function(){var e=this.neLiveDetection.options.videoActions,t=void 0===e?[]:e,n=this.conditionWrapper.childNodes[1];if(n){var r=n.childNodes[1];r&&(r.innerHTML=t[0]===b2[0]?H0.trans(Y1):H0.trans(Q1))}}},{key:"uploadVideo",value:function(e){var t=this,n=e.target.files;if(n&&n.length>0){this.neLiveDetection.emit(a2,"checking");var r=n[0];if(r.size>15728640)return this.neLiveDetection.emit(a2,"start"),void this.toast.show(H0.trans(J1),"top");var o=new FileReader;o.readAsDataURL(r),o.addEventListener("loadend",(function(){var e=o.result;null!==e&&t.neLiveDetection.emit(i2,e)}))}else this.neLiveDetection.emit(a2,"start"),this.toast.show(H0.trans(Z1),"top")}}]),n}(a3),y3=function(e){c(n,e);var t=y(n);function n(e){var r;i(this,n),r=t.call(this,e,".record-checking");var o=document.createDocumentFragment(),a=O2(".record-ani-wrapper");[O2(".record-ani-scan"),O2("img.record-ani-img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACgCAYAAADNecSHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABP4SURBVHgB7Z1vchvH0cZ7FqDK7+ukDJ/A6w+psiWmDJ3A0AksnUCw5FTlm6QTCDqBpG+piiyBJzB5AkMnEFyxZFflQ6AThKnIjiMRO+lndhZagNiZ2b/YBedXRQkkhySw+6C7p6dnWtCe84exHB4QDSmgUAj6RBINBFFI+JqZOX+c8sdCSnotI5qf8eO/T8Wc9hhBe0Q4loP/IxoFffqSJI1w4yEAqp4ZX7l5dEbP/8OPF1NxSntC5wXx2ViGQUA3+d0/4k9HtBtmLMCTZUTHP0/FgjpMJwUBS/D/Ad3ZsQiymLOLeRxFNOuiODolCLYGo36P7rAbuE7dYLpc0hELY0YdoROCgBB6PbpP7bMGrszYahy9eiqm1HJaLYg9EMImmLE8aLMwWimIPRTCJjN2JV+3McZolSAQLH4Y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8YuCg/bhs3JCmMkGAgyXdcFgAA14UGeQRA671m6Wbu3alUkFgmVwFNu6ieHHltvS7yTW4FnnEgGtdtn/pJpUKAiCw0dGu6xOd+jzFan1i6uQmpGpqe62O7seVCwLgicrAXRTIU1z5Rj68iGluNIK5cks+dMozkO7NWZMYQC2CAOiIk0cUKMF716MXF6mWAq/1wz6vTQi3qvVEDK+mwraOVJjaBAFyi4LfMLx48+IiZDWRfeQcwwvXA2GbEIP6O9QAqi30khMs+ZqnTbGeX5dp3FWLJb1iiQW/kevPNCUGUKuFSIClyDH7SBhjqRfN52lPWFmFHGLANTuL6GoTYgCNWIgE9e4IlM8MKR8LrJmwtZhRRTRpIbAeofdOjCgfc37dN+qykttoxEIk4IUdsNqFfXvgJqowhG/isy4FnRACP+fvdVHLiPJx9MuyvtlEFo1aiDSH38iJLL6PA/HFURmLUaeFKGERYgTde/lE2Fc4a2BnggAFg800C76tD36N6Dhvxq5qQSCf8CFO54sPZBtREThewFaHH59U5xrzslNBAB11T/hh2RT2NFrSyX94gc1FHFUIAiL4gGjIz/8mKsOcUs7ZwEXcrToVnZedCyIBswl+Mvcr6uuNcy1OeGYzz3IrRQWh3EHAuQO2BDxgWFIEyipE7CJ++lYcUwtojSBAhdZik5nqcS7pOc/nF3hsq15+u6SrB3zD2YSjnzjaXQ/5YoWlBZCCf9fjX5c02bVVSNMqQSQUSd50jBkKinYZK2TRSkEkVOxG2kBrhZDQakEkKGHEp/CPqJu0XggJnRBEAucuRhwKjom60aKBY4TjQNDjLgghoVOCSECMgSP49AHfbSvDgzV4/uaMHrUpWHSlk4JIo9dHrpdKCJVHieCsT9Of/9JsqrlqOi+INEgU/b5HoyULg18YpoojqhgsRaNxOruD5z0Wwr+XbomwrrBXgtgG0uO9iMKl5DyCoE8o3iyLXIK1/bGgOGfBcctrQn/0Hs2xlE97zP8A1ewNTlKigEAAAAAASUVORK5CYII="})].forEach((function(e){return a.appendChild(e)}));var s=O2("span.record-tip-main",{},H0.trans(W1)),u=O2("span.record-tip-third",{},H0.trans(z1));return[a,s,u].forEach((function(e){return o.appendChild(e)})),r.el.appendChild(o),r}return s(n,[{key:"show",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.el.style.display=e?"flex":"none"}}]),n}(a3),b3=function(e){c(n,e);var t=y(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,".record")).neLiveDetection=r,o.start=N2(g(o),new m3(o.el,o.neLiveDetection)),o.checking=N2(g(o),new y3(o.el)),N2(g(o),r.on(a2,o.updateStep.bind(g(o)))),o}return s(n,[{key:"show",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.el.style.display=e?"block":"none",this.updateStep("start")}},{key:"updateStep",value:function(e){switch(e){case"start":this.start.show(),this.checking.show(!1);break;case"checking":this.start.show(!1),this.checking.show()}}}]),n}(a3),w3=function(e,t,n){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");"function"==typeof t&&(n=t,t={}),t=t||{},n=n||function(){},o.type=t.type||"text/javascript",o.charset=t.charset||"utf8",o.async=!("async"in t)||!!t.async,o.src=e,t.attrs&&function(e,t){for(var n in t)e.setAttribute(n,t[n])}(o,t.attrs),t.text&&(o.text=""+t.text),("onload"in o?A3:x3)(o,n),o.onload||A3(o,n),r.appendChild(o)};function A3(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function x3(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}var T3=function(){function e(t){i(this,e),u(this,"guardian",null),u(this,"loadStatus","initial"),u(this,"loadPromise",null),this.options=t,this.jsPath="".concat(this.options.staticServer,"/irisk.full.2.1.2.js"),this.init()}var t,n,r,a;return s(e,[{key:"init",value:(a=o(regeneratorRuntime.mark((function e(){var t,n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"initial"!==this.loadStatus&&"failed"!==this.loadStatus||(this.loadStatus="loading",this.loadPromise=this.loadScript().then(o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.createGuardian());case 1:case"end":return e.stop()}}),e)})))).catch((function(e){throw console.error("Irisk initialization failed:",e),e})),this.loadPromise.then((function(){n.loadStatus="loaded"})).catch((function(){n.loadStatus="failed"}))),e.abrupt("return",null!==(t=this.loadPromise)&&void 0!==t?t:Promise.resolve());case 2:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"getToken",value:(r=o(regeneratorRuntime.mark((function e(){var t,n,r,i,a,s=this,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>0&&void 0!==u[0]?u[0]:{},r=null!==(t=n.timeout)&&void 0!==t?t:6e3,i=new Promise((function(e){setTimeout((function(){e(s.options.errorToken)}),r)})),a=o(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"loaded"===s.loadStatus){e.next=9;break}if("loading"!==s.loadStatus||!s.loadPromise){e.next=7;break}return e.next=5,s.loadPromise;case 5:e.next=9;break;case 7:return e.next=9,s.init();case 9:if("failed"!==s.loadStatus&&s.guardian){e.next=11;break}return e.abrupt("return",s.options.errorToken);case 11:return e.next=13,s.guardian.getToken();case 13:if(t=e.sent,n=t.code,r=t.token,200!==n){e.next=18;break}return e.abrupt("return",r);case 18:if(201!==n){e.next=20;break}return e.abrupt("return",s.options.offlineToken);case 20:return e.abrupt("return",s.options.errorToken);case 23:return e.prev=23,e.t0=e.catch(0),console.error("Error getting token:",e.t0),e.abrupt("return",s.options.errorToken);case 27:case"end":return e.stop()}}),e,null,[[0,23]])})))(),e.abrupt("return",Promise.race([a,i]));case 5:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})},{key:"loadScript",value:(n=o(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){window.createNEGuardian?e():w3(t.jsPath,(function(r){r?n(new Error("Failed to load ".concat(t.jsPath,": ").concat(r.message))):window.createNEGuardian?e():n(new Error("".concat(t.jsPath," loaded but createNEGuardian is not available")))}))})));case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"createGuardian",value:(t=o(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,window.createNEGuardian){e.next=3;break}throw new Error("createNEGuardian function not available");case 3:return t=this.options,n=t.productId,r=t.apiServer,this.guardian=window.createNEGuardian({productId:n,apiServer:r}),e.next=7,Promise.resolve();case 7:return e.abrupt("return");case 10:return e.prev=10,e.t0=e.catch(0),e.abrupt("return",Promise.reject(e.t0 instanceof Error?e.t0:new Error(String(e.t0))));case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return t.apply(this,arguments)})}]),e}(),P3=["checkImages"],C3=function(e){c(w,e);var n,r,a,u,l,f,h,d,p,m,b=y(w);function w(e){var n,r;return i(this,w),(r=b.call(this)).cameraOpened=!1,r.loadOver=!1,r.iriskToken="",r.iriskEnable=!1,r.collector=new i3({bid:e.businessKey}),r.netCollector=new i3({bid:e.businessKey,limit:9,random:.3}),r.request=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return function(){var r=o(regeneratorRuntime.mark((function r(o){var i,a,s=arguments;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=s.length>1&&void 0!==s[1]?s[1]:function(){},a=t(t({},e),o),r.abrupt("return",P2(a,n,i));case 3:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()}({apiServer:null!==(n=e.apiServer)&&void 0!==n?n:"https://verify.dun.163yun.com"},K2(r.netCollector)),r.options=function(e,n){var r=t(t({},Z2),e),o=r.businessKey,i=r.container;X2.assert(Boolean(o)&&/^[a-zA-Z0-9]+$/.test(o),'Correct "businessKey" is required',(function(e){Q2(n,J2("businessKey",r,e))}));var a=M2(i);return X2.assert(Boolean(a),'Correct "container" is required',(function(e){Q2(n,J2("container",r,e))})),r}(e,r.collector),r.container=M2(r.options.container),H0.setCurrentLang(r.options.lang),r.el=O2("div.".concat($1),{},void 0,""),r.tip=N2(g(r),new s3(r.el,g(r))),r.camera=N2(g(r),new f3(r.el,g(r))),r.progress=N2(g(r),new d3(r.el,g(r))),r.footer=N2(g(r),new p3(r.el,g(r))),r.record=N2(g(r),new b3(r.el,g(r))),N2(g(r),r.on(i2,r.videoChange.bind(g(r)))),r}return s(w,[{key:"mount",value:function(e){var t,n=this.options.onMount;e&&(this.container=null!==(t=M2(e))&&void 0!==t?t:this.container);this.container&&(this.container.appendChild(this.el),n&&n(this),this.initBdFaceSdk())}},{key:"mergeOptionsFromServer",value:(m=o(regeneratorRuntime.mark((function e(){var n,r,o,i,a,s,u,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getConfigs();case 2:n=e.sent,r=n.token,o=n.h5Colors,i=n.h5Actions,a=n.solutionType,s=n.videoActions,u=n.riskConfig,c=void 0===u?{}:u,this.options=t(t({},this.options),{},{token:r,colorMap:o,code:(null==i?void 0:i.join(""))||"",solutionType:a,videoActions:s,riskConfig:c}),this.emit(o2);case 12:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"initBdFaceSdk",value:(p=o(regeneratorRuntime.mark((function e(){var t,n,r,o,i,a,s,u,c,l,f=this,h=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!(h.length>0&&void 0!==h[0])||h[0],e.next=3,this.canUseSDK();case 3:return n=e.sent,r=this.options.onReady,e.next=7,this.mergeOptionsFromServer();case 7:n?(o=this.options,i=o.code,a=o.solutionType,s=o.audio,u=o.preload,c=o.riskConfig,this.iriskEnable=1===(null==c?void 0:c.enable),t&&this.iriskEnable&&(this.iriskModule=this.initIriskModule()),this.bdFaceSdk=new T0({video:"".concat($1,"_camera_video"),solutionType:a,code:i,modelPath:"https://cstaticdun.126.net/live-detection",autoloadModels:!u,randomMotionDetection:!1,needToRecord:!1,minFaceRatio:.2,maxFaceRatio:.8,leftYaw:15,rightYaw:15,constraints:{video:{width:{min:640,ideal:640,max:640},height:{min:480,ideal:480,max:480}},audio:s}}),u&&this.bdFaceSdk.loadModels(),(l=this.bdFaceSdk).on("camera_open",(function(){f.cameraOpened=!0,f.loadOver&&f.emit(r2,!1)})),l.on("status",(function(e){"loading"===e?f.emit(r2,!0):"loading_over"===e&&(f.loadOver=!0,f.cameraOpened&&f.emit(r2,!1))})),l.on("tip",(function(e){var t=e.code;f.emit(e2,{code:t}),t===g2.TIMEOUT[0]&&f.emit(l2,t)})),l.on("action",(function(e){f.emit(t2,e)})),l.on("color",(function(e){f.emit(n2,e)})),l.on("success",this.onSuccess.bind(this)),l.on("fail",this.onFail.bind(this))):this.onFail(["unsupported"]),t&&(this.emit(s2),r&&r(this));case 9:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"initIriskModule",value:function(){var e=this.options.riskConfig;return new T3({productId:e.pn,errorToken:e.token,offlineToken:e.offlineToken,apiServer:e.apiServer,staticServer:"https://cstaticdun.126.net/live-detection"})}},{key:"start",value:(d=o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.iriskToken="",!this.bdFaceSdk){e.next=7;break}if(this.bdFaceSdk.start(),!this.iriskEnable||!this.iriskModule){e.next=7;break}return e.next=6,this.iriskModule.getToken();case 6:this.iriskToken=e.sent;case 7:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"restart",value:(h=o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.emit(r2,!0),this.cameraOpened=!1,this.loadOver=!1,this.bdFaceSdk&&this.bdFaceSdk.destroy(),this.bdFaceSdk=null,e.next=7,this.initBdFaceSdk(!1);case 7:this.start();case 8:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"dispose",value:function(){this.el&&(this.bdFaceSdk&&this.bdFaceSdk.destroy(),this.bdFaceSdk=null,V2(this),this.removeAllListeners(),F2(this.el),this.el=null)}},{key:"canUseSDK",value:(f=o(regeneratorRuntime.mark((function e(){var t,n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=(t=T0).UA(),S2(t.isSupport)&&t.isSupport()){e.next=6;break}return e.abrupt("return",!1);case 6:if(r=n.getOS(),o=n.getBrowser(),i=["quark","ucbrowser","nokiabrowser"],!o.name||!i.includes(o.name.toLowerCase())){e.next=11;break}return e.abrupt("return",!1);case 11:if(!navigator.standalone||"iOS"!==r.name||"Safari"!==o.name||!o.version.startsWith("18.0")){e.next=13;break}return e.abrupt("return",!1);case 13:if(!S2(this.options.isSupport)||this.options.isSupport({osName:r.name,osVersion:r.version,browserName:o.name,browserVersion:o.version})){e.next=16;break}return e.abrupt("return",!1);case 16:return e.abrupt("return",!0);case 19:return e.prev=19,e.t0=e.catch(0),console.error("Error checking SDK support:",e.t0),e.abrupt("return",!1);case 23:case"end":return e.stop()}}),e,this,[[0,19]])}))),function(){return f.apply(this,arguments)})},{key:"onSuccess",value:(l=o(regeneratorRuntime.mark((function e(t){var n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.emit(e2,{text:H0.trans(Q0)}),e.next=3,this.check(t.images);case 3:n=e.sent,r=n.status,o=n.token,r===y2?(i=this.iriskModule?"".concat(o,"_").concat(this.iriskToken):o,this.emit(u2,i)):this.collectCheckUnpassError("image",{status:r,token:o});case 7:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"onFail",value:(u=o(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,s,u=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=A(t,1),r=n[0],this.emit(e2,{type:"fail",code:r}),o={unsupported:{code:d2.UNSUPPORT,handler:function(){u.options.fallback&&u.record.show()}},notallowed:{code:d2.NOT_ALLOWED},notfound:{code:d2.NOT_FOUND},notreadable:{code:d2.NOT_READABLE},overconstrained:{code:d2.OVER_CONSTRAINED},abort:{code:d2.ABORT},reject:{code:d2.REJECTED},auth:{code:d2.AUTH},pdFail:{code:d2.PD_FAIL},action_timeout:{handler:function(){return u.emit(l2,r)}},timeout:{handler:function(){return u.emit(l2,r)}}},(i=o[r])&&(i.code&&((s=new Error(H0.trans(i.code[1]))).name=i.code[0].toString(),this.emit(c2,s)),null===(a=i.handler)||void 0===a||a.call(i));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"getConfigs",value:(a=o(regeneratorRuntime.mark((function e(){var t,n,r,o,i,a,s,u,c,l,f,h,d,p,v,g,m,y;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.options.businessKey,n={businessKey:t,timestamp:Date.now(),sdkType:v2,nonce:V0(32)},r=U0(JSON.stringify(n)),o=r.key,i=r.eyptStr,a=r.iv,s={d:i,rk:a+o},c="/v1/liveperson/getConf",e.prev=5,e.next=8,this.request({method:"post",url:c,data:s,headers:$2()});case 8:u=e.sent,200!==(null===(l=u)||void 0===l?void 0:l.code)&&(f=new Error(H0.trans(d2.GET_CONF_FAIL[1])),h=d2.GET_CONF_FAIL[0].toString(),f.name=h,this.emit(c2,f),Q2(this.collector,{type:x2[0],name:"getConf",value:JSON.stringify({errType:u.code||h,msg:u.msg||f.message,pathname:c,method:"post",status:200,params:n,response:u})})),e.next=20;break;case 12:e.prev=12,e.t0=e.catch(5),(m=e.t0).message=H0.trans(d2.GET_CONF_NET_FAIL[1]),y=d2.GET_CONF_NET_FAIL[0].toString(),m.name=y,this.emit(c2,m),Q2(this.collector,{type:x2[0],name:"getConf",value:JSON.stringify({errType:y,target:z2(null===(d=m.res)||void 0===d?void 0:d.target),msg:m.message,pathname:c,method:"post",status:null===(p=m.res)||void 0===p?void 0:p.status,params:n,response:W2(null===(v=m.res)||void 0===v?void 0:v.response,null===(g=m.res)||void 0===g?void 0:g.response)})});case 20:return e.abrupt("return",u?JSON.parse(W0(u.result,o,a)):{});case 21:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(){return a.apply(this,arguments)})},{key:"check",value:(r=o(regeneratorRuntime.mark((function e(n){var r,o,i,a,s,u,c,l,f,h,d,p,g,m,y,b,w,A,x,T,P,C=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=!(C.length>1&&void 0!==C[1])||C[1],o=C.length>2?C[2]:void 0,r&&this.emit(f2),i=this.options,a=i.businessKey,s=i.token,u=i.solutionType,c={businessKey:a,checkImages:n.map((function(e){return e.substring(e.indexOf(",")+1)})),nonce:V0(32),picType:p2,timestamp:Date.now(),token:s,solutionType:null!=o?o:u,sdkType:v2},l=U0(JSON.stringify(c)),f=l.key,h=l.eyptStr,d=l.iv,p={d:h,rk:d+f},m="/v1/liveperson/check",e.prev=8,e.next=11,this.request({method:"post",url:m,data:p,headers:t({},$2()),timeout:15e3},K2(this.netCollector));case 11:g=e.sent,e.next=23;break;case 14:e.prev=14,e.t0=e.catch(8),(x=e.t0).message=H0.trans(d2.CHECK_NET_FAIL[1]),T=d2.CHECK_NET_FAIL[0].toString(),x.name=T,this.emit(c2,x),P=v(c,P3),Q2(this.collector,{type:x2[0],name:"check",value:JSON.stringify({errType:T,target:z2(null===(y=x.res)||void 0===y?void 0:y.target),msg:x.message,pathname:m,method:"post",status:null===(b=x.res)||void 0===b?void 0:b.status,params:P,response:W2(null===(w=x.res)||void 0===w?void 0:w.response,null===(A=x.res)||void 0===A?void 0:A.response)})});case 23:return r&&this.emit(h2),e.abrupt("return",g?JSON.parse(W0(g.result,f,d)):{});case 25:case"end":return e.stop()}}),e,this,[[8,14]])}))),function(e){return r.apply(this,arguments)})},{key:"videoChange",value:(n=o(regeneratorRuntime.mark((function e(t){var n,r,o,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.check([t],!1,w2[0]);case 2:n=e.sent,r=n.status,o=n.token,r===y2?(i=this.iriskModule?"".concat(o,"_").concat(this.iriskToken):o,this.emit(u2,i)):this.collectCheckUnpassError("video",{status:r,token:o});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"collectCheckUnpassError",value:function(e,t){var n=new Error(H0.trans(d2.CHECK_ERROR[1])),r=d2.CHECK_ERROR[0].toString();n.name=r,this.emit(c2,n),Q2(this.collector,{type:x2[0],name:"check",value:JSON.stringify({errType:r,msg:n.message,pathname:"/v1/liveperson/check",method:"post",response:t,action:e})})}}]),w}(U2);return C3}));