@mediapipe/tasks-text 0.10.5 → 20230919.0.0
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.
- package/README.md +0 -0
- package/package.json +1 -1
- package/text_bundle.cjs +1 -1
- package/text_bundle.cjs.map +1 -1
- package/text_bundle.mjs +1 -1
- package/text_bundle.mjs.map +1 -1
- package/wasm/text_wasm_internal.js +0 -0
- package/wasm/text_wasm_internal.wasm +0 -0
- package/wasm/text_wasm_nosimd_internal.js +0 -0
- package/wasm/text_wasm_nosimd_internal.wasm +0 -0
package/README.md
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/text_bundle.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=self;function e(t,e,n){return t.call.apply(t.bind,arguments)}function n(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function r(t,i,o){return(r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?e:n).apply(null,arguments)}function i(t,e){function n(){}n.prototype=e.prototype,t.ea=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.ba=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o<arguments.length;o++)i[o-2]=arguments[o];return e.prototype[n].apply(t,i)}}function o(t){return t}function s(t,e){if(Error.captureStackTrace)Error.captureStackTrace(this,s);else{const t=Error().stack;t&&(this.stack=t)}t&&(this.message=String(t)),void 0!==e&&(this.cause=e)}function a(){throw Error("Invalid UTF8")}function u(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let c,l;i(s,Error),s.prototype.name="CustomError";const h="undefined"!=typeof TextDecoder;let f;const d="undefined"!=typeof TextEncoder;function g(t){if(d)t=(f||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(128>e)r[n++]=e;else{if(2048>e)r[n++]=e>>6|192;else{if(55296<=e&&57343>=e){if(56319>=e&&i<t.length){const o=t.charCodeAt(++i);if(56320<=o&&57343>=o){e=1024*(e-55296)+o-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}i--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}function p(e){t.setTimeout((()=>{throw e}),0)}var y,m;t:{for(var v=["CLOSURE_FLAGS"],b=t,w=0;w<v.length;w++)if(null==(b=b[v[w]])){m=null;break t}m=b}var A,_=m&&m[610401301];y=null!=_&&_;const S=t.navigator;function x(t){return!!y&&(!!A&&A.brands.some((({brand:e})=>e&&-1!=e.indexOf(t))))}function T(e){var n;return(n=t.navigator)&&(n=n.userAgent)||(n=""),-1!=n.indexOf(e)}function E(){return!!y&&(!!A&&0<A.brands.length)}function j(){return!E()&&(T("Trident")||T("MSIE"))}function O(){return E()?x("Chromium"):(T("Chrome")||T("CriOS"))&&!(!E()&&T("Edge"))||T("Silk")}A=S&&S.userAgentData||null;const P=Array.prototype.some?function(t,e){return Array.prototype.some.call(t,e,void 0)}:function(t,e){const n=t.length,r="string"==typeof t?t.split(""):t;for(let i=0;i<n;i++)if(i in r&&e.call(void 0,r[i],i,t))return!0;return!1};var I=j();!T("Android")||O(),O(),T("Safari")&&(O()||!E()&&T("Coast")||!E()&&T("Opera")||!E()&&T("Edge")||(E()?x("Microsoft Edge"):T("Edg/"))||E()&&x("Opera"));var L={},F=null;function C(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);var r=new Uint8Array(n),i=0;return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=F[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}U();for(var r=0;;){var i=n(-1),o=n(0),s=n(64),a=n(64);if(64===a&&-1===i)break;e(i<<2|o>>4),64!=s&&(e(o<<4&240|s>>2),64!=a&&e(s<<6&192|a))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}function U(){if(!F){F={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));L[n]=r;for(var i=0;i<r.length;i++){var o=r[i];void 0===F[o]&&(F[o]=i)}}}}var B="undefined"!=typeof Uint8Array,k=!I&&"function"==typeof btoa;function M(t){if(!k){var e;void 0===e&&(e=0),U(),e=L[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let u=0,c=0;for(;u<t.length-2;u+=3){var i=t[u],o=t[u+1],s=t[u+2],a=e[i>>2];i=e[(3&i)<<4|o>>4],o=e[(15&o)<<2|s>>6],s=e[63&s],n[c++]=a+i+o+s}switch(a=0,s=r,t.length-u){case 2:s=e[(15&(a=t[u+1]))<<2]||r;case 1:t=t[u],n[c]=e[t>>2]+e[(3&t)<<4|a>>4]+s+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const N=/[-_.]/g,G={"-":"+",_:"/",".":"="};function D(t){return G[t]||""}function R(t){if(!k)return C(t);N.test(t)&&(t=t.replace(N,D)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function $(t){return B&&null!=t&&t instanceof Uint8Array}let z;function W(){return z||=new Uint8Array(0)}var V={};let H;function q(t){if(t!==V)throw Error("illegal external caller")}function J(){return H||=new Y(null,V)}function K(t){q(V);var e=t.H;return null==(e=null==e||$(e)?e:"string"==typeof e?R(e):null)?e:t.H=e}var Y=class{constructor(t,e){if(q(e),this.H=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}V(){const t=K(this);return t?new Uint8Array(t):W()}};function X(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function Z(){return Error("Failed to read varint, encoding is invalid.")}function Q(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function tt(t){return 0==t.length?J():new Y(t,V)}function et(t){if("string"==typeof t)return{buffer:R(t),A:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),A:!1};if(t.constructor===Uint8Array)return{buffer:t,A:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),A:!1};if(t.constructor===Y)return{buffer:K(t)||W(),A:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),A:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}const nt="function"==typeof Uint8Array.prototype.slice;let rt,it=0,ot=0;function st(t){const e=0>t;let n=(t=Math.abs(t))>>>0;if(t=Math.floor((t-n)/4294967296),e){const[e,r]=ht(n,t);t=r,n=e}it=n>>>0,ot=t>>>0}function at(t){const e=rt||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),ot=0,it=e.getUint32(0,!0)}function ut(t,e){return 4294967296*e+(t>>>0)}function ct(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),t=ut(t,e),n?-t:t}function lt(t){if(16>t.length)st(Number(t));else if("function"==typeof BigInt)t=BigInt(t),it=Number(t&BigInt(4294967295))>>>0,ot=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);ot=it=0;const n=t.length;for(let r=e,i=(n-e)%6+e;i<=n;r=i,i+=6){const e=Number(t.slice(r,i));ot*=1e6,it=1e6*it+e,4294967296<=it&&(ot+=Math.trunc(it/4294967296),ot>>>=0,it>>>=0)}if(e){const[t,e]=ht(it,ot);it=t,ot=e}}}function ht(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function ft(t,e,{I:n=!1}={}){t.I=n,e&&(e=et(e),t.j=e.buffer,t.v=e.A,t.o=0,t.l=t.j.length,t.g=t.o)}function dt(t,e){if(t.g=e,e>t.l)throw Q(t.l,e)}function gt(t,e){let n,r=0,i=0,o=0;const s=t.j;let a=t.g;do{n=s[a++],r|=(127&n)<<o,o+=7}while(32>o&&128&n);for(32<o&&(i|=(127&n)>>4),o=3;32>o&&128&n;o+=7)n=s[a++],i|=(127&n)<<o;if(dt(t,a),128>n)return e(r>>>0,i>>>0);throw Z()}function pt(t){let e=0,n=t.g;const r=n+10,i=t.j;for(;n<r;){const r=i[n++];if(e|=r,0==(128&r))return dt(t,n),!!(127&e)}throw Z()}function yt(t,e){if(0>e)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.l)throw Q(e,t.l-n);return t.g=r,n}function mt(t,e){if(0==e)return J();var n=yt(t,e);return t.I&&t.v?n=t.j.subarray(n,n+e):(t=t.j,n=n===(e=n+e)?W():nt?t.slice(n,e):new Uint8Array(t.subarray(n,e))),tt(n)}var vt=class{constructor(t,e){this.j=null,this.v=!1,this.g=this.l=this.o=0,ft(this,t,e)}reset(){this.g=this.o}h(){const t=this.j;let e=this.g,n=t[e++],r=127&n;if(128&n&&(n=t[e++],r|=(127&n)<<7,128&n&&(n=t[e++],r|=(127&n)<<14,128&n&&(n=t[e++],r|=(127&n)<<21,128&n&&(n=t[e++],r|=n<<28,128&n&&128&t[e++]&&128&t[e++]&&128&t[e++]&&128&t[e++]&&128&t[e++])))))throw Z();return dt(this,e),r}s(){var t=this.j;const e=this.g;var n=t[e],r=t[e+1],i=t[e+2];return t=t[e+3],dt(this,this.g+4),n=2*((i=(n<<0|r<<8|i<<16|t<<24)>>>0)>>31)+1,r=i>>>23&255,i&=8388607,255==r?i?NaN:1/0*n:0==r?n*Math.pow(2,-149)*i:n*Math.pow(2,r-150)*(i+Math.pow(2,23))}C(){return this.h()}},bt=[];function wt(t){var e=t.g;if(e.g==e.l)return!1;t.j=t.g.g;var n=t.g.h()>>>0;if(e=n>>>3,!(0<=(n&=7)&&5>=n))throw X(n,t.j);if(1>e)throw Error(`Invalid field number: ${e} (at position ${t.j})`);return t.l=e,t.h=n,!0}function At(t){switch(t.h){case 0:0!=t.h?At(t):pt(t.g);break;case 1:dt(t=t.g,t.g+8);break;case 2:if(2!=t.h)At(t);else{var e=t.g.h()>>>0;dt(t=t.g,t.g+e)}break;case 5:dt(t=t.g,t.g+4);break;case 3:for(e=t.l;;){if(!wt(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.h){if(t.l!=e)throw Error("Unmatched end-group tag");break}At(t)}break;default:throw X(t.h,t.j)}}function _t(t,e,n){const r=t.g.l,i=t.g.h()>>>0,o=t.g.g+i;let s=o-r;if(0>=s&&(t.g.l=o,n(e,t,void 0,void 0,void 0),s=o-t.g.g),s)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-s} bytes, either the data ended unexpectedly or the message misreported its own length`);t.g.g=o,t.g.l=r}function St(t){var e=t.g.h()>>>0,n=yt(t=t.g,e);if(t=t.j,h){var r,i=t;(r=l)||(r=l=new TextDecoder("utf-8",{fatal:!0})),t=n+e,i=0===n&&t===i.length?i:i.subarray(n,t);try{var o=r.decode(i)}catch(t){if(void 0===c){try{r.decode(new Uint8Array([128]))}catch(t){}try{r.decode(new Uint8Array([97])),c=!0}catch(t){c=!1}}throw!c&&(l=void 0),t}}else{e=(o=n)+e,n=[];let c,l=null;for(;o<e;){var s=t[o++];128>s?n.push(s):224>s?o>=e?a():(c=t[o++],194>s||128!=(192&c)?(o--,a()):n.push((31&s)<<6|63&c)):240>s?o>=e-1?a():(c=t[o++],128!=(192&c)||224===s&&160>c||237===s&&160<=c||128!=(192&(i=t[o++]))?(o--,a()):n.push((15&s)<<12|(63&c)<<6|63&i)):244>=s?o>=e-2?a():(c=t[o++],128!=(192&c)||0!=c-144+(s<<28)>>30||128!=(192&(i=t[o++]))||128!=(192&(r=t[o++]))?(o--,a()):(s=(7&s)<<18|(63&c)<<12|(63&i)<<6|63&r,s-=65536,n.push(55296+(s>>10&1023),56320+(1023&s)))):a(),8192<=n.length&&(l=u(l,n),n.length=0)}o=u(l,n)}return o}function xt(t){const e=t.g.h()>>>0;return mt(t.g,e)}function Tt(t,e,n){var r=t.g.h()>>>0;for(r=t.g.g+r;t.g.g<r;)n.push(e.call(t.g))}var Et=[];function jt(t){return t?/^\d+$/.test(t)?(lt(t),new Ot(it,ot)):null:Pt||=new Ot(0,0)}var Ot=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let Pt;function It(t){return t?/^-?\d+$/.test(t)?(lt(t),new Lt(it,ot)):null:Ft||=new Lt(0,0)}var Lt=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let Ft;function Ct(t,e,n){for(;0<n||127<e;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Ut(t,e){for(;127<e;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function Bt(t,e){if(0<=e)Ut(t,e);else{for(let n=0;9>n;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function kt(t){var e=it;t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function Mt(t,e){0!==e.length&&(t.j.push(e),t.h+=e.length)}function Nt(t,e,n){Ut(t.g,8*e+n)}function Gt(t,e){return Nt(t,e,2),e=t.g.end(),Mt(t,e),e.push(t.h),e}function Dt(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;127<n;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function Rt(t,e,n){Nt(t,e,2),Ut(t.g,n.length),Mt(t,t.g.end()),Mt(t,n)}class $t{constructor(t,e,n){this.g=t,this.h=e,this.j=n}}function zt(t){return Array.prototype.slice.call(t)}const Wt="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():void 0;var Vt=Wt?(t,e)=>{t[Wt]|=e}:(t,e)=>{void 0!==t.g?t.g|=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function Ht(t){const e=Jt(t);1!=(1&e)&&(Object.isFrozen(t)&&(t=zt(t)),Yt(t,1|e))}var qt=Wt?(t,e)=>{t[Wt]&=~e}:(t,e)=>{void 0!==t.g&&(t.g&=~e)},Jt=Wt?t=>0|t[Wt]:t=>0|t.g,Kt=Wt?t=>t[Wt]:t=>t.g,Yt=Wt?(t,e)=>{t[Wt]=e}:(t,e)=>{void 0!==t.g?t.g=e:Object.defineProperties(t,{g:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function Xt(t){return Vt(t,1),t}function Zt(t,e){Yt(e,-255&(0|t))}function Qt(t,e){Yt(e,-221&(34|t))}function te(t){return 0===(t=t>>11&1023)?536870912:t}var ee,ne={};function re(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function ie(t,e,n){if(null!=t)if("string"==typeof t)t=t?new Y(t,V):J();else if(t.constructor!==Y)if($(t))t=n?tt(t):t.length?new Y(new Uint8Array(t),V):J();else{if(!e)throw Error();t=void 0}return t}const oe=[];function se(t){if(2&t)throw Error()}let ae,ue,ce,le;function he(t,e){(e=ae?e[ae]:void 0)&&(t[ae]=zt(e))}function fe(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function de(t){return null==t?t:"number"==typeof t||"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function ge(t){if(null!=t){if("boolean"!=typeof t){var e=typeof t;throw Error(`Expected boolean but got ${"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}: ${t}`)}t=!!t}return t}function pe(t){return"number"==typeof t&&Number.isFinite(t)||!!t&&"string"==typeof t&&isFinite(t)}function ye(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t?t:void 0}function me(t){if("string"!=typeof t)throw Error();return t}function ve(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function be(t){return null==t||"string"==typeof t?t:void 0}function we(t,e,n){var r=!1;if(null!=t&&"object"==typeof t&&!(r=Array.isArray(t))&&t.F===ne)return t;if(r){var i=r=Jt(t);return 0===i&&(i|=32&n),(i|=2&n)!==r&&Yt(t,i),new e(t)}}function Ae(t){switch(typeof t){case"number":return 0<t?void 0:0===t?le||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function _e(t,e,n){if(null==t&&(t=ce),ce=void 0,null==t){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-2095105&r|(1023&e)<<11)}else{if(!Array.isArray(t))throw Error();if(64&(r=Jt(t)))return ue&&delete t[ue],t;if(r|=64,n&&(r|=512,n!==t[0]))throw Error();t:{var i=(n=t).length;if(i){const t=i-1;var o=n[t];if(re(o)){1024<=(i=t-(e=+!!(512&(r|=256))-1))&&(Se(n,e,o),i=1023),r=-2095105&r|(1023&i)<<11;break t}}e&&(o=+!!(512&r)-1,1024<(e=Math.max(e,i-o))&&(Se(n,o,{}),r|=256,e=1023),r=-2095105&r|(1023&e)<<11)}}return Yt(t,r),t}function Se(t,e,n){const r=1023+e,i=t.length;for(let o=r;o<i;o++){const r=t[o];null!=r&&r!==n&&(n[o-e]=r)}t.length=r+1,t[r]=n}function xe(t,e,n,r,i,o){if(null!=t){if(Array.isArray(t))t=i&&0==t.length&&1&Jt(t)?void 0:o&&2&Jt(t)?t:Te(t,e,n,void 0!==r,i,o);else if(re(t)){const s={};for(let a in t)s[a]=xe(t[a],e,n,r,i,o);t=s}else t=e(t,r);return t}}function Te(t,e,n,r,i,o){const s=r||n?Jt(t):0;r=r?!!(32&s):void 0;const a=zt(t);for(let t=0;t<a.length;t++)a[t]=xe(a[t],e,n,r,i,o);return n&&(he(a,t),n(s,a)),a}function Ee(t){return t.F===ne?t.toJSON():function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t&&!Array.isArray(t)){if($(t))return M(t);if(t instanceof Y){const e=t.H;return null==e?"":"string"==typeof e?e:t.H=M(e)}}}return t}(t)}function je(t,e,n=Qt){if(null!=t){if(B&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){const r=Jt(t);return 2&r?t:!e||68&r||!(32&r||0===r)?Te(t,je,4&r?Qt:n,!0,!1,!0):(Yt(t,34|r),t)}return t.F===ne&&(e=t.m,t=2&(n=Kt(e))?t:Pe(t,e,n,!0)),t}}function Oe(t){const e=t.m;return Pe(t,e,Kt(e),!1)}function Pe(t,e,n,r){return t=t.constructor,ce=e=Ie(e,n,r),e=new t(e),ce=void 0,e}function Ie(t,e,n){const r=n||2&e?Qt:Zt,i=!!(32&e);return t=function(t,e,n){const r=zt(t);var i=r.length;const o=256&e?r[i-1]:void 0;for(i+=o?-1:0,e=512&e?1:0;e<i;e++)r[e]=n(r[e]);if(o){e=r[e]={};for(const t in o)e[t]=n(o[t])}return he(r,t),r}(t,e,(t=>je(t,i,r))),Vt(t,32|(n?2:0)),t}function Le(t){const e=t.m,n=Kt(e);return 2&n?Pe(t,e,n,!1):t}function Fe(t,e){return Ce(t=t.m,Kt(t),e)}function Ce(t,e,n,r){if(-1===n)return null;if(n>=te(e)){if(256&e)return t[t.length-1][n]}else{var i=t.length;if(r&&256&e&&null!=(r=t[i-1][n]))return r;if((e=n+(+!!(512&e)-1))<i)return t[e]}}function Ue(t,e,n,r){const i=t.m,o=Kt(i);return se(o),Be(i,o,e,n,r),t}function Be(t,e,n,r,i){var o=te(e);if(n>=o||i){if(i=e,256&e)o=t[t.length-1];else{if(null==r)return;o=t[o+(+!!(512&e)-1)]={},i|=256}o[n]=r,i!==e&&Yt(t,i)}else t[n+(+!!(512&e)-1)]=r,256&e&&(n in(t=t[t.length-1])&&delete t[n])}function ke(t,e,n,r,i){var o=2&e;let s=Ce(t,e,n,i);Array.isArray(s)||(s=ee);const a=Jt(s);if(1&a||Xt(s),o)2&a||Vt(s,34),1&r||Object.freeze(s);else{o=!(2&r);const u=2&a;1&r||!u?o&&32&a&&!u&&qt(s,32):(s=Xt(zt(s)),Be(t,e,n,s,i))}return s}function Me(t){t=t.m;const e=Kt(t),n=Ce(t,e,1),r=ie(n,!0,!!(34&e));return null!=r&&r!==n&&Be(t,e,1,r),r}function Ne(t,e,n){t=t.m;const r=Kt(t);if(se(r),null==n)Be(t,r,e);else{if(!(4&Jt(n))){Object.isFrozen(n)&&(n=zt(n));for(let t=0;t<n.length;t++)n[t]=me(n[t]);Yt(n,5)}Be(t,r,e,n)}}function Ge(t,e){t=t.m;const n=Kt(t);se(n),Be(t,n,2,""===e?void 0:e)}function De(t,e){return Re(t=t.m,Kt(t),ki)===e?e:-1}function Re(t,e,n){let r=0;for(let i=0;i<n.length;i++){const o=n[i];null!=Ce(t,e,o)&&(0!==r&&Be(t,e,r),r=o)}return r}function $e(t,e,n,r){const i=Kt(t);se(i);const o=Ce(t,i,n,r);let s;if(null!=o&&o.F===ne)return(e=Le(o))!==o&&Be(t,i,n,e,r),e.m;if(Array.isArray(o)){const t=Jt(o);s=2&t?Ie(o,t,!1):o,s=_e(s,e[0],e[1])}else s=_e(void 0,e[0],e[1]);return s!==o&&Be(t,i,n,s,r),s}function ze(t,e,n,r){t=t.m;const i=Kt(t),o=Ce(t,i,n,r);return(e=we(o,e,i))!==o&&null!=e&&Be(t,i,n,e,r),e}function We(t,e,n){if(null==(e=ze(t,e,n,!1)))return e;t=t.m;const r=Kt(t);if(!(2&r)){const i=Le(e);i!==e&&Be(t,r,n,e=i,!1)}return e}function Ve(t,e,n,r){var i=!!(2&e),o=ke(t,e,1,1);if(o===ee||!(4&Jt(o))){var s=o;o=!!(2&e);var a=!!(2&Jt(s));i=s,!o&&a&&(s=zt(s));var u=e|(a?2:0);a=a||void 0;let c=0,l=0;for(;c<s.length;c++){const t=we(s[c],n,u);void 0!==t&&(a=a||2&Kt(t.m),s[l++]=t)}return l<c&&(s.length=l),u=5|(s=Jt(n=s)),s!=(a=a?-9&u:8|u)&&(Object.isFrozen(n)&&(n=zt(n)),Yt(n,a)),i!==(s=n)&&Be(t,e,1,s),(o&&2!==r||1===r)&&Object.freeze(s),s}return 3===r||(i?2===r&&(r=Jt(o),o=zt(o),Yt(o,r),Be(t,e,1,o)):(i=Object.isFrozen(o),1===r?i||Object.freeze(o):(n=-35&(r=Jt(o)),i&&(r=0,Be(t,e,1,o=zt(o))),r!==n&&Yt(o,n)))),o}function He(t,e){var n=t.m,r=Kt(n);if(e=Ve(n,r,e,(t=!!(2&r))?1:2),!(t||8&Jt(e))){for(t=0;t<e.length;t++)(n=e[t])!==(r=Le(n))&&(e[t]=r);Vt(e,8)}return e}function qe(t,e,n,r,i){return null==r&&(r=void 0),Ue(t,n,r,i)}function Je(t,e,n){var r=Wi;null==n&&(n=void 0),t=t.m;const i=Kt(t);se(i),(r=Re(t,i,r))&&r!==e&&null!=n&&Be(t,i,r),Be(t,i,e,n)}function Ke(t,e){var n=mi;t=t.m;const r=Kt(t);se(r),t=Ve(t,r,n,2),e=null!=e?e:new n,t.push(e),e.A()&&qt(t,8)}function Ye(t){return t=null==(t=Fe(t,2))||pe(t)?t:void 0}function Xe(t){return t??0}function Ze(t,e,n){n=me(n),t=t.m;const r=Kt(t);se(r),ke(t,r,e,2).push(n)}function Qe(t,e,n){e.g?e.j(t,e.g,e.h,n,!0):e.j(t,e.h,n,!0)}Yt(oe,39),ee=Object.freeze(oe);var tn=class{constructor(t,e){this.m=_e(t,e)}toJSON(){return en(this,Te(this.m,Ee,void 0,void 0,!1,!1),!0)}A(){return!!(2&Jt(this.m))}};function en(t,e,n){var r=t.constructor.B,i=te(Kt(n?t.m:e)),o=!1;if(r){if(!n){var s;if((e=zt(e)).length&&re(s=e[e.length-1]))for(o=0;o<r.length;o++)if(r[o]>=i){Object.assign(e[e.length-1]={},s);break}o=!0}var a;i=e,n=!n,t=te(s=Kt(t.m)),s=+!!(512&s)-1;for(let e=0;e<r.length;e++){var u=r[e];if(u<t){var c=i[u+=s];null==c?i[u]=n?ee:Xt([]):n&&c!==ee&&Ht(c)}else{if(!a){var l=void 0;i.length&&re(l=i[i.length-1])?a=l:i.push(a={})}c=a[u],null==a[u]?a[u]=n?ee:Xt([]):n&&c!==ee&&Ht(c)}}}if(!(r=e.length))return e;let h,f;if(re(a=e[r-1])){t:{var d=a;l={},i=!1;for(let t in d)n=d[t],Array.isArray(n)&&n!=n&&(i=!0),null!=n?l[t]=n:i=!0;if(i){for(let t in l){d=l;break t}d=null}}d!=a&&(h=!0),r--}for(;0<r&&null==(a=e[r-1]);r--)f=!0;return h||f?(e=o?e:Array.prototype.slice.call(e,0,r),o&&(e.length=r),d&&e.push(d),e):e}function nn(t){return{P:zn,J:t}}function rn(t,e){if(Array.isArray(e)){var n=Jt(e);if(4&n)return e;for(var r=0,i=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[i++]=n)}return i<r&&(e.length=i),Yt(e,5|n),2&n&&Object.freeze(e),e}}tn.prototype.F=ne,tn.prototype.toString=function(){return en(this,this.m,!1).toString()};const on=Symbol();function sn(t){let e=t[on];if(!e){const n=vn(t),r=n.l;e=r?(t,e)=>r(t,e,n):(t,e)=>{for(;wt(e)&&4!=e.h;){var r=e.l,i=n[r];if(!i){var o=n.h;o&&(o=o[r])&&(i=n[r]=an(o))}i&&i(e,t,r)||(r=(i=e).j,At(i),i.O?i=void 0:(o=i.g.g-r,i.g.g=r,i=mt(i.g,o)),r=t,i&&(ae||=Symbol(),(o=r[ae])?o.push(i):r[ae]=[i]))}(e=n.j)&&(t[ue||=Symbol()]=e)},t[on]=e}return e}function an(t){const e=function(t){if(t=t.J)return sn(t)}(t),n=t.P.g;if(e){const r=vn(t.J).g;return(t,i,o)=>n(t,i,o,r,e)}return(t,e,r)=>n(t,e,r)}function un(t,e,n,r){e.g=Ae(t[0]);let i=1;if(t.length>i&&!(t[i]instanceof $t)){var o=t[i++];if(Array.isArray(o))return e.l=o[0],e.h=o[1],e;e.h=o}for(o=0;i<t.length;){const l=t[i++];var s=t[i];for("number"==typeof s?(i++,o+=s):o++,l.j&&((s=e.j)||(e.j=s=[]),s.push(o)),s=i;s<t.length&&!(t[s]instanceof $t);)s++;if(s-=i){var a=t,u=i,c=a[u];if("function"==typeof c&&(c=c(),a[u]=c),(a=Array.isArray(c))&&!(a=pn in c||hn in c)&&(a=0<c.length)){const t=Ae(u=(a=c)[0]);null!=t&&t!==u&&(a[0]=t),a=null!=t}(c=a?c:void 0)?(i++,e[o]=1===s?r(l,c):r(l,c,t[i++])):e[o]=n(l,t[i++])}else e[o]=n(l)}return e}const cn=Symbol();function ln(t){let e=t[cn];if(!e){const n=gn(t);e=(t,e)=>wn(t,e,n),t[cn]=e}return e}const hn=Symbol();function fn(t){return t.h}function dn(t,e){let n,r;const i=t.h;return(t,o,s)=>i(t,o,s,r||=gn(e).g,n||=ln(e))}function gn(t){let e=t[hn];return e||(e=un(t,t[hn]={},fn,dn),pn in t&&hn in t&&(t.length=0),e)}const pn=Symbol();function yn(t,e){const n=t.g;return e?(t,r,i)=>n(t,r,i,e):n}function mn(t,e,n){const r=t.g;let i,o;return(t,s,a)=>r(t,s,a,o||=vn(e).g,i||=sn(e),n)}function vn(t){let e=t[pn];return e||(e=un(t,t[pn]={},yn,mn),pn in t&&hn in t&&(t.length=0),e)}function bn(t,e){var n=t[e];if(n)return n;if((n=t.h)&&(n=n[e])){var r=n.J,i=n.P.h;if(r){const t=ln(r),e=gn(r).g;n=(n,r,o)=>i(n,r,o,e,t)}else n=i;return t[e]=n}}function wn(t,e,n){for(var r=Kt(t),i=+!!(512&r)-1,o=t.length,s=512&r?1:0,a=o+(256&r?-1:0);s<a;s++){const r=t[s];if(null==r)continue;const o=s-i,a=bn(n,o);a&&a(e,r,o)}if(256&r){r=t[o-1];for(let t in r)i=+t,Number.isNaN(i)||null!=(o=r[t])&&(a=bn(n,i))&&a(e,o,i)}if(t=ae?t[ae]:void 0)for(Mt(e,e.g.end()),n=0;n<t.length;n++)Mt(e,K(t[n])||W())}function An(t,e){return new $t(t,e,!1)}function _n(t,e){return new $t(t,e,!0)}function Sn(t,e,n){Be(t,Kt(t),e,n)}function xn(t,e,n){t:if(null!=e){if(pe(e)){if("string"==typeof e)break t;if("number"==typeof e)break t}e=void 0}null!=e&&("string"==typeof e&&It(e),null!=e&&(Nt(t,n,0),"number"==typeof e?(t=t.g,st(e),Ct(t,it,ot)):(n=It(e),Ct(t.g,n.h,n.g))))}function Tn(t,e,n){null!=(e=ye(e))&&null!=e&&(Nt(t,n,0),Bt(t.g,e))}function En(t,e,n){null!=(e=null==e?e:"boolean"==typeof e||"number"==typeof e?!!e:void 0)&&(Nt(t,n,0),t.g.g.push(e?1:0))}function jn(t,e,n){null!=(e=be(e))&&Rt(t,n,g(e))}function On(t,e,n,r,i){null!=(e=e instanceof tn?e.m:Array.isArray(e)?_e(e,r[0],r[1]):void 0)&&(n=Gt(t,n),i(e,t),Dt(t,n))}function Pn(t,e,n){null!=(e=null==e||"string"==typeof e||$(e)||e instanceof Y?e:void 0)&&Rt(t,n,et(e).buffer)}var In=An((function(t,e,n){return 5===t.h&&(Sn(e,n,t.g.s()),!0)}),(function(t,e,n){null!=(e=de(e))&&(Nt(t,n,5),t=t.g,at(e),kt(t))})),Ln=_n((function(t,e,n){return(5===t.h||2===t.h)&&(e=ke(e,Kt(e),n,2,!1),2==t.h?Tt(t,vt.prototype.s,e):e.push(t.g.s()),!0)}),(function(t,e,n){if(null!=(e=rn(de,e))&&e.length){Nt(t,n,2),Ut(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,at(e[r]),kt(n)}})),Fn=An((function(t,e,n){return 0===t.h&&(Sn(e,n,gt(t.g,ct)),!0)}),xn),Cn=An((function(t,e,n){return 0===t.h&&(Sn(e,n,0===(t=gt(t.g,ct))?void 0:t),!0)}),xn),Un=An((function(t,e,n){return 0===t.h&&(Sn(e,n,gt(t.g,ut)),!0)}),(function(t,e,n){t:if(null!=e){if(pe(e)){if("string"==typeof e)break t;if("number"==typeof e)break t}e=void 0}null!=e&&("string"==typeof e&&jt(e),null!=e&&(Nt(t,n,0),"number"==typeof e?(t=t.g,st(e),Ct(t,it,ot)):(n=jt(e),Ct(t.g,n.h,n.g))))})),Bn=An((function(t,e,n){return 0===t.h&&(Sn(e,n,t.g.h()),!0)}),Tn),kn=_n((function(t,e,n){return(0===t.h||2===t.h)&&(e=ke(e,Kt(e),n,2,!1),2==t.h?Tt(t,vt.prototype.h,e):e.push(t.g.h()),!0)}),(function(t,e,n){if(null!=(e=rn(ye,e))&&e.length){n=Gt(t,n);for(let n=0;n<e.length;n++)Bt(t.g,e[n]);Dt(t,n)}})),Mn=An((function(t,e,n){return 0===t.h&&(Sn(e,n,0===(t=t.g.h())?void 0:t),!0)}),Tn),Nn=An((function(t,e,n){return 0===t.h&&(Sn(e,n,pt(t.g)),!0)}),En),Gn=An((function(t,e,n){return 0===t.h&&(Sn(e,n,!1===(t=pt(t.g))?void 0:t),!0)}),En),Dn=_n((function(t,e,n){if(2!==t.h)return!1;t=St(t);const r=Kt(e);return se(r),ke(e,r,n,2).push(t),!0}),(function(t,e,n){if(null!=(e=rn(be,e)))for(let i=0;i<e.length;i++){var r=e[i];null!=r&&Rt(t,n,g(r))}})),Rn=An((function(t,e,n){return 2===t.h&&(Sn(e,n,""===(t=St(t))?void 0:t),!0)}),jn),$n=An((function(t,e,n){return 2===t.h&&(Sn(e,n,St(t)),!0)}),jn),zn=An((function(t,e,n,r,i){return 2===t.h&&(_t(t,$e(e,r,n,!0),i),!0)}),On),Wn=An((function(t,e,n,r,i){return 2===t.h&&(_t(t,$e(e,r,n),i),!0)}),On),Vn=_n((function(t,e,n,r,i){if(2!==t.h)return!1;r=_e(void 0,r[0],r[1]);const o=Kt(e);se(o);let s=ke(e,o,n,3);return(Object.isFrozen(s)||4&Jt(s))&&(s=zt(s),Be(e,o,n,s)),s.push(r),_t(t,r,i),!0}),(function(t,e,n,r,i){if(Array.isArray(e))for(let o=0;o<e.length;o++)On(t,e[o],n,r,i)})),Hn=An((function(t,e,n,r,i,o){if(2!==t.h)return!1;const s=Kt(e);return se(s),(o=Re(e,s,o))&&n!==o&&Be(e,s,o),_t(t,e=$e(e,r,n),i),!0}),On),qn=An((function(t,e,n){return 2===t.h&&(Sn(e,n,xt(t)),!0)}),Pn),Jn=An((function(t,e,n){return 0===t.h&&(Sn(e,n,t.g.h()),!0)}),(function(t,e,n){null!=(e=ye(e))&&(e=parseInt(e,10),Nt(t,n,0),Bt(t.g,e))})),Kn=_n((function(t,e,n){return(0===t.h||2===t.h)&&(e=ke(e,Kt(e),n,2,!1),2==t.h?Tt(t,vt.prototype.C,e):e.push(t.g.h()),!0)}),(function(t,e,n){if(null!=(e=rn(ye,e))&&e.length){n=Gt(t,n);for(let n=0;n<e.length;n++)Bt(t.g,e[n]);Dt(t,n)}}));class Yn{constructor(t,e){this.h=t,this.g=e,this.j=qe,this.defaultValue=void 0}}function Xn(t,e){return(n,r)=>{t:{if(Et.length){const t=Et.pop();t.u(r),ft(t.g,n,r),n=t}else n=new class{constructor(t,e){if(bt.length){const n=bt.pop();ft(n,t,e),t=n}else t=new vt(t,e);this.g=t,this.j=this.g.g,this.h=this.l=-1,this.u(e)}u({O:t=!1}={}){this.O=t}reset(){this.g.reset(),this.j=this.g.g,this.h=this.l=-1}}(n,r);try{var i=new t;const r=i.m;sn(e)(r,n),ue&&delete r[ue];var o=i;break t}finally{(i=n.g).j=null,i.v=!1,i.o=0,i.l=0,i.g=0,i.I=!1,n.l=-1,n.h=-1,100>Et.length&&Et.push(n)}o=void 0}return o}}var Zn=[0,Rn,An((function(t,e,n){return 2===t.h&&(Sn(e,n,(t=xt(t))===J()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof tn){const r=e.da;return void(r&&(e=r(e),null!=e&&Rt(t,n,et(e).buffer)))}if(Array.isArray(e))return}Pn(t,e,n)}))];function Qn(t,e){t.l(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}class tr{constructor(t,e){this.j=t,this.l=e,this.h=0,this.g=null}get(){let t;return 0<this.h?(this.h--,t=this.g,this.g=t.next,t.next=null):t=this.j(),t}}try{new self.OffscreenCanvas(0,0).getContext("2d")}catch(xi){}function er(){}const nr="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");var rr,ir=class{constructor(t){this.K=t}toString(){return this.K+""}};function or(t){return t instanceof ir&&t.constructor===ir?t.K:"type_error:TrustedResourceUrl"}ir.prototype.Z=!0;var sr={};function ar(e){if(void 0===rr){var n=null,r=t.trustedTypes;if(r&&r.createPolicy){try{n=r.createPolicy("goog#html",{createHTML:o,createScript:o,createScriptURL:o})}catch(e){t.console&&t.console.error(e.message)}rr=n}else rr=n}return e=(n=rr)?n.createScriptURL(e):e,new ir(e,sr)}var ur=/^[\w+/_-]+[=]{0,2}$/;var cr,lr={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function hr(t,e){return e=String(e),"application/xhtml+xml"===t.contentType&&(e=e.toLowerCase()),t.createElement(e)}function fr(e){this.g=e||t.document||document}function dr(){var t=vr;let e=null;return t.g&&(e=t.g,t.g=t.g.next,t.g||(t.h=null),e.next=null),e}var gr=new tr((()=>new pr),(t=>t.reset()));class pr{constructor(){this.next=this.g=this.h=null}set(t,e){this.h=t,this.g=e,this.next=null}reset(){this.next=this.g=this.h=null}}let yr,mr=!1,vr=new class{constructor(){this.h=this.g=null}add(t,e){const n=gr.get();n.set(t,e),this.h?this.h.next=n:this.g=n,this.h=n}},br=(t,e)=>{yr||wr(),mr||(yr(),mr=!0),vr.add(t,e)},wr=()=>{if(t.Promise&&t.Promise.resolve){const e=t.Promise.resolve(void 0);yr=()=>{e.then(Ar)}}else yr=()=>{var e=Ar;"function"!=typeof t.setImmediate||t.Window&&t.Window.prototype&&(E()||!T("Edge"))&&t.Window.prototype.setImmediate==t.setImmediate?(cr||=function(){var e=t.MessageChannel;if(void 0===e&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!T("Presto")&&(e=function(){var t=hr(document,"IFRAME");t.style.display="none",document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.close();var n="callImmediate"+Math.random(),i="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=r((function(t){"*"!=i&&t.origin!=i||t.data!=n||this.port1.onmessage()}),this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,i)}}}),void 0!==e&&!j()){var n=new e,i={},o=i;return n.port1.onmessage=function(){if(void 0!==i.next){var t=(i=i.next).N;i.N=null,t()}},function(t){o.next={N:t},o=o.next,n.port2.postMessage(0)}}return function(e){t.setTimeout(e,0)}}(),cr(e)):t.setImmediate(e)}};var Ar=()=>{let t;for(;t=dr();){try{t.h.call(t.g)}catch(t){p(t)}Qn(gr,t)}mr=!1};function _r(t){if(!t)return!1;try{return!!t.$goog_Thenable}catch(t){return!1}}function Sr(t){if(this.g=0,this.v=void 0,this.l=this.h=this.j=null,this.o=this.s=!1,t!=er)try{var e=this;t.call(void 0,(function(t){Pr(e,2,t)}),(function(t){Pr(e,3,t)}))}catch(t){Pr(this,3,t)}}function xr(){this.next=this.j=this.h=this.l=this.g=null,this.o=!1}xr.prototype.reset=function(){this.j=this.h=this.l=this.g=null,this.o=!1};var Tr=new tr((function(){return new xr}),(function(t){t.reset()}));function Er(t,e,n){var r=Tr.get();return r.l=t,r.h=e,r.j=n,r}function jr(t,e){if(0==t.g)if(t.j){var n=t.j;if(n.h){for(var r=0,i=null,o=null,s=n.h;s&&(s.o||(r++,s.g==t&&(i=s),!(i&&1<r)));s=s.next)i||(o=s);i&&(0==n.g&&1==r?jr(n,e):(o?((r=o).next==n.l&&(n.l=r),r.next=r.next.next):Lr(n),Fr(n,i,3,e)))}t.j=null}else Pr(t,3,e)}function Or(t,e){t.h||2!=t.g&&3!=t.g||Ir(t),t.l?t.l.next=e:t.h=e,t.l=e}function Pr(t,e,n){if(0==t.g){t===n&&(e=3,n=new TypeError("Promise cannot resolve to itself")),t.g=1;t:{var r=n,i=t.D,o=t.G;if(r instanceof Sr){Or(r,Er(i||er,o||null,t));var s=!0}else if(_r(r))r.then(i,o,t),s=!0;else{var a=typeof r;if("object"==a&&null!=r||"function"==a)try{var u=r.then;if("function"==typeof u){!function(t,e,n,r,i){function o(t){a||(a=!0,r.call(i,t))}function s(t){a||(a=!0,n.call(i,t))}var a=!1;try{e.call(t,s,o)}catch(t){o(t)}}(r,u,i,o,t),s=!0;break t}}catch(e){o.call(t,e),s=!0;break t}s=!1}}s||(t.v=n,t.g=e,t.j=null,Ir(t),3!=e||n instanceof Br||function(t,e){t.o=!0,br((function(){t.o&&Ur.call(null,e)}))}(t,n))}}function Ir(t){t.s||(t.s=!0,br(t.C,t))}function Lr(t){var e=null;return t.h&&(e=t.h,t.h=e.next,e.next=null),t.h||(t.l=null),e}function Fr(t,e,n,r){if(3==n&&e.h&&!e.o)for(;t&&t.o;t=t.j)t.o=!1;if(e.g)e.g.j=null,Cr(e,n,r);else try{e.o?e.l.call(e.j):Cr(e,n,r)}catch(t){Ur.call(null,t)}Qn(Tr,e)}function Cr(t,e,n){2==e?t.l.call(t.j,n):t.h&&t.h.call(t.j,n)}Sr.prototype.then=function(t,e,n){return function(t,e,n,r){var i=Er(null,null,null);return i.g=new Sr((function(t,o){i.l=e?function(n){try{var i=e.call(r,n);t(i)}catch(t){o(t)}}:t,i.h=n?function(e){try{var i=n.call(r,e);void 0===i&&e instanceof Br?o(e):t(i)}catch(t){o(t)}}:o})),i.g.j=t,Or(t,i),i.g}(this,"function"==typeof t?t:null,"function"==typeof e?e:null,n)},Sr.prototype.$goog_Thenable=!0,Sr.prototype.cancel=function(t){if(0==this.g){var e=new Br(t);br((function(){jr(this,e)}),this)}},Sr.prototype.D=function(t){this.g=0,Pr(this,2,t)},Sr.prototype.G=function(t){this.g=0,Pr(this,3,t)},Sr.prototype.C=function(){for(var t;t=Lr(this);)Fr(this,t,this.g,this.v);this.s=!1};var Ur=p;function Br(t){s.call(this,t)}function kr(t,e){this.o=[],this.M=t,this.L=e||null,this.l=this.j=!1,this.h=void 0,this.D=this.T=this.v=!1,this.s=0,this.g=null,this.C=0}function Mr(t,e,n){t.j=!0,t.h=n,t.l=!e,$r(t)}function Nr(t){if(t.j){if(!t.D)throw new zr;t.D=!1}}function Gr(t,e,n,r){t.o.push([e,n,r]),t.j&&$r(t)}function Dr(t){return P(t.o,(function(t){return"function"==typeof t[1]}))}i(Br,s),Br.prototype.name="cancel",i(kr,(function(){})),kr.prototype.cancel=function(t){if(this.j)this.h instanceof kr&&this.h.cancel();else{if(this.g){const e=this.g;delete this.g,t?e.cancel(t):(e.C--,0>=e.C&&e.cancel())}this.M?this.M.call(this.L,this):this.D=!0,this.j||(t=new Wr,Nr(this),Mr(this,!1,t))}},kr.prototype.G=function(t,e){this.v=!1,Mr(this,t,e)},kr.prototype.then=function(t,e,n){let r,i;const o=new Sr((function(t,e){i=t,r=e}));return Gr(this,i,(function(t){return t instanceof Wr?o.cancel():r(t),Rr}),this),o.then(t,e,n)},kr.prototype.$goog_Thenable=!0;var Rr={};function $r(e){if(e.s&&e.j&&Dr(e)){var n=e.s,i=Hr[n];i&&(t.clearTimeout(i.g),delete Hr[n]),e.s=0}e.g&&(e.g.C--,delete e.g),n=e.h;for(var o=i=!1;e.o.length&&!e.v;){var s=e.o.shift(),a=s[0];const r=s[1];if(s=s[2],a=e.l?r:a)try{var u=a.call(s||e.L,n);u===Rr&&(u=void 0),void 0!==u&&(e.l=e.l&&(u==n||u instanceof Error),e.h=n=u),(_r(n)||"function"==typeof t.Promise&&n instanceof t.Promise)&&(o=!0,e.v=!0)}catch(t){n=t,e.l=!0,Dr(e)||(i=!0)}}e.h=n,o&&(u=r(e.G,e,!0),o=r(e.G,e,!1),n instanceof kr?(Gr(n,u,o),n.T=!0):n.then(u,o)),i&&(n=new Vr(n),Hr[n.g]=n,e.s=n.g)}function zr(){s.call(this)}function Wr(){s.call(this)}function Vr(e){this.g=t.setTimeout(r(this.j,this),0),this.h=e}i(zr,s),zr.prototype.message="Deferred has already fired",zr.prototype.name="AlreadyCalledError",i(Wr,s),Wr.prototype.message="Deferred was canceled",Wr.prototype.name="CanceledError",Vr.prototype.j=function(){throw delete Hr[this.g],this.h};var Hr={};function qr(e){const n={},r=n.document||document,i=or(e).toString(),o=hr(new fr(r).g,"SCRIPT");var s={R:o,S:void 0};const a=new kr(Jr,s);let u=null;const c=null!=n.timeout?n.timeout:5e3;return 0<c&&(u=window.setTimeout((function(){Kr(o,!0);var t=new Yr(1,"Timeout reached for loading script "+i);Nr(a),Mr(a,!1,t)}),c),s.S=u),o.onload=o.onreadystatechange=function(){o.readyState&&"loaded"!=o.readyState&&"complete"!=o.readyState||(Kr(o,n.ca||!1,u),Nr(a),Mr(a,!0,null))},o.onerror=function(){Kr(o,!0,u);var t=new Yr(0,"Error while loading script "+i);Nr(a),Mr(a,!1,t)},function(t,e){let n,r;for(let e=1;e<arguments.length;e++){for(n in r=arguments[e],r)t[n]=r[n];for(let e=0;e<nr.length;e++)n=nr[e],Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}}(s=n.attributes||{},{type:"text/javascript",charset:"UTF-8"}),function(t,e){!function(t,e){for(const n in t)e.call(void 0,t[n],n,t)}(e,(function(e,n){e&&"object"==typeof e&&e.Z&&(e=e.K.toString()),"style"==n?t.style.cssText=e:"class"==n?t.className=e:"for"==n?t.htmlFor=e:lr.hasOwnProperty(n)?t.setAttribute(lr[n],e):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?t.setAttribute(n,e):t[n]=e}))}(o,s),function(e,n){var r=(e.ownerDocument&&e.ownerDocument.defaultView||t).document;r.querySelector&&(r=r.querySelector("script[nonce]"))&&(r=r.nonce||r.getAttribute("nonce"))&&ur.test(r)||(r=""),r&&e.setAttribute("nonce",r),e.src=or(n)}(o,e),function(t){var e;return(e=(t||document).getElementsByTagName("HEAD"))&&0!==e.length?e[0]:t.documentElement}(r).appendChild(o),a}function Jr(){if(this&&this.R){const t=this.R;t&&"SCRIPT"==t.tagName&&Kr(t,!0,this.S)}}function Kr(e,n,r){null!=r&&t.clearTimeout(r),e.onload=()=>{},e.onerror=()=>{},e.onreadystatechange=()=>{},n&&window.setTimeout((function(){e&&e.parentNode&&e.parentNode.removeChild(e)}),0)}function Yr(t,e){let n="Jsloader error (code #"+t+")";e&&(n+=": "+e),s.call(this,n),this.code=t}function Xr(t,...e){if(0===e.length)return ar(t[0]);let n=t[0];for(let r=0;r<e.length;r++)n+=encodeURIComponent(e[r])+t[r+1];return ar(n)}i(Yr,s);var Zr=[0,$n],Qr=[0,Bn,Jn,Nn,Nn,kn,Jn,Jn],ti=[0,Nn,Nn],ei=class extends tn{constructor(){super()}};ei.B=[6];var ni=[0,Nn,$n,Nn,Jn,Jn,Kn,$n,$n,Wn,ti,Jn],ri=[0,$n,$n,$n],ii=class extends tn{constructor(){super()}},oi=[0],si=[0,Bn],ai=[1,2,3,4,5],ui=class extends tn{constructor(t){super(t,2)}},ci={},li=[-2,ci,Nn];ci[336783863]=nn([0,$n,Nn,Nn,Bn,Wn,[0,Hn,oi,ai,Hn,ni,ai,Hn,ri,ai,Hn,si,ai,Hn,Qr,ai],Wn,Zr]);var hi=[0,Rn,Gn],fi=[0,Cn,Cn,Gn,Gn,Gn,Gn,Cn,kn,Rn,Mn,Cn,Cn,Gn,Mn,Gn,Gn,Gn,Rn],di=[-1,{}],gi=[0,$n,Wn,2,di],pi=[0,$n,Dn,Wn,di];function yi(t){Ze(t,3,"TEXT:text_in")}var mi=class extends tn{constructor(t){super(t,500)}u(t){return qe(this,0,7,t)}};mi.B=[3,4,5,6,8,13,17,1005];var vi=[-500,Rn,Rn,Dn,Dn,Dn,Dn,Wn,li,Vn,Zn,Mn,Mn,Wn,gi,Wn,pi,Vn,hi,Rn,Wn,fi,Mn,Dn,Dn,988],bi=[0,Rn,Rn,Wn,di],wi=[-500,$n,$n,Wn,[-1,{}],$n,999],Ai=[-500,$n,Dn,Dn,Wn,[-2,{},Nn],Dn,998,Dn],_i=[-500,$n,Dn,Wn,di,Dn,999];function Si(t){Ze(t,10,"text_in")}var xi,Ti=class extends tn{constructor(){super(void 0,500)}u(t){return qe(this,0,1001,t)}};Ti.B=[1,6,7,9,10,15,16,17,14,1002],Ti.prototype.g=(xi=[-500,Vn,vi,Vn,5,wi,Vn,Ai,Mn,Vn,_i,Dn,Mn,Wn,gi,Wn,pi,Vn,bi,Dn,Dn,Dn,Wn,fi,Rn,Rn,Gn,Wn,980,di,Vn,Zn],function(){const t=new class{constructor(){this.j=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};wn(this.m,t,gn(xi)),Mt(t,t.g.end());const e=new Uint8Array(t.h),n=t.j,r=n.length;let i=0;for(let t=0;t<r;t++){const r=n[t];e.set(r,i),i+=r.length}return t.j=[e],e});var Ei=class extends tn{constructor(t){super(t)}},ji=[0,Bn,In,$n,$n],Oi=class extends tn{constructor(t){super(t)}g(){return He(this,Ei)}};Oi.B=[1];var Pi=class extends tn{constructor(t){super(t)}},Ii=[0,Bn,2,$n,Wn,[0,Vn,ji]],Li=class extends tn{constructor(t){super(t)}};Li.B=[1];var Fi=Xn(Li,[0,Vn,Ii,Fn]),Ci=class extends tn{constructor(t){super(t)}};Ci.B=[1];var Ui=class extends tn{constructor(t){super(t)}U(){const t=Me(this);return null==t?J():t}},Bi=class extends tn{constructor(t){super(t)}},ki=[1,2],Mi=[0,Hn,[0,Ln],ki,Hn,[0,qn],ki,Bn,$n],Ni=class extends tn{constructor(t){super(t)}};Ni.B=[1];var Gi=Xn(Ni,[0,Vn,Mi,Fn]),Di=class extends tn{constructor(t){super(t)}};Di.B=[4,5];var Ri=class extends tn{constructor(t){super(t)}},$i=[0,Nn,Nn],zi=class extends tn{constructor(t){super(t)}},Wi=[1,2,3,4,5],Vi=class extends tn{constructor(t){super(t)}g(){return null!=Me(this)}h(){return null!=be(Fe(this,2))}},Hi=class extends tn{constructor(t){super(t)}},qi=[0,Wn,[0,qn,$n,Wn,[0,Bn,Fn,Fn],Wn,[0,Un,Fn]],Nn,Wn,[0,Hn,si,Wi,Hn,ni,Wi,Hn,Qr,Wi,Hn,oi,Wi,Hn,ri,Wi]],Ji=class extends tn{constructor(t){super(t)}},Ki=new Yn(462704549,Ji);ci[462704549]=nn([0,Wn,qi,Wn,[0,$n,Bn,In,Dn,Dn]]);var Yi=class extends tn{constructor(t){super(t)}},Xi=new Yn(477589892,Yi);function Zi(t,e){if(e=e?Oe(e):new Di,void 0!==t.displayNamesLocale?Ue(e,1,ve(t.displayNamesLocale)):void 0===t.displayNamesLocale&&Ue(e,1),void 0!==t.maxResults){var n=t.maxResults;if(null!=n){if("number"!=typeof n)throw fe(t=Error(),"warning"),t;if(!Number.isFinite(n)){const t=Error();fe(t,"incident"),p(t)}}Ue(e,2,n)}else"maxResults"in t&&Ue(e,2);if(void 0!==t.scoreThreshold){if(null!=(n=t.scoreThreshold)&&"number"!=typeof n)throw Error(`Value of float/double field must be a number, found ${typeof n}: ${n}`);Ue(e,3,n)}else"scoreThreshold"in t&&Ue(e,3);return void 0!==t.categoryAllowlist?Ne(e,4,t.categoryAllowlist):"categoryAllowlist"in t&&Ue(e,4),void 0!==t.categoryDenylist?Ne(e,5,t.categoryDenylist):"categoryDenylist"in t&&Ue(e,5),e}function Qi(t){const e={classifications:He(t,Pi).map((t=>function(t,e=-1,n=""){return{categories:t.map((t=>{var e=ye(Fe(t,1))??0??-1;const n=t.m,r=Kt(n),i=Ce(n,r,2),o=de(i);return null!=o&&o!==i&&Be(n,r,2,o),{index:e,score:o??0??0,categoryName:be(Fe(t,3))??""??"",displayName:be(Fe(t,4))??""??""}})),headIndex:e,headName:n}}(We(t,Oi,4)?.g()??[],ye(Fe(t,2))??0,be(Fe(t,3))??"")))};return null!=Ye(t)&&(e.timestampMs=Xe(Ye(t))),e}function to(t){return Array.from(t,(t=>127<t?t-256:t))}function eo(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,i=0;for(let o=0;o<t.length;o++)n+=t[o]*e[o],r+=t[o]*t[o],i+=e[o]*e[o];if(0>=r||0>=i)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*i)}let no;ci[477589892]=nn([0,Wn,qi,Wn,$i]);const ro=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function io(){if(void 0===no)try{await WebAssembly.instantiate(ro),no=!0}catch{no=!1}return no}async function oo(t,e){const n=await io()?"wasm_internal":"wasm_nosimd_internal";return e=e??".",{wasmLoaderPath:ar(`${encodeURIComponent(e)}/${encodeURIComponent(t)}_${encodeURIComponent(n)}.js`),wasmBinaryPath:ar(`${encodeURIComponent(e)}/${encodeURIComponent(t)}_${encodeURIComponent(n)}.wasm`)}}var so=class{};async function ao(t){if("function"!=typeof importScripts)return"string"==typeof t&&(t=Xr`${t}`),qr(t);importScripts(t.toString())}so.forVisionTasks=function(t=""){return oo("vision",t)},so.forTextTasks=function(t=""){return oo("text",t)},so.forAudioTasks=function(t=""){return oo("audio",t)},so.isSimdSupported=function(){return io()};function uo(t,e,n){t.l||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function co(t,e,n){t.l||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.i.stringToNewUTF8(e[n]);e=t.i._malloc(4*r.length),t.i.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.i._free(e);t.i._free(e)}function lo(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function ho(t,e,n){let r=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,i)=>{e?(n(r,i),r=[]):r.push(t)}}const fo=function(t){return class extends t{aa(){this.i._registerModelResourcesGraphService()}}}(class{constructor(t,e){this.j=!0,this.i=t,this.g=null,this.h=0,this.l="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:((t="undefined"==typeof OffscreenCanvas)||(t=(t=navigator.userAgent).includes("Safari")&&!t.includes("Chrome")),t?(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas")):this.i.canvas=new OffscreenCanvas(1,1))}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const n=t.length,r=this.i._malloc(n);this.i.HEAPU8.set(t,r),e?this.i._changeBinaryGraph(n,r):this.i._changeTextGraph(n,r),this.i._free(r)}configureAudio(t,e,n,r,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),uo(this,r||"input_audio",(r=>{uo(this,i=i||"audio_header",(i=>{this.i._configureAudio(r,i,t,e,n)}))}))}setAutoResizeCanvas(t){this.j=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,i){const o=4*t.length;this.h!==o&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(o),this.h=o),this.i.HEAPF32.set(t,this.g/4),uo(this,r,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){uo(this,e,(e=>{if(!this.i.canvas)throw Error("No OpenGL canvas configured.");e?this.i._bindTextureToStream(e):this.i._bindTextureToCanvas();var r=this.i.canvas.getContext("webgl2")||this.i.canvas.getContext("webgl");if(!r)throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");let i;this.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),this.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),t.videoWidth?(r=t.videoWidth,i=t.videoHeight):t.naturalWidth?(r=t.naturalWidth,i=t.naturalHeight):(r=t.width,i=t.height),!this.j||r===this.i.canvas.width&&i===this.i.canvas.height||(this.i.canvas.width=r,this.i.canvas.height=i);const[o,s]=[r,i];this.i._addBoundTextureToStream(e,o,s,n)}))}addBoolToStream(t,e,n){uo(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){uo(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){uo(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){uo(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addStringToStream(t,e,n){uo(this,e,(e=>{uo(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){uo(this,e,(e=>{co(this,Object.keys(t),(r=>{co(this,Object.values(t),(i=>{this.i._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){uo(this,n,(n=>{uo(this,e,(e=>{const i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputStream(i,t.length,e,n,r),this.i._free(i)}))}))}addEmptyPacketToStream(t,e){uo(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolToInputSidePacket(t,e){uo(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){uo(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){uo(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){uo(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){uo(this,e,(e=>{uo(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){uo(this,n,(n=>{uo(this,e,(e=>{const r=this.i._malloc(t.length);this.i.HEAPU8.set(t,r),this.i._addProtoToInputSidePacket(r,t.length,e,n),this.i._free(r)}))}))}attachBoolListener(t,e){lo(this,t,e),uo(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){ho(this,t,e),uo(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){lo(this,t,e),uo(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){ho(this,t,e),uo(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachDoubleListener(t,e){lo(this,t,e),uo(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){ho(this,t,e),uo(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){lo(this,t,e),uo(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){ho(this,t,e),uo(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){lo(this,t,e),uo(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){ho(this,t,e),uo(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){lo(this,t,e),uo(this,t,(t=>{this.i._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){ho(this,t,e),uo(this,t,(t=>{this.i._attachProtoVectorListener(t,n||!1)}))}attachAudioListener(t,e,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),lo(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),uo(this,t,(t=>{this.i._attachAudioListener(t,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}});var go=class extends fo{};async function po(t,e,n){return t=await(async(t,e,n,r)=>{if(e&&await ao(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await ao(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&r&&((e=self.Module).locateFile=r.locateFile,r.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=r.mainScriptUrlOrBlob)),r=await self.ModuleFactory(self.Module||r),self.ModuleFactory=self.Module=void 0,new t(r,null)})(t,e.wasmLoaderPath,e.assetLoaderPath,{locateFile(t){var n=e.wasmBinaryPath.toString();return n.includes(t)?n:(n=e.assetBinaryPath?.toString(),n?.includes(t)?n:t)}}),await t.u(n),t}async function yo(t,e,n){return po(t,e,n)}function mo(t,e){const n=We(t.baseOptions,Vi,1)||new Vi;"string"==typeof e?(Ue(n,2,ve(e)),Ue(n,1)):e instanceof Uint8Array&&(Ue(n,1,ie(e,!1,!1)),Ue(n,2)),qe(t.baseOptions,0,1,n)}function vo(t,e){const n=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(We(t.baseOptions,Vi,1)?.g()||We(t.baseOptions,Vi,1)?.h()||e.baseOptions?.modelAssetBuffer||e.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");return function(t,e){let n=We(t.baseOptions,zi,3);if(!n){var r=n=new zi;Je(r,4,new ii)}"delegate"in e&&("GPU"===e.delegate?Je(e=n,2,r=new ei):Je(e=n,4,r=new ii)),qe(t.baseOptions,0,3,n)}(t,n),n.modelAssetPath?fetch(n.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${n.modelAssetPath} (${t.status})`)})).then((e=>{try{t.g.i.FS_unlink("/model.dat")}catch{}t.g.i.FS_createDataFile("/","model.dat",new Uint8Array(e),!0,!1,!1),mo(t,"/model.dat"),t.o()})):(mo(t,n.modelAssetBuffer),t.o(),Promise.resolve())}function bo(t){try{const e=t.l.length;if(1===e)throw Error(t.l[0].message);if(1<e)throw Error("Encountered multiple errors: "+t.l.map((t=>t.message)).join(", "))}finally{t.l=[]}}function wo(t,e){t.j=Math.max(t.j,e)}var Ao=class{constructor(t){this.g=t,this.l=[],this.j=0,this.g.setAutoRenderToScreen(!1)}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.l.push(Error(e))})),this.g.aa(),this.g.setGraph(t,e),bo(this)}finishProcessing(){this.g.finishProcessing(),bo(this)}close(){this.g.closeGraph()}};Ao.prototype.close=Ao.prototype.close;var _o=class extends Ao{constructor(t,e){super(new go(t,e)),this.s={languages:[]},this.h=new Ji,t=new Hi,qe(this.h,0,1,t)}u(t){var e=Zi(t,We(this.h,Di,2));return qe(this.h,0,2,e),vo(this,t)}get baseOptions(){return We(this.h,Hi,1)}set baseOptions(t){qe(this.h,0,1,t)}X(t){return this.s={languages:[]},this.g.addStringToStream(t,"text_in",this.j+1),this.finishProcessing(),this.s}o(){var t=new Ti;Si(t),Ze(t,15,"classifications_out");const e=new ui;Qe(e,Ki,this.h);const n=new mi;Ge(n,ve("mediapipe.tasks.text.text_classifier.TextClassifierGraph")),yi(n),Ze(n,4,"CLASSIFICATIONS:classifications_out"),n.u(e),Ke(t,n),this.g.attachProtoListener("classifications_out",((t,e)=>{if(({classifications:t}=Qi(Fi(t))),1!==t.length)throw Error(`Expected 1 classification head, got ${t.length}`);this.s.languages=t[0].categories.map((t=>({languageCode:t.categoryName,probability:t.score}))),wo(this,e)})),this.g.attachEmptyPacketListener("classifications_out",(t=>{wo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};_o.prototype.detect=_o.prototype.X,_o.prototype.setOptions=_o.prototype.u,_o.createFromModelPath=function(t,e){return yo(_o,t,{baseOptions:{modelAssetPath:e}})},_o.createFromModelBuffer=function(t,e){return yo(_o,t,{baseOptions:{modelAssetBuffer:e}})},_o.createFromOptions=function(t,e){return yo(_o,t,e)};var So=class extends Ao{constructor(t,e){super(new go(t,e)),this.s={classifications:[]},this.h=new Ji,t=new Hi,qe(this.h,0,1,t)}u(t){var e=Zi(t,We(this.h,Di,2));return qe(this.h,0,2,e),vo(this,t)}get baseOptions(){return We(this.h,Hi,1)}set baseOptions(t){qe(this.h,0,1,t)}W(t){return this.s={classifications:[]},this.g.addStringToStream(t,"text_in",this.j+1),this.finishProcessing(),this.s}o(){var t=new Ti;Si(t),Ze(t,15,"classifications_out");const e=new ui;Qe(e,Ki,this.h);const n=new mi;Ge(n,ve("mediapipe.tasks.text.text_classifier.TextClassifierGraph")),yi(n),Ze(n,4,"CLASSIFICATIONS:classifications_out"),n.u(e),Ke(t,n),this.g.attachProtoListener("classifications_out",((t,e)=>{this.s=Qi(Fi(t)),wo(this,e)})),this.g.attachEmptyPacketListener("classifications_out",(t=>{wo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};So.prototype.classify=So.prototype.W,So.prototype.setOptions=So.prototype.u,So.createFromModelPath=function(t,e){return yo(So,t,{baseOptions:{modelAssetPath:e}})},So.createFromModelBuffer=function(t,e){return yo(So,t,{baseOptions:{modelAssetBuffer:e}})},So.createFromOptions=function(t,e){return yo(So,t,e)};var xo=class extends Ao{constructor(t,e){super(new go(t,e)),this.s={embeddings:[]},this.h=new Yi,t=new Hi,qe(this.h,0,1,t)}u(t){var e=this.h,n=We(this.h,Ri,2);return n=n?Oe(n):new Ri,void 0!==t.l2Normalize?Ue(n,1,ge(t.l2Normalize)):"l2Normalize"in t&&Ue(n,1),void 0!==t.quantize?Ue(n,2,ge(t.quantize)):"quantize"in t&&Ue(n,2),qe(e,0,2,n),vo(this,t)}get baseOptions(){return We(this.h,Hi,1)}set baseOptions(t){qe(this.h,0,1,t)}Y(t){return this.g.addStringToStream(t,"text_in",this.j+1),this.finishProcessing(),this.s}o(){var t=new Ti;Si(t),Ze(t,15,"embeddings_out");const e=new ui;Qe(e,Xi,this.h);const n=new mi;Ge(n,ve("mediapipe.tasks.text.text_embedder.TextEmbedderGraph")),yi(n),Ze(n,4,"EMBEDDINGS:embeddings_out"),n.u(e),Ke(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=Gi(t),this.s=function(t){return{embeddings:He(t,Bi).map((t=>{const e={headIndex:ye(Fe(t,3))??0??-1,headName:be(Fe(t,4))??""??""};if(void 0!==ze(t,Ci,De(t,1))){t=We(t,Ci,De(t,1)).m;var n=Kt(t);const r=2&n;let i=ke(t,n,1,1),o=Jt(i);if(!(4&o)){Object.isFrozen(i)&&(o=0,i=zt(i),Be(t,n,1,i));let e=0,s=0;for(;e<i.length;e++){const t=de(i[e]);null!=t&&(i[s++]=t)}s<e&&(i.length=s),o|=5,r&&(o|=34),Yt(i,o),2&o&&Object.freeze(i)}!r&&(2&o||Object.isFrozen(i))&&(i=zt(i),Vt(i,5),Be(t,n,1,i)),e.floatEmbedding=i}else n=new Uint8Array(0),e.quantizedEmbedding=We(t,Ui,De(t,2))?.U()?.V()??n;return e})),timestampMs:Xe(Ye(t))}}(t),wo(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{wo(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};xo.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=eo(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=eo(to(t.quantizedEmbedding),to(e.quantizedEmbedding))}return t},xo.prototype.embed=xo.prototype.Y,xo.prototype.setOptions=xo.prototype.u,xo.createFromModelPath=function(t,e){return yo(xo,t,{baseOptions:{modelAssetPath:e}})},xo.createFromModelBuffer=function(t,e){return yo(xo,t,{baseOptions:{modelAssetBuffer:e}})},xo.createFromOptions=function(t,e){return yo(xo,t,e)},exports.FilesetResolver=so,exports.LanguageDetector=_o,exports.TaskRunner=Ao,exports.TextClassifier=So,exports.TextEmbedder=xo;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=self;function e(t){return t}function n(){throw Error("Invalid UTF8")}function r(t,e){return e=String.fromCharCode.apply(null,e),null==t?e:t+e}let i,o;const s="undefined"!=typeof TextDecoder;let a;const u="undefined"!=typeof TextEncoder;function c(t){if(u)t=(a||=new TextEncoder).encode(t);else{let n=0;const r=new Uint8Array(3*t.length);for(let i=0;i<t.length;i++){var e=t.charCodeAt(i);if(128>e)r[n++]=e;else{if(2048>e)r[n++]=e>>6|192;else{if(55296<=e&&57343>=e){if(56319>=e&&i<t.length){const o=t.charCodeAt(++i);if(56320<=o&&57343>=o){e=1024*(e-55296)+o-56320+65536,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128;continue}i--}e=65533}r[n++]=e>>12|224,r[n++]=e>>6&63|128}r[n++]=63&e|128}}t=n===r.length?r:r.subarray(0,n)}return t}var l,h;t:{for(var f=["CLOSURE_FLAGS"],d=t,g=0;g<f.length;g++)if(null==(d=d[f[g]])){h=null;break t}h=d}var p,m=h&&h[610401301];l=null!=m&&m;const y=t.navigator;function v(t){return!!l&&(!!p&&p.brands.some((({brand:e})=>e&&-1!=e.indexOf(t))))}function b(e){var n;return(n=t.navigator)&&(n=n.userAgent)||(n=""),-1!=n.indexOf(e)}function w(){return!!l&&(!!p&&0<p.brands.length)}function A(){return w()?v("Chromium"):(b("Chrome")||b("CriOS"))&&!(!w()&&b("Edge"))||b("Silk")}p=y&&y.userAgentData||null;var _=!w()&&(b("Trident")||b("MSIE"));!b("Android")||A(),A(),b("Safari")&&(A()||!w()&&b("Coast")||!w()&&b("Opera")||!w()&&b("Edge")||(w()?v("Microsoft Edge"):b("Edg/"))||w()&&v("Opera"));var S={},x=null;function E(t){var e=t.length,n=3*e/4;n%3?n=Math.floor(n):-1!="=.".indexOf(t[e-1])&&(n=-1!="=.".indexOf(t[e-2])?n-2:n-1);var r=new Uint8Array(n),i=0;return function(t,e){function n(e){for(;r<t.length;){var n=t.charAt(r++),i=x[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return e}T();for(var r=0;;){var i=n(-1),o=n(0),s=n(64),a=n(64);if(64===a&&-1===i)break;e(i<<2|o>>4),64!=s&&(e(o<<4&240|s>>2),64!=a&&e(s<<6&192|a))}}(t,(function(t){r[i++]=t})),i!==n?r.subarray(0,i):r}function T(){if(!x){x={};for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),e=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++){var r=t.concat(e[n].split(""));S[n]=r;for(var i=0;i<r.length;i++){var o=r[i];void 0===x[o]&&(x[o]=i)}}}}var O="undefined"!=typeof Uint8Array,P=!_&&"function"==typeof btoa;function L(t){if(!P){var e;void 0===e&&(e=0),T(),e=S[e];var n=Array(Math.floor(t.length/3)),r=e[64]||"";let u=0,c=0;for(;u<t.length-2;u+=3){var i=t[u],o=t[u+1],s=t[u+2],a=e[i>>2];i=e[(3&i)<<4|o>>4],o=e[(15&o)<<2|s>>6],s=e[63&s],n[c++]=a+i+o+s}switch(a=0,s=r,t.length-u){case 2:s=e[(15&(a=t[u+1]))<<2]||r;case 1:t=t[u],n[c]=e[t>>2]+e[(3&t)<<4|a>>4]+s+r}return n.join("")}for(e="",n=0,r=t.length-10240;n<r;)e+=String.fromCharCode.apply(null,t.subarray(n,n+=10240));return e+=String.fromCharCode.apply(null,n?t.subarray(n):t),btoa(e)}const I=/[-_.]/g,F={"-":"+",_:"/",".":"="};function j(t){return F[t]||""}function B(t){if(!P)return E(t);I.test(t)&&(t=t.replace(I,j)),t=atob(t);const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}function U(t){return O&&null!=t&&t instanceof Uint8Array}let k;function C(){return k||=new Uint8Array(0)}var N={};let M;function G(t){if(t!==N)throw Error("illegal external caller")}function $(){return M||=new D(null,N)}function z(t){G(N);var e=t.F;return null==(e=null==e||U(e)?e:"string"==typeof e?B(e):null)?e:t.F=e}var D=class{constructor(t,e){if(G(e),this.F=t,null!=t&&0===t.length)throw Error("ByteString should be constructed with non-empty values")}M(){const t=z(this);return t?new Uint8Array(t):C()}};function R(t,e){return Error(`Invalid wire type: ${t} (at position ${e})`)}function V(){return Error("Failed to read varint, encoding is invalid.")}function W(t,e){return Error(`Tried to read past the end of the data ${e} > ${t}`)}function H(t){return 0==t.length?$():new D(t,N)}function q(t){if("string"==typeof t)return{buffer:B(t),v:!1};if(Array.isArray(t))return{buffer:new Uint8Array(t),v:!1};if(t.constructor===Uint8Array)return{buffer:t,v:!1};if(t.constructor===ArrayBuffer)return{buffer:new Uint8Array(t),v:!1};if(t.constructor===D)return{buffer:z(t)||C(),v:!0};if(t instanceof Uint8Array)return{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),v:!1};throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, a ByteString or an Array of numbers")}const J="function"==typeof Uint8Array.prototype.slice;let K,Y=0,X=0;function Q(t){const e=0>t;let n=(t=Math.abs(t))>>>0;if(t=Math.floor((t-n)/4294967296),e){const[e,r]=rt(n,t);t=r,n=e}Y=n>>>0,X=t>>>0}function Z(t){const e=K||=new DataView(new ArrayBuffer(8));e.setFloat32(0,+t,!0),X=0,Y=e.getUint32(0,!0)}function tt(t,e){return 4294967296*e+(t>>>0)}function et(t,e){const n=2147483648&e;return n&&(e=~e>>>0,0==(t=1+~t>>>0)&&(e=e+1>>>0)),t=tt(t,e),n?-t:t}function nt(t){if(16>t.length)Q(Number(t));else if("function"==typeof BigInt)t=BigInt(t),Y=Number(t&BigInt(4294967295))>>>0,X=Number(t>>BigInt(32)&BigInt(4294967295));else{const e=+("-"===t[0]);X=Y=0;const n=t.length;for(let r=e,i=(n-e)%6+e;i<=n;r=i,i+=6){const e=Number(t.slice(r,i));X*=1e6,Y=1e6*Y+e,4294967296<=Y&&(X+=Math.trunc(Y/4294967296),X>>>=0,Y>>>=0)}if(e){const[t,e]=rt(Y,X);Y=t,X=e}}}function rt(t,e){return e=~e,t?t=1+~t:e+=1,[t,e]}function it(t,e,{G:n=!1}={}){t.G=n,e&&(e=q(e),t.j=e.buffer,t.o=e.v,t.I=0,t.m=t.j.length,t.g=t.I)}function ot(t,e){if(t.g=e,e>t.m)throw W(t.m,e)}function st(t,e){let n,r=0,i=0,o=0;const s=t.j;let a=t.g;do{n=s[a++],r|=(127&n)<<o,o+=7}while(32>o&&128&n);for(32<o&&(i|=(127&n)>>4),o=3;32>o&&128&n;o+=7)n=s[a++],i|=(127&n)<<o;if(ot(t,a),128>n)return e(r>>>0,i>>>0);throw V()}function at(t){let e=0,n=t.g;const r=n+10,i=t.j;for(;n<r;){const r=i[n++];if(e|=r,0==(128&r))return ot(t,n),!!(127&e)}throw V()}function ut(t,e){if(0>e)throw Error(`Tried to read a negative byte length: ${e}`);const n=t.g,r=n+e;if(r>t.m)throw W(e,t.m-n);return t.g=r,n}function ct(t,e){if(0==e)return $();var n=ut(t,e);return t.G&&t.o?n=t.j.subarray(n,n+e):(t=t.j,n=n===(e=n+e)?C():J?t.slice(n,e):new Uint8Array(t.subarray(n,e))),H(n)}var lt=class{constructor(t,e){this.j=null,this.o=!1,this.g=this.m=this.I=0,it(this,t,e)}h(){const t=this.j;let e=this.g,n=t[e++],r=127&n;if(128&n&&(n=t[e++],r|=(127&n)<<7,128&n&&(n=t[e++],r|=(127&n)<<14,128&n&&(n=t[e++],r|=(127&n)<<21,128&n&&(n=t[e++],r|=n<<28,128&n&&128&t[e++]&&128&t[e++]&&128&t[e++]&&128&t[e++]&&128&t[e++])))))throw V();return ot(this,e),r}A(){var t=this.j;const e=this.g;var n=t[e],r=t[e+1],i=t[e+2];return t=t[e+3],ot(this,this.g+4),n=2*((i=(n<<0|r<<8|i<<16|t<<24)>>>0)>>31)+1,r=i>>>23&255,i&=8388607,255==r?i?NaN:1/0*n:0==r?n*Math.pow(2,-149)*i:n*Math.pow(2,r-150)*(i+Math.pow(2,23))}U(){return this.h()}},ht=[];function ft(t){var e=t.g;if(e.g==e.m)return!1;t.j=t.g.g;var n=t.g.h()>>>0;if(e=n>>>3,!(0<=(n&=7)&&5>=n))throw R(n,t.j);if(1>e)throw Error(`Invalid field number: ${e} (at position ${t.j})`);return t.m=e,t.h=n,!0}function dt(t){switch(t.h){case 0:0!=t.h?dt(t):at(t.g);break;case 1:ot(t=t.g,t.g+8);break;case 2:if(2!=t.h)dt(t);else{var e=t.g.h()>>>0;ot(t=t.g,t.g+e)}break;case 5:ot(t=t.g,t.g+4);break;case 3:for(e=t.m;;){if(!ft(t))throw Error("Unmatched start-group tag: stream EOF");if(4==t.h){if(t.m!=e)throw Error("Unmatched end-group tag");break}dt(t)}break;default:throw R(t.h,t.j)}}function gt(t,e,n){const r=t.g.m,i=t.g.h()>>>0,o=t.g.g+i;let s=o-r;if(0>=s&&(t.g.m=o,n(e,t,void 0,void 0,void 0),s=o-t.g.g),s)throw Error(`Message parsing ended unexpectedly. Expected to read ${i} bytes, instead read ${i-s} bytes, either the data ended unexpectedly or the message misreported its own length`);t.g.g=o,t.g.m=r}function pt(t){var e=t.g.h()>>>0,a=ut(t=t.g,e);if(t=t.j,s){var u,c=t;(u=o)||(u=o=new TextDecoder("utf-8",{fatal:!0})),t=a+e,c=0===a&&t===c.length?c:c.subarray(a,t);try{var l=u.decode(c)}catch(t){if(void 0===i){try{u.decode(new Uint8Array([128]))}catch(t){}try{u.decode(new Uint8Array([97])),i=!0}catch(t){i=!1}}throw!i&&(o=void 0),t}}else{e=(l=a)+e,a=[];let i,o=null;for(;l<e;){var h=t[l++];128>h?a.push(h):224>h?l>=e?n():(i=t[l++],194>h||128!=(192&i)?(l--,n()):a.push((31&h)<<6|63&i)):240>h?l>=e-1?n():(i=t[l++],128!=(192&i)||224===h&&160>i||237===h&&160<=i||128!=(192&(c=t[l++]))?(l--,n()):a.push((15&h)<<12|(63&i)<<6|63&c)):244>=h?l>=e-2?n():(i=t[l++],128!=(192&i)||0!=i-144+(h<<28)>>30||128!=(192&(c=t[l++]))||128!=(192&(u=t[l++]))?(l--,n()):(h=(7&h)<<18|(63&i)<<12|(63&c)<<6|63&u,h-=65536,a.push(55296+(h>>10&1023),56320+(1023&h)))):n(),8192<=a.length&&(o=r(o,a),a.length=0)}l=r(o,a)}return l}function mt(t){const e=t.g.h()>>>0;return ct(t.g,e)}function yt(t,e,n){var r=t.g.h()>>>0;for(r=t.g.g+r;t.g.g<r;)n.push(e.call(t.g))}var vt=[];function bt(t){return t?/^\d+$/.test(t)?(nt(t),new wt(Y,X)):null:At||=new wt(0,0)}var wt=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let At;function _t(t){return t?/^-?\d+$/.test(t)?(nt(t),new St(Y,X)):null:xt||=new St(0,0)}var St=class{constructor(t,e){this.h=t>>>0,this.g=e>>>0}};let xt;function Et(t,e,n){for(;0<n||127<e;)t.g.push(127&e|128),e=(e>>>7|n<<25)>>>0,n>>>=7;t.g.push(e)}function Tt(t,e){for(;127<e;)t.g.push(127&e|128),e>>>=7;t.g.push(e)}function Ot(t,e){if(0<=e)Tt(t,e);else{for(let n=0;9>n;n++)t.g.push(127&e|128),e>>=7;t.g.push(1)}}function Pt(t){var e=Y;t.g.push(e>>>0&255),t.g.push(e>>>8&255),t.g.push(e>>>16&255),t.g.push(e>>>24&255)}function Lt(t,e){0!==e.length&&(t.j.push(e),t.h+=e.length)}function It(t,e,n){Tt(t.g,8*e+n)}function Ft(t,e){return It(t,e,2),e=t.g.end(),Lt(t,e),e.push(t.h),e}function jt(t,e){var n=e.pop();for(n=t.h+t.g.length()-n;127<n;)e.push(127&n|128),n>>>=7,t.h++;e.push(n),t.h++}function Bt(t,e,n){It(t,e,2),Tt(t.g,n.length),Lt(t,t.g.end()),Lt(t,n)}class Ut{constructor(t,e,n){this.g=t,this.h=e,this.j=n}}function kt(t){return Array.prototype.slice.call(t)}const Ct="function"==typeof Symbol&&"symbol"==typeof Symbol()?Symbol():void 0;var Nt=Ct?(t,e)=>{t[Ct]|=e}:(t,e)=>{void 0!==t.u?t.u|=e:Object.defineProperties(t,{u:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function Mt(t){const e=$t(t);1!=(1&e)&&(Object.isFrozen(t)&&(t=kt(t)),Dt(t,1|e))}var Gt=Ct?(t,e)=>{t[Ct]&=~e}:(t,e)=>{void 0!==t.u&&(t.u&=~e)},$t=Ct?t=>0|t[Ct]:t=>0|t.u,zt=Ct?t=>t[Ct]:t=>t.u,Dt=Ct?(t,e)=>{t[Ct]=e}:(t,e)=>{void 0!==t.u?t.u=e:Object.defineProperties(t,{u:{value:e,configurable:!0,writable:!0,enumerable:!1}})};function Rt(t){return Nt(t,1),t}function Vt(t,e){Dt(e,-255&(0|t))}function Wt(t,e){Dt(e,-221&(34|t))}function Ht(t){return 0===(t=t>>11&1023)?536870912:t}var qt,Jt={};function Kt(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&t.constructor===Object}function Yt(t,e,n){if(null!=t)if("string"==typeof t)t=t?new D(t,N):$();else if(t.constructor!==D)if(U(t))t=n?H(t):t.length?new D(new Uint8Array(t),N):$();else{if(!e)throw Error();t=void 0}return t}const Xt=[];function Qt(t){if(2&t)throw Error()}let Zt,te,ee,ne,re;function ie(t,e){(e=Zt?e[Zt]:void 0)&&(t[Zt]=kt(e))}function oe(t,e){t.__closure__error__context__984382||(t.__closure__error__context__984382={}),t.__closure__error__context__984382.severity=e}function se(t){return null==t?t:"number"==typeof t||"NaN"===t||"Infinity"===t||"-Infinity"===t?Number(t):void 0}function ae(t){if(null!=t){if("boolean"!=typeof t){var e=typeof t;throw Error(`Expected boolean but got ${"object"!=e?e:t?Array.isArray(t)?"array":e:"null"}: ${t}`)}t=!!t}return t}function ue(t){return"number"==typeof t&&Number.isFinite(t)||!!t&&"string"==typeof t&&isFinite(t)}function ce(t){if(null==t)return t;if("string"==typeof t){if(!t)return;t=+t}return"number"==typeof t?t:void 0}function le(t){if("string"!=typeof t)throw Error();return t}function he(t){if(null!=t&&"string"!=typeof t)throw Error();return t}function fe(t){return null==t||"string"==typeof t?t:void 0}function de(t,e,n){var r=!1;if(null!=t&&"object"==typeof t&&!(r=Array.isArray(t))&&t.D===Jt)return t;if(r){var i=r=$t(t);return 0===i&&(i|=32&n),(i|=2&n)!==r&&Dt(t,i),new e(t)}}function ge(t){switch(typeof t){case"boolean":return ne||=[0,void 0,!0];case"number":return 0<t?void 0:0===t?re||=[0,void 0]:[-t,void 0];case"string":return[0,t];case"object":return t}}function pe(t,e,n){if(null==t&&(t=ee),ee=void 0,null==t){var r=96;n?(t=[n],r|=512):t=[],e&&(r=-2095105&r|(1023&e)<<11)}else{if(!Array.isArray(t))throw Error();if(64&(r=$t(t)))return te&&delete t[te],t;if(r|=64,n&&(r|=512,n!==t[0]))throw Error();t:{var i=(n=t).length;if(i){const t=i-1;var o=n[t];if(Kt(o)){1024<=(i=t-(e=+!!(512&(r|=256))-1))&&(me(n,e,o),i=1023),r=-2095105&r|(1023&i)<<11;break t}}e&&(o=+!!(512&r)-1,1024<(e=Math.max(e,i-o))&&(me(n,o,{}),r|=256,e=1023),r=-2095105&r|(1023&e)<<11)}}return Dt(t,r),t}function me(t,e,n){const r=1023+e,i=t.length;for(let o=r;o<i;o++){const r=t[o];null!=r&&r!==n&&(n[o-e]=r)}t.length=r+1,t[r]=n}function ye(t,e,n,r,i,o){if(null!=t){if(Array.isArray(t))t=i&&0==t.length&&1&$t(t)?void 0:o&&2&$t(t)?t:ve(t,e,n,void 0!==r,i,o);else if(Kt(t)){const s={};for(let a in t)s[a]=ye(t[a],e,n,r,i,o);t=s}else t=e(t,r);return t}}function ve(t,e,n,r,i,o){const s=r||n?$t(t):0;r=r?!!(32&s):void 0;const a=kt(t);for(let t=0;t<a.length;t++)a[t]=ye(a[t],e,n,r,i,o);return n&&(ie(a,t),n(s,a)),a}function be(t){return t.D===Jt?t.toJSON():function(t){switch(typeof t){case"number":return isFinite(t)?t:String(t);case"boolean":return t?1:0;case"object":if(t&&!Array.isArray(t)){if(U(t))return L(t);if(t instanceof D){const e=t.F;return null==e?"":"string"==typeof e?e:t.F=L(e)}}}return t}(t)}function we(t,e,n=Wt){if(null!=t){if(O&&t instanceof Uint8Array)return e?t:new Uint8Array(t);if(Array.isArray(t)){const r=$t(t);return 2&r?t:!e||68&r||!(32&r||0===r)?ve(t,we,4&r?Wt:n,!0,!1,!0):(Dt(t,34|r),t)}return t.D===Jt&&(e=t.l,t=2&(n=zt(e))?t:_e(t,e,n,!0)),t}}function Ae(t){const e=t.l;return _e(t,e,zt(e),!1)}function _e(t,e,n,r){return t=t.constructor,ee=e=Se(e,n,r),e=new t(e),ee=void 0,e}function Se(t,e,n){const r=n||2&e?Wt:Vt,i=!!(32&e);return t=function(t,e,n){const r=kt(t);var i=r.length;const o=256&e?r[i-1]:void 0;for(i+=o?-1:0,e=512&e?1:0;e<i;e++)r[e]=n(r[e]);if(o){e=r[e]={};for(const t in o)e[t]=n(o[t])}return ie(r,t),r}(t,e,(t=>we(t,i,r))),Nt(t,32|(n?2:0)),t}function xe(t){const e=t.l,n=zt(e);return 2&n?_e(t,e,n,!1):t}function Ee(t,e){return Te(t=t.l,zt(t),e)}function Te(t,e,n,r){if(-1===n)return null;if(n>=Ht(e)){if(256&e)return t[t.length-1][n]}else{var i=t.length;if(r&&256&e&&null!=(r=t[i-1][n]))return r;if((e=n+(+!!(512&e)-1))<i)return t[e]}}function Oe(t,e,n,r){const i=t.l,o=zt(i);return Qt(o),Pe(i,o,e,n,r),t}function Pe(t,e,n,r,i){var o=Ht(e);if(n>=o||i){if(i=e,256&e)o=t[t.length-1];else{if(null==r)return;o=t[o+(+!!(512&e)-1)]={},i|=256}o[n]=r,i!==e&&Dt(t,i)}else t[n+(+!!(512&e)-1)]=r,256&e&&(n in(t=t[t.length-1])&&delete t[n])}function Le(t,e,n,r,i){var o=2&e;let s=Te(t,e,n,i);Array.isArray(s)||(s=qt);const a=$t(s);if(1&a||Rt(s),o)2&a||Nt(s,34),1&r||Object.freeze(s);else{o=!(2&r);const u=2&a;1&r||!u?o&&32&a&&!u&&Gt(s,32):(s=Rt(kt(s)),Pe(t,e,n,s,i))}return s}function Ie(t){t=t.l;const e=zt(t),n=Te(t,e,1),r=Yt(n,!0,!!(34&e));return null!=r&&r!==n&&Pe(t,e,1,r),r}function Fe(t,e,n){t=t.l;const r=zt(t);if(Qt(r),null==n)Pe(t,r,e);else{if(!(4&$t(n))){Object.isFrozen(n)&&(n=kt(n));for(let t=0;t<n.length;t++)n[t]=le(n[t]);Dt(n,5)}Pe(t,r,e,n)}}function je(t,e){t=t.l;const n=zt(t);Qt(n),Pe(t,n,2,""===e?void 0:e)}function Be(t,e){return Ue(t=t.l,zt(t),Nr)===e?e:-1}function Ue(t,e,n){let r=0;for(let i=0;i<n.length;i++){const o=n[i];null!=Te(t,e,o)&&(0!==r&&Pe(t,e,r),r=o)}return r}function ke(t,e,n,r){const i=zt(t);Qt(i);const o=Te(t,i,n,r);let s;if(null!=o&&o.D===Jt)return(e=xe(o))!==o&&Pe(t,i,n,e,r),e.l;if(Array.isArray(o)){const t=$t(o);s=2&t?Se(o,t,!1):o,s=pe(s,e[0],e[1])}else s=pe(void 0,e[0],e[1]);return s!==o&&Pe(t,i,n,s,r),s}function Ce(t,e,n,r){t=t.l;const i=zt(t),o=Te(t,i,n,r);return(e=de(o,e,i))!==o&&null!=e&&Pe(t,i,n,e,r),e}function Ne(t,e,n){if(null==(e=Ce(t,e,n,!1)))return e;t=t.l;const r=zt(t);if(!(2&r)){const i=xe(e);i!==e&&Pe(t,r,n,e=i,!1)}return e}function Me(t,e,n,r){var i=!!(2&e),o=Le(t,e,1,1);if(o===qt||!(4&$t(o))){var s=o;o=!!(2&e);var a=!!(2&$t(s));i=s,!o&&a&&(s=kt(s));var u=e|(a?2:0);a=a||void 0;let c=0,l=0;for(;c<s.length;c++){const t=de(s[c],n,u);void 0!==t&&(a=a||2&zt(t.l),s[l++]=t)}return l<c&&(s.length=l),u=5|(s=$t(n=s)),s!=(a=a?-9&u:8|u)&&(Object.isFrozen(n)&&(n=kt(n)),Dt(n,a)),i!==(s=n)&&Pe(t,e,1,s),(o&&2!==r||1===r)&&Object.freeze(s),s}return 3===r||(i?2===r&&(r=$t(o),o=kt(o),Dt(o,r),Pe(t,e,1,o)):(i=Object.isFrozen(o),1===r?i||Object.freeze(o):(n=-35&(r=$t(o)),i&&(r=0,Pe(t,e,1,o=kt(o))),r!==n&&Dt(o,n)))),o}function Ge(t,e){var n=t.l,r=zt(n);if(e=Me(n,r,e,(t=!!(2&r))?1:2),!(t||8&$t(e))){for(t=0;t<e.length;t++)(n=e[t])!==(r=xe(n))&&(e[t]=r);Nt(e,8)}return e}function $e(t,e,n,r,i){return null==r&&(r=void 0),Oe(t,n,r,i)}function ze(t,e,n){var r=Wr;null==n&&(n=void 0),t=t.l;const i=zt(t);Qt(i),(r=Ue(t,i,r))&&r!==e&&null!=n&&Pe(t,i,r),Pe(t,i,e,n)}function De(t,e){var n=vr;t=t.l;const r=zt(t);Qt(r),t=Me(t,r,n,2),e=null!=e?e:new n,t.push(e),e.v()&&Gt(t,8)}function Re(t){return t=null==(t=Ee(t,2))||ue(t)?t:void 0}function Ve(t){return t??0}function We(t,e,n){n=le(n),t=t.l;const r=zt(t);Qt(r),Le(t,r,e,2).push(n)}function He(t,e,n){e.g?e.j(t,e.g,e.h,n,!0):e.j(t,e.h,n,!0)}Dt(Xt,39),qt=Object.freeze(Xt);var qe=class{constructor(t,e){this.l=pe(t,e)}toJSON(){return Je(this,ve(this.l,be,void 0,void 0,!1,!1),!0)}v(){return!!(2&$t(this.l))}};function Je(t,e,n){var r=t.constructor.B,i=Ht(zt(n?t.l:e)),o=!1;if(r){if(!n){var s;if((e=kt(e)).length&&Kt(s=e[e.length-1]))for(o=0;o<r.length;o++)if(r[o]>=i){Object.assign(e[e.length-1]={},s);break}o=!0}var a;i=e,n=!n,t=Ht(s=zt(t.l)),s=+!!(512&s)-1;for(let e=0;e<r.length;e++){var u=r[e];if(u<t){var c=i[u+=s];null==c?i[u]=n?qt:Rt([]):n&&c!==qt&&Mt(c)}else{if(!a){var l=void 0;i.length&&Kt(l=i[i.length-1])?a=l:i.push(a={})}c=a[u],null==a[u]?a[u]=n?qt:Rt([]):n&&c!==qt&&Mt(c)}}}if(!(r=e.length))return e;let h,f;if(Kt(a=e[r-1])){t:{var d=a;l={},i=!1;for(let t in d)n=d[t],Array.isArray(n)&&n!=n&&(i=!0),null!=n?l[t]=n:i=!0;if(i){for(let t in l){d=l;break t}d=null}}d!=a&&(h=!0),r--}for(;0<r&&null==(a=e[r-1]);r--)f=!0;return h||f?(e=o?e:Array.prototype.slice.call(e,0,r),o&&(e.length=r),d&&e.push(d),e):e}function Ke(t){return{K:zn,H:t}}function Ye(t,e){if(Array.isArray(e)){var n=$t(e);if(4&n)return e;for(var r=0,i=0;r<e.length;r++){const n=t(e[r]);null!=n&&(e[i++]=n)}return i<r&&(e.length=i),Dt(e,5|n),2&n&&Object.freeze(e),e}}qe.prototype.D=Jt,qe.prototype.toString=function(){return Je(this,this.l,!1).toString()};const Xe=Symbol();function Qe(t){let e=t[Xe];if(!e){const n=on(t),r=mn(t),i=r.h;e=i?(t,e)=>i(t,e,r):(t,e)=>{for(;ft(e)&&4!=e.h;){var i=e.m,o=r[i];if(!o){var s=r.g;s&&(s=s[i])&&(o=r[i]=Ze(s))}o&&o(e,t,i)||(i=(o=e).j,dt(o),o.J?o=void 0:(s=o.g.g-i,o.g.g=i,o=ct(o.g,s)),i=t,o&&(Zt||=Symbol(),(s=i[Zt])?s.push(o):i[Zt]=[o]))}for(const e in n){t[te||=Symbol()]=n;break}},t[Xe]=e}return e}function Ze(t){const e=function(t){if(t=t.H)return Qe(t)}(t),n=t.K.g;if(e){const r=mn(t.H).C;return(t,i,o)=>n(t,i,o,r,e)}return(t,e,r)=>n(t,e,r)}const tn=Symbol();function en(t,e,n,r){let i;if(r){const e=r[tn];i=e?e.C:ge(r[0]),n[t]=e??r}i&&i===ne?((e=n.R)||(n.R=e=[]),e.push(t)):e.j&&((e=n.T)||(n.T=e=[]),e.push(t))}function nn(t,e,n,r){en(t,e,r)}function rn(t,e,n,r,i){en(t,e,i,n)}function on(t){let e=t[tn];return e||(e=t[tn]={},sn(t,e,nn,rn,e))}function sn(t,e,n,r,i){e.C=ge(t[0]);let o=1;if(t.length>o&&!(t[o]instanceof Ut)){var s=t[o++];if(Array.isArray(s))return e.h=s[0],e.g=s[1],e;e.g=s}for(s=0;o<t.length;){var a=t[o++],u=t[o];for("number"==typeof u?(o++,s+=u):s++,u=o;u<t.length&&!(t[u]instanceof Ut);)u++;if(u-=o){var c=t,l=o,h=c[l];if("function"==typeof h&&(h=h(),c[l]=h),(c=Array.isArray(h))&&!(c=dn in h||cn in h)&&(c=0<h.length)){const t=ge(l=(c=h)[0]);null!=t&&t!==l&&(c[0]=t),c=null!=t}(h=c?h:void 0)?(o++,1===u?void 0!==(a=r(s,a,h,void 0,i))&&(e[s]=a):void 0!==(a=r(s,a,h,t[o++],i))&&(e[s]=a)):void 0!==(a=n(s,a,t[o++],i))&&(e[s]=a)}else void 0!==(a=n(s,a,void 0,i))&&(e[s]=a)}return e}const an=Symbol();function un(t){let e=t[an];if(!e){const n=fn(t);e=(t,e)=>vn(t,e,n),t[an]=e}return e}const cn=Symbol();function ln(t,e){return e.h}function hn(t,e,n){let r,i;const o=e.h;return(t,e,s)=>o(t,e,s,i||=fn(n).C,r||=un(n))}function fn(t){let e=t[cn];return e||(e=sn(t,t[cn]={},ln,hn),dn in t&&cn in t&&(t.length=0),e)}const dn=Symbol();function gn(t,e,n){const r=e.g;return n?(t,e,i)=>r(t,e,i,n):r}function pn(t,e,n,r){const i=e.g;let o,s;return(t,e,a)=>i(t,e,a,s||=mn(n).C,o||=Qe(n),r)}function mn(t){let e=t[dn];return e||(on(t),e=sn(t,t[dn]={},gn,pn),dn in t&&cn in t&&(t.length=0),e)}function yn(t,e){var n=t[e];if(n)return n;if((n=t.g)&&(n=n[e])){var r=n.H,i=n.K.h;if(r){const t=un(r),e=fn(r).C;n=(n,r,o)=>i(n,r,o,e,t)}else n=i;return t[e]=n}}function vn(t,e,n){for(var r=zt(t),i=+!!(512&r)-1,o=t.length,s=512&r?1:0,a=o+(256&r?-1:0);s<a;s++){const r=t[s];if(null==r)continue;const o=s-i,a=yn(n,o);a&&a(e,r,o)}if(256&r){r=t[o-1];for(let t in r)i=+t,Number.isNaN(i)||null!=(o=r[t])&&(a=yn(n,i))&&a(e,o,i)}if(t=Zt?t[Zt]:void 0)for(Lt(e,e.g.end()),n=0;n<t.length;n++)Lt(e,z(t[n])||C())}function bn(t,e){return new Ut(t,e,!1)}function wn(t,e){return new Ut(t,e,!0)}function An(t,e,n){Pe(t,zt(t),e,n)}function _n(t,e,n){t:if(null!=e){if(ue(e)){if("string"==typeof e)break t;if("number"==typeof e)break t}e=void 0}null!=e&&("string"==typeof e&&_t(e),null!=e&&(It(t,n,0),"number"==typeof e?(t=t.g,Q(e),Et(t,Y,X)):(n=_t(e),Et(t.g,n.h,n.g))))}function Sn(t,e,n){null!=(e=ce(e))&&null!=e&&(It(t,n,0),Ot(t.g,e))}function xn(t,e,n){null!=(e=null==e?e:"boolean"==typeof e||"number"==typeof e?!!e:void 0)&&(It(t,n,0),t.g.g.push(e?1:0))}function En(t,e,n){null!=(e=fe(e))&&Bt(t,n,c(e))}function Tn(t,e,n,r,i){null!=(e=e instanceof qe?e.l:Array.isArray(e)?pe(e,r[0],r[1]):void 0)&&(n=Ft(t,n),i(e,t),jt(t,n))}function On(t,e,n){null!=(e=null==e||"string"==typeof e||U(e)||e instanceof D?e:void 0)&&Bt(t,n,q(e).buffer)}var Pn=bn((function(t,e,n){return 5===t.h&&(An(e,n,t.g.A()),!0)}),(function(t,e,n){null!=(e=se(e))&&(It(t,n,5),t=t.g,Z(e),Pt(t))})),Ln=wn((function(t,e,n){return(5===t.h||2===t.h)&&(e=Le(e,zt(e),n,2,!1),2==t.h?yt(t,lt.prototype.A,e):e.push(t.g.A()),!0)}),(function(t,e,n){if(null!=(e=Ye(se,e))&&e.length){It(t,n,2),Tt(t.g,4*e.length);for(let r=0;r<e.length;r++)n=t.g,Z(e[r]),Pt(n)}})),In=bn((function(t,e,n){return 0===t.h&&(An(e,n,st(t.g,et)),!0)}),_n),Fn=bn((function(t,e,n){return 0===t.h&&(An(e,n,0===(t=st(t.g,et))?void 0:t),!0)}),_n),jn=bn((function(t,e,n){return 0===t.h&&(An(e,n,st(t.g,tt)),!0)}),(function(t,e,n){t:if(null!=e){if(ue(e)){if("string"==typeof e)break t;if("number"==typeof e)break t}e=void 0}null!=e&&("string"==typeof e&&bt(e),null!=e&&(It(t,n,0),"number"==typeof e?(t=t.g,Q(e),Et(t,Y,X)):(n=bt(e),Et(t.g,n.h,n.g))))})),Bn=bn((function(t,e,n){return 0===t.h&&(An(e,n,t.g.h()),!0)}),Sn),Un=wn((function(t,e,n){return(0===t.h||2===t.h)&&(e=Le(e,zt(e),n,2,!1),2==t.h?yt(t,lt.prototype.h,e):e.push(t.g.h()),!0)}),(function(t,e,n){if(null!=(e=Ye(ce,e))&&e.length){n=Ft(t,n);for(let n=0;n<e.length;n++)Ot(t.g,e[n]);jt(t,n)}})),kn=bn((function(t,e,n){return 0===t.h&&(An(e,n,0===(t=t.g.h())?void 0:t),!0)}),Sn),Cn=bn((function(t,e,n){return 0===t.h&&(An(e,n,at(t.g)),!0)}),xn),Nn=bn((function(t,e,n){return 0===t.h&&(An(e,n,!1===(t=at(t.g))?void 0:t),!0)}),xn),Mn=wn((function(t,e,n){if(2!==t.h)return!1;t=pt(t);const r=zt(e);return Qt(r),Le(e,r,n,2).push(t),!0}),(function(t,e,n){if(null!=(e=Ye(fe,e)))for(let i=0;i<e.length;i++){var r=e[i];null!=r&&Bt(t,n,c(r))}})),Gn=bn((function(t,e,n){return 2===t.h&&(An(e,n,""===(t=pt(t))?void 0:t),!0)}),En),$n=bn((function(t,e,n){return 2===t.h&&(An(e,n,pt(t)),!0)}),En),zn=bn((function(t,e,n,r,i){return 2===t.h&&(gt(t,ke(e,r,n,!0),i),!0)}),Tn),Dn=bn((function(t,e,n,r,i){return 2===t.h&&(gt(t,ke(e,r,n),i),!0)}),Tn),Rn=wn((function(t,e,n,r,i){if(2!==t.h)return!1;r=pe(void 0,r[0],r[1]);const o=zt(e);Qt(o);let s=Le(e,o,n,3);return(Object.isFrozen(s)||4&$t(s))&&(s=kt(s),Pe(e,o,n,s)),s.push(r),gt(t,r,i),!0}),(function(t,e,n,r,i){if(Array.isArray(e))for(let o=0;o<e.length;o++)Tn(t,e[o],n,r,i)})),Vn=bn((function(t,e,n,r,i,o){if(2!==t.h)return!1;const s=zt(e);return Qt(s),(o=Ue(e,s,o))&&n!==o&&Pe(e,s,o),gt(t,e=ke(e,r,n),i),!0}),Tn),Wn=bn((function(t,e,n){return 2===t.h&&(An(e,n,mt(t)),!0)}),On),Hn=bn((function(t,e,n){return 0===t.h&&(An(e,n,t.g.h()),!0)}),(function(t,e,n){null!=(e=ce(e))&&(e=parseInt(e,10),It(t,n,0),Ot(t.g,e))})),qn=wn((function(t,e,n){return(0===t.h||2===t.h)&&(e=Le(e,zt(e),n,2,!1),2==t.h?yt(t,lt.prototype.U,e):e.push(t.g.h()),!0)}),(function(t,e,n){if(null!=(e=Ye(ce,e))&&e.length){n=Ft(t,n);for(let n=0;n<e.length;n++)Ot(t.g,e[n]);jt(t,n)}}));class Jn{constructor(t,e){this.h=t,this.g=e,this.j=$e,this.defaultValue=void 0}}function Kn(t,e){return(n,r)=>{t:{if(vt.length){const t=vt.pop();t.s(r),it(t.g,n,r),n=t}else n=new class{constructor(t,e){if(ht.length){const n=ht.pop();it(n,t,e),t=n}else t=new lt(t,e);this.g=t,this.j=this.g.g,this.h=this.m=-1,this.s(e)}s({J:t=!1}={}){this.J=t}}(n,r);try{var i=new t;const r=i.l;Qe(e)(r,n),te&&delete r[te];var o=i;break t}finally{(i=n.g).j=null,i.o=!1,i.I=0,i.m=0,i.g=0,i.G=!1,n.m=-1,n.h=-1,100>vt.length&&vt.push(n)}o=void 0}return o}}var Yn,Xn=[0,Gn,bn((function(t,e,n){return 2===t.h&&(An(e,n,(t=mt(t))===$()?void 0:t),!0)}),(function(t,e,n){if(null!=e){if(e instanceof qe){const r=e.V;return void(r&&(e=r(e),null!=e&&Bt(t,n,q(e).buffer)))}if(Array.isArray(e))return}On(t,e,n)}))];function Qn(n){if(void 0===Yn){var r=null,i=t.trustedTypes;if(i&&i.createPolicy){try{r=i.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(e){t.console&&t.console.error(e.message)}Yn=r}else Yn=r}return n=(r=Yn)?r.createScriptURL(n):n,new class{constructor(t){this.g=t}toString(){return this.g+""}}(n)}var Zn=[0,$n],tr=[0,Bn,Hn,Cn,Cn,Un,Hn,Hn],er=[0,Cn,Cn],nr=class extends qe{constructor(){super()}};nr.B=[6];var rr=[0,Cn,$n,Cn,Hn,Hn,qn,$n,$n,Dn,er,Hn],ir=[0,$n,$n,$n],or=class extends qe{constructor(){super()}},sr=[0],ar=[0,Bn],ur=[1,2,3,4,5],cr=class extends qe{constructor(t){super(t,2)}},lr={},hr=[-2,lr,Cn];lr[336783863]=Ke([0,$n,Cn,Cn,Bn,Dn,[0,Vn,sr,ur,Vn,rr,ur,Vn,ir,ur,Vn,ar,ur,Vn,tr,ur],Dn,Zn]);var fr=[0,Gn,Nn],dr=[0,Fn,Fn,Nn,Nn,Nn,Nn,Fn,Un,Gn,kn,Fn,Fn,Nn,kn,Nn,Nn,Nn,Gn],gr=[-1,{}],pr=[0,$n,Dn,2,gr],mr=[0,$n,Mn,Dn,gr];function yr(t){We(t,3,"TEXT:text_in")}var vr=class extends qe{constructor(t){super(t,500)}s(t){return $e(this,0,7,t)}};vr.B=[3,4,5,6,8,13,17,1005];var br=[-500,Gn,Gn,Mn,Mn,Mn,Mn,Dn,hr,Rn,Xn,kn,kn,Dn,pr,Dn,mr,Rn,fr,Gn,Dn,dr,kn,Mn,Mn,988],wr=[0,Gn,Gn,Dn,gr],Ar=[-500,$n,$n,Dn,[-1,{}],$n,999],_r=[-500,$n,Mn,Mn,Dn,[-2,{},Cn],Mn,998,Mn],Sr=[-500,$n,Mn,Dn,gr,Mn,999];function xr(t){We(t,10,"text_in")}var Er,Tr=class extends qe{constructor(){super(void 0,500)}s(t){return $e(this,0,1001,t)}};Tr.B=[1,6,7,9,10,15,16,17,14,1002],Tr.prototype.g=(Er=[-500,Rn,br,Rn,5,Ar,Rn,_r,kn,Rn,Sr,Mn,kn,Dn,pr,Dn,mr,Rn,wr,Mn,Mn,Mn,Dn,dr,Gn,Gn,Nn,Dn,980,gr,Rn,Xn],function(){const t=new class{constructor(){this.j=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const t=this.g;return this.g=[],t}}}};vn(this.l,t,fn(Er)),Lt(t,t.g.end());const e=new Uint8Array(t.h),n=t.j,r=n.length;let i=0;for(let t=0;t<r;t++){const r=n[t];e.set(r,i),i+=r.length}return t.j=[e],e});var Or=class extends qe{constructor(t){super(t)}},Pr=[0,Bn,Pn,$n,$n],Lr=class extends qe{constructor(t){super(t)}g(){return Ge(this,Or)}};Lr.B=[1];var Ir=class extends qe{constructor(t){super(t)}},Fr=[0,Bn,2,$n,Dn,[0,Rn,Pr]],jr=class extends qe{constructor(t){super(t)}};jr.B=[1];var Br=Kn(jr,[0,Rn,Fr,In]),Ur=class extends qe{constructor(t){super(t)}};Ur.B=[1];var kr=class extends qe{constructor(t){super(t)}L(){const t=Ie(this);return null==t?$():t}},Cr=class extends qe{constructor(t){super(t)}},Nr=[1,2],Mr=[0,Vn,[0,Ln],Nr,Vn,[0,Wn],Nr,Bn,$n],Gr=class extends qe{constructor(t){super(t)}};Gr.B=[1];var $r=Kn(Gr,[0,Rn,Mr,In]),zr=class extends qe{constructor(t){super(t)}};zr.B=[4,5];var Dr=class extends qe{constructor(t){super(t)}},Rr=[0,Cn,Cn],Vr=class extends qe{constructor(t){super(t)}},Wr=[1,2,3,4,5],Hr=class extends qe{constructor(t){super(t)}g(){return null!=Ie(this)}h(){return null!=fe(Ee(this,2))}},qr=class extends qe{constructor(t){super(t)}},Jr=[0,Dn,[0,Wn,$n,Dn,[0,Bn,In,In],Dn,[0,jn,In]],Cn,Dn,[0,Vn,ar,Wr,Vn,rr,Wr,Vn,tr,Wr,Vn,sr,Wr,Vn,ir,Wr]],Kr=class extends qe{constructor(t){super(t)}},Yr=new Jn(462704549,Kr);lr[462704549]=Ke([0,Dn,Jr,Dn,[0,$n,Bn,Pn,Mn,Mn]]);var Xr=class extends qe{constructor(t){super(t)}},Qr=new Jn(477589892,Xr);function Zr(e,n){if(n=n?Ae(n):new zr,void 0!==e.displayNamesLocale?Oe(n,1,he(e.displayNamesLocale)):void 0===e.displayNamesLocale&&Oe(n,1),void 0!==e.maxResults){var r=e.maxResults;if(null!=r){if("number"!=typeof r)throw oe(e=Error(),"warning"),e;if(!Number.isFinite(r)){const e=Error();oe(e,"incident"),function(e){t.setTimeout((()=>{throw e}),0)}(e)}}Oe(n,2,r)}else"maxResults"in e&&Oe(n,2);if(void 0!==e.scoreThreshold){if(null!=(r=e.scoreThreshold)&&"number"!=typeof r)throw Error(`Value of float/double field must be a number, found ${typeof r}: ${r}`);Oe(n,3,r)}else"scoreThreshold"in e&&Oe(n,3);return void 0!==e.categoryAllowlist?Fe(n,4,e.categoryAllowlist):"categoryAllowlist"in e&&Oe(n,4),void 0!==e.categoryDenylist?Fe(n,5,e.categoryDenylist):"categoryDenylist"in e&&Oe(n,5),n}function ti(t){const e={classifications:Ge(t,Ir).map((t=>function(t,e=-1,n=""){return{categories:t.map((t=>{var e=ce(Ee(t,1))??0??-1;const n=t.l,r=zt(n),i=Te(n,r,2),o=se(i);return null!=o&&o!==i&&Pe(n,r,2,o),{index:e,score:o??0??0,categoryName:fe(Ee(t,3))??""??"",displayName:fe(Ee(t,4))??""??""}})),headIndex:e,headName:n}}(Ne(t,Lr,4)?.g()??[],ce(Ee(t,2))??0,fe(Ee(t,3))??"")))};return null!=Re(t)&&(e.timestampMs=Ve(Re(t))),e}function ei(t){return Array.from(t,(t=>127<t?t-256:t))}function ni(t,e){if(t.length!==e.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t.length} vs. ${e.length}).`);let n=0,r=0,i=0;for(let o=0;o<t.length;o++)n+=t[o]*e[o],r+=t[o]*t[o],i+=e[o]*e[o];if(0>=r||0>=i)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(r*i)}let ri;lr[477589892]=Ke([0,Dn,Jr,Dn,Rr]);const ii=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function oi(){if(void 0===ri)try{await WebAssembly.instantiate(ii),ri=!0}catch{ri=!1}return ri}async function si(t,e){const n=await oi()?"wasm_internal":"wasm_nosimd_internal";return void 0!==e?{wasmLoaderPath:`${e}/${t}_${n}.js`,wasmBinaryPath:`${e}/${t}_${n}.wasm`}:{wasmLoaderPath:Qn(`./${encodeURIComponent(t)}_${encodeURIComponent(n)}.js`),wasmBinaryPath:Qn(`./${encodeURIComponent(t)}_${encodeURIComponent(n)}.wasm`)}}var ai=class{};async function ui(t){if("function"!=typeof importScripts){const e=document.createElement("script");return e.src=t.toString(),e.crossOrigin="anonymous",new Promise(((t,n)=>{e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(t=>{n(t)}),!1),document.body.appendChild(e)}))}importScripts(t.toString())}ai.forVisionTasks=function(t=""){return si("vision",t)},ai.forTextTasks=function(t=""){return si("text",t)},ai.forAudioTasks=function(t=""){return si("audio",t)},ai.isSimdSupported=function(){return oi()};function ci(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(e=t.i.stringToNewUTF8(e)),t.i._free(e)}function li(t,e,n){t.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const r=new Uint32Array(e.length);for(let n=0;n<e.length;n++)r[n]=t.i.stringToNewUTF8(e[n]);e=t.i._malloc(4*r.length),t.i.HEAPU32.set(r,e>>2),n(e);for(const e of r)t.i._free(e);t.i._free(e)}function hi(t,e,n){t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=n}function fi(t,e,n){let r=[];t.i.simpleListeners=t.i.simpleListeners||{},t.i.simpleListeners[e]=(t,e,i)=>{e?(n(r,i),r=[]):r.push(t)}}const di=function(t){return class extends t{S(){this.i._registerModelResourcesGraphService()}}}(class{constructor(t,e){this.j=!0,this.i=t,this.g=null,this.h=0,this.m="function"==typeof this.i._addIntToInputStream,void 0!==e?this.i.canvas=e:((t="undefined"==typeof OffscreenCanvas)||(t=(t=navigator.userAgent).includes("Safari")&&!t.includes("Chrome")),t?(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas")):this.i.canvas=new OffscreenCanvas(1,1))}async initializeGraph(t){const e=await(await fetch(t)).arrayBuffer();t=!(t.endsWith(".pbtxt")||t.endsWith(".textproto")),this.setGraph(new Uint8Array(e),t)}setGraphFromString(t){this.setGraph((new TextEncoder).encode(t),!1)}setGraph(t,e){const n=t.length,r=this.i._malloc(n);this.i.HEAPU8.set(t,r),e?this.i._changeBinaryGraph(n,r):this.i._changeTextGraph(n,r),this.i._free(r)}configureAudio(t,e,n,r,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),ci(this,r||"input_audio",(r=>{ci(this,i=i||"audio_header",(i=>{this.i._configureAudio(r,i,t,e,n)}))}))}setAutoResizeCanvas(t){this.j=t}setAutoRenderToScreen(t){this.i._setAutoRenderToScreen(t)}setGpuBufferVerticalFlip(t){this.i.gpuOriginForWebTexturesIsBottomLeft=t}attachErrorListener(t){this.i.errorListener=t}attachEmptyPacketListener(t,e){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[t]=e}addAudioToStream(t,e,n){this.addAudioToStreamWithShape(t,0,0,e,n)}addAudioToStreamWithShape(t,e,n,r,i){const o=4*t.length;this.h!==o&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(o),this.h=o),this.i.HEAPF32.set(t,this.g/4),ci(this,r,(t=>{this.i._addAudioToInputStream(this.g,e,n,t,i)}))}addGpuBufferToStream(t,e,n){ci(this,e,(e=>{if(!this.i.canvas)throw Error("No OpenGL canvas configured.");e?this.i._bindTextureToStream(e):this.i._bindTextureToCanvas();var r=this.i.canvas.getContext("webgl2")||this.i.canvas.getContext("webgl");if(!r)throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");let i;this.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t),this.i.gpuOriginForWebTexturesIsBottomLeft&&r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),t.videoWidth?(r=t.videoWidth,i=t.videoHeight):t.naturalWidth?(r=t.naturalWidth,i=t.naturalHeight):(r=t.width,i=t.height),!this.j||r===this.i.canvas.width&&i===this.i.canvas.height||(this.i.canvas.width=r,this.i.canvas.height=i);const[o,s]=[r,i];this.i._addBoundTextureToStream(e,o,s,n)}))}addBoolToStream(t,e,n){ci(this,e,(e=>{this.i._addBoolToInputStream(t,e,n)}))}addDoubleToStream(t,e,n){ci(this,e,(e=>{this.i._addDoubleToInputStream(t,e,n)}))}addFloatToStream(t,e,n){ci(this,e,(e=>{this.i._addFloatToInputStream(t,e,n)}))}addIntToStream(t,e,n){ci(this,e,(e=>{this.i._addIntToInputStream(t,e,n)}))}addStringToStream(t,e,n){ci(this,e,(e=>{ci(this,t,(t=>{this.i._addStringToInputStream(t,e,n)}))}))}addStringRecordToStream(t,e,n){ci(this,e,(e=>{li(this,Object.keys(t),(r=>{li(this,Object.values(t),(i=>{this.i._addFlatHashMapToInputStream(r,i,Object.keys(t).length,e,n)}))}))}))}addProtoToStream(t,e,n,r){ci(this,n,(n=>{ci(this,e,(e=>{const i=this.i._malloc(t.length);this.i.HEAPU8.set(t,i),this.i._addProtoToInputStream(i,t.length,e,n,r),this.i._free(i)}))}))}addEmptyPacketToStream(t,e){ci(this,t,(t=>{this.i._addEmptyPacketToInputStream(t,e)}))}addBoolToInputSidePacket(t,e){ci(this,e,(e=>{this.i._addBoolToInputSidePacket(t,e)}))}addDoubleToInputSidePacket(t,e){ci(this,e,(e=>{this.i._addDoubleToInputSidePacket(t,e)}))}addFloatToInputSidePacket(t,e){ci(this,e,(e=>{this.i._addFloatToInputSidePacket(t,e)}))}addIntToInputSidePacket(t,e){ci(this,e,(e=>{this.i._addIntToInputSidePacket(t,e)}))}addStringToInputSidePacket(t,e){ci(this,e,(e=>{ci(this,t,(t=>{this.i._addStringToInputSidePacket(t,e)}))}))}addProtoToInputSidePacket(t,e,n){ci(this,n,(n=>{ci(this,e,(e=>{const r=this.i._malloc(t.length);this.i.HEAPU8.set(t,r),this.i._addProtoToInputSidePacket(r,t.length,e,n),this.i._free(r)}))}))}attachBoolListener(t,e){hi(this,t,e),ci(this,t,(t=>{this.i._attachBoolListener(t)}))}attachBoolVectorListener(t,e){fi(this,t,e),ci(this,t,(t=>{this.i._attachBoolVectorListener(t)}))}attachIntListener(t,e){hi(this,t,e),ci(this,t,(t=>{this.i._attachIntListener(t)}))}attachIntVectorListener(t,e){fi(this,t,e),ci(this,t,(t=>{this.i._attachIntVectorListener(t)}))}attachDoubleListener(t,e){hi(this,t,e),ci(this,t,(t=>{this.i._attachDoubleListener(t)}))}attachDoubleVectorListener(t,e){fi(this,t,e),ci(this,t,(t=>{this.i._attachDoubleVectorListener(t)}))}attachFloatListener(t,e){hi(this,t,e),ci(this,t,(t=>{this.i._attachFloatListener(t)}))}attachFloatVectorListener(t,e){fi(this,t,e),ci(this,t,(t=>{this.i._attachFloatVectorListener(t)}))}attachStringListener(t,e){hi(this,t,e),ci(this,t,(t=>{this.i._attachStringListener(t)}))}attachStringVectorListener(t,e){fi(this,t,e),ci(this,t,(t=>{this.i._attachStringVectorListener(t)}))}attachProtoListener(t,e,n){hi(this,t,e),ci(this,t,(t=>{this.i._attachProtoListener(t,n||!1)}))}attachProtoVectorListener(t,e,n){fi(this,t,e),ci(this,t,(t=>{this.i._attachProtoVectorListener(t,n||!1)}))}attachAudioListener(t,e,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),hi(this,t,((t,n)=>{t=new Float32Array(t.buffer,t.byteOffset,t.length/4),e(t,n)})),ci(this,t,(t=>{this.i._attachAudioListener(t,n||!1)}))}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}});var gi=class extends di{};async function pi(t,e,n){return t=await(async(t,e,n,r)=>{if(e&&await ui(e),!self.ModuleFactory)throw Error("ModuleFactory not set.");if(n&&(await ui(n),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&r&&((e=self.Module).locateFile=r.locateFile,r.mainScriptUrlOrBlob&&(e.mainScriptUrlOrBlob=r.mainScriptUrlOrBlob)),r=await self.ModuleFactory(self.Module||r),self.ModuleFactory=self.Module=void 0,new t(r,null)})(t,e.wasmLoaderPath,e.assetLoaderPath,{locateFile(t){var n=e.wasmBinaryPath.toString();return n.includes(t)?n:(n=e.assetBinaryPath?.toString(),n?.includes(t)?n:t)}}),await t.s(n),t}async function mi(t,e,n){return pi(t,e,n)}function yi(t,e){const n=Ne(t.baseOptions,Hr,1)||new Hr;"string"==typeof e?(Oe(n,2,he(e)),Oe(n,1)):e instanceof Uint8Array&&(Oe(n,1,Yt(e,!1,!1)),Oe(n,2)),$e(t.baseOptions,0,1,n)}function vi(t,e){const n=e.baseOptions||{};if(e.baseOptions?.modelAssetBuffer&&e.baseOptions?.modelAssetPath)throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!(Ne(t.baseOptions,Hr,1)?.g()||Ne(t.baseOptions,Hr,1)?.h()||e.baseOptions?.modelAssetBuffer||e.baseOptions?.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");return function(t,e){let n=Ne(t.baseOptions,Vr,3);if(!n){var r=n=new Vr;ze(r,4,new or)}"delegate"in e&&("GPU"===e.delegate?ze(e=n,2,r=new nr):ze(e=n,4,r=new or)),$e(t.baseOptions,0,3,n)}(t,n),n.modelAssetPath?fetch(n.modelAssetPath.toString()).then((t=>{if(t.ok)return t.arrayBuffer();throw Error(`Failed to fetch model: ${n.modelAssetPath} (${t.status})`)})).then((e=>{try{t.g.i.FS_unlink("/model.dat")}catch{}t.g.i.FS_createDataFile("/","model.dat",new Uint8Array(e),!0,!1,!1),yi(t,"/model.dat"),t.A()})):(yi(t,n.modelAssetBuffer),t.A(),Promise.resolve())}function bi(t){try{const e=t.m.length;if(1===e)throw Error(t.m[0].message);if(1<e)throw Error("Encountered multiple errors: "+t.m.map((t=>t.message)).join(", "))}finally{t.m=[]}}function wi(t,e){t.j=Math.max(t.j,e)}var Ai=class{constructor(t){this.g=t,this.m=[],this.j=0,this.g.setAutoRenderToScreen(!1)}setGraph(t,e){this.g.attachErrorListener(((t,e)=>{this.m.push(Error(e))})),this.g.S(),this.g.setGraph(t,e),bi(this)}finishProcessing(){this.g.finishProcessing(),bi(this)}close(){this.g.closeGraph()}};Ai.prototype.close=Ai.prototype.close;var _i=class extends Ai{constructor(t,e){super(new gi(t,e)),this.o={languages:[]},this.h=new Kr,t=new qr,$e(this.h,0,1,t)}s(t){var e=Zr(t,Ne(this.h,zr,2));return $e(this.h,0,2,e),vi(this,t)}get baseOptions(){return Ne(this.h,qr,1)}set baseOptions(t){$e(this.h,0,1,t)}O(t){return this.o={languages:[]},this.g.addStringToStream(t,"text_in",this.j+1),this.finishProcessing(),this.o}A(){var t=new Tr;xr(t),We(t,15,"classifications_out");const e=new cr;He(e,Yr,this.h);const n=new vr;je(n,he("mediapipe.tasks.text.text_classifier.TextClassifierGraph")),yr(n),We(n,4,"CLASSIFICATIONS:classifications_out"),n.s(e),De(t,n),this.g.attachProtoListener("classifications_out",((t,e)=>{if(({classifications:t}=ti(Br(t))),1!==t.length)throw Error(`Expected 1 classification head, got ${t.length}`);this.o.languages=t[0].categories.map((t=>({languageCode:t.categoryName,probability:t.score}))),wi(this,e)})),this.g.attachEmptyPacketListener("classifications_out",(t=>{wi(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};_i.prototype.detect=_i.prototype.O,_i.prototype.setOptions=_i.prototype.s,_i.createFromModelPath=function(t,e){return mi(_i,t,{baseOptions:{modelAssetPath:e}})},_i.createFromModelBuffer=function(t,e){return mi(_i,t,{baseOptions:{modelAssetBuffer:e}})},_i.createFromOptions=function(t,e){return mi(_i,t,e)};var Si=class extends Ai{constructor(t,e){super(new gi(t,e)),this.o={classifications:[]},this.h=new Kr,t=new qr,$e(this.h,0,1,t)}s(t){var e=Zr(t,Ne(this.h,zr,2));return $e(this.h,0,2,e),vi(this,t)}get baseOptions(){return Ne(this.h,qr,1)}set baseOptions(t){$e(this.h,0,1,t)}N(t){return this.o={classifications:[]},this.g.addStringToStream(t,"text_in",this.j+1),this.finishProcessing(),this.o}A(){var t=new Tr;xr(t),We(t,15,"classifications_out");const e=new cr;He(e,Yr,this.h);const n=new vr;je(n,he("mediapipe.tasks.text.text_classifier.TextClassifierGraph")),yr(n),We(n,4,"CLASSIFICATIONS:classifications_out"),n.s(e),De(t,n),this.g.attachProtoListener("classifications_out",((t,e)=>{this.o=ti(Br(t)),wi(this,e)})),this.g.attachEmptyPacketListener("classifications_out",(t=>{wi(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};Si.prototype.classify=Si.prototype.N,Si.prototype.setOptions=Si.prototype.s,Si.createFromModelPath=function(t,e){return mi(Si,t,{baseOptions:{modelAssetPath:e}})},Si.createFromModelBuffer=function(t,e){return mi(Si,t,{baseOptions:{modelAssetBuffer:e}})},Si.createFromOptions=function(t,e){return mi(Si,t,e)};var xi=class extends Ai{constructor(t,e){super(new gi(t,e)),this.o={embeddings:[]},this.h=new Xr,t=new qr,$e(this.h,0,1,t)}s(t){var e=this.h,n=Ne(this.h,Dr,2);return n=n?Ae(n):new Dr,void 0!==t.l2Normalize?Oe(n,1,ae(t.l2Normalize)):"l2Normalize"in t&&Oe(n,1),void 0!==t.quantize?Oe(n,2,ae(t.quantize)):"quantize"in t&&Oe(n,2),$e(e,0,2,n),vi(this,t)}get baseOptions(){return Ne(this.h,qr,1)}set baseOptions(t){$e(this.h,0,1,t)}P(t){return this.g.addStringToStream(t,"text_in",this.j+1),this.finishProcessing(),this.o}A(){var t=new Tr;xr(t),We(t,15,"embeddings_out");const e=new cr;He(e,Qr,this.h);const n=new vr;je(n,he("mediapipe.tasks.text.text_embedder.TextEmbedderGraph")),yr(n),We(n,4,"EMBEDDINGS:embeddings_out"),n.s(e),De(t,n),this.g.attachProtoListener("embeddings_out",((t,e)=>{t=$r(t),this.o=function(t){return{embeddings:Ge(t,Cr).map((t=>{const e={headIndex:ce(Ee(t,3))??0??-1,headName:fe(Ee(t,4))??""??""};if(void 0!==Ce(t,Ur,Be(t,1))){t=Ne(t,Ur,Be(t,1)).l;var n=zt(t);const r=2&n;let i=Le(t,n,1,1),o=$t(i);if(!(4&o)){Object.isFrozen(i)&&(o=0,i=kt(i),Pe(t,n,1,i));let e=0,s=0;for(;e<i.length;e++){const t=se(i[e]);null!=t&&(i[s++]=t)}s<e&&(i.length=s),o|=5,r&&(o|=34),Dt(i,o),2&o&&Object.freeze(i)}!r&&(2&o||Object.isFrozen(i))&&(i=kt(i),Nt(i,5),Pe(t,n,1,i)),e.floatEmbedding=i}else n=new Uint8Array(0),e.quantizedEmbedding=Ne(t,kr,Be(t,2))?.L()?.M()??n;return e})),timestampMs:Ve(Re(t))}}(t),wi(this,e)})),this.g.attachEmptyPacketListener("embeddings_out",(t=>{wi(this,t)})),t=t.g(),this.setGraph(new Uint8Array(t),!0)}};xi.cosineSimilarity=function(t,e){if(t.floatEmbedding&&e.floatEmbedding)t=ni(t.floatEmbedding,e.floatEmbedding);else{if(!t.quantizedEmbedding||!e.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");t=ni(ei(t.quantizedEmbedding),ei(e.quantizedEmbedding))}return t},xi.prototype.embed=xi.prototype.P,xi.prototype.setOptions=xi.prototype.s,xi.createFromModelPath=function(t,e){return mi(xi,t,{baseOptions:{modelAssetPath:e}})},xi.createFromModelBuffer=function(t,e){return mi(xi,t,{baseOptions:{modelAssetBuffer:e}})},xi.createFromOptions=function(t,e){return mi(xi,t,e)},exports.FilesetResolver=ai,exports.LanguageDetector=_i,exports.TaskRunner=Ai,exports.TextClassifier=Si,exports.TextEmbedder=xi;
|
|
2
2
|
//# sourceMappingURL=text_bundle_cjs.js.map
|