@yidun/livedetect-sdk-h5 2.3.2 → 2.3.3

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.2
2
- 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(_q){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(_q){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=J["__core-js_shared__"]||xt("__core-js_shared__",{}),Pt=Tt;(yt.exports=function(e,t){return Pt[e]||(Pt[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 Ct=ke,_t=J.Object,Et=function(e){return _t(Ct(e))},St=Et,kt=me({}.hasOwnProperty),Rt=Object.hasOwn||function(e,t){return kt(St(e),t)},Ot=me,Ft=0,Mt=Math.random(),It=Ot(1..toString),Dt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+It(++Ft+Mt,36)},Lt=J,jt=yt.exports,Bt=Rt,Nt=Dt,Vt=Je,Ut=Ze,Wt=jt("wks"),zt=Lt.Symbol,Ht=zt&&zt.for,Gt=Ut?zt:zt&&zt.withoutSetter||Nt,Xt=function(e){if(!Bt(Wt,e)||!Vt&&"string"!=typeof Wt[e]){var t="Symbol."+e;Vt&&Bt(zt,e)?Wt[e]=zt[e]:Wt[e]=Ut&&Ht?Ht(t):Gt(t)}return Wt[e]},Qt=oe,Yt=De,qt=ot,Kt=ht,Jt=mt,Zt=Xt,$t=J.TypeError,en=Zt("toPrimitive"),tn=function(e,t){if(!Yt(e)||qt(e))return e;var n,r=Kt(e,en);if(r){if(void 0===t&&(t="default"),n=Qt(r,e,t),!Yt(n)||qt(n))return n;throw $t("Can't convert object to primitive value")}return void 0===t&&(t="number"),Jt(e,t)},nn=tn,rn=ot,on=function(e){var t=nn(e,"string");return rn(t)?t:t+""},an=De,sn=J.document,un=an(sn)&&an(sn.createElement),cn=function(e){return un?sn.createElement(e):{}},ln=cn,fn=!ee&&!$((function(){return 7!=Object.defineProperty(ln("div"),"a",{get:function(){return 7}}).a})),hn=ee,dn=oe,pn=ie,vn=fe,gn=Fe,mn=on,yn=Rt,bn=fn,wn=Object.getOwnPropertyDescriptor;Z.f=hn?wn:function(e,t){if(e=gn(e),t=mn(t),bn)try{return wn(e,t)}catch(n){}if(yn(e,t))return vn(!dn(pn.f,e,t),e[t])};var An={},xn=ee&&$((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Tn=J,Pn=De,Cn=Tn.String,_n=Tn.TypeError,En=function(e){if(Pn(e))return e;throw _n(Cn(e)+" is not an object")},Sn=ee,kn=fn,Rn=xn,On=En,Fn=on,Mn=J.TypeError,In=Object.defineProperty,Dn=Object.getOwnPropertyDescriptor;An.f=Sn?Rn?function(e,t,n){if(On(e),t=Fn(t),On(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var r=Dn(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return In(e,t,n)}:In:function(e,t,n){if(On(e),t=Fn(t),On(n),kn)try{return In(e,t,n)}catch(r){}if("get"in n||"set"in n)throw Mn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Ln=An,jn=fe,Bn=ee?function(e,t,n){return Ln.f(e,t,jn(1,n))}:function(e,t,n){return e[t]=n,e},Nn={exports:{}},Vn=Me,Un=Tt,Wn=me(Function.toString);Vn(Un.inspectSource)||(Un.inspectSource=function(e){return Wn(e)});var zn,Hn,Gn,Xn=Un.inspectSource,Qn=Me,Yn=Xn,qn=J.WeakMap,Kn=Qn(qn)&&/native code/.test(Yn(qn)),Jn=yt.exports,Zn=Dt,$n=Jn("keys"),er=function(e){return $n[e]||($n[e]=Zn(e))},tr={},nr=Kn,rr=J,or=me,ir=De,ar=Bn,sr=Rt,ur=Tt,cr=er,lr=tr,fr=rr.TypeError,hr=rr.WeakMap;if(nr||ur.state){var dr=ur.state||(ur.state=new hr),pr=or(dr.get),vr=or(dr.has),gr=or(dr.set);zn=function(e,t){if(vr(dr,e))throw new fr("Object already initialized");return t.facade=e,gr(dr,e,t),t},Hn=function(e){return pr(dr,e)||{}},Gn=function(e){return vr(dr,e)}}else{var mr=cr("state");lr[mr]=!0,zn=function(e,t){if(sr(e,mr))throw new fr("Object already initialized");return t.facade=e,ar(e,mr,t),t},Hn=function(e){return sr(e,mr)?e[mr]:{}},Gn=function(e){return sr(e,mr)}}var yr={set:zn,get:Hn,has:Gn,enforce:function(e){return Gn(e)?Hn(e):zn(e,{})},getterFor:function(e){return function(t){var n;if(!ir(t)||(n=Hn(t)).type!==e)throw fr("Incompatible receiver, "+e+" required");return n}}},br=ee,wr=Rt,Ar=Function.prototype,xr=br&&Object.getOwnPropertyDescriptor,Tr=wr(Ar,"name"),Pr={EXISTS:Tr,PROPER:Tr&&"something"===function(){}.name,CONFIGURABLE:Tr&&(!br||br&&xr(Ar,"name").configurable)},Cr=J,_r=Me,Er=Rt,Sr=Bn,kr=At,Rr=Xn,Or=Pr.CONFIGURABLE,Fr=yr.get,Mr=yr.enforce,Ir=String(String).split("String");(Nn.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;_r(n)&&("Symbol("===String(u).slice(0,7)&&(u="["+String(u).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Er(n,"name")||Or&&n.name!==u)&&Sr(n,"name",u),(o=Mr(n)).source||(o.source=Ir.join("string"==typeof u?u:""))),e!==Cr?(i?!s&&e[t]&&(a=!0):delete e[t],a?e[t]=n:Sr(e,t,n)):a?e[t]=n:kr(t,n)})(Function.prototype,"toString",(function(){return _r(this)&&Fr(this).source||Rr(this)}));var Dr={},Lr=Math.ceil,jr=Math.floor,Br=function(e){var t=+e;return t!=t||0===t?0:(t>0?jr:Lr)(t)},Nr=Br,Vr=Math.max,Ur=Math.min,Wr=function(e,t){var n=Nr(e);return n<0?Vr(n+t,0):Ur(n,t)},zr=Br,Hr=Math.min,Gr=function(e){return e>0?Hr(zr(e),9007199254740991):0},Xr=Gr,Qr=function(e){return Xr(e.length)},Yr=Fe,qr=Wr,Kr=Qr,Jr=function(e){return function(t,n,r){var o,i=Yr(t),a=Kr(i),s=qr(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}},Zr={includes:Jr(!0),indexOf:Jr(!1)},$r=Rt,eo=Fe,to=Zr.indexOf,no=tr,ro=me([].push),oo=function(e,t){var n,r=eo(e),o=0,i=[];for(n in r)!$r(no,n)&&$r(r,n)&&ro(i,n);for(;t.length>o;)$r(r,n=t[o++])&&(~to(i,n)||ro(i,n));return i},io=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ao=oo,so=io.concat("length","prototype");Dr.f=Object.getOwnPropertyNames||function(e){return ao(e,so)};var uo={};uo.f=Object.getOwnPropertySymbols;var co=Ne,lo=Dr,fo=uo,ho=En,po=me([].concat),vo=co("Reflect","ownKeys")||function(e){var t=lo.f(ho(e)),n=fo.f;return n?po(t,n(e)):t},go=Rt,mo=vo,yo=Z,bo=An,wo=function(e,t,n){for(var r=mo(t),o=bo.f,i=yo.f,a=0;a<r.length;a++){var s=r[a];go(e,s)||n&&go(n,s)||o(e,s,i(t,s))}},Ao=$,xo=Me,To=/#|\.prototype\./,Po=function(e,t){var n=_o[Co(e)];return n==So||n!=Eo&&(xo(t)?Ao(t):!!t)},Co=Po.normalize=function(e){return String(e).replace(To,".").toLowerCase()},_o=Po.data={},Eo=Po.NATIVE="N",So=Po.POLYFILL="P",ko=Po,Ro=J,Oo=Z.f,Fo=Bn,Mo=Nn.exports,Io=At,Do=wo,Lo=ko,jo=function(e,t){var n,r,o,i,a,s=e.target,u=e.global,c=e.stat;if(n=u?Ro:c?Ro[s]||Io(s,{}):(Ro[s]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=Oo(n,r))&&a.value:n[r],!Lo(u?r:s+(c?".":"#")+r,e.forced)&&void 0!==o){if(S(i)==S(o))continue;Do(i,o)}(e.sham||o&&o.sham)&&Fo(i,"sham",!0),Mo(n,r,i,e)}},Bo={};Bo[Xt("toStringTag")]="z";var No="[object z]"===String(Bo),Vo=J,Uo=No,Wo=Me,zo=Ae,Ho=Xt("toStringTag"),Go=Vo.Object,Xo="Arguments"==zo(function(){return arguments}()),Qo=Uo?zo: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=Go(e),Ho))?n:Xo?zo(t):"Object"==(r=zo(t))&&Wo(t.callee)?"Arguments":r},Yo=Qo,qo=J.String,Ko=function(e){if("Symbol"===Yo(e))throw TypeError("Cannot convert a Symbol value to a string");return qo(e)},Jo={},Zo=oo,$o=io,ei=Object.keys||function(e){return Zo(e,$o)},ti=ee,ni=xn,ri=An,oi=En,ii=Fe,ai=ei;Jo.f=ti&&!ni?Object.defineProperties:function(e,t){oi(e);for(var n,r=ii(t),o=ai(t),i=o.length,a=0;i>a;)ri.f(e,n=o[a++],r[n]);return e};var si,ui=Ne("document","documentElement"),ci=En,li=Jo,fi=io,hi=tr,di=ui,pi=cn,vi=er("IE_PROTO"),gi=function(){},mi=function(e){return"<script>"+e+"<\/script>"},yi=function(e){e.write(mi("")),e.close();var t=e.parentWindow.Object;return e=null,t},bi=function(){try{si=new ActiveXObject("htmlfile")}catch(r){}var e,t;bi="undefined"!=typeof document?document.domain&&si?yi(si):((t=pi("iframe")).style.display="none",di.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(mi("document.F=Object")),e.close(),e.F):yi(si);for(var n=fi.length;n--;)delete bi.prototype[fi[n]];return bi()};hi[vi]=!0;var wi=Object.create||function(e,t){var n;return null!==e?(gi.prototype=ci(e),n=new gi,gi.prototype=null,n[vi]=e):n=bi(),void 0===t?n:li.f(n,t)},Ai={},xi=on,Ti=An,Pi=fe,Ci=function(e,t,n){var r=xi(t);r in e?Ti.f(e,r,Pi(0,n)):e[r]=n},_i=Wr,Ei=Qr,Si=Ci,ki=J.Array,Ri=Math.max,Oi=function(e,t,n){for(var r=Ei(e),o=_i(t,r),i=_i(void 0===n?r:n,r),a=ki(Ri(i-o,0)),s=0;o<i;o++,s++)Si(a,s,e[o]);return a.length=s,a},Fi=Ae,Mi=Fe,Ii=Dr.f,Di=Oi,Li="object"==("undefined"==typeof window?"undefined":S(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ai.f=function(e){return Li&&"Window"==Fi(e)?function(e){try{return Ii(e)}catch(t){return Di(Li)}}(e):Ii(Mi(e))};var ji={},Bi=Xt;ji.f=Bi;var Ni=J,Vi=Rt,Ui=ji,Wi=An.f,zi=function(e){var t=Ni.Symbol||(Ni.Symbol={});Vi(t,e)||Wi(t,e,{value:Ui.f(e)})},Hi=oe,Gi=Ne,Xi=Xt,Qi=Nn.exports,Yi=function(){var e=Gi("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Xi("toPrimitive");t&&!t[r]&&Qi(t,r,(function(e){return Hi(n,this)}))},qi=An.f,Ki=Rt,Ji=Xt("toStringTag"),Zi=function(e,t,n){e&&!n&&(e=e.prototype),e&&!Ki(e,Ji)&&qi(e,Ji,{configurable:!0,value:t})},$i=lt,ea=te,ta=me(me.bind),na=function(e,t){return $i(e),void 0===t?e:ea?ta(e,t):function(){return e.apply(t,arguments)}},ra=Ae,oa=Array.isArray||function(e){return"Array"==ra(e)},ia=me,aa=$,sa=Me,ua=Qo,ca=Xn,la=function(){},fa=[],ha=Ne("Reflect","construct"),da=/^\s*(?:class|function)\b/,pa=ia(da.exec),va=!da.exec(la),ga=function(e){if(!sa(e))return!1;try{return ha(la,fa,e),!0}catch(t){return!1}},ma=function(e){if(!sa(e))return!1;switch(ua(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return va||!!pa(da,ca(e))}catch(t){return!0}};ma.sham=!0;var ya=!ha||aa((function(){var e;return ga(ga.call)||!ga(Object)||!ga((function(){e=!0}))||e}))?ma:ga,ba=J,wa=oa,Aa=ya,xa=De,Ta=Xt("species"),Pa=ba.Array,Ca=function(e){var t;return wa(e)&&(t=e.constructor,(Aa(t)&&(t===Pa||wa(t.prototype))||xa(t)&&null===(t=t[Ta]))&&(t=void 0)),void 0===t?Pa:t},_a=function(e,t){return new(Ca(e))(0===t?0:t)},Ea=na,Sa=Ee,ka=Et,Ra=Qr,Oa=_a,Fa=me([].push),Ma=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=ka(u),v=Sa(p),g=Ea(c,l),m=Ra(v),y=0,b=f||Oa,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:Fa(w,h)}else switch(e){case 4:return!1;case 7:Fa(w,h)}return i?-1:r||o?o:w}},Ia={forEach:Ma(0),map:Ma(1),filter:Ma(2),some:Ma(3),every:Ma(4),find:Ma(5),findIndex:Ma(6),filterReject:Ma(7)},Da=jo,La=J,ja=oe,Ba=me,Na=ee,Va=Je,Ua=$,Wa=Rt,za=Ve,Ha=En,Ga=Fe,Xa=on,Qa=Ko,Ya=fe,qa=wi,Ka=ei,Ja=Dr,Za=Ai,$a=uo,es=Z,ts=An,ns=Jo,rs=ie,os=Nn.exports,is=yt.exports,as=tr,ss=Dt,us=Xt,cs=ji,ls=zi,fs=Yi,hs=Zi,ds=yr,ps=Ia.forEach,vs=er("hidden"),gs=ds.set,ms=ds.getterFor("Symbol"),ys=Object.prototype,bs=La.Symbol,ws=bs&&bs.prototype,As=La.TypeError,xs=La.QObject,Ts=es.f,Ps=ts.f,Cs=Za.f,_s=rs.f,Es=Ba([].push),Ss=is("symbols"),ks=is("op-symbols"),Rs=is("wks"),Os=!xs||!xs.prototype||!xs.prototype.findChild,Fs=Na&&Ua((function(){return 7!=qa(Ps({},"a",{get:function(){return Ps(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Ts(ys,t);r&&delete ys[t],Ps(e,t,n),r&&e!==ys&&Ps(ys,t,r)}:Ps,Ms=function(e,t){var n=Ss[e]=qa(ws);return gs(n,{type:"Symbol",tag:e,description:t}),Na||(n.description=t),n},Is=function(e,t,n){e===ys&&Is(ks,t,n),Ha(e);var r=Xa(t);return Ha(n),Wa(Ss,r)?(n.enumerable?(Wa(e,vs)&&e[vs][r]&&(e[vs][r]=!1),n=qa(n,{enumerable:Ya(0,!1)})):(Wa(e,vs)||Ps(e,vs,Ya(1,{})),e[vs][r]=!0),Fs(e,r,n)):Ps(e,r,n)},Ds=function(e,t){Ha(e);var n=Ga(t),r=Ka(n).concat(Ns(n));return ps(r,(function(t){Na&&!ja(Ls,n,t)||Is(e,t,n[t])})),e},Ls=function(e){var t=Xa(e),n=ja(_s,this,t);return!(this===ys&&Wa(Ss,t)&&!Wa(ks,t))&&(!(n||!Wa(this,t)||!Wa(Ss,t)||Wa(this,vs)&&this[vs][t])||n)},js=function(e,t){var n=Ga(e),r=Xa(t);if(n!==ys||!Wa(Ss,r)||Wa(ks,r)){var o=Ts(n,r);return!o||!Wa(Ss,r)||Wa(n,vs)&&n[vs][r]||(o.enumerable=!0),o}},Bs=function(e){var t=Cs(Ga(e)),n=[];return ps(t,(function(e){Wa(Ss,e)||Wa(as,e)||Es(n,e)})),n},Ns=function(e){var t=e===ys,n=Cs(t?ks:Ga(e)),r=[];return ps(n,(function(e){!Wa(Ss,e)||t&&!Wa(ys,e)||Es(r,Ss[e])})),r};Va||(os(ws=(bs=function(){if(za(ws,this))throw As("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Qa(arguments[0]):void 0,t=ss(e),n=function e(n){this===ys&&ja(e,ks,n),Wa(this,vs)&&Wa(this[vs],t)&&(this[vs][t]=!1),Fs(this,t,Ya(1,n))};return Na&&Os&&Fs(ys,t,{configurable:!0,set:n}),Ms(t,e)}).prototype,"toString",(function(){return ms(this).tag})),os(bs,"withoutSetter",(function(e){return Ms(ss(e),e)})),rs.f=Ls,ts.f=Is,ns.f=Ds,es.f=js,Ja.f=Za.f=Bs,$a.f=Ns,cs.f=function(e){return Ms(us(e),e)},Na&&(Ps(ws,"description",{configurable:!0,get:function(){return ms(this).description}}),os(ys,"propertyIsEnumerable",Ls,{unsafe:!0}))),Da({global:!0,wrap:!0,forced:!Va,sham:!Va},{Symbol:bs}),ps(Ka(Rs),(function(e){ls(e)})),Da({target:"Symbol",stat:!0,forced:!Va},{useSetter:function(){Os=!0},useSimple:function(){Os=!1}}),Da({target:"Object",stat:!0,forced:!Va,sham:!Na},{create:function(e,t){return void 0===t?qa(e):Ds(qa(e),t)},defineProperty:Is,defineProperties:Ds,getOwnPropertyDescriptor:js}),Da({target:"Object",stat:!0,forced:!Va},{getOwnPropertyNames:Bs}),fs(),hs(bs,"Symbol"),as[vs]=!0;var Vs=Je&&!!Symbol.for&&!!Symbol.keyFor,Us=jo,Ws=Ne,zs=Rt,Hs=Ko,Gs=yt.exports,Xs=Vs,Qs=Gs("string-to-symbol-registry"),Ys=Gs("symbol-to-string-registry");Us({target:"Symbol",stat:!0,forced:!Xs},{for:function(e){var t=Hs(e);if(zs(Qs,t))return Qs[t];var n=Ws("Symbol")(t);return Qs[t]=n,Ys[n]=t,n}});var qs=jo,Ks=Rt,Js=ot,Zs=at,$s=Vs,eu=(0,yt.exports)("symbol-to-string-registry");qs({target:"Symbol",stat:!0,forced:!$s},{keyFor:function(e){if(!Js(e))throw TypeError(Zs(e)+" is not a symbol");if(Ks(eu,e))return eu[e]}});var tu=te,nu=Function.prototype,ru=nu.apply,ou=nu.call,iu="object"==("undefined"==typeof Reflect?"undefined":S(Reflect))&&Reflect.apply||(tu?ou.bind(ru):function(){return ou.apply(ru,arguments)}),au=me([].slice),su=jo,uu=Ne,cu=iu,lu=oe,fu=me,hu=$,du=oa,pu=Me,vu=De,gu=ot,mu=au,yu=Je,bu=uu("JSON","stringify"),wu=fu(/./.exec),Au=fu("".charAt),xu=fu("".charCodeAt),Tu=fu("".replace),Pu=fu(1..toString),Cu=/[\uD800-\uDFFF]/g,_u=/^[\uD800-\uDBFF]$/,Eu=/^[\uDC00-\uDFFF]$/,Su=!yu||hu((function(){var e=uu("Symbol")();return"[null]"!=bu([e])||"{}"!=bu({a:e})||"{}"!=bu(Object(e))})),ku=hu((function(){return'"\\udf06\\ud834"'!==bu("\udf06\ud834")||'"\\udead"'!==bu("\udead")})),Ru=function(e,t){var n=mu(arguments),r=t;if((vu(t)||void 0!==e)&&!gu(e))return du(t)||(t=function(e,t){if(pu(r)&&(t=lu(r,this,e,t)),!gu(t))return t}),n[1]=t,cu(bu,null,n)},Ou=function(e,t,n){var r=Au(n,t-1),o=Au(n,t+1);return wu(_u,e)&&!wu(Eu,o)||wu(Eu,e)&&!wu(_u,r)?"\\u"+Pu(xu(e,0),16):e};bu&&su({target:"JSON",stat:!0,forced:Su||ku},{stringify:function(e,t,n){var r=mu(arguments),o=cu(Su?Ru:bu,null,r);return ku&&"string"==typeof o?Tu(o,Cu,Ou):o}});var Fu=uo,Mu=Et;jo({target:"Object",stat:!0,forced:!Je||$((function(){Fu.f(1)}))},{getOwnPropertySymbols:function(e){var t=Fu.f;return t?t(Mu(e)):[]}});var Iu=jo,Du=ee,Lu=J,ju=me,Bu=Rt,Nu=Me,Vu=Ve,Uu=Ko,Wu=An.f,zu=wo,Hu=Lu.Symbol,Gu=Hu&&Hu.prototype;if(Du&&Nu(Hu)&&(!("description"in Gu)||void 0!==Hu().description)){var Xu={},Qu=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Uu(arguments[0]),t=Vu(Gu,this)?new Hu(e):void 0===e?Hu():Hu(e);return""===e&&(Xu[t]=!0),t};zu(Qu,Hu),Qu.prototype=Gu,Gu.constructor=Qu;var Yu="Symbol(test)"==String(Hu("test")),qu=ju(Gu.toString),Ku=ju(Gu.valueOf),Ju=/^Symbol\((.*)\)[^)]+$/,Zu=ju("".replace),$u=ju("".slice);Wu(Gu,"description",{configurable:!0,get:function(){var e=Ku(this),t=qu(e);if(Bu(Xu,e))return"";var n=Yu?$u(t,7,-1):Zu(t,Ju,"$1");return""===n?void 0:n}}),Iu({global:!0,forced:!0},{Symbol:Qu})}zi("asyncIterator"),zi("hasInstance"),zi("isConcatSpreadable"),zi("iterator"),zi("match"),zi("replace"),zi("search"),zi("species"),zi("split");var ec=Yi;zi("toPrimitive"),ec();var tc=Ne,nc=Zi;zi("toStringTag"),nc(tc("Symbol"),"Symbol"),zi("unscopables");var rc=$,oc=Ye,ic=Xt("species"),ac=function(e){return oc>=51||!rc((function(){var t=[];return(t.constructor={})[ic]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},sc=jo,uc=J,cc=$,lc=oa,fc=De,hc=Et,dc=Qr,pc=Ci,vc=_a,gc=ac,mc=Ye,yc=Xt("isConcatSpreadable"),bc=uc.TypeError,wc=mc>=51||!cc((function(){var e=[];return e[yc]=!1,e.concat()[0]!==e})),Ac=gc("concat"),xc=function(e){if(!fc(e))return!1;var t=e[yc];return void 0!==t?!!t:lc(e)};sc({target:"Array",proto:!0,forced:!wc||!Ac},{concat:function(e){var t,n,r,o,i,a=hc(this),s=vc(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(xc(i=-1===t?a:arguments[t])){if(u+(o=dc(i))>9007199254740991)throw bc("Maximum allowed index exceeded");for(n=0;n<o;n++,u++)n in i&&pc(s,u,i[n])}else{if(u>=9007199254740991)throw bc("Maximum allowed index exceeded");pc(s,u++,i)}return s.length=u,s}});var Tc=Et,Pc=Wr,Cc=Qr,_c=Math.min,Ec=[].copyWithin||function(e,t){var n=Tc(this),r=Cc(n),o=Pc(e,r),i=Pc(t,r),a=arguments.length>2?arguments[2]:void 0,s=_c((void 0===a?r:Pc(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},Sc=wi,kc=An,Rc=Xt("unscopables"),Oc=Array.prototype;null==Oc[Rc]&&kc.f(Oc,Rc,{configurable:!0,value:Sc(null)});var Fc=function(e){Oc[Rc][e]=!0},Mc=Fc;jo({target:"Array",proto:!0},{copyWithin:Ec}),Mc("copyWithin");var Ic=Et,Dc=Wr,Lc=Qr,jc=function(e){for(var t=Ic(this),n=Lc(t),r=arguments.length,o=Dc(r>1?arguments[1]:void 0,n),i=r>2?arguments[2]:void 0,a=void 0===i?n:Dc(i,n);a>o;)t[o++]=e;return t},Bc=Fc;jo({target:"Array",proto:!0},{fill:jc}),Bc("fill");var Nc=Ia.filter;jo({target:"Array",proto:!0,forced:!ac("filter")},{filter:function(e){return Nc(this,e,arguments.length>1?arguments[1]:void 0)}});var Vc=jo,Uc=Ia.find,Wc=Fc,zc=!0;"find"in[]&&Array(1).find((function(){zc=!1})),Vc({target:"Array",proto:!0,forced:zc},{find:function(e){return Uc(this,e,arguments.length>1?arguments[1]:void 0)}}),Wc("find");var Hc=jo,Gc=Ia.findIndex,Xc=Fc,Qc=!0;"findIndex"in[]&&Array(1).findIndex((function(){Qc=!1})),Hc({target:"Array",proto:!0,forced:Qc},{findIndex:function(e){return Gc(this,e,arguments.length>1?arguments[1]:void 0)}}),Xc("findIndex");var Yc=oa,qc=Qr,Kc=na,Jc=J.TypeError,Zc=function e(t,n,r,o,i,a,s,u){for(var c,l=i,f=0,h=!!s&&Kc(s,u);f<o;){if(f in r){if(c=h?h(r[f],f,n):r[f],a>0&&Yc(c))l=e(t,n,c,qc(c),l,a-1)-1;else{if(l>=9007199254740991)throw Jc("Exceed the acceptable array length");t[l]=c}l++}f++}return l},$c=Zc,el=Et,tl=Qr,nl=Br,rl=_a;jo({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=el(this),n=tl(t),r=rl(t,0);return r.length=$c(r,t,t,n,0,void 0===e?1:nl(e)),r}});var ol=Zc,il=lt,al=Et,sl=Qr,ul=_a;jo({target:"Array",proto:!0},{flatMap:function(e){var t,n=al(this),r=sl(n);return il(e),(t=ul(n,0)).length=ol(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var cl=oe,ll=En,fl=ht,hl=function(e,t,n){var r,o;ll(e);try{if(!(r=fl(e,"return"))){if("throw"===t)throw n;return n}r=cl(r,e)}catch(i){o=!0,r=i}if("throw"===t)throw n;if(o)throw r;return ll(r),n},dl=En,pl=hl,vl={},gl=vl,ml=Xt("iterator"),yl=Array.prototype,bl=function(e){return void 0!==e&&(gl.Array===e||yl[ml]===e)},wl=Qo,Al=ht,xl=vl,Tl=Xt("iterator"),Pl=function(e){if(null!=e)return Al(e,Tl)||Al(e,"@@iterator")||xl[wl(e)]},Cl=oe,_l=lt,El=En,Sl=at,kl=Pl,Rl=J.TypeError,Ol=function(e,t){var n=arguments.length<2?kl(e):t;if(_l(n))return El(Cl(n,e));throw Rl(Sl(e)+" is not iterable")},Fl=na,Ml=oe,Il=Et,Dl=function(e,t,n,r){try{return r?t(dl(n)[0],n[1]):t(n)}catch(o){pl(e,"throw",o)}},Ll=bl,jl=ya,Bl=Qr,Nl=Ci,Vl=Ol,Ul=Pl,Wl=J.Array,zl=function(e){var t=Il(e),n=jl(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=void 0!==o;i&&(o=Fl(o,r>2?arguments[2]:void 0));var a,s,u,c,l,f,h=Ul(t),d=0;if(!h||this==Wl&&Ll(h))for(a=Bl(t),s=n?new this(a):Wl(a);a>d;d++)f=i?o(t[d],d):t[d],Nl(s,d,f);else for(l=(c=Vl(t,h)).next,s=n?new this:[];!(u=Ml(l,c)).done;d++)f=i?Dl(c,o,[u.value,d],!0):u.value,Nl(s,d,f);return s.length=d,s},Hl=Xt("iterator"),Gl=!1;try{var Xl=0,Ql={next:function(){return{done:!!Xl++}},return:function(){Gl=!0}};Ql[Hl]=function(){return this},Array.from(Ql,(function(){throw 2}))}catch(w1){}var Yl=function(e,t){if(!t&&!Gl)return!1;var n=!1;try{var r={};r[Hl]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(w1){}return n},ql=zl;jo({target:"Array",stat:!0,forced:!Yl((function(e){Array.from(e)}))},{from:ql});var Kl=Zr.includes,Jl=Fc;jo({target:"Array",proto:!0},{includes:function(e){return Kl(this,e,arguments.length>1?arguments[1]:void 0)}}),Jl("includes");var Zl=$,$l=function(e,t){var n=[][e];return!!n&&Zl((function(){n.call(null,t||function(){return 1},1)}))},ef=jo,tf=Zr.indexOf,nf=$l,rf=me([].indexOf),of=!!rf&&1/rf([1],1,-0)<0,af=nf("indexOf");ef({target:"Array",proto:!0,forced:of||!af},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return of?rf(this,e,t)||0:tf(this,e,t)}});var sf,uf,cf,lf=!$((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ff=J,hf=Rt,df=Me,pf=Et,vf=lf,gf=er("IE_PROTO"),mf=ff.Object,yf=mf.prototype,bf=vf?mf.getPrototypeOf:function(e){var t=pf(e);if(hf(t,gf))return t[gf];var n=t.constructor;return df(n)&&t instanceof n?n.prototype:t instanceof mf?yf:null},wf=$,Af=Me,xf=bf,Tf=Nn.exports,Pf=Xt("iterator"),Cf=!1;[].keys&&("next"in(cf=[].keys())?(uf=xf(xf(cf)))!==Object.prototype&&(sf=uf):Cf=!0);var _f=null==sf||wf((function(){var e={};return sf[Pf].call(e)!==e}));_f&&(sf={}),Af(sf[Pf])||Tf(sf,Pf,(function(){return this}));var Ef={IteratorPrototype:sf,BUGGY_SAFARI_ITERATORS:Cf},Sf=Ef.IteratorPrototype,kf=wi,Rf=fe,Of=Zi,Ff=vl,Mf=function(){return this},If=function(e,t,n,r){var o=t+" Iterator";return e.prototype=kf(Sf,{next:Rf(+!r,n)}),Of(e,o,!1),Ff[o]=Mf,e},Df=J,Lf=Me,jf=Df.String,Bf=Df.TypeError,Nf=function(e){if("object"==S(e)||Lf(e))return e;throw Bf("Can't set "+jf(e)+" as a prototype")},Vf=me,Uf=En,Wf=Nf,zf=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Vf(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(w1){}return function(n,r){return Uf(n),Wf(r),t?e(n,r):n.__proto__=r,n}}():void 0),Hf=jo,Gf=oe,Xf=Pr,Qf=Me,Yf=If,qf=bf,Kf=zf,Jf=Zi,Zf=Bn,$f=Nn.exports,eh=vl,th=Xf.PROPER,nh=Xf.CONFIGURABLE,rh=Ef.IteratorPrototype,oh=Ef.BUGGY_SAFARI_ITERATORS,ih=Xt("iterator"),ah=function(){return this},sh=function(e,t,n,r,o,i,a){Yf(n,t,r);var s,u,c,l=function(e){if(e===o&&v)return v;if(!oh&&e in d)return d[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[ih]||d["@@iterator"]||o&&d[o],v=!oh&&p||l(o),g="Array"==t&&d.entries||p;if(g&&(s=qf(g.call(new e)))!==Object.prototype&&s.next&&(qf(s)!==rh&&(Kf?Kf(s,rh):Qf(s[ih])||$f(s,ih,ah)),Jf(s,f,!0)),th&&"values"==o&&p&&"values"!==p.name&&(nh?Zf(d,"name","values"):(h=!0,v=function(){return Gf(p,this)})),o)if(u={values:l("values"),keys:i?v:l("keys"),entries:l("entries")},a)for(c in u)(oh||h||!(c in d))&&$f(d,c,u[c]);else Hf({target:t,proto:!0,forced:oh||h},u);return d[ih]!==v&&$f(d,ih,v,{name:o}),eh[t]=v,u},uh=Fe,ch=Fc,lh=vl,fh=yr,hh=An.f,dh=sh,ph=ee,vh=fh.set,gh=fh.getterFor("Array Iterator"),mh=dh(Array,"Array",(function(e,t){vh(this,{type:"Array Iterator",target:uh(e),index:0,kind:t})}),(function(){var e=gh(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"),yh=lh.Arguments=lh.Array;if(ch("keys"),ch("values"),ch("entries"),ph&&"values"!==yh.name)try{hh(yh,"name",{value:"values"})}catch(w1){}var bh=jo,wh=Ee,Ah=Fe,xh=$l,Th=me([].join),Ph=wh!=Object,Ch=xh("join",",");bh({target:"Array",proto:!0,forced:Ph||!Ch},{join:function(e){return Th(Ah(this),void 0===e?",":e)}});var _h=iu,Eh=Fe,Sh=Br,kh=Qr,Rh=$l,Oh=Math.min,Fh=[].lastIndexOf,Mh=!!Fh&&1/[1].lastIndexOf(1,-0)<0,Ih=Rh("lastIndexOf"),Dh=Mh||!Ih?function(e){if(Mh)return _h(Fh,this,arguments)||0;var t=Eh(this),n=kh(t),r=n-1;for(arguments.length>1&&(r=Oh(r,Sh(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:Fh;jo({target:"Array",proto:!0,forced:Dh!==[].lastIndexOf},{lastIndexOf:Dh});var Lh=Ia.map;jo({target:"Array",proto:!0,forced:!ac("map")},{map:function(e){return Lh(this,e,arguments.length>1?arguments[1]:void 0)}});var jh=jo,Bh=$,Nh=ya,Vh=Ci,Uh=J.Array;jh({target:"Array",stat:!0,forced:Bh((function(){function e(){}return!(Uh.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new(Nh(this)?this:Uh)(t);t>e;)Vh(n,e,arguments[e++]);return n.length=t,n}});var Wh=lt,zh=Et,Hh=Ee,Gh=Qr,Xh=J.TypeError,Qh=function(e){return function(t,n,r,o){Wh(n);var i=zh(t),a=Hh(i),s=Gh(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 Xh("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}},Yh={left:Qh(!1),right:Qh(!0)},qh="process"==Ae(J.process),Kh=Yh.left,Jh=Ye,Zh=qh;jo({target:"Array",proto:!0,forced:!$l("reduce")||!Zh&&Jh>79&&Jh<83},{reduce:function(e){var t=arguments.length;return Kh(this,e,t,t>1?arguments[1]:void 0)}});var $h=Yh.right,ed=Ye,td=qh;jo({target:"Array",proto:!0,forced:!$l("reduceRight")||!td&&ed>79&&ed<83},{reduceRight:function(e){return $h(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var nd=jo,rd=oa,od=me([].reverse),id=[1,2];nd({target:"Array",proto:!0,forced:String(id)===String(id.reverse())},{reverse:function(){return rd(this)&&(this.length=this.length),od(this)}});var ad=jo,sd=J,ud=oa,cd=ya,ld=De,fd=Wr,hd=Qr,dd=Fe,pd=Ci,vd=Xt,gd=au,md=ac("slice"),yd=vd("species"),bd=sd.Array,wd=Math.max;ad({target:"Array",proto:!0,forced:!md},{slice:function(e,t){var n,r,o,i=dd(this),a=hd(i),s=fd(e,a),u=fd(void 0===t?a:t,a);if(ud(i)&&(n=i.constructor,(cd(n)&&(n===bd||ud(n.prototype))||ld(n)&&null===(n=n[yd]))&&(n=void 0),n===bd||void 0===n))return gd(i,s,u);for(r=new(void 0===n?bd:n)(wd(u-s,0)),o=0;s<u;s++,o++)s in i&&pd(r,o,i[s]);return r.length=o,r}});var Ad=Oi,xd=Math.floor,Td=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},Pd=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},Cd=function e(t,n){var r=t.length,o=xd(r/2);return r<8?Td(t,n):Pd(t,e(Ad(t,0,o),n),e(Ad(t,o),n),n)},_d=Ue.match(/firefox\/(\d+)/i),Ed=!!_d&&+_d[1],Sd=/MSIE|Trident/.test(Ue),kd=Ue.match(/AppleWebKit\/(\d+)\./),Rd=!!kd&&+kd[1],Od=jo,Fd=me,Md=lt,Id=Et,Dd=Qr,Ld=Ko,jd=$,Bd=Cd,Nd=$l,Vd=Ed,Ud=Sd,Wd=Ye,zd=Rd,Hd=[],Gd=Fd(Hd.sort),Xd=Fd(Hd.push),Qd=jd((function(){Hd.sort(void 0)})),Yd=jd((function(){Hd.sort(null)})),qd=Nd("sort"),Kd=!jd((function(){if(Wd)return Wd<70;if(!(Vd&&Vd>3)){if(Ud)return!0;if(zd)return zd<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++)Hd.push({k:t+r,v:n})}for(Hd.sort((function(e,t){return t.v-e.v})),r=0;r<Hd.length;r++)t=Hd[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}}));Od({target:"Array",proto:!0,forced:Qd||!Yd||!qd||!Kd},{sort:function(e){void 0!==e&&Md(e);var t=Id(this);if(Kd)return void 0===e?Gd(t):Gd(t,e);var n,r,o=[],i=Dd(t);for(r=0;r<i;r++)r in t&&Xd(o,t[r]);for(Bd(o,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Ld(t)>Ld(n)?1:-1}}(e)),n=o.length,r=0;r<n;)t[r]=o[r++];for(;r<i;)delete t[r++];return t}});var Jd=Ne,Zd=An,$d=ee,ep=Xt("species"),tp=function(e){var t=Jd(e),n=Zd.f;$d&&t&&!t[ep]&&n(t,ep,{configurable:!0,get:function(){return this}})};tp("Array");var np=jo,rp=J,op=Wr,ip=Br,ap=Qr,sp=Et,up=_a,cp=Ci,lp=ac("splice"),fp=rp.TypeError,hp=Math.max,dp=Math.min;np({target:"Array",proto:!0,forced:!lp},{splice:function(e,t){var n,r,o,i,a,s,u=sp(this),c=ap(u),l=op(e,c),f=arguments.length;if(0===f?n=r=0:1===f?(n=0,r=c-l):(n=f-2,r=dp(hp(ip(t),0),c-l)),c+n-r>9007199254740991)throw fp("Maximum allowed length exceeded");for(o=up(u,r),i=0;i<r;i++)(a=l+i)in u&&cp(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}}),Fc("flat"),Fc("flatMap");var pp="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,vp=Nn.exports,gp=function(e,t,n){for(var r in t)vp(e,r,t[r],n);return e},mp=Ve,yp=J.TypeError,bp=function(e,t){if(mp(t,e))return e;throw yp("Incorrect invocation")},wp=Br,Ap=Gr,xp=J.RangeError,Tp=function(e){if(void 0===e)return 0;var t=wp(e),n=Ap(t);if(t!==n)throw xp("Wrong length or index");return n},Pp=J.Array,Cp=Math.abs,_p=Math.pow,Ep=Math.floor,Sp=Math.log,kp=Math.LN2,Rp={pack:function(e,t,n){var r,o,i,a=Pp(n),s=8*n-t-1,u=(1<<s)-1,c=u>>1,l=23===t?_p(2,-24)-_p(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=Cp(e))!=e||e===1/0?(o=e!=e?1:0,r=u):(r=Ep(Sp(e)/kp),e*(i=_p(2,-r))<1&&(r--,i*=2),(e+=r+c>=1?l/i:l*_p(2,1-c))*i>=2&&(r++,i/=2),r+c>=u?(o=0,r=u):r+c>=1?(o=(e*i-1)*_p(2,t),r+=c):(o=e*_p(2,c-1)*_p(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+=_p(2,t),l-=a}return(c?-1:1)*n*_p(2,l-t)}},Op=J,Fp=me,Mp=ee,Ip=pp,Dp=Pr,Lp=Bn,jp=gp,Bp=$,Np=bp,Vp=Br,Up=Gr,Wp=Tp,zp=Rp,Hp=bf,Gp=zf,Xp=Dr.f,Qp=An.f,Yp=jc,qp=Oi,Kp=Zi,Jp=Dp.PROPER,Zp=Dp.CONFIGURABLE,$p=yr.get,ev=yr.set,tv=Op.ArrayBuffer,nv=tv,rv=nv&&nv.prototype,ov=Op.DataView,iv=ov&&ov.prototype,av=Object.prototype,sv=Op.Array,uv=Op.RangeError,cv=Fp(Yp),lv=Fp([].reverse),fv=zp.pack,hv=zp.unpack,dv=function(e){return[255&e]},pv=function(e){return[255&e,e>>8&255]},vv=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},gv=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},mv=function(e){return fv(e,23,4)},yv=function(e){return fv(e,52,8)},bv=function(e,t){Qp(e.prototype,t,{get:function(){return $p(this)[t]}})},wv=function(e,t,n,r){var o=Wp(n),i=$p(e);if(o+t>i.byteLength)throw uv("Wrong index");var a=$p(i.buffer).bytes,s=o+i.byteOffset,u=qp(a,s,s+t);return r?u:lv(u)},Av=function(e,t,n,r,o,i){var a=Wp(n),s=$p(e);if(a+t>s.byteLength)throw uv("Wrong index");for(var u=$p(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(Ip){var xv=Jp&&"ArrayBuffer"!==tv.name;if(Bp((function(){tv(1)}))&&Bp((function(){new tv(-1)}))&&!Bp((function(){return new tv,new tv(1.5),new tv(NaN),xv&&!Zp})))xv&&Zp&&Lp(tv,"name","ArrayBuffer");else{(nv=function(e){return Np(this,rv),new tv(Wp(e))}).prototype=rv;for(var Tv,Pv=Xp(tv),Cv=0;Pv.length>Cv;)(Tv=Pv[Cv++])in nv||Lp(nv,Tv,tv[Tv]);rv.constructor=nv}Gp&&Hp(iv)!==av&&Gp(iv,av);var _v=new ov(new nv(2)),Ev=Fp(iv.setInt8);_v.setInt8(0,2147483648),_v.setInt8(1,2147483649),!_v.getInt8(0)&&_v.getInt8(1)||jp(iv,{setInt8:function(e,t){Ev(this,e,t<<24>>24)},setUint8:function(e,t){Ev(this,e,t<<24>>24)}},{unsafe:!0})}else rv=(nv=function(e){Np(this,rv);var t=Wp(e);ev(this,{bytes:cv(sv(t),0),byteLength:t}),Mp||(this.byteLength=t)}).prototype,iv=(ov=function(e,t,n){Np(this,iv),Np(e,rv);var r=$p(e).byteLength,o=Vp(t);if(o<0||o>r)throw uv("Wrong offset");if(o+(n=void 0===n?r-o:Up(n))>r)throw uv("Wrong length");ev(this,{buffer:e,byteLength:n,byteOffset:o}),Mp||(this.buffer=e,this.byteLength=n,this.byteOffset=o)}).prototype,Mp&&(bv(nv,"byteLength"),bv(ov,"buffer"),bv(ov,"byteLength"),bv(ov,"byteOffset")),jp(iv,{getInt8:function(e){return wv(this,1,e)[0]<<24>>24},getUint8:function(e){return wv(this,1,e)[0]},getInt16:function(e){var t=wv(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=wv(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return gv(wv(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return gv(wv(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return hv(wv(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return hv(wv(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Av(this,1,e,dv,t)},setUint8:function(e,t){Av(this,1,e,dv,t)},setInt16:function(e,t){Av(this,2,e,pv,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Av(this,2,e,pv,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Av(this,4,e,vv,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Av(this,4,e,vv,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Av(this,4,e,mv,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Av(this,8,e,yv,t,arguments.length>2?arguments[2]:void 0)}});Kp(nv,"ArrayBuffer"),Kp(ov,"DataView");var Sv={ArrayBuffer:nv,DataView:ov},kv=tp,Rv=Sv.ArrayBuffer;jo({global:!0,forced:J.ArrayBuffer!==Rv},{ArrayBuffer:Rv}),kv("ArrayBuffer");var Ov,Fv,Mv,Iv=pp,Dv=ee,Lv=J,jv=Me,Bv=De,Nv=Rt,Vv=Qo,Uv=at,Wv=Bn,zv=Nn.exports,Hv=An.f,Gv=Ve,Xv=bf,Qv=zf,Yv=Xt,qv=Dt,Kv=Lv.Int8Array,Jv=Kv&&Kv.prototype,Zv=Lv.Uint8ClampedArray,$v=Zv&&Zv.prototype,eg=Kv&&Xv(Kv),tg=Jv&&Xv(Jv),ng=Object.prototype,rg=Lv.TypeError,og=Yv("toStringTag"),ig=qv("TYPED_ARRAY_TAG"),ag=qv("TYPED_ARRAY_CONSTRUCTOR"),sg=Iv&&!!Qv&&"Opera"!==Vv(Lv.opera),ug=!1,cg={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},lg={BigInt64Array:8,BigUint64Array:8},fg=function(e){if(!Bv(e))return!1;var t=Vv(e);return Nv(cg,t)||Nv(lg,t)};for(Ov in cg)(Mv=(Fv=Lv[Ov])&&Fv.prototype)?Wv(Mv,ag,Fv):sg=!1;for(Ov in lg)(Mv=(Fv=Lv[Ov])&&Fv.prototype)&&Wv(Mv,ag,Fv);if((!sg||!jv(eg)||eg===Function.prototype)&&(eg=function(){throw rg("Incorrect invocation")},sg))for(Ov in cg)Lv[Ov]&&Qv(Lv[Ov],eg);if((!sg||!tg||tg===ng)&&(tg=eg.prototype,sg))for(Ov in cg)Lv[Ov]&&Qv(Lv[Ov].prototype,tg);if(sg&&Xv($v)!==tg&&Qv($v,tg),Dv&&!Nv(tg,og))for(Ov in ug=!0,Hv(tg,og,{get:function(){return Bv(this)?this[ig]:void 0}}),cg)Lv[Ov]&&Wv(Lv[Ov],ig,Ov);var hg={NATIVE_ARRAY_BUFFER_VIEWS:sg,TYPED_ARRAY_CONSTRUCTOR:ag,TYPED_ARRAY_TAG:ug&&ig,aTypedArray:function(e){if(fg(e))return e;throw rg("Target is not a typed array")},aTypedArrayConstructor:function(e){if(jv(e)&&(!Qv||Gv(eg,e)))return e;throw rg(Uv(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(Dv){if(n)for(var o in cg){var i=Lv[o];if(i&&Nv(i.prototype,e))try{delete i.prototype[e]}catch(w1){try{i.prototype[e]=t}catch(a){}}}tg[e]&&!n||zv(tg,e,n?t:sg&&Jv[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(Dv){if(Qv){if(n)for(r in cg)if((o=Lv[r])&&Nv(o,e))try{delete o[e]}catch(w1){}if(eg[e]&&!n)return;try{return zv(eg,e,n?t:sg&&eg[e]||t)}catch(w1){}}for(r in cg)!(o=Lv[r])||o[e]&&!n||zv(o,e,t)}},isView:function(e){if(!Bv(e))return!1;var t=Vv(e);return"DataView"===t||Nv(cg,t)||Nv(lg,t)},isTypedArray:fg,TypedArray:eg,TypedArrayPrototype:tg};jo({target:"ArrayBuffer",stat:!0,forced:!hg.NATIVE_ARRAY_BUFFER_VIEWS},{isView:hg.isView});var dg=ya,pg=at,vg=J.TypeError,gg=function(e){if(dg(e))return e;throw vg(pg(e)+" is not a constructor")},mg=En,yg=gg,bg=Xt("species"),wg=function(e,t){var n,r=mg(e).constructor;return void 0===r||null==(n=mg(r)[bg])?t:yg(n)},Ag=jo,xg=me,Tg=$,Pg=En,Cg=Wr,_g=Gr,Eg=wg,Sg=Sv.ArrayBuffer,kg=Sv.DataView,Rg=kg.prototype,Og=xg(Sg.prototype.slice),Fg=xg(Rg.getUint8),Mg=xg(Rg.setUint8);Ag({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:Tg((function(){return!new Sg(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(Og&&void 0===t)return Og(Pg(this),e);for(var n=Pg(this).byteLength,r=Cg(e,n),o=Cg(void 0===t?n:t,n),i=new(Eg(this,Sg))(_g(o-r)),a=new kg(this),s=new kg(i),u=0;r<o;)Mg(s,u++,Fg(a,r++));return i}});var Ig=Et,Dg=tn;jo({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=Ig(this),n=Dg(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}});var Lg=En,jg=mt,Bg=J.TypeError,Ng=Rt,Vg=Nn.exports,Ug=function(e){if(Lg(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw Bg("Incorrect hint");return jg(this,e)},Wg=Xt("toPrimitive"),zg=Date.prototype;Ng(zg,Wg)||Vg(zg,Wg,Ug);var Hg=Me,Gg=De,Xg=An,Qg=bf,Yg=Xt("hasInstance"),qg=Function.prototype;Yg in qg||Xg.f(qg,Yg,{value:function(e){if(!Hg(this)||!Gg(e))return!1;var t=this.prototype;if(!Gg(t))return e instanceof this;for(;e=Qg(e);)if(t===e)return!0;return!1}});var Kg=ee,Jg=Pr.EXISTS,Zg=me,$g=An.f,em=Function.prototype,tm=Zg(em.toString),nm=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,rm=Zg(nm.exec);Kg&&!Jg&&$g(em,"name",{configurable:!0,get:function(){try{return rm(nm,tm(this))[1]}catch(w1){return""}}}),Zi(J.JSON,"JSON",!0);var om={exports:{}},im=$((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),am=$,sm=De,um=Ae,cm=im,lm=Object.isExtensible,fm=am((function(){lm(1)}))||cm?function(e){return!!sm(e)&&((!cm||"ArrayBuffer"!=um(e))&&(!lm||lm(e)))}:lm,hm=!$((function(){return Object.isExtensible(Object.preventExtensions({}))})),dm=jo,pm=me,vm=tr,gm=De,mm=Rt,ym=An.f,bm=Dr,wm=Ai,Am=fm,xm=hm,Tm=!1,Pm=Dt("meta"),Cm=0,_m=function(e){ym(e,Pm,{value:{objectID:"O"+Cm++,weakData:{}}})},Em=om.exports={enable:function(){Em.enable=function(){},Tm=!0;var e=bm.f,t=pm([].splice),n={};n[Pm]=1,e(n).length&&(bm.f=function(n){for(var r=e(n),o=0,i=r.length;o<i;o++)if(r[o]===Pm){t(r,o,1);break}return r},dm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:wm.f}))},fastKey:function(e,t){if(!gm(e))return"symbol"==S(e)?e:("string"==typeof e?"S":"P")+e;if(!mm(e,Pm)){if(!Am(e))return"F";if(!t)return"E";_m(e)}return e[Pm].objectID},getWeakData:function(e,t){if(!mm(e,Pm)){if(!Am(e))return!0;if(!t)return!1;_m(e)}return e[Pm].weakData},onFreeze:function(e){return xm&&Tm&&Am(e)&&!mm(e,Pm)&&_m(e),e}};vm[Pm]=!0;var Sm=na,km=oe,Rm=En,Om=at,Fm=bl,Mm=Qr,Im=Ve,Dm=Ol,Lm=Pl,jm=hl,Bm=J.TypeError,Nm=function(e,t){this.stopped=e,this.result=t},Vm=Nm.prototype,Um=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=Sm(t,l),v=function(e){return r&&jm(r,"normal",e),new Nm(!0,e)},g=function(e){return f?(Rm(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=Lm(e)))throw Bm(Om(e)+" is not iterable");if(Fm(o)){for(i=0,a=Mm(e);a>i;i++)if((s=g(e[i]))&&Im(Vm,s))return s;return new Nm(!1)}r=Dm(e,o)}for(u=r.next;!(c=km(u,r)).done;){try{s=g(c.value)}catch(w1){jm(r,"throw",w1)}if("object"==S(s)&&s&&Im(Vm,s))return s}return new Nm(!1)},Wm=Me,zm=De,Hm=zf,Gm=function(e,t,n){var r,o;return Hm&&Wm(r=t.constructor)&&r!==n&&zm(o=r.prototype)&&o!==n.prototype&&Hm(e,o),e},Xm=jo,Qm=J,Ym=me,qm=ko,Km=Nn.exports,Jm=om.exports,Zm=Um,$m=bp,ey=Me,ty=De,ny=$,ry=Yl,oy=Zi,iy=Gm,ay=function(e,t,n){var r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=r?"set":"add",a=Qm[e],s=a&&a.prototype,u=a,c={},l=function(e){var t=Ym(s[e]);Km(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!ty(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return o&&!ty(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!ty(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(qm(e,!ey(a)||!(o||s.forEach&&!ny((function(){(new a).entries().next()})))))u=n.getConstructor(t,e,r,i),Jm.enable();else if(qm(e,!0)){var f=new u,h=f[i](o?{}:-0,1)!=f,d=ny((function(){f.has(1)})),p=ry((function(e){new a(e)})),v=!o&&ny((function(){for(var e=new a,t=5;t--;)e[i](t,t);return!e.has(-0)}));p||((u=t((function(e,t){$m(e,s);var n=iy(new a,e,u);return null!=t&&Zm(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,Xm({global:!0,forced:u!=a},c),oy(u,e),o||n.setStrong(u,e,r),u},sy=An.f,uy=wi,cy=gp,ly=na,fy=bp,hy=Um,dy=sh,py=tp,vy=ee,gy=om.exports.fastKey,my=yr.set,yy=yr.getterFor,by={getConstructor:function(e,t,n,r){var o=e((function(e,o){fy(e,i),my(e,{type:t,index:uy(null),first:void 0,last:void 0,size:0}),vy||(e.size=0),null!=o&&hy(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=yy(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=gy(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=s),r&&(r.next=s),vy?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},u=function(e,t){var n,r=a(e),o=gy(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return cy(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,vy?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),vy?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=ly(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)}}),cy(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)}}),vy&&sy(i,"size",{get:function(){return a(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=yy(t),i=yy(r);dy(e,t,(function(e,t){my(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),py(t)}};ay("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),by);var wy=Math.log,Ay=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:wy(1+e)},xy=jo,Ty=Ay,Py=Math.acosh,Cy=Math.log,_y=Math.sqrt,Ey=Math.LN2;xy({target:"Math",stat:!0,forced:!Py||710!=Math.floor(Py(Number.MAX_VALUE))||Py(1/0)!=1/0},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Cy(e)+Ey:Ty(e-1+_y(e-1)*_y(e+1))}});var Sy=jo,ky=Math.asinh,Ry=Math.log,Oy=Math.sqrt;Sy({target:"Math",stat:!0,forced:!(ky&&1/ky(0)>0)},{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Ry(t+Oy(t*t+1)):t}});var Fy=jo,My=Math.atanh,Iy=Math.log;Fy({target:"Math",stat:!0,forced:!(My&&1/My(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:Iy((1+e)/(1-e))/2}});var Dy=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1},Ly=jo,jy=Dy,By=Math.abs,Ny=Math.pow;Ly({target:"Math",stat:!0},{cbrt:function(e){return jy(e=+e)*Ny(By(e),1/3)}});var Vy=jo,Uy=Math.floor,Wy=Math.log,zy=Math.LOG2E;Vy({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-Uy(Wy(e+.5)*zy):32}});var Hy=Math.expm1,Gy=Math.exp,Xy=!Hy||Hy(10)>22025.465794806718||Hy(10)<22025.465794806718||-2e-17!=Hy(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Gy(e)-1}:Hy,Qy=jo,Yy=Xy,qy=Math.cosh,Ky=Math.abs,Jy=Math.E;Qy({target:"Math",stat:!0,forced:!qy||qy(710)===1/0},{cosh:function(e){var t=Yy(Ky(e)-1)+1;return(t+1/(t*Jy*Jy))*(Jy/2)}});var Zy=Xy;jo({target:"Math",stat:!0,forced:Zy!=Math.expm1},{expm1:Zy});var $y=Dy,eb=Math.abs,tb=Math.pow,nb=tb(2,-52),rb=tb(2,-23),ob=tb(2,127)*(2-rb),ib=tb(2,-126),ab=Math.fround||function(e){var t,n,r=eb(e),o=$y(e);return r<ib?o*(r/ib/rb+1/nb-1/nb)*ib*rb:(n=(t=(1+rb/nb)*r)-(t-r))>ob||n!=n?o*(1/0):o*n};jo({target:"Math",stat:!0},{fround:ab});var sb=jo,ub=Math.hypot,cb=Math.abs,lb=Math.sqrt;sb({target:"Math",stat:!0,forced:!!ub&&ub(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=cb(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*lb(o)}});var fb=jo,hb=$,db=Math.imul;fb({target:"Math",stat:!0,forced:hb((function(){return-5!=db(4294967295,5)||2!=db.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 pb=Math.log,vb=Math.LOG10E;jo({target:"Math",stat:!0},{log10:Math.log10||function(e){return pb(e)*vb}}),jo({target:"Math",stat:!0},{log1p:Ay});var gb=jo,mb=Math.log,yb=Math.LN2;gb({target:"Math",stat:!0},{log2:function(e){return mb(e)/yb}}),jo({target:"Math",stat:!0},{sign:Dy});var bb=jo,wb=$,Ab=Xy,xb=Math.abs,Tb=Math.exp,Pb=Math.E;bb({target:"Math",stat:!0,forced:wb((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return xb(e=+e)<1?(Ab(e)-Ab(-e))/2:(Tb(e-1)-Tb(-e-1))*(Pb/2)}});var Cb=jo,_b=Xy,Eb=Math.exp;Cb({target:"Math",stat:!0},{tanh:function(e){var t=_b(e=+e),n=_b(-e);return t==1/0?1:n==1/0?-1:(t-n)/(Eb(e)+Eb(-e))}}),Zi(Math,"Math",!0);var Sb=jo,kb=Math.ceil,Rb=Math.floor;Sb({target:"Math",stat:!0},{trunc:function(e){return(e>0?Rb:kb)(e)}});var Ob=me(1..valueOf),Fb="\t\n\v\f\r                 \u2028\u2029\ufeff",Mb=ke,Ib=Ko,Db=me("".replace),Lb="[\t\n\v\f\r                 \u2028\u2029\ufeff]",jb=RegExp("^"+Lb+Lb+"*"),Bb=RegExp(Lb+Lb+"*$"),Nb=function(e){return function(t){var n=Ib(Mb(t));return 1&e&&(n=Db(n,jb,"")),2&e&&(n=Db(n,Bb,"")),n}},Vb={start:Nb(1),end:Nb(2),trim:Nb(3)},Ub=ee,Wb=J,zb=me,Hb=ko,Gb=Nn.exports,Xb=Rt,Qb=Gm,Yb=Ve,qb=ot,Kb=tn,Jb=$,Zb=Dr.f,$b=Z.f,ew=An.f,tw=Ob,nw=Vb.trim,rw=Wb.Number,ow=rw.prototype,iw=Wb.TypeError,aw=zb("".slice),sw=zb("".charCodeAt),uw=function(e){var t=Kb(e,"number");return"bigint"==typeof t?t:cw(t)},cw=function(e){var t,n,r,o,i,a,s,u,c=Kb(e,"number");if(qb(c))throw iw("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=nw(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=aw(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(Hb("Number",!rw(" 0o1")||!rw("0b1")||rw("+0x1"))){for(var lw,fw=function(e){var t=arguments.length<1?0:rw(uw(e)),n=this;return Yb(ow,n)&&Jb((function(){tw(n)}))?Qb(Object(t),n,fw):t},hw=Ub?Zb(rw):"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(","),dw=0;hw.length>dw;dw++)Xb(rw,lw=hw[dw])&&!Xb(fw,lw)&&ew(fw,lw,$b(rw,lw));fw.prototype=ow,ow.constructor=fw,Gb(Wb,"Number",fw)}jo({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)});var pw=J.isFinite,vw=Number.isFinite||function(e){return"number"==typeof e&&pw(e)};jo({target:"Number",stat:!0},{isFinite:vw});var gw=De,mw=Math.floor,yw=Number.isInteger||function(e){return!gw(e)&&isFinite(e)&&mw(e)===e};jo({target:"Number",stat:!0},{isInteger:yw}),jo({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var bw=jo,ww=yw,Aw=Math.abs;bw({target:"Number",stat:!0},{isSafeInteger:function(e){return ww(e)&&Aw(e)<=9007199254740991}}),jo({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991}),jo({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991});var xw=J,Tw=$,Pw=Ko,Cw=Vb.trim,_w=me("".charAt),Ew=xw.parseFloat,Sw=xw.Symbol,kw=Sw&&Sw.iterator,Rw=1/Ew("\t\n\v\f\r                 \u2028\u2029\ufeff-0")!=-1/0||kw&&!Tw((function(){Ew(Object(kw))}))?function(e){var t=Cw(Pw(e)),n=Ew(t);return 0===n&&"-"==_w(t,0)?-0:n}:Ew,Ow=Rw;jo({target:"Number",stat:!0,forced:Number.parseFloat!=Ow},{parseFloat:Ow});var Fw=J,Mw=$,Iw=me,Dw=Ko,Lw=Vb.trim,jw=Fw.parseInt,Bw=Fw.Symbol,Nw=Bw&&Bw.iterator,Vw=/^[+-]?0x/i,Uw=Iw(Vw.exec),Ww=8!==jw("\t\n\v\f\r                 \u2028\u2029\ufeff08")||22!==jw("\t\n\v\f\r                 \u2028\u2029\ufeff0x16")||Nw&&!Mw((function(){jw(Object(Nw))}))?function(e,t){var n=Lw(Dw(e));return jw(n,t>>>0||(Uw(Vw,n)?16:10))}:jw,zw=Ww;jo({target:"Number",stat:!0,forced:Number.parseInt!=zw},{parseInt:zw});var Hw=Br,Gw=Ko,Xw=ke,Qw=J.RangeError,Yw=function(e){var t=Gw(Xw(this)),n="",r=Hw(e);if(r<0||r==1/0)throw Qw("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},qw=jo,Kw=J,Jw=me,Zw=Br,$w=Ob,eA=Yw,tA=$,nA=Kw.RangeError,rA=Kw.String,oA=Math.floor,iA=Jw(eA),aA=Jw("".slice),sA=Jw(1..toFixed),uA=function e(t,n,r){return 0===n?r:n%2==1?e(t,n-1,r*t):e(t*t,n/2,r)},cA=function(e,t,n){for(var r=-1,o=n;++r<6;)o+=t*e[r],e[r]=o%1e7,o=oA(o/1e7)},lA=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=oA(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=rA(e[t]);n=""===n?r:n+iA("0",7-r.length)+r}return n};qw({target:"Number",proto:!0,forced:tA((function(){return"0.000"!==sA(8e-5,3)||"1"!==sA(.9,0)||"1.25"!==sA(1.255,2)||"1000000000000000128"!==sA(0xde0b6b3a7640080,0)}))||!tA((function(){sA({})}))},{toFixed:function(e){var t,n,r,o,i=$w(this),a=Zw(e),s=[0,0,0,0,0,0],u="",c="0";if(a<0||a>20)throw nA("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return rA(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*uA(2,69,1))-69)<0?i*uA(2,-t,1):i/uA(2,t,1),n*=4503599627370496,(t=52-t)>0){for(cA(s,0,n),r=a;r>=7;)cA(s,1e7,0),r-=7;for(cA(s,uA(10,r,1),0),r=t-1;r>=23;)lA(s,1<<23),r-=23;lA(s,1<<r),cA(s,1,1),lA(s,2),c=fA(s)}else cA(s,0,n),cA(s,1<<-t,0),c=fA(s)+iA("0",a);return c=a>0?u+((o=c.length)<=a?"0."+iA("0",a-o)+c:aA(c,0,o-a)+"."+aA(c,o-a)):u+c}});var hA=ee,dA=me,pA=oe,vA=$,gA=ei,mA=uo,yA=ie,bA=Et,wA=Ee,AA=Object.assign,xA=Object.defineProperty,TA=dA([].concat),PA=!AA||vA((function(){if(hA&&1!==AA({b:1},AA(xA({},"a",{enumerable:!0,get:function(){xA(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!=AA({},e)[n]||gA(AA({},t)).join("")!=r}))?function(e,t){for(var n=bA(e),r=arguments.length,o=1,i=mA.f,a=yA.f;r>o;)for(var s,u=wA(arguments[o++]),c=i?TA(gA(u),i(u)):gA(u),l=c.length,f=0;l>f;)s=c[f++],hA&&!pA(a,u,s)||(n[s]=u[s]);return n}:AA,CA=PA;jo({target:"Object",stat:!0,forced:Object.assign!==CA},{assign:CA});var _A=J,EA=Rd,SA=!$((function(){if(!(EA&&EA<535)){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete _A[e]}})),kA=lt,RA=Et,OA=An;ee&&jo({target:"Object",proto:!0,forced:SA},{__defineGetter__:function(e,t){OA.f(RA(this),e,{get:kA(t),enumerable:!0,configurable:!0})}});var FA=jo,MA=ee,IA=Jo.f;FA({target:"Object",stat:!0,forced:Object.defineProperties!==IA,sham:!MA},{defineProperties:IA});var DA=jo,LA=ee,jA=An.f;DA({target:"Object",stat:!0,forced:Object.defineProperty!==jA,sham:!LA},{defineProperty:jA});var BA=lt,NA=Et,VA=An;ee&&jo({target:"Object",proto:!0,forced:SA},{__defineSetter__:function(e,t){VA.f(NA(this),e,{set:BA(t),enumerable:!0,configurable:!0})}});var UA=ee,WA=me,zA=ei,HA=Fe,GA=WA(ie.f),XA=WA([].push),QA=function(e){return function(t){for(var n,r=HA(t),o=zA(r),i=o.length,a=0,s=[];i>a;)n=o[a++],UA&&!GA(r,n)||XA(s,e?[n,r[n]]:r[n]);return s}},YA={entries:QA(!0),values:QA(!1)},qA=YA.entries;jo({target:"Object",stat:!0},{entries:function(e){return qA(e)}});var KA=jo,JA=hm,ZA=$,$A=De,ex=om.exports.onFreeze,tx=Object.freeze;KA({target:"Object",stat:!0,forced:ZA((function(){tx(1)})),sham:!JA},{freeze:function(e){return tx&&$A(e)?tx(ex(e)):e}});var nx=Um,rx=Ci;jo({target:"Object",stat:!0},{fromEntries:function(e){var t={};return nx(e,(function(e,n){rx(t,e,n)}),{AS_ENTRIES:!0}),t}});var ox=jo,ix=$,ax=Fe,sx=Z.f,ux=ee,cx=ix((function(){sx(1)}));ox({target:"Object",stat:!0,forced:!ux||cx,sham:!ux},{getOwnPropertyDescriptor:function(e,t){return sx(ax(e),t)}});var lx=vo,fx=Fe,hx=Z,dx=Ci;jo({target:"Object",stat:!0,sham:!ee},{getOwnPropertyDescriptors:function(e){for(var t,n,r=fx(e),o=hx.f,i=lx(r),a={},s=0;i.length>s;)void 0!==(n=o(r,t=i[s++]))&&dx(a,t,n);return a}});var px=jo,vx=$,gx=Ai.f;px({target:"Object",stat:!0,forced:vx((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:gx});var mx=Et,yx=bf,bx=lf;jo({target:"Object",stat:!0,forced:$((function(){yx(1)})),sham:!bx},{getPrototypeOf:function(e){return yx(mx(e))}});var wx=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};jo({target:"Object",stat:!0},{is:wx});var Ax=fm;jo({target:"Object",stat:!0,forced:Object.isExtensible!==Ax},{isExtensible:Ax});var xx=jo,Tx=$,Px=De,Cx=Ae,_x=im,Ex=Object.isFrozen;xx({target:"Object",stat:!0,forced:Tx((function(){Ex(1)}))||_x},{isFrozen:function(e){return!Px(e)||(!(!_x||"ArrayBuffer"!=Cx(e))||!!Ex&&Ex(e))}});var Sx=jo,kx=$,Rx=De,Ox=Ae,Fx=im,Mx=Object.isSealed;Sx({target:"Object",stat:!0,forced:kx((function(){Mx(1)}))||Fx},{isSealed:function(e){return!Rx(e)||(!(!Fx||"ArrayBuffer"!=Ox(e))||!!Mx&&Mx(e))}});var Ix=Et,Dx=ei;jo({target:"Object",stat:!0,forced:$((function(){Dx(1)}))},{keys:function(e){return Dx(Ix(e))}});var Lx=jo,jx=ee,Bx=SA,Nx=Et,Vx=on,Ux=bf,Wx=Z.f;jx&&Lx({target:"Object",proto:!0,forced:Bx},{__lookupGetter__:function(e){var t,n=Nx(this),r=Vx(e);do{if(t=Wx(n,r))return t.get}while(n=Ux(n))}});var zx=jo,Hx=ee,Gx=SA,Xx=Et,Qx=on,Yx=bf,qx=Z.f;Hx&&zx({target:"Object",proto:!0,forced:Gx},{__lookupSetter__:function(e){var t,n=Xx(this),r=Qx(e);do{if(t=qx(n,r))return t.set}while(n=Yx(n))}});var Kx=jo,Jx=De,Zx=om.exports.onFreeze,$x=hm,eT=$,tT=Object.preventExtensions;Kx({target:"Object",stat:!0,forced:eT((function(){tT(1)})),sham:!$x},{preventExtensions:function(e){return tT&&Jx(e)?tT(Zx(e)):e}});var nT=jo,rT=De,oT=om.exports.onFreeze,iT=hm,aT=$,sT=Object.seal;nT({target:"Object",stat:!0,forced:aT((function(){sT(1)})),sham:!iT},{seal:function(e){return sT&&rT(e)?sT(oT(e)):e}}),jo({target:"Object",stat:!0},{setPrototypeOf:zf});var uT=Qo,cT=No?{}.toString:function(){return"[object "+uT(this)+"]"},lT=No,fT=Nn.exports,hT=cT;lT||fT(Object.prototype,"toString",hT,{unsafe:!0});var dT=YA.values;jo({target:"Object",stat:!0},{values:function(e){return dT(e)}});jo({global:!0,forced:parseFloat!=Rw},{parseFloat:Rw});jo({global:!0,forced:parseInt!=Ww},{parseInt:Ww});var pT,vT,gT,mT,yT=J.TypeError,bT=function(e,t){if(e<t)throw yT("Not enough arguments");return e},wT=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ue),AT=J,xT=iu,TT=na,PT=Me,CT=Rt,_T=$,ET=ui,ST=au,kT=cn,RT=bT,OT=wT,FT=qh,MT=AT.setImmediate,IT=AT.clearImmediate,DT=AT.process,LT=AT.Dispatch,jT=AT.Function,BT=AT.MessageChannel,NT=AT.String,VT=0,UT={};try{pT=AT.location}catch(w1){}var WT=function(e){if(CT(UT,e)){var t=UT[e];delete UT[e],t()}},zT=function(e){return function(){WT(e)}},HT=function(e){WT(e.data)},GT=function(e){AT.postMessage(NT(e),pT.protocol+"//"+pT.host)};MT&&IT||(MT=function(e){RT(arguments.length,1);var t=PT(e)?e:jT(e),n=ST(arguments,1);return UT[++VT]=function(){xT(t,void 0,n)},vT(VT),VT},IT=function(e){delete UT[e]},FT?vT=function(e){DT.nextTick(zT(e))}:LT&&LT.now?vT=function(e){LT.now(zT(e))}:BT&&!OT?(mT=(gT=new BT).port2,gT.port1.onmessage=HT,vT=TT(mT.postMessage,mT)):AT.addEventListener&&PT(AT.postMessage)&&!AT.importScripts&&pT&&"file:"!==pT.protocol&&!_T(GT)?(vT=GT,AT.addEventListener("message",HT,!1)):vT="onreadystatechange"in kT("script")?function(e){ET.appendChild(kT("script")).onreadystatechange=function(){ET.removeChild(this),WT(e)}}:function(e){setTimeout(zT(e),0)});var XT,QT,YT,qT,KT,JT,ZT,$T,eP={set:MT,clear:IT},tP=J,nP=/ipad|iphone|ipod/i.test(Ue)&&void 0!==tP.Pebble,rP=/web0s(?!.*chrome)/i.test(Ue),oP=J,iP=na,aP=Z.f,sP=eP.set,uP=wT,cP=nP,lP=rP,fP=qh,hP=oP.MutationObserver||oP.WebKitMutationObserver,dP=oP.document,pP=oP.process,vP=oP.Promise,gP=aP(oP,"queueMicrotask"),mP=gP&&gP.value;mP||(XT=function(){var e,t;for(fP&&(e=pP.domain)&&e.exit();QT;){t=QT.fn,QT=QT.next;try{t()}catch(w1){throw QT?qT():YT=void 0,w1}}YT=void 0,e&&e.enter()},uP||fP||lP||!hP||!dP?!cP&&vP&&vP.resolve?((ZT=vP.resolve(void 0)).constructor=vP,$T=iP(ZT.then,ZT),qT=function(){$T(XT)}):fP?qT=function(){pP.nextTick(XT)}:(sP=iP(sP,oP),qT=function(){sP(XT)}):(KT=!0,JT=dP.createTextNode(""),new hP(XT).observe(JT,{characterData:!0}),qT=function(){JT.data=KT=!KT}));var yP=mP||function(e){var t={fn:e,next:void 0};YT&&(YT.next=t),QT||(QT=t,qT()),YT=t},bP=J,wP=function(e,t){var n=bP.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},AP=function(e){try{return{error:!1,value:e()}}catch(w1){return{error:!0,value:w1}}},xP=function(){this.head=null,this.tail=null};xP.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 TP=xP,PP=J.Promise,CP="object"==("undefined"==typeof window?"undefined":S(window))&&"object"!=("undefined"==typeof Deno?"undefined":S(Deno)),_P=J,EP=PP,SP=Me,kP=ko,RP=Xn,OP=Xt,FP=CP,MP=Ye;EP&&EP.prototype;var IP=OP("species"),DP=!1,LP=SP(_P.PromiseRejectionEvent),jP=kP("Promise",(function(){var e=RP(EP),t=e!==String(EP);if(!t&&66===MP)return!0;if(MP>=51&&/native code/.test(e))return!1;var n=new EP((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[IP]=r,!(DP=n.then((function(){}))instanceof r)||!t&&FP&&!LP})),BP={CONSTRUCTOR:jP,REJECTION_EVENT:LP,SUBCLASSING:DP},NP={},VP=lt,UP=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=VP(t),this.reject=VP(n)};NP.f=function(e){return new UP(e)};var WP,zP,HP,GP=jo,XP=qh,QP=J,YP=oe,qP=Nn.exports,KP=gp,JP=zf,ZP=Zi,$P=tp,eC=lt,tC=Me,nC=De,rC=bp,oC=wg,iC=eP.set,aC=yP,sC=wP,uC=AP,cC=TP,lC=yr,fC=PP,hC=NP,dC=BP.CONSTRUCTOR,pC=BP.REJECTION_EVENT,vC=BP.SUBCLASSING,gC=lC.getterFor("Promise"),mC=lC.set,yC=fC&&fC.prototype,bC=fC,wC=yC,AC=QP.TypeError,xC=QP.document,TC=QP.process,PC=hC.f,CC=PC,_C=!!(xC&&xC.createEvent&&QP.dispatchEvent),EC=function(e){var t;return!(!nC(e)||!tC(t=e.then))&&t},SC=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&&MC(t),t.rejection=1),!0===s?n=i:(l&&l.enter(),n=s(i),l&&(l.exit(),o=!0)),n===e.promise?c(AC("Promise-chain cycle")):(r=EC(n))?YP(r,n,u,c):u(n)):c(i)}catch(w1){l&&!o&&l.exit(),c(w1)}},kC=function(e,t){e.notified||(e.notified=!0,aC((function(){for(var n,r=e.reactions;n=r.get();)SC(n,e);e.notified=!1,t&&!e.rejection&&OC(e)})))},RC=function(e,t,n){var r,o;_C?((r=xC.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),QP.dispatchEvent(r)):r={promise:t,reason:n},!pC&&(o=QP["on"+e])?o(r):"unhandledrejection"===e&&sC("Unhandled promise rejection",n)},OC=function(e){YP(iC,QP,(function(){var t,n=e.facade,r=e.value;if(FC(e)&&(t=uC((function(){XP?TC.emit("unhandledRejection",r,n):RC("unhandledrejection",n,r)})),e.rejection=XP||FC(e)?2:1,t.error))throw t.value}))},FC=function(e){return 1!==e.rejection&&!e.parent},MC=function(e){YP(iC,QP,(function(){var t=e.facade;XP?TC.emit("rejectionHandled",t):RC("rejectionhandled",t,e.value)}))},IC=function(e,t,n){return function(r){e(t,r,n)}},DC=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,kC(e,!0))},LC=function e(t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===n)throw AC("Promise can't be resolved itself");var o=EC(n);o?aC((function(){var r={done:!1};try{YP(o,n,IC(e,r,t),IC(DC,r,t))}catch(w1){DC(r,w1,t)}})):(t.value=n,t.state=1,kC(t,!1))}catch(w1){DC({done:!1},w1,t)}}};if(dC&&(wC=(bC=function(e){rC(this,wC),eC(e),YP(WP,this);var t=gC(this);try{e(IC(LC,t),IC(DC,t))}catch(w1){DC(t,w1)}}).prototype,(WP=function(e){mC(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new cC,rejection:!1,state:0,value:void 0})}).prototype=KP(wC,{then:function(e,t){var n=gC(this),r=PC(oC(this,bC));return n.parent=!0,r.ok=!tC(e)||e,r.fail=tC(t)&&t,r.domain=XP?TC.domain:void 0,0==n.state?n.reactions.add(r):aC((function(){SC(r,n)})),r.promise}}),zP=function(){var e=new WP,t=gC(e);this.promise=e,this.resolve=IC(LC,t),this.reject=IC(DC,t)},hC.f=PC=function(e){return e===bC||undefined===e?new zP(e):CC(e)},tC(fC)&&yC!==Object.prototype)){HP=yC.then,vC||qP(yC,"then",(function(e,t){var n=this;return new bC((function(e,t){YP(HP,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete yC.constructor}catch(w1){}JP&&JP(yC,wC)}GP({global:!0,wrap:!0,forced:dC},{Promise:bC}),ZP(bC,"Promise",!1),$P("Promise");var jC=PP,BC=BP.CONSTRUCTOR||!Yl((function(e){jC.all(e).then(void 0,(function(){}))})),NC=oe,VC=lt,UC=NP,WC=AP,zC=Um;jo({target:"Promise",stat:!0,forced:BC},{all:function(e){var t=this,n=UC.f(t),r=n.resolve,o=n.reject,i=WC((function(){var n=VC(t.resolve),i=[],a=0,s=1;zC(e,(function(e){var u=a++,c=!1;s++,NC(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 HC=jo,GC=BP.CONSTRUCTOR,XC=PP,QC=Ne,YC=Me,qC=Nn.exports,KC=XC&&XC.prototype;if(HC({target:"Promise",proto:!0,forced:GC,real:!0},{catch:function(e){return this.then(void 0,e)}}),YC(XC)){var JC=QC("Promise").prototype.catch;KC.catch!==JC&&qC(KC,"catch",JC,{unsafe:!0})}var ZC=oe,$C=lt,e_=NP,t_=AP,n_=Um;jo({target:"Promise",stat:!0,forced:BC},{race:function(e){var t=this,n=e_.f(t),r=n.reject,o=t_((function(){var o=$C(t.resolve);n_(e,(function(e){ZC(o,t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var r_=oe,o_=NP;jo({target:"Promise",stat:!0,forced:BP.CONSTRUCTOR},{reject:function(e){var t=o_.f(this);return r_(t.reject,void 0,e),t.promise}});var i_=En,a_=De,s_=NP,u_=function(e,t){if(i_(e),a_(t)&&t.constructor===e)return t;var n=s_.f(e);return(0,n.resolve)(t),n.promise},c_=jo,l_=BP.CONSTRUCTOR,f_=u_;Ne("Promise"),c_({target:"Promise",stat:!0,forced:l_},{resolve:function(e){return f_(this,e)}});var h_=jo,d_=PP,p_=$,v_=Ne,g_=Me,m_=wg,y_=u_,b_=Nn.exports,w_=d_&&d_.prototype;if(h_({target:"Promise",proto:!0,real:!0,forced:!!d_&&p_((function(){w_.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=m_(this,v_("Promise")),n=g_(e);return this.then(n?function(n){return y_(t,e()).then((function(){return n}))}:e,n?function(n){return y_(t,e()).then((function(){throw n}))}:e)}}),g_(d_)){var A_=v_("Promise").prototype.finally;w_.finally!==A_&&b_(w_,"finally",A_,{unsafe:!0})}var x_=iu,T_=lt,P_=En;jo({target:"Reflect",stat:!0,forced:!$((function(){Reflect.apply((function(){}))}))},{apply:function(e,t,n){return x_(T_(e),t,P_(n))}});var C_=me,__=lt,E_=De,S_=Rt,k_=au,R_=te,O_=J.Function,F_=C_([].concat),M_=C_([].join),I_={},D_=function(e,t,n){if(!S_(I_,t)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";I_[t]=O_("C,a","return new C("+M_(r,",")+")")}return I_[t](e,n)},L_=R_?O_.bind:function(e){var t=__(this),n=t.prototype,r=k_(arguments,1),o=function(){var n=F_(r,k_(arguments));return this instanceof o?D_(t,n.length,n):t.apply(e,n)};return E_(n)&&(o.prototype=n),o},j_=jo,B_=iu,N_=L_,V_=gg,U_=En,W_=De,z_=wi,H_=$,G_=Ne("Reflect","construct"),X_=Object.prototype,Q_=[].push,Y_=H_((function(){function e(){}return!(G_((function(){}),[],e)instanceof e)})),q_=!H_((function(){G_((function(){}))})),K_=Y_||q_;j_({target:"Reflect",stat:!0,forced:K_,sham:K_},{construct:function(e,t){V_(e),U_(t);var n=arguments.length<3?e:V_(arguments[2]);if(q_&&!Y_)return G_(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 B_(Q_,r,t),new(B_(N_,e,r))}var o=n.prototype,i=z_(W_(o)?o:X_),a=B_(e,i,t);return W_(a)?a:i}});var J_=ee,Z_=En,$_=on,eE=An;jo({target:"Reflect",stat:!0,forced:$((function(){Reflect.defineProperty(eE.f({},1,{value:1}),1,{value:2})})),sham:!J_},{defineProperty:function(e,t,n){Z_(e);var r=$_(t);Z_(n);try{return eE.f(e,r,n),!0}catch(w1){return!1}}});var tE=jo,nE=En,rE=Z.f;tE({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=rE(nE(e),t);return!(n&&!n.configurable)&&delete e[t]}});var oE=Rt,iE=function(e){return void 0!==e&&(oE(e,"value")||oE(e,"writable"))},aE=oe,sE=De,uE=En,cE=iE,lE=Z,fE=bf;jo({target:"Reflect",stat:!0},{get:function e(t,n){var r,o,i=arguments.length<3?t:arguments[2];return uE(t)===i?t[n]:(r=lE.f(t,n))?cE(r)?r.value:void 0===r.get?void 0:aE(r.get,i):sE(o=fE(t))?e(o,n,i):void 0}});var hE=En,dE=Z;jo({target:"Reflect",stat:!0,sham:!ee},{getOwnPropertyDescriptor:function(e,t){return dE.f(hE(e),t)}});var pE=En,vE=bf;jo({target:"Reflect",stat:!0,sham:!lf},{getPrototypeOf:function(e){return vE(pE(e))}}),jo({target:"Reflect",stat:!0},{has:function(e,t){return t in e}});var gE=En,mE=fm;jo({target:"Reflect",stat:!0},{isExtensible:function(e){return gE(e),mE(e)}}),jo({target:"Reflect",stat:!0},{ownKeys:vo});var yE=Ne,bE=En;jo({target:"Reflect",stat:!0,sham:!hm},{preventExtensions:function(e){bE(e);try{var t=yE("Object","preventExtensions");return t&&t(e),!0}catch(w1){return!1}}});var wE=jo,AE=oe,xE=En,TE=De,PE=iE,CE=An,_E=Z,EE=bf,SE=fe;var kE=$((function(){var e=function(){},t=CE.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}));wE({target:"Reflect",stat:!0,forced:kE},{set:function e(t,n,r){var o,i,a,s=arguments.length<4?t:arguments[3],u=_E.f(xE(t),n);if(!u){if(TE(i=EE(t)))return e(i,n,r,s);u=SE(0)}if(PE(u)){if(!1===u.writable||!TE(s))return!1;if(o=_E.f(s,n)){if(o.get||o.set||!1===o.writable)return!1;o.value=r,CE.f(s,n,o)}else CE.f(s,n,SE(0,r))}else{if(void 0===(a=u.set))return!1;AE(a,s,r)}return!0}});var RE=En,OE=Nf,FE=zf;FE&&jo({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){RE(e),OE(t);try{return FE(e,t),!0}catch(w1){return!1}}});var ME=De,IE=Ae,DE=Xt("match"),LE=function(e){var t;return ME(e)&&(void 0!==(t=e[DE])?!!t:"RegExp"==IE(e))},jE=En,BE=function(){var e=jE(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},NE=oe,VE=Rt,UE=Ve,WE=BE,zE=RegExp.prototype,HE=function(e){var t=e.flags;return void 0!==t||"flags"in zE||VE(e,"flags")||!UE(zE,e)?t:NE(WE,e)},GE=$,XE=J.RegExp,QE=GE((function(){var e=XE("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),YE=QE||GE((function(){return!XE("a","y").sticky})),qE={BROKEN_CARET:QE||GE((function(){var e=XE("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:YE,UNSUPPORTED_Y:QE},KE=An.f,JE=$,ZE=J.RegExp,$E=JE((function(){var e=ZE(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),eS=$,tS=J.RegExp,nS=eS((function(){var e=tS("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),rS=ee,oS=J,iS=me,aS=ko,sS=Gm,uS=Bn,cS=Dr.f,lS=Ve,fS=LE,hS=Ko,dS=HE,pS=qE,vS=function(e,t,n){n in e||KE(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},gS=Nn.exports,mS=$,yS=Rt,bS=yr.enforce,wS=tp,AS=$E,xS=nS,TS=Xt("match"),PS=oS.RegExp,CS=PS.prototype,_S=oS.SyntaxError,ES=iS(CS.exec),SS=iS("".charAt),kS=iS("".replace),RS=iS("".indexOf),OS=iS("".slice),FS=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,MS=/a/g,IS=/a/g,DS=new PS(MS)!==MS,LS=pS.MISSED_STICKY,jS=pS.UNSUPPORTED_Y,BS=rS&&(!DS||LS||AS||xS||mS((function(){return IS[TS]=!1,PS(MS)!=MS||PS(IS)==IS||"/a/i"!=PS(MS,"i")})));if(aS("RegExp",BS)){for(var NS=function(e,t){var n,r,o,i,a,s,u=lS(CS,this),c=fS(e),l=void 0===t,f=[],h=e;if(!u&&c&&l&&e.constructor===NS)return e;if((c||lS(CS,e))&&(e=e.source,l&&(t=dS(h))),e=void 0===e?"":hS(e),t=void 0===t?"":hS(t),h=e,AS&&"dotAll"in MS&&(r=!!t&&RS(t,"s")>-1)&&(t=kS(t,/s/g,"")),n=t,LS&&"sticky"in MS&&(o=!!t&&RS(t,"y")>-1)&&jS&&(t=kS(t,/y/g,"")),xS&&(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=SS(e,r)))t+=SS(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:ES(FS,OS(e,r+1))&&(r+=2,u=!0),o+=t,c++;continue;case">"===t&&u:if(""===l||yS(a,l))throw new _S("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=sS(PS(e,t),u?this:CS,NS),(r||o||f.length)&&(s=bS(a),r&&(s.dotAll=!0,s.raw=NS(function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=SS(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+SS(e,++r);return o}(e),n)),o&&(s.sticky=!0),f.length&&(s.groups=f)),e!==h)try{uS(a,"source",""===h?"(?:)":h)}catch(w1){}return a},VS=cS(PS),US=0;VS.length>US;)vS(NS,PS,VS[US++]);CS.constructor=NS,NS.prototype=CS,gS(oS,"RegExp",NS)}wS("RegExp");var WS=oe,zS=me,HS=Ko,GS=BE,XS=qE,QS=yt.exports,YS=wi,qS=yr.get,KS=$E,JS=nS,ZS=QS("native-string-replace",String.prototype.replace),$S=RegExp.prototype.exec,ek=$S,tk=zS("".charAt),nk=zS("".indexOf),rk=zS("".replace),ok=zS("".slice),ik=function(){var e=/a/,t=/b*/g;return WS($S,e,"a"),WS($S,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),ak=XS.BROKEN_CARET,sk=void 0!==/()??/.exec("")[1];(ik||sk||ak||KS||JS)&&(ek=function(e){var t,n,r,o,i,a,s,u=this,c=qS(u),l=HS(e),f=c.raw;if(f)return f.lastIndex=u.lastIndex,t=WS(ek,f,l),u.lastIndex=f.lastIndex,t;var h=c.groups,d=ak&&u.sticky,p=WS(GS,u),v=u.source,g=0,m=l;if(d&&(p=rk(p,"y",""),-1===nk(p,"g")&&(p+="g"),m=ok(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==tk(l,u.lastIndex-1))&&(v="(?: "+v+")",m=" "+m,g++),n=new RegExp("^(?:"+v+")",p)),sk&&(n=new RegExp("^"+v+"$(?!\\s)",p)),ik&&(r=u.lastIndex),o=WS($S,d?n:u,m),d?o?(o.input=ok(o.input,g),o[0]=ok(o[0],g),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:ik&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),sk&&o&&o.length>1&&WS(ZS,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=YS(null),i=0;i<h.length;i++)a[(s=h[i])[0]]=o[s[1]];return o});var uk=ek;jo({target:"RegExp",proto:!0,forced:/./.exec!==uk},{exec:uk});var ck=ee,lk=An,fk=BE,hk=$,dk=RegExp.prototype;ck&&hk((function(){return"sy"!==Object.getOwnPropertyDescriptor(dk,"flags").get.call({dotAll:!0,sticky:!0})}))&&lk.f(dk,"flags",{configurable:!0,get:fk});var pk=Pr.PROPER,vk=Nn.exports,gk=En,mk=Ko,yk=$,bk=HE,wk=RegExp.prototype.toString,Ak=yk((function(){return"/a/b"!=wk.call({source:"a",flags:"b"})})),xk=pk&&"toString"!=wk.name;(Ak||xk)&&vk(RegExp.prototype,"toString",(function(){var e=gk(this);return"/"+mk(e.source)+"/"+mk(bk(e))}),{unsafe:!0}),ay("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),by);var Tk=me,Pk=Br,Ck=Ko,_k=ke,Ek=Tk("".charAt),Sk=Tk("".charCodeAt),kk=Tk("".slice),Rk=function(e){return function(t,n){var r,o,i=Ck(_k(t)),a=Pk(n),s=i.length;return a<0||a>=s?e?"":void 0:(r=Sk(i,a))<55296||r>56319||a+1===s||(o=Sk(i,a+1))<56320||o>57343?e?Ek(i,a):r:e?kk(i,a,a+2):o-56320+(r-55296<<10)+65536}},Ok={codeAt:Rk(!1),charAt:Rk(!0)},Fk=Ok.codeAt;jo({target:"String",proto:!0},{codePointAt:function(e){return Fk(this,e)}});var Mk,Ik=LE,Dk=J.TypeError,Lk=function(e){if(Ik(e))throw Dk("The method doesn't accept regular expressions");return e},jk=Xt("match"),Bk=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[jk]=!1,"/./"[e](t)}catch(r){}}return!1},Nk=jo,Vk=me,Uk=Z.f,Wk=Gr,zk=Ko,Hk=Lk,Gk=ke,Xk=Bk,Qk=Vk("".endsWith),Yk=Vk("".slice),qk=Math.min,Kk=Xk("endsWith");Nk({target:"String",proto:!0,forced:!!(Kk||(Mk=Uk(String.prototype,"endsWith"),!Mk||Mk.writable))&&!Kk},{endsWith:function(e){var t=zk(Gk(this));Hk(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=void 0===n?r:qk(Wk(n),r),i=zk(e);return Qk?Qk(t,i,o):Yk(t,o-i.length,o)===i}});var Jk=jo,Zk=me,$k=Wr,eR=J.RangeError,tR=String.fromCharCode,nR=String.fromCodePoint,rR=Zk([].join);Jk({target:"String",stat:!0,forced:!!nR&&1!=nR.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],$k(t,1114111)!==t)throw eR(t+" is not a valid code point");n[o]=t<65536?tR(t):tR(55296+((t-=65536)>>10),t%1024+56320)}return rR(n,"")}});var oR=jo,iR=Lk,aR=ke,sR=Ko,uR=Bk,cR=me("".indexOf);oR({target:"String",proto:!0,forced:!uR("includes")},{includes:function(e){return!!~cR(sR(aR(this)),sR(iR(e)),arguments.length>1?arguments[1]:void 0)}});var lR=Ok.charAt,fR=Ko,hR=yr,dR=sh,pR=hR.set,vR=hR.getterFor("String Iterator");dR(String,"String",(function(e){pR(this,{type:"String Iterator",string:fR(e),index:0})}),(function(){var e,t=vR(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 gR=me,mR=Nn.exports,yR=uk,bR=$,wR=Xt,AR=Bn,xR=wR("species"),TR=RegExp.prototype,PR=function(e,t,n,r){var o=wR(e),i=!bR((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!bR((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[xR]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!a||n){var s=gR(/./[o]),u=t(o,""[e],(function(e,t,n,r,o){var a=gR(e),u=t.exec;return u===yR||u===TR.exec?i&&!o?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}}));mR(String.prototype,e,u[0]),mR(TR,o,u[1])}r&&AR(TR[o],"sham",!0)},CR=Ok.charAt,_R=function(e,t,n){return t+(n?CR(e,t).length:1)},ER=oe,SR=En,kR=Me,RR=Ae,OR=uk,FR=J.TypeError,MR=function(e,t){var n=e.exec;if(kR(n)){var r=ER(n,e,t);return null!==r&&SR(r),r}if("RegExp"===RR(e))return ER(OR,e,t);throw FR("RegExp#exec called on incompatible receiver")},IR=oe,DR=En,LR=Gr,jR=Ko,BR=ke,NR=ht,VR=_R,UR=MR;PR("match",(function(e,t,n){return[function(t){var n=BR(this),r=null==t?void 0:NR(t,e);return r?IR(r,t,n):new RegExp(t)[e](jR(n))},function(e){var r=DR(this),o=jR(e),i=n(t,r,o);if(i.done)return i.value;if(!r.global)return UR(r,o);var a=r.unicode;r.lastIndex=0;for(var s,u=[],c=0;null!==(s=UR(r,o));){var l=jR(s[0]);u[c]=l,""===l&&(r.lastIndex=VR(o,LR(r.lastIndex),a)),c++}return 0===c?null:u}]}));var WR=me,zR=Gr,HR=Ko,GR=ke,XR=WR(Yw),QR=WR("".slice),YR=Math.ceil,qR=function(e){return function(t,n,r){var o,i,a=HR(GR(t)),s=zR(n),u=a.length,c=void 0===r?" ":HR(r);return s<=u||""==c?a:((i=XR(c,YR((o=s-u)/c.length))).length>o&&(i=QR(i,0,o)),e?a+i:i+a)}},KR={start:qR(!1),end:qR(!0)},JR=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Ue),ZR=KR.end;jo({target:"String",proto:!0,forced:JR},{padEnd:function(e){return ZR(this,e,arguments.length>1?arguments[1]:void 0)}});var $R=KR.start;jo({target:"String",proto:!0,forced:JR},{padStart:function(e){return $R(this,e,arguments.length>1?arguments[1]:void 0)}});var eO=jo,tO=me,nO=Fe,rO=Et,oO=Ko,iO=Qr,aO=tO([].push),sO=tO([].join);eO({target:"String",stat:!0},{raw:function(e){for(var t=nO(rO(e).raw),n=iO(t),r=arguments.length,o=[],i=0;n>i;){if(aO(o,oO(t[i++])),i===n)return sO(o,"");i<r&&aO(o,oO(arguments[i]))}}}),jo({target:"String",proto:!0},{repeat:Yw});var uO=me,cO=Et,lO=Math.floor,fO=uO("".charAt),hO=uO("".replace),dO=uO("".slice),pO=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,vO=/\$([$&'`]|\d{1,2})/g,gO=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,u=vO;return void 0!==o&&(o=cO(o),u=pO),hO(i,u,(function(i,u){var c;switch(fO(u,0)){case"$":return"$";case"&":return e;case"`":return dO(t,0,n);case"'":return dO(t,a);case"<":c=o[dO(u,1,-1)];break;default:var l=+u;if(0===l)return i;if(l>s){var f=lO(l/10);return 0===f?i:f<=s?void 0===r[f-1]?fO(u,1):r[f-1]+fO(u,1):i}c=r[l-1]}return void 0===c?"":c}))},mO=iu,yO=oe,bO=me,wO=PR,AO=$,xO=En,TO=Me,PO=Br,CO=Gr,_O=Ko,EO=ke,SO=_R,kO=ht,RO=gO,OO=MR,FO=Xt("replace"),MO=Math.max,IO=Math.min,DO=bO([].concat),LO=bO([].push),jO=bO("".indexOf),BO=bO("".slice),NO="$0"==="a".replace(/./,"$0"),VO=!!/./[FO]&&""===/./[FO]("a","$0");wO("replace",(function(e,t,n){var r=VO?"$":"$0";return[function(e,n){var r=EO(this),o=null==e?void 0:kO(e,FO);return o?yO(o,e,r,n):yO(t,_O(r),e,n)},function(e,o){var i=xO(this),a=_O(e);if("string"==typeof o&&-1===jO(o,r)&&-1===jO(o,"$<")){var s=n(t,i,a,o);if(s.done)return s.value}var u=TO(o);u||(o=_O(o));var c=i.global;if(c){var l=i.unicode;i.lastIndex=0}for(var f=[];;){var h=OO(i,a);if(null===h)break;if(LO(f,h),!c)break;""===_O(h[0])&&(i.lastIndex=SO(a,CO(i.lastIndex),l))}for(var d,p="",v=0,g=0;g<f.length;g++){for(var m=_O((h=f[g])[0]),y=MO(IO(PO(h.index),a.length),0),b=[],w=1;w<h.length;w++)LO(b,void 0===(d=h[w])?d:String(d));var A=h.groups;if(u){var x=DO([m],b,y,a);void 0!==A&&LO(x,A);var T=_O(mO(o,void 0,x))}else T=RO(m,a,y,b,A,o);y>=v&&(p+=BO(a,v,y)+T,v=y+m.length)}return p+BO(a,v)}]}),!!AO((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!NO||VO);var UO=oe,WO=En,zO=ke,HO=wx,GO=Ko,XO=ht,QO=MR;PR("search",(function(e,t,n){return[function(t){var n=zO(this),r=null==t?void 0:XO(t,e);return r?UO(r,t,n):new RegExp(t)[e](GO(n))},function(e){var r=WO(this),o=GO(e),i=n(t,r,o);if(i.done)return i.value;var a=r.lastIndex;HO(a,0)||(r.lastIndex=0);var s=QO(r,o);return HO(r.lastIndex,a)||(r.lastIndex=a),null===s?-1:s.index}]}));var YO=iu,qO=oe,KO=me,JO=PR,ZO=LE,$O=En,eF=ke,tF=wg,nF=_R,rF=Gr,oF=Ko,iF=ht,aF=Oi,sF=MR,uF=uk,cF=$,lF=qE.UNSUPPORTED_Y,fF=Math.min,hF=[].push,dF=KO(/./.exec),pF=KO(hF),vF=KO("".slice);JO("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?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!ZO(e))return qO(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=qO(uF,f,r))&&!((a=f.lastIndex)>l&&(pF(u,vF(r,l,i.index)),i.length>1&&i.index<r.length&&YO(hF,u,aF(i,1)),s=i[0].length,l=a,u.length>=o));)f.lastIndex===i.index&&f.lastIndex++;return l===r.length?!s&&dF(f,"")||pF(u,""):pF(u,vF(r,l)),u.length>o?aF(u,0,o):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:qO(t,this,e,n)}:t,[function(t,n){var o=eF(this),i=null==t?void 0:iF(t,e);return i?qO(i,t,o,n):qO(r,oF(o),t,n)},function(e,o){var i=$O(this),a=oF(e),s=n(r,i,a,o,r!==t);if(s.done)return s.value;var u=tF(i,RegExp),c=i.unicode,l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(lF?"g":"y"),f=new u(lF?"^(?:"+i.source+")":i,l),h=void 0===o?4294967295:o>>>0;if(0===h)return[];if(0===a.length)return null===sF(f,a)?[a]:[];for(var d=0,p=0,v=[];p<a.length;){f.lastIndex=lF?0:p;var g,m=sF(f,lF?vF(a,p):a);if(null===m||(g=fF(rF(f.lastIndex+(lF?p:0)),a.length))===d)p=nF(a,p,c);else{if(pF(v,vF(a,d,p)),v.length===h)return v;for(var y=1;y<=m.length-1;y++)if(pF(v,m[y]),v.length===h)return v;p=d=g}}return pF(v,vF(a,d)),v}]}),!!cF((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]})),lF);var gF=jo,mF=me,yF=Z.f,bF=Gr,wF=Ko,AF=Lk,xF=ke,TF=Bk,PF=mF("".startsWith),CF=mF("".slice),_F=Math.min,EF=TF("startsWith"),SF=!EF&&!!function(){var e=yF(String.prototype,"startsWith");return e&&!e.writable}();gF({target:"String",proto:!0,forced:!SF&&!EF},{startsWith:function(e){var t=wF(xF(this));AF(e);var n=bF(_F(arguments.length>1?arguments[1]:void 0,t.length)),r=wF(e);return PF?PF(t,r,n):CF(t,n,n+r.length)===r}});var kF=Pr.PROPER,RF=$,OF=Fb,FF=function(e){return RF((function(){return!!OF[e]()||"​…᠎"!=="​…᠎"[e]()||kF&&OF[e].name!==e}))},MF=Vb.trim;jo({target:"String",proto:!0,forced:FF("trim")},{trim:function(){return MF(this)}});var IF=Vb.end,DF=FF("trimEnd")?function(){return IF(this)}:"".trimEnd;jo({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==DF},{trimRight:DF});jo({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==DF},{trimEnd:DF});var LF=Vb.start,jF=FF("trimStart")?function(){return LF(this)}:"".trimStart;jo({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==jF},{trimLeft:jF});jo({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==jF},{trimStart:jF});var BF=ke,NF=Ko,VF=/"/g,UF=me("".replace),WF=function(e,t,n,r){var o=NF(BF(e)),i="<"+t;return""!==n&&(i+=" "+n+'="'+UF(NF(r),VF,"&quot;")+'"'),i+">"+o+"</"+t+">"},zF=$,HF=function(e){return zF((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))},GF=WF;jo({target:"String",proto:!0,forced:HF("anchor")},{anchor:function(e){return GF(this,"a","name",e)}});var XF=WF;jo({target:"String",proto:!0,forced:HF("big")},{big:function(){return XF(this,"big","","")}});var QF=WF;jo({target:"String",proto:!0,forced:HF("blink")},{blink:function(){return QF(this,"blink","","")}});var YF=WF;jo({target:"String",proto:!0,forced:HF("bold")},{bold:function(){return YF(this,"b","","")}});var qF=WF;jo({target:"String",proto:!0,forced:HF("fixed")},{fixed:function(){return qF(this,"tt","","")}});var KF=WF;jo({target:"String",proto:!0,forced:HF("fontcolor")},{fontcolor:function(e){return KF(this,"font","color",e)}});var JF=WF;jo({target:"String",proto:!0,forced:HF("fontsize")},{fontsize:function(e){return JF(this,"font","size",e)}});var ZF=WF;jo({target:"String",proto:!0,forced:HF("italics")},{italics:function(){return ZF(this,"i","","")}});var $F=WF;jo({target:"String",proto:!0,forced:HF("link")},{link:function(e){return $F(this,"a","href",e)}});var eM=WF;jo({target:"String",proto:!0,forced:HF("small")},{small:function(){return eM(this,"small","","")}});var tM=WF;jo({target:"String",proto:!0,forced:HF("strike")},{strike:function(){return tM(this,"strike","","")}});var nM=WF;jo({target:"String",proto:!0,forced:HF("sub")},{sub:function(){return nM(this,"sub","","")}});var rM=WF;jo({target:"String",proto:!0,forced:HF("sup")},{sup:function(){return rM(this,"sup","","")}});var oM={exports:{}},iM=J,aM=$,sM=Yl,uM=hg.NATIVE_ARRAY_BUFFER_VIEWS,cM=iM.ArrayBuffer,lM=iM.Int8Array,fM=!uM||!aM((function(){lM(1)}))||!aM((function(){new lM(-1)}))||!sM((function(e){new lM,new lM(null),new lM(1.5),new lM(e)}),!0)||aM((function(){return 1!==new lM(new cM(2),1,void 0).length})),hM=Br,dM=J.RangeError,pM=function(e){var t=hM(e);if(t<0)throw dM("The argument can't be less than 0");return t},vM=J.RangeError,gM=function(e,t){var n=pM(e);if(n%t)throw vM("Wrong offset");return n},mM=na,yM=oe,bM=gg,wM=Et,AM=Qr,xM=Ol,TM=Pl,PM=bl,CM=hg.aTypedArrayConstructor,_M=function(e){var t,n,r,o,i,a,s=bM(this),u=wM(e),c=arguments.length,l=c>1?arguments[1]:void 0,f=void 0!==l,h=TM(u);if(h&&!PM(h))for(a=(i=xM(u,h)).next,u=[];!(o=yM(a,i)).done;)u.push(o.value);for(f&&c>2&&(l=mM(l,arguments[2])),n=AM(u),r=new(CM(s))(n),t=0;n>t;t++)r[t]=f?l(u[t],t):u[t];return r},EM=jo,SM=J,kM=oe,RM=ee,OM=fM,FM=hg,MM=Sv,IM=bp,DM=fe,LM=Bn,jM=yw,BM=Gr,NM=Tp,VM=gM,UM=on,WM=Rt,zM=Qo,HM=De,GM=ot,XM=wi,QM=Ve,YM=zf,qM=Dr.f,KM=_M,JM=Ia.forEach,ZM=tp,$M=An,eI=Z,tI=Gm,nI=yr.get,rI=yr.set,oI=$M.f,iI=eI.f,aI=Math.round,sI=SM.RangeError,uI=MM.ArrayBuffer,cI=uI.prototype,lI=MM.DataView,fI=FM.NATIVE_ARRAY_BUFFER_VIEWS,hI=FM.TYPED_ARRAY_CONSTRUCTOR,dI=FM.TYPED_ARRAY_TAG,pI=FM.TypedArray,vI=FM.TypedArrayPrototype,gI=FM.aTypedArrayConstructor,mI=FM.isTypedArray,yI=function(e,t){gI(e);for(var n=0,r=t.length,o=new e(r);r>n;)o[n]=t[n++];return o},bI=function(e,t){oI(e,t,{get:function(){return nI(this)[t]}})},wI=function(e){var t;return QM(cI,e)||"ArrayBuffer"==(t=zM(e))||"SharedArrayBuffer"==t},AI=function(e,t){return mI(e)&&!GM(t)&&t in e&&jM(+t)&&t>=0},xI=function(e,t){return t=UM(t),AI(e,t)?DM(2,e[t]):iI(e,t)},TI=function(e,t,n){return t=UM(t),!(AI(e,t)&&HM(n)&&WM(n,"value"))||WM(n,"get")||WM(n,"set")||n.configurable||WM(n,"writable")&&!n.writable||WM(n,"enumerable")&&!n.enumerable?oI(e,t,n):(e[t]=n.value,e)};RM?(fI||(eI.f=xI,$M.f=TI,bI(vI,"buffer"),bI(vI,"byteOffset"),bI(vI,"byteLength"),bI(vI,"length")),EM({target:"Object",stat:!0,forced:!fI},{getOwnPropertyDescriptor:xI,defineProperty:TI}),oM.exports=function(e,t,n){var r=e.match(/\d+$/)[0]/8,o=e+(n?"Clamped":"")+"Array",i="get"+e,a="set"+e,s=SM[o],u=s,c=u&&u.prototype,l={},f=function(e,t){oI(e,t,{get:function(){return function(e,t){var n=nI(e);return n.view[i](t*r+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var i=nI(e);n&&(o=(o=aI(o))<0?0:o>255?255:255&o),i.view[a](t*r+i.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};fI?OM&&(u=t((function(e,t,n,o){return IM(e,c),tI(HM(t)?wI(t)?void 0!==o?new s(t,VM(n,r),o):void 0!==n?new s(t,VM(n,r)):new s(t):mI(t)?yI(u,t):kM(KM,u,t):new s(NM(t)),e,u)})),YM&&YM(u,pI),JM(qM(s),(function(e){e in u||LM(u,e,s[e])})),u.prototype=c):(u=t((function(e,t,n,o){IM(e,c);var i,a,s,l=0,h=0;if(HM(t)){if(!wI(t))return mI(t)?yI(u,t):kM(KM,u,t);i=t,h=VM(n,r);var d=t.byteLength;if(void 0===o){if(d%r)throw sI("Wrong length");if((a=d-h)<0)throw sI("Wrong length")}else if((a=BM(o)*r)+h>d)throw sI("Wrong length");s=a/r}else s=NM(t),i=new uI(a=s*r);for(rI(e,{buffer:i,byteOffset:h,byteLength:a,length:s,view:new lI(i)});l<s;)f(e,l++)})),YM&&YM(u,pI),c=u.prototype=XM(vI)),c.constructor!==u&&LM(c,"constructor",u),LM(c,hI,u),dI&&LM(c,dI,o),l[o]=u,EM({global:!0,forced:u!=s,sham:!fI},l),"BYTES_PER_ELEMENT"in u||LM(u,"BYTES_PER_ELEMENT",r),"BYTES_PER_ELEMENT"in c||LM(c,"BYTES_PER_ELEMENT",r),ZM(o)}):oM.exports=function(){},(0,oM.exports)("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Float64",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Int8",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Int16",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Int32",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0),(0,oM.exports)("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Uint32",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var PI=hg,CI=me(Ec),_I=PI.aTypedArray;(0,PI.exportTypedArrayMethod)("copyWithin",(function(e,t){return CI(_I(this),e,t,arguments.length>2?arguments[2]:void 0)}));var EI=Ia.every,SI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("every",(function(e){return EI(SI(this),e,arguments.length>1?arguments[1]:void 0)}));var kI=oe,RI=jc,OI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return kI(RI,OI(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}));var FI=Qr,MI=wg,II=hg.TYPED_ARRAY_CONSTRUCTOR,DI=hg.aTypedArrayConstructor,LI=function(e){return DI(MI(e,e[II]))},jI=function(e,t){for(var n=0,r=FI(t),o=new e(r);r>n;)o[n]=t[n++];return o},BI=LI,NI=Ia.filter,VI=function(e,t){return jI(BI(e),t)},UI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("filter",(function(e){var t=NI(UI(this),e,arguments.length>1?arguments[1]:void 0);return VI(this,t)}));var WI=Ia.find,zI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("find",(function(e){return WI(zI(this),e,arguments.length>1?arguments[1]:void 0)}));var HI=Ia.findIndex,GI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("findIndex",(function(e){return HI(GI(this),e,arguments.length>1?arguments[1]:void 0)}));var XI=Ia.forEach,QI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("forEach",(function(e){XI(QI(this),e,arguments.length>1?arguments[1]:void 0)})),(0,hg.exportTypedArrayStaticMethod)("from",_M,fM);var YI=Zr.includes,qI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("includes",(function(e){return YI(qI(this),e,arguments.length>1?arguments[1]:void 0)}));var KI=Zr.indexOf,JI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("indexOf",(function(e){return KI(JI(this),e,arguments.length>1?arguments[1]:void 0)}));var ZI=J,$I=$,eD=me,tD=hg,nD=mh,rD=Xt("iterator"),oD=ZI.Uint8Array,iD=eD(nD.values),aD=eD(nD.keys),sD=eD(nD.entries),uD=tD.aTypedArray,cD=tD.exportTypedArrayMethod,lD=oD&&oD.prototype,fD=!$I((function(){lD[rD].call([1])})),hD=!!lD&&lD.values&&lD[rD]===lD.values&&"values"===lD.values.name,dD=function(){return iD(uD(this))};cD("entries",(function(){return sD(uD(this))}),fD),cD("keys",(function(){return aD(uD(this))}),fD),cD("values",dD,fD||!hD,{name:"values"}),cD(rD,dD,fD||!hD,{name:"values"});var pD=hg.aTypedArray,vD=hg.exportTypedArrayMethod,gD=me([].join);vD("join",(function(e){return gD(pD(this),e)}));var mD=iu,yD=Dh,bD=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return mD(yD,bD(this),t>1?[e,arguments[1]]:[e])}));var wD=Ia.map,AD=LI,xD=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("map",(function(e){return wD(xD(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(AD(e))(t)}))}));var TD=hg.aTypedArrayConstructor;(0,hg.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(TD(this))(t);t>e;)n[e]=arguments[e++];return n}),fM);var PD=Yh.left,CD=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return PD(CD(this),e,t,t>1?arguments[1]:void 0)}));var _D=Yh.right,ED=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return _D(ED(this),e,t,t>1?arguments[1]:void 0)}));var SD=hg.aTypedArray,kD=hg.exportTypedArrayMethod,RD=Math.floor;kD("reverse",(function(){for(var e,t=this,n=SD(t).length,r=RD(n/2),o=0;o<r;)e=t[o],t[o++]=t[--n],t[n]=e;return t}));var OD=J,FD=oe,MD=hg,ID=Qr,DD=gM,LD=Et,jD=$,BD=OD.RangeError,ND=OD.Int8Array,VD=ND&&ND.prototype,UD=VD&&VD.set,WD=MD.aTypedArray,zD=MD.exportTypedArrayMethod,HD=!jD((function(){var e=new Uint8ClampedArray(2);return FD(UD,e,{length:1,0:3},1),3!==e[1]})),GD=HD&&MD.NATIVE_ARRAY_BUFFER_VIEWS&&jD((function(){var e=new ND(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));zD("set",(function(e){WD(this);var t=DD(arguments.length>1?arguments[1]:void 0,1),n=LD(e);if(HD)return FD(UD,this,n,t);var r=this.length,o=ID(n),i=0;if(o+t>r)throw BD("Wrong length");for(;i<o;)this[t+i]=n[i++]}),!HD||GD);var XD=LI,QD=au,YD=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("slice",(function(e,t){for(var n=QD(YD(this),e,t),r=XD(this),o=0,i=n.length,a=new r(i);i>o;)a[o]=n[o++];return a}),$((function(){new Int8Array(1).slice()})));var qD=Ia.some,KD=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("some",(function(e){return qD(KD(this),e,arguments.length>1?arguments[1]:void 0)}));var JD=me,ZD=$,$D=lt,eL=Cd,tL=Ed,nL=Sd,rL=Ye,oL=Rd,iL=hg.aTypedArray,aL=hg.exportTypedArrayMethod,sL=J.Uint16Array,uL=sL&&JD(sL.prototype.sort),cL=!(!uL||ZD((function(){uL(new sL(2),null)}))&&ZD((function(){uL(new sL(2),{})}))),lL=!!uL&&!ZD((function(){if(rL)return rL<74;if(tL)return tL<67;if(nL)return!0;if(oL)return oL<602;var e,t,n=new sL(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(uL(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));aL("sort",(function(e){return void 0!==e&&$D(e),lL?uL(this,e):eL(iL(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))}),!lL||cL);var fL=Gr,hL=Wr,dL=LI,pL=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("subarray",(function(e,t){var n=pL(this),r=n.length,o=hL(e,r);return new(dL(n))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,fL((void 0===t?r:hL(t,r))-o))}));var vL=iu,gL=hg,mL=$,yL=au,bL=J.Int8Array,wL=gL.aTypedArray,AL=gL.exportTypedArrayMethod,xL=[].toLocaleString,TL=!!bL&&mL((function(){xL.call(new bL(1))}));AL("toLocaleString",(function(){return vL(xL,TL?yL(wL(this)):wL(this),yL(arguments))}),mL((function(){return[1,2].toLocaleString()!=new bL([1,2]).toLocaleString()}))||!mL((function(){bL.prototype.toLocaleString.call([1,2])})));var PL=hg.exportTypedArrayMethod,CL=$,_L=me,EL=J.Uint8Array,SL=EL&&EL.prototype||{},kL=[].toString,RL=_L([].join);CL((function(){kL.call({})}))&&(kL=function(){return RL(this)});var OL=SL.toString!=kL;PL("toString",kL,OL);var FL=me,ML=gp,IL=om.exports.getWeakData,DL=En,LL=De,jL=bp,BL=Um,NL=Rt,VL=yr.set,UL=yr.getterFor,WL=Ia.find,zL=Ia.findIndex,HL=FL([].splice),GL=0,XL=function(e){return e.frozen||(e.frozen=new QL)},QL=function(){this.entries=[]},YL=function(e,t){return WL(e.entries,(function(e){return e[0]===t}))};QL.prototype={get:function(e){var t=YL(this,e);if(t)return t[1]},has:function(e){return!!YL(this,e)},set:function(e,t){var n=YL(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=zL(this.entries,(function(t){return t[0]===e}));return~t&&HL(this.entries,t,1),!!~t}};var qL,KL={getConstructor:function(e,t,n,r){var o=e((function(e,o){jL(e,i),VL(e,{type:t,id:GL++,frozen:void 0}),null!=o&&BL(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=UL(t),s=function(e,t,n){var r=a(e),o=IL(DL(t),!0);return!0===o?XL(r).set(t,n):o[r.id]=n,e};return ML(i,{delete:function(e){var t=a(this);if(!LL(e))return!1;var n=IL(e);return!0===n?XL(t).delete(e):n&&NL(n,t.id)&&delete n[t.id]},has:function(e){var t=a(this);if(!LL(e))return!1;var n=IL(e);return!0===n?XL(t).has(e):n&&NL(n,t.id)}}),ML(i,n?{get:function(e){var t=a(this);if(LL(e)){var n=IL(e);return!0===n?XL(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}},JL=J,ZL=me,$L=gp,ej=om.exports,tj=ay,nj=KL,rj=De,oj=fm,ij=yr.enforce,aj=Kn,sj=!JL.ActiveXObject&&"ActiveXObject"in JL,uj=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},cj=tj("WeakMap",uj,nj);if(aj&&sj){qL=nj.getConstructor(uj,"WeakMap",!0),ej.enable();var lj=cj.prototype,fj=ZL(lj.delete),hj=ZL(lj.has),dj=ZL(lj.get),pj=ZL(lj.set);$L(lj,{delete:function(e){if(rj(e)&&!oj(e)){var t=ij(this);return t.frozen||(t.frozen=new qL),fj(this,e)||t.frozen.delete(e)}return fj(this,e)},has:function(e){if(rj(e)&&!oj(e)){var t=ij(this);return t.frozen||(t.frozen=new qL),hj(this,e)||t.frozen.has(e)}return hj(this,e)},get:function(e){if(rj(e)&&!oj(e)){var t=ij(this);return t.frozen||(t.frozen=new qL),hj(this,e)?dj(this,e):t.frozen.get(e)}return dj(this,e)},set:function(e,t){if(rj(e)&&!oj(e)){var n=ij(this);n.frozen||(n.frozen=new qL),hj(this,e)?pj(this,e,t):n.frozen.set(e,t)}else pj(this,e,t);return this}})}ay("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),KL);var vj=Error,gj=me("".replace),mj=String(vj("zxcasd").stack),yj=/\n\s*at [^:]*:[^\n]*/,bj=yj.test(mj),wj=De,Aj=Bn,xj=Ko,Tj=fe,Pj=!$((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Tj(1,7)),7!==e.stack)})),Cj=jo,_j=J,Ej=Ve,Sj=bf,kj=zf,Rj=wo,Oj=wi,Fj=Bn,Mj=fe,Ij=function(e,t){if(bj&&"string"==typeof e&&!vj.prepareStackTrace)for(;t--;)e=gj(e,yj,"");return e},Dj=function(e,t){wj(t)&&"cause"in t&&Aj(e,"cause",t.cause)},Lj=Um,jj=function(e,t){return void 0===e?arguments.length<2?"":t:xj(e)},Bj=Pj,Nj=Xt("toStringTag"),Vj=_j.Error,Uj=[].push,Wj=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,o=Ej(zj,this);kj?n=kj(new Vj,o?Sj(this):zj):(n=o?this:Oj(zj),Fj(n,Nj,"Error")),void 0!==t&&Fj(n,"message",jj(t)),Bj&&Fj(n,"stack",Ij(n.stack,1)),Dj(n,r);var i=[];return Lj(e,Uj,{that:i}),Fj(n,"errors",i),n};kj?kj(Wj,Vj):Rj(Wj,Vj,{name:!0});var zj=Wj.prototype=Oj(Vj.prototype,{constructor:Mj(1,Wj),message:Mj(1,""),name:Mj(1,"AggregateError")});Cj({global:!0},{AggregateError:Wj});var Hj=ee,Gj=Fc,Xj=Et,Qj=Qr,Yj=An.f;Hj&&(Yj(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=Xj(this),t=Qj(e);return 0==t?0:t-1}}),Gj("lastIndex"));var qj=ee,Kj=Fc,Jj=Et,Zj=Qr,$j=An.f;qj&&($j(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=Jj(this),t=Zj(e);return 0==t?void 0:e[t-1]},set:function(e){var t=Jj(this),n=Zj(t);return t[0==n?0:n-1]=e}}),Kj("lastItem"));var eB=J,tB=Ne,nB=wi,rB=De,oB=eB.Object,iB=eB.TypeError,aB=tB("Map"),sB=tB("WeakMap"),uB=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=nB(null)};uB.prototype.get=function(e,t){return this[e]||(this[e]=t())},uB.prototype.next=function(e,t,n){var r=n?this.objectsByIndex[e]||(this.objectsByIndex[e]=new sB):this.primitives||(this.primitives=new aB),o=r.get(t);return o||r.set(t,o=new uB),o};var cB=new uB,lB=function(){var e,t,n=cB,r=arguments.length;for(e=0;e<r;e++)rB(t=arguments[e])&&(n=n.next(e,t,!0));if(this===oB&&n===cB)throw iB("Composite keys must contain a non-primitive component");for(e=0;e<r;e++)rB(t=arguments[e])||(n=n.next(e,t,!1));return n},fB=jo,hB=iu,dB=lB,pB=Ne,vB=wi,gB=J.Object,mB=function(){var e=pB("Object","freeze");return e?e(vB(null)):vB(null)};fB({global:!0,forced:!0},{compositeKey:function(){return hB(dB,gB,arguments).get("object",mB)}});var yB=lB,bB=Ne,wB=iu;jo({global:!0,forced:!0},{compositeSymbol:function(){return 1==arguments.length&&"string"==typeof arguments[0]?bB("Symbol").for(arguments[0]):wB(yB,null,arguments).get("symbol",bB("Symbol"))}}),jo({global:!0},{globalThis:J});var AB=oe,xB=lt,TB=En,PB=function(){for(var e,t=TB(this),n=xB(t.delete),r=!0,o=0,i=arguments.length;o<i;o++)e=AB(n,t,arguments[o]),r=r&&e;return!!r};jo({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:PB});var CB=oe,_B=function(e){return CB(Map.prototype.entries,e)},EB=En,SB=na,kB=_B,RB=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=EB(this),n=kB(t),r=SB(e,arguments.length>1?arguments[1]:void 0);return!RB(n,(function(e,n,o){if(!r(n,e,t))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var OB=Ne,FB=na,MB=oe,IB=lt,DB=En,LB=wg,jB=_B,BB=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=DB(this),n=jB(t),r=FB(e,arguments.length>1?arguments[1]:void 0),o=new(LB(t,OB("Map"))),i=IB(o.set);return BB(n,(function(e,n){r(n,e,t)&&MB(i,o,e,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}});var NB=En,VB=na,UB=_B,WB=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=NB(this),n=UB(t),r=VB(e,arguments.length>1?arguments[1]:void 0);return WB(n,(function(e,n,o){if(r(n,e,t))return o(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var zB=En,HB=na,GB=_B,XB=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=zB(this),n=GB(t),r=HB(e,arguments.length>1?arguments[1]:void 0);return XB(n,(function(e,n,o){if(r(n,e,t))return o(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var QB=na,YB=oe,qB=lt,KB=gg,JB=Um,ZB=[].push,$B=function(e){var t,n,r,o,i=arguments.length,a=i>1?arguments[1]:void 0;return KB(this),(t=void 0!==a)&&qB(a),null==e?new this:(n=[],t?(r=0,o=QB(a,i>2?arguments[2]:void 0),JB(e,(function(e){YB(ZB,n,o(e,r++))}))):JB(e,ZB,{that:n}),new this(n))};jo({target:"Map",stat:!0,forced:!0},{from:$B});var eN=jo,tN=oe,nN=lt,rN=Ol,oN=Um,iN=me([].push);eN({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){nN(t);var n=rN(e),r=new this,o=nN(r.has),i=nN(r.get),a=nN(r.set);return oN(n,(function(e){var n=t(e);tN(o,r,n)?iN(tN(i,r,n),e):tN(a,r,n,[e])}),{IS_ITERATOR:!0}),r}});var aN=En,sN=_B,uN=function(e,t){return e===t||e!=e&&t!=t},cN=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return cN(sN(aN(this)),(function(t,n,r){if(uN(n,e))return r()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var lN=oe,fN=Um,hN=lt;jo({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new this;hN(t);var r=hN(n.set);return fN(e,(function(e){lN(r,n,t(e),e)})),n}});var dN=En,pN=_B,vN=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){return vN(pN(dN(this)),(function(t,n,r){if(n===e)return r(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var gN=Ne,mN=na,yN=oe,bN=lt,wN=En,AN=wg,xN=_B,TN=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=wN(this),n=xN(t),r=mN(e,arguments.length>1?arguments[1]:void 0),o=new(AN(t,gN("Map"))),i=bN(o.set);return TN(n,(function(e,n){yN(i,o,r(n,e,t),n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}});var PN=Ne,CN=na,_N=oe,EN=lt,SN=En,kN=wg,RN=_B,ON=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=SN(this),n=RN(t),r=CN(e,arguments.length>1?arguments[1]:void 0),o=new(kN(t,PN("Map"))),i=EN(o.set);return ON(n,(function(e,n){_N(i,o,e,r(n,e,t))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}});var FN=lt,MN=En,IN=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{merge:function(e){for(var t=MN(this),n=FN(t.set),r=arguments.length,o=0;o<r;)IN(arguments[o++],n,{that:t,AS_ENTRIES:!0});return t}});var DN=au,LN=function(){return new this(DN(arguments))};jo({target:"Map",stat:!0,forced:!0},{of:LN});var jN=jo,BN=En,NN=lt,VN=_B,UN=Um,WN=J.TypeError;jN({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=BN(this),n=VN(t),r=arguments.length<2,o=r?void 0:arguments[1];if(NN(e),UN(n,(function(n,i){r?(r=!1,o=i):o=e(o,i,n,t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r)throw WN("Reduce of empty map with no initial value");return o}});var zN=En,HN=na,GN=_B,XN=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=zN(this),n=GN(t),r=HN(e,arguments.length>1?arguments[1]:void 0);return XN(n,(function(e,n,o){if(r(n,e,t))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var QN=jo,YN=oe,qN=En,KN=lt,JN=J.TypeError;QN({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=qN(this),r=KN(n.get),o=KN(n.has),i=KN(n.set),a=arguments.length;KN(t);var s=YN(o,n,e);if(!s&&a<3)throw JN("Updating absent value");var u=s?YN(r,n,e):KN(a>2?arguments[2]:void 0)(e,n);return YN(i,n,e,t(u,e,n)),n}});var ZN=jo,$N=Math.min,eV=Math.max;ZN({target:"Math",stat:!0,forced:!0},{clamp:function(e,t,n){return $N(n,eV(t,e))}}),jo({target:"Math",stat:!0,forced:!0},{DEG_PER_RAD:Math.PI/180});var tV=jo,nV=180/Math.PI;tV({target:"Math",stat:!0,forced:!0},{degrees:function(e){return e*nV}});var rV=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},oV=rV,iV=ab;jo({target:"Math",stat:!0,forced:!0},{fscale:function(e,t,n,r,o){return iV(oV(e,t,n,r,o))}}),jo({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}}),jo({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)}}),jo({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}}),jo({target:"Math",stat:!0,forced:!0},{RAD_PER_DEG:180/Math.PI});var aV=jo,sV=Math.PI/180;aV({target:"Math",stat:!0,forced:!0},{radians:function(e){return e*sV}}),jo({target:"Math",stat:!0,forced:!0},{scale:rV});var uV=jo,cV=J,lV=En,fV=vw,hV=If,dV=yr,pV=dV.set,vV=dV.getterFor("Seeded Random Generator"),gV=cV.TypeError,mV=hV((function(e){pV(this,{type:"Seeded Random Generator",seed:e%2147483647})}),"Seeded Random",(function(){var e=vV(this);return{value:(1073741823&(e.seed=(1103515245*e.seed+12345)%2147483647))/1073741823,done:!1}}));uV({target:"Math",stat:!0,forced:!0},{seededPRNG:function(e){var t=lV(e).seed;if(!fV(t))throw gV('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new mV(t)}}),jo({target:"Math",stat:!0,forced:!0},{signbit:function(e){return(e=+e)==e&&0==e?1/e==-1/0:e<0}}),jo({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 yV=jo,bV=J,wV=me,AV=Br,xV=Ww,TV=bV.RangeError,PV=bV.SyntaxError,CV=bV.TypeError,_V=/^[\da-z]+$/,EV=wV("".charAt),SV=wV(_V.exec),kV=wV(1..toString),RV=wV("".slice);yV({target:"Number",stat:!0,forced:!0},{fromString:function(e,t){var n,r,o=1;if("string"!=typeof e)throw CV("Invalid number representation");if(!e.length)throw PV("Invalid number representation");if("-"==EV(e,0)&&(o=-1,!(e=RV(e,1)).length))throw PV("Invalid number representation");if((n=void 0===t?10:AV(t))<2||n>36)throw TV("Invalid radix");if(!SV(_V,e)||kV(r=xV(e,n),n)!==e)throw PV("Invalid number representation");return o*r}});var OV=J,FV=Me,MV=Xt("observable"),IV=OV.Observable,DV=IV&&IV.prototype,LV=!(FV(IV)&&FV(IV.from)&&FV(IV.of)&&FV(DV.subscribe)&&FV(DV[MV])),jV=jo,BV=oe,NV=ee,VV=tp,UV=lt,WV=Me,zV=En,HV=De,GV=bp,XV=ht,QV=An.f,YV=Nn.exports,qV=gp,KV=wP,JV=yr,ZV=LV,$V=Xt("observable"),eU=JV.getterFor,tU=JV.set,nU=eU("Observable"),rU=eU("Subscription"),oU=eU("SubscriptionObserver"),iU=function(e){this.observer=zV(e),this.cleanup=void 0,this.subscriptionObserver=void 0};iU.prototype={type:"Subscription",clean:function(){var e=this.cleanup;if(e){this.cleanup=void 0;try{e()}catch(w1){KV(w1)}}},close:function(){if(!NV){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 aU=function(e,t){var n,r=tU(this,new iU(e));NV||(this.closed=!1);try{(n=XV(e,"start"))&&BV(n,e,this)}catch(w1){KV(w1)}if(!r.isClosed()){var o=r.subscriptionObserver=new sU(r);try{var i=t(o),a=i;null!=i&&(r.cleanup=WV(i.unsubscribe)?function(){a.unsubscribe()}:UV(i))}catch(w1){return void o.error(w1)}r.isClosed()&&r.clean()}};aU.prototype=qV({},{unsubscribe:function(){var e=rU(this);e.isClosed()||(e.close(),e.clean())}}),NV&&QV(aU.prototype,"closed",{configurable:!0,get:function(){return rU(this).isClosed()}});var sU=function(e){tU(this,{type:"SubscriptionObserver",subscriptionState:e}),NV||(this.closed=!1)};sU.prototype=qV({},{next:function(e){var t=oU(this).subscriptionState;if(!t.isClosed()){var n=t.observer;try{var r=XV(n,"next");r&&BV(r,n,e)}catch(w1){KV(w1)}}},error:function(e){var t=oU(this).subscriptionState;if(!t.isClosed()){var n=t.observer;t.close();try{var r=XV(n,"error");r?BV(r,n,e):KV(e)}catch(o){KV(o)}t.clean()}},complete:function(){var e=oU(this).subscriptionState;if(!e.isClosed()){var t=e.observer;e.close();try{var n=XV(t,"complete");n&&BV(n,t)}catch(w1){KV(w1)}e.clean()}}}),NV&&QV(sU.prototype,"closed",{configurable:!0,get:function(){return oU(this).subscriptionState.isClosed()}});var uU=function(e){GV(this,cU),tU(this,{type:"Observable",subscriber:UV(e)})},cU=uU.prototype;qV(cU,{subscribe:function(e){var t=arguments.length;return new aU(WV(e)?{next:e,error:t>1?arguments[1]:void 0,complete:t>2?arguments[2]:void 0}:HV(e)?e:{},nU(this).subscriber)}}),YV(cU,$V,(function(){return this})),jV({global:!0,forced:ZV},{Observable:uU}),VV("Observable");var lU=jo,fU=Ne,hU=oe,dU=En,pU=ya,vU=Ol,gU=ht,mU=Um,yU=LV,bU=Xt("observable");lU({target:"Observable",stat:!0,forced:yU},{from:function(e){var t=pU(this)?this:fU("Observable"),n=gU(dU(e),bU);if(n){var r=dU(hU(n,e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}var o=vU(e);return new t((function(e){mU(o,(function(t,n){if(e.next(t),e.closed)return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}),e.complete()}))}});var wU=jo,AU=Ne,xU=ya,TU=LV,PU=AU("Array");wU({target:"Observable",stat:!0,forced:TU},{of:function(){for(var e=xU(this)?this:AU("Observable"),t=arguments.length,n=PU(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 CU=oe,_U=lt,EU=NP,SU=AP,kU=Um;jo({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=EU.f(t),r=n.resolve,o=n.reject,i=SU((function(){var n=_U(t.resolve),o=[],i=0,a=1;kU(e,(function(e){var s=i++,u=!1;a++,CU(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 RU=oe,OU=lt,FU=Ne,MU=NP,IU=AP,DU=Um;jo({target:"Promise",stat:!0},{any:function(e){var t=this,n=FU("AggregateError"),r=MU.f(t),o=r.resolve,i=r.reject,a=IU((function(){var r=OU(t.resolve),a=[],s=0,u=1,c=!1;DU(e,(function(e){var l=s++,f=!1;u++,RU(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,"No one promise resolved")))}))})),--u||i(new n(a,"No one promise resolved"))}));return a.error&&i(a.value),r.promise}});var LU=NP,jU=AP;jo({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=LU.f(this),n=jU(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var BU=Ne,NU=me,VU=yt.exports,UU=BU("Map"),WU=BU("WeakMap"),zU=NU([].push),HU=VU("metadata"),GU=HU.store||(HU.store=new WU),XU=function(e,t,n){var r=GU.get(e);if(!r){if(!n)return;GU.set(e,r=new UU)}var o=r.get(t);if(!o){if(!n)return;r.set(t,o=new UU)}return o},QU={store:GU,getMap:XU,has:function(e,t,n){var r=XU(t,n,!1);return void 0!==r&&r.has(e)},get:function(e,t,n){var r=XU(t,n,!1);return void 0===r?void 0:r.get(e)},set:function(e,t,n,r){XU(n,r,!0).set(e,t)},keys:function(e,t){var n=XU(e,t,!1),r=[];return n&&n.forEach((function(e,t){zU(r,t)})),r},toKey:function(e){return void 0===e||"symbol"==S(e)?e:String(e)}},YU=En,qU=QU.toKey,KU=QU.set;jo({target:"Reflect",stat:!0},{defineMetadata:function(e,t,n){var r=arguments.length<4?void 0:qU(arguments[3]);KU(e,t,YU(n),r)}});var JU=En,ZU=QU.toKey,$U=QU.getMap,eW=QU.store;jo({target:"Reflect",stat:!0},{deleteMetadata:function(e,t){var n=arguments.length<3?void 0:ZU(arguments[2]),r=$U(JU(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var o=eW.get(t);return o.delete(n),!!o.size||eW.delete(t)}});var tW=En,nW=bf,rW=QU.has,oW=QU.get,iW=QU.toKey,aW=function e(t,n,r){if(rW(t,n,r))return oW(t,n,r);var o=nW(n);return null!==o?e(t,o,r):void 0};jo({target:"Reflect",stat:!0},{getMetadata:function(e,t){var n=arguments.length<3?void 0:iW(arguments[2]);return aW(e,tW(t),n)}});var sW=me,uW=lt,cW=Qr,lW=Et,fW=_a,hW=Ne("Map"),dW=hW.prototype,pW=sW(dW.forEach),vW=sW(dW.has),gW=sW(dW.set),mW=sW([].push),yW=jo,bW=me,wW=QU,AW=En,xW=bf,TW=function(e){var t,n,r,o=lW(this),i=cW(o),a=fW(o,0),s=new hW,u=null!=e?uW(e):function(e){return e};for(t=0;t<i;t++)r=u(n=o[t]),vW(s,r)||gW(s,r,n);return pW(s,(function(e){mW(a,e)})),a},PW=bW(TW),CW=bW([].concat),_W=wW.keys,EW=wW.toKey,SW=function e(t,n){var r=_W(t,n),o=xW(t);if(null===o)return r;var i=e(o,n);return i.length?r.length?PW(CW(r,i)):i:r};yW({target:"Reflect",stat:!0},{getMetadataKeys:function(e){var t=arguments.length<2?void 0:EW(arguments[1]);return SW(AW(e),t)}});var kW=En,RW=QU.get,OW=QU.toKey;jo({target:"Reflect",stat:!0},{getOwnMetadata:function(e,t){var n=arguments.length<3?void 0:OW(arguments[2]);return RW(e,kW(t),n)}});var FW=En,MW=QU.keys,IW=QU.toKey;jo({target:"Reflect",stat:!0},{getOwnMetadataKeys:function(e){var t=arguments.length<2?void 0:IW(arguments[1]);return MW(FW(e),t)}});var DW=En,LW=bf,jW=QU.has,BW=QU.toKey,NW=function e(t,n,r){if(jW(t,n,r))return!0;var o=LW(n);return null!==o&&e(t,o,r)};jo({target:"Reflect",stat:!0},{hasMetadata:function(e,t){var n=arguments.length<3?void 0:BW(arguments[2]);return NW(e,DW(t),n)}});var VW=En,UW=QU.has,WW=QU.toKey;jo({target:"Reflect",stat:!0},{hasOwnMetadata:function(e,t){var n=arguments.length<3?void 0:WW(arguments[2]);return UW(e,VW(t),n)}});var zW=En,HW=QU.toKey,GW=QU.set;jo({target:"Reflect",stat:!0},{metadata:function(e,t){return function(n,r){GW(e,t,zW(n),HW(r))}}});var XW=oe,QW=lt,YW=En,qW=function(){for(var e=YW(this),t=QW(e.add),n=0,r=arguments.length;n<r;n++)XW(t,e,arguments[n]);return e};jo({target:"Set",proto:!0,real:!0,forced:!0},{addAll:qW}),jo({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:PB});var KW=Ne,JW=oe,ZW=lt,$W=En,ez=wg,tz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){var t=$W(this),n=new(ez(t,KW("Set")))(t),r=ZW(n.delete);return tz(e,(function(e){JW(r,n,e)})),n}});var nz=oe,rz=function(e){return nz(Set.prototype.values,e)},oz=En,iz=na,az=rz,sz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=oz(this),n=az(t),r=iz(e,arguments.length>1?arguments[1]:void 0);return!sz(n,(function(e,n){if(!r(e,e,t))return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var uz=Ne,cz=oe,lz=lt,fz=En,hz=na,dz=wg,pz=rz,vz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=fz(this),n=pz(t),r=hz(e,arguments.length>1?arguments[1]:void 0),o=new(dz(t,uz("Set"))),i=lz(o.add);return vz(n,(function(e){r(e,e,t)&&cz(i,o,e)}),{IS_ITERATOR:!0}),o}});var gz=En,mz=na,yz=rz,bz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=gz(this),n=yz(t),r=mz(e,arguments.length>1?arguments[1]:void 0);return bz(n,(function(e,n){if(r(e,e,t))return n(e)}),{IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),jo({target:"Set",stat:!0,forced:!0},{from:$B});var wz=Ne,Az=oe,xz=lt,Tz=En,Pz=wg,Cz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){var t=Tz(this),n=new(Pz(t,wz("Set"))),r=xz(t.has),o=xz(n.add);return Cz(e,(function(e){Az(r,t,e)&&Az(o,n,e)})),n}});var _z=oe,Ez=lt,Sz=En,kz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){var t=Sz(this),n=Ez(t.has);return!kz(e,(function(e,r){if(!0===_z(n,t,e))return r()}),{INTERRUPTED:!0}).stopped}});var Rz=Ne,Oz=oe,Fz=lt,Mz=Me,Iz=En,Dz=Ol,Lz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){var t=Dz(this),n=Iz(e),r=n.has;return Mz(r)||(n=new(Rz("Set"))(e),r=Fz(n.has)),!Lz(t,(function(e,t){if(!1===Oz(r,n,e))return t()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var jz=oe,Bz=lt,Nz=En,Vz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){var t=Nz(this),n=Bz(t.has);return!Vz(e,(function(e,r){if(!1===jz(n,t,e))return r()}),{INTERRUPTED:!0}).stopped}});var Uz=jo,Wz=En,zz=Ko,Hz=rz,Gz=Um,Xz=me([].join),Qz=[].push;Uz({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=Wz(this),n=Hz(t),r=void 0===e?",":zz(e),o=[];return Gz(n,Qz,{that:o,IS_ITERATOR:!0}),Xz(o,r)}});var Yz=Ne,qz=na,Kz=oe,Jz=lt,Zz=En,$z=wg,eH=rz,tH=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=Zz(this),n=eH(t),r=qz(e,arguments.length>1?arguments[1]:void 0),o=new($z(t,Yz("Set"))),i=Jz(o.add);return tH(n,(function(e){Kz(i,o,r(e,e,t))}),{IS_ITERATOR:!0}),o}}),jo({target:"Set",stat:!0,forced:!0},{of:LN});var nH=jo,rH=lt,oH=En,iH=rz,aH=Um,sH=J.TypeError;nH({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=oH(this),n=iH(t),r=arguments.length<2,o=r?void 0:arguments[1];if(rH(e),aH(n,(function(n){r?(r=!1,o=n):o=e(o,n,n,t)}),{IS_ITERATOR:!0}),r)throw sH("Reduce of empty set with no initial value");return o}});var uH=En,cH=na,lH=rz,fH=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=uH(this),n=lH(t),r=cH(e,arguments.length>1?arguments[1]:void 0);return fH(n,(function(e,n){if(r(e,e,t))return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var hH=Ne,dH=oe,pH=lt,vH=En,gH=wg,mH=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){var t=vH(this),n=new(gH(t,hH("Set")))(t),r=pH(n.delete),o=pH(n.add);return mH(e,(function(e){dH(r,n,e)||dH(o,n,e)})),n}});var yH=Ne,bH=lt,wH=En,AH=wg,xH=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){var t=wH(this),n=new(AH(t,yH("Set")))(t);return xH(e,bH(n.add),{that:n}),n}});var TH=Ok.charAt,PH=ke,CH=Br,_H=Ko;jo({target:"String",proto:!0,forced:!0},{at:function(e){var t=_H(PH(this)),n=t.length,r=CH(e),o=r>=0?r:n+r;return o<0||o>=n?void 0:TH(t,o)}});var EH=jo,SH=If,kH=ke,RH=Ko,OH=yr,FH=Ok.codeAt,MH=Ok.charAt,IH=OH.set,DH=OH.getterFor("String Iterator"),LH=SH((function(e){IH(this,{type:"String Iterator",string:e,index:0})}),"String",(function(){var e,t=DH(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=MH(n,r),t.index+=e.length,{value:{codePoint:FH(e,0),position:r},done:!1})}));EH({target:"String",proto:!0,forced:!0},{codePoints:function(){return new LH(RH(kH(this)))}});var jH=jo,BH=J,NH=oe,VH=me,UH=If,WH=ke,zH=Gr,HH=Ko,GH=En,XH=LE,QH=HE,YH=ht,qH=Nn.exports,KH=$,JH=wg,ZH=_R,$H=MR,eG=yr,tG=Xt("matchAll"),nG=eG.set,rG=eG.getterFor("RegExp String Iterator"),oG=RegExp.prototype,iG=BH.TypeError,aG=VH("".indexOf),sG=VH("".matchAll),uG=!!sG&&!KH((function(){sG("a",/./)})),cG=UH((function(e,t,n,r){nG(this,{type:"RegExp String Iterator",regexp:e,string:t,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var e=rG(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=$H(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""===HH(r[0])&&(t.lastIndex=ZH(n,zH(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),lG=function(e){var t,n,r,o=GH(this),i=HH(e),a=JH(o,RegExp),s=HH(QH(o));return t=new a(a===RegExp?o.source:o,s),n=!!~aG(s,"g"),r=!!~aG(s,"u"),t.lastIndex=zH(o.lastIndex),new cG(t,i,n,r)};jH({target:"String",proto:!0,forced:uG},{matchAll:function(e){var t,n,r,o=WH(this);if(null!=e){if(XH(e)&&(t=HH(WH(QH(e))),!~aG(t,"g")))throw iG("`.matchAll` does not allow non-global regexes");if(uG)return sG(o,e);if(r=YH(e,tG))return NH(r,e,o)}else if(uG)return sG(o,e);return n=HH(o),new RegExp(e,"g")[tG](n)}}),tG in oG||qH(oG,tG,lG);var fG=jo,hG=J,dG=oe,pG=me,vG=ke,gG=Me,mG=LE,yG=Ko,bG=ht,wG=HE,AG=gO,xG=Xt("replace"),TG=hG.TypeError,PG=pG("".indexOf);pG("".replace);var CG=pG("".slice),_G=Math.max,EG=function(e,t,n){return n>e.length?-1:""===t?n:PG(e,t,n)};fG({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,o,i,a,s,u,c,l=vG(this),f=0,h=0,d="";if(null!=e){if(mG(e)&&(n=yG(vG(wG(e))),!~PG(n,"g")))throw TG("`.replaceAll` does not allow non-global regexes");if(r=bG(e,xG))return dG(r,e,l,t)}for(o=yG(l),i=yG(e),(a=gG(t))||(t=yG(t)),s=i.length,u=_G(1,s),f=EG(o,i,0);-1!==f;)c=a?yG(t(i,f,o)):AG(i,o,f,[],void 0,t),d+=CG(o,h,f)+c,h=f+s,f=EG(o,i,f+u);return h<o.length&&(d+=CG(o,h)),d}}),zi("dispose"),zi("observable"),zi("patternMatch"),jo({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:PB}),jo({target:"WeakMap",stat:!0,forced:!0},{from:$B}),jo({target:"WeakMap",stat:!0,forced:!0},{of:LN}),jo({target:"WeakSet",proto:!0,real:!0,forced:!0},{addAll:qW}),jo({target:"WeakSet",proto:!0,real:!0,forced:!0},{deleteAll:PB}),jo({target:"WeakSet",stat:!0,forced:!0},{from:$B}),jo({target:"WeakSet",stat:!0,forced:!0},{of:LN});var SG={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},kG=cn("span").classList,RG=kG&&kG.constructor&&kG.constructor.prototype,OG=RG===Object.prototype?void 0:RG,FG=Ia.forEach,MG=J,IG=SG,DG=OG,LG=$l("forEach")?[].forEach:function(e){return FG(this,e,arguments.length>1?arguments[1]:void 0)},jG=Bn,BG=function(e){if(e&&e.forEach!==LG)try{jG(e,"forEach",LG)}catch(w1){e.forEach=LG}};for(var NG in IG)IG[NG]&&BG(MG[NG]&&MG[NG].prototype);BG(DG);var VG=J,UG=SG,WG=OG,zG=mh,HG=Bn,GG=Xt,XG=GG("iterator"),QG=GG("toStringTag"),YG=zG.values,qG=function(e,t){if(e){if(e[XG]!==YG)try{HG(e,XG,YG)}catch(w1){e[XG]=YG}if(e[QG]||HG(e,QG,t),UG[t])for(var n in zG)if(e[n]!==zG[n])try{HG(e,n,zG[n])}catch(w1){e[n]=zG[n]}}};for(var KG in UG)qG(VG[KG]&&VG[KG].prototype,KG);qG(WG,"DOMTokenList");var JG=eP.clear;jo({global:!0,bind:!0,enumerable:!0,forced:J.clearImmediate!==JG},{clearImmediate:JG});var ZG=eP.set;jo({global:!0,bind:!0,enumerable:!0,forced:J.setImmediate!==ZG},{setImmediate:ZG});var $G=jo,eX=yP,tX=lt,nX=bT,rX=qh,oX=J.process;$G({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){nX(arguments.length,1),tX(e);var t=rX&&oX.domain;eX(t?t.bind(e):e)}});var iX=$,aX=Xt("iterator"),sX=!iX((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[aX]||"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})),uX=me,cX=/[^\0-\u007E]/,lX=/[.\u3002\uFF0E\uFF61]/g,fX="Overflow: input needs wider integers to process",hX=J.RangeError,dX=uX(lX.exec),pX=Math.floor,vX=String.fromCharCode,gX=uX("".charCodeAt),mX=uX([].join),yX=uX([].push),bX=uX("".replace),wX=uX("".split),AX=uX("".toLowerCase),xX=function(e){return e+22+75*(e<26)},TX=function(e,t,n){var r=0;for(e=n?pX(e/700):e>>1,e+=pX(e/t);e>455;)e=pX(e/35),r+=36;return pX(r+36*e/(e+38))},PX=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=gX(e,n++);if(o>=55296&&o<=56319&&n<r){var i=gX(e,n++);56320==(64512&i)?yX(t,((1023&o)<<10)+(1023&i)+65536):(yX(t,o),n--)}else yX(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&&yX(t,vX(r));var u=t.length,c=u;for(u&&yX(t,"-");c<o;){var l=2147483647;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<l&&(l=r);var f=c+1;if(l-i>pX((2147483647-a)/f))throw hX(fX);for(a+=(l-i)*f,i=l,n=0;n<e.length;n++){if((r=e[n])<i&&++a>2147483647)throw hX(fX);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;yX(t,vX(xX(p+v%g))),h=pX(v/g),d+=36}yX(t,vX(xX(h))),s=TX(a,f,c==u),a=0,c++}}a++,i++}return mX(t,"")},CX=jo,_X=J,EX=oe,SX=me,kX=ee,RX=sX,OX=Nn.exports,FX=gp,MX=Zi,IX=If,DX=yr,LX=bp,jX=Me,BX=Rt,NX=na,VX=Qo,UX=En,WX=De,zX=Ko,HX=wi,GX=fe,XX=Ol,QX=Pl,YX=bT,qX=Cd,KX=Xt("iterator"),JX=DX.set,ZX=DX.getterFor("URLSearchParams"),$X=DX.getterFor("URLSearchParamsIterator"),eQ=Object.getOwnPropertyDescriptor,tQ=function(e){if(!kX)return _X[e];var t=eQ(_X,e);return t&&t.value},nQ=tQ("fetch"),rQ=tQ("Request"),oQ=tQ("Headers"),iQ=rQ&&rQ.prototype,aQ=oQ&&oQ.prototype,sQ=_X.RegExp,uQ=_X.TypeError,cQ=_X.decodeURIComponent,lQ=_X.encodeURIComponent,fQ=SX("".charAt),hQ=SX([].join),dQ=SX([].push),pQ=SX("".replace),vQ=SX([].shift),gQ=SX([].splice),mQ=SX("".split),yQ=SX("".slice),bQ=/\+/g,wQ=Array(4),AQ=function(e){return wQ[e-1]||(wQ[e-1]=sQ("((?:%[\\da-f]{2}){"+e+"})","gi"))},xQ=function(e){try{return cQ(e)}catch(w1){return e}},TQ=function(e){var t=pQ(e,bQ," "),n=4;try{return cQ(t)}catch(w1){for(;n;)t=pQ(t,AQ(n--),xQ);return t}},PQ=/[!'()~]|%20/g,CQ={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},_Q=function(e){return CQ[e]},EQ=function(e){return pQ(lQ(e),PQ,_Q)},SQ=IX((function(e,t){JX(this,{type:"URLSearchParamsIterator",iterator:XX(ZX(e).entries),kind:t})}),"Iterator",(function(){var e=$X(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),kQ=function(e){this.entries=[],this.url=null,void 0!==e&&(WX(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===fQ(e,0)?yQ(e,1):e:zX(e)))};kQ.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,o,i,a,s,u=QX(e);if(u)for(n=(t=XX(e,u)).next;!(r=EX(n,t)).done;){if(i=(o=XX(UX(r.value))).next,(a=EX(i,o)).done||(s=EX(i,o)).done||!EX(i,o).done)throw uQ("Expected sequence with length 2");dQ(this.entries,{key:zX(a.value),value:zX(s.value)})}else for(var c in e)BX(e,c)&&dQ(this.entries,{key:c,value:zX(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=mQ(e,"&"),o=0;o<r.length;)(t=r[o++]).length&&(n=mQ(t,"="),dQ(this.entries,{key:TQ(vQ(n)),value:TQ(hQ(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],dQ(n,EQ(e.key)+"="+EQ(e.value));return hQ(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var RQ=function(){LX(this,OQ);var e=arguments.length>0?arguments[0]:void 0;JX(this,new kQ(e))},OQ=RQ.prototype;if(FX(OQ,{append:function(e,t){YX(arguments.length,2);var n=ZX(this);dQ(n.entries,{key:zX(e),value:zX(t)}),n.updateURL()},delete:function(e){YX(arguments.length,1);for(var t=ZX(this),n=t.entries,r=zX(e),o=0;o<n.length;)n[o].key===r?gQ(n,o,1):o++;t.updateURL()},get:function(e){YX(arguments.length,1);for(var t=ZX(this).entries,n=zX(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){YX(arguments.length,1);for(var t=ZX(this).entries,n=zX(e),r=[],o=0;o<t.length;o++)t[o].key===n&&dQ(r,t[o].value);return r},has:function(e){YX(arguments.length,1);for(var t=ZX(this).entries,n=zX(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){YX(arguments.length,1);for(var n,r=ZX(this),o=r.entries,i=!1,a=zX(e),s=zX(t),u=0;u<o.length;u++)(n=o[u]).key===a&&(i?gQ(o,u--,1):(i=!0,n.value=s));i||dQ(o,{key:a,value:s}),r.updateURL()},sort:function(){var e=ZX(this);qX(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=ZX(this).entries,r=NX(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 SQ(this,"keys")},values:function(){return new SQ(this,"values")},entries:function(){return new SQ(this,"entries")}},{enumerable:!0}),OX(OQ,KX,OQ.entries,{name:"entries"}),OX(OQ,"toString",(function(){return ZX(this).serialize()}),{enumerable:!0}),MX(RQ,"URLSearchParams"),CX({global:!0,forced:!RX},{URLSearchParams:RQ}),!RX&&jX(oQ)){var FQ=SX(aQ.has),MQ=SX(aQ.set),IQ=function(e){if(WX(e)){var t,n=e.body;if("URLSearchParams"===VX(n))return t=e.headers?new oQ(e.headers):new oQ,FQ(t,"content-type")||MQ(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),HX(e,{body:GX(0,zX(n)),headers:GX(0,t)})}return e};if(jX(nQ)&&CX({global:!0,enumerable:!0,noTargetGet:!0,forced:!0},{fetch:function(e){return nQ(e,arguments.length>1?IQ(arguments[1]):{})}}),jX(rQ)){var DQ=function(e){return LX(this,iQ),new rQ(e,arguments.length>1?IQ(arguments[1]):{})};iQ.constructor=DQ,DQ.prototype=iQ,CX({global:!0,forced:!0,noTargetGet:!0},{Request:DQ})}}var LQ,jQ={URLSearchParams:RQ,getState:ZX},BQ=jo,NQ=ee,VQ=sX,UQ=J,WQ=na,zQ=me,HQ=Jo.f,GQ=Nn.exports,XQ=bp,QQ=Rt,YQ=PA,qQ=zl,KQ=Oi,JQ=Ok.codeAt,ZQ=function(e){var t,n,r=[],o=wX(bX(AX(e),lX,"."),".");for(t=0;t<o.length;t++)n=o[t],yX(r,dX(cX,n)?"xn--"+PX(n):n);return mX(r,".")},$Q=Ko,eY=Zi,tY=bT,nY=jQ,rY=yr,oY=rY.set,iY=rY.getterFor("URL"),aY=nY.URLSearchParams,sY=nY.getState,uY=UQ.URL,cY=UQ.TypeError,lY=UQ.parseInt,fY=Math.floor,hY=Math.pow,dY=zQ("".charAt),pY=zQ(/./.exec),vY=zQ([].join),gY=zQ(1..toString),mY=zQ([].pop),yY=zQ([].push),bY=zQ("".replace),wY=zQ([].shift),AY=zQ("".split),xY=zQ("".slice),TY=zQ("".toLowerCase),PY=zQ([].unshift),CY=/[a-z]/i,_Y=/[\d+-.a-z]/i,EY=/\d/,SY=/^0x/i,kY=/^[0-7]+$/,RY=/^\d+$/,OY=/^[\da-f]+$/i,FY=/[\0\t\n\r #%/:<>?@[\\\]^|]/,MY=/[\0\t\n\r #/:<>?@[\\\]^|]/,IY=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,DY=/[\t\n\r]/g,LY=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)PY(t,e%256),e=fY(e/256);return vY(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+=gY(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},jY={},BY=YQ({},jY,{" ":1,'"':1,"<":1,">":1,"`":1}),NY=YQ({},BY,{"#":1,"?":1,"{":1,"}":1}),VY=YQ({},NY,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),UY=function(e,t){var n=JQ(e,0);return n>32&&n<127&&!QQ(t,e)?e:encodeURIComponent(e)},WY={ftp:21,file:null,http:80,https:443,ws:80,wss:443},zY=function(e,t){var n;return 2==e.length&&pY(CY,dY(e,0))&&(":"==(n=dY(e,1))||!t&&"|"==n)},HY=function(e){var t;return e.length>1&&zY(xY(e,0,2))&&(2==e.length||"/"===(t=dY(e,2))||"\\"===t||"?"===t||"#"===t)},GY=function(e){return"."===e||"%2e"===TY(e)},XY={},QY={},YY={},qY={},KY={},JY={},ZY={},$Y={},eq={},tq={},nq={},rq={},oq={},iq={},aq={},sq={},uq={},cq={},lq={},fq={},hq={},dq=function e(t,n,r){var o,i,a,s=$Q(t);if(n){if(i=this.parse(s))throw cY(i);this.searchParams=null}else{if(void 0!==r&&(o=new e(r,!0)),i=this.parse(s,null,o))throw cY(i);(a=sY(new aY)).bindURL(this),this.searchParams=a}};dq.prototype={type:"URL",parse:function(e,t,n){var r,o,i,a,s,u=this,c=t||XY,l=0,f="",h=!1,d=!1,p=!1;for(e=$Q(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=bY(e,IY,"")),e=bY(e,DY,""),r=qQ(e);l<=r.length;){switch(o=r[l],c){case XY:if(!o||!pY(CY,o)){if(t)return"Invalid scheme";c=YY;continue}f+=TY(o),c=QY;break;case QY:if(o&&(pY(_Y,o)||"+"==o||"-"==o||"."==o))f+=TY(o);else{if(":"!=o){if(t)return"Invalid scheme";f="",c=YY,l=0;continue}if(t&&(u.isSpecial()!=QQ(WY,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&WY[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?c=iq:u.isSpecial()&&n&&n.scheme==u.scheme?c=qY:u.isSpecial()?c=$Y:"/"==r[l+1]?(c=KY,l++):(u.cannotBeABaseURL=!0,yY(u.path,""),c=lq)}break;case YY:if(!n||n.cannotBeABaseURL&&"#"!=o)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"==o){u.scheme=n.scheme,u.path=KQ(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=hq;break}c="file"==n.scheme?iq:JY;continue;case qY:if("/"!=o||"/"!=r[l+1]){c=JY;continue}c=eq,l++;break;case KY:if("/"==o){c=tq;break}c=cq;continue;case JY:if(u.scheme=n.scheme,o==LQ)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=KQ(n.path),u.query=n.query;else if("/"==o||"\\"==o&&u.isSpecial())c=ZY;else if("?"==o)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=KQ(n.path),u.query="",c=fq;else{if("#"!=o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=KQ(n.path),u.path.length--,c=cq;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=KQ(n.path),u.query=n.query,u.fragment="",c=hq}break;case ZY:if(!u.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=cq;continue}c=tq}else c=eq;break;case $Y:if(c=eq,"/"!=o||"/"!=dY(f,l+1))continue;l++;break;case eq:if("/"!=o&&"\\"!=o){c=tq;continue}break;case tq:if("@"==o){h&&(f="%40"+f),h=!0,i=qQ(f);for(var v=0;v<i.length;v++){var g=i[v];if(":"!=g||p){var m=UY(g,VY);p?u.password+=m:u.username+=m}else p=!0}f=""}else if(o==LQ||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(h&&""==f)return"Invalid authority";l-=qQ(f).length+1,f="",c=nq}else f+=o;break;case nq:case rq:if(t&&"file"==u.scheme){c=sq;continue}if(":"!=o||d){if(o==LQ||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(u.isSpecial()&&""==f)return"Invalid host";if(t&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",c=uq,t)return;continue}"["==o?d=!0:"]"==o&&(d=!1),f+=o}else{if(""==f)return"Invalid host";if(a=u.parseHost(f))return a;if(f="",c=oq,t==rq)return}break;case oq:if(!pY(EY,o)){if(o==LQ||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()||t){if(""!=f){var y=lY(f,10);if(y>65535)return"Invalid port";u.port=u.isSpecial()&&y===WY[u.scheme]?null:y,f=""}if(t)return;c=uq;continue}return"Invalid port"}f+=o;break;case iq:if(u.scheme="file","/"==o||"\\"==o)c=aq;else{if(!n||"file"!=n.scheme){c=cq;continue}if(o==LQ)u.host=n.host,u.path=KQ(n.path),u.query=n.query;else if("?"==o)u.host=n.host,u.path=KQ(n.path),u.query="",c=fq;else{if("#"!=o){HY(vY(KQ(r,l),""))||(u.host=n.host,u.path=KQ(n.path),u.shortenPath()),c=cq;continue}u.host=n.host,u.path=KQ(n.path),u.query=n.query,u.fragment="",c=hq}}break;case aq:if("/"==o||"\\"==o){c=sq;break}n&&"file"==n.scheme&&!HY(vY(KQ(r,l),""))&&(zY(n.path[0],!0)?yY(u.path,n.path[0]):u.host=n.host),c=cq;continue;case sq:if(o==LQ||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&zY(f))c=cq;else if(""==f){if(u.host="",t)return;c=uq}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),t)return;f="",c=uq}continue}f+=o;break;case uq:if(u.isSpecial()){if(c=cq,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=LQ&&(c=cq,"/"!=o))continue}else u.fragment="",c=hq;else u.query="",c=fq;break;case cq:if(o==LQ||"/"==o||"\\"==o&&u.isSpecial()||!t&&("?"==o||"#"==o)){if(".."===(s=TY(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==o||"\\"==o&&u.isSpecial()||yY(u.path,"")):GY(f)?"/"==o||"\\"==o&&u.isSpecial()||yY(u.path,""):("file"==u.scheme&&!u.path.length&&zY(f)&&(u.host&&(u.host=""),f=dY(f,0)+":"),yY(u.path,f)),f="","file"==u.scheme&&(o==LQ||"?"==o||"#"==o))for(;u.path.length>1&&""===u.path[0];)wY(u.path);"?"==o?(u.query="",c=fq):"#"==o&&(u.fragment="",c=hq)}else f+=UY(o,NY);break;case lq:"?"==o?(u.query="",c=fq):"#"==o?(u.fragment="",c=hq):o!=LQ&&(u.path[0]+=UY(o,jY));break;case fq:t||"#"!=o?o!=LQ&&("'"==o&&u.isSpecial()?u.query+="%27":u.query+="#"==o?"%23":UY(o,jY)):(u.fragment="",c=hq);break;case hq:o!=LQ&&(u.fragment+=UY(o,BY))}l++}},parseHost:function(e){var t,n,r;if("["==dY(e,0)){if("]"!=dY(e,e.length-1))return"Invalid host";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 dY(e,f)};if(":"==h()){if(":"!=dY(e,1))return;f+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=n=0;n<4&&pY(OY,h());)t=16*t+lY(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(!pY(EY,h()))return;for(;pY(EY,h());){if(i=lY(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}(xY(e,1,-1)),!t)return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=ZQ(e),pY(FY,e))return"Invalid host";if(t=function(e){var t,n,r,o,i,a,s,u=AY(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"==dY(o,0)&&(i=pY(SY,o)?16:8,o=xY(o,8==i?1:2)),""===o)a=0;else{if(!pY(10==i?RY:8==i?kY:OY,o))return e;a=lY(o,i)}yY(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=hY(256,5-t))return null}else if(a>255)return null;for(s=mY(n),r=0;r<n.length;r++)s+=n[r]*hY(256,3-r);return s}(e),null===t)return"Invalid host";this.host=t}else{if(pY(MY,e))return"Invalid host";for(t="",n=qQ(e),r=0;r<n.length;r++)t+=UY(n[r],jY);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return QQ(WY,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&zY(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+=LY(o),null!==i&&(c+=":"+i)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+vY(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw cY(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new pq(e.path[0]).origin}catch(w1){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+LY(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($Q(e)+":",XY)},getUsername:function(){return this.username},setUsername:function(e){var t=qQ($Q(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=UY(t[n],VY)}},getPassword:function(){return this.password},setPassword:function(e){var t=qQ($Q(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=UY(t[n],VY)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?LY(e):LY(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,nq)},getHostname:function(){var e=this.host;return null===e?"":LY(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,rq)},getPort:function(){var e=this.port;return null===e?"":$Q(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$Q(e))?this.port=null:this.parse(e,oq))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+vY(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,uq))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$Q(e))?this.query=null:("?"==dY(e,0)&&(e=xY(e,1)),this.query="",this.parse(e,fq)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$Q(e))?("#"==dY(e,0)&&(e=xY(e,1)),this.fragment="",this.parse(e,hq)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var pq=function(e){var t=XQ(this,vq),n=tY(arguments.length,1)>1?arguments[1]:void 0,r=oY(t,new dq(e,!1,n));NQ||(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())},vq=pq.prototype,gq=function(e,t){return{get:function(){return iY(this)[e]()},set:t&&function(e){return iY(this)[t](e)},configurable:!0,enumerable:!0}};if(NQ&&HQ(vq,{href:gq("serialize","setHref"),origin:gq("getOrigin"),protocol:gq("getProtocol","setProtocol"),username:gq("getUsername","setUsername"),password:gq("getPassword","setPassword"),host:gq("getHost","setHost"),hostname:gq("getHostname","setHostname"),port:gq("getPort","setPort"),pathname:gq("getPathname","setPathname"),search:gq("getSearch","setSearch"),searchParams:gq("getSearchParams"),hash:gq("getHash","setHash")}),GQ(vq,"toJSON",(function(){return iY(this).serialize()}),{enumerable:!0}),GQ(vq,"toString",(function(){return iY(this).serialize()}),{enumerable:!0}),uY){var mq=uY.createObjectURL,yq=uY.revokeObjectURL;mq&&GQ(pq,"createObjectURL",WQ(mq,uY)),yq&&GQ(pq,"revokeObjectURL",WQ(yq,uY))}eY(pq,"URL"),BQ({global:!0,forced:!VQ,sham:!NQ},{URL:pq});var bq=oe;jo({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return bq(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 wq,Aq,xq={exports:{}};wq=xq,Aq=xq.exports,function(e,t){var n="function",r="undefined",o="object",i="string",a="model",s="name",u="type",c="vendor",l="version",f="architecture",h="console",d="mobile",p="tablet",v="smarttv",g="wearable",m="embedded",y="Amazon",b="Apple",w="ASUS",A="BlackBerry",x="Firefox",T="Google",P="Huawei",C="LG",_="Microsoft",E="Motorola",k="Opera",R="Samsung",O="Sony",F="Xiaomi",M="Zebra",I="Facebook",D=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},L=function(e,t){return S(e)===i&&-1!==j(t).indexOf(j(e))},j=function(e){return e.toLowerCase()},B=function(e,t){if(S(e)===i)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),S(t)===r?e:e.substring(0,255)},N=function(e,r){for(var i,a,s,u,c,l,f=0;f<r.length&&!c;){var h=r[f],d=r[f+1];for(i=a=0;i<h.length&&!c;)if(c=h[i++].exec(e))for(s=0;s<d.length;s++)l=c[++a],S(u=d[s])===o&&u.length>0?2===u.length?S(u[1])==n?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?S(u[1])!==n||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):t:this[u[0]]=l?u[1].call(this,l,u[2]):t:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):t):this[u]=l||t;f+=2}},V=function(e,n){for(var r in n)if(S(n[r])===o&&n[r].length>0){for(var i=0;i<n[r].length;i++)if(L(n[r][i],e))return"?"===r?t:r}else if(L(n[r],e))return"?"===r?t:r;return e},U={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"},W={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[l,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[l,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,l],[/opios[\/ ]+([\w\.]+)/i],[l,[s,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[l,[s,k]],[/(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],[s,l],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[l,[s,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[l,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[l,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[l,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[l,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[l,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],l],[/\bfocus\/([\w\.]+)/i],[l,[s,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[l,[s,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[l,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[l,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[l,[s,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[l,[s,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[l,[s,x]],[/\bqihu|(qi?ho?o?|360)browser/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],l],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],l],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[s,l],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,I],l],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[s,l],[/\bgsa\/([\w\.]+) .*safari\//i],[l,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[l,[s,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],l],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[l,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,l],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[l,[s,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[l,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[l,V,{"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],[s,l],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],l],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[l,[s,"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],[s,l]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,j]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",j]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,j]]],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],[a,[c,R],[u,p]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[a,[c,R],[u,d]],[/\((ip(?:hone|od)[\w ]*);/i],[a,[c,b],[u,d]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[c,b],[u,p]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[a,[c,P],[u,p]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[a,[c,P],[u,d]],[/\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],[[a,/_/g," "],[c,F],[u,d]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[a,/_/g," "],[c,F],[u,p]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[a,[c,"OPPO"],[u,d]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[a,[c,"Vivo"],[u,d]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[a,[c,"Realme"],[u,d]],[/\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],[a,[c,E],[u,d]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[a,[c,E],[u,p]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[c,C],[u,p]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[a,[c,C],[u,d]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[a,[c,"Lenovo"],[u,p]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[a,/_/g," "],[c,"Nokia"],[u,d]],[/(pixel c)\b/i],[a,[c,T],[u,p]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[a,[c,T],[u,d]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[a,[c,O],[u,d]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[a,"Xperia Tablet"],[c,O],[u,p]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[a,[c,"OnePlus"],[u,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[a,[c,y],[u,p]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[a,/(.+)/g,"Fire Phone $1"],[c,y],[u,d]],[/(playbook);[-\w\),; ]+(rim)/i],[a,c,[u,p]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[a,[c,A],[u,d]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[a,[c,w],[u,p]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[a,[c,w],[u,d]],[/(nexus 9)/i],[a,[c,"HTC"],[u,p]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[c,[a,/_/g," "],[u,d]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[a,[c,"Acer"],[u,p]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[a,[c,"Meizu"],[u,d]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[a,[c,"Sharp"],[u,d]],[/(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],[c,a,[u,d]],[/(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],[c,a,[u,p]],[/(surface duo)/i],[a,[c,_],[u,p]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[a,[c,"Fairphone"],[u,d]],[/(u304aa)/i],[a,[c,"AT&T"],[u,d]],[/\bsie-(\w*)/i],[a,[c,"Siemens"],[u,d]],[/\b(rct\w+) b/i],[a,[c,"RCA"],[u,p]],[/\b(venue[\d ]{2,7}) b/i],[a,[c,"Dell"],[u,p]],[/\b(q(?:mv|ta)\w+) b/i],[a,[c,"Verizon"],[u,p]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[a,[c,"Barnes & Noble"],[u,p]],[/\b(tm\d{3}\w+) b/i],[a,[c,"NuVision"],[u,p]],[/\b(k88) b/i],[a,[c,"ZTE"],[u,p]],[/\b(nx\d{3}j) b/i],[a,[c,"ZTE"],[u,d]],[/\b(gen\d{3}) b.+49h/i],[a,[c,"Swiss"],[u,d]],[/\b(zur\d{3}) b/i],[a,[c,"Swiss"],[u,p]],[/\b((zeki)?tb.*\b) b/i],[a,[c,"Zeki"],[u,p]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],a,[u,p]],[/\b(ns-?\w{0,9}) b/i],[a,[c,"Insignia"],[u,p]],[/\b((nxa|next)-?\w{0,9}) b/i],[a,[c,"NextBook"],[u,p]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],a,[u,d]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],a,[u,d]],[/\b(ph-1) /i],[a,[c,"Essential"],[u,d]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[a,[c,"Envizen"],[u,p]],[/\b(trio[-\w\. ]+) b/i],[a,[c,"MachSpeed"],[u,p]],[/\btu_(1491) b/i],[a,[c,"Rotor"],[u,p]],[/(shield[\w ]+) b/i],[a,[c,"Nvidia"],[u,p]],[/(sprint) (\w+)/i],[c,a,[u,d]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[c,_],[u,d]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[c,M],[u,p]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[c,M],[u,d]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,a,[u,h]],[/droid.+; (shield) bui/i],[a,[c,"Nvidia"],[u,h]],[/(playstation [345portablevi]+)/i],[a,[c,O],[u,h]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[a,[c,_],[u,h]],[/smart-tv.+(samsung)/i],[c,[u,v]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[c,R],[u,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,C],[u,v]],[/(apple) ?tv/i],[c,[a,"Apple TV"],[u,v]],[/crkey/i],[[a,"Chromecast"],[c,T],[u,v]],[/droid.+aft(\w)( bui|\))/i],[a,[c,y],[u,v]],[/\(dtv[\);].+(aquos)/i],[a,[c,"Sharp"],[u,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[c,B],[a,B],[u,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,v]],[/((pebble))app/i],[c,a,[u,g]],[/droid.+; (glass) \d/i],[a,[c,T],[u,g]],[/droid.+; (wt63?0{2,3})\)/i],[a,[c,M],[u,g]],[/(quest( 2)?)/i],[a,[c,I],[u,g]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[u,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[a,[u,d]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[a,[u,p]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,p]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[u,d]],[/(android[-\w\. ]{0,9});.+buil/i],[a,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[l,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[l,[s,"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],[s,l],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[l,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,l],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[s,[l,V,U]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[l,V,U]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[l,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"Mac OS"],[l,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[l,s],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[s,l],[/\(bb(10);/i],[l,[s,A]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[l,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[l,[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[l,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[l,[s,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[s,"Chromium OS"],l],[/(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],[s,l],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],l],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[s,l]]},z=function n(a,s){if(S(a)===o&&(s=a,a=t),!(this instanceof n))return new n(a,s).getResult();var u=a||(S(e)!==r&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent:""),c=s?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}(W,s):W;return this.getBrowser=function(){var e={};return e.name=t,e.version=t,N.call(e,u,c.browser),e.major=function(e){return S(e)===i?e.replace(/[^\d\.]/g,"").split(".")[0]:t}(e.version),e},this.getCPU=function(){var e={};return e.architecture=t,N.call(e,u,c.cpu),e},this.getDevice=function(){var e={};return e.vendor=t,e.model=t,e.type=t,N.call(e,u,c.device),e},this.getEngine=function(){var e={};return e.name=t,e.version=t,N.call(e,u,c.engine),e},this.getOS=function(){var e={};return e.name=t,e.version=t,N.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)===i&&e.length>255?B(e,255):e,this},this.setUA(u),this};z.VERSION="1.0.2",z.BROWSER=D([s,l,"major"]),z.CPU=D([f]),z.DEVICE=D([a,c,u,h,d,v,p,g,m]),z.ENGINE=z.OS=D([s,l]),wq.exports&&(Aq=wq.exports=z),Aq.UAParser=z;var H=S(e)!==r&&(e.jQuery||e.Zepto);if(H&&!H.ua){var G=new z;H.ua=G.getResult(),H.ua.get=function(){return G.getUA()},H.ua.set=function(e){G.setUA(e);var t=G.getResult();for(var n in t)H.ua[n]=t[n]}}}("object"===("undefined"==typeof window?"undefined":S(window))?window:q);var Tq=xq.exports;function Pq(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 Cq(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Pq(arguments[t]));return e}var _q=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=Pq(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=Cq(r),i=o.length,a=0;a<i;a++){var s=Pq(o[a],2),u=s[0],c=s[1];u&&"function"==typeof u&&u.apply(c,t)}},e}(),Eq={exports:{}},Sq={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]},kq={exports:{}},Rq=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))},Oq=Array.prototype.concat,Fq=Array.prototype.slice,Mq=kq.exports=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];Rq(o)?t=Oq.call(t,Fq.call(o)):t.push(o)}return t};Mq.wrap=function(e){return function(){return e(Mq(arguments))}};var Iq=Sq,Dq=kq.exports,Lq=Object.hasOwnProperty,jq=Object.create(null);for(var Bq in Iq)Lq.call(Iq,Bq)&&(jq[Iq[Bq]]=Bq);var Nq=Eq.exports={to:{},get:{}};function Vq(e,t,n){return Math.min(Math.max(t,e),n)}function Uq(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}Nq.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=Nq.get.hsl(e),n="hsl";break;case"hwb":t=Nq.get.hwb(e),n="hwb";break;default:t=Nq.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},Nq.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]:Lq.call(Iq,t[1])?((o=Iq[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]=Vq(o[n],0,255);return o[3]=Vq(o[3],0,1),o},Nq.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,Vq(parseFloat(t[2]),0,100),Vq(parseFloat(t[3]),0,100),Vq(isNaN(n)?1:n,0,1)]}return null},Nq.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,Vq(parseFloat(t[2]),0,100),Vq(parseFloat(t[3]),0,100),Vq(isNaN(n)?1:n,0,1)]}return null},Nq.to.hex=function(){var e=Dq(arguments);return"#"+Uq(e[0])+Uq(e[1])+Uq(e[2])+(e[3]<1?Uq(Math.round(255*e[3])):"")},Nq.to.rgb=function(){var e=Dq(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]+")"},Nq.to.rgb.percent=function(){var e=Dq(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]+")"},Nq.to.hsl=function(){var e=Dq(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},Nq.to.hwb=function(){var e=Dq(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},Nq.to.keyword=function(e){return jq[e.slice(0,3)]};for(var Wq=Sq,zq={},Hq=0,Gq=Object.keys(Wq);Hq<Gq.length;Hq++){var Xq=Gq[Hq];zq[Wq[Xq]]=Xq}for(var Qq={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"]}},Yq=Qq,qq=0,Kq=Object.keys(Qq);qq<Kq.length;qq++){var Jq=Kq[qq];if(!("channels"in Qq[Jq]))throw new Error("missing channels property: "+Jq);if(!("labels"in Qq[Jq]))throw new Error("missing channel labels property: "+Jq);if(Qq[Jq].labels.length!==Qq[Jq].channels)throw new Error("channel and label counts mismatch: "+Jq);var Zq=Qq[Jq],$q=Zq.channels,eK=Zq.labels;delete Qq[Jq].channels,delete Qq[Jq].labels,Object.defineProperty(Qq[Jq],"channels",{value:$q}),Object.defineProperty(Qq[Jq],"labels",{value:eK})}Qq.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]},Qq.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]},Qq.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[Qq.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)))]},Qq.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]},Qq.rgb.keyword=function(e){var t=zq[e];if(t)return t;for(var n,r,o,i=1/0,a=0,s=Object.keys(Wq);a<s.length;a++){var u=s[a],c=(r=e,o=Wq[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},Qq.keyword.rgb=function(e){return Wq[e]},Qq.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)]},Qq.rgb.lab=function(e){var t=Qq.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))]},Qq.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},Qq.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)]},Qq.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]}},Qq.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)]},Qq.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]},Qq.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))]},Qq.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))]},Qq.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))]},Qq.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]},Qq.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]},Qq.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)]},Qq.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?Qq.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},Qq.hsv.ansi16=function(e){return Qq.rgb.ansi16(Qq.hsv.rgb(e),e[2])},Qq.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)},Qq.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]},Qq.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]},Qq.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},Qq.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]},Qq.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)]},Qq.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]},Qq.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]},Qq.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)]},Qq.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]},Qq.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]},Qq.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)]},Qq.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]},Qq.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},Qq.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},Qq.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},Qq.gray.hsl=function(e){return[0,0,e[0]]},Qq.gray.hsv=Qq.gray.hsl,Qq.gray.hwb=function(e){return[0,100,e[0]]},Qq.gray.cmyk=function(e){return[0,0,0,e[0]]},Qq.gray.lab=function(e){return[e[0],0,0]},Qq.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},Qq.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var tK=Yq;function nK(e){var t=function(){for(var e={},t=Object.keys(tK),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(tK[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 rK(e,t){return function(n){return t(e(n))}}function oK(e,t){for(var n=[t[e].parent,e],r=tK[t[e].parent][e],o=t[e].parent;t[o].parent;)n.unshift(t[o].parent),r=rK(tK[t[o].parent][o],r),o=t[o].parent;return r.conversion=n,r}var iK=Yq,aK=function(e){for(var t=nK(e),n={},r=Object.keys(t),o=r.length,i=0;i<o;i++){var a=r[i];null!==t[a].parent&&(n[a]=oK(a,t))}return n},sK={};Object.keys(iK).forEach((function(e){sK[e]={},Object.defineProperty(sK[e],"channels",{value:iK[e].channels}),Object.defineProperty(sK[e],"labels",{value:iK[e].labels});var t=aK(e);Object.keys(t).forEach((function(n){var r=t[n];sK[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),sK[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 uK=sK,cK=Eq.exports,lK=uK,fK=["keyword","gray","hex"],hK={},dK=0,pK=Object.keys(lK);dK<pK.length;dK++){var vK=pK[dK];hK[U(lK[vK].labels).sort().join("")]=vK}var gK={};function mK(e,t){if(!(this instanceof mK))return new mK(e,t);if(t&&t in fK&&(t=null),t&&!(t in lK))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 mK)this.model=e.model,this.color=U(e.color),this.valpha=e.valpha;else if("string"==typeof e){var o=cK.get(e);if(null===o)throw new Error("Unable to parse color from string: "+e);this.model=o.model,r=lK[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=lK[this.model].channels;var i=Array.prototype.slice.call(e,0,r);this.color=PK(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 hK))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=hK[s];var u=lK[this.model].labels,c=[];for(n=0;n<u.length;n++)c.push(e[u[n]]);this.color=PK(c)}if(gK[this.model])for(r=lK[this.model].channels,n=0;n<r;n++){var l=gK[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)}mK.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var t=this.model in cK.to?this:this.rgb(),n=1===(t=t.round("number"==typeof e?e:1)).valpha?t.color:[].concat(U(t.color),[this.valpha]);return cK.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 cK.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=lK[this.model].channels,n=lK[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 mK([].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 mK([].concat(U(this.color),[Math.max(0,Math.min(1,e))]),this.model):this.valpha},red:AK("rgb",0,xK(255)),green:AK("rgb",1,xK(255)),blue:AK("rgb",2,xK(255)),hue:AK(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:AK("hsl",1,xK(100)),lightness:AK("hsl",2,xK(100)),saturationv:AK("hsv",1,xK(100)),value:AK("hsv",2,xK(100)),chroma:AK("hcg",1,xK(100)),gray:AK("hcg",2,xK(100)),white:AK("hwb",1,xK(100)),wblack:AK("hwb",2,xK(100)),cyan:AK("cmyk",0,xK(100)),magenta:AK("cmyk",1,xK(100)),yellow:AK("cmyk",2,xK(100)),black:AK("cmyk",3,xK(100)),x:AK("xyz",0,xK(95.047)),y:AK("xyz",1,xK(100)),z:AK("xyz",2,xK(108.833)),l:AK("lab",0,xK(100)),a:AK("lab",1),b:AK("lab",2),keyword:function(e){return void 0!==e?new mK(e):lK[this.model].keyword(this.color)},hex:function(e){return void 0!==e?new mK(e):cK.to.hex(this.rgb().round().color)},hexa:function(e){if(void 0!==e)return new mK(e);var t=this.rgb().round().color,n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),cK.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 mK.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 mK.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 yK=function(){var e=wK[bK];if(fK.includes(e))return"continue";var t=lK[e].channels;mK.prototype[e]=function(){if(this.model===e)return new mK(this);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.length>0?new mK(n,e):new mK([].concat(U(TK(lK[this.model][e].raw(this.color))),[this.valpha]),e)},mK[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=PK(r,t)),new mK(i,e)}},bK=0,wK=Object.keys(lK);bK<wK.length;bK++)yK();function AK(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;(gK[i]||(gK[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 xK(e){return function(t){return Math.max(0,Math.min(e,t))}}function TK(e){return Array.isArray(e)?e:[e]}function PK(e,t){for(var n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}var CK,_K,EK,SK,kK=mK;!function(e){e[e.red=1]="red",e[e.green=2]="green",e[e.blue=3]="blue"}(EK||(EK={})),I(CK={},EK.red,"#db357f"),I(CK,EK.green,"#1eb848"),I(CK,EK.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"}(SK||(SK={})),I(_K={},SK.Total,"total"),I(_K,SK.LeftFace,"occlusion_eye"),I(_K,SK.Eye,"occlusion_left_eye"),I(_K,SK.RightEye,"occlusion_right_eye"),I(_K,SK.Nose,"occlusion_nose"),I(_K,SK.Mouth,"occlusion_mouth"),I(_K,SK.LeftFace,"occlusion_left_face"),I(_K,SK.RightFace,"occlusion_right_face"),I(_K,SK.Chin,"occlusion_chin");var RK,OK={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"}(RK||(RK={}));var FK={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}},MK={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(_q){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(_q){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(_q){t=!0}}else if(window.localStorage&&/Safari/.test(window.navigator.userAgent)){try{window.localStorage.setItem("test",1)}catch(_q){t=!0}void 0===t&&(t=!1,window.localStorage.removeItem("test"))}}catch(_q){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(_q){}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(_q){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(_q){}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}()}(MK);var IK=MK.exports,DK={exports:{}};function LK(e,t,n){function r(r){n&&!n(e,t)||r.stopImmediatePropagation()}return e.addEventListener(t,r),r}function jK(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 BK(e,t,n){n.addEventListener(t,(function(){return e.dispatchEvent(new Event(t))}))}function NK(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(_q){}"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(_q){}}(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(_q){}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(_q){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(_q){}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(_q){}}),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(_q){t(_q)}}))},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(_q){t(_q)}}))},this.pauseRecording=function(){return new Promise((function(e,t){try{r.recordRTC.pauseRecording(),e()}catch(_q){t(_q)}}))},this.resumeRecording=function(){return new Promise((function(e,t){try{r.recordRTC.resumeRecording(),e()}catch(_q){t(_q)}}))},this.getDataURL=function(e){return new Promise((function(e,t){try{r.recordRTC.getDataURL((function(t){e(t)}))}catch(_q){t(_q)}}))},this.getBlob=function(){return new Promise((function(e,t){try{e(r.recordRTC.getBlob())}catch(_q){t(_q)}}))},this.getInternalRecorder=function(){return new Promise((function(e,t){try{e(r.recordRTC.getInternalRecorder())}catch(_q){t(_q)}}))},this.reset=function(){return new Promise((function(e,t){try{e(r.recordRTC.reset())}catch(_q){t(_q)}}))},this.destroy=function(){return new Promise((function(e,t){try{e(r.recordRTC.destroy())}catch(_q){t(_q)}}))},this.getState=function(){return new Promise((function(e,t){try{e(r.recordRTC.getState())}catch(_q){t(_q)}}))},this.blob=null,this.version="5.6.2"},t.WebAssemblyRecorder=I}(DK);var VK="object"===("undefined"==typeof document?"undefined":S(document))&&"object-fit"in document.head.style&&!matchMedia("(-webkit-video-playable-inline)").matches,UK="bfred-it:iphone-inline-video",WK="bfred-it:iphone-inline-video:event",zK="bfred-it:iphone-inline-video:nativeplay",HK="bfred-it:iphone-inline-video:nativepause";var GK,XK=[],QK=0;function YK(e,t,n){(GK||0)+200<Date.now()&&(e[WK]=!0,GK=Date.now()),n||(e.currentTime=t),XK[++QK%3]=100*t|0}function qK(e){return e.driver.currentTime>=e.video.duration}function KK(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&&qK(t)&&(t.driver.currentTime=0)),YK(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[WK],t.video.pause(!0))}function JK(){var e=this,t=e[UK];e.webkitDisplayingFullscreen?e[zK]():("data:"!==t.driver.src&&t.driver.src!==e.src&&(YK(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||(NK(e,"play"),t.video.readyState>=t.video.HAVE_ENOUGH_DATA&&NK(e,"playing"))))}function ZK(e){var t=this,n=t[UK];n.driver.pause(),n.updater.stop(),t.webkitDisplayingFullscreen&&t[HK](),n.paused&&!e||(n.paused=!0,n.hasAudio||NK(t,"pause"),t.ended&&!t.webkitDisplayingFullscreen&&(t[WK]=!0,NK(t,"ended")))}function $K(e,t){var n={};e[UK]=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}}}(KK.bind(n),requestAnimationFrame,cancelAnimationFrame),t?n.driver=function(e){var t=new Audio;return BK(e,"play",t),BK(e,"playing",t),BK(e,"pause",t),t.crossOrigin=e.crossOrigin,t.src=e.src||e.currentSrc||"data:",t}(e):(e.addEventListener("canplay",(function(){e.paused||NK(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,qK(n)&&YK(e,0)},get ended(){return qK(n)}}),e.addEventListener("emptied",(function(){var r=!n.driver.src||"data:"===n.driver.src;n.driver.src&&n.driver.src!==e.src&&(YK(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[zK]())})),t&&(e.addEventListener("webkitendfullscreen",(function(){n.driver.currentTime=e.currentTime})),e.addEventListener("seeking",(function(){XK.indexOf(100*e.currentTime|0)<0&&(n.driver.currentTime=e.currentTime)})))}function eJ(e){var t=e[WK];return delete e[WK],!e.webkitDisplayingFullscreen&&!t}function tJ(e,t){if(void 0===t&&(t={}),!e[UK]){if(!t.everywhere){if(!VK)return;if(!(t.iPad||t.ipad?/iPhone|iPod|iPad/:/iPhone|iPod/).test(navigator.userAgent))return}e.pause();var n=e.autoplay;e.autoplay=!1,$K(e,!e.muted),function(e){var t=e[UK];e[zK]=e.play,e[HK]=e.pause,e.play=JK,e.pause=ZK,jK(e,"paused",t.driver),jK(e,"muted",t.driver,!0),jK(e,"playbackRate",t.driver,!0),jK(e,"ended",t.driver),jK(e,"loop",t.driver,!0),LK(e,"seeking",(function(e){return!e.webkitDisplayingFullscreen})),LK(e,"seeked",(function(e){return!e.webkitDisplayingFullscreen})),LK(e,"timeupdate",eJ),LK(e,"ended",eJ)}(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 nJ={exports:{}},rJ={exports:{}};(function(){var e,t,n,r,o,i;"undefined"!=typeof performance&&null!==performance&&performance.now?rJ.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(rJ.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?(rJ.exports=function(){return Date.now()-n},n=Date.now()):(rJ.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(q);for(var oJ=rJ.exports,iJ="undefined"==typeof window?q:window,aJ=["moz","webkit"],sJ="AnimationFrame",uJ=iJ["request"+sJ],cJ=iJ["cancel"+sJ]||iJ["cancelRequest"+sJ],lJ=0;!uJ&&lJ<aJ.length;lJ++)uJ=iJ[aJ[lJ]+"Request"+sJ],cJ=iJ[aJ[lJ]+"Cancel"+sJ]||iJ[aJ[lJ]+"CancelRequest"+sJ];if(!uJ||!cJ){var fJ=0,hJ=0,dJ=[];uJ=function(e){if(0===dJ.length){var t=oJ(),n=Math.max(0,16.666666666666668-(t-fJ));fJ=n+t,setTimeout((function(){var e=dJ.slice(0);dJ.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(fJ)}catch(_q){setTimeout((function(){throw _q}),0)}}),Math.round(n))}return dJ.push({handle:++hJ,callback:e,cancelled:!1}),hJ},cJ=function(e){for(var t=0;t<dJ.length;t++)dJ[t].handle===e&&(dJ[t].cancelled=!0)}}nJ.exports=function(e){return uJ.call(iJ,e)},nJ.exports.cancel=function(){cJ.apply(iJ,arguments)},nJ.exports.polyfill=function(e){e||(e=iJ),e.requestAnimationFrame=uJ,e.cancelAnimationFrame=cJ};var pJ=nJ.exports,vJ=function(e,t){return vJ=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])},vJ(e,t)};function gJ(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}vJ(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var mJ=function(){return mJ=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},mJ.apply(this,arguments)};function yJ(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(_q){i(_q)}}function s(e){try{u(r.throw(e))}catch(_q){i(_q)}}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 bJ(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(_q){i=[6,_q],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 wJ(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 AJ(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(w1){o={error:w1}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function xJ(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 TJ(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}var PJ,CJ=function(){function e(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}return e.Undefined=new e(void 0),e}(),_J=function(){function e(){this._first=CJ.Undefined,this._last=CJ.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===CJ.Undefined},e.prototype.clear=function(){for(var e=this._first;e!==CJ.Undefined;){var t=e.next;e.prev=CJ.Undefined,e.next=CJ.Undefined,e=t}this._first=CJ.Undefined,this._last=CJ.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 CJ(e);if(this._first===CJ.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!==CJ.Undefined){var e=this._first.element;return this._remove(this._first),e}},e.prototype.pop=function(){if(this._last!==CJ.Undefined){var e=this._last.element;return this._remove(this._last),e}},e.prototype._remove=function(e){if(e.prev!==CJ.Undefined&&e.next!==CJ.Undefined){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===CJ.Undefined&&e.next===CJ.Undefined?(this._first=CJ.Undefined,this._last=CJ.Undefined):e.next===CJ.Undefined?(this._last=this._last.prev,this._last.next=CJ.Undefined):e.prev===CJ.Undefined&&(this._first=this._first.next,this._first.prev=CJ.Undefined);this._size-=1},e.prototype[Symbol.iterator]=function(){var e;return bJ(this,(function(t){switch(t.label){case 0:e=this._first,t.label=1;case 1:return e===CJ.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 bJ(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=wJ(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=wJ(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 bJ(this,(function(u){switch(u.label){case 0:u.trys.push([0,5,6,7]),n=wJ(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 bJ(this,(function(c){switch(c.label){case 0:n=0,c.label=1;case 1:c.trys.push([1,6,7,8]),r=wJ(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 bJ(this,(function(e){switch(e.label){case 0:e.trys.push([0,11,12,13]),t=wJ(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=wJ(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 bJ(this,(function(h){switch(h.label){case 0:h.trys.push([0,11,12,13]),t=wJ(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=wJ(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=wJ(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),bJ(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}}}(PJ||(PJ={}));var EJ=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}(),SJ=new EJ;function kJ(e){var t;(t=e)instanceof Error&&"Canceled"===t.name&&"Canceled"===t.message||SJ.onUnexpectedError(e)}!function(e){function t(){var t=e.call(this,"Canceled")||this;return t.name=t.message,t}gJ(t,e)}(Error),function(e){function t(t){var n=e.call(this,"NotImplemented")||this;return t&&(n.message=t),n}gJ(t,e)}(Error),function(e){function t(t){var n=e.call(this,"NotSupported")||this;return t&&(n.message=t),n}gJ(t,e)}(Error);var RJ=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 gJ(t,e),t}(Error);function OJ(e){var t,n;if(PJ.is(e)){var r=[];try{for(var o=wJ(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(a)try{a.dispose()}catch(_q){r.push(_q)}}}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 RJ(r);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function FJ(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=MJ((function(){return OJ(e)}));return n}function MJ(e){return{dispose:TJ((function(){e()}))}}var IJ=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{OJ(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}(),DJ=function(){function e(){this._store=new IJ,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 LJ,jJ="object"===("undefined"==typeof self?"undefined":S(self))?self:"object"===("undefined"==typeof global?"undefined":S(global))?global:{},BJ=jJ.performance&&"function"==typeof jJ.performance.now,NJ=function(){function e(e){this._highResolution=BJ&&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?jJ.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 UJ({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 UJ({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 DJ.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),FJ.apply(void 0,xJ([],AJ(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 UJ({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,xJ([],AJ(e),!1)))},o=new UJ({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,xJ([],AJ(e),!1)))},o=new UJ({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)}))}}(LJ||(LJ={}));var VJ=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 NJ(!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}(),UJ=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 VJ(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 _J);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=MJ((function(){(s&&s(),e._disposed)||(a(),e._options&&e._options.onLastListenerRemove&&(e._listeners&&!e._listeners.isEmpty()||e._options.onLastListenerRemove(e)))}));return r instanceof IJ?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 _J);try{for(var i=wJ(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=AJ(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(_q){kJ(_q)}}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 WJ(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 zJ(e){return new Promise((function(t){setTimeout(t,e)}))}function HJ(e,t){return e+Math.round(Math.random()*(t-e))}function GJ(){for(var e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",t=e.length-1,n="";n.length<16;)n+=e[HJ(0,t)];return encodeURIComponent(n)}function XJ(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}gJ(t,e),t.prototype.fireAsync=function(e,t,n){return yJ(this,void 0,void 0,(function(){var r,o,i,a,s,u,c;return bJ(this,(function(l){switch(l.label){case 0:if(!this._listeners)return[2];this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new _J);try{for(r=wJ(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 bJ(this,(function(a){switch(a.label){case 0:e=AJ(s._asyncDeliveryQueue.shift(),2),t=e[0],r=e[1],o=[],i=mJ(mJ({},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(_q){return kJ(_q),[2,"continue"]}return Object.freeze(o),[4,Promise.allSettled(o).then((function(e){var t,n;try{for(var r=(t=void 0,wJ(e)),o=r.next();!o.done;o=r.next()){var i=o.value;"rejected"===i.status&&kJ(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]}}))}))}}(UJ),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}gJ(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 _J,n._mergeFn=null==t?void 0:t.merge,n}return gJ(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}(UJ)),function(e){function t(t){var n=e.call(this,t)||this;return n._queuedEvents=[],n._mergeFn=null==t?void 0:t.merge,n}gJ(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=[]}))}}(UJ),function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new UJ({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 MJ(TJ((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=LJ.None,this.inputEventListener=DJ.None,this.emitter=new UJ({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 QJ=new WeakMap,YJ=new WeakMap,qJ=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,QJ,{writable:!0,value:void 0}),Y(this,YJ,{writable:!0,value:void 0}),I(this,"_videoElement",void 0),I(this,"_originSizeCanvasAndCtx",void 0),I(this,"_frameDrawingHandler",-1),I(this,"_onFrameDrawingFinished",new UJ),I(this,"createVideoStream",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!G(a,QJ).useSecure){e.next=3;break}e.next=10;break;case 3:return e.t0=X,e.t1=a,e.t2=YJ,e.next=8,navigator.mediaDevices.getUserMedia(G(a,QJ).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,YJ)}catch(_q){a._videoElement.src=URL.createObjectURL(G(a,YJ))}finally{G(a,QJ).needToRecord&&(a.recorder=new DK.exports.RecordRTCPromisesHandler(G(a,YJ),{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,YJ).getTracks().forEach((function(e){return e.stop()}))}catch(_q){}})),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=pJ((function e(){a.frameInfoCanvas=a.grabPictureCanvas(),a._onFrameDrawingFinished.fire(),a._frameDrawingHandler=pJ(e)}))})),I(this,"cancelFrameDrawing",(function(){a._frameDrawingHandler&&(pJ.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,QJ,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,QJ).useSecure}return M(e,[{key:"hasStream",get:function(){return!!G(this,YJ)}},{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,QJ).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),tJ(e._videoElement),e._videoElement.play().catch((function(){}))})),this._videoElement.addEventListener("loadedmetadata",(function(){e._videoElement.play().catch((function(){}))}))}}],[{key:"isSupport",value:function(){return IK.isGetUserMediaSupported}}]),e}();I(qJ,"grabPictureCfg",{type:"image/jpeg",quality:.96});var KJ={exports:{}};KJ.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)}();!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}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)}();var JJ=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}(),ZJ=[-.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],$J=new JJ([[-.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 eZ(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 tZ(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=eZ(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 nZ(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 rZ(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 oZ(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 iZ(e){return function(t){return[e[2*t],e[2*t+1]]}}function aZ(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function sZ(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 uZ(e){var t=iZ(e),n=V([58,60,62,64].map(t),4),r=n[0],o=n[1],i=n[2];return aZ(o,n[3])/aZ(r,i)>=.5?1:0}function cZ(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([ZJ[3*t[a]]-ZJ[3*t[0]],ZJ[3*t[a]+1]-ZJ[3*t[0]+1],ZJ[3*t[a]+2]-ZJ[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 JJ(t.arr.map((function(e){return[].concat(U(e),[1])}))),l=new JJ(a),f=new JJ(s),h=new JJ(u),d=!1,p=0,v=[],g=[],m=[];!d;){var y=$J.mult(l),b=$J.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 JJ([].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 JJ(o),new JJ(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 lZ(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 fZ(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 hZ=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)},dZ=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8,r=hZ(e,t);return r>n};function pZ(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=cZ(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 vZ(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 gZ(e){return-e.angles.reduce((function(e,t){return Math.abs(e)+Math.abs(t)}),0)}var mZ=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 KJ.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=nZ({img:t,maxW:n,maxH:r}),i=o.scale,a=o.imageData,this.scale=i,s=lZ(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}(),yZ=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 KJ.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=eZ(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=tZ({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:oZ(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(yZ,"DEFAULT_WIDTH",128),I(yZ,"DEFAULT_HEIGHT",128);var bZ=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 KJ.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=iZ(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=sZ(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,rZ(r,yZ.DEFAULT_WIDTH,yZ.DEFAULT_HEIGHT,!1,null,null);case 13:h=t.sent;case 14:return d=tZ({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:oZ(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(bZ,"DEFAULT_WIDTH",56),I(bZ,"DEFAULT_HEIGHT",36);var wZ,AZ=KJ.exports.coreUtils.findVarByKey,xZ=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 KJ.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=AZ(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 KJ.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}(),TZ={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"}(wZ||(wZ={}));var PZ=!0,CZ=!0;function _Z(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function EZ(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 SZ(e){return"boolean"!=typeof e?new Error("Argument type: "+S(e)+". Please use a boolean."):(PZ=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function kZ(e){return"boolean"!=typeof e?new Error("Argument type: "+S(e)+". Please use a boolean."):(CZ=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function RZ(){if("object"===("undefined"==typeof window?"undefined":S(window))){if(PZ)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function OZ(e,t){CZ&&console.warn(e+" is deprecated, please use "+t+" instead.")}function FZ(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=_Z(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection&&!e.RTCIceGatherer)t.browser="chrome",t.version=_Z(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=_Z(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t}function MZ(e){return"[object Object]"===Object.prototype.toString.call(e)}function IZ(e){return MZ(e)?Object.keys(e).reduce((function(t,n){var r=MZ(e[n]),o=r?IZ(e[n]):e[n],i=r&&!Object.keys(o).length;return void 0===o||i?t:Object.assign(t,I({},n,o))}),{}):e}function DZ(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach((function(r){r.endsWith("Id")?DZ(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach((function(t){DZ(e,e.get(t),n)}))})))}function LZ(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&&DZ(e,n,o)}))})),o}var jZ=RZ;function BZ(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),jZ("chrome: "+JSON.stringify(e)),o(e)}));e.video=r(e.video)}return jZ("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 NZ(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function VZ(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 EZ(e,"track",(function(e){return e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e}))}function UZ(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 WZ(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 zZ(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 LZ(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}),EZ(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 LZ(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 HZ(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 GZ(e,t){if(e.RTCPeerConnection){if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return HZ(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 XZ(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 QZ(e,t){EZ(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 YZ=Object.freeze({__proto__:null,shimMediaStream:NZ,shimOnTrack:VZ,shimGetSendersWithDtmf:UZ,shimGetStats:WZ,shimSenderReceiverGetStats:zZ,shimAddTrackRemoveTrackWithNative:HZ,shimAddTrackRemoveTrack:GZ,shimPeerConnection:XZ,fixNegotiationNeeded:QZ,shimGetUserMedia:BZ,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 qZ(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){OZ("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 KZ(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 JZ(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(_q){if("TypeError"!==_q.name)throw _q;e.forEach((function(t,r){e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))}))}return e})).then(i,a)}}}function ZZ(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 $Z(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}),EZ(e,"track",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}}function e$(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;OZ("removeStream","removeTrack"),this.getSenders().forEach((function(n){n.track&&e.getTracks().includes(n.track)&&t.removeTrack(n)}))})}function t$(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function n$(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 r$(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 o$(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 i$(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 a$=Object.freeze({__proto__:null,shimOnTrack:KZ,shimPeerConnection:JZ,shimSenderGetStats:ZZ,shimReceiverGetStats:$Z,shimRemoveStream:e$,shimRTCDataChannel:t$,shimAddTransceiver:n$,shimGetParameters:r$,shimCreateOffer:o$,shimCreateAnswer:i$,shimGetUserMedia:qZ,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 s$(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 u$(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 c$(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 l$(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(f$(e))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function f$(e){return e&&void 0!==e.video?Object.assign({},e,{video:IZ(e.video)}):e}function h$(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")?(OZ("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 d$(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 p$(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 v$(e){"object"!==S(e)||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var g$=Object.freeze({__proto__:null,shimLocalStreamsAPI:s$,shimRemoteStreamsAPI:u$,shimCallbacksAPI:c$,shimGetUserMedia:l$,shimConstraints:f$,shimRTCIceServerUrls:h$,shimTrackEventTransceiver:d$,shimCreateOfferLegacy:p$,shimAudioContext:v$}),m$={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}(m$);var y$=m$.exports,b$=C({__proto__:null,default:y$},[m$.exports]);function w$(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=y$.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,EZ(e,"icecandidate",(function(t){return t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t}))}}function A$(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=y$.splitSections(e.sdp);return t.shift(),t.some((function(e){var t=y$.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=y$.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 x$(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},EZ(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 T$(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 P$(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 C$(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 _$(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 E$=Object.freeze({__proto__:null,shimRTCIceCandidate:w$,shimMaxMessageSize:A$,shimSendThrowTypeError:x$,shimConnectionState:T$,removeExtmapAllowMixed:P$,shimAddIceCandidateNullOrEmpty:C$,shimParameterlessSetLocalDescription:_$});!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=RZ,o=FZ(t),i={browserDetails:o,commonShim:E$,extractVersion:_Z,disableLog:SZ,disableWarnings:kZ,sdp:b$};switch(o.browser){case"chrome":if(!YZ||!XZ||!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=YZ,C$(t,o),_$(t),BZ(t,o),NZ(t),XZ(t,o),VZ(t),GZ(t,o),UZ(t),WZ(t),zZ(t),QZ(t,o),w$(t),T$(t),A$(t,o),x$(t),P$(t,o);break;case"firefox":if(!a$||!JZ||!n.shimFirefox)return r("Firefox shim is not included in this adapter release."),i;r("adapter.js shimming firefox."),i.browserShim=a$,C$(t,o),_$(t),qZ(t,o),JZ(t,o),KZ(t),e$(t),ZZ(t),$Z(t),t$(t),n$(t),r$(t),o$(t),i$(t),w$(t),T$(t),A$(t,o),x$(t);break;case"safari":if(!g$||!n.shimSafari)return r("Safari shim is not included in this adapter release."),i;r("adapter.js shimming safari."),i.browserShim=g$,C$(t,o),_$(t),h$(t),p$(t),c$(t),s$(t),u$(t),d$(t),l$(t),v$(t),w$(t),A$(t,o),x$(t),P$(t,o);break;default:r("Unsupported browser!")}}({window:"undefined"==typeof window?void 0:window});var S$=["Quark","NokiaBrowser","UCBrowser"],k$=[{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"}}],R$=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,_q);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:OK[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(qJ.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===wZ.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 gZ(t)-gZ(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 qJ(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 Tq).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=GJ(),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=XJ(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,WJ(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=FK[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,zJ(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!==wZ.silence){e.next=64;break}return e.next=62,this.silenceFinish();case 62:e.next=75;break;case 64:if(w!==wZ.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===wZ.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(!dZ(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=fZ([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=cZ(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,zJ(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=FK[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=uZ(t),h=vZ(f=u+l),d=V(h,2),p=d[0],v=d[1],M=void 0,I=void 0,D=void 0,M=V(cZ(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=uZ(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=vZ(T),_=V(C,2),E=_[0],S=_[1],k=vZ(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),!pZ(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,kK(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?TZ.occlusion:{eye:1,mouse:1,nose:1,leftFace:1,rightFace:1,chin:1}:E(E({},TZ.occlusion),e.occlusion));return this.options=E(E(E({},TZ),e),{},{video:t,occlusion:n}),(this.options.solutionType===wZ.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 mZ(t),this.alignModel=new yZ(t),this.eyesModel=new bZ(t),this.pdModel=new xZ(t),this}}],[{key:"isSupport",value:function(){return e=(new Tq).getResult(),t=e.browser,n=e.os,r=e.device,!(t.name&&S$.includes(t.name)||k$.find((function(e){return e.device.vendor===r.vendor&&e.os.name===n.name&&e.os.version===n.version})))&&qJ.isSupport();var e,t,n,r}},{key:"isExtraNotSupport",value:function(){var e,t,n=new Tq,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 Tq}}]),f}();I(R$,"ACTION_CONFIG",FK),I(R$,"defaultOptions",E({},TZ)),I(R$,"defaultColorMap",["#db357f","#1eb848","#371dc0"]),I(R$,"occlusionThreshold",.8);var O$="undefined"==typeof atob?function(e){return Buffer.from(e,"base64").toString("binary")}:atob,F$="undefined"==typeof btoa?function(e){return Buffer.from(e,"binary").toString("base64")}:btoa;function M$(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 I$(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 D$(e){return e instanceof Uint8Array}function L$(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 j$(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 B$,N$,V$=function(e){c(n,p(Error));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)}(),U$=function(e){c(n,p(Error));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)}(),W$=function(e){c(n,p(Error));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)}(),z$=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}(),H$=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||L$().subarray(z$.HEAP_DATA),this.asm=s||new z$(null,this.heap.buffer),this.pos=0,this.len=0;var u=t.length;if(16!==u&&24!==u&&32!==u)throw new U$("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 U$("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(!D$(e))throw new TypeError("data isn't of expected type");for(var t=this.asm,n=this.heap,r=z$.ENC[this.mode],o=z$.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=j$(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=z$.ENC[this.mode],r=z$.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 U$("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(!D$(e))throw new TypeError("data isn't of expected type");var t=this.asm,n=this.heap,r=z$.DEC[this.mode],o=z$.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=j$(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=z$.DEC[this.mode],r=z$.HEAP_DATA,o=this.pos,i=this.len,a=i;if(i>0){if(i%16){if(this.hasOwnProperty("padding"))throw new U$("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 W$("bad padding");for(var u=0,c=s;c>1;c--)u|=s^t[o+a-c];if(u)throw new W$("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}(),G$=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 H$(t,void 0,!1,"CTR"),this.aes.asm.gcm_init(),this.tagSize<4||this.tagSize>16)throw new U$("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(z$.MAC.GCM,z$.HEAP_DATA,16),this.aes.asm.get_iv(z$.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>68719476704)throw new U$("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>68719476704)throw new RangeError("counter overflow");for(var f=new Uint8Array(c);n>0;)s+=l=j$(o,a+s,e,t,n),t+=l,n-=l,l=r.cipher(z$.ENC.CTR,z$.HEAP_DATA+a,s),(l=r.mac(z$.MAC.GCM,z$.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(z$.ENC.CTR,z$.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(z$.MAC.GCM,z$.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(z$.MAC.GCM,z$.HEAP_DATA,16),e.get_iv(z$.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(z$.ENC.CTR,z$.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>68719476704)throw new RangeError("counter overflow");for(var d=new Uint8Array(l);n>f;)u+=h=j$(o,s+u,e,t,n-f),t+=h,n-=h,h=r.mac(z$.MAC.GCM,z$.HEAP_DATA+s,h),(h=r.cipher(z$.DEC.CTR,z$.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+=j$(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 V$("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(z$.MAC.GCM,z$.HEAP_DATA+i,l),e.cipher(z$.DEC.CTR,z$.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(z$.MAC.GCM,z$.HEAP_DATA,16),e.get_iv(z$.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(z$.ENC.CTR,z$.HEAP_DATA,16);for(var d=0,p=0;p<n;++p)d|=c[p]^t[p];if(d)throw new W$("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=j$(t,0,e,r,o),o-=i;15&i;)t[i++]=0;n.mac(z$.MAC.GCM,z$.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}(),X$=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("")},Q$=function(e){"object"===n(e)&&(e=JSON.stringify(e));var t="".concat(X$(3),":").concat(X$(3),":").concat(X$(3),":").concat(X$(4)),r=X$(12),o=G$.encrypt(M$(e),M$(t),M$(r));return{key:t,iv:r,eyptStr:F$(I$(o))}},Y$=function(e,t,n){var r=G$.decrypt(function(e){return M$(O$(e))}(e),M$(t),M$(n));return I$(r)},q$=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}(),K$=new q$;K$.setCurrentLang("zh-CN");K$.add("zh-CN",(u(B$={},"Loading...","准备中..."),u(B$,"FaceTheScreen","请正对屏幕"),u(B$,"DetectionCompleted","检测完成"),u(B$,"WellLit","光线充足"),u(B$,"FacePhone","正对手机"),u(B$,"DoNotCoverFace","脸无遮挡"),u(B$,"XhrError","网络请求错误"),u(B$,"CheckError","校验不通过"),u(B$,"CheckNetFail","校验接口网络错误"),u(B$,"Rejected","浏览器没有摄像头权限或⽤户拒绝授权"),u(B$,"Auth","鉴权不通过"),u(B$,"Unsupported","浏览器不支持"),u(B$,"NotAllowed","用户拒绝了相机权限"),u(B$,"NotFound","找不到摄像头"),u(B$,"NotReadable","异常硬件导致无法读取摄像头"),u(B$,"OverConstrained","摄像头分辨率过低"),u(B$,"Abort","未知问题导致摄像头无法被使用"),u(B$,"PdFail","炫瞳检测失败"),u(B$,"GetConfNetFail","获取配置接口网络错误"),u(B$,"GetConfFail","获取配置失败,请检查接入配置是否正确"),u(B$,"TipEmpty","未检测到⼈脸"),u(B$,"TipMultiple","请保持单⼈⼊镜"),u(B$,"TipOutside","请将⼈脸移⼊框内"),u(B$,"TipClose","请远离屏幕"),u(B$,"TipFar","请靠近屏幕"),u(B$,"TipLight","请调暗环境光线"),u(B$,"TipDark","请调亮环境光线"),u(B$,"TipRotate","请保持正脸"),u(B$,"TipBlink","眨眨眼"),u(B$,"TipMouthopen","张张嘴"),u(B$,"TipHeadRight","向右转头"),u(B$,"TipHeadLeft","向左转头"),u(B$,"TipLookup","向上抬头"),u(B$,"TipLookdown","向下低头"),u(B$,"TipActionOver","动作核验完成"),u(B$,"TipColorReady","屏幕即将闪烁,请保持正脸"),u(B$,"TipColorRunning","变光中,请保持正脸"),u(B$,"TipOK","请保持不动"),u(B$,"TipTimeout","采集超时"),u(B$,"FailTipUnsupported","该浏览器不支持"),u(B$,"FailTipNotAllowed","请开启相机权限"),u(B$,"FailTipNotFound","找不到摄像头"),u(B$,"FailTipNotReadable","异常硬件导致无法读取摄像头"),u(B$,"FailTipOverConstrained","摄像头分辨率过低"),u(B$,"FailTipAbort","未知错误导致无法读取摄像头"),u(B$,"FailTipPDFail","炫瞳检测失败"),u(B$,"FailTipTimeout","检测超时"),u(B$,"FailTipReject","获取相机权限失败"),u(B$,"FailTipAuth","认证不通过"),u(B$,"VideoActionOpenMouth","张嘴"),u(B$,"VideoActionWink","眨眼"),u(B$,"VideoTipTesting","检测中,请耐心等待"),u(B$,"VideoTipDuration","视频长度和手机的网络速度会影响视频式活体的检测时间,如果视频中面部不完整可能会检测失败"),u(B$,"VideoTipCameraFail","打开摄像头失败"),u(B$,"VideoTipSelfRecord","请自行录制一段视频进行验证"),u(B$,"VideoTipBrightenEnv","请在明亮环境下录制 3~5 秒"),u(B$,"VideoTipBlink35","请在录制过程中眨眼 3~5 次"),u(B$,"VideoTipOpenMouth35","请在录制过程中张嘴 3~5 次"),u(B$,"VideoTipVideoLen35","请保持完整面部轮廓在视频中"),u(B$,"VideoStartRecord","开始录制"),u(B$,"VideoTipVideoTooLarge","当前视频大于 15M,请重新上传"),u(B$,"VideoTipVideoUseless","未采集到有效视频,请重新上传"),B$)),K$.add("en-US",(u(N$={},"Loading...","Loading"),u(N$,"FaceTheScreen","Face the screen"),u(N$,"DetectionCompleted","Detection completed"),u(N$,"WellLit","Keep well lit"),u(N$,"FacePhone","Facing the phone"),u(N$,"DoNotCoverFace","Do not cover the face"),u(N$,"XhrError","Network request error"),u(N$,"CheckError","Verification failed"),u(N$,"CheckNetFail","check interface network error"),u(N$,"Rejected","The browser does not have the camera permission or the user refuses to authorize"),u(N$,"Auth","Authentication failed"),u(N$,"Unsupported","Browser does not support"),u(N$,"NotAllowed","User denied camera permission"),u(N$,"NotFound","Camera not found"),u(N$,"NotReadable","Abnormal hardware makes it impossible to read the camera"),u(N$,"OverConstrained","Camera resolution is too low"),u(N$,"Abort","An unknown problem prevents the camera from being used"),u(N$,"PdFail","Dazzling detection failed"),u(N$,"GetConfNetFail","Get config interface network error"),u(N$,"GetConfFail","Failed to obtain the configuration, please check whether the access configuration is correct"),u(N$,"TipEmpty","No face detected"),u(N$,"TipMultiple","Stay single"),u(N$,"TipOutside","Move the face into the frame"),u(N$,"TipClose","Stay away from the screen"),u(N$,"TipFar","Move closer to the screen"),u(N$,"TipLight","Dim the ambient light"),u(N$,"TipDark","Brighten the ambient light"),u(N$,"TipRotate","Keep a straight face"),u(N$,"TipBlink","Wink"),u(N$,"TipMouthopen","Open mouth"),u(N$,"TipHeadRight","Turn head right"),u(N$,"TipHeadLeft","Turn head left"),u(N$,"TipLookup","Look up"),u(N$,"TipLookdown","Look down"),u(N$,"TipActionOver","Action verification completed"),u(N$,"TipColorReady","The screen is about to flash, please keep facing the screen"),u(N$,"TipColorRunning","During dimming, please keep facing the screen"),u(N$,"TipOK","Please stay still"),u(N$,"TipTimeout","Collection timeout"),u(N$,"FailTipUnsupported","This browser does not support"),u(N$,"FailTipNotAllowed","Please enable camera permission"),u(N$,"FailTipNotFound","Camera not found"),u(N$,"FailTipNotReadable","Can not read the camera"),u(N$,"FailTipOverConstrained","Camera resolution is too low"),u(N$,"FailTipAbort","An unknown error prevented the camera from being read"),u(N$,"FailTipPDFail","Dazzling detection failed"),u(N$,"FailTipTimeout","Detection timeout"),u(N$,"FailTipReject","Failed to get camera permission"),u(N$,"FailTipAuth","Authentication failed"),u(N$,"VideoActionOpenMouth","open mouth"),u(N$,"VideoActionWink","wink"),u(N$,"VideoTipTesting","Testing, please wait"),u(N$,"VideoTipDuration","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(N$,"VideoTipCameraFail","Failed to open camera"),u(N$,"VideoTipSelfRecord","Please record a video yourself to verify"),u(N$,"VideoTipBrightenEnv","Please record for 3-5 seconds in a bright environment"),u(N$,"VideoTipBlink35","Please blink 3-5 times during recording"),u(N$,"VideoTipOpenMouth35","Please open mouth 3-5 times during recording"),u(N$,"VideoTipVideoLen35","Don not get too close to the camera, keep full facial contours in the video"),u(N$,"VideoStartRecord","Start recording"),u(N$,"VideoTipVideoTooLarge","The video is larger than 15M, please re-upload"),u(N$,"VideoTipVideoUseless","No valid video captured, please upload again"),N$));var J$="ne-live-detection",Z$="tip",$$="action",e0="color",t0="loading",n0="update-config",r0="video-change",o0="update-record-step",i0="ready",a0="verify",s0="error",u0="timeout",c0="checking",l0="check-done",f0={XHR_ERROR:[-8001,"XhrError"],CHECK_ERROR:[1e4,"CheckError"],CHECK_NET_FAIL:[10001,"CheckNetFail"],REJECTED:[11e3,"Rejected"],AUTH:[11001,"Auth"],UNSUPPORT:[11002,"Unsupported"],NOT_ALLOWED:[11003,"NotAllowed"],NOT_FOUND:[11004,"NotFound"],NOT_READABLE:[11005,"NotReadable"],OVER_CONSTRAINED:[11006,"OverConstrained"],ABORT:[11007,"Abort"],PD_FAIL:[11008,"PdFail"],GET_CONF_NET_FAIL:[12e3,"GetConfNetFail"],GET_CONF_FAIL:[12001,"GetConfFail"]},h0=2,d0=3,p0={EMPTY:["empty","TipEmpty"],MULTIPLE:["multiple","TipMultiple"],OUTSIDE:["outside","TipOutside"],CLOSE:["close","TipClose"],FAR:["far","TipFar"],LIGHT:["light","TipLight"],DARK:["dark","TipDark"],ROTATE:["rotate","TipRotate"],BLINK:["blink","TipBlink"],MOUTHOPEN:["mouthopen","TipMouthopen"],HEADRIGHT:["headright","TipHeadRight"],HEADLEFT:["headleft","TipHeadLeft"],LOOKUP:["lookup","TipLookup"],LOOKDOWN:["lookdown","TipLookdown"],ACTION_OVER:["action_over","TipActionOver"],COLOR_READY:["color_ready","TipColorReady"],COLOR_RUNNING:["color_running","TipColorRunning"],OK:["ok","TipOK"],TIMEOUT:["timeout","TipTimeout"]},v0={UNSUPPORTED:["unsupported","FailTipUnsupported"],NOT_ALLOWED:["notallowed","FailTipNotAllowed"],NOT_FOUND:["notfound","FailTipNotFound"],NOT_READABLE:["notreadable","FailTipNotReadable"],OVER_CONSTRAINED:["overconstrained","FailTipOverConstrained"],ABORT:["abort","FailTipAbort"],PD_FAIL:["pdFail","FailTipPDFail"],TIMEOUT:["timeout","FailTipTimeout"],REJECT:["reject","FailTipReject"],AUTH:["auth","FailTipAuth"]},g0=1,m0=["3","VideoActionOpenMouth"],y0=[3,"视频活体"],b0=["debugLog","调试日志"],w0=["apiError","接口错误"],A0={"Access-Control-Allow-Origin":"*"};function x0(e){return T0.apply(this,arguments)}function T0(){return T0=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(A0,l),h=new Promise((function(e,t){var a=new XMLHttpRequest;if(!a){var u=new Error("cannot creat an XMLHTTP instance");r(f0.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(w1){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)}))),T0.apply(this,arguments)}var P0=Object.prototype.toString;function C0(e){return"string"==typeof e||"[object String]"===P0.call(e)}function _0(e){return"function"==typeof e||"[object Function]"===P0.call(e)}function E0(e){return"object"===("undefined"==typeof HTMLElement?"undefined":n(HTMLElement))?e instanceof HTMLElement:e&&"object"===n(e)&&1===e.nodeType&&"string"==typeof e.nodeName}var S0=/([\w-]+)?(?:#([\w-]+))?((?:\.(?:[\w-]+))*)/;function k0(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:J$,i=""===o?"":"_",a=[];e&&(a=null!==(r=S0.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&&(C0(n)?s.innerHTML=n:n.forEach((function(e){return s.appendChild(e)}))),s}function R0(e){return e?C0(e)?document.querySelector(e):E0(e)?e:null:null}function O0(e){e&&(e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e))}function F0(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:J$;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 M0(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:J$;return e.classList.remove("".concat(n,"_").concat(t)),e}function I0(e){if(e)for(var t=e.childNodes,n=t.length-1;n>=0;n--)e.removeChild(t[n])}var D0=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}(),L0=new Map;function j0(e,t){var n;return L0.has(e)||L0.set(e,[]),null===(n=L0.get(e))||void 0===n||n.push(t),t}function B0(e){var t;L0.has(e)&&(null===(t=L0.get(e))||void 0===t||t.forEach((function(e){e.dispose()})),L0.delete(e))}var N0=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 V0(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{return JSON.parse(e)}catch(n){return t}}function U0(e){return e?e.split("?")[0]:e}function W0(e,t){var n=e;if(("string"==typeof n||"number"==typeof n)&&(n=parseFloat(String(n)),!Number.isNaN(n)))return n.toFixed(t)}var z0={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("[NELiveDetection]"," ").concat(t)):z0.error('[Inner util error]: log "type" must be one of the ['.concat(r.join(", "),"]}]"))},warn:function(e){z0.log("warn",e)},error:function(e){z0.log("error",e)},assert:function(e,t,n){if(!e)throw null==n||n(t),new Error("".concat("[NELiveDetection]"," ").concat(t))}};function H0(e,t){e&&null!=t&&t.type&&null!=t&&t.name&&null!=t&&t.value&&e.collect(t.type,t.name,t.value)}var G0=window.performance||window.msPerformance||window.webkitPerformance||{},X0=G0&&"getEntriesByName"in G0;function Q0(e){if(e&&X0){return function(t){var n,r,o=null===(n=G0.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:W0(o.responseEnd-(o.domainLookupStart||o.connectStart),1),dc:W0(o.domainLookupEnd-o.domainLookupStart,1),cc:W0(o.connectEnd-o.connectStart,1),rc:W0(o.responseStart-o.requestStart,1),rr:W0(o.responseEnd-o.responseStart,1),url:t,host:i.host,https:"https"===i.protocol});e.collectAsync("netPerformance",a,s)}}}}function Y0(e,t,n){return{type:b0[0],name:e,value:JSON.stringify({type:"confErr",conf:t,log:n})}}var q0={mode:"mount",businessKey:"",container:void 0,diameter:220,audio:!1,fallback:!0,footerTip:!0,lang:"zh-CN",preload:!1};function K0(){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 J0=function(){return J0=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},J0.apply(this,arguments)};var Z0,$0={userData:null,name:location.hostname+"_snaker",init:function(){if(!$0.userData)try{$0.userData=document.createElement("INPUT"),$0.userData.type="hidden",$0.userData.style.display="none",$0.userData.addBehavior("#default#userData"),$0.userData&&document.body.appendChild($0.userData);var e=new Date;e.setDate(e.getDate()+365),$0.userData.expires=e.toUTCString()}catch(w1){return console.log("userData is disabled!"),!1}return!0},setItem:function(e,t){$0.init()&&$0.userData&&($0.userData.load($0.name),$0.userData.setAttribute(e,t),$0.userData.save($0.name))},getItem:function(e){return $0.init()&&$0.userData?($0.userData.load($0.name),$0.userData.getAttribute(e)||""):""},removeItem:function(e){$0.init()&&$0.userData&&($0.userData.load($0.name),$0.userData.removeAttribute(e),$0.userData.save($0.name))}};try{Z0=localStorage||$0}catch(A1){Z0=$0}var e1=function(){function e(e){this.name=e}return e.prototype.push=function(e){if(e)try{var t=Z0.getItem(this.name);Z0.setItem(this.name,t?t+","+e:e)}catch(w1){console.log("localstorage or userData is disabled!")}},e.prototype.length=function(){try{var e=Z0.getItem(this.name)||"";return e?e.split(",").length:0}catch(w1){return console.log("localstorage or userData is disabled!"),0}},e.prototype.pop=function(e){var t;void 0===e&&(e=1);try{var n=Z0.getItem(this.name),r=n?n.split(","):[];t=r.splice(0,e),Z0.setItem(this.name,r.join(","))}catch(w1){t=[],console.log("localstorage or userData is disabled!")}return t},e.prototype.clear=function(){try{Z0.removeItem(this.name)}catch(w1){console.log("localstorage or userData is disabled!")}},e}(),t1=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 e1(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=J0(J0({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}(),n1=function(){function e(n){i(this,e),this.snaker=new t1(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}(),r1=function(){function e(t,n,r,o,a){i(this,e),n&&!C0(n)&&E0(n)?this.el=n:this.el=k0(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(){O0(this.el),B0(this)}}]),e}(),o1=function(e){c(n,r1);var t=y(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,".tip",{},K$.trans("FaceTheScreen"))).neLiveDetection=r,j0(g(o),r.on(Z$,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(p0).forEach((function(e){p0[e][0]===t&&(n=K$.trans(p0[e][1]))})),"fail"===e&&Object.keys(v0).forEach((function(e){v0[e][0]===t&&(n=K$.trans(v0[e][1]))})),n}(r,t),this.el.textContent=this.text}}]),n}(),i1=function(e){c(n,r1);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(),j0(g(a),r.on(n0,a.initColors.bind(g(a)))),j0(g(a),r.on(e0,a.updateActiveColor.bind(g(a)))),a}return s(n,[{key:"initColors",value:function(){var e=this;I0(this.el);var t=this.neLiveDetection.options.colorMap,n=void 0===t?[]:t;this.colors=n.map((function(t,n){var r=k0(".color_circle");return F0(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?F0(t,"color_circle--active"):M0(t,"color_circle--active")}))}}]),n}(),a1=function(e){c(n,r1);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=k0(".camera_inner");var a=k0("video#".concat(J$,"_camera_video"),{muted:!0,autoplay:!0,"x5-playsinline":"",playsinline:"","webkit-playsinline":""},"Please update your browser."),s=k0("img.camera_loading-bg",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAggAAAIICAYAAAAL/BZjAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAABWNSURBVHic7d1NctvGFoDRbnkjHrm0C8NzUmvIW4mllSTZgsi54WVQo6xEeINQjiyQEn8A9N85o1Qqgy6Htj7f2wBDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAChbTH0AYFqr1aoLIYSbm5vu5d8Nw/D1wH/aHfh3x/SH/mWM8WcIITw/P/chhLDdbg/+d0B5BAIUarVadS8R8CoAulTneaUP4d94EA5QLoEAhXgJgn0MdKnPc4H+JRoEA+RPIECm3kwIvqc9zSz6YRgeQjBhgBwJBMjIqylBjUHwkX4YhgexAHkQCJCBu7u7+4JXB1MzWYAMCARI5O7u7j6EatcHUzFVgEQEAixsPy0QBWeKMT48Pj7epz4HtEIgwEKEwTRijA+ehID5CQSYmTCYjfUDzEggwEyEwWKEAsxAIMDEhEEa7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IIVGO1WnUhhGANQQKeQKA6AoFqubPAnNwpoHYCgSaIBaYgCmiJQKA5LjlyBvcJaJZAoHmCgVcEAewJBHjDkxFNEQRwhECADwiGqvQxxp8huEcAHxEIcKY3j1OGIBpy9SsGTAjgfAIBJvASDe4yJGMyABMTCDCTA9EQgnC41q8QCEEMwJwEAiRwJB5CEBAhvIkA6wFIQyBAZl7HQwghvAmIEMqNiP7lH94GQAghiADIi0CAgr3ERAj/BUUIB6PimO7D/+LVD/ZDXv+wD+G/H/gh+KEPJfs/XWuM0SFottoAAAAASUVORK5CYII="}),u=k0("div.camera_loading-circle"),c=k0("span.camera_loading-msg",{},K$.trans("Loading..."));return o.cameraLoadingText=k0(".camera_loading-text",{},[s,u,c]),j0(g(o),new i1(o.el,r,{size:r.options.diameter})),o.circleBg=k0(".camera_circle-bg"),o.circleAni=k0(".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),j0(g(o),r.on(t0,o.updateLoadingStatus.bind(g(o)))),j0(g(o),r.on(Z$,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?F0(this.cameraLoadingText,"camera_loading-text--show"):M0(this.cameraLoadingText,"camera_loading-text--show")}},{key:"updateCircleAni",value:function(e){var t=e.type,n=function(e,t){if(""!==t){var n=[p0.EMPTY[0],p0.MULTIPLE[0],p0.OUTSIDE[0],p0.CLOSE[0],p0.FAR[0],p0.LIGHT[0],p0.DARK[0],p0.ROTATE[0],p0.TIMEOUT[0]],r=Object.values(v0).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}(),s1=function(e){c(n,r1);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(),j0(g(o),r.on(n0,o.initSteps.bind(g(o)))),j0(g(o),r.on($$,o.updateActiveIndex.bind(g(o)))),o}return s(n,[{key:"initSteps",value:function(){var e=this;I0(this.el);var t=this.neLiveDetection.options.code,n=void 0===t?"":t;this.steps=n.split("").map((function(e,t){return k0(".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?F0(t,"progress_step--active"):M0(t,"progress_step--active")}))}},{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}(),u1=function(e){c(n,r1);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+fPojAM7wTcCJe8DkV7iKnKOKmby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S9mOL84Wj+oyO1IbAS9DIyZ0rgIdiyAk9zmHu7S/N2VkU2b25czx79nZjGHfUQZxhrYIaBuV6dW8DQ0NDQ0NDQ0NDQ0NDQ1V5i/47TibkqZqYQAAAABJRU5ErkJggg==",K$.trans("DoNotCoverFace")]],j0(g(o),r.on(n0,o.initFooter.bind(g(o)))),o}return s(n,[{key:"initFooter",value:function(){var e=this;I0(this.el),this.neLiveDetection.options.footerTip&&this.iconTips.forEach((function(t){var n=k0(".footer_icon-wrap");[k0("img.footer_icon",{src:t[0]}),k0("p.footer_text",{},t[1])].forEach((function(e){n.appendChild(e)})),e.el.appendChild(n)}))}}]),n}(),c1=function(e){c(n,r1);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,F0(o.el,"toast_".concat(a)),E0(r)&&o.el.appendChild(r),C0(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}(),l1=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),E0(e)&&(I0(r.el),r.el.appendChild(e)),C0(e)&&(r.el.innerHTML=e)):(r=new c1(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}(),f1=function(e){c(n,r1);var t=y(n);function n(e,r){var o;i(this,n),(o=t.call(this,e,".record-start")).neLiveDetection=r,o.toast=j0(g(o),new l1(o.el));var a=document.createDocumentFragment(),s=k0("img.record-tip-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vQlwetuBsM/9cuBay3bxiS9e7seeZ/WnRGSMV1T6hNxt5kJaTkTk2s4I1v1adhm2Xfjcum9dl82GfSl63BLdF6pAI+zUn5CVmi3S+wInEdIrI+UIjKM+3Ce6nYf+IbvBaWmOj8BvNU4FGCKuWGthKu4e88rcH7X5g408KwGRkvBwCcVdy1AtzOxTDtnRQWJbqEWb7adg/LxgjM2ElES9b8Uoi1Ps82AJ2X/b+DTkdmrK+JSIurD3tosQ+SpofMFaK5ZSCAuXyfpvCt3bt5IhBIIaiYP5ZG0nzGRwBS3UD5uTTszxQcINE3uvyqaev+07rpVrWae8tv4bDmtsVt7PmkkriW+WhzjbLcea5j9Ww9jlW1XWvVe8GdVjPeB9qKk+Wv04V+qrT9jbjWmnzUWpuM7GeJTzKUSdFEmsdvazW1vteaK/y5QrshuiZEqUH8OxVEjMi81pnK+27zCBPu7SM2GPvXujN0vcs3Sn9EX/IBE1OL9p8lKYAAAAAAAAAAAAAAAAAAAAAAADwED9C2Hfh+KxjRwAAAABJRU5ErkJggg=="}),u=k0("span.record-tip-main",{},K$.trans("VideoTipCameraFail")),c=k0("span.record-tip-sub",{},K$.trans("VideoTipSelfRecord"));o.conditionWrapper=k0("div.record-condition-wrapper"),[K$.trans("VideoTipBrightenEnv"),K$.trans("VideoTipBlink35"),K$.trans("VideoTipVideoLen35")].forEach((function(e,t){var n=k0("div.record-condition-inner"),r=k0("span.record-condition-text",{},e);1===t&&F0(r,"record-condition-text--uni");var i=k0("img.record-condition-icon",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABxRSURBVHgB7XxbbFzbed6/LvsyMxxSI2l0pGPK1VEP5ITMSZMKtdHWxaFRwEXgvhQoT4Og6S1unTpA4Rgu0KJAOESBIK2LoGiQPgVG89CmOTyo81AbaF9MtXbROBbycEImUY4V2VR0G0nkcD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ybatQLJetF4iHloIF5i1ySjwYwyOHDWpWXvWGOa0fljWAQ14JRvDnqWr0jQimTjRt50LI30Bb2Lu4LnhD+ccELl9PToIoTA0dWBRgn3FgpmM2LV8XOj388PItLfd68Vcha2pJNnYgcAbqityEaGOJbhw5RHQJzUnyRZ0Ztb+NoejoUYuTkVuzqfmtri6LpBjRx4o7STbqMvM0pcBvRCSqONN11877/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=k0(".record-btn-wrapper");return o.recordBtn=k0("button.record-btn",{"aria-label":K$.trans("VideoStartRecord")},K$.trans("VideoStartRecord")),o.recordFileInput=k0("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 D0(t,n,r,o);e&&j0(e,i)}(g(o),o.recordFileInput,"change",o.uploadVideo.bind(g(o))),j0(g(o),r.on(n0,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]===m0[0]?K$.trans("VideoTipOpenMouth35"):K$.trans("VideoTipBlink35"))}}},{key:"uploadVideo",value:function(e){var t=this,n=e.target.files;if(n&&n.length>0){this.neLiveDetection.emit(o0,"checking");var r=n[0];if(r.size>15728640)return this.neLiveDetection.emit(o0,"start"),void this.toast.show(K$.trans("VideoTipVideoTooLarge"),"top");var o=new FileReader;o.readAsDataURL(r),o.addEventListener("loadend",(function(){var e=o.result;null!==e&&t.neLiveDetection.emit(r0,e)}))}else this.neLiveDetection.emit(o0,"start"),this.toast.show(K$.trans("VideoTipVideoUseless"),"top")}}]),n}(),h1=function(e){c(n,r1);var t=y(n);function n(e){var r;i(this,n),r=t.call(this,e,".record-checking");var o=document.createDocumentFragment(),a=k0(".record-ani-wrapper");[k0(".record-ani-scan"),k0("img.record-ani-img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACgCAYAAADNecSHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABP4SURBVHgB7Z1vchvH0cZ7FqDK7+ukDJ/A6w+psiWmDJ3A0AksnUCw5FTlm6QTCDqBpG+piiyBJzB5AkMnEFyxZFflQ6AThKnIjiMRO+lndhZagNiZ2b/YBedXRQkkhySw+6C7p6dnWtCe84exHB4QDSmgUAj6RBINBFFI+J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ghoVOCSECMgSP49AHfbSvDgzV4/uaMHrUpWHSlk4JIo9dHrpdKCJVHieCsT9Of/9JsqrlqOi+INEgU/b5HoyULg18YpoojqhgsRaNxOruD5z0Wwr+XbomwrrBXgtgG0uO9iMKl5DyCoE8o3iyLXIK1/bGgOGfBcctrQn/0Hs2xlE97zP8A1ewNTlKigEAAAAAASUVORK5CYII="})].forEach((function(e){return a.appendChild(e)}));var s=k0("span.record-tip-main",{},K$.trans("VideoTipTesting")),u=k0("span.record-tip-third",{},K$.trans("VideoTipDuration"));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}(),d1=function(e){c(n,r1);var t=y(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,".record")).neLiveDetection=r,o.start=j0(g(o),new f1(o.el,o.neLiveDetection)),o.checking=j0(g(o),new h1(o.el)),j0(g(o),r.on(o0,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}(),p1=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?v1:g1)(o,n),o.onload||v1(o,n),r.appendChild(o)};function v1(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 g1(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}var m1=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():p1(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}(),y1=["checkImages"],b1=function(e){c(w,N0);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 n1({bid:e.businessKey}),r.netCollector=new n1({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",x0(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"},Q0(r.netCollector)),r.options=function(e,n){var r=t(t({},q0),e),o=r.businessKey,i=r.container;z0.assert(Boolean(o)&&/^[a-zA-Z0-9]+$/.test(o),'Correct "businessKey" is required',(function(e){H0(n,Y0("businessKey",r,e))}));var a=R0(i);return z0.assert(Boolean(a),'Correct "container" is required',(function(e){H0(n,Y0("container",r,e))})),r}(e,r.collector),r.container=R0(r.options.container),K$.setCurrentLang(r.options.lang),r.el=k0("div.".concat(J$),{},void 0,""),r.tip=j0(g(r),new o1(r.el,g(r))),r.camera=j0(g(r),new a1(r.el,g(r))),r.progress=j0(g(r),new s1(r.el,g(r))),r.footer=j0(g(r),new u1(r.el,g(r))),r.record=j0(g(r),new d1(r.el,g(r))),j0(g(r),r.on(r0,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=R0(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(n0);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 R$({video:"".concat(J$,"_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(t0,!1)})),l.on("status",(function(e){"loading"===e?f.emit(t0,!0):"loading_over"===e&&(f.loadOver=!0,f.cameraOpened&&f.emit(t0,!1))})),l.on("tip",(function(e){var t=e.code;f.emit(Z$,{code:t}),t===p0.TIMEOUT[0]&&f.emit(u0,t)})),l.on("action",(function(e){f.emit($$,e)})),l.on("color",(function(e){f.emit(e0,e)})),l.on("success",this.onSuccess.bind(this)),l.on("fail",this.onFail.bind(this))):this.onFail(["unsupported"]),t&&(this.emit(i0),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 m1({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(t0,!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,B0(this),this.removeAllListeners(),O0(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=R$).UA(),_0(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(!_0(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(Z$,{text:K$.trans("DetectionCompleted")}),e.next=3,this.check(t.images);case 3:n=e.sent,r=n.status,o=n.token,r===g0?(i=this.iriskModule?"".concat(o,"_").concat(this.iriskToken):o,this.emit(a0,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(Z$,{type:"fail",code:r}),o={unsupported:{code:f0.UNSUPPORT,handler:function(){u.options.fallback&&u.record.show()}},notallowed:{code:f0.NOT_ALLOWED},notfound:{code:f0.NOT_FOUND},notreadable:{code:f0.NOT_READABLE},overconstrained:{code:f0.OVER_CONSTRAINED},abort:{code:f0.ABORT},reject:{code:f0.REJECTED},auth:{code:f0.AUTH},pdFail:{code:f0.PD_FAIL},action_timeout:{handler:function(){return u.emit(u0,r)}},timeout:{handler:function(){return u.emit(u0,r)}}},(i=o[r])&&(i.code&&((s=new Error(K$.trans(i.code[1]))).name=i.code[0].toString(),this.emit(s0,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:d0,nonce:X$(32)},r=Q$(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:K0()});case 8:u=e.sent,200!==(null===(l=u)||void 0===l?void 0:l.code)&&(f=new Error(K$.trans(f0.GET_CONF_FAIL[1])),h=f0.GET_CONF_FAIL[0].toString(),f.name=h,this.emit(s0,f),H0(this.collector,{type:w0[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=K$.trans(f0.GET_CONF_NET_FAIL[1]),y=f0.GET_CONF_NET_FAIL[0].toString(),m.name=y,this.emit(s0,m),H0(this.collector,{type:w0[0],name:"getConf",value:JSON.stringify({errType:y,target:U0(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:V0(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(Y$(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(c0),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:X$(32),picType:h0,timestamp:Date.now(),token:s,solutionType:null!=o?o:u,sdkType:d0},l=Q$(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({},K0()),timeout:15e3},Q0(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=K$.trans(f0.CHECK_NET_FAIL[1]),T=f0.CHECK_NET_FAIL[0].toString(),x.name=T,this.emit(s0,x),P=v(c,y1),H0(this.collector,{type:w0[0],name:"check",value:JSON.stringify({errType:T,target:U0(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:V0(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(l0),e.abrupt("return",g?JSON.parse(Y$(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,y0[0]);case 2:n=e.sent,r=n.status,o=n.token,r===g0?(i=this.iriskModule?"".concat(o,"_").concat(this.iriskToken):o,this.emit(a0,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(K$.trans(f0.CHECK_ERROR[1])),r=f0.CHECK_ERROR[0].toString();n.name=r,this.emit(s0,n),H0(this.collector,{type:w0[0],name:"check",value:JSON.stringify({errType:r,msg:n.message,pathname:"/v1/liveperson/check",method:"post",response:t,action:e})})}}]),w}();export{b1 as default};
1
+ // v2.3.3
2
+ 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(_q){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(_q){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=J["__core-js_shared__"]||xt("__core-js_shared__",{}),Pt=Tt;(yt.exports=function(e,t){return Pt[e]||(Pt[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 Ct=ke,_t=J.Object,Et=function(e){return _t(Ct(e))},St=Et,kt=me({}.hasOwnProperty),Rt=Object.hasOwn||function(e,t){return kt(St(e),t)},Ot=me,Ft=0,Mt=Math.random(),It=Ot(1..toString),Dt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+It(++Ft+Mt,36)},Lt=J,jt=yt.exports,Bt=Rt,Nt=Dt,Vt=Je,Ut=Ze,Wt=jt("wks"),zt=Lt.Symbol,Ht=zt&&zt.for,Gt=Ut?zt:zt&&zt.withoutSetter||Nt,Xt=function(e){if(!Bt(Wt,e)||!Vt&&"string"!=typeof Wt[e]){var t="Symbol."+e;Vt&&Bt(zt,e)?Wt[e]=zt[e]:Wt[e]=Ut&&Ht?Ht(t):Gt(t)}return Wt[e]},Qt=oe,Yt=De,qt=ot,Kt=ht,Jt=mt,Zt=Xt,$t=J.TypeError,en=Zt("toPrimitive"),tn=function(e,t){if(!Yt(e)||qt(e))return e;var n,r=Kt(e,en);if(r){if(void 0===t&&(t="default"),n=Qt(r,e,t),!Yt(n)||qt(n))return n;throw $t("Can't convert object to primitive value")}return void 0===t&&(t="number"),Jt(e,t)},nn=tn,rn=ot,on=function(e){var t=nn(e,"string");return rn(t)?t:t+""},an=De,sn=J.document,un=an(sn)&&an(sn.createElement),cn=function(e){return un?sn.createElement(e):{}},ln=cn,fn=!ee&&!$((function(){return 7!=Object.defineProperty(ln("div"),"a",{get:function(){return 7}}).a})),hn=ee,dn=oe,pn=ie,vn=fe,gn=Fe,mn=on,yn=Rt,bn=fn,wn=Object.getOwnPropertyDescriptor;Z.f=hn?wn:function(e,t){if(e=gn(e),t=mn(t),bn)try{return wn(e,t)}catch(n){}if(yn(e,t))return vn(!dn(pn.f,e,t),e[t])};var An={},xn=ee&&$((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Tn=J,Pn=De,Cn=Tn.String,_n=Tn.TypeError,En=function(e){if(Pn(e))return e;throw _n(Cn(e)+" is not an object")},Sn=ee,kn=fn,Rn=xn,On=En,Fn=on,Mn=J.TypeError,In=Object.defineProperty,Dn=Object.getOwnPropertyDescriptor;An.f=Sn?Rn?function(e,t,n){if(On(e),t=Fn(t),On(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var r=Dn(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return In(e,t,n)}:In:function(e,t,n){if(On(e),t=Fn(t),On(n),kn)try{return In(e,t,n)}catch(r){}if("get"in n||"set"in n)throw Mn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Ln=An,jn=fe,Bn=ee?function(e,t,n){return Ln.f(e,t,jn(1,n))}:function(e,t,n){return e[t]=n,e},Nn={exports:{}},Vn=Me,Un=Tt,Wn=me(Function.toString);Vn(Un.inspectSource)||(Un.inspectSource=function(e){return Wn(e)});var zn,Hn,Gn,Xn=Un.inspectSource,Qn=Me,Yn=Xn,qn=J.WeakMap,Kn=Qn(qn)&&/native code/.test(Yn(qn)),Jn=yt.exports,Zn=Dt,$n=Jn("keys"),er=function(e){return $n[e]||($n[e]=Zn(e))},tr={},nr=Kn,rr=J,or=me,ir=De,ar=Bn,sr=Rt,ur=Tt,cr=er,lr=tr,fr=rr.TypeError,hr=rr.WeakMap;if(nr||ur.state){var dr=ur.state||(ur.state=new hr),pr=or(dr.get),vr=or(dr.has),gr=or(dr.set);zn=function(e,t){if(vr(dr,e))throw new fr("Object already initialized");return t.facade=e,gr(dr,e,t),t},Hn=function(e){return pr(dr,e)||{}},Gn=function(e){return vr(dr,e)}}else{var mr=cr("state");lr[mr]=!0,zn=function(e,t){if(sr(e,mr))throw new fr("Object already initialized");return t.facade=e,ar(e,mr,t),t},Hn=function(e){return sr(e,mr)?e[mr]:{}},Gn=function(e){return sr(e,mr)}}var yr={set:zn,get:Hn,has:Gn,enforce:function(e){return Gn(e)?Hn(e):zn(e,{})},getterFor:function(e){return function(t){var n;if(!ir(t)||(n=Hn(t)).type!==e)throw fr("Incompatible receiver, "+e+" required");return n}}},br=ee,wr=Rt,Ar=Function.prototype,xr=br&&Object.getOwnPropertyDescriptor,Tr=wr(Ar,"name"),Pr={EXISTS:Tr,PROPER:Tr&&"something"===function(){}.name,CONFIGURABLE:Tr&&(!br||br&&xr(Ar,"name").configurable)},Cr=J,_r=Me,Er=Rt,Sr=Bn,kr=At,Rr=Xn,Or=Pr.CONFIGURABLE,Fr=yr.get,Mr=yr.enforce,Ir=String(String).split("String");(Nn.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;_r(n)&&("Symbol("===String(u).slice(0,7)&&(u="["+String(u).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Er(n,"name")||Or&&n.name!==u)&&Sr(n,"name",u),(o=Mr(n)).source||(o.source=Ir.join("string"==typeof u?u:""))),e!==Cr?(i?!s&&e[t]&&(a=!0):delete e[t],a?e[t]=n:Sr(e,t,n)):a?e[t]=n:kr(t,n)})(Function.prototype,"toString",(function(){return _r(this)&&Fr(this).source||Rr(this)}));var Dr={},Lr=Math.ceil,jr=Math.floor,Br=function(e){var t=+e;return t!=t||0===t?0:(t>0?jr:Lr)(t)},Nr=Br,Vr=Math.max,Ur=Math.min,Wr=function(e,t){var n=Nr(e);return n<0?Vr(n+t,0):Ur(n,t)},zr=Br,Hr=Math.min,Gr=function(e){return e>0?Hr(zr(e),9007199254740991):0},Xr=Gr,Qr=function(e){return Xr(e.length)},Yr=Fe,qr=Wr,Kr=Qr,Jr=function(e){return function(t,n,r){var o,i=Yr(t),a=Kr(i),s=qr(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}},Zr={includes:Jr(!0),indexOf:Jr(!1)},$r=Rt,eo=Fe,to=Zr.indexOf,no=tr,ro=me([].push),oo=function(e,t){var n,r=eo(e),o=0,i=[];for(n in r)!$r(no,n)&&$r(r,n)&&ro(i,n);for(;t.length>o;)$r(r,n=t[o++])&&(~to(i,n)||ro(i,n));return i},io=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ao=oo,so=io.concat("length","prototype");Dr.f=Object.getOwnPropertyNames||function(e){return ao(e,so)};var uo={};uo.f=Object.getOwnPropertySymbols;var co=Ne,lo=Dr,fo=uo,ho=En,po=me([].concat),vo=co("Reflect","ownKeys")||function(e){var t=lo.f(ho(e)),n=fo.f;return n?po(t,n(e)):t},go=Rt,mo=vo,yo=Z,bo=An,wo=function(e,t,n){for(var r=mo(t),o=bo.f,i=yo.f,a=0;a<r.length;a++){var s=r[a];go(e,s)||n&&go(n,s)||o(e,s,i(t,s))}},Ao=$,xo=Me,To=/#|\.prototype\./,Po=function(e,t){var n=_o[Co(e)];return n==So||n!=Eo&&(xo(t)?Ao(t):!!t)},Co=Po.normalize=function(e){return String(e).replace(To,".").toLowerCase()},_o=Po.data={},Eo=Po.NATIVE="N",So=Po.POLYFILL="P",ko=Po,Ro=J,Oo=Z.f,Fo=Bn,Mo=Nn.exports,Io=At,Do=wo,Lo=ko,jo=function(e,t){var n,r,o,i,a,s=e.target,u=e.global,c=e.stat;if(n=u?Ro:c?Ro[s]||Io(s,{}):(Ro[s]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=Oo(n,r))&&a.value:n[r],!Lo(u?r:s+(c?".":"#")+r,e.forced)&&void 0!==o){if(S(i)==S(o))continue;Do(i,o)}(e.sham||o&&o.sham)&&Fo(i,"sham",!0),Mo(n,r,i,e)}},Bo={};Bo[Xt("toStringTag")]="z";var No="[object z]"===String(Bo),Vo=J,Uo=No,Wo=Me,zo=Ae,Ho=Xt("toStringTag"),Go=Vo.Object,Xo="Arguments"==zo(function(){return arguments}()),Qo=Uo?zo: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=Go(e),Ho))?n:Xo?zo(t):"Object"==(r=zo(t))&&Wo(t.callee)?"Arguments":r},Yo=Qo,qo=J.String,Ko=function(e){if("Symbol"===Yo(e))throw TypeError("Cannot convert a Symbol value to a string");return qo(e)},Jo={},Zo=oo,$o=io,ei=Object.keys||function(e){return Zo(e,$o)},ti=ee,ni=xn,ri=An,oi=En,ii=Fe,ai=ei;Jo.f=ti&&!ni?Object.defineProperties:function(e,t){oi(e);for(var n,r=ii(t),o=ai(t),i=o.length,a=0;i>a;)ri.f(e,n=o[a++],r[n]);return e};var si,ui=Ne("document","documentElement"),ci=En,li=Jo,fi=io,hi=tr,di=ui,pi=cn,vi=er("IE_PROTO"),gi=function(){},mi=function(e){return"<script>"+e+"<\/script>"},yi=function(e){e.write(mi("")),e.close();var t=e.parentWindow.Object;return e=null,t},bi=function(){try{si=new ActiveXObject("htmlfile")}catch(r){}var e,t;bi="undefined"!=typeof document?document.domain&&si?yi(si):((t=pi("iframe")).style.display="none",di.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(mi("document.F=Object")),e.close(),e.F):yi(si);for(var n=fi.length;n--;)delete bi.prototype[fi[n]];return bi()};hi[vi]=!0;var wi=Object.create||function(e,t){var n;return null!==e?(gi.prototype=ci(e),n=new gi,gi.prototype=null,n[vi]=e):n=bi(),void 0===t?n:li.f(n,t)},Ai={},xi=on,Ti=An,Pi=fe,Ci=function(e,t,n){var r=xi(t);r in e?Ti.f(e,r,Pi(0,n)):e[r]=n},_i=Wr,Ei=Qr,Si=Ci,ki=J.Array,Ri=Math.max,Oi=function(e,t,n){for(var r=Ei(e),o=_i(t,r),i=_i(void 0===n?r:n,r),a=ki(Ri(i-o,0)),s=0;o<i;o++,s++)Si(a,s,e[o]);return a.length=s,a},Fi=Ae,Mi=Fe,Ii=Dr.f,Di=Oi,Li="object"==("undefined"==typeof window?"undefined":S(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ai.f=function(e){return Li&&"Window"==Fi(e)?function(e){try{return Ii(e)}catch(t){return Di(Li)}}(e):Ii(Mi(e))};var ji={},Bi=Xt;ji.f=Bi;var Ni=J,Vi=Rt,Ui=ji,Wi=An.f,zi=function(e){var t=Ni.Symbol||(Ni.Symbol={});Vi(t,e)||Wi(t,e,{value:Ui.f(e)})},Hi=oe,Gi=Ne,Xi=Xt,Qi=Nn.exports,Yi=function(){var e=Gi("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Xi("toPrimitive");t&&!t[r]&&Qi(t,r,(function(e){return Hi(n,this)}))},qi=An.f,Ki=Rt,Ji=Xt("toStringTag"),Zi=function(e,t,n){e&&!n&&(e=e.prototype),e&&!Ki(e,Ji)&&qi(e,Ji,{configurable:!0,value:t})},$i=lt,ea=te,ta=me(me.bind),na=function(e,t){return $i(e),void 0===t?e:ea?ta(e,t):function(){return e.apply(t,arguments)}},ra=Ae,oa=Array.isArray||function(e){return"Array"==ra(e)},ia=me,aa=$,sa=Me,ua=Qo,ca=Xn,la=function(){},fa=[],ha=Ne("Reflect","construct"),da=/^\s*(?:class|function)\b/,pa=ia(da.exec),va=!da.exec(la),ga=function(e){if(!sa(e))return!1;try{return ha(la,fa,e),!0}catch(t){return!1}},ma=function(e){if(!sa(e))return!1;switch(ua(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return va||!!pa(da,ca(e))}catch(t){return!0}};ma.sham=!0;var ya=!ha||aa((function(){var e;return ga(ga.call)||!ga(Object)||!ga((function(){e=!0}))||e}))?ma:ga,ba=J,wa=oa,Aa=ya,xa=De,Ta=Xt("species"),Pa=ba.Array,Ca=function(e){var t;return wa(e)&&(t=e.constructor,(Aa(t)&&(t===Pa||wa(t.prototype))||xa(t)&&null===(t=t[Ta]))&&(t=void 0)),void 0===t?Pa:t},_a=function(e,t){return new(Ca(e))(0===t?0:t)},Ea=na,Sa=Ee,ka=Et,Ra=Qr,Oa=_a,Fa=me([].push),Ma=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=ka(u),v=Sa(p),g=Ea(c,l),m=Ra(v),y=0,b=f||Oa,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:Fa(w,h)}else switch(e){case 4:return!1;case 7:Fa(w,h)}return i?-1:r||o?o:w}},Ia={forEach:Ma(0),map:Ma(1),filter:Ma(2),some:Ma(3),every:Ma(4),find:Ma(5),findIndex:Ma(6),filterReject:Ma(7)},Da=jo,La=J,ja=oe,Ba=me,Na=ee,Va=Je,Ua=$,Wa=Rt,za=Ve,Ha=En,Ga=Fe,Xa=on,Qa=Ko,Ya=fe,qa=wi,Ka=ei,Ja=Dr,Za=Ai,$a=uo,es=Z,ts=An,ns=Jo,rs=ie,os=Nn.exports,is=yt.exports,as=tr,ss=Dt,us=Xt,cs=ji,ls=zi,fs=Yi,hs=Zi,ds=yr,ps=Ia.forEach,vs=er("hidden"),gs=ds.set,ms=ds.getterFor("Symbol"),ys=Object.prototype,bs=La.Symbol,ws=bs&&bs.prototype,As=La.TypeError,xs=La.QObject,Ts=es.f,Ps=ts.f,Cs=Za.f,_s=rs.f,Es=Ba([].push),Ss=is("symbols"),ks=is("op-symbols"),Rs=is("wks"),Os=!xs||!xs.prototype||!xs.prototype.findChild,Fs=Na&&Ua((function(){return 7!=qa(Ps({},"a",{get:function(){return Ps(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Ts(ys,t);r&&delete ys[t],Ps(e,t,n),r&&e!==ys&&Ps(ys,t,r)}:Ps,Ms=function(e,t){var n=Ss[e]=qa(ws);return gs(n,{type:"Symbol",tag:e,description:t}),Na||(n.description=t),n},Is=function(e,t,n){e===ys&&Is(ks,t,n),Ha(e);var r=Xa(t);return Ha(n),Wa(Ss,r)?(n.enumerable?(Wa(e,vs)&&e[vs][r]&&(e[vs][r]=!1),n=qa(n,{enumerable:Ya(0,!1)})):(Wa(e,vs)||Ps(e,vs,Ya(1,{})),e[vs][r]=!0),Fs(e,r,n)):Ps(e,r,n)},Ds=function(e,t){Ha(e);var n=Ga(t),r=Ka(n).concat(Ns(n));return ps(r,(function(t){Na&&!ja(Ls,n,t)||Is(e,t,n[t])})),e},Ls=function(e){var t=Xa(e),n=ja(_s,this,t);return!(this===ys&&Wa(Ss,t)&&!Wa(ks,t))&&(!(n||!Wa(this,t)||!Wa(Ss,t)||Wa(this,vs)&&this[vs][t])||n)},js=function(e,t){var n=Ga(e),r=Xa(t);if(n!==ys||!Wa(Ss,r)||Wa(ks,r)){var o=Ts(n,r);return!o||!Wa(Ss,r)||Wa(n,vs)&&n[vs][r]||(o.enumerable=!0),o}},Bs=function(e){var t=Cs(Ga(e)),n=[];return ps(t,(function(e){Wa(Ss,e)||Wa(as,e)||Es(n,e)})),n},Ns=function(e){var t=e===ys,n=Cs(t?ks:Ga(e)),r=[];return ps(n,(function(e){!Wa(Ss,e)||t&&!Wa(ys,e)||Es(r,Ss[e])})),r};Va||(os(ws=(bs=function(){if(za(ws,this))throw As("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Qa(arguments[0]):void 0,t=ss(e),n=function e(n){this===ys&&ja(e,ks,n),Wa(this,vs)&&Wa(this[vs],t)&&(this[vs][t]=!1),Fs(this,t,Ya(1,n))};return Na&&Os&&Fs(ys,t,{configurable:!0,set:n}),Ms(t,e)}).prototype,"toString",(function(){return ms(this).tag})),os(bs,"withoutSetter",(function(e){return Ms(ss(e),e)})),rs.f=Ls,ts.f=Is,ns.f=Ds,es.f=js,Ja.f=Za.f=Bs,$a.f=Ns,cs.f=function(e){return Ms(us(e),e)},Na&&(Ps(ws,"description",{configurable:!0,get:function(){return ms(this).description}}),os(ys,"propertyIsEnumerable",Ls,{unsafe:!0}))),Da({global:!0,wrap:!0,forced:!Va,sham:!Va},{Symbol:bs}),ps(Ka(Rs),(function(e){ls(e)})),Da({target:"Symbol",stat:!0,forced:!Va},{useSetter:function(){Os=!0},useSimple:function(){Os=!1}}),Da({target:"Object",stat:!0,forced:!Va,sham:!Na},{create:function(e,t){return void 0===t?qa(e):Ds(qa(e),t)},defineProperty:Is,defineProperties:Ds,getOwnPropertyDescriptor:js}),Da({target:"Object",stat:!0,forced:!Va},{getOwnPropertyNames:Bs}),fs(),hs(bs,"Symbol"),as[vs]=!0;var Vs=Je&&!!Symbol.for&&!!Symbol.keyFor,Us=jo,Ws=Ne,zs=Rt,Hs=Ko,Gs=yt.exports,Xs=Vs,Qs=Gs("string-to-symbol-registry"),Ys=Gs("symbol-to-string-registry");Us({target:"Symbol",stat:!0,forced:!Xs},{for:function(e){var t=Hs(e);if(zs(Qs,t))return Qs[t];var n=Ws("Symbol")(t);return Qs[t]=n,Ys[n]=t,n}});var qs=jo,Ks=Rt,Js=ot,Zs=at,$s=Vs,eu=(0,yt.exports)("symbol-to-string-registry");qs({target:"Symbol",stat:!0,forced:!$s},{keyFor:function(e){if(!Js(e))throw TypeError(Zs(e)+" is not a symbol");if(Ks(eu,e))return eu[e]}});var tu=te,nu=Function.prototype,ru=nu.apply,ou=nu.call,iu="object"==("undefined"==typeof Reflect?"undefined":S(Reflect))&&Reflect.apply||(tu?ou.bind(ru):function(){return ou.apply(ru,arguments)}),au=me([].slice),su=jo,uu=Ne,cu=iu,lu=oe,fu=me,hu=$,du=oa,pu=Me,vu=De,gu=ot,mu=au,yu=Je,bu=uu("JSON","stringify"),wu=fu(/./.exec),Au=fu("".charAt),xu=fu("".charCodeAt),Tu=fu("".replace),Pu=fu(1..toString),Cu=/[\uD800-\uDFFF]/g,_u=/^[\uD800-\uDBFF]$/,Eu=/^[\uDC00-\uDFFF]$/,Su=!yu||hu((function(){var e=uu("Symbol")();return"[null]"!=bu([e])||"{}"!=bu({a:e})||"{}"!=bu(Object(e))})),ku=hu((function(){return'"\\udf06\\ud834"'!==bu("\udf06\ud834")||'"\\udead"'!==bu("\udead")})),Ru=function(e,t){var n=mu(arguments),r=t;if((vu(t)||void 0!==e)&&!gu(e))return du(t)||(t=function(e,t){if(pu(r)&&(t=lu(r,this,e,t)),!gu(t))return t}),n[1]=t,cu(bu,null,n)},Ou=function(e,t,n){var r=Au(n,t-1),o=Au(n,t+1);return wu(_u,e)&&!wu(Eu,o)||wu(Eu,e)&&!wu(_u,r)?"\\u"+Pu(xu(e,0),16):e};bu&&su({target:"JSON",stat:!0,forced:Su||ku},{stringify:function(e,t,n){var r=mu(arguments),o=cu(Su?Ru:bu,null,r);return ku&&"string"==typeof o?Tu(o,Cu,Ou):o}});var Fu=uo,Mu=Et;jo({target:"Object",stat:!0,forced:!Je||$((function(){Fu.f(1)}))},{getOwnPropertySymbols:function(e){var t=Fu.f;return t?t(Mu(e)):[]}});var Iu=jo,Du=ee,Lu=J,ju=me,Bu=Rt,Nu=Me,Vu=Ve,Uu=Ko,Wu=An.f,zu=wo,Hu=Lu.Symbol,Gu=Hu&&Hu.prototype;if(Du&&Nu(Hu)&&(!("description"in Gu)||void 0!==Hu().description)){var Xu={},Qu=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Uu(arguments[0]),t=Vu(Gu,this)?new Hu(e):void 0===e?Hu():Hu(e);return""===e&&(Xu[t]=!0),t};zu(Qu,Hu),Qu.prototype=Gu,Gu.constructor=Qu;var Yu="Symbol(test)"==String(Hu("test")),qu=ju(Gu.toString),Ku=ju(Gu.valueOf),Ju=/^Symbol\((.*)\)[^)]+$/,Zu=ju("".replace),$u=ju("".slice);Wu(Gu,"description",{configurable:!0,get:function(){var e=Ku(this),t=qu(e);if(Bu(Xu,e))return"";var n=Yu?$u(t,7,-1):Zu(t,Ju,"$1");return""===n?void 0:n}}),Iu({global:!0,forced:!0},{Symbol:Qu})}zi("asyncIterator"),zi("hasInstance"),zi("isConcatSpreadable"),zi("iterator"),zi("match"),zi("replace"),zi("search"),zi("species"),zi("split");var ec=Yi;zi("toPrimitive"),ec();var tc=Ne,nc=Zi;zi("toStringTag"),nc(tc("Symbol"),"Symbol"),zi("unscopables");var rc=$,oc=Ye,ic=Xt("species"),ac=function(e){return oc>=51||!rc((function(){var t=[];return(t.constructor={})[ic]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},sc=jo,uc=J,cc=$,lc=oa,fc=De,hc=Et,dc=Qr,pc=Ci,vc=_a,gc=ac,mc=Ye,yc=Xt("isConcatSpreadable"),bc=uc.TypeError,wc=mc>=51||!cc((function(){var e=[];return e[yc]=!1,e.concat()[0]!==e})),Ac=gc("concat"),xc=function(e){if(!fc(e))return!1;var t=e[yc];return void 0!==t?!!t:lc(e)};sc({target:"Array",proto:!0,forced:!wc||!Ac},{concat:function(e){var t,n,r,o,i,a=hc(this),s=vc(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(xc(i=-1===t?a:arguments[t])){if(u+(o=dc(i))>9007199254740991)throw bc("Maximum allowed index exceeded");for(n=0;n<o;n++,u++)n in i&&pc(s,u,i[n])}else{if(u>=9007199254740991)throw bc("Maximum allowed index exceeded");pc(s,u++,i)}return s.length=u,s}});var Tc=Et,Pc=Wr,Cc=Qr,_c=Math.min,Ec=[].copyWithin||function(e,t){var n=Tc(this),r=Cc(n),o=Pc(e,r),i=Pc(t,r),a=arguments.length>2?arguments[2]:void 0,s=_c((void 0===a?r:Pc(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},Sc=wi,kc=An,Rc=Xt("unscopables"),Oc=Array.prototype;null==Oc[Rc]&&kc.f(Oc,Rc,{configurable:!0,value:Sc(null)});var Fc=function(e){Oc[Rc][e]=!0},Mc=Fc;jo({target:"Array",proto:!0},{copyWithin:Ec}),Mc("copyWithin");var Ic=Et,Dc=Wr,Lc=Qr,jc=function(e){for(var t=Ic(this),n=Lc(t),r=arguments.length,o=Dc(r>1?arguments[1]:void 0,n),i=r>2?arguments[2]:void 0,a=void 0===i?n:Dc(i,n);a>o;)t[o++]=e;return t},Bc=Fc;jo({target:"Array",proto:!0},{fill:jc}),Bc("fill");var Nc=Ia.filter;jo({target:"Array",proto:!0,forced:!ac("filter")},{filter:function(e){return Nc(this,e,arguments.length>1?arguments[1]:void 0)}});var Vc=jo,Uc=Ia.find,Wc=Fc,zc=!0;"find"in[]&&Array(1).find((function(){zc=!1})),Vc({target:"Array",proto:!0,forced:zc},{find:function(e){return Uc(this,e,arguments.length>1?arguments[1]:void 0)}}),Wc("find");var Hc=jo,Gc=Ia.findIndex,Xc=Fc,Qc=!0;"findIndex"in[]&&Array(1).findIndex((function(){Qc=!1})),Hc({target:"Array",proto:!0,forced:Qc},{findIndex:function(e){return Gc(this,e,arguments.length>1?arguments[1]:void 0)}}),Xc("findIndex");var Yc=oa,qc=Qr,Kc=na,Jc=J.TypeError,Zc=function e(t,n,r,o,i,a,s,u){for(var c,l=i,f=0,h=!!s&&Kc(s,u);f<o;){if(f in r){if(c=h?h(r[f],f,n):r[f],a>0&&Yc(c))l=e(t,n,c,qc(c),l,a-1)-1;else{if(l>=9007199254740991)throw Jc("Exceed the acceptable array length");t[l]=c}l++}f++}return l},$c=Zc,el=Et,tl=Qr,nl=Br,rl=_a;jo({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=el(this),n=tl(t),r=rl(t,0);return r.length=$c(r,t,t,n,0,void 0===e?1:nl(e)),r}});var ol=Zc,il=lt,al=Et,sl=Qr,ul=_a;jo({target:"Array",proto:!0},{flatMap:function(e){var t,n=al(this),r=sl(n);return il(e),(t=ul(n,0)).length=ol(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var cl=oe,ll=En,fl=ht,hl=function(e,t,n){var r,o;ll(e);try{if(!(r=fl(e,"return"))){if("throw"===t)throw n;return n}r=cl(r,e)}catch(i){o=!0,r=i}if("throw"===t)throw n;if(o)throw r;return ll(r),n},dl=En,pl=hl,vl={},gl=vl,ml=Xt("iterator"),yl=Array.prototype,bl=function(e){return void 0!==e&&(gl.Array===e||yl[ml]===e)},wl=Qo,Al=ht,xl=vl,Tl=Xt("iterator"),Pl=function(e){if(null!=e)return Al(e,Tl)||Al(e,"@@iterator")||xl[wl(e)]},Cl=oe,_l=lt,El=En,Sl=at,kl=Pl,Rl=J.TypeError,Ol=function(e,t){var n=arguments.length<2?kl(e):t;if(_l(n))return El(Cl(n,e));throw Rl(Sl(e)+" is not iterable")},Fl=na,Ml=oe,Il=Et,Dl=function(e,t,n,r){try{return r?t(dl(n)[0],n[1]):t(n)}catch(o){pl(e,"throw",o)}},Ll=bl,jl=ya,Bl=Qr,Nl=Ci,Vl=Ol,Ul=Pl,Wl=J.Array,zl=function(e){var t=Il(e),n=jl(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=void 0!==o;i&&(o=Fl(o,r>2?arguments[2]:void 0));var a,s,u,c,l,f,h=Ul(t),d=0;if(!h||this==Wl&&Ll(h))for(a=Bl(t),s=n?new this(a):Wl(a);a>d;d++)f=i?o(t[d],d):t[d],Nl(s,d,f);else for(l=(c=Vl(t,h)).next,s=n?new this:[];!(u=Ml(l,c)).done;d++)f=i?Dl(c,o,[u.value,d],!0):u.value,Nl(s,d,f);return s.length=d,s},Hl=Xt("iterator"),Gl=!1;try{var Xl=0,Ql={next:function(){return{done:!!Xl++}},return:function(){Gl=!0}};Ql[Hl]=function(){return this},Array.from(Ql,(function(){throw 2}))}catch(w1){}var Yl=function(e,t){if(!t&&!Gl)return!1;var n=!1;try{var r={};r[Hl]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(w1){}return n},ql=zl;jo({target:"Array",stat:!0,forced:!Yl((function(e){Array.from(e)}))},{from:ql});var Kl=Zr.includes,Jl=Fc;jo({target:"Array",proto:!0},{includes:function(e){return Kl(this,e,arguments.length>1?arguments[1]:void 0)}}),Jl("includes");var Zl=$,$l=function(e,t){var n=[][e];return!!n&&Zl((function(){n.call(null,t||function(){return 1},1)}))},ef=jo,tf=Zr.indexOf,nf=$l,rf=me([].indexOf),of=!!rf&&1/rf([1],1,-0)<0,af=nf("indexOf");ef({target:"Array",proto:!0,forced:of||!af},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return of?rf(this,e,t)||0:tf(this,e,t)}});var sf,uf,cf,lf=!$((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ff=J,hf=Rt,df=Me,pf=Et,vf=lf,gf=er("IE_PROTO"),mf=ff.Object,yf=mf.prototype,bf=vf?mf.getPrototypeOf:function(e){var t=pf(e);if(hf(t,gf))return t[gf];var n=t.constructor;return df(n)&&t instanceof n?n.prototype:t instanceof mf?yf:null},wf=$,Af=Me,xf=bf,Tf=Nn.exports,Pf=Xt("iterator"),Cf=!1;[].keys&&("next"in(cf=[].keys())?(uf=xf(xf(cf)))!==Object.prototype&&(sf=uf):Cf=!0);var _f=null==sf||wf((function(){var e={};return sf[Pf].call(e)!==e}));_f&&(sf={}),Af(sf[Pf])||Tf(sf,Pf,(function(){return this}));var Ef={IteratorPrototype:sf,BUGGY_SAFARI_ITERATORS:Cf},Sf=Ef.IteratorPrototype,kf=wi,Rf=fe,Of=Zi,Ff=vl,Mf=function(){return this},If=function(e,t,n,r){var o=t+" Iterator";return e.prototype=kf(Sf,{next:Rf(+!r,n)}),Of(e,o,!1),Ff[o]=Mf,e},Df=J,Lf=Me,jf=Df.String,Bf=Df.TypeError,Nf=function(e){if("object"==S(e)||Lf(e))return e;throw Bf("Can't set "+jf(e)+" as a prototype")},Vf=me,Uf=En,Wf=Nf,zf=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Vf(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(w1){}return function(n,r){return Uf(n),Wf(r),t?e(n,r):n.__proto__=r,n}}():void 0),Hf=jo,Gf=oe,Xf=Pr,Qf=Me,Yf=If,qf=bf,Kf=zf,Jf=Zi,Zf=Bn,$f=Nn.exports,eh=vl,th=Xf.PROPER,nh=Xf.CONFIGURABLE,rh=Ef.IteratorPrototype,oh=Ef.BUGGY_SAFARI_ITERATORS,ih=Xt("iterator"),ah=function(){return this},sh=function(e,t,n,r,o,i,a){Yf(n,t,r);var s,u,c,l=function(e){if(e===o&&v)return v;if(!oh&&e in d)return d[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[ih]||d["@@iterator"]||o&&d[o],v=!oh&&p||l(o),g="Array"==t&&d.entries||p;if(g&&(s=qf(g.call(new e)))!==Object.prototype&&s.next&&(qf(s)!==rh&&(Kf?Kf(s,rh):Qf(s[ih])||$f(s,ih,ah)),Jf(s,f,!0)),th&&"values"==o&&p&&"values"!==p.name&&(nh?Zf(d,"name","values"):(h=!0,v=function(){return Gf(p,this)})),o)if(u={values:l("values"),keys:i?v:l("keys"),entries:l("entries")},a)for(c in u)(oh||h||!(c in d))&&$f(d,c,u[c]);else Hf({target:t,proto:!0,forced:oh||h},u);return d[ih]!==v&&$f(d,ih,v,{name:o}),eh[t]=v,u},uh=Fe,ch=Fc,lh=vl,fh=yr,hh=An.f,dh=sh,ph=ee,vh=fh.set,gh=fh.getterFor("Array Iterator"),mh=dh(Array,"Array",(function(e,t){vh(this,{type:"Array Iterator",target:uh(e),index:0,kind:t})}),(function(){var e=gh(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"),yh=lh.Arguments=lh.Array;if(ch("keys"),ch("values"),ch("entries"),ph&&"values"!==yh.name)try{hh(yh,"name",{value:"values"})}catch(w1){}var bh=jo,wh=Ee,Ah=Fe,xh=$l,Th=me([].join),Ph=wh!=Object,Ch=xh("join",",");bh({target:"Array",proto:!0,forced:Ph||!Ch},{join:function(e){return Th(Ah(this),void 0===e?",":e)}});var _h=iu,Eh=Fe,Sh=Br,kh=Qr,Rh=$l,Oh=Math.min,Fh=[].lastIndexOf,Mh=!!Fh&&1/[1].lastIndexOf(1,-0)<0,Ih=Rh("lastIndexOf"),Dh=Mh||!Ih?function(e){if(Mh)return _h(Fh,this,arguments)||0;var t=Eh(this),n=kh(t),r=n-1;for(arguments.length>1&&(r=Oh(r,Sh(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:Fh;jo({target:"Array",proto:!0,forced:Dh!==[].lastIndexOf},{lastIndexOf:Dh});var Lh=Ia.map;jo({target:"Array",proto:!0,forced:!ac("map")},{map:function(e){return Lh(this,e,arguments.length>1?arguments[1]:void 0)}});var jh=jo,Bh=$,Nh=ya,Vh=Ci,Uh=J.Array;jh({target:"Array",stat:!0,forced:Bh((function(){function e(){}return!(Uh.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new(Nh(this)?this:Uh)(t);t>e;)Vh(n,e,arguments[e++]);return n.length=t,n}});var Wh=lt,zh=Et,Hh=Ee,Gh=Qr,Xh=J.TypeError,Qh=function(e){return function(t,n,r,o){Wh(n);var i=zh(t),a=Hh(i),s=Gh(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 Xh("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}},Yh={left:Qh(!1),right:Qh(!0)},qh="process"==Ae(J.process),Kh=Yh.left,Jh=Ye,Zh=qh;jo({target:"Array",proto:!0,forced:!$l("reduce")||!Zh&&Jh>79&&Jh<83},{reduce:function(e){var t=arguments.length;return Kh(this,e,t,t>1?arguments[1]:void 0)}});var $h=Yh.right,ed=Ye,td=qh;jo({target:"Array",proto:!0,forced:!$l("reduceRight")||!td&&ed>79&&ed<83},{reduceRight:function(e){return $h(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var nd=jo,rd=oa,od=me([].reverse),id=[1,2];nd({target:"Array",proto:!0,forced:String(id)===String(id.reverse())},{reverse:function(){return rd(this)&&(this.length=this.length),od(this)}});var ad=jo,sd=J,ud=oa,cd=ya,ld=De,fd=Wr,hd=Qr,dd=Fe,pd=Ci,vd=Xt,gd=au,md=ac("slice"),yd=vd("species"),bd=sd.Array,wd=Math.max;ad({target:"Array",proto:!0,forced:!md},{slice:function(e,t){var n,r,o,i=dd(this),a=hd(i),s=fd(e,a),u=fd(void 0===t?a:t,a);if(ud(i)&&(n=i.constructor,(cd(n)&&(n===bd||ud(n.prototype))||ld(n)&&null===(n=n[yd]))&&(n=void 0),n===bd||void 0===n))return gd(i,s,u);for(r=new(void 0===n?bd:n)(wd(u-s,0)),o=0;s<u;s++,o++)s in i&&pd(r,o,i[s]);return r.length=o,r}});var Ad=Oi,xd=Math.floor,Td=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},Pd=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},Cd=function e(t,n){var r=t.length,o=xd(r/2);return r<8?Td(t,n):Pd(t,e(Ad(t,0,o),n),e(Ad(t,o),n),n)},_d=Ue.match(/firefox\/(\d+)/i),Ed=!!_d&&+_d[1],Sd=/MSIE|Trident/.test(Ue),kd=Ue.match(/AppleWebKit\/(\d+)\./),Rd=!!kd&&+kd[1],Od=jo,Fd=me,Md=lt,Id=Et,Dd=Qr,Ld=Ko,jd=$,Bd=Cd,Nd=$l,Vd=Ed,Ud=Sd,Wd=Ye,zd=Rd,Hd=[],Gd=Fd(Hd.sort),Xd=Fd(Hd.push),Qd=jd((function(){Hd.sort(void 0)})),Yd=jd((function(){Hd.sort(null)})),qd=Nd("sort"),Kd=!jd((function(){if(Wd)return Wd<70;if(!(Vd&&Vd>3)){if(Ud)return!0;if(zd)return zd<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++)Hd.push({k:t+r,v:n})}for(Hd.sort((function(e,t){return t.v-e.v})),r=0;r<Hd.length;r++)t=Hd[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}}));Od({target:"Array",proto:!0,forced:Qd||!Yd||!qd||!Kd},{sort:function(e){void 0!==e&&Md(e);var t=Id(this);if(Kd)return void 0===e?Gd(t):Gd(t,e);var n,r,o=[],i=Dd(t);for(r=0;r<i;r++)r in t&&Xd(o,t[r]);for(Bd(o,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Ld(t)>Ld(n)?1:-1}}(e)),n=o.length,r=0;r<n;)t[r]=o[r++];for(;r<i;)delete t[r++];return t}});var Jd=Ne,Zd=An,$d=ee,ep=Xt("species"),tp=function(e){var t=Jd(e),n=Zd.f;$d&&t&&!t[ep]&&n(t,ep,{configurable:!0,get:function(){return this}})};tp("Array");var np=jo,rp=J,op=Wr,ip=Br,ap=Qr,sp=Et,up=_a,cp=Ci,lp=ac("splice"),fp=rp.TypeError,hp=Math.max,dp=Math.min;np({target:"Array",proto:!0,forced:!lp},{splice:function(e,t){var n,r,o,i,a,s,u=sp(this),c=ap(u),l=op(e,c),f=arguments.length;if(0===f?n=r=0:1===f?(n=0,r=c-l):(n=f-2,r=dp(hp(ip(t),0),c-l)),c+n-r>9007199254740991)throw fp("Maximum allowed length exceeded");for(o=up(u,r),i=0;i<r;i++)(a=l+i)in u&&cp(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}}),Fc("flat"),Fc("flatMap");var pp="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,vp=Nn.exports,gp=function(e,t,n){for(var r in t)vp(e,r,t[r],n);return e},mp=Ve,yp=J.TypeError,bp=function(e,t){if(mp(t,e))return e;throw yp("Incorrect invocation")},wp=Br,Ap=Gr,xp=J.RangeError,Tp=function(e){if(void 0===e)return 0;var t=wp(e),n=Ap(t);if(t!==n)throw xp("Wrong length or index");return n},Pp=J.Array,Cp=Math.abs,_p=Math.pow,Ep=Math.floor,Sp=Math.log,kp=Math.LN2,Rp={pack:function(e,t,n){var r,o,i,a=Pp(n),s=8*n-t-1,u=(1<<s)-1,c=u>>1,l=23===t?_p(2,-24)-_p(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=Cp(e))!=e||e===1/0?(o=e!=e?1:0,r=u):(r=Ep(Sp(e)/kp),e*(i=_p(2,-r))<1&&(r--,i*=2),(e+=r+c>=1?l/i:l*_p(2,1-c))*i>=2&&(r++,i/=2),r+c>=u?(o=0,r=u):r+c>=1?(o=(e*i-1)*_p(2,t),r+=c):(o=e*_p(2,c-1)*_p(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+=_p(2,t),l-=a}return(c?-1:1)*n*_p(2,l-t)}},Op=J,Fp=me,Mp=ee,Ip=pp,Dp=Pr,Lp=Bn,jp=gp,Bp=$,Np=bp,Vp=Br,Up=Gr,Wp=Tp,zp=Rp,Hp=bf,Gp=zf,Xp=Dr.f,Qp=An.f,Yp=jc,qp=Oi,Kp=Zi,Jp=Dp.PROPER,Zp=Dp.CONFIGURABLE,$p=yr.get,ev=yr.set,tv=Op.ArrayBuffer,nv=tv,rv=nv&&nv.prototype,ov=Op.DataView,iv=ov&&ov.prototype,av=Object.prototype,sv=Op.Array,uv=Op.RangeError,cv=Fp(Yp),lv=Fp([].reverse),fv=zp.pack,hv=zp.unpack,dv=function(e){return[255&e]},pv=function(e){return[255&e,e>>8&255]},vv=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},gv=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},mv=function(e){return fv(e,23,4)},yv=function(e){return fv(e,52,8)},bv=function(e,t){Qp(e.prototype,t,{get:function(){return $p(this)[t]}})},wv=function(e,t,n,r){var o=Wp(n),i=$p(e);if(o+t>i.byteLength)throw uv("Wrong index");var a=$p(i.buffer).bytes,s=o+i.byteOffset,u=qp(a,s,s+t);return r?u:lv(u)},Av=function(e,t,n,r,o,i){var a=Wp(n),s=$p(e);if(a+t>s.byteLength)throw uv("Wrong index");for(var u=$p(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(Ip){var xv=Jp&&"ArrayBuffer"!==tv.name;if(Bp((function(){tv(1)}))&&Bp((function(){new tv(-1)}))&&!Bp((function(){return new tv,new tv(1.5),new tv(NaN),xv&&!Zp})))xv&&Zp&&Lp(tv,"name","ArrayBuffer");else{(nv=function(e){return Np(this,rv),new tv(Wp(e))}).prototype=rv;for(var Tv,Pv=Xp(tv),Cv=0;Pv.length>Cv;)(Tv=Pv[Cv++])in nv||Lp(nv,Tv,tv[Tv]);rv.constructor=nv}Gp&&Hp(iv)!==av&&Gp(iv,av);var _v=new ov(new nv(2)),Ev=Fp(iv.setInt8);_v.setInt8(0,2147483648),_v.setInt8(1,2147483649),!_v.getInt8(0)&&_v.getInt8(1)||jp(iv,{setInt8:function(e,t){Ev(this,e,t<<24>>24)},setUint8:function(e,t){Ev(this,e,t<<24>>24)}},{unsafe:!0})}else rv=(nv=function(e){Np(this,rv);var t=Wp(e);ev(this,{bytes:cv(sv(t),0),byteLength:t}),Mp||(this.byteLength=t)}).prototype,iv=(ov=function(e,t,n){Np(this,iv),Np(e,rv);var r=$p(e).byteLength,o=Vp(t);if(o<0||o>r)throw uv("Wrong offset");if(o+(n=void 0===n?r-o:Up(n))>r)throw uv("Wrong length");ev(this,{buffer:e,byteLength:n,byteOffset:o}),Mp||(this.buffer=e,this.byteLength=n,this.byteOffset=o)}).prototype,Mp&&(bv(nv,"byteLength"),bv(ov,"buffer"),bv(ov,"byteLength"),bv(ov,"byteOffset")),jp(iv,{getInt8:function(e){return wv(this,1,e)[0]<<24>>24},getUint8:function(e){return wv(this,1,e)[0]},getInt16:function(e){var t=wv(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=wv(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return gv(wv(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return gv(wv(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return hv(wv(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return hv(wv(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Av(this,1,e,dv,t)},setUint8:function(e,t){Av(this,1,e,dv,t)},setInt16:function(e,t){Av(this,2,e,pv,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Av(this,2,e,pv,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Av(this,4,e,vv,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Av(this,4,e,vv,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Av(this,4,e,mv,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Av(this,8,e,yv,t,arguments.length>2?arguments[2]:void 0)}});Kp(nv,"ArrayBuffer"),Kp(ov,"DataView");var Sv={ArrayBuffer:nv,DataView:ov},kv=tp,Rv=Sv.ArrayBuffer;jo({global:!0,forced:J.ArrayBuffer!==Rv},{ArrayBuffer:Rv}),kv("ArrayBuffer");var Ov,Fv,Mv,Iv=pp,Dv=ee,Lv=J,jv=Me,Bv=De,Nv=Rt,Vv=Qo,Uv=at,Wv=Bn,zv=Nn.exports,Hv=An.f,Gv=Ve,Xv=bf,Qv=zf,Yv=Xt,qv=Dt,Kv=Lv.Int8Array,Jv=Kv&&Kv.prototype,Zv=Lv.Uint8ClampedArray,$v=Zv&&Zv.prototype,eg=Kv&&Xv(Kv),tg=Jv&&Xv(Jv),ng=Object.prototype,rg=Lv.TypeError,og=Yv("toStringTag"),ig=qv("TYPED_ARRAY_TAG"),ag=qv("TYPED_ARRAY_CONSTRUCTOR"),sg=Iv&&!!Qv&&"Opera"!==Vv(Lv.opera),ug=!1,cg={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},lg={BigInt64Array:8,BigUint64Array:8},fg=function(e){if(!Bv(e))return!1;var t=Vv(e);return Nv(cg,t)||Nv(lg,t)};for(Ov in cg)(Mv=(Fv=Lv[Ov])&&Fv.prototype)?Wv(Mv,ag,Fv):sg=!1;for(Ov in lg)(Mv=(Fv=Lv[Ov])&&Fv.prototype)&&Wv(Mv,ag,Fv);if((!sg||!jv(eg)||eg===Function.prototype)&&(eg=function(){throw rg("Incorrect invocation")},sg))for(Ov in cg)Lv[Ov]&&Qv(Lv[Ov],eg);if((!sg||!tg||tg===ng)&&(tg=eg.prototype,sg))for(Ov in cg)Lv[Ov]&&Qv(Lv[Ov].prototype,tg);if(sg&&Xv($v)!==tg&&Qv($v,tg),Dv&&!Nv(tg,og))for(Ov in ug=!0,Hv(tg,og,{get:function(){return Bv(this)?this[ig]:void 0}}),cg)Lv[Ov]&&Wv(Lv[Ov],ig,Ov);var hg={NATIVE_ARRAY_BUFFER_VIEWS:sg,TYPED_ARRAY_CONSTRUCTOR:ag,TYPED_ARRAY_TAG:ug&&ig,aTypedArray:function(e){if(fg(e))return e;throw rg("Target is not a typed array")},aTypedArrayConstructor:function(e){if(jv(e)&&(!Qv||Gv(eg,e)))return e;throw rg(Uv(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(Dv){if(n)for(var o in cg){var i=Lv[o];if(i&&Nv(i.prototype,e))try{delete i.prototype[e]}catch(w1){try{i.prototype[e]=t}catch(a){}}}tg[e]&&!n||zv(tg,e,n?t:sg&&Jv[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(Dv){if(Qv){if(n)for(r in cg)if((o=Lv[r])&&Nv(o,e))try{delete o[e]}catch(w1){}if(eg[e]&&!n)return;try{return zv(eg,e,n?t:sg&&eg[e]||t)}catch(w1){}}for(r in cg)!(o=Lv[r])||o[e]&&!n||zv(o,e,t)}},isView:function(e){if(!Bv(e))return!1;var t=Vv(e);return"DataView"===t||Nv(cg,t)||Nv(lg,t)},isTypedArray:fg,TypedArray:eg,TypedArrayPrototype:tg};jo({target:"ArrayBuffer",stat:!0,forced:!hg.NATIVE_ARRAY_BUFFER_VIEWS},{isView:hg.isView});var dg=ya,pg=at,vg=J.TypeError,gg=function(e){if(dg(e))return e;throw vg(pg(e)+" is not a constructor")},mg=En,yg=gg,bg=Xt("species"),wg=function(e,t){var n,r=mg(e).constructor;return void 0===r||null==(n=mg(r)[bg])?t:yg(n)},Ag=jo,xg=me,Tg=$,Pg=En,Cg=Wr,_g=Gr,Eg=wg,Sg=Sv.ArrayBuffer,kg=Sv.DataView,Rg=kg.prototype,Og=xg(Sg.prototype.slice),Fg=xg(Rg.getUint8),Mg=xg(Rg.setUint8);Ag({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:Tg((function(){return!new Sg(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(Og&&void 0===t)return Og(Pg(this),e);for(var n=Pg(this).byteLength,r=Cg(e,n),o=Cg(void 0===t?n:t,n),i=new(Eg(this,Sg))(_g(o-r)),a=new kg(this),s=new kg(i),u=0;r<o;)Mg(s,u++,Fg(a,r++));return i}});var Ig=Et,Dg=tn;jo({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=Ig(this),n=Dg(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}});var Lg=En,jg=mt,Bg=J.TypeError,Ng=Rt,Vg=Nn.exports,Ug=function(e){if(Lg(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw Bg("Incorrect hint");return jg(this,e)},Wg=Xt("toPrimitive"),zg=Date.prototype;Ng(zg,Wg)||Vg(zg,Wg,Ug);var Hg=Me,Gg=De,Xg=An,Qg=bf,Yg=Xt("hasInstance"),qg=Function.prototype;Yg in qg||Xg.f(qg,Yg,{value:function(e){if(!Hg(this)||!Gg(e))return!1;var t=this.prototype;if(!Gg(t))return e instanceof this;for(;e=Qg(e);)if(t===e)return!0;return!1}});var Kg=ee,Jg=Pr.EXISTS,Zg=me,$g=An.f,em=Function.prototype,tm=Zg(em.toString),nm=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,rm=Zg(nm.exec);Kg&&!Jg&&$g(em,"name",{configurable:!0,get:function(){try{return rm(nm,tm(this))[1]}catch(w1){return""}}}),Zi(J.JSON,"JSON",!0);var om={exports:{}},im=$((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),am=$,sm=De,um=Ae,cm=im,lm=Object.isExtensible,fm=am((function(){lm(1)}))||cm?function(e){return!!sm(e)&&((!cm||"ArrayBuffer"!=um(e))&&(!lm||lm(e)))}:lm,hm=!$((function(){return Object.isExtensible(Object.preventExtensions({}))})),dm=jo,pm=me,vm=tr,gm=De,mm=Rt,ym=An.f,bm=Dr,wm=Ai,Am=fm,xm=hm,Tm=!1,Pm=Dt("meta"),Cm=0,_m=function(e){ym(e,Pm,{value:{objectID:"O"+Cm++,weakData:{}}})},Em=om.exports={enable:function(){Em.enable=function(){},Tm=!0;var e=bm.f,t=pm([].splice),n={};n[Pm]=1,e(n).length&&(bm.f=function(n){for(var r=e(n),o=0,i=r.length;o<i;o++)if(r[o]===Pm){t(r,o,1);break}return r},dm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:wm.f}))},fastKey:function(e,t){if(!gm(e))return"symbol"==S(e)?e:("string"==typeof e?"S":"P")+e;if(!mm(e,Pm)){if(!Am(e))return"F";if(!t)return"E";_m(e)}return e[Pm].objectID},getWeakData:function(e,t){if(!mm(e,Pm)){if(!Am(e))return!0;if(!t)return!1;_m(e)}return e[Pm].weakData},onFreeze:function(e){return xm&&Tm&&Am(e)&&!mm(e,Pm)&&_m(e),e}};vm[Pm]=!0;var Sm=na,km=oe,Rm=En,Om=at,Fm=bl,Mm=Qr,Im=Ve,Dm=Ol,Lm=Pl,jm=hl,Bm=J.TypeError,Nm=function(e,t){this.stopped=e,this.result=t},Vm=Nm.prototype,Um=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=Sm(t,l),v=function(e){return r&&jm(r,"normal",e),new Nm(!0,e)},g=function(e){return f?(Rm(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=Lm(e)))throw Bm(Om(e)+" is not iterable");if(Fm(o)){for(i=0,a=Mm(e);a>i;i++)if((s=g(e[i]))&&Im(Vm,s))return s;return new Nm(!1)}r=Dm(e,o)}for(u=r.next;!(c=km(u,r)).done;){try{s=g(c.value)}catch(w1){jm(r,"throw",w1)}if("object"==S(s)&&s&&Im(Vm,s))return s}return new Nm(!1)},Wm=Me,zm=De,Hm=zf,Gm=function(e,t,n){var r,o;return Hm&&Wm(r=t.constructor)&&r!==n&&zm(o=r.prototype)&&o!==n.prototype&&Hm(e,o),e},Xm=jo,Qm=J,Ym=me,qm=ko,Km=Nn.exports,Jm=om.exports,Zm=Um,$m=bp,ey=Me,ty=De,ny=$,ry=Yl,oy=Zi,iy=Gm,ay=function(e,t,n){var r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=r?"set":"add",a=Qm[e],s=a&&a.prototype,u=a,c={},l=function(e){var t=Ym(s[e]);Km(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!ty(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return o&&!ty(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!ty(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(qm(e,!ey(a)||!(o||s.forEach&&!ny((function(){(new a).entries().next()})))))u=n.getConstructor(t,e,r,i),Jm.enable();else if(qm(e,!0)){var f=new u,h=f[i](o?{}:-0,1)!=f,d=ny((function(){f.has(1)})),p=ry((function(e){new a(e)})),v=!o&&ny((function(){for(var e=new a,t=5;t--;)e[i](t,t);return!e.has(-0)}));p||((u=t((function(e,t){$m(e,s);var n=iy(new a,e,u);return null!=t&&Zm(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,Xm({global:!0,forced:u!=a},c),oy(u,e),o||n.setStrong(u,e,r),u},sy=An.f,uy=wi,cy=gp,ly=na,fy=bp,hy=Um,dy=sh,py=tp,vy=ee,gy=om.exports.fastKey,my=yr.set,yy=yr.getterFor,by={getConstructor:function(e,t,n,r){var o=e((function(e,o){fy(e,i),my(e,{type:t,index:uy(null),first:void 0,last:void 0,size:0}),vy||(e.size=0),null!=o&&hy(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=yy(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=gy(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=s),r&&(r.next=s),vy?i.size++:e.size++,"F"!==o&&(i.index[o]=s)),e},u=function(e,t){var n,r=a(e),o=gy(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return cy(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,vy?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),vy?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=ly(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)}}),cy(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)}}),vy&&sy(i,"size",{get:function(){return a(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=yy(t),i=yy(r);dy(e,t,(function(e,t){my(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),py(t)}};ay("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),by);var wy=Math.log,Ay=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:wy(1+e)},xy=jo,Ty=Ay,Py=Math.acosh,Cy=Math.log,_y=Math.sqrt,Ey=Math.LN2;xy({target:"Math",stat:!0,forced:!Py||710!=Math.floor(Py(Number.MAX_VALUE))||Py(1/0)!=1/0},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Cy(e)+Ey:Ty(e-1+_y(e-1)*_y(e+1))}});var Sy=jo,ky=Math.asinh,Ry=Math.log,Oy=Math.sqrt;Sy({target:"Math",stat:!0,forced:!(ky&&1/ky(0)>0)},{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Ry(t+Oy(t*t+1)):t}});var Fy=jo,My=Math.atanh,Iy=Math.log;Fy({target:"Math",stat:!0,forced:!(My&&1/My(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:Iy((1+e)/(1-e))/2}});var Dy=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1},Ly=jo,jy=Dy,By=Math.abs,Ny=Math.pow;Ly({target:"Math",stat:!0},{cbrt:function(e){return jy(e=+e)*Ny(By(e),1/3)}});var Vy=jo,Uy=Math.floor,Wy=Math.log,zy=Math.LOG2E;Vy({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-Uy(Wy(e+.5)*zy):32}});var Hy=Math.expm1,Gy=Math.exp,Xy=!Hy||Hy(10)>22025.465794806718||Hy(10)<22025.465794806718||-2e-17!=Hy(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Gy(e)-1}:Hy,Qy=jo,Yy=Xy,qy=Math.cosh,Ky=Math.abs,Jy=Math.E;Qy({target:"Math",stat:!0,forced:!qy||qy(710)===1/0},{cosh:function(e){var t=Yy(Ky(e)-1)+1;return(t+1/(t*Jy*Jy))*(Jy/2)}});var Zy=Xy;jo({target:"Math",stat:!0,forced:Zy!=Math.expm1},{expm1:Zy});var $y=Dy,eb=Math.abs,tb=Math.pow,nb=tb(2,-52),rb=tb(2,-23),ob=tb(2,127)*(2-rb),ib=tb(2,-126),ab=Math.fround||function(e){var t,n,r=eb(e),o=$y(e);return r<ib?o*(r/ib/rb+1/nb-1/nb)*ib*rb:(n=(t=(1+rb/nb)*r)-(t-r))>ob||n!=n?o*(1/0):o*n};jo({target:"Math",stat:!0},{fround:ab});var sb=jo,ub=Math.hypot,cb=Math.abs,lb=Math.sqrt;sb({target:"Math",stat:!0,forced:!!ub&&ub(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=cb(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*lb(o)}});var fb=jo,hb=$,db=Math.imul;fb({target:"Math",stat:!0,forced:hb((function(){return-5!=db(4294967295,5)||2!=db.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 pb=Math.log,vb=Math.LOG10E;jo({target:"Math",stat:!0},{log10:Math.log10||function(e){return pb(e)*vb}}),jo({target:"Math",stat:!0},{log1p:Ay});var gb=jo,mb=Math.log,yb=Math.LN2;gb({target:"Math",stat:!0},{log2:function(e){return mb(e)/yb}}),jo({target:"Math",stat:!0},{sign:Dy});var bb=jo,wb=$,Ab=Xy,xb=Math.abs,Tb=Math.exp,Pb=Math.E;bb({target:"Math",stat:!0,forced:wb((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return xb(e=+e)<1?(Ab(e)-Ab(-e))/2:(Tb(e-1)-Tb(-e-1))*(Pb/2)}});var Cb=jo,_b=Xy,Eb=Math.exp;Cb({target:"Math",stat:!0},{tanh:function(e){var t=_b(e=+e),n=_b(-e);return t==1/0?1:n==1/0?-1:(t-n)/(Eb(e)+Eb(-e))}}),Zi(Math,"Math",!0);var Sb=jo,kb=Math.ceil,Rb=Math.floor;Sb({target:"Math",stat:!0},{trunc:function(e){return(e>0?Rb:kb)(e)}});var Ob=me(1..valueOf),Fb="\t\n\v\f\r                 \u2028\u2029\ufeff",Mb=ke,Ib=Ko,Db=me("".replace),Lb="[\t\n\v\f\r                 \u2028\u2029\ufeff]",jb=RegExp("^"+Lb+Lb+"*"),Bb=RegExp(Lb+Lb+"*$"),Nb=function(e){return function(t){var n=Ib(Mb(t));return 1&e&&(n=Db(n,jb,"")),2&e&&(n=Db(n,Bb,"")),n}},Vb={start:Nb(1),end:Nb(2),trim:Nb(3)},Ub=ee,Wb=J,zb=me,Hb=ko,Gb=Nn.exports,Xb=Rt,Qb=Gm,Yb=Ve,qb=ot,Kb=tn,Jb=$,Zb=Dr.f,$b=Z.f,ew=An.f,tw=Ob,nw=Vb.trim,rw=Wb.Number,ow=rw.prototype,iw=Wb.TypeError,aw=zb("".slice),sw=zb("".charCodeAt),uw=function(e){var t=Kb(e,"number");return"bigint"==typeof t?t:cw(t)},cw=function(e){var t,n,r,o,i,a,s,u,c=Kb(e,"number");if(qb(c))throw iw("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=nw(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=aw(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(Hb("Number",!rw(" 0o1")||!rw("0b1")||rw("+0x1"))){for(var lw,fw=function(e){var t=arguments.length<1?0:rw(uw(e)),n=this;return Yb(ow,n)&&Jb((function(){tw(n)}))?Qb(Object(t),n,fw):t},hw=Ub?Zb(rw):"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(","),dw=0;hw.length>dw;dw++)Xb(rw,lw=hw[dw])&&!Xb(fw,lw)&&ew(fw,lw,$b(rw,lw));fw.prototype=ow,ow.constructor=fw,Gb(Wb,"Number",fw)}jo({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)});var pw=J.isFinite,vw=Number.isFinite||function(e){return"number"==typeof e&&pw(e)};jo({target:"Number",stat:!0},{isFinite:vw});var gw=De,mw=Math.floor,yw=Number.isInteger||function(e){return!gw(e)&&isFinite(e)&&mw(e)===e};jo({target:"Number",stat:!0},{isInteger:yw}),jo({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var bw=jo,ww=yw,Aw=Math.abs;bw({target:"Number",stat:!0},{isSafeInteger:function(e){return ww(e)&&Aw(e)<=9007199254740991}}),jo({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991}),jo({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991});var xw=J,Tw=$,Pw=Ko,Cw=Vb.trim,_w=me("".charAt),Ew=xw.parseFloat,Sw=xw.Symbol,kw=Sw&&Sw.iterator,Rw=1/Ew("\t\n\v\f\r                 \u2028\u2029\ufeff-0")!=-1/0||kw&&!Tw((function(){Ew(Object(kw))}))?function(e){var t=Cw(Pw(e)),n=Ew(t);return 0===n&&"-"==_w(t,0)?-0:n}:Ew,Ow=Rw;jo({target:"Number",stat:!0,forced:Number.parseFloat!=Ow},{parseFloat:Ow});var Fw=J,Mw=$,Iw=me,Dw=Ko,Lw=Vb.trim,jw=Fw.parseInt,Bw=Fw.Symbol,Nw=Bw&&Bw.iterator,Vw=/^[+-]?0x/i,Uw=Iw(Vw.exec),Ww=8!==jw("\t\n\v\f\r                 \u2028\u2029\ufeff08")||22!==jw("\t\n\v\f\r                 \u2028\u2029\ufeff0x16")||Nw&&!Mw((function(){jw(Object(Nw))}))?function(e,t){var n=Lw(Dw(e));return jw(n,t>>>0||(Uw(Vw,n)?16:10))}:jw,zw=Ww;jo({target:"Number",stat:!0,forced:Number.parseInt!=zw},{parseInt:zw});var Hw=Br,Gw=Ko,Xw=ke,Qw=J.RangeError,Yw=function(e){var t=Gw(Xw(this)),n="",r=Hw(e);if(r<0||r==1/0)throw Qw("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},qw=jo,Kw=J,Jw=me,Zw=Br,$w=Ob,eA=Yw,tA=$,nA=Kw.RangeError,rA=Kw.String,oA=Math.floor,iA=Jw(eA),aA=Jw("".slice),sA=Jw(1..toFixed),uA=function e(t,n,r){return 0===n?r:n%2==1?e(t,n-1,r*t):e(t*t,n/2,r)},cA=function(e,t,n){for(var r=-1,o=n;++r<6;)o+=t*e[r],e[r]=o%1e7,o=oA(o/1e7)},lA=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=oA(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=rA(e[t]);n=""===n?r:n+iA("0",7-r.length)+r}return n};qw({target:"Number",proto:!0,forced:tA((function(){return"0.000"!==sA(8e-5,3)||"1"!==sA(.9,0)||"1.25"!==sA(1.255,2)||"1000000000000000128"!==sA(0xde0b6b3a7640080,0)}))||!tA((function(){sA({})}))},{toFixed:function(e){var t,n,r,o,i=$w(this),a=Zw(e),s=[0,0,0,0,0,0],u="",c="0";if(a<0||a>20)throw nA("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return rA(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*uA(2,69,1))-69)<0?i*uA(2,-t,1):i/uA(2,t,1),n*=4503599627370496,(t=52-t)>0){for(cA(s,0,n),r=a;r>=7;)cA(s,1e7,0),r-=7;for(cA(s,uA(10,r,1),0),r=t-1;r>=23;)lA(s,1<<23),r-=23;lA(s,1<<r),cA(s,1,1),lA(s,2),c=fA(s)}else cA(s,0,n),cA(s,1<<-t,0),c=fA(s)+iA("0",a);return c=a>0?u+((o=c.length)<=a?"0."+iA("0",a-o)+c:aA(c,0,o-a)+"."+aA(c,o-a)):u+c}});var hA=ee,dA=me,pA=oe,vA=$,gA=ei,mA=uo,yA=ie,bA=Et,wA=Ee,AA=Object.assign,xA=Object.defineProperty,TA=dA([].concat),PA=!AA||vA((function(){if(hA&&1!==AA({b:1},AA(xA({},"a",{enumerable:!0,get:function(){xA(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!=AA({},e)[n]||gA(AA({},t)).join("")!=r}))?function(e,t){for(var n=bA(e),r=arguments.length,o=1,i=mA.f,a=yA.f;r>o;)for(var s,u=wA(arguments[o++]),c=i?TA(gA(u),i(u)):gA(u),l=c.length,f=0;l>f;)s=c[f++],hA&&!pA(a,u,s)||(n[s]=u[s]);return n}:AA,CA=PA;jo({target:"Object",stat:!0,forced:Object.assign!==CA},{assign:CA});var _A=J,EA=Rd,SA=!$((function(){if(!(EA&&EA<535)){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete _A[e]}})),kA=lt,RA=Et,OA=An;ee&&jo({target:"Object",proto:!0,forced:SA},{__defineGetter__:function(e,t){OA.f(RA(this),e,{get:kA(t),enumerable:!0,configurable:!0})}});var FA=jo,MA=ee,IA=Jo.f;FA({target:"Object",stat:!0,forced:Object.defineProperties!==IA,sham:!MA},{defineProperties:IA});var DA=jo,LA=ee,jA=An.f;DA({target:"Object",stat:!0,forced:Object.defineProperty!==jA,sham:!LA},{defineProperty:jA});var BA=lt,NA=Et,VA=An;ee&&jo({target:"Object",proto:!0,forced:SA},{__defineSetter__:function(e,t){VA.f(NA(this),e,{set:BA(t),enumerable:!0,configurable:!0})}});var UA=ee,WA=me,zA=ei,HA=Fe,GA=WA(ie.f),XA=WA([].push),QA=function(e){return function(t){for(var n,r=HA(t),o=zA(r),i=o.length,a=0,s=[];i>a;)n=o[a++],UA&&!GA(r,n)||XA(s,e?[n,r[n]]:r[n]);return s}},YA={entries:QA(!0),values:QA(!1)},qA=YA.entries;jo({target:"Object",stat:!0},{entries:function(e){return qA(e)}});var KA=jo,JA=hm,ZA=$,$A=De,ex=om.exports.onFreeze,tx=Object.freeze;KA({target:"Object",stat:!0,forced:ZA((function(){tx(1)})),sham:!JA},{freeze:function(e){return tx&&$A(e)?tx(ex(e)):e}});var nx=Um,rx=Ci;jo({target:"Object",stat:!0},{fromEntries:function(e){var t={};return nx(e,(function(e,n){rx(t,e,n)}),{AS_ENTRIES:!0}),t}});var ox=jo,ix=$,ax=Fe,sx=Z.f,ux=ee,cx=ix((function(){sx(1)}));ox({target:"Object",stat:!0,forced:!ux||cx,sham:!ux},{getOwnPropertyDescriptor:function(e,t){return sx(ax(e),t)}});var lx=vo,fx=Fe,hx=Z,dx=Ci;jo({target:"Object",stat:!0,sham:!ee},{getOwnPropertyDescriptors:function(e){for(var t,n,r=fx(e),o=hx.f,i=lx(r),a={},s=0;i.length>s;)void 0!==(n=o(r,t=i[s++]))&&dx(a,t,n);return a}});var px=jo,vx=$,gx=Ai.f;px({target:"Object",stat:!0,forced:vx((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:gx});var mx=Et,yx=bf,bx=lf;jo({target:"Object",stat:!0,forced:$((function(){yx(1)})),sham:!bx},{getPrototypeOf:function(e){return yx(mx(e))}});var wx=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};jo({target:"Object",stat:!0},{is:wx});var Ax=fm;jo({target:"Object",stat:!0,forced:Object.isExtensible!==Ax},{isExtensible:Ax});var xx=jo,Tx=$,Px=De,Cx=Ae,_x=im,Ex=Object.isFrozen;xx({target:"Object",stat:!0,forced:Tx((function(){Ex(1)}))||_x},{isFrozen:function(e){return!Px(e)||(!(!_x||"ArrayBuffer"!=Cx(e))||!!Ex&&Ex(e))}});var Sx=jo,kx=$,Rx=De,Ox=Ae,Fx=im,Mx=Object.isSealed;Sx({target:"Object",stat:!0,forced:kx((function(){Mx(1)}))||Fx},{isSealed:function(e){return!Rx(e)||(!(!Fx||"ArrayBuffer"!=Ox(e))||!!Mx&&Mx(e))}});var Ix=Et,Dx=ei;jo({target:"Object",stat:!0,forced:$((function(){Dx(1)}))},{keys:function(e){return Dx(Ix(e))}});var Lx=jo,jx=ee,Bx=SA,Nx=Et,Vx=on,Ux=bf,Wx=Z.f;jx&&Lx({target:"Object",proto:!0,forced:Bx},{__lookupGetter__:function(e){var t,n=Nx(this),r=Vx(e);do{if(t=Wx(n,r))return t.get}while(n=Ux(n))}});var zx=jo,Hx=ee,Gx=SA,Xx=Et,Qx=on,Yx=bf,qx=Z.f;Hx&&zx({target:"Object",proto:!0,forced:Gx},{__lookupSetter__:function(e){var t,n=Xx(this),r=Qx(e);do{if(t=qx(n,r))return t.set}while(n=Yx(n))}});var Kx=jo,Jx=De,Zx=om.exports.onFreeze,$x=hm,eT=$,tT=Object.preventExtensions;Kx({target:"Object",stat:!0,forced:eT((function(){tT(1)})),sham:!$x},{preventExtensions:function(e){return tT&&Jx(e)?tT(Zx(e)):e}});var nT=jo,rT=De,oT=om.exports.onFreeze,iT=hm,aT=$,sT=Object.seal;nT({target:"Object",stat:!0,forced:aT((function(){sT(1)})),sham:!iT},{seal:function(e){return sT&&rT(e)?sT(oT(e)):e}}),jo({target:"Object",stat:!0},{setPrototypeOf:zf});var uT=Qo,cT=No?{}.toString:function(){return"[object "+uT(this)+"]"},lT=No,fT=Nn.exports,hT=cT;lT||fT(Object.prototype,"toString",hT,{unsafe:!0});var dT=YA.values;jo({target:"Object",stat:!0},{values:function(e){return dT(e)}});jo({global:!0,forced:parseFloat!=Rw},{parseFloat:Rw});jo({global:!0,forced:parseInt!=Ww},{parseInt:Ww});var pT,vT,gT,mT,yT=J.TypeError,bT=function(e,t){if(e<t)throw yT("Not enough arguments");return e},wT=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ue),AT=J,xT=iu,TT=na,PT=Me,CT=Rt,_T=$,ET=ui,ST=au,kT=cn,RT=bT,OT=wT,FT=qh,MT=AT.setImmediate,IT=AT.clearImmediate,DT=AT.process,LT=AT.Dispatch,jT=AT.Function,BT=AT.MessageChannel,NT=AT.String,VT=0,UT={};try{pT=AT.location}catch(w1){}var WT=function(e){if(CT(UT,e)){var t=UT[e];delete UT[e],t()}},zT=function(e){return function(){WT(e)}},HT=function(e){WT(e.data)},GT=function(e){AT.postMessage(NT(e),pT.protocol+"//"+pT.host)};MT&&IT||(MT=function(e){RT(arguments.length,1);var t=PT(e)?e:jT(e),n=ST(arguments,1);return UT[++VT]=function(){xT(t,void 0,n)},vT(VT),VT},IT=function(e){delete UT[e]},FT?vT=function(e){DT.nextTick(zT(e))}:LT&&LT.now?vT=function(e){LT.now(zT(e))}:BT&&!OT?(mT=(gT=new BT).port2,gT.port1.onmessage=HT,vT=TT(mT.postMessage,mT)):AT.addEventListener&&PT(AT.postMessage)&&!AT.importScripts&&pT&&"file:"!==pT.protocol&&!_T(GT)?(vT=GT,AT.addEventListener("message",HT,!1)):vT="onreadystatechange"in kT("script")?function(e){ET.appendChild(kT("script")).onreadystatechange=function(){ET.removeChild(this),WT(e)}}:function(e){setTimeout(zT(e),0)});var XT,QT,YT,qT,KT,JT,ZT,$T,eP={set:MT,clear:IT},tP=J,nP=/ipad|iphone|ipod/i.test(Ue)&&void 0!==tP.Pebble,rP=/web0s(?!.*chrome)/i.test(Ue),oP=J,iP=na,aP=Z.f,sP=eP.set,uP=wT,cP=nP,lP=rP,fP=qh,hP=oP.MutationObserver||oP.WebKitMutationObserver,dP=oP.document,pP=oP.process,vP=oP.Promise,gP=aP(oP,"queueMicrotask"),mP=gP&&gP.value;mP||(XT=function(){var e,t;for(fP&&(e=pP.domain)&&e.exit();QT;){t=QT.fn,QT=QT.next;try{t()}catch(w1){throw QT?qT():YT=void 0,w1}}YT=void 0,e&&e.enter()},uP||fP||lP||!hP||!dP?!cP&&vP&&vP.resolve?((ZT=vP.resolve(void 0)).constructor=vP,$T=iP(ZT.then,ZT),qT=function(){$T(XT)}):fP?qT=function(){pP.nextTick(XT)}:(sP=iP(sP,oP),qT=function(){sP(XT)}):(KT=!0,JT=dP.createTextNode(""),new hP(XT).observe(JT,{characterData:!0}),qT=function(){JT.data=KT=!KT}));var yP=mP||function(e){var t={fn:e,next:void 0};YT&&(YT.next=t),QT||(QT=t,qT()),YT=t},bP=J,wP=function(e,t){var n=bP.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},AP=function(e){try{return{error:!1,value:e()}}catch(w1){return{error:!0,value:w1}}},xP=function(){this.head=null,this.tail=null};xP.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 TP=xP,PP=J.Promise,CP="object"==("undefined"==typeof window?"undefined":S(window))&&"object"!=("undefined"==typeof Deno?"undefined":S(Deno)),_P=J,EP=PP,SP=Me,kP=ko,RP=Xn,OP=Xt,FP=CP,MP=Ye;EP&&EP.prototype;var IP=OP("species"),DP=!1,LP=SP(_P.PromiseRejectionEvent),jP=kP("Promise",(function(){var e=RP(EP),t=e!==String(EP);if(!t&&66===MP)return!0;if(MP>=51&&/native code/.test(e))return!1;var n=new EP((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[IP]=r,!(DP=n.then((function(){}))instanceof r)||!t&&FP&&!LP})),BP={CONSTRUCTOR:jP,REJECTION_EVENT:LP,SUBCLASSING:DP},NP={},VP=lt,UP=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=VP(t),this.reject=VP(n)};NP.f=function(e){return new UP(e)};var WP,zP,HP,GP=jo,XP=qh,QP=J,YP=oe,qP=Nn.exports,KP=gp,JP=zf,ZP=Zi,$P=tp,eC=lt,tC=Me,nC=De,rC=bp,oC=wg,iC=eP.set,aC=yP,sC=wP,uC=AP,cC=TP,lC=yr,fC=PP,hC=NP,dC=BP.CONSTRUCTOR,pC=BP.REJECTION_EVENT,vC=BP.SUBCLASSING,gC=lC.getterFor("Promise"),mC=lC.set,yC=fC&&fC.prototype,bC=fC,wC=yC,AC=QP.TypeError,xC=QP.document,TC=QP.process,PC=hC.f,CC=PC,_C=!!(xC&&xC.createEvent&&QP.dispatchEvent),EC=function(e){var t;return!(!nC(e)||!tC(t=e.then))&&t},SC=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&&MC(t),t.rejection=1),!0===s?n=i:(l&&l.enter(),n=s(i),l&&(l.exit(),o=!0)),n===e.promise?c(AC("Promise-chain cycle")):(r=EC(n))?YP(r,n,u,c):u(n)):c(i)}catch(w1){l&&!o&&l.exit(),c(w1)}},kC=function(e,t){e.notified||(e.notified=!0,aC((function(){for(var n,r=e.reactions;n=r.get();)SC(n,e);e.notified=!1,t&&!e.rejection&&OC(e)})))},RC=function(e,t,n){var r,o;_C?((r=xC.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),QP.dispatchEvent(r)):r={promise:t,reason:n},!pC&&(o=QP["on"+e])?o(r):"unhandledrejection"===e&&sC("Unhandled promise rejection",n)},OC=function(e){YP(iC,QP,(function(){var t,n=e.facade,r=e.value;if(FC(e)&&(t=uC((function(){XP?TC.emit("unhandledRejection",r,n):RC("unhandledrejection",n,r)})),e.rejection=XP||FC(e)?2:1,t.error))throw t.value}))},FC=function(e){return 1!==e.rejection&&!e.parent},MC=function(e){YP(iC,QP,(function(){var t=e.facade;XP?TC.emit("rejectionHandled",t):RC("rejectionhandled",t,e.value)}))},IC=function(e,t,n){return function(r){e(t,r,n)}},DC=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,kC(e,!0))},LC=function e(t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===n)throw AC("Promise can't be resolved itself");var o=EC(n);o?aC((function(){var r={done:!1};try{YP(o,n,IC(e,r,t),IC(DC,r,t))}catch(w1){DC(r,w1,t)}})):(t.value=n,t.state=1,kC(t,!1))}catch(w1){DC({done:!1},w1,t)}}};if(dC&&(wC=(bC=function(e){rC(this,wC),eC(e),YP(WP,this);var t=gC(this);try{e(IC(LC,t),IC(DC,t))}catch(w1){DC(t,w1)}}).prototype,(WP=function(e){mC(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new cC,rejection:!1,state:0,value:void 0})}).prototype=KP(wC,{then:function(e,t){var n=gC(this),r=PC(oC(this,bC));return n.parent=!0,r.ok=!tC(e)||e,r.fail=tC(t)&&t,r.domain=XP?TC.domain:void 0,0==n.state?n.reactions.add(r):aC((function(){SC(r,n)})),r.promise}}),zP=function(){var e=new WP,t=gC(e);this.promise=e,this.resolve=IC(LC,t),this.reject=IC(DC,t)},hC.f=PC=function(e){return e===bC||undefined===e?new zP(e):CC(e)},tC(fC)&&yC!==Object.prototype)){HP=yC.then,vC||qP(yC,"then",(function(e,t){var n=this;return new bC((function(e,t){YP(HP,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete yC.constructor}catch(w1){}JP&&JP(yC,wC)}GP({global:!0,wrap:!0,forced:dC},{Promise:bC}),ZP(bC,"Promise",!1),$P("Promise");var jC=PP,BC=BP.CONSTRUCTOR||!Yl((function(e){jC.all(e).then(void 0,(function(){}))})),NC=oe,VC=lt,UC=NP,WC=AP,zC=Um;jo({target:"Promise",stat:!0,forced:BC},{all:function(e){var t=this,n=UC.f(t),r=n.resolve,o=n.reject,i=WC((function(){var n=VC(t.resolve),i=[],a=0,s=1;zC(e,(function(e){var u=a++,c=!1;s++,NC(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 HC=jo,GC=BP.CONSTRUCTOR,XC=PP,QC=Ne,YC=Me,qC=Nn.exports,KC=XC&&XC.prototype;if(HC({target:"Promise",proto:!0,forced:GC,real:!0},{catch:function(e){return this.then(void 0,e)}}),YC(XC)){var JC=QC("Promise").prototype.catch;KC.catch!==JC&&qC(KC,"catch",JC,{unsafe:!0})}var ZC=oe,$C=lt,e_=NP,t_=AP,n_=Um;jo({target:"Promise",stat:!0,forced:BC},{race:function(e){var t=this,n=e_.f(t),r=n.reject,o=t_((function(){var o=$C(t.resolve);n_(e,(function(e){ZC(o,t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var r_=oe,o_=NP;jo({target:"Promise",stat:!0,forced:BP.CONSTRUCTOR},{reject:function(e){var t=o_.f(this);return r_(t.reject,void 0,e),t.promise}});var i_=En,a_=De,s_=NP,u_=function(e,t){if(i_(e),a_(t)&&t.constructor===e)return t;var n=s_.f(e);return(0,n.resolve)(t),n.promise},c_=jo,l_=BP.CONSTRUCTOR,f_=u_;Ne("Promise"),c_({target:"Promise",stat:!0,forced:l_},{resolve:function(e){return f_(this,e)}});var h_=jo,d_=PP,p_=$,v_=Ne,g_=Me,m_=wg,y_=u_,b_=Nn.exports,w_=d_&&d_.prototype;if(h_({target:"Promise",proto:!0,real:!0,forced:!!d_&&p_((function(){w_.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=m_(this,v_("Promise")),n=g_(e);return this.then(n?function(n){return y_(t,e()).then((function(){return n}))}:e,n?function(n){return y_(t,e()).then((function(){throw n}))}:e)}}),g_(d_)){var A_=v_("Promise").prototype.finally;w_.finally!==A_&&b_(w_,"finally",A_,{unsafe:!0})}var x_=iu,T_=lt,P_=En;jo({target:"Reflect",stat:!0,forced:!$((function(){Reflect.apply((function(){}))}))},{apply:function(e,t,n){return x_(T_(e),t,P_(n))}});var C_=me,__=lt,E_=De,S_=Rt,k_=au,R_=te,O_=J.Function,F_=C_([].concat),M_=C_([].join),I_={},D_=function(e,t,n){if(!S_(I_,t)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";I_[t]=O_("C,a","return new C("+M_(r,",")+")")}return I_[t](e,n)},L_=R_?O_.bind:function(e){var t=__(this),n=t.prototype,r=k_(arguments,1),o=function(){var n=F_(r,k_(arguments));return this instanceof o?D_(t,n.length,n):t.apply(e,n)};return E_(n)&&(o.prototype=n),o},j_=jo,B_=iu,N_=L_,V_=gg,U_=En,W_=De,z_=wi,H_=$,G_=Ne("Reflect","construct"),X_=Object.prototype,Q_=[].push,Y_=H_((function(){function e(){}return!(G_((function(){}),[],e)instanceof e)})),q_=!H_((function(){G_((function(){}))})),K_=Y_||q_;j_({target:"Reflect",stat:!0,forced:K_,sham:K_},{construct:function(e,t){V_(e),U_(t);var n=arguments.length<3?e:V_(arguments[2]);if(q_&&!Y_)return G_(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 B_(Q_,r,t),new(B_(N_,e,r))}var o=n.prototype,i=z_(W_(o)?o:X_),a=B_(e,i,t);return W_(a)?a:i}});var J_=ee,Z_=En,$_=on,eE=An;jo({target:"Reflect",stat:!0,forced:$((function(){Reflect.defineProperty(eE.f({},1,{value:1}),1,{value:2})})),sham:!J_},{defineProperty:function(e,t,n){Z_(e);var r=$_(t);Z_(n);try{return eE.f(e,r,n),!0}catch(w1){return!1}}});var tE=jo,nE=En,rE=Z.f;tE({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=rE(nE(e),t);return!(n&&!n.configurable)&&delete e[t]}});var oE=Rt,iE=function(e){return void 0!==e&&(oE(e,"value")||oE(e,"writable"))},aE=oe,sE=De,uE=En,cE=iE,lE=Z,fE=bf;jo({target:"Reflect",stat:!0},{get:function e(t,n){var r,o,i=arguments.length<3?t:arguments[2];return uE(t)===i?t[n]:(r=lE.f(t,n))?cE(r)?r.value:void 0===r.get?void 0:aE(r.get,i):sE(o=fE(t))?e(o,n,i):void 0}});var hE=En,dE=Z;jo({target:"Reflect",stat:!0,sham:!ee},{getOwnPropertyDescriptor:function(e,t){return dE.f(hE(e),t)}});var pE=En,vE=bf;jo({target:"Reflect",stat:!0,sham:!lf},{getPrototypeOf:function(e){return vE(pE(e))}}),jo({target:"Reflect",stat:!0},{has:function(e,t){return t in e}});var gE=En,mE=fm;jo({target:"Reflect",stat:!0},{isExtensible:function(e){return gE(e),mE(e)}}),jo({target:"Reflect",stat:!0},{ownKeys:vo});var yE=Ne,bE=En;jo({target:"Reflect",stat:!0,sham:!hm},{preventExtensions:function(e){bE(e);try{var t=yE("Object","preventExtensions");return t&&t(e),!0}catch(w1){return!1}}});var wE=jo,AE=oe,xE=En,TE=De,PE=iE,CE=An,_E=Z,EE=bf,SE=fe;var kE=$((function(){var e=function(){},t=CE.f(new e,"a",{configurable:!0});return!1!==Reflect.set(e.prototype,"a",1,t)}));wE({target:"Reflect",stat:!0,forced:kE},{set:function e(t,n,r){var o,i,a,s=arguments.length<4?t:arguments[3],u=_E.f(xE(t),n);if(!u){if(TE(i=EE(t)))return e(i,n,r,s);u=SE(0)}if(PE(u)){if(!1===u.writable||!TE(s))return!1;if(o=_E.f(s,n)){if(o.get||o.set||!1===o.writable)return!1;o.value=r,CE.f(s,n,o)}else CE.f(s,n,SE(0,r))}else{if(void 0===(a=u.set))return!1;AE(a,s,r)}return!0}});var RE=En,OE=Nf,FE=zf;FE&&jo({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){RE(e),OE(t);try{return FE(e,t),!0}catch(w1){return!1}}});var ME=De,IE=Ae,DE=Xt("match"),LE=function(e){var t;return ME(e)&&(void 0!==(t=e[DE])?!!t:"RegExp"==IE(e))},jE=En,BE=function(){var e=jE(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},NE=oe,VE=Rt,UE=Ve,WE=BE,zE=RegExp.prototype,HE=function(e){var t=e.flags;return void 0!==t||"flags"in zE||VE(e,"flags")||!UE(zE,e)?t:NE(WE,e)},GE=$,XE=J.RegExp,QE=GE((function(){var e=XE("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),YE=QE||GE((function(){return!XE("a","y").sticky})),qE={BROKEN_CARET:QE||GE((function(){var e=XE("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:YE,UNSUPPORTED_Y:QE},KE=An.f,JE=$,ZE=J.RegExp,$E=JE((function(){var e=ZE(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),eS=$,tS=J.RegExp,nS=eS((function(){var e=tS("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),rS=ee,oS=J,iS=me,aS=ko,sS=Gm,uS=Bn,cS=Dr.f,lS=Ve,fS=LE,hS=Ko,dS=HE,pS=qE,vS=function(e,t,n){n in e||KE(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},gS=Nn.exports,mS=$,yS=Rt,bS=yr.enforce,wS=tp,AS=$E,xS=nS,TS=Xt("match"),PS=oS.RegExp,CS=PS.prototype,_S=oS.SyntaxError,ES=iS(CS.exec),SS=iS("".charAt),kS=iS("".replace),RS=iS("".indexOf),OS=iS("".slice),FS=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,MS=/a/g,IS=/a/g,DS=new PS(MS)!==MS,LS=pS.MISSED_STICKY,jS=pS.UNSUPPORTED_Y,BS=rS&&(!DS||LS||AS||xS||mS((function(){return IS[TS]=!1,PS(MS)!=MS||PS(IS)==IS||"/a/i"!=PS(MS,"i")})));if(aS("RegExp",BS)){for(var NS=function(e,t){var n,r,o,i,a,s,u=lS(CS,this),c=fS(e),l=void 0===t,f=[],h=e;if(!u&&c&&l&&e.constructor===NS)return e;if((c||lS(CS,e))&&(e=e.source,l&&(t=dS(h))),e=void 0===e?"":hS(e),t=void 0===t?"":hS(t),h=e,AS&&"dotAll"in MS&&(r=!!t&&RS(t,"s")>-1)&&(t=kS(t,/s/g,"")),n=t,LS&&"sticky"in MS&&(o=!!t&&RS(t,"y")>-1)&&jS&&(t=kS(t,/y/g,"")),xS&&(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=SS(e,r)))t+=SS(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:ES(FS,OS(e,r+1))&&(r+=2,u=!0),o+=t,c++;continue;case">"===t&&u:if(""===l||yS(a,l))throw new _S("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=sS(PS(e,t),u?this:CS,NS),(r||o||f.length)&&(s=bS(a),r&&(s.dotAll=!0,s.raw=NS(function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=SS(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+SS(e,++r);return o}(e),n)),o&&(s.sticky=!0),f.length&&(s.groups=f)),e!==h)try{uS(a,"source",""===h?"(?:)":h)}catch(w1){}return a},VS=cS(PS),US=0;VS.length>US;)vS(NS,PS,VS[US++]);CS.constructor=NS,NS.prototype=CS,gS(oS,"RegExp",NS)}wS("RegExp");var WS=oe,zS=me,HS=Ko,GS=BE,XS=qE,QS=yt.exports,YS=wi,qS=yr.get,KS=$E,JS=nS,ZS=QS("native-string-replace",String.prototype.replace),$S=RegExp.prototype.exec,ek=$S,tk=zS("".charAt),nk=zS("".indexOf),rk=zS("".replace),ok=zS("".slice),ik=function(){var e=/a/,t=/b*/g;return WS($S,e,"a"),WS($S,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),ak=XS.BROKEN_CARET,sk=void 0!==/()??/.exec("")[1];(ik||sk||ak||KS||JS)&&(ek=function(e){var t,n,r,o,i,a,s,u=this,c=qS(u),l=HS(e),f=c.raw;if(f)return f.lastIndex=u.lastIndex,t=WS(ek,f,l),u.lastIndex=f.lastIndex,t;var h=c.groups,d=ak&&u.sticky,p=WS(GS,u),v=u.source,g=0,m=l;if(d&&(p=rk(p,"y",""),-1===nk(p,"g")&&(p+="g"),m=ok(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==tk(l,u.lastIndex-1))&&(v="(?: "+v+")",m=" "+m,g++),n=new RegExp("^(?:"+v+")",p)),sk&&(n=new RegExp("^"+v+"$(?!\\s)",p)),ik&&(r=u.lastIndex),o=WS($S,d?n:u,m),d?o?(o.input=ok(o.input,g),o[0]=ok(o[0],g),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:ik&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),sk&&o&&o.length>1&&WS(ZS,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=YS(null),i=0;i<h.length;i++)a[(s=h[i])[0]]=o[s[1]];return o});var uk=ek;jo({target:"RegExp",proto:!0,forced:/./.exec!==uk},{exec:uk});var ck=ee,lk=An,fk=BE,hk=$,dk=RegExp.prototype;ck&&hk((function(){return"sy"!==Object.getOwnPropertyDescriptor(dk,"flags").get.call({dotAll:!0,sticky:!0})}))&&lk.f(dk,"flags",{configurable:!0,get:fk});var pk=Pr.PROPER,vk=Nn.exports,gk=En,mk=Ko,yk=$,bk=HE,wk=RegExp.prototype.toString,Ak=yk((function(){return"/a/b"!=wk.call({source:"a",flags:"b"})})),xk=pk&&"toString"!=wk.name;(Ak||xk)&&vk(RegExp.prototype,"toString",(function(){var e=gk(this);return"/"+mk(e.source)+"/"+mk(bk(e))}),{unsafe:!0}),ay("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),by);var Tk=me,Pk=Br,Ck=Ko,_k=ke,Ek=Tk("".charAt),Sk=Tk("".charCodeAt),kk=Tk("".slice),Rk=function(e){return function(t,n){var r,o,i=Ck(_k(t)),a=Pk(n),s=i.length;return a<0||a>=s?e?"":void 0:(r=Sk(i,a))<55296||r>56319||a+1===s||(o=Sk(i,a+1))<56320||o>57343?e?Ek(i,a):r:e?kk(i,a,a+2):o-56320+(r-55296<<10)+65536}},Ok={codeAt:Rk(!1),charAt:Rk(!0)},Fk=Ok.codeAt;jo({target:"String",proto:!0},{codePointAt:function(e){return Fk(this,e)}});var Mk,Ik=LE,Dk=J.TypeError,Lk=function(e){if(Ik(e))throw Dk("The method doesn't accept regular expressions");return e},jk=Xt("match"),Bk=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[jk]=!1,"/./"[e](t)}catch(r){}}return!1},Nk=jo,Vk=me,Uk=Z.f,Wk=Gr,zk=Ko,Hk=Lk,Gk=ke,Xk=Bk,Qk=Vk("".endsWith),Yk=Vk("".slice),qk=Math.min,Kk=Xk("endsWith");Nk({target:"String",proto:!0,forced:!!(Kk||(Mk=Uk(String.prototype,"endsWith"),!Mk||Mk.writable))&&!Kk},{endsWith:function(e){var t=zk(Gk(this));Hk(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=void 0===n?r:qk(Wk(n),r),i=zk(e);return Qk?Qk(t,i,o):Yk(t,o-i.length,o)===i}});var Jk=jo,Zk=me,$k=Wr,eR=J.RangeError,tR=String.fromCharCode,nR=String.fromCodePoint,rR=Zk([].join);Jk({target:"String",stat:!0,forced:!!nR&&1!=nR.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],$k(t,1114111)!==t)throw eR(t+" is not a valid code point");n[o]=t<65536?tR(t):tR(55296+((t-=65536)>>10),t%1024+56320)}return rR(n,"")}});var oR=jo,iR=Lk,aR=ke,sR=Ko,uR=Bk,cR=me("".indexOf);oR({target:"String",proto:!0,forced:!uR("includes")},{includes:function(e){return!!~cR(sR(aR(this)),sR(iR(e)),arguments.length>1?arguments[1]:void 0)}});var lR=Ok.charAt,fR=Ko,hR=yr,dR=sh,pR=hR.set,vR=hR.getterFor("String Iterator");dR(String,"String",(function(e){pR(this,{type:"String Iterator",string:fR(e),index:0})}),(function(){var e,t=vR(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 gR=me,mR=Nn.exports,yR=uk,bR=$,wR=Xt,AR=Bn,xR=wR("species"),TR=RegExp.prototype,PR=function(e,t,n,r){var o=wR(e),i=!bR((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!bR((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[xR]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!a||n){var s=gR(/./[o]),u=t(o,""[e],(function(e,t,n,r,o){var a=gR(e),u=t.exec;return u===yR||u===TR.exec?i&&!o?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}}));mR(String.prototype,e,u[0]),mR(TR,o,u[1])}r&&AR(TR[o],"sham",!0)},CR=Ok.charAt,_R=function(e,t,n){return t+(n?CR(e,t).length:1)},ER=oe,SR=En,kR=Me,RR=Ae,OR=uk,FR=J.TypeError,MR=function(e,t){var n=e.exec;if(kR(n)){var r=ER(n,e,t);return null!==r&&SR(r),r}if("RegExp"===RR(e))return ER(OR,e,t);throw FR("RegExp#exec called on incompatible receiver")},IR=oe,DR=En,LR=Gr,jR=Ko,BR=ke,NR=ht,VR=_R,UR=MR;PR("match",(function(e,t,n){return[function(t){var n=BR(this),r=null==t?void 0:NR(t,e);return r?IR(r,t,n):new RegExp(t)[e](jR(n))},function(e){var r=DR(this),o=jR(e),i=n(t,r,o);if(i.done)return i.value;if(!r.global)return UR(r,o);var a=r.unicode;r.lastIndex=0;for(var s,u=[],c=0;null!==(s=UR(r,o));){var l=jR(s[0]);u[c]=l,""===l&&(r.lastIndex=VR(o,LR(r.lastIndex),a)),c++}return 0===c?null:u}]}));var WR=me,zR=Gr,HR=Ko,GR=ke,XR=WR(Yw),QR=WR("".slice),YR=Math.ceil,qR=function(e){return function(t,n,r){var o,i,a=HR(GR(t)),s=zR(n),u=a.length,c=void 0===r?" ":HR(r);return s<=u||""==c?a:((i=XR(c,YR((o=s-u)/c.length))).length>o&&(i=QR(i,0,o)),e?a+i:i+a)}},KR={start:qR(!1),end:qR(!0)},JR=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(Ue),ZR=KR.end;jo({target:"String",proto:!0,forced:JR},{padEnd:function(e){return ZR(this,e,arguments.length>1?arguments[1]:void 0)}});var $R=KR.start;jo({target:"String",proto:!0,forced:JR},{padStart:function(e){return $R(this,e,arguments.length>1?arguments[1]:void 0)}});var eO=jo,tO=me,nO=Fe,rO=Et,oO=Ko,iO=Qr,aO=tO([].push),sO=tO([].join);eO({target:"String",stat:!0},{raw:function(e){for(var t=nO(rO(e).raw),n=iO(t),r=arguments.length,o=[],i=0;n>i;){if(aO(o,oO(t[i++])),i===n)return sO(o,"");i<r&&aO(o,oO(arguments[i]))}}}),jo({target:"String",proto:!0},{repeat:Yw});var uO=me,cO=Et,lO=Math.floor,fO=uO("".charAt),hO=uO("".replace),dO=uO("".slice),pO=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,vO=/\$([$&'`]|\d{1,2})/g,gO=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,u=vO;return void 0!==o&&(o=cO(o),u=pO),hO(i,u,(function(i,u){var c;switch(fO(u,0)){case"$":return"$";case"&":return e;case"`":return dO(t,0,n);case"'":return dO(t,a);case"<":c=o[dO(u,1,-1)];break;default:var l=+u;if(0===l)return i;if(l>s){var f=lO(l/10);return 0===f?i:f<=s?void 0===r[f-1]?fO(u,1):r[f-1]+fO(u,1):i}c=r[l-1]}return void 0===c?"":c}))},mO=iu,yO=oe,bO=me,wO=PR,AO=$,xO=En,TO=Me,PO=Br,CO=Gr,_O=Ko,EO=ke,SO=_R,kO=ht,RO=gO,OO=MR,FO=Xt("replace"),MO=Math.max,IO=Math.min,DO=bO([].concat),LO=bO([].push),jO=bO("".indexOf),BO=bO("".slice),NO="$0"==="a".replace(/./,"$0"),VO=!!/./[FO]&&""===/./[FO]("a","$0");wO("replace",(function(e,t,n){var r=VO?"$":"$0";return[function(e,n){var r=EO(this),o=null==e?void 0:kO(e,FO);return o?yO(o,e,r,n):yO(t,_O(r),e,n)},function(e,o){var i=xO(this),a=_O(e);if("string"==typeof o&&-1===jO(o,r)&&-1===jO(o,"$<")){var s=n(t,i,a,o);if(s.done)return s.value}var u=TO(o);u||(o=_O(o));var c=i.global;if(c){var l=i.unicode;i.lastIndex=0}for(var f=[];;){var h=OO(i,a);if(null===h)break;if(LO(f,h),!c)break;""===_O(h[0])&&(i.lastIndex=SO(a,CO(i.lastIndex),l))}for(var d,p="",v=0,g=0;g<f.length;g++){for(var m=_O((h=f[g])[0]),y=MO(IO(PO(h.index),a.length),0),b=[],w=1;w<h.length;w++)LO(b,void 0===(d=h[w])?d:String(d));var A=h.groups;if(u){var x=DO([m],b,y,a);void 0!==A&&LO(x,A);var T=_O(mO(o,void 0,x))}else T=RO(m,a,y,b,A,o);y>=v&&(p+=BO(a,v,y)+T,v=y+m.length)}return p+BO(a,v)}]}),!!AO((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!NO||VO);var UO=oe,WO=En,zO=ke,HO=wx,GO=Ko,XO=ht,QO=MR;PR("search",(function(e,t,n){return[function(t){var n=zO(this),r=null==t?void 0:XO(t,e);return r?UO(r,t,n):new RegExp(t)[e](GO(n))},function(e){var r=WO(this),o=GO(e),i=n(t,r,o);if(i.done)return i.value;var a=r.lastIndex;HO(a,0)||(r.lastIndex=0);var s=QO(r,o);return HO(r.lastIndex,a)||(r.lastIndex=a),null===s?-1:s.index}]}));var YO=iu,qO=oe,KO=me,JO=PR,ZO=LE,$O=En,eF=ke,tF=wg,nF=_R,rF=Gr,oF=Ko,iF=ht,aF=Oi,sF=MR,uF=uk,cF=$,lF=qE.UNSUPPORTED_Y,fF=Math.min,hF=[].push,dF=KO(/./.exec),pF=KO(hF),vF=KO("".slice);JO("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?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!ZO(e))return qO(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=qO(uF,f,r))&&!((a=f.lastIndex)>l&&(pF(u,vF(r,l,i.index)),i.length>1&&i.index<r.length&&YO(hF,u,aF(i,1)),s=i[0].length,l=a,u.length>=o));)f.lastIndex===i.index&&f.lastIndex++;return l===r.length?!s&&dF(f,"")||pF(u,""):pF(u,vF(r,l)),u.length>o?aF(u,0,o):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:qO(t,this,e,n)}:t,[function(t,n){var o=eF(this),i=null==t?void 0:iF(t,e);return i?qO(i,t,o,n):qO(r,oF(o),t,n)},function(e,o){var i=$O(this),a=oF(e),s=n(r,i,a,o,r!==t);if(s.done)return s.value;var u=tF(i,RegExp),c=i.unicode,l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(lF?"g":"y"),f=new u(lF?"^(?:"+i.source+")":i,l),h=void 0===o?4294967295:o>>>0;if(0===h)return[];if(0===a.length)return null===sF(f,a)?[a]:[];for(var d=0,p=0,v=[];p<a.length;){f.lastIndex=lF?0:p;var g,m=sF(f,lF?vF(a,p):a);if(null===m||(g=fF(rF(f.lastIndex+(lF?p:0)),a.length))===d)p=nF(a,p,c);else{if(pF(v,vF(a,d,p)),v.length===h)return v;for(var y=1;y<=m.length-1;y++)if(pF(v,m[y]),v.length===h)return v;p=d=g}}return pF(v,vF(a,d)),v}]}),!!cF((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]})),lF);var gF=jo,mF=me,yF=Z.f,bF=Gr,wF=Ko,AF=Lk,xF=ke,TF=Bk,PF=mF("".startsWith),CF=mF("".slice),_F=Math.min,EF=TF("startsWith"),SF=!EF&&!!function(){var e=yF(String.prototype,"startsWith");return e&&!e.writable}();gF({target:"String",proto:!0,forced:!SF&&!EF},{startsWith:function(e){var t=wF(xF(this));AF(e);var n=bF(_F(arguments.length>1?arguments[1]:void 0,t.length)),r=wF(e);return PF?PF(t,r,n):CF(t,n,n+r.length)===r}});var kF=Pr.PROPER,RF=$,OF=Fb,FF=function(e){return RF((function(){return!!OF[e]()||"​…᠎"!=="​…᠎"[e]()||kF&&OF[e].name!==e}))},MF=Vb.trim;jo({target:"String",proto:!0,forced:FF("trim")},{trim:function(){return MF(this)}});var IF=Vb.end,DF=FF("trimEnd")?function(){return IF(this)}:"".trimEnd;jo({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==DF},{trimRight:DF});jo({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==DF},{trimEnd:DF});var LF=Vb.start,jF=FF("trimStart")?function(){return LF(this)}:"".trimStart;jo({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==jF},{trimLeft:jF});jo({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==jF},{trimStart:jF});var BF=ke,NF=Ko,VF=/"/g,UF=me("".replace),WF=function(e,t,n,r){var o=NF(BF(e)),i="<"+t;return""!==n&&(i+=" "+n+'="'+UF(NF(r),VF,"&quot;")+'"'),i+">"+o+"</"+t+">"},zF=$,HF=function(e){return zF((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))},GF=WF;jo({target:"String",proto:!0,forced:HF("anchor")},{anchor:function(e){return GF(this,"a","name",e)}});var XF=WF;jo({target:"String",proto:!0,forced:HF("big")},{big:function(){return XF(this,"big","","")}});var QF=WF;jo({target:"String",proto:!0,forced:HF("blink")},{blink:function(){return QF(this,"blink","","")}});var YF=WF;jo({target:"String",proto:!0,forced:HF("bold")},{bold:function(){return YF(this,"b","","")}});var qF=WF;jo({target:"String",proto:!0,forced:HF("fixed")},{fixed:function(){return qF(this,"tt","","")}});var KF=WF;jo({target:"String",proto:!0,forced:HF("fontcolor")},{fontcolor:function(e){return KF(this,"font","color",e)}});var JF=WF;jo({target:"String",proto:!0,forced:HF("fontsize")},{fontsize:function(e){return JF(this,"font","size",e)}});var ZF=WF;jo({target:"String",proto:!0,forced:HF("italics")},{italics:function(){return ZF(this,"i","","")}});var $F=WF;jo({target:"String",proto:!0,forced:HF("link")},{link:function(e){return $F(this,"a","href",e)}});var eM=WF;jo({target:"String",proto:!0,forced:HF("small")},{small:function(){return eM(this,"small","","")}});var tM=WF;jo({target:"String",proto:!0,forced:HF("strike")},{strike:function(){return tM(this,"strike","","")}});var nM=WF;jo({target:"String",proto:!0,forced:HF("sub")},{sub:function(){return nM(this,"sub","","")}});var rM=WF;jo({target:"String",proto:!0,forced:HF("sup")},{sup:function(){return rM(this,"sup","","")}});var oM={exports:{}},iM=J,aM=$,sM=Yl,uM=hg.NATIVE_ARRAY_BUFFER_VIEWS,cM=iM.ArrayBuffer,lM=iM.Int8Array,fM=!uM||!aM((function(){lM(1)}))||!aM((function(){new lM(-1)}))||!sM((function(e){new lM,new lM(null),new lM(1.5),new lM(e)}),!0)||aM((function(){return 1!==new lM(new cM(2),1,void 0).length})),hM=Br,dM=J.RangeError,pM=function(e){var t=hM(e);if(t<0)throw dM("The argument can't be less than 0");return t},vM=J.RangeError,gM=function(e,t){var n=pM(e);if(n%t)throw vM("Wrong offset");return n},mM=na,yM=oe,bM=gg,wM=Et,AM=Qr,xM=Ol,TM=Pl,PM=bl,CM=hg.aTypedArrayConstructor,_M=function(e){var t,n,r,o,i,a,s=bM(this),u=wM(e),c=arguments.length,l=c>1?arguments[1]:void 0,f=void 0!==l,h=TM(u);if(h&&!PM(h))for(a=(i=xM(u,h)).next,u=[];!(o=yM(a,i)).done;)u.push(o.value);for(f&&c>2&&(l=mM(l,arguments[2])),n=AM(u),r=new(CM(s))(n),t=0;n>t;t++)r[t]=f?l(u[t],t):u[t];return r},EM=jo,SM=J,kM=oe,RM=ee,OM=fM,FM=hg,MM=Sv,IM=bp,DM=fe,LM=Bn,jM=yw,BM=Gr,NM=Tp,VM=gM,UM=on,WM=Rt,zM=Qo,HM=De,GM=ot,XM=wi,QM=Ve,YM=zf,qM=Dr.f,KM=_M,JM=Ia.forEach,ZM=tp,$M=An,eI=Z,tI=Gm,nI=yr.get,rI=yr.set,oI=$M.f,iI=eI.f,aI=Math.round,sI=SM.RangeError,uI=MM.ArrayBuffer,cI=uI.prototype,lI=MM.DataView,fI=FM.NATIVE_ARRAY_BUFFER_VIEWS,hI=FM.TYPED_ARRAY_CONSTRUCTOR,dI=FM.TYPED_ARRAY_TAG,pI=FM.TypedArray,vI=FM.TypedArrayPrototype,gI=FM.aTypedArrayConstructor,mI=FM.isTypedArray,yI=function(e,t){gI(e);for(var n=0,r=t.length,o=new e(r);r>n;)o[n]=t[n++];return o},bI=function(e,t){oI(e,t,{get:function(){return nI(this)[t]}})},wI=function(e){var t;return QM(cI,e)||"ArrayBuffer"==(t=zM(e))||"SharedArrayBuffer"==t},AI=function(e,t){return mI(e)&&!GM(t)&&t in e&&jM(+t)&&t>=0},xI=function(e,t){return t=UM(t),AI(e,t)?DM(2,e[t]):iI(e,t)},TI=function(e,t,n){return t=UM(t),!(AI(e,t)&&HM(n)&&WM(n,"value"))||WM(n,"get")||WM(n,"set")||n.configurable||WM(n,"writable")&&!n.writable||WM(n,"enumerable")&&!n.enumerable?oI(e,t,n):(e[t]=n.value,e)};RM?(fI||(eI.f=xI,$M.f=TI,bI(vI,"buffer"),bI(vI,"byteOffset"),bI(vI,"byteLength"),bI(vI,"length")),EM({target:"Object",stat:!0,forced:!fI},{getOwnPropertyDescriptor:xI,defineProperty:TI}),oM.exports=function(e,t,n){var r=e.match(/\d+$/)[0]/8,o=e+(n?"Clamped":"")+"Array",i="get"+e,a="set"+e,s=SM[o],u=s,c=u&&u.prototype,l={},f=function(e,t){oI(e,t,{get:function(){return function(e,t){var n=nI(e);return n.view[i](t*r+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var i=nI(e);n&&(o=(o=aI(o))<0?0:o>255?255:255&o),i.view[a](t*r+i.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};fI?OM&&(u=t((function(e,t,n,o){return IM(e,c),tI(HM(t)?wI(t)?void 0!==o?new s(t,VM(n,r),o):void 0!==n?new s(t,VM(n,r)):new s(t):mI(t)?yI(u,t):kM(KM,u,t):new s(NM(t)),e,u)})),YM&&YM(u,pI),JM(qM(s),(function(e){e in u||LM(u,e,s[e])})),u.prototype=c):(u=t((function(e,t,n,o){IM(e,c);var i,a,s,l=0,h=0;if(HM(t)){if(!wI(t))return mI(t)?yI(u,t):kM(KM,u,t);i=t,h=VM(n,r);var d=t.byteLength;if(void 0===o){if(d%r)throw sI("Wrong length");if((a=d-h)<0)throw sI("Wrong length")}else if((a=BM(o)*r)+h>d)throw sI("Wrong length");s=a/r}else s=NM(t),i=new uI(a=s*r);for(rI(e,{buffer:i,byteOffset:h,byteLength:a,length:s,view:new lI(i)});l<s;)f(e,l++)})),YM&&YM(u,pI),c=u.prototype=XM(vI)),c.constructor!==u&&LM(c,"constructor",u),LM(c,hI,u),dI&&LM(c,dI,o),l[o]=u,EM({global:!0,forced:u!=s,sham:!fI},l),"BYTES_PER_ELEMENT"in u||LM(u,"BYTES_PER_ELEMENT",r),"BYTES_PER_ELEMENT"in c||LM(c,"BYTES_PER_ELEMENT",r),ZM(o)}):oM.exports=function(){},(0,oM.exports)("Float32",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Float64",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Int8",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Int16",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Int32",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0),(0,oM.exports)("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}})),(0,oM.exports)("Uint32",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var PI=hg,CI=me(Ec),_I=PI.aTypedArray;(0,PI.exportTypedArrayMethod)("copyWithin",(function(e,t){return CI(_I(this),e,t,arguments.length>2?arguments[2]:void 0)}));var EI=Ia.every,SI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("every",(function(e){return EI(SI(this),e,arguments.length>1?arguments[1]:void 0)}));var kI=oe,RI=jc,OI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("fill",(function(e){var t=arguments.length;return kI(RI,OI(this),e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}));var FI=Qr,MI=wg,II=hg.TYPED_ARRAY_CONSTRUCTOR,DI=hg.aTypedArrayConstructor,LI=function(e){return DI(MI(e,e[II]))},jI=function(e,t){for(var n=0,r=FI(t),o=new e(r);r>n;)o[n]=t[n++];return o},BI=LI,NI=Ia.filter,VI=function(e,t){return jI(BI(e),t)},UI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("filter",(function(e){var t=NI(UI(this),e,arguments.length>1?arguments[1]:void 0);return VI(this,t)}));var WI=Ia.find,zI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("find",(function(e){return WI(zI(this),e,arguments.length>1?arguments[1]:void 0)}));var HI=Ia.findIndex,GI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("findIndex",(function(e){return HI(GI(this),e,arguments.length>1?arguments[1]:void 0)}));var XI=Ia.forEach,QI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("forEach",(function(e){XI(QI(this),e,arguments.length>1?arguments[1]:void 0)})),(0,hg.exportTypedArrayStaticMethod)("from",_M,fM);var YI=Zr.includes,qI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("includes",(function(e){return YI(qI(this),e,arguments.length>1?arguments[1]:void 0)}));var KI=Zr.indexOf,JI=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("indexOf",(function(e){return KI(JI(this),e,arguments.length>1?arguments[1]:void 0)}));var ZI=J,$I=$,eD=me,tD=hg,nD=mh,rD=Xt("iterator"),oD=ZI.Uint8Array,iD=eD(nD.values),aD=eD(nD.keys),sD=eD(nD.entries),uD=tD.aTypedArray,cD=tD.exportTypedArrayMethod,lD=oD&&oD.prototype,fD=!$I((function(){lD[rD].call([1])})),hD=!!lD&&lD.values&&lD[rD]===lD.values&&"values"===lD.values.name,dD=function(){return iD(uD(this))};cD("entries",(function(){return sD(uD(this))}),fD),cD("keys",(function(){return aD(uD(this))}),fD),cD("values",dD,fD||!hD,{name:"values"}),cD(rD,dD,fD||!hD,{name:"values"});var pD=hg.aTypedArray,vD=hg.exportTypedArrayMethod,gD=me([].join);vD("join",(function(e){return gD(pD(this),e)}));var mD=iu,yD=Dh,bD=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return mD(yD,bD(this),t>1?[e,arguments[1]]:[e])}));var wD=Ia.map,AD=LI,xD=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("map",(function(e){return wD(xD(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(AD(e))(t)}))}));var TD=hg.aTypedArrayConstructor;(0,hg.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(TD(this))(t);t>e;)n[e]=arguments[e++];return n}),fM);var PD=Yh.left,CD=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return PD(CD(this),e,t,t>1?arguments[1]:void 0)}));var _D=Yh.right,ED=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return _D(ED(this),e,t,t>1?arguments[1]:void 0)}));var SD=hg.aTypedArray,kD=hg.exportTypedArrayMethod,RD=Math.floor;kD("reverse",(function(){for(var e,t=this,n=SD(t).length,r=RD(n/2),o=0;o<r;)e=t[o],t[o++]=t[--n],t[n]=e;return t}));var OD=J,FD=oe,MD=hg,ID=Qr,DD=gM,LD=Et,jD=$,BD=OD.RangeError,ND=OD.Int8Array,VD=ND&&ND.prototype,UD=VD&&VD.set,WD=MD.aTypedArray,zD=MD.exportTypedArrayMethod,HD=!jD((function(){var e=new Uint8ClampedArray(2);return FD(UD,e,{length:1,0:3},1),3!==e[1]})),GD=HD&&MD.NATIVE_ARRAY_BUFFER_VIEWS&&jD((function(){var e=new ND(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));zD("set",(function(e){WD(this);var t=DD(arguments.length>1?arguments[1]:void 0,1),n=LD(e);if(HD)return FD(UD,this,n,t);var r=this.length,o=ID(n),i=0;if(o+t>r)throw BD("Wrong length");for(;i<o;)this[t+i]=n[i++]}),!HD||GD);var XD=LI,QD=au,YD=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("slice",(function(e,t){for(var n=QD(YD(this),e,t),r=XD(this),o=0,i=n.length,a=new r(i);i>o;)a[o]=n[o++];return a}),$((function(){new Int8Array(1).slice()})));var qD=Ia.some,KD=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("some",(function(e){return qD(KD(this),e,arguments.length>1?arguments[1]:void 0)}));var JD=me,ZD=$,$D=lt,eL=Cd,tL=Ed,nL=Sd,rL=Ye,oL=Rd,iL=hg.aTypedArray,aL=hg.exportTypedArrayMethod,sL=J.Uint16Array,uL=sL&&JD(sL.prototype.sort),cL=!(!uL||ZD((function(){uL(new sL(2),null)}))&&ZD((function(){uL(new sL(2),{})}))),lL=!!uL&&!ZD((function(){if(rL)return rL<74;if(tL)return tL<67;if(nL)return!0;if(oL)return oL<602;var e,t,n=new sL(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(uL(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));aL("sort",(function(e){return void 0!==e&&$D(e),lL?uL(this,e):eL(iL(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))}),!lL||cL);var fL=Gr,hL=Wr,dL=LI,pL=hg.aTypedArray;(0,hg.exportTypedArrayMethod)("subarray",(function(e,t){var n=pL(this),r=n.length,o=hL(e,r);return new(dL(n))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,fL((void 0===t?r:hL(t,r))-o))}));var vL=iu,gL=hg,mL=$,yL=au,bL=J.Int8Array,wL=gL.aTypedArray,AL=gL.exportTypedArrayMethod,xL=[].toLocaleString,TL=!!bL&&mL((function(){xL.call(new bL(1))}));AL("toLocaleString",(function(){return vL(xL,TL?yL(wL(this)):wL(this),yL(arguments))}),mL((function(){return[1,2].toLocaleString()!=new bL([1,2]).toLocaleString()}))||!mL((function(){bL.prototype.toLocaleString.call([1,2])})));var PL=hg.exportTypedArrayMethod,CL=$,_L=me,EL=J.Uint8Array,SL=EL&&EL.prototype||{},kL=[].toString,RL=_L([].join);CL((function(){kL.call({})}))&&(kL=function(){return RL(this)});var OL=SL.toString!=kL;PL("toString",kL,OL);var FL=me,ML=gp,IL=om.exports.getWeakData,DL=En,LL=De,jL=bp,BL=Um,NL=Rt,VL=yr.set,UL=yr.getterFor,WL=Ia.find,zL=Ia.findIndex,HL=FL([].splice),GL=0,XL=function(e){return e.frozen||(e.frozen=new QL)},QL=function(){this.entries=[]},YL=function(e,t){return WL(e.entries,(function(e){return e[0]===t}))};QL.prototype={get:function(e){var t=YL(this,e);if(t)return t[1]},has:function(e){return!!YL(this,e)},set:function(e,t){var n=YL(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=zL(this.entries,(function(t){return t[0]===e}));return~t&&HL(this.entries,t,1),!!~t}};var qL,KL={getConstructor:function(e,t,n,r){var o=e((function(e,o){jL(e,i),VL(e,{type:t,id:GL++,frozen:void 0}),null!=o&&BL(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=UL(t),s=function(e,t,n){var r=a(e),o=IL(DL(t),!0);return!0===o?XL(r).set(t,n):o[r.id]=n,e};return ML(i,{delete:function(e){var t=a(this);if(!LL(e))return!1;var n=IL(e);return!0===n?XL(t).delete(e):n&&NL(n,t.id)&&delete n[t.id]},has:function(e){var t=a(this);if(!LL(e))return!1;var n=IL(e);return!0===n?XL(t).has(e):n&&NL(n,t.id)}}),ML(i,n?{get:function(e){var t=a(this);if(LL(e)){var n=IL(e);return!0===n?XL(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}},JL=J,ZL=me,$L=gp,ej=om.exports,tj=ay,nj=KL,rj=De,oj=fm,ij=yr.enforce,aj=Kn,sj=!JL.ActiveXObject&&"ActiveXObject"in JL,uj=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},cj=tj("WeakMap",uj,nj);if(aj&&sj){qL=nj.getConstructor(uj,"WeakMap",!0),ej.enable();var lj=cj.prototype,fj=ZL(lj.delete),hj=ZL(lj.has),dj=ZL(lj.get),pj=ZL(lj.set);$L(lj,{delete:function(e){if(rj(e)&&!oj(e)){var t=ij(this);return t.frozen||(t.frozen=new qL),fj(this,e)||t.frozen.delete(e)}return fj(this,e)},has:function(e){if(rj(e)&&!oj(e)){var t=ij(this);return t.frozen||(t.frozen=new qL),hj(this,e)||t.frozen.has(e)}return hj(this,e)},get:function(e){if(rj(e)&&!oj(e)){var t=ij(this);return t.frozen||(t.frozen=new qL),hj(this,e)?dj(this,e):t.frozen.get(e)}return dj(this,e)},set:function(e,t){if(rj(e)&&!oj(e)){var n=ij(this);n.frozen||(n.frozen=new qL),hj(this,e)?pj(this,e,t):n.frozen.set(e,t)}else pj(this,e,t);return this}})}ay("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),KL);var vj=Error,gj=me("".replace),mj=String(vj("zxcasd").stack),yj=/\n\s*at [^:]*:[^\n]*/,bj=yj.test(mj),wj=De,Aj=Bn,xj=Ko,Tj=fe,Pj=!$((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Tj(1,7)),7!==e.stack)})),Cj=jo,_j=J,Ej=Ve,Sj=bf,kj=zf,Rj=wo,Oj=wi,Fj=Bn,Mj=fe,Ij=function(e,t){if(bj&&"string"==typeof e&&!vj.prepareStackTrace)for(;t--;)e=gj(e,yj,"");return e},Dj=function(e,t){wj(t)&&"cause"in t&&Aj(e,"cause",t.cause)},Lj=Um,jj=function(e,t){return void 0===e?arguments.length<2?"":t:xj(e)},Bj=Pj,Nj=Xt("toStringTag"),Vj=_j.Error,Uj=[].push,Wj=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,o=Ej(zj,this);kj?n=kj(new Vj,o?Sj(this):zj):(n=o?this:Oj(zj),Fj(n,Nj,"Error")),void 0!==t&&Fj(n,"message",jj(t)),Bj&&Fj(n,"stack",Ij(n.stack,1)),Dj(n,r);var i=[];return Lj(e,Uj,{that:i}),Fj(n,"errors",i),n};kj?kj(Wj,Vj):Rj(Wj,Vj,{name:!0});var zj=Wj.prototype=Oj(Vj.prototype,{constructor:Mj(1,Wj),message:Mj(1,""),name:Mj(1,"AggregateError")});Cj({global:!0},{AggregateError:Wj});var Hj=ee,Gj=Fc,Xj=Et,Qj=Qr,Yj=An.f;Hj&&(Yj(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=Xj(this),t=Qj(e);return 0==t?0:t-1}}),Gj("lastIndex"));var qj=ee,Kj=Fc,Jj=Et,Zj=Qr,$j=An.f;qj&&($j(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=Jj(this),t=Zj(e);return 0==t?void 0:e[t-1]},set:function(e){var t=Jj(this),n=Zj(t);return t[0==n?0:n-1]=e}}),Kj("lastItem"));var eB=J,tB=Ne,nB=wi,rB=De,oB=eB.Object,iB=eB.TypeError,aB=tB("Map"),sB=tB("WeakMap"),uB=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=nB(null)};uB.prototype.get=function(e,t){return this[e]||(this[e]=t())},uB.prototype.next=function(e,t,n){var r=n?this.objectsByIndex[e]||(this.objectsByIndex[e]=new sB):this.primitives||(this.primitives=new aB),o=r.get(t);return o||r.set(t,o=new uB),o};var cB=new uB,lB=function(){var e,t,n=cB,r=arguments.length;for(e=0;e<r;e++)rB(t=arguments[e])&&(n=n.next(e,t,!0));if(this===oB&&n===cB)throw iB("Composite keys must contain a non-primitive component");for(e=0;e<r;e++)rB(t=arguments[e])||(n=n.next(e,t,!1));return n},fB=jo,hB=iu,dB=lB,pB=Ne,vB=wi,gB=J.Object,mB=function(){var e=pB("Object","freeze");return e?e(vB(null)):vB(null)};fB({global:!0,forced:!0},{compositeKey:function(){return hB(dB,gB,arguments).get("object",mB)}});var yB=lB,bB=Ne,wB=iu;jo({global:!0,forced:!0},{compositeSymbol:function(){return 1==arguments.length&&"string"==typeof arguments[0]?bB("Symbol").for(arguments[0]):wB(yB,null,arguments).get("symbol",bB("Symbol"))}}),jo({global:!0},{globalThis:J});var AB=oe,xB=lt,TB=En,PB=function(){for(var e,t=TB(this),n=xB(t.delete),r=!0,o=0,i=arguments.length;o<i;o++)e=AB(n,t,arguments[o]),r=r&&e;return!!r};jo({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:PB});var CB=oe,_B=function(e){return CB(Map.prototype.entries,e)},EB=En,SB=na,kB=_B,RB=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{every:function(e){var t=EB(this),n=kB(t),r=SB(e,arguments.length>1?arguments[1]:void 0);return!RB(n,(function(e,n,o){if(!r(n,e,t))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var OB=Ne,FB=na,MB=oe,IB=lt,DB=En,LB=wg,jB=_B,BB=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=DB(this),n=jB(t),r=FB(e,arguments.length>1?arguments[1]:void 0),o=new(LB(t,OB("Map"))),i=IB(o.set);return BB(n,(function(e,n){r(n,e,t)&&MB(i,o,e,n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}});var NB=En,VB=na,UB=_B,WB=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=NB(this),n=UB(t),r=VB(e,arguments.length>1?arguments[1]:void 0);return WB(n,(function(e,n,o){if(r(n,e,t))return o(n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var zB=En,HB=na,GB=_B,XB=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=zB(this),n=GB(t),r=HB(e,arguments.length>1?arguments[1]:void 0);return XB(n,(function(e,n,o){if(r(n,e,t))return o(e)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var QB=na,YB=oe,qB=lt,KB=gg,JB=Um,ZB=[].push,$B=function(e){var t,n,r,o,i=arguments.length,a=i>1?arguments[1]:void 0;return KB(this),(t=void 0!==a)&&qB(a),null==e?new this:(n=[],t?(r=0,o=QB(a,i>2?arguments[2]:void 0),JB(e,(function(e){YB(ZB,n,o(e,r++))}))):JB(e,ZB,{that:n}),new this(n))};jo({target:"Map",stat:!0,forced:!0},{from:$B});var eN=jo,tN=oe,nN=lt,rN=Ol,oN=Um,iN=me([].push);eN({target:"Map",stat:!0,forced:!0},{groupBy:function(e,t){nN(t);var n=rN(e),r=new this,o=nN(r.has),i=nN(r.get),a=nN(r.set);return oN(n,(function(e){var n=t(e);tN(o,r,n)?iN(tN(i,r,n),e):tN(a,r,n,[e])}),{IS_ITERATOR:!0}),r}});var aN=En,sN=_B,uN=function(e,t){return e===t||e!=e&&t!=t},cN=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return cN(sN(aN(this)),(function(t,n,r){if(uN(n,e))return r()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var lN=oe,fN=Um,hN=lt;jo({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var n=new this;hN(t);var r=hN(n.set);return fN(e,(function(e){lN(r,n,t(e),e)})),n}});var dN=En,pN=_B,vN=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){return vN(pN(dN(this)),(function(t,n,r){if(n===e)return r(t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});var gN=Ne,mN=na,yN=oe,bN=lt,wN=En,AN=wg,xN=_B,TN=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=wN(this),n=xN(t),r=mN(e,arguments.length>1?arguments[1]:void 0),o=new(AN(t,gN("Map"))),i=bN(o.set);return TN(n,(function(e,n){yN(i,o,r(n,e,t),n)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}});var PN=Ne,CN=na,_N=oe,EN=lt,SN=En,kN=wg,RN=_B,ON=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=SN(this),n=RN(t),r=CN(e,arguments.length>1?arguments[1]:void 0),o=new(kN(t,PN("Map"))),i=EN(o.set);return ON(n,(function(e,n){_N(i,o,e,r(n,e,t))}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),o}});var FN=lt,MN=En,IN=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{merge:function(e){for(var t=MN(this),n=FN(t.set),r=arguments.length,o=0;o<r;)IN(arguments[o++],n,{that:t,AS_ENTRIES:!0});return t}});var DN=au,LN=function(){return new this(DN(arguments))};jo({target:"Map",stat:!0,forced:!0},{of:LN});var jN=jo,BN=En,NN=lt,VN=_B,UN=Um,WN=J.TypeError;jN({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=BN(this),n=VN(t),r=arguments.length<2,o=r?void 0:arguments[1];if(NN(e),UN(n,(function(n,i){r?(r=!1,o=i):o=e(o,i,n,t)}),{AS_ENTRIES:!0,IS_ITERATOR:!0}),r)throw WN("Reduce of empty map with no initial value");return o}});var zN=En,HN=na,GN=_B,XN=Um;jo({target:"Map",proto:!0,real:!0,forced:!0},{some:function(e){var t=zN(this),n=GN(t),r=HN(e,arguments.length>1?arguments[1]:void 0);return XN(n,(function(e,n,o){if(r(n,e,t))return o()}),{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var QN=jo,YN=oe,qN=En,KN=lt,JN=J.TypeError;QN({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=qN(this),r=KN(n.get),o=KN(n.has),i=KN(n.set),a=arguments.length;KN(t);var s=YN(o,n,e);if(!s&&a<3)throw JN("Updating absent value");var u=s?YN(r,n,e):KN(a>2?arguments[2]:void 0)(e,n);return YN(i,n,e,t(u,e,n)),n}});var ZN=jo,$N=Math.min,eV=Math.max;ZN({target:"Math",stat:!0,forced:!0},{clamp:function(e,t,n){return $N(n,eV(t,e))}}),jo({target:"Math",stat:!0,forced:!0},{DEG_PER_RAD:Math.PI/180});var tV=jo,nV=180/Math.PI;tV({target:"Math",stat:!0,forced:!0},{degrees:function(e){return e*nV}});var rV=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},oV=rV,iV=ab;jo({target:"Math",stat:!0,forced:!0},{fscale:function(e,t,n,r,o){return iV(oV(e,t,n,r,o))}}),jo({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}}),jo({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)}}),jo({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}}),jo({target:"Math",stat:!0,forced:!0},{RAD_PER_DEG:180/Math.PI});var aV=jo,sV=Math.PI/180;aV({target:"Math",stat:!0,forced:!0},{radians:function(e){return e*sV}}),jo({target:"Math",stat:!0,forced:!0},{scale:rV});var uV=jo,cV=J,lV=En,fV=vw,hV=If,dV=yr,pV=dV.set,vV=dV.getterFor("Seeded Random Generator"),gV=cV.TypeError,mV=hV((function(e){pV(this,{type:"Seeded Random Generator",seed:e%2147483647})}),"Seeded Random",(function(){var e=vV(this);return{value:(1073741823&(e.seed=(1103515245*e.seed+12345)%2147483647))/1073741823,done:!1}}));uV({target:"Math",stat:!0,forced:!0},{seededPRNG:function(e){var t=lV(e).seed;if(!fV(t))throw gV('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new mV(t)}}),jo({target:"Math",stat:!0,forced:!0},{signbit:function(e){return(e=+e)==e&&0==e?1/e==-1/0:e<0}}),jo({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 yV=jo,bV=J,wV=me,AV=Br,xV=Ww,TV=bV.RangeError,PV=bV.SyntaxError,CV=bV.TypeError,_V=/^[\da-z]+$/,EV=wV("".charAt),SV=wV(_V.exec),kV=wV(1..toString),RV=wV("".slice);yV({target:"Number",stat:!0,forced:!0},{fromString:function(e,t){var n,r,o=1;if("string"!=typeof e)throw CV("Invalid number representation");if(!e.length)throw PV("Invalid number representation");if("-"==EV(e,0)&&(o=-1,!(e=RV(e,1)).length))throw PV("Invalid number representation");if((n=void 0===t?10:AV(t))<2||n>36)throw TV("Invalid radix");if(!SV(_V,e)||kV(r=xV(e,n),n)!==e)throw PV("Invalid number representation");return o*r}});var OV=J,FV=Me,MV=Xt("observable"),IV=OV.Observable,DV=IV&&IV.prototype,LV=!(FV(IV)&&FV(IV.from)&&FV(IV.of)&&FV(DV.subscribe)&&FV(DV[MV])),jV=jo,BV=oe,NV=ee,VV=tp,UV=lt,WV=Me,zV=En,HV=De,GV=bp,XV=ht,QV=An.f,YV=Nn.exports,qV=gp,KV=wP,JV=yr,ZV=LV,$V=Xt("observable"),eU=JV.getterFor,tU=JV.set,nU=eU("Observable"),rU=eU("Subscription"),oU=eU("SubscriptionObserver"),iU=function(e){this.observer=zV(e),this.cleanup=void 0,this.subscriptionObserver=void 0};iU.prototype={type:"Subscription",clean:function(){var e=this.cleanup;if(e){this.cleanup=void 0;try{e()}catch(w1){KV(w1)}}},close:function(){if(!NV){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 aU=function(e,t){var n,r=tU(this,new iU(e));NV||(this.closed=!1);try{(n=XV(e,"start"))&&BV(n,e,this)}catch(w1){KV(w1)}if(!r.isClosed()){var o=r.subscriptionObserver=new sU(r);try{var i=t(o),a=i;null!=i&&(r.cleanup=WV(i.unsubscribe)?function(){a.unsubscribe()}:UV(i))}catch(w1){return void o.error(w1)}r.isClosed()&&r.clean()}};aU.prototype=qV({},{unsubscribe:function(){var e=rU(this);e.isClosed()||(e.close(),e.clean())}}),NV&&QV(aU.prototype,"closed",{configurable:!0,get:function(){return rU(this).isClosed()}});var sU=function(e){tU(this,{type:"SubscriptionObserver",subscriptionState:e}),NV||(this.closed=!1)};sU.prototype=qV({},{next:function(e){var t=oU(this).subscriptionState;if(!t.isClosed()){var n=t.observer;try{var r=XV(n,"next");r&&BV(r,n,e)}catch(w1){KV(w1)}}},error:function(e){var t=oU(this).subscriptionState;if(!t.isClosed()){var n=t.observer;t.close();try{var r=XV(n,"error");r?BV(r,n,e):KV(e)}catch(o){KV(o)}t.clean()}},complete:function(){var e=oU(this).subscriptionState;if(!e.isClosed()){var t=e.observer;e.close();try{var n=XV(t,"complete");n&&BV(n,t)}catch(w1){KV(w1)}e.clean()}}}),NV&&QV(sU.prototype,"closed",{configurable:!0,get:function(){return oU(this).subscriptionState.isClosed()}});var uU=function(e){GV(this,cU),tU(this,{type:"Observable",subscriber:UV(e)})},cU=uU.prototype;qV(cU,{subscribe:function(e){var t=arguments.length;return new aU(WV(e)?{next:e,error:t>1?arguments[1]:void 0,complete:t>2?arguments[2]:void 0}:HV(e)?e:{},nU(this).subscriber)}}),YV(cU,$V,(function(){return this})),jV({global:!0,forced:ZV},{Observable:uU}),VV("Observable");var lU=jo,fU=Ne,hU=oe,dU=En,pU=ya,vU=Ol,gU=ht,mU=Um,yU=LV,bU=Xt("observable");lU({target:"Observable",stat:!0,forced:yU},{from:function(e){var t=pU(this)?this:fU("Observable"),n=gU(dU(e),bU);if(n){var r=dU(hU(n,e));return r.constructor===t?r:new t((function(e){return r.subscribe(e)}))}var o=vU(e);return new t((function(e){mU(o,(function(t,n){if(e.next(t),e.closed)return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}),e.complete()}))}});var wU=jo,AU=Ne,xU=ya,TU=LV,PU=AU("Array");wU({target:"Observable",stat:!0,forced:TU},{of:function(){for(var e=xU(this)?this:AU("Observable"),t=arguments.length,n=PU(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 CU=oe,_U=lt,EU=NP,SU=AP,kU=Um;jo({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=EU.f(t),r=n.resolve,o=n.reject,i=SU((function(){var n=_U(t.resolve),o=[],i=0,a=1;kU(e,(function(e){var s=i++,u=!1;a++,CU(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 RU=oe,OU=lt,FU=Ne,MU=NP,IU=AP,DU=Um;jo({target:"Promise",stat:!0},{any:function(e){var t=this,n=FU("AggregateError"),r=MU.f(t),o=r.resolve,i=r.reject,a=IU((function(){var r=OU(t.resolve),a=[],s=0,u=1,c=!1;DU(e,(function(e){var l=s++,f=!1;u++,RU(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,"No one promise resolved")))}))})),--u||i(new n(a,"No one promise resolved"))}));return a.error&&i(a.value),r.promise}});var LU=NP,jU=AP;jo({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=LU.f(this),n=jU(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var BU=Ne,NU=me,VU=yt.exports,UU=BU("Map"),WU=BU("WeakMap"),zU=NU([].push),HU=VU("metadata"),GU=HU.store||(HU.store=new WU),XU=function(e,t,n){var r=GU.get(e);if(!r){if(!n)return;GU.set(e,r=new UU)}var o=r.get(t);if(!o){if(!n)return;r.set(t,o=new UU)}return o},QU={store:GU,getMap:XU,has:function(e,t,n){var r=XU(t,n,!1);return void 0!==r&&r.has(e)},get:function(e,t,n){var r=XU(t,n,!1);return void 0===r?void 0:r.get(e)},set:function(e,t,n,r){XU(n,r,!0).set(e,t)},keys:function(e,t){var n=XU(e,t,!1),r=[];return n&&n.forEach((function(e,t){zU(r,t)})),r},toKey:function(e){return void 0===e||"symbol"==S(e)?e:String(e)}},YU=En,qU=QU.toKey,KU=QU.set;jo({target:"Reflect",stat:!0},{defineMetadata:function(e,t,n){var r=arguments.length<4?void 0:qU(arguments[3]);KU(e,t,YU(n),r)}});var JU=En,ZU=QU.toKey,$U=QU.getMap,eW=QU.store;jo({target:"Reflect",stat:!0},{deleteMetadata:function(e,t){var n=arguments.length<3?void 0:ZU(arguments[2]),r=$U(JU(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var o=eW.get(t);return o.delete(n),!!o.size||eW.delete(t)}});var tW=En,nW=bf,rW=QU.has,oW=QU.get,iW=QU.toKey,aW=function e(t,n,r){if(rW(t,n,r))return oW(t,n,r);var o=nW(n);return null!==o?e(t,o,r):void 0};jo({target:"Reflect",stat:!0},{getMetadata:function(e,t){var n=arguments.length<3?void 0:iW(arguments[2]);return aW(e,tW(t),n)}});var sW=me,uW=lt,cW=Qr,lW=Et,fW=_a,hW=Ne("Map"),dW=hW.prototype,pW=sW(dW.forEach),vW=sW(dW.has),gW=sW(dW.set),mW=sW([].push),yW=jo,bW=me,wW=QU,AW=En,xW=bf,TW=function(e){var t,n,r,o=lW(this),i=cW(o),a=fW(o,0),s=new hW,u=null!=e?uW(e):function(e){return e};for(t=0;t<i;t++)r=u(n=o[t]),vW(s,r)||gW(s,r,n);return pW(s,(function(e){mW(a,e)})),a},PW=bW(TW),CW=bW([].concat),_W=wW.keys,EW=wW.toKey,SW=function e(t,n){var r=_W(t,n),o=xW(t);if(null===o)return r;var i=e(o,n);return i.length?r.length?PW(CW(r,i)):i:r};yW({target:"Reflect",stat:!0},{getMetadataKeys:function(e){var t=arguments.length<2?void 0:EW(arguments[1]);return SW(AW(e),t)}});var kW=En,RW=QU.get,OW=QU.toKey;jo({target:"Reflect",stat:!0},{getOwnMetadata:function(e,t){var n=arguments.length<3?void 0:OW(arguments[2]);return RW(e,kW(t),n)}});var FW=En,MW=QU.keys,IW=QU.toKey;jo({target:"Reflect",stat:!0},{getOwnMetadataKeys:function(e){var t=arguments.length<2?void 0:IW(arguments[1]);return MW(FW(e),t)}});var DW=En,LW=bf,jW=QU.has,BW=QU.toKey,NW=function e(t,n,r){if(jW(t,n,r))return!0;var o=LW(n);return null!==o&&e(t,o,r)};jo({target:"Reflect",stat:!0},{hasMetadata:function(e,t){var n=arguments.length<3?void 0:BW(arguments[2]);return NW(e,DW(t),n)}});var VW=En,UW=QU.has,WW=QU.toKey;jo({target:"Reflect",stat:!0},{hasOwnMetadata:function(e,t){var n=arguments.length<3?void 0:WW(arguments[2]);return UW(e,VW(t),n)}});var zW=En,HW=QU.toKey,GW=QU.set;jo({target:"Reflect",stat:!0},{metadata:function(e,t){return function(n,r){GW(e,t,zW(n),HW(r))}}});var XW=oe,QW=lt,YW=En,qW=function(){for(var e=YW(this),t=QW(e.add),n=0,r=arguments.length;n<r;n++)XW(t,e,arguments[n]);return e};jo({target:"Set",proto:!0,real:!0,forced:!0},{addAll:qW}),jo({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:PB});var KW=Ne,JW=oe,ZW=lt,$W=En,ez=wg,tz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){var t=$W(this),n=new(ez(t,KW("Set")))(t),r=ZW(n.delete);return tz(e,(function(e){JW(r,n,e)})),n}});var nz=oe,rz=function(e){return nz(Set.prototype.values,e)},oz=En,iz=na,az=rz,sz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{every:function(e){var t=oz(this),n=az(t),r=iz(e,arguments.length>1?arguments[1]:void 0);return!sz(n,(function(e,n){if(!r(e,e,t))return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var uz=Ne,cz=oe,lz=lt,fz=En,hz=na,dz=wg,pz=rz,vz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=fz(this),n=pz(t),r=hz(e,arguments.length>1?arguments[1]:void 0),o=new(dz(t,uz("Set"))),i=lz(o.add);return vz(n,(function(e){r(e,e,t)&&cz(i,o,e)}),{IS_ITERATOR:!0}),o}});var gz=En,mz=na,yz=rz,bz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=gz(this),n=yz(t),r=mz(e,arguments.length>1?arguments[1]:void 0);return bz(n,(function(e,n){if(r(e,e,t))return n(e)}),{IS_ITERATOR:!0,INTERRUPTED:!0}).result}}),jo({target:"Set",stat:!0,forced:!0},{from:$B});var wz=Ne,Az=oe,xz=lt,Tz=En,Pz=wg,Cz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){var t=Tz(this),n=new(Pz(t,wz("Set"))),r=xz(t.has),o=xz(n.add);return Cz(e,(function(e){Az(r,t,e)&&Az(o,n,e)})),n}});var _z=oe,Ez=lt,Sz=En,kz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){var t=Sz(this),n=Ez(t.has);return!kz(e,(function(e,r){if(!0===_z(n,t,e))return r()}),{INTERRUPTED:!0}).stopped}});var Rz=Ne,Oz=oe,Fz=lt,Mz=Me,Iz=En,Dz=Ol,Lz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){var t=Dz(this),n=Iz(e),r=n.has;return Mz(r)||(n=new(Rz("Set"))(e),r=Fz(n.has)),!Lz(t,(function(e,t){if(!1===Oz(r,n,e))return t()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var jz=oe,Bz=lt,Nz=En,Vz=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){var t=Nz(this),n=Bz(t.has);return!Vz(e,(function(e,r){if(!1===jz(n,t,e))return r()}),{INTERRUPTED:!0}).stopped}});var Uz=jo,Wz=En,zz=Ko,Hz=rz,Gz=Um,Xz=me([].join),Qz=[].push;Uz({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=Wz(this),n=Hz(t),r=void 0===e?",":zz(e),o=[];return Gz(n,Qz,{that:o,IS_ITERATOR:!0}),Xz(o,r)}});var Yz=Ne,qz=na,Kz=oe,Jz=lt,Zz=En,$z=wg,eH=rz,tH=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=Zz(this),n=eH(t),r=qz(e,arguments.length>1?arguments[1]:void 0),o=new($z(t,Yz("Set"))),i=Jz(o.add);return tH(n,(function(e){Kz(i,o,r(e,e,t))}),{IS_ITERATOR:!0}),o}}),jo({target:"Set",stat:!0,forced:!0},{of:LN});var nH=jo,rH=lt,oH=En,iH=rz,aH=Um,sH=J.TypeError;nH({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=oH(this),n=iH(t),r=arguments.length<2,o=r?void 0:arguments[1];if(rH(e),aH(n,(function(n){r?(r=!1,o=n):o=e(o,n,n,t)}),{IS_ITERATOR:!0}),r)throw sH("Reduce of empty set with no initial value");return o}});var uH=En,cH=na,lH=rz,fH=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=uH(this),n=lH(t),r=cH(e,arguments.length>1?arguments[1]:void 0);return fH(n,(function(e,n){if(r(e,e,t))return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var hH=Ne,dH=oe,pH=lt,vH=En,gH=wg,mH=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){var t=vH(this),n=new(gH(t,hH("Set")))(t),r=pH(n.delete),o=pH(n.add);return mH(e,(function(e){dH(r,n,e)||dH(o,n,e)})),n}});var yH=Ne,bH=lt,wH=En,AH=wg,xH=Um;jo({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){var t=wH(this),n=new(AH(t,yH("Set")))(t);return xH(e,bH(n.add),{that:n}),n}});var TH=Ok.charAt,PH=ke,CH=Br,_H=Ko;jo({target:"String",proto:!0,forced:!0},{at:function(e){var t=_H(PH(this)),n=t.length,r=CH(e),o=r>=0?r:n+r;return o<0||o>=n?void 0:TH(t,o)}});var EH=jo,SH=If,kH=ke,RH=Ko,OH=yr,FH=Ok.codeAt,MH=Ok.charAt,IH=OH.set,DH=OH.getterFor("String Iterator"),LH=SH((function(e){IH(this,{type:"String Iterator",string:e,index:0})}),"String",(function(){var e,t=DH(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=MH(n,r),t.index+=e.length,{value:{codePoint:FH(e,0),position:r},done:!1})}));EH({target:"String",proto:!0,forced:!0},{codePoints:function(){return new LH(RH(kH(this)))}});var jH=jo,BH=J,NH=oe,VH=me,UH=If,WH=ke,zH=Gr,HH=Ko,GH=En,XH=LE,QH=HE,YH=ht,qH=Nn.exports,KH=$,JH=wg,ZH=_R,$H=MR,eG=yr,tG=Xt("matchAll"),nG=eG.set,rG=eG.getterFor("RegExp String Iterator"),oG=RegExp.prototype,iG=BH.TypeError,aG=VH("".indexOf),sG=VH("".matchAll),uG=!!sG&&!KH((function(){sG("a",/./)})),cG=UH((function(e,t,n,r){nG(this,{type:"RegExp String Iterator",regexp:e,string:t,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var e=rG(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=$H(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""===HH(r[0])&&(t.lastIndex=ZH(n,zH(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),lG=function(e){var t,n,r,o=GH(this),i=HH(e),a=JH(o,RegExp),s=HH(QH(o));return t=new a(a===RegExp?o.source:o,s),n=!!~aG(s,"g"),r=!!~aG(s,"u"),t.lastIndex=zH(o.lastIndex),new cG(t,i,n,r)};jH({target:"String",proto:!0,forced:uG},{matchAll:function(e){var t,n,r,o=WH(this);if(null!=e){if(XH(e)&&(t=HH(WH(QH(e))),!~aG(t,"g")))throw iG("`.matchAll` does not allow non-global regexes");if(uG)return sG(o,e);if(r=YH(e,tG))return NH(r,e,o)}else if(uG)return sG(o,e);return n=HH(o),new RegExp(e,"g")[tG](n)}}),tG in oG||qH(oG,tG,lG);var fG=jo,hG=J,dG=oe,pG=me,vG=ke,gG=Me,mG=LE,yG=Ko,bG=ht,wG=HE,AG=gO,xG=Xt("replace"),TG=hG.TypeError,PG=pG("".indexOf);pG("".replace);var CG=pG("".slice),_G=Math.max,EG=function(e,t,n){return n>e.length?-1:""===t?n:PG(e,t,n)};fG({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,o,i,a,s,u,c,l=vG(this),f=0,h=0,d="";if(null!=e){if(mG(e)&&(n=yG(vG(wG(e))),!~PG(n,"g")))throw TG("`.replaceAll` does not allow non-global regexes");if(r=bG(e,xG))return dG(r,e,l,t)}for(o=yG(l),i=yG(e),(a=gG(t))||(t=yG(t)),s=i.length,u=_G(1,s),f=EG(o,i,0);-1!==f;)c=a?yG(t(i,f,o)):AG(i,o,f,[],void 0,t),d+=CG(o,h,f)+c,h=f+s,f=EG(o,i,f+u);return h<o.length&&(d+=CG(o,h)),d}}),zi("dispose"),zi("observable"),zi("patternMatch"),jo({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:PB}),jo({target:"WeakMap",stat:!0,forced:!0},{from:$B}),jo({target:"WeakMap",stat:!0,forced:!0},{of:LN}),jo({target:"WeakSet",proto:!0,real:!0,forced:!0},{addAll:qW}),jo({target:"WeakSet",proto:!0,real:!0,forced:!0},{deleteAll:PB}),jo({target:"WeakSet",stat:!0,forced:!0},{from:$B}),jo({target:"WeakSet",stat:!0,forced:!0},{of:LN});var SG={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},kG=cn("span").classList,RG=kG&&kG.constructor&&kG.constructor.prototype,OG=RG===Object.prototype?void 0:RG,FG=Ia.forEach,MG=J,IG=SG,DG=OG,LG=$l("forEach")?[].forEach:function(e){return FG(this,e,arguments.length>1?arguments[1]:void 0)},jG=Bn,BG=function(e){if(e&&e.forEach!==LG)try{jG(e,"forEach",LG)}catch(w1){e.forEach=LG}};for(var NG in IG)IG[NG]&&BG(MG[NG]&&MG[NG].prototype);BG(DG);var VG=J,UG=SG,WG=OG,zG=mh,HG=Bn,GG=Xt,XG=GG("iterator"),QG=GG("toStringTag"),YG=zG.values,qG=function(e,t){if(e){if(e[XG]!==YG)try{HG(e,XG,YG)}catch(w1){e[XG]=YG}if(e[QG]||HG(e,QG,t),UG[t])for(var n in zG)if(e[n]!==zG[n])try{HG(e,n,zG[n])}catch(w1){e[n]=zG[n]}}};for(var KG in UG)qG(VG[KG]&&VG[KG].prototype,KG);qG(WG,"DOMTokenList");var JG=eP.clear;jo({global:!0,bind:!0,enumerable:!0,forced:J.clearImmediate!==JG},{clearImmediate:JG});var ZG=eP.set;jo({global:!0,bind:!0,enumerable:!0,forced:J.setImmediate!==ZG},{setImmediate:ZG});var $G=jo,eX=yP,tX=lt,nX=bT,rX=qh,oX=J.process;$G({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){nX(arguments.length,1),tX(e);var t=rX&&oX.domain;eX(t?t.bind(e):e)}});var iX=$,aX=Xt("iterator"),sX=!iX((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[aX]||"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})),uX=me,cX=/[^\0-\u007E]/,lX=/[.\u3002\uFF0E\uFF61]/g,fX="Overflow: input needs wider integers to process",hX=J.RangeError,dX=uX(lX.exec),pX=Math.floor,vX=String.fromCharCode,gX=uX("".charCodeAt),mX=uX([].join),yX=uX([].push),bX=uX("".replace),wX=uX("".split),AX=uX("".toLowerCase),xX=function(e){return e+22+75*(e<26)},TX=function(e,t,n){var r=0;for(e=n?pX(e/700):e>>1,e+=pX(e/t);e>455;)e=pX(e/35),r+=36;return pX(r+36*e/(e+38))},PX=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=gX(e,n++);if(o>=55296&&o<=56319&&n<r){var i=gX(e,n++);56320==(64512&i)?yX(t,((1023&o)<<10)+(1023&i)+65536):(yX(t,o),n--)}else yX(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&&yX(t,vX(r));var u=t.length,c=u;for(u&&yX(t,"-");c<o;){var l=2147483647;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<l&&(l=r);var f=c+1;if(l-i>pX((2147483647-a)/f))throw hX(fX);for(a+=(l-i)*f,i=l,n=0;n<e.length;n++){if((r=e[n])<i&&++a>2147483647)throw hX(fX);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;yX(t,vX(xX(p+v%g))),h=pX(v/g),d+=36}yX(t,vX(xX(h))),s=TX(a,f,c==u),a=0,c++}}a++,i++}return mX(t,"")},CX=jo,_X=J,EX=oe,SX=me,kX=ee,RX=sX,OX=Nn.exports,FX=gp,MX=Zi,IX=If,DX=yr,LX=bp,jX=Me,BX=Rt,NX=na,VX=Qo,UX=En,WX=De,zX=Ko,HX=wi,GX=fe,XX=Ol,QX=Pl,YX=bT,qX=Cd,KX=Xt("iterator"),JX=DX.set,ZX=DX.getterFor("URLSearchParams"),$X=DX.getterFor("URLSearchParamsIterator"),eQ=Object.getOwnPropertyDescriptor,tQ=function(e){if(!kX)return _X[e];var t=eQ(_X,e);return t&&t.value},nQ=tQ("fetch"),rQ=tQ("Request"),oQ=tQ("Headers"),iQ=rQ&&rQ.prototype,aQ=oQ&&oQ.prototype,sQ=_X.RegExp,uQ=_X.TypeError,cQ=_X.decodeURIComponent,lQ=_X.encodeURIComponent,fQ=SX("".charAt),hQ=SX([].join),dQ=SX([].push),pQ=SX("".replace),vQ=SX([].shift),gQ=SX([].splice),mQ=SX("".split),yQ=SX("".slice),bQ=/\+/g,wQ=Array(4),AQ=function(e){return wQ[e-1]||(wQ[e-1]=sQ("((?:%[\\da-f]{2}){"+e+"})","gi"))},xQ=function(e){try{return cQ(e)}catch(w1){return e}},TQ=function(e){var t=pQ(e,bQ," "),n=4;try{return cQ(t)}catch(w1){for(;n;)t=pQ(t,AQ(n--),xQ);return t}},PQ=/[!'()~]|%20/g,CQ={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},_Q=function(e){return CQ[e]},EQ=function(e){return pQ(lQ(e),PQ,_Q)},SQ=IX((function(e,t){JX(this,{type:"URLSearchParamsIterator",iterator:XX(ZX(e).entries),kind:t})}),"Iterator",(function(){var e=$X(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),kQ=function(e){this.entries=[],this.url=null,void 0!==e&&(WX(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===fQ(e,0)?yQ(e,1):e:zX(e)))};kQ.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,o,i,a,s,u=QX(e);if(u)for(n=(t=XX(e,u)).next;!(r=EX(n,t)).done;){if(i=(o=XX(UX(r.value))).next,(a=EX(i,o)).done||(s=EX(i,o)).done||!EX(i,o).done)throw uQ("Expected sequence with length 2");dQ(this.entries,{key:zX(a.value),value:zX(s.value)})}else for(var c in e)BX(e,c)&&dQ(this.entries,{key:c,value:zX(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=mQ(e,"&"),o=0;o<r.length;)(t=r[o++]).length&&(n=mQ(t,"="),dQ(this.entries,{key:TQ(vQ(n)),value:TQ(hQ(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],dQ(n,EQ(e.key)+"="+EQ(e.value));return hQ(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var RQ=function(){LX(this,OQ);var e=arguments.length>0?arguments[0]:void 0;JX(this,new kQ(e))},OQ=RQ.prototype;if(FX(OQ,{append:function(e,t){YX(arguments.length,2);var n=ZX(this);dQ(n.entries,{key:zX(e),value:zX(t)}),n.updateURL()},delete:function(e){YX(arguments.length,1);for(var t=ZX(this),n=t.entries,r=zX(e),o=0;o<n.length;)n[o].key===r?gQ(n,o,1):o++;t.updateURL()},get:function(e){YX(arguments.length,1);for(var t=ZX(this).entries,n=zX(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){YX(arguments.length,1);for(var t=ZX(this).entries,n=zX(e),r=[],o=0;o<t.length;o++)t[o].key===n&&dQ(r,t[o].value);return r},has:function(e){YX(arguments.length,1);for(var t=ZX(this).entries,n=zX(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){YX(arguments.length,1);for(var n,r=ZX(this),o=r.entries,i=!1,a=zX(e),s=zX(t),u=0;u<o.length;u++)(n=o[u]).key===a&&(i?gQ(o,u--,1):(i=!0,n.value=s));i||dQ(o,{key:a,value:s}),r.updateURL()},sort:function(){var e=ZX(this);qX(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=ZX(this).entries,r=NX(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 SQ(this,"keys")},values:function(){return new SQ(this,"values")},entries:function(){return new SQ(this,"entries")}},{enumerable:!0}),OX(OQ,KX,OQ.entries,{name:"entries"}),OX(OQ,"toString",(function(){return ZX(this).serialize()}),{enumerable:!0}),MX(RQ,"URLSearchParams"),CX({global:!0,forced:!RX},{URLSearchParams:RQ}),!RX&&jX(oQ)){var FQ=SX(aQ.has),MQ=SX(aQ.set),IQ=function(e){if(WX(e)){var t,n=e.body;if("URLSearchParams"===VX(n))return t=e.headers?new oQ(e.headers):new oQ,FQ(t,"content-type")||MQ(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),HX(e,{body:GX(0,zX(n)),headers:GX(0,t)})}return e};if(jX(nQ)&&CX({global:!0,enumerable:!0,noTargetGet:!0,forced:!0},{fetch:function(e){return nQ(e,arguments.length>1?IQ(arguments[1]):{})}}),jX(rQ)){var DQ=function(e){return LX(this,iQ),new rQ(e,arguments.length>1?IQ(arguments[1]):{})};iQ.constructor=DQ,DQ.prototype=iQ,CX({global:!0,forced:!0,noTargetGet:!0},{Request:DQ})}}var LQ,jQ={URLSearchParams:RQ,getState:ZX},BQ=jo,NQ=ee,VQ=sX,UQ=J,WQ=na,zQ=me,HQ=Jo.f,GQ=Nn.exports,XQ=bp,QQ=Rt,YQ=PA,qQ=zl,KQ=Oi,JQ=Ok.codeAt,ZQ=function(e){var t,n,r=[],o=wX(bX(AX(e),lX,"."),".");for(t=0;t<o.length;t++)n=o[t],yX(r,dX(cX,n)?"xn--"+PX(n):n);return mX(r,".")},$Q=Ko,eY=Zi,tY=bT,nY=jQ,rY=yr,oY=rY.set,iY=rY.getterFor("URL"),aY=nY.URLSearchParams,sY=nY.getState,uY=UQ.URL,cY=UQ.TypeError,lY=UQ.parseInt,fY=Math.floor,hY=Math.pow,dY=zQ("".charAt),pY=zQ(/./.exec),vY=zQ([].join),gY=zQ(1..toString),mY=zQ([].pop),yY=zQ([].push),bY=zQ("".replace),wY=zQ([].shift),AY=zQ("".split),xY=zQ("".slice),TY=zQ("".toLowerCase),PY=zQ([].unshift),CY=/[a-z]/i,_Y=/[\d+-.a-z]/i,EY=/\d/,SY=/^0x/i,kY=/^[0-7]+$/,RY=/^\d+$/,OY=/^[\da-f]+$/i,FY=/[\0\t\n\r #%/:<>?@[\\\]^|]/,MY=/[\0\t\n\r #/:<>?@[\\\]^|]/,IY=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,DY=/[\t\n\r]/g,LY=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)PY(t,e%256),e=fY(e/256);return vY(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+=gY(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},jY={},BY=YQ({},jY,{" ":1,'"':1,"<":1,">":1,"`":1}),NY=YQ({},BY,{"#":1,"?":1,"{":1,"}":1}),VY=YQ({},NY,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),UY=function(e,t){var n=JQ(e,0);return n>32&&n<127&&!QQ(t,e)?e:encodeURIComponent(e)},WY={ftp:21,file:null,http:80,https:443,ws:80,wss:443},zY=function(e,t){var n;return 2==e.length&&pY(CY,dY(e,0))&&(":"==(n=dY(e,1))||!t&&"|"==n)},HY=function(e){var t;return e.length>1&&zY(xY(e,0,2))&&(2==e.length||"/"===(t=dY(e,2))||"\\"===t||"?"===t||"#"===t)},GY=function(e){return"."===e||"%2e"===TY(e)},XY={},QY={},YY={},qY={},KY={},JY={},ZY={},$Y={},eq={},tq={},nq={},rq={},oq={},iq={},aq={},sq={},uq={},cq={},lq={},fq={},hq={},dq=function e(t,n,r){var o,i,a,s=$Q(t);if(n){if(i=this.parse(s))throw cY(i);this.searchParams=null}else{if(void 0!==r&&(o=new e(r,!0)),i=this.parse(s,null,o))throw cY(i);(a=sY(new aY)).bindURL(this),this.searchParams=a}};dq.prototype={type:"URL",parse:function(e,t,n){var r,o,i,a,s,u=this,c=t||XY,l=0,f="",h=!1,d=!1,p=!1;for(e=$Q(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=bY(e,IY,"")),e=bY(e,DY,""),r=qQ(e);l<=r.length;){switch(o=r[l],c){case XY:if(!o||!pY(CY,o)){if(t)return"Invalid scheme";c=YY;continue}f+=TY(o),c=QY;break;case QY:if(o&&(pY(_Y,o)||"+"==o||"-"==o||"."==o))f+=TY(o);else{if(":"!=o){if(t)return"Invalid scheme";f="",c=YY,l=0;continue}if(t&&(u.isSpecial()!=QQ(WY,f)||"file"==f&&(u.includesCredentials()||null!==u.port)||"file"==u.scheme&&!u.host))return;if(u.scheme=f,t)return void(u.isSpecial()&&WY[u.scheme]==u.port&&(u.port=null));f="","file"==u.scheme?c=iq:u.isSpecial()&&n&&n.scheme==u.scheme?c=qY:u.isSpecial()?c=$Y:"/"==r[l+1]?(c=KY,l++):(u.cannotBeABaseURL=!0,yY(u.path,""),c=lq)}break;case YY:if(!n||n.cannotBeABaseURL&&"#"!=o)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"==o){u.scheme=n.scheme,u.path=KQ(n.path),u.query=n.query,u.fragment="",u.cannotBeABaseURL=!0,c=hq;break}c="file"==n.scheme?iq:JY;continue;case qY:if("/"!=o||"/"!=r[l+1]){c=JY;continue}c=eq,l++;break;case KY:if("/"==o){c=tq;break}c=cq;continue;case JY:if(u.scheme=n.scheme,o==LQ)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=KQ(n.path),u.query=n.query;else if("/"==o||"\\"==o&&u.isSpecial())c=ZY;else if("?"==o)u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=KQ(n.path),u.query="",c=fq;else{if("#"!=o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=KQ(n.path),u.path.length--,c=cq;continue}u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,u.path=KQ(n.path),u.query=n.query,u.fragment="",c=hq}break;case ZY:if(!u.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){u.username=n.username,u.password=n.password,u.host=n.host,u.port=n.port,c=cq;continue}c=tq}else c=eq;break;case $Y:if(c=eq,"/"!=o||"/"!=dY(f,l+1))continue;l++;break;case eq:if("/"!=o&&"\\"!=o){c=tq;continue}break;case tq:if("@"==o){h&&(f="%40"+f),h=!0,i=qQ(f);for(var v=0;v<i.length;v++){var g=i[v];if(":"!=g||p){var m=UY(g,VY);p?u.password+=m:u.username+=m}else p=!0}f=""}else if(o==LQ||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(h&&""==f)return"Invalid authority";l-=qQ(f).length+1,f="",c=nq}else f+=o;break;case nq:case rq:if(t&&"file"==u.scheme){c=sq;continue}if(":"!=o||d){if(o==LQ||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()){if(u.isSpecial()&&""==f)return"Invalid host";if(t&&""==f&&(u.includesCredentials()||null!==u.port))return;if(a=u.parseHost(f))return a;if(f="",c=uq,t)return;continue}"["==o?d=!0:"]"==o&&(d=!1),f+=o}else{if(""==f)return"Invalid host";if(a=u.parseHost(f))return a;if(f="",c=oq,t==rq)return}break;case oq:if(!pY(EY,o)){if(o==LQ||"/"==o||"?"==o||"#"==o||"\\"==o&&u.isSpecial()||t){if(""!=f){var y=lY(f,10);if(y>65535)return"Invalid port";u.port=u.isSpecial()&&y===WY[u.scheme]?null:y,f=""}if(t)return;c=uq;continue}return"Invalid port"}f+=o;break;case iq:if(u.scheme="file","/"==o||"\\"==o)c=aq;else{if(!n||"file"!=n.scheme){c=cq;continue}if(o==LQ)u.host=n.host,u.path=KQ(n.path),u.query=n.query;else if("?"==o)u.host=n.host,u.path=KQ(n.path),u.query="",c=fq;else{if("#"!=o){HY(vY(KQ(r,l),""))||(u.host=n.host,u.path=KQ(n.path),u.shortenPath()),c=cq;continue}u.host=n.host,u.path=KQ(n.path),u.query=n.query,u.fragment="",c=hq}}break;case aq:if("/"==o||"\\"==o){c=sq;break}n&&"file"==n.scheme&&!HY(vY(KQ(r,l),""))&&(zY(n.path[0],!0)?yY(u.path,n.path[0]):u.host=n.host),c=cq;continue;case sq:if(o==LQ||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&zY(f))c=cq;else if(""==f){if(u.host="",t)return;c=uq}else{if(a=u.parseHost(f))return a;if("localhost"==u.host&&(u.host=""),t)return;f="",c=uq}continue}f+=o;break;case uq:if(u.isSpecial()){if(c=cq,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=LQ&&(c=cq,"/"!=o))continue}else u.fragment="",c=hq;else u.query="",c=fq;break;case cq:if(o==LQ||"/"==o||"\\"==o&&u.isSpecial()||!t&&("?"==o||"#"==o)){if(".."===(s=TY(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"==o||"\\"==o&&u.isSpecial()||yY(u.path,"")):GY(f)?"/"==o||"\\"==o&&u.isSpecial()||yY(u.path,""):("file"==u.scheme&&!u.path.length&&zY(f)&&(u.host&&(u.host=""),f=dY(f,0)+":"),yY(u.path,f)),f="","file"==u.scheme&&(o==LQ||"?"==o||"#"==o))for(;u.path.length>1&&""===u.path[0];)wY(u.path);"?"==o?(u.query="",c=fq):"#"==o&&(u.fragment="",c=hq)}else f+=UY(o,NY);break;case lq:"?"==o?(u.query="",c=fq):"#"==o?(u.fragment="",c=hq):o!=LQ&&(u.path[0]+=UY(o,jY));break;case fq:t||"#"!=o?o!=LQ&&("'"==o&&u.isSpecial()?u.query+="%27":u.query+="#"==o?"%23":UY(o,jY)):(u.fragment="",c=hq);break;case hq:o!=LQ&&(u.fragment+=UY(o,BY))}l++}},parseHost:function(e){var t,n,r;if("["==dY(e,0)){if("]"!=dY(e,e.length-1))return"Invalid host";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 dY(e,f)};if(":"==h()){if(":"!=dY(e,1))return;f+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=n=0;n<4&&pY(OY,h());)t=16*t+lY(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(!pY(EY,h()))return;for(;pY(EY,h());){if(i=lY(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}(xY(e,1,-1)),!t)return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=ZQ(e),pY(FY,e))return"Invalid host";if(t=function(e){var t,n,r,o,i,a,s,u=AY(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"==dY(o,0)&&(i=pY(SY,o)?16:8,o=xY(o,8==i?1:2)),""===o)a=0;else{if(!pY(10==i?RY:8==i?kY:OY,o))return e;a=lY(o,i)}yY(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=hY(256,5-t))return null}else if(a>255)return null;for(s=mY(n),r=0;r<n.length;r++)s+=n[r]*hY(256,3-r);return s}(e),null===t)return"Invalid host";this.host=t}else{if(pY(MY,e))return"Invalid host";for(t="",n=qQ(e),r=0;r<n.length;r++)t+=UY(n[r],jY);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return QQ(WY,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&zY(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+=LY(o),null!==i&&(c+=":"+i)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+vY(a,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw cY(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new pq(e.path[0]).origin}catch(w1){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+LY(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse($Q(e)+":",XY)},getUsername:function(){return this.username},setUsername:function(e){var t=qQ($Q(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=UY(t[n],VY)}},getPassword:function(){return this.password},setPassword:function(e){var t=qQ($Q(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=UY(t[n],VY)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?LY(e):LY(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,nq)},getHostname:function(){var e=this.host;return null===e?"":LY(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,rq)},getPort:function(){var e=this.port;return null===e?"":$Q(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=$Q(e))?this.port=null:this.parse(e,oq))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+vY(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,uq))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=$Q(e))?this.query=null:("?"==dY(e,0)&&(e=xY(e,1)),this.query="",this.parse(e,fq)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=$Q(e))?("#"==dY(e,0)&&(e=xY(e,1)),this.fragment="",this.parse(e,hq)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var pq=function(e){var t=XQ(this,vq),n=tY(arguments.length,1)>1?arguments[1]:void 0,r=oY(t,new dq(e,!1,n));NQ||(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())},vq=pq.prototype,gq=function(e,t){return{get:function(){return iY(this)[e]()},set:t&&function(e){return iY(this)[t](e)},configurable:!0,enumerable:!0}};if(NQ&&HQ(vq,{href:gq("serialize","setHref"),origin:gq("getOrigin"),protocol:gq("getProtocol","setProtocol"),username:gq("getUsername","setUsername"),password:gq("getPassword","setPassword"),host:gq("getHost","setHost"),hostname:gq("getHostname","setHostname"),port:gq("getPort","setPort"),pathname:gq("getPathname","setPathname"),search:gq("getSearch","setSearch"),searchParams:gq("getSearchParams"),hash:gq("getHash","setHash")}),GQ(vq,"toJSON",(function(){return iY(this).serialize()}),{enumerable:!0}),GQ(vq,"toString",(function(){return iY(this).serialize()}),{enumerable:!0}),uY){var mq=uY.createObjectURL,yq=uY.revokeObjectURL;mq&&GQ(pq,"createObjectURL",WQ(mq,uY)),yq&&GQ(pq,"revokeObjectURL",WQ(yq,uY))}eY(pq,"URL"),BQ({global:!0,forced:!VQ,sham:!NQ},{URL:pq});var bq=oe;jo({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return bq(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 wq,Aq,xq={exports:{}};wq=xq,Aq=xq.exports,function(e,t){var n="function",r="undefined",o="object",i="string",a="model",s="name",u="type",c="vendor",l="version",f="architecture",h="console",d="mobile",p="tablet",v="smarttv",g="wearable",m="embedded",y="Amazon",b="Apple",w="ASUS",A="BlackBerry",x="Firefox",T="Google",P="Huawei",C="LG",_="Microsoft",E="Motorola",k="Opera",R="Samsung",O="Sony",F="Xiaomi",M="Zebra",I="Facebook",D=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},L=function(e,t){return S(e)===i&&-1!==j(t).indexOf(j(e))},j=function(e){return e.toLowerCase()},B=function(e,t){if(S(e)===i)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),S(t)===r?e:e.substring(0,255)},N=function(e,r){for(var i,a,s,u,c,l,f=0;f<r.length&&!c;){var h=r[f],d=r[f+1];for(i=a=0;i<h.length&&!c;)if(c=h[i++].exec(e))for(s=0;s<d.length;s++)l=c[++a],S(u=d[s])===o&&u.length>0?2===u.length?S(u[1])==n?this[u[0]]=u[1].call(this,l):this[u[0]]=u[1]:3===u.length?S(u[1])!==n||u[1].exec&&u[1].test?this[u[0]]=l?l.replace(u[1],u[2]):t:this[u[0]]=l?u[1].call(this,l,u[2]):t:4===u.length&&(this[u[0]]=l?u[3].call(this,l.replace(u[1],u[2])):t):this[u]=l||t;f+=2}},V=function(e,n){for(var r in n)if(S(n[r])===o&&n[r].length>0){for(var i=0;i<n[r].length;i++)if(L(n[r][i],e))return"?"===r?t:r}else if(L(n[r],e))return"?"===r?t:r;return e},U={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"},W={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[l,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[l,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,l],[/opios[\/ ]+([\w\.]+)/i],[l,[s,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[l,[s,k]],[/(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],[s,l],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[l,[s,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[l,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[l,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[l,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[l,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[l,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],l],[/\bfocus\/([\w\.]+)/i],[l,[s,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[l,[s,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[l,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[l,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[l,[s,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[l,[s,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[l,[s,x]],[/\bqihu|(qi?ho?o?|360)browser/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],l],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],l],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[s,l],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,I],l],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[s,l],[/\bgsa\/([\w\.]+) .*safari\//i],[l,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[l,[s,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],l],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[l,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,l],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[l,[s,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[l,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[l,V,{"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],[s,l],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],l],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[l,[s,"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],[s,l]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,j]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",j]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,j]]],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],[a,[c,R],[u,p]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[a,[c,R],[u,d]],[/\((ip(?:hone|od)[\w ]*);/i],[a,[c,b],[u,d]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[c,b],[u,p]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[a,[c,P],[u,p]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[a,[c,P],[u,d]],[/\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],[[a,/_/g," "],[c,F],[u,d]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[a,/_/g," "],[c,F],[u,p]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[a,[c,"OPPO"],[u,d]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[a,[c,"Vivo"],[u,d]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[a,[c,"Realme"],[u,d]],[/\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],[a,[c,E],[u,d]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[a,[c,E],[u,p]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[c,C],[u,p]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[a,[c,C],[u,d]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[a,[c,"Lenovo"],[u,p]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[a,/_/g," "],[c,"Nokia"],[u,d]],[/(pixel c)\b/i],[a,[c,T],[u,p]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[a,[c,T],[u,d]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[a,[c,O],[u,d]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[a,"Xperia Tablet"],[c,O],[u,p]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[a,[c,"OnePlus"],[u,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[a,[c,y],[u,p]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[a,/(.+)/g,"Fire Phone $1"],[c,y],[u,d]],[/(playbook);[-\w\),; ]+(rim)/i],[a,c,[u,p]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[a,[c,A],[u,d]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[a,[c,w],[u,p]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[a,[c,w],[u,d]],[/(nexus 9)/i],[a,[c,"HTC"],[u,p]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[c,[a,/_/g," "],[u,d]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[a,[c,"Acer"],[u,p]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[a,[c,"Meizu"],[u,d]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[a,[c,"Sharp"],[u,d]],[/(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],[c,a,[u,d]],[/(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],[c,a,[u,p]],[/(surface duo)/i],[a,[c,_],[u,p]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[a,[c,"Fairphone"],[u,d]],[/(u304aa)/i],[a,[c,"AT&T"],[u,d]],[/\bsie-(\w*)/i],[a,[c,"Siemens"],[u,d]],[/\b(rct\w+) b/i],[a,[c,"RCA"],[u,p]],[/\b(venue[\d ]{2,7}) b/i],[a,[c,"Dell"],[u,p]],[/\b(q(?:mv|ta)\w+) b/i],[a,[c,"Verizon"],[u,p]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[a,[c,"Barnes & Noble"],[u,p]],[/\b(tm\d{3}\w+) b/i],[a,[c,"NuVision"],[u,p]],[/\b(k88) b/i],[a,[c,"ZTE"],[u,p]],[/\b(nx\d{3}j) b/i],[a,[c,"ZTE"],[u,d]],[/\b(gen\d{3}) b.+49h/i],[a,[c,"Swiss"],[u,d]],[/\b(zur\d{3}) b/i],[a,[c,"Swiss"],[u,p]],[/\b((zeki)?tb.*\b) b/i],[a,[c,"Zeki"],[u,p]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],a,[u,p]],[/\b(ns-?\w{0,9}) b/i],[a,[c,"Insignia"],[u,p]],[/\b((nxa|next)-?\w{0,9}) b/i],[a,[c,"NextBook"],[u,p]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],a,[u,d]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],a,[u,d]],[/\b(ph-1) /i],[a,[c,"Essential"],[u,d]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[a,[c,"Envizen"],[u,p]],[/\b(trio[-\w\. ]+) b/i],[a,[c,"MachSpeed"],[u,p]],[/\btu_(1491) b/i],[a,[c,"Rotor"],[u,p]],[/(shield[\w ]+) b/i],[a,[c,"Nvidia"],[u,p]],[/(sprint) (\w+)/i],[c,a,[u,d]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[c,_],[u,d]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[c,M],[u,p]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[c,M],[u,d]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,a,[u,h]],[/droid.+; (shield) bui/i],[a,[c,"Nvidia"],[u,h]],[/(playstation [345portablevi]+)/i],[a,[c,O],[u,h]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[a,[c,_],[u,h]],[/smart-tv.+(samsung)/i],[c,[u,v]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[c,R],[u,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,C],[u,v]],[/(apple) ?tv/i],[c,[a,"Apple TV"],[u,v]],[/crkey/i],[[a,"Chromecast"],[c,T],[u,v]],[/droid.+aft(\w)( bui|\))/i],[a,[c,y],[u,v]],[/\(dtv[\);].+(aquos)/i],[a,[c,"Sharp"],[u,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[c,B],[a,B],[u,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,v]],[/((pebble))app/i],[c,a,[u,g]],[/droid.+; (glass) \d/i],[a,[c,T],[u,g]],[/droid.+; (wt63?0{2,3})\)/i],[a,[c,M],[u,g]],[/(quest( 2)?)/i],[a,[c,I],[u,g]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[u,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[a,[u,d]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[a,[u,p]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,p]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[u,d]],[/(android[-\w\. ]{0,9});.+buil/i],[a,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[l,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[l,[s,"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],[s,l],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[l,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,l],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[s,[l,V,U]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[l,V,U]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[l,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"Mac OS"],[l,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[l,s],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[s,l],[/\(bb(10);/i],[l,[s,A]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[l,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[l,[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[l,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[l,[s,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[s,"Chromium OS"],l],[/(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],[s,l],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],l],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[s,l]]},z=function n(a,s){if(S(a)===o&&(s=a,a=t),!(this instanceof n))return new n(a,s).getResult();var u=a||(S(e)!==r&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent:""),c=s?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}(W,s):W;return this.getBrowser=function(){var e={};return e.name=t,e.version=t,N.call(e,u,c.browser),e.major=function(e){return S(e)===i?e.replace(/[^\d\.]/g,"").split(".")[0]:t}(e.version),e},this.getCPU=function(){var e={};return e.architecture=t,N.call(e,u,c.cpu),e},this.getDevice=function(){var e={};return e.vendor=t,e.model=t,e.type=t,N.call(e,u,c.device),e},this.getEngine=function(){var e={};return e.name=t,e.version=t,N.call(e,u,c.engine),e},this.getOS=function(){var e={};return e.name=t,e.version=t,N.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)===i&&e.length>255?B(e,255):e,this},this.setUA(u),this};z.VERSION="1.0.2",z.BROWSER=D([s,l,"major"]),z.CPU=D([f]),z.DEVICE=D([a,c,u,h,d,v,p,g,m]),z.ENGINE=z.OS=D([s,l]),wq.exports&&(Aq=wq.exports=z),Aq.UAParser=z;var H=S(e)!==r&&(e.jQuery||e.Zepto);if(H&&!H.ua){var G=new z;H.ua=G.getResult(),H.ua.get=function(){return G.getUA()},H.ua.set=function(e){G.setUA(e);var t=G.getResult();for(var n in t)H.ua[n]=t[n]}}}("object"===("undefined"==typeof window?"undefined":S(window))?window:q);var Tq=xq.exports;function Pq(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 Cq(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Pq(arguments[t]));return e}var _q=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=Pq(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=Cq(r),i=o.length,a=0;a<i;a++){var s=Pq(o[a],2),u=s[0],c=s[1];u&&"function"==typeof u&&u.apply(c,t)}},e}(),Eq={exports:{}},Sq={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]},kq={exports:{}},Rq=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))},Oq=Array.prototype.concat,Fq=Array.prototype.slice,Mq=kq.exports=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];Rq(o)?t=Oq.call(t,Fq.call(o)):t.push(o)}return t};Mq.wrap=function(e){return function(){return e(Mq(arguments))}};var Iq=Sq,Dq=kq.exports,Lq=Object.hasOwnProperty,jq=Object.create(null);for(var Bq in Iq)Lq.call(Iq,Bq)&&(jq[Iq[Bq]]=Bq);var Nq=Eq.exports={to:{},get:{}};function Vq(e,t,n){return Math.min(Math.max(t,e),n)}function Uq(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}Nq.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=Nq.get.hsl(e),n="hsl";break;case"hwb":t=Nq.get.hwb(e),n="hwb";break;default:t=Nq.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},Nq.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]:Lq.call(Iq,t[1])?((o=Iq[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]=Vq(o[n],0,255);return o[3]=Vq(o[3],0,1),o},Nq.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,Vq(parseFloat(t[2]),0,100),Vq(parseFloat(t[3]),0,100),Vq(isNaN(n)?1:n,0,1)]}return null},Nq.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,Vq(parseFloat(t[2]),0,100),Vq(parseFloat(t[3]),0,100),Vq(isNaN(n)?1:n,0,1)]}return null},Nq.to.hex=function(){var e=Dq(arguments);return"#"+Uq(e[0])+Uq(e[1])+Uq(e[2])+(e[3]<1?Uq(Math.round(255*e[3])):"")},Nq.to.rgb=function(){var e=Dq(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]+")"},Nq.to.rgb.percent=function(){var e=Dq(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]+")"},Nq.to.hsl=function(){var e=Dq(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},Nq.to.hwb=function(){var e=Dq(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},Nq.to.keyword=function(e){return jq[e.slice(0,3)]};for(var Wq=Sq,zq={},Hq=0,Gq=Object.keys(Wq);Hq<Gq.length;Hq++){var Xq=Gq[Hq];zq[Wq[Xq]]=Xq}for(var Qq={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"]}},Yq=Qq,qq=0,Kq=Object.keys(Qq);qq<Kq.length;qq++){var Jq=Kq[qq];if(!("channels"in Qq[Jq]))throw new Error("missing channels property: "+Jq);if(!("labels"in Qq[Jq]))throw new Error("missing channel labels property: "+Jq);if(Qq[Jq].labels.length!==Qq[Jq].channels)throw new Error("channel and label counts mismatch: "+Jq);var Zq=Qq[Jq],$q=Zq.channels,eK=Zq.labels;delete Qq[Jq].channels,delete Qq[Jq].labels,Object.defineProperty(Qq[Jq],"channels",{value:$q}),Object.defineProperty(Qq[Jq],"labels",{value:eK})}Qq.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]},Qq.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]},Qq.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[Qq.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)))]},Qq.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]},Qq.rgb.keyword=function(e){var t=zq[e];if(t)return t;for(var n,r,o,i=1/0,a=0,s=Object.keys(Wq);a<s.length;a++){var u=s[a],c=(r=e,o=Wq[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},Qq.keyword.rgb=function(e){return Wq[e]},Qq.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)]},Qq.rgb.lab=function(e){var t=Qq.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))]},Qq.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},Qq.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)]},Qq.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]}},Qq.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)]},Qq.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]},Qq.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))]},Qq.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))]},Qq.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))]},Qq.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]},Qq.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]},Qq.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)]},Qq.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?Qq.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},Qq.hsv.ansi16=function(e){return Qq.rgb.ansi16(Qq.hsv.rgb(e),e[2])},Qq.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)},Qq.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]},Qq.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]},Qq.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},Qq.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]},Qq.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)]},Qq.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]},Qq.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]},Qq.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)]},Qq.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]},Qq.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]},Qq.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)]},Qq.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]},Qq.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},Qq.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},Qq.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},Qq.gray.hsl=function(e){return[0,0,e[0]]},Qq.gray.hsv=Qq.gray.hsl,Qq.gray.hwb=function(e){return[0,100,e[0]]},Qq.gray.cmyk=function(e){return[0,0,0,e[0]]},Qq.gray.lab=function(e){return[e[0],0,0]},Qq.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},Qq.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var tK=Yq;function nK(e){var t=function(){for(var e={},t=Object.keys(tK),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(tK[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 rK(e,t){return function(n){return t(e(n))}}function oK(e,t){for(var n=[t[e].parent,e],r=tK[t[e].parent][e],o=t[e].parent;t[o].parent;)n.unshift(t[o].parent),r=rK(tK[t[o].parent][o],r),o=t[o].parent;return r.conversion=n,r}var iK=Yq,aK=function(e){for(var t=nK(e),n={},r=Object.keys(t),o=r.length,i=0;i<o;i++){var a=r[i];null!==t[a].parent&&(n[a]=oK(a,t))}return n},sK={};Object.keys(iK).forEach((function(e){sK[e]={},Object.defineProperty(sK[e],"channels",{value:iK[e].channels}),Object.defineProperty(sK[e],"labels",{value:iK[e].labels});var t=aK(e);Object.keys(t).forEach((function(n){var r=t[n];sK[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),sK[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 uK=sK,cK=Eq.exports,lK=uK,fK=["keyword","gray","hex"],hK={},dK=0,pK=Object.keys(lK);dK<pK.length;dK++){var vK=pK[dK];hK[U(lK[vK].labels).sort().join("")]=vK}var gK={};function mK(e,t){if(!(this instanceof mK))return new mK(e,t);if(t&&t in fK&&(t=null),t&&!(t in lK))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 mK)this.model=e.model,this.color=U(e.color),this.valpha=e.valpha;else if("string"==typeof e){var o=cK.get(e);if(null===o)throw new Error("Unable to parse color from string: "+e);this.model=o.model,r=lK[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=lK[this.model].channels;var i=Array.prototype.slice.call(e,0,r);this.color=PK(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 hK))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=hK[s];var u=lK[this.model].labels,c=[];for(n=0;n<u.length;n++)c.push(e[u[n]]);this.color=PK(c)}if(gK[this.model])for(r=lK[this.model].channels,n=0;n<r;n++){var l=gK[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)}mK.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var t=this.model in cK.to?this:this.rgb(),n=1===(t=t.round("number"==typeof e?e:1)).valpha?t.color:[].concat(U(t.color),[this.valpha]);return cK.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 cK.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=lK[this.model].channels,n=lK[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 mK([].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 mK([].concat(U(this.color),[Math.max(0,Math.min(1,e))]),this.model):this.valpha},red:AK("rgb",0,xK(255)),green:AK("rgb",1,xK(255)),blue:AK("rgb",2,xK(255)),hue:AK(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:AK("hsl",1,xK(100)),lightness:AK("hsl",2,xK(100)),saturationv:AK("hsv",1,xK(100)),value:AK("hsv",2,xK(100)),chroma:AK("hcg",1,xK(100)),gray:AK("hcg",2,xK(100)),white:AK("hwb",1,xK(100)),wblack:AK("hwb",2,xK(100)),cyan:AK("cmyk",0,xK(100)),magenta:AK("cmyk",1,xK(100)),yellow:AK("cmyk",2,xK(100)),black:AK("cmyk",3,xK(100)),x:AK("xyz",0,xK(95.047)),y:AK("xyz",1,xK(100)),z:AK("xyz",2,xK(108.833)),l:AK("lab",0,xK(100)),a:AK("lab",1),b:AK("lab",2),keyword:function(e){return void 0!==e?new mK(e):lK[this.model].keyword(this.color)},hex:function(e){return void 0!==e?new mK(e):cK.to.hex(this.rgb().round().color)},hexa:function(e){if(void 0!==e)return new mK(e);var t=this.rgb().round().color,n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),cK.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 mK.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 mK.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 yK=function(){var e=wK[bK];if(fK.includes(e))return"continue";var t=lK[e].channels;mK.prototype[e]=function(){if(this.model===e)return new mK(this);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.length>0?new mK(n,e):new mK([].concat(U(TK(lK[this.model][e].raw(this.color))),[this.valpha]),e)},mK[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=PK(r,t)),new mK(i,e)}},bK=0,wK=Object.keys(lK);bK<wK.length;bK++)yK();function AK(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;(gK[i]||(gK[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 xK(e){return function(t){return Math.max(0,Math.min(e,t))}}function TK(e){return Array.isArray(e)?e:[e]}function PK(e,t){for(var n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}var CK,_K,EK,SK,kK=mK;!function(e){e[e.red=1]="red",e[e.green=2]="green",e[e.blue=3]="blue"}(EK||(EK={})),I(CK={},EK.red,"#db357f"),I(CK,EK.green,"#1eb848"),I(CK,EK.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"}(SK||(SK={})),I(_K={},SK.Total,"total"),I(_K,SK.LeftFace,"occlusion_eye"),I(_K,SK.Eye,"occlusion_left_eye"),I(_K,SK.RightEye,"occlusion_right_eye"),I(_K,SK.Nose,"occlusion_nose"),I(_K,SK.Mouth,"occlusion_mouth"),I(_K,SK.LeftFace,"occlusion_left_face"),I(_K,SK.RightFace,"occlusion_right_face"),I(_K,SK.Chin,"occlusion_chin");var RK,OK={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"}(RK||(RK={}));var FK={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}},MK={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(_q){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(_q){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(_q){t=!0}}else if(window.localStorage&&/Safari/.test(window.navigator.userAgent)){try{window.localStorage.setItem("test",1)}catch(_q){t=!0}void 0===t&&(t=!1,window.localStorage.removeItem("test"))}}catch(_q){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(_q){}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(_q){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(_q){}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}()}(MK);var IK=MK.exports,DK={exports:{}};function LK(e,t,n){function r(r){n&&!n(e,t)||r.stopImmediatePropagation()}return e.addEventListener(t,r),r}function jK(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 BK(e,t,n){n.addEventListener(t,(function(){return e.dispatchEvent(new Event(t))}))}function NK(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(_q){}"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(_q){}}(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(_q){}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(_q){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(_q){}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(_q){}}),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(_q){t(_q)}}))},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(_q){t(_q)}}))},this.pauseRecording=function(){return new Promise((function(e,t){try{r.recordRTC.pauseRecording(),e()}catch(_q){t(_q)}}))},this.resumeRecording=function(){return new Promise((function(e,t){try{r.recordRTC.resumeRecording(),e()}catch(_q){t(_q)}}))},this.getDataURL=function(e){return new Promise((function(e,t){try{r.recordRTC.getDataURL((function(t){e(t)}))}catch(_q){t(_q)}}))},this.getBlob=function(){return new Promise((function(e,t){try{e(r.recordRTC.getBlob())}catch(_q){t(_q)}}))},this.getInternalRecorder=function(){return new Promise((function(e,t){try{e(r.recordRTC.getInternalRecorder())}catch(_q){t(_q)}}))},this.reset=function(){return new Promise((function(e,t){try{e(r.recordRTC.reset())}catch(_q){t(_q)}}))},this.destroy=function(){return new Promise((function(e,t){try{e(r.recordRTC.destroy())}catch(_q){t(_q)}}))},this.getState=function(){return new Promise((function(e,t){try{e(r.recordRTC.getState())}catch(_q){t(_q)}}))},this.blob=null,this.version="5.6.2"},t.WebAssemblyRecorder=I}(DK);var VK="object"===("undefined"==typeof document?"undefined":S(document))&&"object-fit"in document.head.style&&!matchMedia("(-webkit-video-playable-inline)").matches,UK="bfred-it:iphone-inline-video",WK="bfred-it:iphone-inline-video:event",zK="bfred-it:iphone-inline-video:nativeplay",HK="bfred-it:iphone-inline-video:nativepause";var GK,XK=[],QK=0;function YK(e,t,n){(GK||0)+200<Date.now()&&(e[WK]=!0,GK=Date.now()),n||(e.currentTime=t),XK[++QK%3]=100*t|0}function qK(e){return e.driver.currentTime>=e.video.duration}function KK(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&&qK(t)&&(t.driver.currentTime=0)),YK(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[WK],t.video.pause(!0))}function JK(){var e=this,t=e[UK];e.webkitDisplayingFullscreen?e[zK]():("data:"!==t.driver.src&&t.driver.src!==e.src&&(YK(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||(NK(e,"play"),t.video.readyState>=t.video.HAVE_ENOUGH_DATA&&NK(e,"playing"))))}function ZK(e){var t=this,n=t[UK];n.driver.pause(),n.updater.stop(),t.webkitDisplayingFullscreen&&t[HK](),n.paused&&!e||(n.paused=!0,n.hasAudio||NK(t,"pause"),t.ended&&!t.webkitDisplayingFullscreen&&(t[WK]=!0,NK(t,"ended")))}function $K(e,t){var n={};e[UK]=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}}}(KK.bind(n),requestAnimationFrame,cancelAnimationFrame),t?n.driver=function(e){var t=new Audio;return BK(e,"play",t),BK(e,"playing",t),BK(e,"pause",t),t.crossOrigin=e.crossOrigin,t.src=e.src||e.currentSrc||"data:",t}(e):(e.addEventListener("canplay",(function(){e.paused||NK(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,qK(n)&&YK(e,0)},get ended(){return qK(n)}}),e.addEventListener("emptied",(function(){var r=!n.driver.src||"data:"===n.driver.src;n.driver.src&&n.driver.src!==e.src&&(YK(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[zK]())})),t&&(e.addEventListener("webkitendfullscreen",(function(){n.driver.currentTime=e.currentTime})),e.addEventListener("seeking",(function(){XK.indexOf(100*e.currentTime|0)<0&&(n.driver.currentTime=e.currentTime)})))}function eJ(e){var t=e[WK];return delete e[WK],!e.webkitDisplayingFullscreen&&!t}function tJ(e,t){if(void 0===t&&(t={}),!e[UK]){if(!t.everywhere){if(!VK)return;if(!(t.iPad||t.ipad?/iPhone|iPod|iPad/:/iPhone|iPod/).test(navigator.userAgent))return}e.pause();var n=e.autoplay;e.autoplay=!1,$K(e,!e.muted),function(e){var t=e[UK];e[zK]=e.play,e[HK]=e.pause,e.play=JK,e.pause=ZK,jK(e,"paused",t.driver),jK(e,"muted",t.driver,!0),jK(e,"playbackRate",t.driver,!0),jK(e,"ended",t.driver),jK(e,"loop",t.driver,!0),LK(e,"seeking",(function(e){return!e.webkitDisplayingFullscreen})),LK(e,"seeked",(function(e){return!e.webkitDisplayingFullscreen})),LK(e,"timeupdate",eJ),LK(e,"ended",eJ)}(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 nJ={exports:{}},rJ={exports:{}};(function(){var e,t,n,r,o,i;"undefined"!=typeof performance&&null!==performance&&performance.now?rJ.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(rJ.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?(rJ.exports=function(){return Date.now()-n},n=Date.now()):(rJ.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(q);for(var oJ=rJ.exports,iJ="undefined"==typeof window?q:window,aJ=["moz","webkit"],sJ="AnimationFrame",uJ=iJ["request"+sJ],cJ=iJ["cancel"+sJ]||iJ["cancelRequest"+sJ],lJ=0;!uJ&&lJ<aJ.length;lJ++)uJ=iJ[aJ[lJ]+"Request"+sJ],cJ=iJ[aJ[lJ]+"Cancel"+sJ]||iJ[aJ[lJ]+"CancelRequest"+sJ];if(!uJ||!cJ){var fJ=0,hJ=0,dJ=[];uJ=function(e){if(0===dJ.length){var t=oJ(),n=Math.max(0,16.666666666666668-(t-fJ));fJ=n+t,setTimeout((function(){var e=dJ.slice(0);dJ.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(fJ)}catch(_q){setTimeout((function(){throw _q}),0)}}),Math.round(n))}return dJ.push({handle:++hJ,callback:e,cancelled:!1}),hJ},cJ=function(e){for(var t=0;t<dJ.length;t++)dJ[t].handle===e&&(dJ[t].cancelled=!0)}}nJ.exports=function(e){return uJ.call(iJ,e)},nJ.exports.cancel=function(){cJ.apply(iJ,arguments)},nJ.exports.polyfill=function(e){e||(e=iJ),e.requestAnimationFrame=uJ,e.cancelAnimationFrame=cJ};var pJ=nJ.exports,vJ=function(e,t){return vJ=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])},vJ(e,t)};function gJ(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}vJ(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var mJ=function(){return mJ=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},mJ.apply(this,arguments)};function yJ(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(_q){i(_q)}}function s(e){try{u(r.throw(e))}catch(_q){i(_q)}}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 bJ(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(_q){i=[6,_q],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 wJ(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 AJ(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(w1){o={error:w1}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function xJ(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 TJ(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}var PJ,CJ=function(){function e(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}return e.Undefined=new e(void 0),e}(),_J=function(){function e(){this._first=CJ.Undefined,this._last=CJ.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===CJ.Undefined},e.prototype.clear=function(){for(var e=this._first;e!==CJ.Undefined;){var t=e.next;e.prev=CJ.Undefined,e.next=CJ.Undefined,e=t}this._first=CJ.Undefined,this._last=CJ.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 CJ(e);if(this._first===CJ.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!==CJ.Undefined){var e=this._first.element;return this._remove(this._first),e}},e.prototype.pop=function(){if(this._last!==CJ.Undefined){var e=this._last.element;return this._remove(this._last),e}},e.prototype._remove=function(e){if(e.prev!==CJ.Undefined&&e.next!==CJ.Undefined){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===CJ.Undefined&&e.next===CJ.Undefined?(this._first=CJ.Undefined,this._last=CJ.Undefined):e.next===CJ.Undefined?(this._last=this._last.prev,this._last.next=CJ.Undefined):e.prev===CJ.Undefined&&(this._first=this._first.next,this._first.prev=CJ.Undefined);this._size-=1},e.prototype[Symbol.iterator]=function(){var e;return bJ(this,(function(t){switch(t.label){case 0:e=this._first,t.label=1;case 1:return e===CJ.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 bJ(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=wJ(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=wJ(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 bJ(this,(function(u){switch(u.label){case 0:u.trys.push([0,5,6,7]),n=wJ(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 bJ(this,(function(c){switch(c.label){case 0:n=0,c.label=1;case 1:c.trys.push([1,6,7,8]),r=wJ(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 bJ(this,(function(e){switch(e.label){case 0:e.trys.push([0,11,12,13]),t=wJ(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=wJ(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 bJ(this,(function(h){switch(h.label){case 0:h.trys.push([0,11,12,13]),t=wJ(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=wJ(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=wJ(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),bJ(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}}}(PJ||(PJ={}));var EJ=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}(),SJ=new EJ;function kJ(e){var t;(t=e)instanceof Error&&"Canceled"===t.name&&"Canceled"===t.message||SJ.onUnexpectedError(e)}!function(e){function t(){var t=e.call(this,"Canceled")||this;return t.name=t.message,t}gJ(t,e)}(Error),function(e){function t(t){var n=e.call(this,"NotImplemented")||this;return t&&(n.message=t),n}gJ(t,e)}(Error),function(e){function t(t){var n=e.call(this,"NotSupported")||this;return t&&(n.message=t),n}gJ(t,e)}(Error);var RJ=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 gJ(t,e),t}(Error);function OJ(e){var t,n;if(PJ.is(e)){var r=[];try{for(var o=wJ(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(a)try{a.dispose()}catch(_q){r.push(_q)}}}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 RJ(r);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function FJ(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=MJ((function(){return OJ(e)}));return n}function MJ(e){return{dispose:TJ((function(){e()}))}}var IJ=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{OJ(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}(),DJ=function(){function e(){this._store=new IJ,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 LJ,jJ="object"===("undefined"==typeof self?"undefined":S(self))?self:"object"===("undefined"==typeof global?"undefined":S(global))?global:{},BJ=jJ.performance&&"function"==typeof jJ.performance.now,NJ=function(){function e(e){this._highResolution=BJ&&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?jJ.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 UJ({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 UJ({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 DJ.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),FJ.apply(void 0,xJ([],AJ(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 UJ({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,xJ([],AJ(e),!1)))},o=new UJ({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,xJ([],AJ(e),!1)))},o=new UJ({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)}))}}(LJ||(LJ={}));var VJ=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 NJ(!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}(),UJ=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 VJ(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 _J);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=MJ((function(){(s&&s(),e._disposed)||(a(),e._options&&e._options.onLastListenerRemove&&(e._listeners&&!e._listeners.isEmpty()||e._options.onLastListenerRemove(e)))}));return r instanceof IJ?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 _J);try{for(var i=wJ(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=AJ(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(_q){kJ(_q)}}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 WJ(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 zJ(e){return new Promise((function(t){setTimeout(t,e)}))}function HJ(e,t){return e+Math.round(Math.random()*(t-e))}function GJ(){for(var e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",t=e.length-1,n="";n.length<16;)n+=e[HJ(0,t)];return encodeURIComponent(n)}function XJ(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}gJ(t,e),t.prototype.fireAsync=function(e,t,n){return yJ(this,void 0,void 0,(function(){var r,o,i,a,s,u,c;return bJ(this,(function(l){switch(l.label){case 0:if(!this._listeners)return[2];this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new _J);try{for(r=wJ(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 bJ(this,(function(a){switch(a.label){case 0:e=AJ(s._asyncDeliveryQueue.shift(),2),t=e[0],r=e[1],o=[],i=mJ(mJ({},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(_q){return kJ(_q),[2,"continue"]}return Object.freeze(o),[4,Promise.allSettled(o).then((function(e){var t,n;try{for(var r=(t=void 0,wJ(e)),o=r.next();!o.done;o=r.next()){var i=o.value;"rejected"===i.status&&kJ(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]}}))}))}}(UJ),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}gJ(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 _J,n._mergeFn=null==t?void 0:t.merge,n}return gJ(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}(UJ)),function(e){function t(t){var n=e.call(this,t)||this;return n._queuedEvents=[],n._mergeFn=null==t?void 0:t.merge,n}gJ(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=[]}))}}(UJ),function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new UJ({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 MJ(TJ((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=LJ.None,this.inputEventListener=DJ.None,this.emitter=new UJ({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 QJ=new WeakMap,YJ=new WeakMap,qJ=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,QJ,{writable:!0,value:void 0}),Y(this,YJ,{writable:!0,value:void 0}),I(this,"_videoElement",void 0),I(this,"_originSizeCanvasAndCtx",void 0),I(this,"_frameDrawingHandler",-1),I(this,"_onFrameDrawingFinished",new UJ),I(this,"createVideoStream",R(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!G(a,QJ).useSecure){e.next=3;break}e.next=10;break;case 3:return e.t0=X,e.t1=a,e.t2=YJ,e.next=8,navigator.mediaDevices.getUserMedia(G(a,QJ).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,YJ)}catch(_q){a._videoElement.src=URL.createObjectURL(G(a,YJ))}finally{G(a,QJ).needToRecord&&(a.recorder=new DK.exports.RecordRTCPromisesHandler(G(a,YJ),{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,YJ).getTracks().forEach((function(e){return e.stop()}))}catch(_q){}})),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=pJ((function e(){a.frameInfoCanvas=a.grabPictureCanvas(),a._onFrameDrawingFinished.fire(),a._frameDrawingHandler=pJ(e)}))})),I(this,"cancelFrameDrawing",(function(){a._frameDrawingHandler&&(pJ.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,QJ,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,QJ).useSecure}return M(e,[{key:"hasStream",get:function(){return!!G(this,YJ)}},{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,QJ).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),tJ(e._videoElement),e._videoElement.play().catch((function(){}))})),this._videoElement.addEventListener("loadedmetadata",(function(){e._videoElement.play().catch((function(){}))}))}}],[{key:"isSupport",value:function(){return IK.isGetUserMediaSupported}}]),e}();I(qJ,"grabPictureCfg",{type:"image/jpeg",quality:.96});var KJ={exports:{}};KJ.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)}();!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}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)}();var JJ=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}(),ZJ=[-.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],$J=new JJ([[-.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 eZ(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 tZ(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=eZ(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 nZ(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 rZ(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 oZ(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 iZ(e){return function(t){return[e[2*t],e[2*t+1]]}}function aZ(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function sZ(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 uZ(e){var t=iZ(e),n=V([58,60,62,64].map(t),4),r=n[0],o=n[1],i=n[2];return aZ(o,n[3])/aZ(r,i)>=.5?1:0}function cZ(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([ZJ[3*t[a]]-ZJ[3*t[0]],ZJ[3*t[a]+1]-ZJ[3*t[0]+1],ZJ[3*t[a]+2]-ZJ[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 JJ(t.arr.map((function(e){return[].concat(U(e),[1])}))),l=new JJ(a),f=new JJ(s),h=new JJ(u),d=!1,p=0,v=[],g=[],m=[];!d;){var y=$J.mult(l),b=$J.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 JJ([].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 JJ(o),new JJ(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 lZ(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 fZ(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 hZ=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)},dZ=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.8,r=hZ(e,t);return r>n};function pZ(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=cZ(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 vZ(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 gZ(e){return-e.angles.reduce((function(e,t){return Math.abs(e)+Math.abs(t)}),0)}var mZ=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 KJ.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=nZ({img:t,maxW:n,maxH:r}),i=o.scale,a=o.imageData,this.scale=i,s=lZ(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}(),yZ=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 KJ.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=eZ(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=tZ({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:oZ(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(yZ,"DEFAULT_WIDTH",128),I(yZ,"DEFAULT_HEIGHT",128);var bZ=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 KJ.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=iZ(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=sZ(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,rZ(r,yZ.DEFAULT_WIDTH,yZ.DEFAULT_HEIGHT,!1,null,null);case 13:h=t.sent;case 14:return d=tZ({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:oZ(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(bZ,"DEFAULT_WIDTH",56),I(bZ,"DEFAULT_HEIGHT",36);var wZ,AZ=KJ.exports.coreUtils.findVarByKey,xZ=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 KJ.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=AZ(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 KJ.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}(),TZ={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"}(wZ||(wZ={}));var PZ=!0,CZ=!0;function _Z(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function EZ(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 SZ(e){return"boolean"!=typeof e?new Error("Argument type: "+S(e)+". Please use a boolean."):(PZ=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function kZ(e){return"boolean"!=typeof e?new Error("Argument type: "+S(e)+". Please use a boolean."):(CZ=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function RZ(){if("object"===("undefined"==typeof window?"undefined":S(window))){if(PZ)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function OZ(e,t){CZ&&console.warn(e+" is deprecated, please use "+t+" instead.")}function FZ(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=_Z(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection&&!e.RTCIceGatherer)t.browser="chrome",t.version=_Z(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=_Z(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t}function MZ(e){return"[object Object]"===Object.prototype.toString.call(e)}function IZ(e){return MZ(e)?Object.keys(e).reduce((function(t,n){var r=MZ(e[n]),o=r?IZ(e[n]):e[n],i=r&&!Object.keys(o).length;return void 0===o||i?t:Object.assign(t,I({},n,o))}),{}):e}function DZ(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach((function(r){r.endsWith("Id")?DZ(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach((function(t){DZ(e,e.get(t),n)}))})))}function LZ(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&&DZ(e,n,o)}))})),o}var jZ=RZ;function BZ(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),jZ("chrome: "+JSON.stringify(e)),o(e)}));e.video=r(e.video)}return jZ("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 NZ(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function VZ(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 EZ(e,"track",(function(e){return e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e}))}function UZ(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 WZ(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 zZ(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 LZ(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}),EZ(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 LZ(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 HZ(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 GZ(e,t){if(e.RTCPeerConnection){if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return HZ(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 XZ(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 QZ(e,t){EZ(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 YZ=Object.freeze({__proto__:null,shimMediaStream:NZ,shimOnTrack:VZ,shimGetSendersWithDtmf:UZ,shimGetStats:WZ,shimSenderReceiverGetStats:zZ,shimAddTrackRemoveTrackWithNative:HZ,shimAddTrackRemoveTrack:GZ,shimPeerConnection:XZ,fixNegotiationNeeded:QZ,shimGetUserMedia:BZ,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 qZ(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){OZ("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 KZ(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 JZ(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(_q){if("TypeError"!==_q.name)throw _q;e.forEach((function(t,r){e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))}))}return e})).then(i,a)}}}function ZZ(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 $Z(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}),EZ(e,"track",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}}function e$(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;OZ("removeStream","removeTrack"),this.getSenders().forEach((function(n){n.track&&e.getTracks().includes(n.track)&&t.removeTrack(n)}))})}function t$(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function n$(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 r$(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 o$(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 i$(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 a$=Object.freeze({__proto__:null,shimOnTrack:KZ,shimPeerConnection:JZ,shimSenderGetStats:ZZ,shimReceiverGetStats:$Z,shimRemoveStream:e$,shimRTCDataChannel:t$,shimAddTransceiver:n$,shimGetParameters:r$,shimCreateOffer:o$,shimCreateAnswer:i$,shimGetUserMedia:qZ,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 s$(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 u$(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 c$(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 l$(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(f$(e))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function f$(e){return e&&void 0!==e.video?Object.assign({},e,{video:IZ(e.video)}):e}function h$(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")?(OZ("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 d$(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 p$(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 v$(e){"object"!==S(e)||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var g$=Object.freeze({__proto__:null,shimLocalStreamsAPI:s$,shimRemoteStreamsAPI:u$,shimCallbacksAPI:c$,shimGetUserMedia:l$,shimConstraints:f$,shimRTCIceServerUrls:h$,shimTrackEventTransceiver:d$,shimCreateOfferLegacy:p$,shimAudioContext:v$}),m$={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}(m$);var y$=m$.exports,b$=C({__proto__:null,default:y$},[m$.exports]);function w$(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=y$.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,EZ(e,"icecandidate",(function(t){return t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t}))}}function A$(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=y$.splitSections(e.sdp);return t.shift(),t.some((function(e){var t=y$.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=y$.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 x$(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},EZ(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 T$(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 P$(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 C$(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 _$(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 E$=Object.freeze({__proto__:null,shimRTCIceCandidate:w$,shimMaxMessageSize:A$,shimSendThrowTypeError:x$,shimConnectionState:T$,removeExtmapAllowMixed:P$,shimAddIceCandidateNullOrEmpty:C$,shimParameterlessSetLocalDescription:_$});!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=RZ,o=FZ(t),i={browserDetails:o,commonShim:E$,extractVersion:_Z,disableLog:SZ,disableWarnings:kZ,sdp:b$};switch(o.browser){case"chrome":if(!YZ||!XZ||!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=YZ,C$(t,o),_$(t),BZ(t,o),NZ(t),XZ(t,o),VZ(t),GZ(t,o),UZ(t),WZ(t),zZ(t),QZ(t,o),w$(t),T$(t),A$(t,o),x$(t),P$(t,o);break;case"firefox":if(!a$||!JZ||!n.shimFirefox)return r("Firefox shim is not included in this adapter release."),i;r("adapter.js shimming firefox."),i.browserShim=a$,C$(t,o),_$(t),qZ(t,o),JZ(t,o),KZ(t),e$(t),ZZ(t),$Z(t),t$(t),n$(t),r$(t),o$(t),i$(t),w$(t),T$(t),A$(t,o),x$(t);break;case"safari":if(!g$||!n.shimSafari)return r("Safari shim is not included in this adapter release."),i;r("adapter.js shimming safari."),i.browserShim=g$,C$(t,o),_$(t),h$(t),p$(t),c$(t),s$(t),u$(t),d$(t),l$(t),v$(t),w$(t),A$(t,o),x$(t),P$(t,o);break;default:r("Unsupported browser!")}}({window:"undefined"==typeof window?void 0:window});var S$=["Quark","NokiaBrowser","UCBrowser"],k$=[{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"}}],R$=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,_q);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:OK[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(qJ.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===wZ.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 gZ(t)-gZ(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 qJ(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 Tq).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=GJ(),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=XJ(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,WJ(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=FK[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,zJ(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!==wZ.silence){e.next=64;break}return e.next=62,this.silenceFinish();case 62:e.next=75;break;case 64:if(w!==wZ.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===wZ.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(!dZ(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=fZ([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=cZ(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,zJ(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=FK[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=uZ(t),h=vZ(f=u+l),d=V(h,2),p=d[0],v=d[1],M=void 0,I=void 0,D=void 0,M=V(cZ(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=uZ(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=vZ(T),_=V(C,2),E=_[0],S=_[1],k=vZ(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),!pZ(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,kK(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?TZ.occlusion:{eye:1,mouse:1,nose:1,leftFace:1,rightFace:1,chin:1}:E(E({},TZ.occlusion),e.occlusion));return this.options=E(E(E({},TZ),e),{},{video:t,occlusion:n}),(this.options.solutionType===wZ.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 mZ(t),this.alignModel=new yZ(t),this.eyesModel=new bZ(t),this.pdModel=new xZ(t),this}}],[{key:"isSupport",value:function(){return e=(new Tq).getResult(),t=e.browser,n=e.os,r=e.device,!(t.name&&S$.includes(t.name)||k$.find((function(e){return e.device.vendor===r.vendor&&e.os.name===n.name&&e.os.version===n.version})))&&qJ.isSupport();var e,t,n,r}},{key:"isExtraNotSupport",value:function(){var e,t,n=new Tq,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 Tq}}]),f}();I(R$,"ACTION_CONFIG",FK),I(R$,"defaultOptions",E({},TZ)),I(R$,"defaultColorMap",["#db357f","#1eb848","#371dc0"]),I(R$,"occlusionThreshold",.8);var O$="undefined"==typeof atob?function(e){return Buffer.from(e,"base64").toString("binary")}:atob,F$="undefined"==typeof btoa?function(e){return Buffer.from(e,"binary").toString("base64")}:btoa;function M$(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 I$(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 D$(e){return e instanceof Uint8Array}function L$(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 j$(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 B$,N$,V$=function(e){c(n,p(Error));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)}(),U$=function(e){c(n,p(Error));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)}(),W$=function(e){c(n,p(Error));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)}(),z$=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}(),H$=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||L$().subarray(z$.HEAP_DATA),this.asm=s||new z$(null,this.heap.buffer),this.pos=0,this.len=0;var u=t.length;if(16!==u&&24!==u&&32!==u)throw new U$("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 U$("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(!D$(e))throw new TypeError("data isn't of expected type");for(var t=this.asm,n=this.heap,r=z$.ENC[this.mode],o=z$.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=j$(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=z$.ENC[this.mode],r=z$.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 U$("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(!D$(e))throw new TypeError("data isn't of expected type");var t=this.asm,n=this.heap,r=z$.DEC[this.mode],o=z$.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=j$(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=z$.DEC[this.mode],r=z$.HEAP_DATA,o=this.pos,i=this.len,a=i;if(i>0){if(i%16){if(this.hasOwnProperty("padding"))throw new U$("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 W$("bad padding");for(var u=0,c=s;c>1;c--)u|=s^t[o+a-c];if(u)throw new W$("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}(),G$=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 H$(t,void 0,!1,"CTR"),this.aes.asm.gcm_init(),this.tagSize<4||this.tagSize>16)throw new U$("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(z$.MAC.GCM,z$.HEAP_DATA,16),this.aes.asm.get_iv(z$.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>68719476704)throw new U$("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>68719476704)throw new RangeError("counter overflow");for(var f=new Uint8Array(c);n>0;)s+=l=j$(o,a+s,e,t,n),t+=l,n-=l,l=r.cipher(z$.ENC.CTR,z$.HEAP_DATA+a,s),(l=r.mac(z$.MAC.GCM,z$.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(z$.ENC.CTR,z$.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(z$.MAC.GCM,z$.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(z$.MAC.GCM,z$.HEAP_DATA,16),e.get_iv(z$.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(z$.ENC.CTR,z$.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>68719476704)throw new RangeError("counter overflow");for(var d=new Uint8Array(l);n>f;)u+=h=j$(o,s+u,e,t,n-f),t+=h,n-=h,h=r.mac(z$.MAC.GCM,z$.HEAP_DATA+s,h),(h=r.cipher(z$.DEC.CTR,z$.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+=j$(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 V$("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(z$.MAC.GCM,z$.HEAP_DATA+i,l),e.cipher(z$.DEC.CTR,z$.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(z$.MAC.GCM,z$.HEAP_DATA,16),e.get_iv(z$.HEAP_DATA),e.set_counter(0,0,0,this.gamma0),e.cipher(z$.ENC.CTR,z$.HEAP_DATA,16);for(var d=0,p=0;p<n;++p)d|=c[p]^t[p];if(d)throw new W$("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=j$(t,0,e,r,o),o-=i;15&i;)t[i++]=0;n.mac(z$.MAC.GCM,z$.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}(),X$=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("")},Q$=function(e){"object"===n(e)&&(e=JSON.stringify(e));var t="".concat(X$(3),":").concat(X$(3),":").concat(X$(3),":").concat(X$(4)),r=X$(12),o=G$.encrypt(M$(e),M$(t),M$(r));return{key:t,iv:r,eyptStr:F$(I$(o))}},Y$=function(e,t,n){var r=G$.decrypt(function(e){return M$(O$(e))}(e),M$(t),M$(n));return I$(r)},q$=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}(),K$=new q$;K$.setCurrentLang("zh-CN");K$.add("zh-CN",(u(B$={},"Loading...","准备中..."),u(B$,"FaceTheScreen","请正对屏幕"),u(B$,"DetectionCompleted","检测完成"),u(B$,"WellLit","光线充足"),u(B$,"FacePhone","正对手机"),u(B$,"DoNotCoverFace","脸无遮挡"),u(B$,"XhrError","网络请求错误"),u(B$,"CheckError","校验不通过"),u(B$,"CheckNetFail","校验接口网络错误"),u(B$,"Rejected","浏览器没有摄像头权限或⽤户拒绝授权"),u(B$,"Auth","鉴权不通过"),u(B$,"Unsupported","浏览器不支持"),u(B$,"NotAllowed","用户拒绝了相机权限"),u(B$,"NotFound","找不到摄像头"),u(B$,"NotReadable","异常硬件导致无法读取摄像头"),u(B$,"OverConstrained","摄像头分辨率过低"),u(B$,"Abort","未知问题导致摄像头无法被使用"),u(B$,"PdFail","炫瞳检测失败"),u(B$,"GetConfNetFail","获取配置接口网络错误"),u(B$,"GetConfFail","获取配置失败,请检查接入配置是否正确"),u(B$,"TipEmpty","未检测到⼈脸"),u(B$,"TipMultiple","请保持单⼈⼊镜"),u(B$,"TipOutside","请将⼈脸移⼊框内"),u(B$,"TipClose","请远离屏幕"),u(B$,"TipFar","请靠近屏幕"),u(B$,"TipLight","请调暗环境光线"),u(B$,"TipDark","请调亮环境光线"),u(B$,"TipRotate","请保持正脸"),u(B$,"TipBlink","眨眨眼"),u(B$,"TipMouthopen","张张嘴"),u(B$,"TipHeadRight","向右转头"),u(B$,"TipHeadLeft","向左转头"),u(B$,"TipLookup","向上抬头"),u(B$,"TipLookdown","向下低头"),u(B$,"TipActionOver","动作核验完成"),u(B$,"TipColorReady","屏幕即将闪烁,请保持正脸"),u(B$,"TipColorRunning","变光中,请保持正脸"),u(B$,"TipOK","请保持不动"),u(B$,"TipTimeout","采集超时"),u(B$,"FailTipUnsupported","该浏览器不支持"),u(B$,"FailTipNotAllowed","请开启相机权限"),u(B$,"FailTipNotFound","找不到摄像头"),u(B$,"FailTipNotReadable","异常硬件导致无法读取摄像头"),u(B$,"FailTipOverConstrained","摄像头分辨率过低"),u(B$,"FailTipAbort","未知错误导致无法读取摄像头"),u(B$,"FailTipPDFail","炫瞳检测失败"),u(B$,"FailTipTimeout","检测超时"),u(B$,"FailTipReject","获取相机权限失败"),u(B$,"FailTipAuth","认证不通过"),u(B$,"VideoActionOpenMouth","张嘴"),u(B$,"VideoActionWink","眨眼"),u(B$,"VideoTipTesting","检测中,请耐心等待"),u(B$,"VideoTipDuration","视频长度和手机的网络速度会影响视频式活体的检测时间,如果视频中面部不完整可能会检测失败"),u(B$,"VideoTipCameraFail","打开摄像头失败"),u(B$,"VideoTipSelfRecord","请自行录制一段视频进行验证"),u(B$,"VideoTipBrightenEnv","请在明亮环境下录制 3~5 秒"),u(B$,"VideoTipBlink35","请在录制过程中眨眼 3~5 次"),u(B$,"VideoTipOpenMouth35","请在录制过程中张嘴 3~5 次"),u(B$,"VideoTipVideoLen35","请保持完整面部轮廓在视频中"),u(B$,"VideoStartRecord","开始录制"),u(B$,"VideoTipVideoTooLarge","当前视频大于 15M,请重新上传"),u(B$,"VideoTipVideoUseless","未采集到有效视频,请重新上传"),B$)),K$.add("en-US",(u(N$={},"Loading...","Loading"),u(N$,"FaceTheScreen","Face the screen"),u(N$,"DetectionCompleted","Detection completed"),u(N$,"WellLit","Keep well lit"),u(N$,"FacePhone","Facing the phone"),u(N$,"DoNotCoverFace","Do not cover the face"),u(N$,"XhrError","Network request error"),u(N$,"CheckError","Verification failed"),u(N$,"CheckNetFail","check interface network error"),u(N$,"Rejected","The browser does not have the camera permission or the user refuses to authorize"),u(N$,"Auth","Authentication failed"),u(N$,"Unsupported","Browser does not support"),u(N$,"NotAllowed","User denied camera permission"),u(N$,"NotFound","Camera not found"),u(N$,"NotReadable","Abnormal hardware makes it impossible to read the camera"),u(N$,"OverConstrained","Camera resolution is too low"),u(N$,"Abort","An unknown problem prevents the camera from being used"),u(N$,"PdFail","Dazzling detection failed"),u(N$,"GetConfNetFail","Get config interface network error"),u(N$,"GetConfFail","Failed to obtain the configuration, please check whether the access configuration is correct"),u(N$,"TipEmpty","No face detected"),u(N$,"TipMultiple","Stay single"),u(N$,"TipOutside","Move the face into the frame"),u(N$,"TipClose","Stay away from the screen"),u(N$,"TipFar","Move closer to the screen"),u(N$,"TipLight","Dim the ambient light"),u(N$,"TipDark","Brighten the ambient light"),u(N$,"TipRotate","Keep a straight face"),u(N$,"TipBlink","Wink"),u(N$,"TipMouthopen","Open mouth"),u(N$,"TipHeadRight","Turn head right"),u(N$,"TipHeadLeft","Turn head left"),u(N$,"TipLookup","Look up"),u(N$,"TipLookdown","Look down"),u(N$,"TipActionOver","Action verification completed"),u(N$,"TipColorReady","The screen is about to flash, please keep facing the screen"),u(N$,"TipColorRunning","During dimming, please keep facing the screen"),u(N$,"TipOK","Please stay still"),u(N$,"TipTimeout","Collection timeout"),u(N$,"FailTipUnsupported","This browser does not support"),u(N$,"FailTipNotAllowed","Please enable camera permission"),u(N$,"FailTipNotFound","Camera not found"),u(N$,"FailTipNotReadable","Can not read the camera"),u(N$,"FailTipOverConstrained","Camera resolution is too low"),u(N$,"FailTipAbort","An unknown error prevented the camera from being read"),u(N$,"FailTipPDFail","Dazzling detection failed"),u(N$,"FailTipTimeout","Detection timeout"),u(N$,"FailTipReject","Failed to get camera permission"),u(N$,"FailTipAuth","Authentication failed"),u(N$,"VideoActionOpenMouth","open mouth"),u(N$,"VideoActionWink","wink"),u(N$,"VideoTipTesting","Testing, please wait"),u(N$,"VideoTipDuration","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(N$,"VideoTipCameraFail","Failed to open camera"),u(N$,"VideoTipSelfRecord","Please record a video yourself to verify"),u(N$,"VideoTipBrightenEnv","Please record for 3-5 seconds in a bright environment"),u(N$,"VideoTipBlink35","Please blink 3-5 times during recording"),u(N$,"VideoTipOpenMouth35","Please open mouth 3-5 times during recording"),u(N$,"VideoTipVideoLen35","Don not get too close to the camera, keep full facial contours in the video"),u(N$,"VideoStartRecord","Start recording"),u(N$,"VideoTipVideoTooLarge","The video is larger than 15M, please re-upload"),u(N$,"VideoTipVideoUseless","No valid video captured, please upload again"),N$));var J$="ne-live-detection",Z$="tip",$$="action",e0="color",t0="loading",n0="update-config",r0="video-change",o0="update-record-step",i0="ready",a0="verify",s0="error",u0="timeout",c0="checking",l0="check-done",f0={XHR_ERROR:[-8001,"XhrError"],CHECK_ERROR:[1e4,"CheckError"],CHECK_NET_FAIL:[10001,"CheckNetFail"],REJECTED:[11e3,"Rejected"],AUTH:[11001,"Auth"],UNSUPPORT:[11002,"Unsupported"],NOT_ALLOWED:[11003,"NotAllowed"],NOT_FOUND:[11004,"NotFound"],NOT_READABLE:[11005,"NotReadable"],OVER_CONSTRAINED:[11006,"OverConstrained"],ABORT:[11007,"Abort"],PD_FAIL:[11008,"PdFail"],GET_CONF_NET_FAIL:[12e3,"GetConfNetFail"],GET_CONF_FAIL:[12001,"GetConfFail"]},h0=2,d0=3,p0={EMPTY:["empty","TipEmpty"],MULTIPLE:["multiple","TipMultiple"],OUTSIDE:["outside","TipOutside"],CLOSE:["close","TipClose"],FAR:["far","TipFar"],LIGHT:["light","TipLight"],DARK:["dark","TipDark"],ROTATE:["rotate","TipRotate"],BLINK:["blink","TipBlink"],MOUTHOPEN:["mouthopen","TipMouthopen"],HEADRIGHT:["headright","TipHeadRight"],HEADLEFT:["headleft","TipHeadLeft"],LOOKUP:["lookup","TipLookup"],LOOKDOWN:["lookdown","TipLookdown"],ACTION_OVER:["action_over","TipActionOver"],COLOR_READY:["color_ready","TipColorReady"],COLOR_RUNNING:["color_running","TipColorRunning"],OK:["ok","TipOK"],TIMEOUT:["timeout","TipTimeout"]},v0={UNSUPPORTED:["unsupported","FailTipUnsupported"],NOT_ALLOWED:["notallowed","FailTipNotAllowed"],NOT_FOUND:["notfound","FailTipNotFound"],NOT_READABLE:["notreadable","FailTipNotReadable"],OVER_CONSTRAINED:["overconstrained","FailTipOverConstrained"],ABORT:["abort","FailTipAbort"],PD_FAIL:["pdFail","FailTipPDFail"],TIMEOUT:["timeout","FailTipTimeout"],REJECT:["reject","FailTipReject"],AUTH:["auth","FailTipAuth"]},g0=1,m0=["3","VideoActionOpenMouth"],y0=[3,"视频活体"],b0=["debugLog","调试日志"],w0=["apiError","接口错误"],A0={"Access-Control-Allow-Origin":"*"};function x0(e){return T0.apply(this,arguments)}function T0(){return T0=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(A0,l),h=new Promise((function(e,t){var a=new XMLHttpRequest;if(!a){var u=new Error("cannot creat an XMLHTTP instance");r(f0.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(w1){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)}))),T0.apply(this,arguments)}var P0=Object.prototype.toString;function C0(e){return"string"==typeof e||"[object String]"===P0.call(e)}function _0(e){return"function"==typeof e||"[object Function]"===P0.call(e)}function E0(e){return"object"===("undefined"==typeof HTMLElement?"undefined":n(HTMLElement))?e instanceof HTMLElement:e&&"object"===n(e)&&1===e.nodeType&&"string"==typeof e.nodeName}var S0=/([\w-]+)?(?:#([\w-]+))?((?:\.(?:[\w-]+))*)/;function k0(e,t,n){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:J$,i=""===o?"":"_",a=[];e&&(a=null!==(r=S0.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&&(C0(n)?s.innerHTML=n:n.forEach((function(e){return s.appendChild(e)}))),s}function R0(e){return e?C0(e)?document.querySelector(e):E0(e)?e:null:null}function O0(e){e&&(e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e))}function F0(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:J$;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 M0(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:J$;return e.classList.remove("".concat(n,"_").concat(t)),e}function I0(e){if(e)for(var t=e.childNodes,n=t.length-1;n>=0;n--)e.removeChild(t[n])}var D0=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}(),L0=new Map;function j0(e,t){var n;return L0.has(e)||L0.set(e,[]),null===(n=L0.get(e))||void 0===n||n.push(t),t}function B0(e){var t;L0.has(e)&&(null===(t=L0.get(e))||void 0===t||t.forEach((function(e){e.dispose()})),L0.delete(e))}var N0=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 V0(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{return JSON.parse(e)}catch(n){return t}}function U0(e){return e?e.split("?")[0]:e}function W0(e,t){var n=e;if(("string"==typeof n||"number"==typeof n)&&(n=parseFloat(String(n)),!Number.isNaN(n)))return n.toFixed(t)}var z0={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("[NELiveDetection]"," ").concat(t)):z0.error('[Inner util error]: log "type" must be one of the ['.concat(r.join(", "),"]}]"))},warn:function(e){z0.log("warn",e)},error:function(e){z0.log("error",e)},assert:function(e,t,n){if(!e)throw null==n||n(t),new Error("".concat("[NELiveDetection]"," ").concat(t))}};function H0(e,t){e&&null!=t&&t.type&&null!=t&&t.name&&null!=t&&t.value&&e.collect(t.type,t.name,t.value)}var G0=window.performance||window.msPerformance||window.webkitPerformance||{},X0=G0&&"getEntriesByName"in G0;function Q0(e){if(e&&X0){return function(t){var n,r,o=null===(n=G0.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:W0(o.responseEnd-(o.domainLookupStart||o.connectStart),1),dc:W0(o.domainLookupEnd-o.domainLookupStart,1),cc:W0(o.connectEnd-o.connectStart,1),rc:W0(o.responseStart-o.requestStart,1),rr:W0(o.responseEnd-o.responseStart,1),url:t,host:i.host,https:"https"===i.protocol});e.collectAsync("netPerformance",a,s)}}}}function Y0(e,t,n){return{type:b0[0],name:e,value:JSON.stringify({type:"confErr",conf:t,log:n})}}var q0={mode:"mount",businessKey:"",container:void 0,diameter:220,audio:!1,fallback:!0,footerTip:!0,lang:"zh-CN",preload:!1};function K0(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t({model:"unknown",osVersion:"unknown",sdkType:"3",terminal:"1",version:"2.3.3",riskVersion:"2.1.2"},e)}var J0=function(){return J0=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},J0.apply(this,arguments)};var Z0,$0={userData:null,name:location.hostname+"_snaker",init:function(){if(!$0.userData)try{$0.userData=document.createElement("INPUT"),$0.userData.type="hidden",$0.userData.style.display="none",$0.userData.addBehavior("#default#userData"),$0.userData&&document.body.appendChild($0.userData);var e=new Date;e.setDate(e.getDate()+365),$0.userData.expires=e.toUTCString()}catch(w1){return console.log("userData is disabled!"),!1}return!0},setItem:function(e,t){$0.init()&&$0.userData&&($0.userData.load($0.name),$0.userData.setAttribute(e,t),$0.userData.save($0.name))},getItem:function(e){return $0.init()&&$0.userData?($0.userData.load($0.name),$0.userData.getAttribute(e)||""):""},removeItem:function(e){$0.init()&&$0.userData&&($0.userData.load($0.name),$0.userData.removeAttribute(e),$0.userData.save($0.name))}};try{Z0=localStorage||$0}catch(A1){Z0=$0}var e1=function(){function e(e){this.name=e}return e.prototype.push=function(e){if(e)try{var t=Z0.getItem(this.name);Z0.setItem(this.name,t?t+","+e:e)}catch(w1){console.log("localstorage or userData is disabled!")}},e.prototype.length=function(){try{var e=Z0.getItem(this.name)||"";return e?e.split(",").length:0}catch(w1){return console.log("localstorage or userData is disabled!"),0}},e.prototype.pop=function(e){var t;void 0===e&&(e=1);try{var n=Z0.getItem(this.name),r=n?n.split(","):[];t=r.splice(0,e),Z0.setItem(this.name,r.join(","))}catch(w1){t=[],console.log("localstorage or userData is disabled!")}return t},e.prototype.clear=function(){try{Z0.removeItem(this.name)}catch(w1){console.log("localstorage or userData is disabled!")}},e}(),t1=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 e1(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=J0(J0({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}(),n1=function(){function e(n){i(this,e),this.snaker=new t1(t(t({},n),{},{pid:"liveperson",version:"2.3.3"})),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}(),r1=function(){function e(t,n,r,o,a){i(this,e),n&&!C0(n)&&E0(n)?this.el=n:this.el=k0(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(){O0(this.el),B0(this)}}]),e}(),o1=function(e){c(n,r1);var t=y(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,".tip",{},K$.trans("FaceTheScreen"))).neLiveDetection=r,j0(g(o),r.on(Z$,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(p0).forEach((function(e){p0[e][0]===t&&(n=K$.trans(p0[e][1]))})),"fail"===e&&Object.keys(v0).forEach((function(e){v0[e][0]===t&&(n=K$.trans(v0[e][1]))})),n}(r,t),this.el.textContent=this.text}}]),n}(),i1=function(e){c(n,r1);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(),j0(g(a),r.on(n0,a.initColors.bind(g(a)))),j0(g(a),r.on(e0,a.updateActiveColor.bind(g(a)))),a}return s(n,[{key:"initColors",value:function(){var e=this;I0(this.el);var t=this.neLiveDetection.options.colorMap,n=void 0===t?[]:t;this.colors=n.map((function(t,n){var r=k0(".color_circle");return F0(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?F0(t,"color_circle--active"):M0(t,"color_circle--active")}))}}]),n}(),a1=function(e){c(n,r1);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=k0(".camera_inner");var a=k0("video#".concat(J$,"_camera_video"),{muted:!0,autoplay:!0,"x5-playsinline":"",playsinline:"","webkit-playsinline":""},"Please update your browser."),s=k0("img.camera_loading-bg",{src:"data:image/png;base64,iVBORw0KGgoAAAANS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CvQSgdeIgLyYImXEvAWiROMiPQMiQewlAQ9w3yJRAyJh7CUDNTA3yJhAyZ+UA1Egc5E8gFMIrmoEaCINyeIqhEF7RDJROHJRFIBRkt9v1vhUSKJFvYSyPFUOhrByAEpgalMsEoVBWDkDuxEHZTBAK550JQG6EQR0EQiW8MwHIgTioh0CoiGkCkIowqI9AqJCXKwFLEgd1EggV86QDMCdhUDeBUDnTBGAO4qB+AqERLjECUxAG7fAehEZ4CyNwLXHQFhOEBpkmAOcQBm0SCI3ySCTwEWHQNoHQOKEAvBVjfHh+fu63222f+iykIxAIIQgF4F+mBrwQCPzG/QRokzDgLYHAiGkCtEMYcIxA4CihAPWKMT6EEII44BiBwIeEAtRDGHAqgcDJhAKUzTqBcwgEziYUoCzCgEsIBC4mFCBvwoBrCASuJhQgL8KAKQgEJiMUIC1hwJQEApMTCrAcTyUwF4HAbIQCzEcYMDeBwOxWq1V3c3PTeYUzXM8agaUIBBZlqgCXEQYsTSCQhFCAj1kjkJJAICmhAGOmBeRAIJANsUDj+hjjT2FALgQC2XkVCiGIBSpnWkCuBAJZM1WgRu4WUAKBQDHEAiUTBZRGIFCcV+9V+BrEApmzQqBUAoGiua9AhvoY48/n5+d+u932qQ8DlxIIVGO1WnUhhGANQQKeQKA6AoFqubPAnNwpoHYCgSaIBaYgCmiJQKA5LjlyBvcJaJZAoHmCgVcEAewJBHjDkxFNEQRwhECADwiGqvQxxp8huEcAHxEIcKY3j1OGIBpy9SsGTAjgfAIBJvASDe4yJGMyABMTCDCTA9EQgnC41q8QCEEMwJwEAiRwJB5CEBAhvIkA6wFIQyBAZl7HQwghvAmIEMqNiP7lH94GQAghiADIi0CAgr3ERAj/BUUIB6PimO7D/+LVD/ZDXv+wD+G/H/gh+KEPJfs/XWuM0SFottoAAAAASUVORK5CYII="}),u=k0("div.camera_loading-circle"),c=k0("span.camera_loading-msg",{},K$.trans("Loading..."));return o.cameraLoadingText=k0(".camera_loading-text",{},[s,u,c]),j0(g(o),new i1(o.el,r,{size:r.options.diameter})),o.circleBg=k0(".camera_circle-bg"),o.circleAni=k0(".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),j0(g(o),r.on(t0,o.updateLoadingStatus.bind(g(o)))),j0(g(o),r.on(Z$,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?F0(this.cameraLoadingText,"camera_loading-text--show"):M0(this.cameraLoadingText,"camera_loading-text--show")}},{key:"updateCircleAni",value:function(e){var t=e.type,n=function(e,t){if(""!==t){var n=[p0.EMPTY[0],p0.MULTIPLE[0],p0.OUTSIDE[0],p0.CLOSE[0],p0.FAR[0],p0.LIGHT[0],p0.DARK[0],p0.ROTATE[0],p0.TIMEOUT[0]],r=Object.values(v0).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}(),s1=function(e){c(n,r1);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(),j0(g(o),r.on(n0,o.initSteps.bind(g(o)))),j0(g(o),r.on($$,o.updateActiveIndex.bind(g(o)))),o}return s(n,[{key:"initSteps",value:function(){var e=this;I0(this.el);var t=this.neLiveDetection.options.code,n=void 0===t?"":t;this.steps=n.split("").map((function(e,t){return k0(".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?F0(t,"progress_step--active"):M0(t,"progress_step--active")}))}},{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}(),u1=function(e){c(n,r1);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/wXFqTVOt6or503wyBucF67iZ2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TPiq5zqL95cKp9dT4ag4233gRTcSjUR8bmyNZWRuhuS80cWNFND07ik5sAwtYETDZF3pFc5Vr9KC//fbHjcknpYDFRDw6BMVW/9ja6qTYl09WNIv7GNh8vgldDOoq0BnBoDkua/sQlELdiKuIT4DWPwcBh70Ozs7marfDfZ5j1fOOtmRhXUDC9FBEoPZThpu93j+tp2S4gAbRk5fU1/5SXY5gTckhYmSNYcUPQU5mFdZMvgd1OwQ5xdSdpuD0UH8ymXyoipDkLu/cmeCwmNi4Jgn4Wly4zWmcCkgYHk86TYAWOZilRRYRLo7IJyuuD/5yLiBhYQb9SID4+HzL3Zucks4tMs6e5s44L/G8xFIEJGgi+GJ80UerMj6dJIWx6OTrAYkJIQxsrk7iLbkK0nuA1+iaWts0ZR+rXpqAKUm7qHfmrgISFCQ7CWV4HG26F0Zv/intHnW5AqdGf3xaGctl6x4w4RcV7Pu9oMsM4yVpB1AipQtIRJXJoZ8nl6WilLKe8CpmImCKTWucCXFbt15W7s9VzFTAlLoJGe+fBttVOJ20EgKmVF5ISTMu4f75efugKkN/lRIwJU7Dk9g+MlW6RimUkfibl0oKmJJEjl3WYo+YZF0oERKNCfGxStZ2FZUWcJpUTIxeu5zzexpnWRgiAwlAS9mOL84Wj+oyO1IbAS9DIyZ0rgIdiyAk9zmHu7S/N2VkU2b25czx79nZjGHfUQZxhrYIaBuV6dW8DQ0NDQ0NDQ0NDQ0NDQ1V5i/47TibkqZqYQAAAABJRU5ErkJggg==",K$.trans("DoNotCoverFace")]],j0(g(o),r.on(n0,o.initFooter.bind(g(o)))),o}return s(n,[{key:"initFooter",value:function(){var e=this;I0(this.el),this.neLiveDetection.options.footerTip&&this.iconTips.forEach((function(t){var n=k0(".footer_icon-wrap");[k0("img.footer_icon",{src:t[0]}),k0("p.footer_text",{},t[1])].forEach((function(e){n.appendChild(e)})),e.el.appendChild(n)}))}}]),n}(),c1=function(e){c(n,r1);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,F0(o.el,"toast_".concat(a)),E0(r)&&o.el.appendChild(r),C0(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}(),l1=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),E0(e)&&(I0(r.el),r.el.appendChild(e)),C0(e)&&(r.el.innerHTML=e)):(r=new c1(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}(),f1=function(e){c(n,r1);var t=y(n);function n(e,r){var o;i(this,n),(o=t.call(this,e,".record-start")).neLiveDetection=r,o.toast=j0(g(o),new l1(o.el));var a=document.createDocumentFragment(),s=k0("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/q0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eJTzKUSdFEmsdvazW1vteaK/y5QrshuiZEqUH8OxVEjMi81pnK+27zCBPu7SM2GPvXujN0vcs3Sn9EX/IBE1OL9p8lKYAAAAAAAAAAAAAAAAAAAAAAADwED9C2Hfh+KxjRwAAAABJRU5ErkJggg=="}),u=k0("span.record-tip-main",{},K$.trans("VideoTipCameraFail")),c=k0("span.record-tip-sub",{},K$.trans("VideoTipSelfRecord"));o.conditionWrapper=k0("div.record-condition-wrapper"),[K$.trans("VideoTipBrightenEnv"),K$.trans("VideoTipBlink35"),K$.trans("VideoTipVideoLen35")].forEach((function(e,t){var n=k0("div.record-condition-inner"),r=k0("span.record-condition-text",{},e);1===t&&F0(r,"record-condition-text--uni");var i=k0("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+P0WDq10xe5JocH1TXMHPr9MJ2nwt87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Mgf/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=k0(".record-btn-wrapper");return o.recordBtn=k0("button.record-btn",{"aria-label":K$.trans("VideoStartRecord")},K$.trans("VideoStartRecord")),o.recordFileInput=k0("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 D0(t,n,r,o);e&&j0(e,i)}(g(o),o.recordFileInput,"change",o.uploadVideo.bind(g(o))),j0(g(o),r.on(n0,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]===m0[0]?K$.trans("VideoTipOpenMouth35"):K$.trans("VideoTipBlink35"))}}},{key:"uploadVideo",value:function(e){var t=this,n=e.target.files;if(n&&n.length>0){this.neLiveDetection.emit(o0,"checking");var r=n[0];if(r.size>15728640)return this.neLiveDetection.emit(o0,"start"),void this.toast.show(K$.trans("VideoTipVideoTooLarge"),"top");var o=new FileReader;o.readAsDataURL(r),o.addEventListener("loadend",(function(){var e=o.result;null!==e&&t.neLiveDetection.emit(r0,e)}))}else this.neLiveDetection.emit(o0,"start"),this.toast.show(K$.trans("VideoTipVideoUseless"),"top")}}]),n}(),h1=function(e){c(n,r1);var t=y(n);function n(e){var r;i(this,n),r=t.call(this,e,".record-checking");var o=document.createDocumentFragment(),a=k0(".record-ani-wrapper");[k0(".record-ani-scan"),k0("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/5mYypIFoE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WZMYQC2CAOiIk0cUKMF716MXF6mWAq/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=k0("span.record-tip-main",{},K$.trans("VideoTipTesting")),u=k0("span.record-tip-third",{},K$.trans("VideoTipDuration"));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}(),d1=function(e){c(n,r1);var t=y(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,".record")).neLiveDetection=r,o.start=j0(g(o),new f1(o.el,o.neLiveDetection)),o.checking=j0(g(o),new h1(o.el)),j0(g(o),r.on(o0,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}(),p1=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?v1:g1)(o,n),o.onload||v1(o,n),r.appendChild(o)};function v1(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 g1(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}var m1=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.").concat("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():p1(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}(),y1=["checkImages"],b1=function(e){c(w,N0);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 n1({bid:e.businessKey}),r.netCollector=new n1({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",x0(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"},Q0(r.netCollector)),r.options=function(e,n){var r=t(t({},q0),e),o=r.businessKey,i=r.container;z0.assert(Boolean(o)&&/^[a-zA-Z0-9]+$/.test(o),'Correct "businessKey" is required',(function(e){H0(n,Y0("businessKey",r,e))}));var a=R0(i);return z0.assert(Boolean(a),'Correct "container" is required',(function(e){H0(n,Y0("container",r,e))})),r}(e,r.collector),r.container=R0(r.options.container),K$.setCurrentLang(r.options.lang),r.el=k0("div.".concat(J$),{},void 0,""),r.tip=j0(g(r),new o1(r.el,g(r))),r.camera=j0(g(r),new a1(r.el,g(r))),r.progress=j0(g(r),new s1(r.el,g(r))),r.footer=j0(g(r),new u1(r.el,g(r))),r.record=j0(g(r),new d1(r.el,g(r))),j0(g(r),r.on(r0,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=R0(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(n0);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 R$({video:"".concat(J$,"_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(t0,!1)})),l.on("status",(function(e){"loading"===e?f.emit(t0,!0):"loading_over"===e&&(f.loadOver=!0,f.cameraOpened&&f.emit(t0,!1))})),l.on("tip",(function(e){var t=e.code;f.emit(Z$,{code:t}),t===p0.TIMEOUT[0]&&f.emit(u0,t)})),l.on("action",(function(e){f.emit($$,e)})),l.on("color",(function(e){f.emit(e0,e)})),l.on("success",this.onSuccess.bind(this)),l.on("fail",this.onFail.bind(this))):this.onFail(["unsupported"]),t&&(this.emit(i0),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 m1({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(t0,!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,B0(this),this.removeAllListeners(),O0(this.el),this.el=null)}},{key:"canUseSDK",value:(f=o(regeneratorRuntime.mark((function e(){var t,n,r,o,i,a,s,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=(t=R$).UA(),_0(t.isSupport)&&t.isSupport()){e.next=6;break}return e.abrupt("return",!1);case 6:if(r=n.getOS(),o=n.getBrowser(),i=function(e){var t=e.os,n=e.browser;return!navigator.standalone||"iOS"!==t.name||"Safari"!==n.name||!n.version.startsWith("18.0")},i({os:r,browser:o})){e.next=11;break}return e.abrupt("return",!1);case 11:if(a=function(e){var t=e.browser;return!["quark","ucbrowser","nokiabrowser"].includes(t.name.toLocaleLowerCase())},void 0===(s=this.options.isSupport)?s=a:_0(s)||(u=s,s=function(){return u}),s({os:r,browser:o})){e.next=17;break}return e.abrupt("return",!1);case 17:return e.abrupt("return",!0);case 20:return e.prev=20,e.t0=e.catch(0),console.error("Error checking SDK support:",e.t0),e.abrupt("return",!1);case 24:case"end":return e.stop()}}),e,this,[[0,20]])}))),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(Z$,{text:K$.trans("DetectionCompleted")}),e.next=3,this.check(t.images);case 3:n=e.sent,r=n.status,o=n.token,r===g0?(i=this.iriskModule?"".concat(o,"_").concat(this.iriskToken):o,this.emit(a0,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(Z$,{type:"fail",code:r}),o={unsupported:{code:f0.UNSUPPORT,handler:function(){u.options.fallback&&u.record.show()}},notallowed:{code:f0.NOT_ALLOWED},notfound:{code:f0.NOT_FOUND},notreadable:{code:f0.NOT_READABLE},overconstrained:{code:f0.OVER_CONSTRAINED},abort:{code:f0.ABORT},reject:{code:f0.REJECTED},auth:{code:f0.AUTH},pdFail:{code:f0.PD_FAIL},action_timeout:{handler:function(){return u.emit(u0,r)}},timeout:{handler:function(){return u.emit(u0,r)}}},(i=o[r])&&(i.code&&((s=new Error(K$.trans(i.code[1]))).name=i.code[0].toString(),this.emit(s0,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:d0,nonce:X$(32)},r=Q$(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:K0()});case 8:u=e.sent,200!==(null===(l=u)||void 0===l?void 0:l.code)&&(f=new Error(K$.trans(f0.GET_CONF_FAIL[1])),h=f0.GET_CONF_FAIL[0].toString(),f.name=h,this.emit(s0,f),H0(this.collector,{type:w0[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=K$.trans(f0.GET_CONF_NET_FAIL[1]),y=f0.GET_CONF_NET_FAIL[0].toString(),m.name=y,this.emit(s0,m),H0(this.collector,{type:w0[0],name:"getConf",value:JSON.stringify({errType:y,target:U0(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:V0(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(Y$(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(c0),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:X$(32),picType:h0,timestamp:Date.now(),token:s,solutionType:null!=o?o:u,sdkType:d0},l=Q$(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({},K0()),timeout:15e3},Q0(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=K$.trans(f0.CHECK_NET_FAIL[1]),T=f0.CHECK_NET_FAIL[0].toString(),x.name=T,this.emit(s0,x),P=v(c,y1),H0(this.collector,{type:w0[0],name:"check",value:JSON.stringify({errType:T,target:U0(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:V0(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(l0),e.abrupt("return",g?JSON.parse(Y$(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,y0[0]);case 2:n=e.sent,r=n.status,o=n.token,r===g0?(i=this.iriskModule?"".concat(o,"_").concat(this.iriskToken):o,this.emit(a0,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(K$.trans(f0.CHECK_ERROR[1])),r=f0.CHECK_ERROR[0].toString();n.name=r,this.emit(s0,n),H0(this.collector,{type:w0[0],name:"check",value:JSON.stringify({errType:r,msg:n.message,pathname:"/v1/liveperson/check",method:"post",response:t,action:e})})}}]),w}();export{b1 as default};