PageSourceSearch

https://vrew.ai/try/assets/encoder.worker-BfY5cIgC.js

js vrew.ai collected 2026-10-02 05:04:09 UTC 69,515 bytes, 7 lines download raw bytes

1const ar=Symbol("Comlink.proxy"),go=Symbol("Comlink.endpoint"),bo=Symbol("Comlink.releaseProxy"),Ge=Symbol("Comlink.finalizer"),fe=Symbol("Comlink.thrown"),cr=t=>typeof t=="object"&&t!==null||typeof t=="function",To={canHandle:t=>cr(t)&&t[ar],serialize(t){const{port1:e,port2:n}=new MessageChannel;return on(t,e),[n,[n]]},deserialize(t){return t.start(),Ao(t)}},So={canHandle:t=>cr(t)&&fe in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},lr=new Map([["proxy",To],["throw",So]]);function wo(t,e){for(const n of t)if(e===n||n==="*"||n instanceof RegExp&&n.test(e))return!0;return!1}function on(t,e=globalThis,n=["*"]){e.addEventListener("message",function r(i){if(!i||!i.data)return;if(!wo(n,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:s,type:c,path:d}=Object.assign({path:[]},i.data),u=(i.data.argumentList||[]).map(mt);let l;try{const m=d.slice(0,-1).reduce((E,S)=>E[S],t),b=d.reduce((E,S)=>E[S],t);switch(c){case"GET":l=b;break;case"SET":m[d.slice(-1)[0]]=mt(i.data.value),l=!0;break;case"APPLY":l=b.apply(m,u);break;case"CONSTRUCT":{const E=new b(...u);l=Do(E)}break;case"ENDPOINT":{const{port1:E,port2:S}=new MessageChannel;on(t,S),l=hr(E,[E])}break;case"RELEASE":l=void 0;break;default:return}}catch(m){l={value:m,[fe]:0}}Promise.resolve(l).catch(m=>({value:m,[fe]:0})).then(m=>{const[b,E]=_e(m);e.postMessage(Object.assign(Object.assign({},b),{id:s}),E),c==="RELEASE"&&(e.removeEventListener("message",r),ur(e),Ge in t&&typeof t[Ge]=="function"&&t[Ge]())}).catch(m=>{const[b,E]=_e({value:new TypeError("Unserializable return value"),[fe]:0});e.postMessage(Object.assign(Object.assign({},b),{id:s}),E)})}),e.start&&e.start()}function vo(t){return t.constructor.name==="MessagePort"}function ur(t){vo(t)&&t.close()}function Ao(t,e){const n=new Map;return t.addEventListener("message",function(i){const{data:s}=i;if(!s||!s.id)return;const c=n.get(s.id);if(c)try{c(s)}finally{n.delete(s.id)}}),Ke(t,n,[],e)}function se(t){if(t)throw new Error("Proxy has been released and is not useable")}function fr(t){return Ot(t,new Map,{type:"RELEASE"}).then(()=>{ur(t)})}const pe=new WeakMap,me="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(pe.get(t)||0)-1;pe.set(t,e),e===0&&fr(t)});function Oo(t,e){const n=(pe.get(e)||0)+1;pe.set(e,n),me&&me.register(t,e,t)}function Ro(t){me&&me.unregister(t)}function Ke(t,e,n=[],r=function(){}){let i=!1;const s=new Proxy(r,{get(c,d){if(se(i),d===bo)return()=>{Ro(s),fr(t),e.clear(),i=!0};if(d==="then"){if(n.length===0)return{then:()=>s};const u=Ot(t,e,{type:"GET",path:n.map(l=>l.toString())}).then(mt);return u.then.bind(u)}return Ke(t,e,[...n,d])},set(c,d,u){se(i);const[l,m]=_e(u);return Ot(t,e,{type:"SET",path:[...n,d].map(b=>b.toString()),value:l},m).then(mt)},apply(c,d,u){se(i);const l=n[n.length-1];if(l===go)return Ot(t,e,{type:"ENDPOINT"}).then(mt);if(l==="bind")return Ke(t,e,n.slice(0,-1));const[m,b]=Un(u);return Ot(t,e,{type:"APPLY",path:n.map(E=>E.toString()),argumentList:m},b).then(mt)},construct(c,d){se(i);const[u,l]=Un(d);return Ot(t,e,{type:"CONSTRUCT",path:n.map(m=>m.toString()),argumentList:u},l).then(mt)}});return Oo(s,t),s}function Io(t){return Array.prototype.concat.apply([],t)}function Un(t){const e=t.map(_e);return[e.map(n=>n[0]),Io(e.map(n=>n[1]))]}const dr=new WeakMap;function hr(t,e){return dr.set(t,e),t}function Do(t){return Object.assign(t,{[ar]:!0})}function _e(t){for(const[e,n]of lr)if(n.canHandle(t)){const[r,i]=n.serialize(t);return[{type:"HANDLER",name:e,value:r},i]}return[{type:"RAW",value:t},dr.get(t)||[]]}function mt(t){switch(t.type){case"HANDLER":return lr.get(t.name).deserialize(t.value);case"RAW":return t.value}}function Ot(t,e,n,r){return new Promise(i=>{const s=No();e.set(s,i),t.start&&t.start(),t.postMessage(Object.assign({id:s},n),r)})}function No(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const Co=()=>["avc1.64001e","avc1.64001f","avc1.640020","avc1.640028","avc1.640029","avc1.64002a","avc1.640032","avc1.640033","avc1.640034","avc1.4d401f","avc1.4d4020","avc1.4d4028","avc1.4d4029","avc1.4d401e","avc1.42E01E","avc1.42E01F","avc1.42E028"],pr=(t,e,n)=>{const r=Co();return n<=30?r:xo(t,e)?["avc1.640020",...r]:Lo(t,e)?["avc1.64002a",...r]:Mo(t,e)?["avc1.640033",...r]:["avc1.640034",...r]},sn=(t,e,n,r)=>e>t?t<=r&&e<=n:t<=n&&e<=r,xo=(t,e)=>sn(t,e,1280,720),Lo=(t,e)=>sn(t,e,1920,1080),Mo=(t,e)=>sn(t,e,2560,1440),Fn=(t,e,n,r,i)=>({codec:t,width:e,height:n,framerate:r,bitrateMode:"quantizer",hardwareAcceleration:i,avc:{format:"avc"}});class M{static _zero=new M(0);_micros;constructor(e){this._micros=e}static fromUS(e){return new M(Math.round(e))}static fromMS(e){return new M(Math.round(e*1e3))}static fromSec(e){return new M(Math.round(e*1e6))}static zero(){return M._zero}static doOverlap(e,n,r,i){return e.lt(i)&&r.lt(n)}get as(){return{us:(e="raw",n)=>M._round(this._micros,e,n),ms:(e="raw",n)=>M._round(this._micros/1e3,e,n),sec:(e="raw",n)=>M._round(this._micros/1e6,e,n)}}lt(e){return this._micros<e._micros}lte(e){return this._micros<=e._micros}gt(e){return this._micros>e._micros}gte(e){return this._micros>=e._micros}eq(e,n=0){return Math.abs(this._micros-e._micros)<=n}add(e){return new M(this._micros+e._micros)}sub(e){return new M(this._micros-e._micros)}mul(e){return new M(Math.round(this._micros*e))}div(e){if(e===0)throw new Error("Division by zero at Time.div");return new M(Math.round(this._micros/e))}mod(e){if(e._micros===0)throw new Error("Division by zero at Time.mod");const n=this._micros%e._micros;return new M(n)}roundTo(e=0){return M.fromUS(this.as.us("round",e))}static compare(e,n){return e._micros-n._micros}static min(...e){if(e.length===0)throw new Error("Time.min requires at least one Time argument");let n=e[0];for(const r of e)r._micros<n._micros&&(n=r);return n}static max(...e){if(e.length===0)throw new Error("Time.max requires at least one Time argument");let n=e[0];for(const r of e)r._micros>n._micros&&(n=r);return n}static _round(e,n,r){if(n==="raw")return e;const i=10**(r??0);switch(n){case"round":return Math.round(e/i)*i;case"floor":return Math.floor(e/i)*i;case"ceil":return Math.ceil(e/i)*i}}}const et=(t=Y.UNKNOWN_ERR,e,n,r)=>{const i=$e(e)?e.type:Po(e)?Y.NETWORK_FAILED_ERR:t,s=mr(e)||$e(e)?e.message:"",c=s?`${s}
2    ${n??""}: ${Ze(e)}`:`${n??""}: ${Ze(e)}`,d=$e(e)&&e.errorArgs!==void 0?e.errorArgs:r;return{__internal:"MediaProcessingError",type:i,message:c,errorArgs:d}},$e=t=>typeof t=="object"&&t!==null&&"__internal"in t,mr=t=>t instanceof Error,ko=t=>t instanceof DOMException,Po=t=>mr(t)&&t.name==="TypeError"&&t.message==="Network request failed",U
2o=t=>{if(ko(t))return`DOMException ${t.name}(${t.code}): ${t.message}`;const e=Object.getOwnPropertyNames(t);try{return JSON.stringify(t,e)}catch(n){return`{${e.map(i=>`${i}: ${t[i]}`).join(", ")}} (stringify failed: ${n})`}},Ze=t=>{switch(typeof t){case"string":return t;case"undefined":return"undefined";case"function":return`function ${t.name}`;case"number":case"bigint":case"symbol":case"boolean":return t.toString();case"object":return t!==null?Uo(t):"null"}};class Fo extends Error{}class st extends Fo{constructor(){super("Zone is an abstract class")}}function Bt(t){return typeof t>"u"}function zo(){try{return typeof Intl<"u"&&Intl.DateTimeFormat}catch{return!1}}function Ho(){return!Bt(Intl.DateTimeFormat.prototype.formatToParts)}function ae(t,e=2){return t.toString().length<e?("0".repeat(e)+t).slice(-e):t.toString()}function _r(t){if(!(Bt(t)||t===null||t===""))return parseInt(t,10)}function Go(t){if(!(Bt(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function $o(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function Wo(t,e,n,r=null){const i=new Date(t),s={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);const c=Object.assign({timeZoneName:e},s),d=zo();if(d&&Ho()){const u=new Intl.DateTimeFormat(n,c).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return u?u.value:null}else if(d){const u=new Intl.DateTimeFormat(n,s).format(i);return new Intl.DateTimeFormat(n,c).format(i).substring(u.length).replace(/^[, \u200e]+/,"")}else return null}function Er(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function Qe(t,e){const n=Math.trunc(t/60),r=Math.abs(t%60),i=n>=0&&!Object.is(n,-0)?"+":"-",s=`${i}${Math.abs(n)}`;switch(e){case"short":return`${i}${ae(Math.abs(n),2)}:${ae(r,2)}`;case"narrow":return r>0?`${s}:${r}`:s;case"techie":return`${i}${ae(Math.abs(n),2)}${ae(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}const yr=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;class gr{get type(){throw new st}get name(){throw new st}get universal(){throw new st}offsetName(e,n){throw new st}formatOffset(e,n){throw new st}offset(e){throw new st}equals(e){throw new st}get isValid(){throw new st}}const Bo=RegExp(`^${yr.source}$`);let de={};function jo(t){return de[t]||(de[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),de[t]}const Vo={year:0,month:1,day:2,hour:3,minute:4,second:5};function Yo(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n),[,i,s,c,d,u,l]=r;return[c,i,s,d,u,l]}function qo(t,e){const n=t.formatToParts(e),r=[];for(let i=0;i<n.length;i++){const{type:s,value:c}=n[i],d=Vo[s];Bt(d)||(r[d]=parseInt(c,10))}return r}let ce={};class Ee extends gr{static create(e){return ce[e]||(ce[e]=new Ee(e)),ce[e]}static resetCache(){ce={},de={}}static isValidSpecifier(e){return!!(e&&e.match(Bo))}static isValidZone(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}static parseGMTOffset(e){if(e){const n=e.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(n)return-60*parseInt(n[1])}return null}constructor(e){super(),this.zoneName=e,this.valid=Ee.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get universal(){return!1}offsetName(e,{format:n,locale:r}){return Wo(e,n,r,this.name)}formatOffset(e,n){return Qe(this.offset(e),n)}offset(e){const n=new Date(e),r=jo(this.name),[i,s,c,d,u,l]=r.formatToParts?qo(r,n):Yo(r,n),b=$o({year:i,month:s,day:c,hour:d===24?0:d,minute:u,second:l,millisecond:0});let E=+n;const S=E%1e3;return E-=S>=0?S:1e3+S,(b-E)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let We=null;class It extends gr{static get utcInstance(){return We===null&&(We=new It(0)),We}static instance(e){return e===0?It.utcInstance:new It(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new It(Er(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Qe(this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Qe(this.fixed,n)}get universal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}function xt(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function Lt(...t){return e=>t.reduce(([n,r,i],s)=>{const[c,d,u]=s(e,i);return[Object.assign(n,c),r||d,u]},[{},null,1]).slice(0,2)}function br(...t){return(e,n)=>{const r={};let i;for(i=0;i<t.length;i++)r[t[i]]=_r(e[n+i]);return[r,null,n+i]}}const Tr=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Sr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,9}))?)?)?/,wr=RegExp(`${Sr.source}${Tr.source}?`),an=RegExp(`(?:T${wr.source})?`),Xo=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ko=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Zo=/(\d{4})-?(\d{3})/,Qo=br("weekYear","weekNumber","weekDay"),Jo=br("year","ordinal"),ti=/(\d{4})-(\d\d)-(\d\d)/,vr=RegExp(`${Sr.source} ?(?:${Tr.source}|(${yr.source}))?`),ei=RegExp(`(?: ${vr.source})?`);function Dt(t,e,n){const r=t[e];return Bt(r)?n:_r(r)}function Ar(t,e){return[{year:Dt(t,e),month:Dt(t,e+1,1),day:Dt(t,e+2,1)},null,e+3]}function Mt(t,e){return[{hour:Dt(t,e,0),minute:Dt(t,e+1,0),second:Dt(t,e+2,0),millisecond:Go(t[e+3])},null,e+4]}function jt(t,e){const n=!t[e]&&!t[e+1],r=Er(t[e+1],t[e+2]),i=n?null:It.instance(r);return[{},i,e+3]}function Or(t,e){const n=t[e]?Ee.create(t[e]):null;return[{},n,e+1]}xt(Xo,an);xt(Ko,an);xt(Zo,an);xt(wr);Lt(Ar,Mt,jt);Lt(Qo,Mt,jt);Lt(Jo,Mt);Lt(Mt,jt);xt(ti,ei);xt(vr);Lt(Ar,Mt,jt,Or);Lt(Mt,jt,Or);const Rr={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}};Object.assign({years:{months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3}},Rr);const V=146097/400,wt=146097/4800;Object.assign({years:{months:12,weeks:V/7,days:V,hours:V*24,minutes:V*24*60,seconds:V*24*60*60,milliseconds:V*24*60*60*1e3},quarters:{months:3,weeks:V/28,days:V/4,hours:V*24/4,minutes:V*24*60/4,seconds:V*24*60*60/4,milliseconds:V*24*60*60*1e3/4},months:{weeks:wt/7,days:wt,hours:wt*24,minutes:wt*24*60,seconds:wt*24*60*60,milliseconds:wt*24*60*60*1e3}},Rr);const ni=(t,e)=>Math.round(t*Math.pow(10,e))/Math.pow(10,e),ri=(t,e,n)=>{const r=setTimeout(()=>n(),e);return t.then(()=>clearTimeout(r),()=>clearTimeout(r)),t};function zn(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function oi(t){if(Array.isArray(t))return t}function ii(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,c,d=[],u=!0,l=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(u=(r=s.call(n)).done)&&(d.push(r.value),d.length!==e);u=!0);}catch(m){l=!0,i=m}
vendor: 6,626 bytes, lines 2-3
2finally{try{if(!u&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw i}}return d}}function si(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ai(t,e){return oi(t)||ii(t,e)||ci(t,e)||si()}function ci(t,e){if(t){if(typeof t=="string")return zn(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zn(t,e):void 0}}const Ir=Object.entries,Hn=Object.setPrototypeOf,li=Object.isFrozen,ui=Object.getPrototypeOf,fi=Object.getOwnPropertyDescriptor;let k=Object.freeze,P=Object.seal,Rt=Object.create,Dr=typeof Reflect<"u"&&Reflect,Je=Dr.apply,tn=Dr.construct;k||(k=function(e){return e});P||(P=function(e){return e});Je||(Je=function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];return e.apply(n,i)});tn||(tn=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new e(...r)});const vt=N(Array.prototype.forEach),di=N(Array.prototype.lastIndexOf),Gn=N(Array.prototype.pop),At=N(Array.prototype.push),hi=N(Array.prototype.splice),ct=Array.isArray,$t=N(String.prototype.toLowerCase),Be=N(String.prototype.toString),$n=N(String.prototype.match),Ht=N(String.prototype.replace),Wn=N(String.prototype.indexOf),pi=N(String.prototype.trim),mi=N(Number.prototype.toString),_i=N(Boolean.prototype.toString),Bn=typeof BigInt>"u"?null:N(BigInt.prototype.toString),jn=typeof Symbol>"u"?null:N(Symbol.prototype.toString),L=N(Object.prototype.hasOwnProperty),Gt=N(Object.prototype.toString),x=N(RegExp.prototype.test),pt=Ei(TypeError);function N(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Je(t,e,r)}}function Ei(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return tn(t,n)}}function g(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$t;if(Hn&&Hn(t,null),!ct(e))return t;let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const s=n(i);s!==i&&(li(e)||(e[r]=s),i=s)}t[i]=!0}return t}function yi(t){for(let e=0;e<t.length;e++)L(t,e)||(t[e]=null);return t}function U(t){const e=Rt(null);for(const r of Ir(t)){var n=ai(r,2);const i=n[0],s=n[1];L(t,i)&&(ct(s)?e[i]=yi(s):s&&typeof s=="object"&&s.constructor===Object?e[i]=U(s):e[i]=s)}return e}function gi(t){switch(typeof t){case"string":return t;case"number":return mi(t);case"boolean":return _i(t);case"bigint":return Bn?Bn(t):"0";case"symbol":return jn?jn(t):"Symbol()";case"undefined":return Gt(t);case"function":case"object":{if(t===null)return Gt(t);const e=t,n=X(e,"toString");if(typeof n=="function"){const r=n(e);return typeof r=="string"?r:Gt(r)}return Gt(t)}default:return Gt(t)}}function X(t,e){for(;t!==null;){const r=fi(t,e);if(r){if(r.get)return N(r.get);if(typeof r.value=="function")return N(r.value)}t=ui(t)}function n(){return null}return n}function bi(t){try{return x(t,""),!0}catch{return!1}}const Vn=k(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),je=k(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ve=k(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ti=k(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ye=k(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Si=k(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Yn=k(["#text"]),qn=k(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
3spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),qe=k(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Xn=k(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),le=k(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),wi=P(/{{[\w\W]*|^[\w\W]*}}/g),vi=P(/<%[\w\W]*|^[\w\W]*%>/g),Ai=P(/\${[\w\W]*/g),Oi=P(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ri=P(/^aria-[\-\w]+$/),Kn=P(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ii=P(/^(?:\w+script|data):/i),Di=P(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ni=P(/^html$/i),Ci=P(/^[a-z][.\w]*(-[.\w]+)+$/i),Zn=P(/<[/\w!]/g),Qn=P(/<[/\w]/g),xi=P(/<\/no(script|embed|frames)/i),Li=P(/\/>/i),B={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Mi=function(){return typeof window>"u"?null:window},ki=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;
vendor: 4,151 bytes, line 3
3const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return e.createPolicy(s,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Jn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},at=function(e,n,r,i){return L(e,n)&&ct(e[n])?g(i.base?U(i.base):{},e[n],i.transform):r};function Nr(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Mi();const e=h=>Nr(h);if(e.version="3.4.13",e.removed=[],!t||!t.document||t.document.nodeType!==B.document||!t.Element)return e.isSupported=!1,e;let n=t.document;const r=n,i=r.currentScript;t.DocumentFragment;const s=t.HTMLTemplateElement,c=t.Node,d=t.Element,u=t.NodeFilter,l=t.NamedNodeMap;l===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const m=t.DOMParser,b=t.trustedTypes,E=d.prototype,S=X(E,"cloneNode"),j=X(E,"remove"),D=X(E,"nextSibling"),tt=X(E,"childNodes"),q=X(E,"parentNode"),_t=X(E,"shadowRoot"),Se=X(E,"attributes"),F=c&&c.prototype?X(c.prototype,"nodeType"):null,K=c&&c.prototype?X(c.prototype,"nodeName"):null,Yt=c&&c.prototype?X(c.prototype,"ownerDocument"):null;if(typeof s=="function"){const h=n.createElement("template");h.content&&h.content.ownerDocument&&(n=h.content.ownerDocument)}let H,ft="",we,un=!1,kt=0;const fn=function(){if(kt>0)throw pt('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Et=function(o){fn(),kt++;try{return H.createHTML(o)}finally{kt--}},Br=function(o){fn(),kt++;try{return H.createScriptURL(o)}finally{kt--}},jr=function(){return un||(we=ki(b,i),un=!0),we},qt=n,ve=qt.implementation,dn=qt.createNodeIterator,Vr=qt.createDocumentFragment,Yr=qt.getElementsByTagName,qr=r.importNode;let w=Jn();e.isSupported=typeof Ir=="function"&&typeof q=="function"&&ve&&ve.createHTMLDocument!==void 0;const Xr=wi,Kr=vi,Zr=Ai,Qr=Oi,Jr=Ri,to=Ii,hn=Di,eo=Ci;let pn=Kn,v=null;const Ae=g({},[...Vn,...je,...Ve,...Ye,...Yn]);let A=null;const Oe=g({},[...qn,...qe,...Xn,...le]);let I=Object.seal(Rt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Pt=null,mn=null;const nt=Object.seal(Rt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let _n=!0,Re=!0,En=!1,yn=!0,rt=!1,ot=!0,dt=!1,Ie=!1,Xt=null,Kt=null,De=!1,yt=!1,Zt=!1,Qt=!1,gn=!0,bn=!1;const Tn="user-content-";let Ne=!0,Jt=!1,gt={},Z=null;const Ce=g({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Sn=null;const wn=g({},["audio","video","img","source","image","track"]);let xe=null;const vn=g({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),te="http://www.w3.org/1998/Math/MathML",ee="http://www.w3.org/2000/svg",Q="http://www.w3.org/1999/xhtml";let bt=Q,Le=!1,Me=null;const no=g({},[te,ee,Q],Be),An=k(["mi","mo","mn","ms","mtext"]);let ke=g({},An);const On=k(["annotation-xml"]);let Pe=g({},On);const ro=g({},["title","style","font","a","script"]);let Ut=null;const oo=["application/xhtml+xml","text/html"],io="text/html";let O=null,Tt=null;const so=n.createElement("form"),Rn=function(o){return o instanceof RegExp||o instanceof Function},Ue=function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Tt&&Tt===o)return;(!o||typeof o!="object")&&(o={}
vendor: 4,950 bytes, line 3
3),o=U(o),Ut=oo.indexOf(o.PARSER_MEDIA_TYPE)===-1?io:o.PARSER_MEDIA_TYPE,O=Ut==="application/xhtml+xml"?Be:$t,v=at(o,"ALLOWED_TAGS",Ae,{transform:O}),A=at(o,"ALLOWED_ATTR",Oe,{transform:O}),Me=at(o,"ALLOWED_NAMESPACES",no,{transform:Be}),xe=at(o,"ADD_URI_SAFE_ATTR",vn,{transform:O,base:vn}),Sn=at(o,"ADD_DATA_URI_TAGS",wn,{transform:O,base:wn}),Z=at(o,"FORBID_CONTENTS",Ce,{transform:O}),Pt=at(o,"FORBID_TAGS",U({}),{transform:O}),mn=at(o,"FORBID_ATTR",U({}),{transform:O}),gt=L(o,"USE_PROFILES")?o.USE_PROFILES&&typeof o.USE_PROFILES=="object"?U(o.USE_PROFILES):o.USE_PROFILES:!1,_n=o.ALLOW_ARIA_ATTR!==!1,Re=o.ALLOW_DATA_ATTR!==!1,En=o.ALLOW_UNKNOWN_PROTOCOLS||!1,yn=o.ALLOW_SELF_CLOSE_IN_ATTR!==!1,rt=o.SAFE_FOR_TEMPLATES||!1,ot=o.SAFE_FOR_XML!==!1,dt=o.WHOLE_DOCUMENT||!1,yt=o.RETURN_DOM||!1,Zt=o.RETURN_DOM_FRAGMENT||!1,Qt=o.RETURN_TRUSTED_TYPE||!1,De=o.FORCE_BODY||!1,gn=o.SANITIZE_DOM!==!1,bn=o.SANITIZE_NAMED_PROPS||!1,Ne=o.KEEP_CONTENT!==!1,Jt=o.IN_PLACE||!1,pn=bi(o.ALLOWED_URI_REGEXP)?o.ALLOWED_URI_REGEXP:Kn,bt=typeof o.NAMESPACE=="string"?o.NAMESPACE:Q,ke=L(o,"MATHML_TEXT_INTEGRATION_POINTS")&&o.MATHML_TEXT_INTEGRATION_POINTS&&typeof o.MATHML_TEXT_INTEGRATION_POINTS=="object"?U(o.MATHML_TEXT_INTEGRATION_POINTS):g({},An),Pe=L(o,"HTML_INTEGRATION_POINTS")&&o.HTML_INTEGRATION_POINTS&&typeof o.HTML_INTEGRATION_POINTS=="object"?U(o.HTML_INTEGRATION_POINTS):g({},On);const a=L(o,"CUSTOM_ELEMENT_HANDLING")&&o.CUSTOM_ELEMENT_HANDLING&&typeof o.CUSTOM_ELEMENT_HANDLING=="object"?U(o.CUSTOM_ELEMENT_HANDLING):Rt(null);if(I=Rt(null),L(a,"tagNameCheck")&&Rn(a.tagNameCheck)&&(I.tagNameCheck=a.tagNameCheck),L(a,"attributeNameCheck")&&Rn(a.attributeNameCheck)&&(I.attributeNameCheck=a.attributeNameCheck),L(a,"allowCustomizedBuiltInElements")&&typeof a.allowCustomizedBuiltInElements=="boolean"&&(I.allowCustomizedBuiltInElements=a.allowCustomizedBuiltInElements),P(I),rt&&(Re=!1),Zt&&(yt=!0),gt&&(v=g({},Yn),A=Rt(null),gt.html===!0&&(g(v,Vn),g(A,qn)),gt.svg===!0&&(g(v,je),g(A,qe),g(A,le)),gt.svgFilters===!0&&(g(v,Ve),g(A,qe),g(A,le)),gt.mathMl===!0&&(g(v,Ye),g(A,Xn),g(A,le))),nt.tagCheck=null,nt.attributeCheck=null,L(o,"ADD_TAGS")&&(typeof o.ADD_TAGS=="function"?nt.tagCheck=o.ADD_TAGS:ct(o.ADD_TAGS)&&(v===Ae&&(v=U(v)),g(v,o.ADD_TAGS,O))),L(o,"ADD_ATTR")&&(typeof o.ADD_ATTR=="function"?nt.attributeCheck=o.ADD_ATTR:ct(o.ADD_ATTR)&&(A===Oe&&(A=U(A)),g(A,o.ADD_ATTR,O))),L(o,"ADD_URI_SAFE_ATTR")&&ct(o.ADD_URI_SAFE_ATTR)&&g(xe,o.ADD_URI_SAFE_ATTR,O),L(o,"FORBID_CONTENTS")&&ct(o.FORBID_CONTENTS)&&(Z===Ce&&(Z=U(Z)),g(Z,o.FORBID_CONTENTS,O)),L(o,"ADD_FORBID_CONTENTS")&&ct(o.ADD_FORBID_CONTENTS)&&(Z===Ce&&(Z=U(Z)),g(Z,o.ADD_FORBID_CONTENTS,O)),Ne&&(v["#text"]=!0),dt&&g(v,["html","head","body"]),v.table&&(g(v,["tbody"]),delete Pt.tbody),o.TRUSTED_TYPES_POLICY){if(typeof o.TRUSTED_TYPES_POLICY.createHTML!="function")throw pt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof o.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw pt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const f=H;H=o.TRUSTED_TYPES_POLICY;try{ft=Et("")}catch(p){throw H=f,p}}else o.TRUSTED_TYPES_POLICY===null?(H=void 0,ft=""):(H===void 0&&(H=jr()),H&&typeof ft=="string"&&(ft=Et("")));k&&k(o),Tt=o},In=g({},[...je,...Ve,...Ti]),Dn=g({},[...Ye,...Si]),ao=function(o,a,f){return a.namespaceURI===Q?o==="svg":a.namespaceURI===te?o==="svg"&&(f==="annotation-xml"||ke[f]):!!In[o]},co=function(o,a,f){return a.namespaceURI===Q?o==="math":a.namespaceURI===ee?o==="math"&&Pe[f]:!!Dn[o]},lo=function(o,a,f){return a.namespaceURI===ee&&!Pe[f]||a.namespaceURI===te&&!ke[f]?!1:!Dn[o]&&(ro[o]||!In[o])},uo=function(o){let a=q(o);(!a||!a.tagName)&&(a={namespaceURI:bt,tagName:"template"});const f=$t(o.tagName),p=$t(a.tagName);return Me[o.namespaceURI]?o.namespaceURI===ee?ao(f,a,p):o.namespaceURI===te?co(f,a,p):o.namespaceURI===Q?lo(f,a,p):!!(Ut==="application/xhtml+xml"&&Me[o.namespaceURI]):!1},it=function(o){At(e.removed,{element:o});try{q(o).removeChild(o)}catch{if(j(o),!q(o))throw pt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ne=function(o){Ft(o);const a=tt(o);if(a){const p=[];vt(a,_=>{At(p,_)}),vt(p,_=>{try{j(_)}catch{}})}const f=Se(o);if(f)for(let p=f.length-1;p>=0;--p){const _=f[p],y=_&&_.name;if(typeof y=="string")try{o.removeAttribute(y)}catch{}}},ht=function(o,a){try{At(e.removed,{attribute:a.getAttributeNode(o),from:a})}catch{At(e.removed,{attribute:null,from:a})}if(a.removeAttribute(o),o==="is")if(yt||Zt)try{it(a)}catch{}else try{a.setAttribute(o,"")}catch{}},fo=function(o){const a=Se(o);if(a)for(let f=a.length-1;f>=0;--f){const p=a[f],_=p&&p.name;if(!(typeof _!="string"||A[O(_)]))try{o.removeAttribute(_)}catch{}}},Ft=function(o){const a=[o];for(;a.length>0;){const f=a.pop();(F?F(f):f.nodeType)===B.element&&fo(f);const _=tt(f);if(_)for(let y=_.length-1;y>=0;--y)a.push(_[y])}}
3,ho=function(o){if(!ot)return;const a=[o];for(;a.length>0;){const f=a.pop(),p=F?F(f):f.nodeType;if(p===B.processingInstruction||p===B.comment&&x(Qn,f.data)){try{j(f)}catch{}continue}if(p===B.element){const y=f,T=O(K?K(f):f.nodeName);try{y.hasAttribute&&y.hasAttribute("patchsrc")&&y.removeAttribute("patchsrc"),y.hasAttribute&&y.hasAttribute("for")&&T!=="label"&&T!=="output"&&y.removeAttribute("for")}catch{}}const _=tt(f);if(_)for(let y=_.length-1;y>=0;--y)a.push(_[y])}},Nn=function(o){let a=null,f=null;if(De)o="<remove></remove>"+o;else{const y=$n(o,/^[\r\n\t ]+/);f=y&&y[0]}Ut==="application/xhtml+xml"&&bt===Q&&(o='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+o+"</body></html>");const p=H?Et(o):o;if(bt===Q)try{a=new m().parseFromString(p,Ut)}catch{}if(!a||!a.documentElement){a=ve.createDocument(bt,"template",null);try{a.documentElement.innerHTML=Le?ft:p}catch{}}const _=a.body||a.documentElement;return o&&f&&_.insertBefore(n.createTextNode(f),_.childNodes[0]||null),bt===Q?Yr.call(a,dt?"html":"body")[0]:dt?a.documentElement:_},Cn=function(o){const a=Yt?Yt(o):o.ownerDocument;return dn.call(a||o,o,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},re=function(o){return o=Ht(o,Xr," "),o=Ht(o,Kr," "),o=Ht(o,Zr," "),o},Fe=function(o){var a;o.normalize();const f=Yt?Yt(o):o.ownerDocument,p=dn.call(f||o,o,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let _=p.nextNode();for(;_;)_.data=re(_.data),_=p.nextNode();const y=(a=o.querySelectorAll)===null||a===void 0?void 0:a.call(o,"template");y&&vt(y,T=>{St(T.content)&&Fe(T.content)})},oe=function(o){const a=K?K(o):null;return typeof a!="string"||O(a)!=="form"?!1:typeof o.nodeName!="string"||typeof o.textContent!="string"||typeof o.removeChild!="function"||o.attributes!==Se(o)||typeof o.removeAttribute!="function"||typeof o.setAttribute!="function"||typeof o.namespaceURI!="string"||typeof o.insertBefore!="function"||typeof o.hasChildNodes!="function"||o.nodeType!==F(o)||o.childNodes!==tt(o)},St=function(o){if(!F||typeof o!="object"||o===null)return!1;try{return F(o)===B.documentFragment}catch{return!1}},zt=function(o){if(!F||typeof o!="object"||o===null)return!1;try{return typeof F(o)=="number"}catch{return!1}};function J(h,o,a){h.length!==0&&vt(h,f=>{f.call(e,o,a,Tt)})}const po=function(o,a){return!!(ot&&o.hasChildNodes()&&!zt(o.firstElementChild)&&x(Zn,o.textContent)&&x(Zn,o.innerHTML)||ot&&o.namespaceURI===Q&&a==="style"&&zt(o.firstElementChild)||o.nodeType===B.processingInstruction||ot&&o.nodeType===B.comment&&x(Qn,o.data))},mo=function(o,a,f){if(!Pt[a]&&kn(a)&&(I.tagNameCheck instanceof RegExp&&x(I.tagNameCheck,a)||I.tagNameCheck instanceof Function&&I.tagNameCheck(a)))return!1;if(Ne&&!Z[a]){const p=q(o),_=tt(o);if(_&&p){const y=_.length;for(let T=y-1;T>=0;--T){const R=o===f?S(_[T],!0):_[T];p.insertBefore(R,D(o))}}}return it(o),!0},xn=function(o,a,f,p){return o.length===0?a:a===f||a===p?U(a):a},Ln=function(o,a){if(J(w.beforeSanitizeElements,o,null),o!==a&&q(o)===null)return Jt&&Ft(o),!0;if(oe(o))return it(o),!0;const f=O(K?K(o):o.nodeName);if(v=xn(w.uponSanitizeElement,v,Ae,Xt),J(w.uponSanitizeElement,o,{tagName:f,allowedTags:v}),o!==a&&q(o)===null)return Jt&&Ft(o),!0;if(po(o,f))return it(o),!0;if(Pt[f]||!(nt.tagCheck instanceof Function&&nt.tagCheck(f))&&!v[f]){const _=mo(o,f,a);return _===!1&&J(w.afterSanitizeElements,o,null),_}if((F?F(o):o.nodeType)===B.element&&!uo(o)||(f==="noscript"||f==="noembed"||f==="noframes")&&x(xi,o.innerHTML))return it(o),!0;if(rt&&o.nodeType===B.text){const _=re(o.textContent);o.textContent!==_&&(At(e.removed,{element:o.cloneNode()}),o.textContent=_)}return J(w.afterSanitizeElements,o,null),!1},Mn=function(o,a,f){if(mn[a]||ot&&a==="patchsrc"||ot&&a==="for"&&o!=="label"&&o!=="output"||gn&&(a==="id"||a==="name")&&(f in n||f in so))return!1;const p=A[a]||nt.attributeCheck instanceof Function&&nt.attributeCheck(a,o);if(!(Re&&x(Qr,a))){if(!(_n&&x(Jr,a))){if(p){if(!xe[a]){if(!x(pn,Ht(f,hn,""))){if(!((a==="src"||a==="xlink:href"||a==="href")&&o!=="script"&&Wn(f,"data:")===0&&Sn[o])){if(!(En&&!x(to,Ht(f,hn,"")))){if(f)return!1}}}}}else if(!(kn(o)&&(I.tagNameCheck instanceof RegExp&&x(I.tagNameCheck,o)||I.tagNameCheck instanceof Function&&I.tagNameCheck(o))&&(I.attributeNameCheck instanceof RegExp&&x(I.attributeNameCheck,a)||I.attributeNameCheck instanceof Function&&I.attributeNameCheck(a,o))||a==="is"&&I.allowCustomizedBuiltInElements&&(I.tagNameCheck instanceof RegExp&&x(I.tagNameCheck,f)||I.tagNameCheck instanceof Function&&I.tagNameCheck(f))))return!1}}return!0},_o=g({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),kn=function(o){return!_o[$t(o)]&&x(eo,o)},Eo=function(o,a,f,p){if(H&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!f)switch(b.getAttributeType(o,a)){case"TrustedHTML":return Et(p);case"TrustedScriptURL":return Br(p)}return p},yo=function(o,a,f,p){try{f?o.setAttributeNS(f,a,p):o.setAttribute(a,p),oe(o
vendor: 4,050 bytes, lines 3-4
3)?it(o):Gn(e.removed)}catch{ht(a,o)}},Pn=function(o){J(w.beforeSanitizeAttributes,o,null);const a=o.attributes;if(!a||oe(o))return;A=xn(w.uponSanitizeAttribute,A,Oe,Kt);const f={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:A,forceKeepAttr:void 0};let p=a.length;const _=O(o.nodeName);for(;p--;){const y=a[p],T=y.name,R=y.namespaceURI,G=y.value,$=O(T),He=G;let z=T==="value"?He:pi(He);if(f.attrName=$,f.attrValue=z,f.keepAttr=!0,f.forceKeepAttr=void 0,J(w.uponSanitizeAttribute,o,f),z=f.attrValue,bn&&($==="id"||$==="name")&&Wn(z,Tn)!==0&&(ht(T,o),z=Tn+z),ot&&x(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,z)){ht(T,o);continue}if($==="attributename"&&$n(z,"href")){ht(T,o);continue}if(!f.forceKeepAttr){if(!f.keepAttr){ht(T,o);continue}if(!yn&&x(Li,z)){ht(T,o);continue}if(rt&&(z=re(z)),!Mn(_,$,z)){ht(T,o);continue}z=Eo(_,$,R,z),z!==He&&yo(o,T,R,z)}}J(w.afterSanitizeAttributes,o,null)},ie=function(o){let a=null;const f=Cn(o);for(J(w.beforeSanitizeShadowDOM,o,null);a=f.nextNode();)if(J(w.uponSanitizeShadowNode,a,null),Ln(a,o),Pn(a),St(a.content)&&ie(a.content),(F?F(a):a.nodeType)===B.element){const _=_t(a);St(_)&&(ze(_),ie(_))}J(w.afterSanitizeShadowDOM,o,null)},ze=function(o){const a=[{node:o,shadow:null}];for(;a.length>0;){const f=a.pop();if(f.shadow){ie(f.shadow);continue}const p=f.node,y=(F?F(p):p.nodeType)===B.element,T=tt(p);if(T)for(let R=T.length-1;R>=0;--R)a.push({node:T[R],shadow:null});if(y){const R=K?K(p):null;if(typeof R=="string"&&O(R)==="template"){const G=p.content;St(G)&&a.push({node:G,shadow:null})}}if(y){const R=_t(p);St(R)&&a.push({node:null,shadow:R},{node:R,shadow:null})}}};return e.sanitize=function(h){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=null,f=null,p=null,_=null;if(Le=!h,Le&&(h="<!-->"),typeof h!="string"&&!zt(h)&&(h=gi(h),typeof h!="string"))throw pt("dirty is not a string, aborting");if(!e.isSupported)return h;Ie?(v=Xt,A=Kt):Ue(o),(w.uponSanitizeElement.length>0||w.uponSanitizeAttribute.length>0)&&(v=U(v)),w.uponSanitizeAttribute.length>0&&(A=U(A)),e.removed=[];const y=Jt&&typeof h!="string"&&zt(h);if(y){ho(h);const G=K?K(h):h.nodeName;if(typeof G=="string"){const $=O(G);if(!v[$]||Pt[$])throw ne(h),pt("root node is forbidden and cannot be sanitized in-place")}if(oe(h))throw ne(h),pt("root node is clobbered and cannot be sanitized in-place");try{ze(h)}catch($){throw ne(h),$}}else if(zt(h))a=Nn("<!---->"),f=a.ownerDocument.importNode(h,!0),f.nodeType===B.element&&f.nodeName==="BODY"||f.nodeName==="HTML"?a=f:a.appendChild(f),ze(f);else{if(!yt&&!rt&&!dt&&h.indexOf("<")===-1)return H&&Qt?Et(h):h;if(a=Nn(h),!a)return yt?null:Qt?ft:""}a&&De&&it(a.firstChild);const T=y?h:a;try{const G=Cn(T);for(;p=G.nextNode();)Ln(p,T),Pn(p),St(p.content)&&ie(p.content)}catch(G){throw y&&(ne(h),vt(e.removed,$=>{$.element&&Ft($.element)})),G}if(y)return vt(e.removed,G=>{G.element&&Ft(G.element)}),rt&&Fe(h),h;if(yt){if(rt&&Fe(a),Zt)for(_=Vr.call(a.ownerDocument);a.firstChild;)_.appendChild(a.firstChild);else _=a;return(A.shadowroot||A.shadowrootmode)&&(_=qr.call(r,_,!0)),_}let R=dt?a.outerHTML:a.innerHTML;return dt&&v["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&x(Ni,a.ownerDocument.doctype.name)&&(R="<!DOCTYPE "+a.ownerDocument.doctype.name+`>
4`+R),rt&&(R=re(R)),H&&Qt?Et(R):R},e.setConfig=function(){let h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ue(h),Ie=!0,Xt=v,Kt=A},e.clearConfig=function(){Tt=null,Ie=!1,Xt=null,Kt=null,H=we,ft=""},e.isValidAttribute=function(h,o,a){Tt||Ue({});const f=O(h),p=O(o);return Mn(f,p,a)},e.addHook=function(h,o){typeof o=="function"&&L(w,h)&&At(w[h],o)},e.removeHook=function(h,o){if(L(w,h)){if(o!==void 0){const a=di(w[h],o);return a===-1?void 0:hi(w[h],a,1)[0]}return Gn(w[h])}},e.removeHooks=function(h){L(w,h)&&(w[h]=[])},e.removeAllHooks=function(){w=Jn()},e}Nr();var Y=(t=>(t.NOT_IMPLEMENTED="EEE",t.LOGIC_ERR="E00",t.UNKNOWN_ERR="E01",t.IMAGE_ASSET_LOST="E02",t.VIDEO_ASSET_LOST="E03",t.FFMPEG_SPAWN_FAILED="E04",t.FILE_READ_E
4RROR="E05",t.VIDEO_FORMAT_ERR="E06",t.VIDEO_DECODE_ERR="E07",t.VIDEO_RENDER_ERR="E08",t.CANVAS_CTX_ERR="E09",t.VIDEO_ENCODE_ERR="E10",t.NO_SUPPORTED_CONFIG="E11",t.ENCODED_VIDEO_NOT_FOUND="E12",t.CHAR_ASSET_LOST="E13",t.SIMPLE_CHARACTER_ASSET_LOST="E14",t.WATERMARK_LOST="E15",t.DISK_WRITE_ERR="E16",t.DISK_NO_SPACE="E17",t.MUXER_ERR="E18",t.CANVAS_RENDER_EMPTY_BLOB="E19",t.MUXING_AUDIO_FAILED="E20",t.AUDIO_EXPORT_ERR="E21",t.SOURCE_LOST="E22",t.ALPHA_MODE_ERR="E23",t.ASSET_CHUNK_LOST="E24",t.CTX_LOST="E25",t.ENCODER_TIMEOUT="E26",t.ENCODER_OPERATION_ERR="E27",t.NETWORK_FAILED_ERR="E28",t.BITMAP_CREATION_ERR="E29",t.AUDIO_LOGIC_ERR="E30",t.AUDIO_DECODE_ERR="E31",t.AUDIO_ENCODE_ERR="E32",t.AUDIO_DECODER_CONFIG_ERR="E33",t.DECODER_WORKER_SPAWN_ERR="E34",t.AUDIO_FORMAT_ERR="E35",t.IMAGE_EXPORT_GENERAL_ERROR="E36",t.RENDERER_INIT_HWACCEL_UNAVAILABLE="E37",t.AUDIO_ENCODER_TIMEOUT="E38",t.AUDIO_ENCODER_CONFIG_ERR="E39",t))(Y||{});const Pi=(t,e)=>hr(t,e),Cr=(t,e,n)=>({debug:n?(...r)=>t.debug(...r):()=>{},verbose:(...r)=>t.verbose(...r),info:(...r)=>t.info(...r),warn:(...r)=>t.warn(...r),error:(...r)=>t.error(...r)});var en=function(t,e){return en=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},en(t,e)};function ut(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");en(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function Ui(t,e,n,r){function i(s){return s instanceof n?s:new n(function(c){c(s)})}return new(n||(n=Promise))(function(s,c){function d(m){try{l(r.next(m))}catch(b){c(b)}}function u(m){try{l(r.throw(m))}catch(b){c(b)}}function l(m){m.done?s(m.value):i(m.value).then(d,u)}l((r=r.apply(t,[])).next())})}function xr(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,c;return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(l){return function(m){return u([l,m])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(m){l=[6,m],i=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Ct(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ye(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,s=[],c;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(d){c={error:d}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(c)throw c.error}}return s}function ge(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}function Nt(t){return this instanceof Nt?(this.v=t,this):new Nt(t)}function Fi(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,s=[];return i={},c("next"),c("throw"),c("return"),i[Symbol.asyncIterator]=function(){return this},i;function c(E){r[E]&&(i[E]=function(S){return new Promise(function(j,D){s.push([E,S,j,D])>1||d(E,S)})})}function d(E,S){try{u(r[E](S))}catch(j){b(s[0][3],j)}}function u(E){E.value instanceof Nt?Promise.resolve(E.value.v).then(l,m):b(s[0][2],E)}function l(E){d("next",E)}function m(E){d("throw",E)}function b(E,S){E(S),s.shift(),s.length&&d(s[0][0],s[0][1])}}function zi(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Ct=="function"?Ct(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=t[s]&&function(c){return new Promise(function(d,u){c=t[s](c),i(d,u,c.done,c.value)})}}function i(s,c,d,u){Promise.resolve(u).then(function(l){s({value:l,done:d})},c)}}function C(t){return typeof t=="function"}function Lr(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Xe=Lr(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
5`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
6  `):"",this.name="UnsubscriptionError",this.errors=n}});function be(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Vt=(function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,s;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var d=Ct(c),u=d.next();!u.done;u=d.next()){var l=u.value;l.remove(this)}}catch(D){e={error:D}}finally{try{u&&!u.done&&(n=d.return)&&n.call(d)}finally{if(e)throw e.error}}else c.remove(this);var m=this.initialTeardown;
vendor: 13,113 bytes, line 6
6if(C(m))try{m()}catch(D){s=D instanceof Xe?D.errors:[D]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var E=Ct(b),S=E.next();!S.done;S=E.next()){var j=S.value;try{tr(j)}catch(D){s=s??[],D instanceof Xe?s=ge(ge([],ye(s)),ye(D.errors)):s.push(D)}}}catch(D){r={error:D}}finally{try{S&&!S.done&&(i=E.return)&&i.call(E)}finally{if(r)throw r.error}}}if(s)throw new Xe(s)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)tr(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&be(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&be(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=(function(){var e=new t;return e.closed=!0,e})(),t})(),Mr=Vt.EMPTY;function kr(t){return t instanceof Vt||t&&"closed"in t&&C(t.remove)&&C(t.add)&&C(t.unsubscribe)}function tr(t){C(t)?t():t.unsubscribe()}var Hi={Promise:void 0},Gi={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ge([t,e],ye(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Pr(t){Gi.setTimeout(function(){throw t})}function er(){}function he(t){t()}var cn=(function(t){ut(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,kr(n)&&n.add(r)):r.destination=Bi,r}return e.create=function(n,r,i){return new nn(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e})(Vt),$i=(function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){ue(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){ue(r)}else ue(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){ue(n)}},t})(),nn=(function(t){ut(e,t);function e(n,r,i){var s=t.call(this)||this,c;return C(n)||!n?c={next:n??void 0,error:r??void 0,complete:i??void 0}:c=n,s.destination=new $i(c),s}return e})(cn);function ue(t){Pr(t)}function Wi(t){throw t}var Bi={closed:!0,next:er,error:Wi,complete:er},ln=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Ur(t){return t}function ji(t){return t.length===0?Ur:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var lt=(function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,s=Yi(e)?e:new nn(e,n,r);return he(function(){var c=i,d=c.operator,u=c.source;s.add(d?d.call(s,u):u?i._subscribe(s):i._trySubscribe(s))}),s},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=nr(n),new n(function(i,s){var c=new nn({next:function(d){try{e(d)}catch(u){s(u),c.unsubscribe()}},error:s,complete:i});r.subscribe(c)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[ln]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return ji(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=nr(e),new e(function(r,i){var s;n.subscribe(function(c){return s=c},function(c){return i(c)},function(){return r(s)})})},t.create=function(e){return new t(e)},t})();function nr(t){var e;return(e=t??Hi.Promise)!==null&&e!==void 0?e:Promise}function Vi(t){return t&&C(t.next)&&C(t.error)&&C(t.complete)}function Yi(t){return t&&t instanceof cn||Vi(t)&&kr(t)}function qi(t){return C(t?.lift)}function Te(t){return function(e){if(qi(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Wt(t,e,n,r,i){return new Xi(t,e,n,r,i)}var Xi=(function(t){ut(e,t);function e(n,r,i,s,c,d){var u=t.call(this,n)||this;return u.onFinalize=c,u.shouldUnsubscribe=d,u._next=r?function(l){try{r(l)}catch(m){n.error(m)}}:t.prototype._next,u._error=s?function(l){try{s(l)}catch(m){n.error(m)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e})(cn),Ki=Lr(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Fr=(function(t){ut(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new rr(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new Ki},e.prototype.next=function(n){var r=this;he(function(){var i,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var c=Ct(r.currentObservers),d=c.next();!d.done;d=c.next()){var u=d.value;u.next(n)}}catch(l){i={error:l}}finally{try{d&&!d.done&&(s=c.return)&&s.call(c)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;he(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;he(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,s=i.hasError,c=i.isStopped,d=i.observers;return s||c?Mr:(this.currentObservers=null,d.push(n),new Vt(function(){r.currentObservers=null,be(d,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,s=r.thrownError,c=r.isStopped;i?n.error(s):c&&n.complete()},e.prototype.asObservable=function(){var n=new lt;return n.source=this,n},e.create=function(n,r){return new rr(n,r)},e})(lt),rr=(function(t){ut(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Mr},e})(Fr),Zi={now:function(){return Date.now()}},Qi=(function(t){ut(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e})(Vt),or={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,ge([t,e],ye(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},Ji=(function(t){ut(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){if(r===void 0&&(r=0),this.closed)return this;this.state=n;var i=this.id,s=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(s,i,r)),this.pending=!0,this.delay=r,this.id=this.id||this.requestAsyncId(s,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),or.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;or.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,s;try{this.work(n)}catch(c){i=!0,s=c||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,s=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,be(s,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e})(Qi),ir=(function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=Zi.now,t})(),ts=(function(t){ut(e,t);function e(n,r){r===void 0&&(r=ir.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i._scheduled=void 0,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e})(ir),es=new ts(Ji),ns=(function(t){return t&&typeof t.length=="number"&&typeof t!="function"});function rs(t){return C(t?.then)}function os(t){return C(t[ln])}function is(t){return Symbol.asyncIterator&&C(t?.[Symbol.asyncIterator])}function ss(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function as(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var cs=as();function ls(t){return C(t?.[cs])}function us(t){return Fi(this,arguments,function(){var n,r,i,s;return xr(this,function(c){switch(c.label){case 0:n=t.getReader(),c.label=1;case 1:c.trys.push([1,,9,10]),c.label=2;case 2:return[4,Nt(n.read())];case 3:return r=c.sent(),i=r.value,s=r.done,s?[4,Nt(void 0)]:[3,5];case 4:return[2,c.sent()];case 5:return[4,Nt(i)];case 6:return[4,c.sent()];case 7:return c.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function fs(t){return C(t?.getReader)}function zr(t){if(t instanceof lt)return t;if(t!=null){if(os(t))return ds(t);if(ns(t))return hs(t);if(rs(t))return ps(t);if(is(t))return Hr(t);if(ls(t))return ms(t);if(fs(t))return _s(t)}throw ss(t)}function ds(t){return new lt(function(e){var n=t[ln]();if(C(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function hs(t){return new lt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function ps(t){return new lt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Pr)})}function ms(t){return new lt(function(e){var n,r;try{for(var i=Ct(t),s=i.next();!s.done;s=i.next()){var c=s.value;if(e.next(c),e.closed)return}}catch(d){n={error:d}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Hr(t){return new lt(function(e){Es(t,e).catch(function(n){return e.error(n)})})}function _s(t){return Hr(us(t))}function Es(t,e){var n,r,i,s;return Ui(this,void 0,void 0,function(){var c,d;return xr(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=zi(t),u.label=1;case 1:return[4,n.next()];case 2:if(r=u.sent(),!!r.done)return[3,4];if(c=r.value,e.next(c),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return d=u.sent(),i={error:d},[3,11];case 6:return u.trys.push([6,,9,10]),r&&!r.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];
6case 10:return[7];case 11:return e.complete(),[2]}})})}function ys(t,e){return Te(function(n,r){var i=0;n.subscribe(Wt(r,function(s){r.next(t.call(e,s,i++))}))})}function gs(t,e,n,r,i,s,c,d){var u=[],l=0,m=0,b=!1,E=function(){b&&!u.length&&!l&&e.complete()},S=function(D){return l<r?j(D):u.push(D)},j=function(D){l++;var tt=!1;zr(n(D,m++)).subscribe(Wt(e,function(q){e.next(q)},function(){tt=!0},void 0,function(){if(tt)try{l--;for(var q=function(){var _t=u.shift();c||j(_t)};u.length&&l<r;)q();E()}catch(_t){e.error(_t)}}))};return t.subscribe(Wt(e,S,function(){b=!0,E()})),function(){}}function rn(t,e,n){return n===void 0&&(n=1/0),C(e)?rn(function(r,i){return ys(function(s,c){return e(r,s,i,c)})(zr(t(r,i)))},n):(typeof e=="number"&&(n=e),Te(function(r,i){return gs(r,i,t,n)}))}function bs(t,e){return C(e)?rn(t,e,1):rn(t,1)}function Ts(t,e){return e===void 0&&(e=es),Te(function(n,r){var i=null,s=null,c=null,d=function(){if(i){i.unsubscribe(),i=null;var l=s;s=null,r.next(l)}};function u(){var l=c+t,m=e.now();if(m<l){i=this.schedule(void 0,l-m),r.add(i);return}d()}n.subscribe(Wt(r,function(l){s=l,c=e.now(),i||(i=e.schedule(u,t),r.add(i))},function(){d(),r.complete()},void 0,function(){s=i=null}))})}function sr(t,e,n){var r=C(t)||e||n?{next:t,error:e,complete:n}:t;return r?Te(function(i,s){var c;(c=r.subscribe)===null||c===void 0||c.call(r);var d=!0;i.subscribe(Wt(s,function(u){var l;(l=r.next)===null||l===void 0||l.call(r,u),s.next(u)},function(){var u;d=!1,(u=r.complete)===null||u===void 0||u.call(r),s.complete()},function(u){var l;d=!1,(l=r.error)===null||l===void 0||l.call(r,u),s.error(u)},function(){var u,l;d&&((u=r.unsubscribe)===null||u===void 0||u.call(r)),(l=r.finalize)===null||l===void 0||l.call(r)}))}):Ur}const Ss=3e3;let W=null;const ws=()=>!!W,vs=async(t,e,n,r,i,s,c,d)=>{if(W)return;const u=Cr(s,c,d);W=new Ns(t,e,n,r,i,u,c,d),await W.init()},As=()=>{W?.destroy(),W=null,globalThis.close()},Os=async()=>{if(!W)throw et(Y.LOGIC_ERR,"Worker is not initialized");return W.flush()},Rs=async()=>{if(!W)throw et(Y.LOGIC_ERR,"Worker is not initialized");return W.finalize()},Is=async()=>{if(!W)throw et(Y.LOGIC_ERR,"Worker is not initialized");await W.cancel()},Ds=t=>{if(!W)throw et(Y.LOGIC_ERR,"Worker is not initialized");return W.encode(t)};class Ns{_logger;_meta;_onEncode;_onQueueSizeChange;_onError;_onStuck;_encoderObsv$=new Fr;_subscription;_encoder;_config=null;_keyFrameInterval;_cnt=0;_operationErrorCnt=0;constructor(e,n,r,i,s,c,d,u){this._meta=e,this._logger=Cr(c,d,u),this._keyFrameInterval=ni(Math.max(1,this._meta.fps/30),2)*100,this._onEncode=n,this._onQueueSizeChange=r,this._onError=i,this._onStuck=s,this._encoder=this._createEncoder(),this._subscription=this._getEncoderFlushSubscription()}
6async init(){if(this._encoder.state==="configured")throw et(Y.LOGIC_ERR,"Encoder already configured");const{fps:e,width:n,height:r,bitrate:i,hwAccel:s}=this._meta;return this._config=await Gr(n,r,e,i,s),this._encoder.configure(this._config),this._logger.info(null,"Encoder configured with parameter",this._config),this}encode(e){try{if(this._encoder.state==="closed"){this._logger.warn(null,"encode() called on closed encoder",`frame written: ${this._cnt}`);return}const n=this._shouldBeKeyFrame();this._encoder.encode(e,$r(n,this._config,this._meta.quantizer)),this._cnt+=1}finally{e.close()}}async flush(){if(this._encoder.state==="closed"){this._logger.warn(null,"flush() called on closed encoder");return}return this._encoder.flush()}async finalize(){try{if(this._encoder.state==="closed"){this._logger.warn(null,"finalize() called on closed encoder");return}return this._logger.info(null,"Finalizing encoder"),await this._encoder.flush(),await this._cleanUp()}catch(e){throw et(Y.VIDEO_ENCODE_ERR,e)}}async cancel(){if(this._logger.info(null,"Cancelling encoder"),this._encoder.state==="closed"){this._logger.warn(null,"cancel() called on closed encoder");return}await this._cleanUp()}async destroy(){await this._cleanUp()}_shouldBeKeyFrame(){return this._cnt%this._keyFrameInterval===0}_output(e,n,r){const i=M.fromUS(n.timestamp).as.ms("floor");if(e.state==="closed"){this._logger.warn(i,"Encoder output called after encoder closed");return}const s=new Uint8Array(n.byteLength);n.copyTo(s);const c=Pi(s,[s.buffer]);this._onEncode(c,i,n.type==="key",r)}_reinitEncoder(){this._logger.warn(null,"Reinitializing encoder"),this._subscription.unsubscribe(),this._encoder=this._createEncoder(),this._encoder.configure(this._config),this._cnt=0,this._logger.info(null,"Encoder reconfigured with parameter",this._config),this._subscription=this._getEncoderFlushSubscription()}_error(e,n){const r=Ze(n);switch(n.name){case"QuotaExceededError":if(e!==this._encoder){this._logger.warn(null,"QuotaExceededError, Encoder already reinitialized",r);return}this._logger.warn(null,"QuotaExceededError, Reinitalizing",r),this._reinitEncoder();break;case"OperationError":if(this._config?.hardwareAcceleration==="prefer-hardware"){this._operationErrorCnt+=1,this._operationErrorCnt>=3?(this._logger.warn(null,"OperationError threshold reached, Falling back to software",r),this._config.hardwareAcceleration="prefer-software"):this._logger.warn(null,`OperationError ${this._operationErrorCnt}/3, Retrying with hardware`,r),this._reinitEncoder();return}this._onError(et(Y.ENCODER_OPERATION_ERR,n,r));break;default:this._logger.error(null,"Encoder error",r),this._onError(et(Y.VIDEO_ENCODE_ERR,n,r))}}_createEncoder(){const e=new VideoEncoder({output:(n,r)=>this._output(e,n,r),error:n=>this._error(e,n)});return e.addEventListener("dequeue",()=>{this._encoderObsv$.next(e.encodeQueueSize)}),e}_getEncoderFlushSubscription(){return this._encoderObsv$.asObservable().pipe(sr(e=>this._onQueueSizeChange(e)),Ts(Ss),bs(e=>(this._logger.warn(null,`Encoder stuck, attempt flushing total ${e} frames`,`frame written: ${this._cnt}`,`hardwareAcceleration: ${this._config?.hardwareAcceleration}`),ri(this.flush(),M.fromSec(60).as.ms(),()=>this._onStuck()))),sr(()=>{this._logger.warn(null,`Encoder stuck, attempt flushing complete, frame written: ${this._cnt}`,`encoderQueueSize: ${this._encoder.encodeQueueSize}`)})).subscribe()}async _cleanUp(){this._subscription.unsubscribe(),this._encoder.state==="configured"&&(await this._encoder.flush(),this._encoder.close())}}const Gr=async(t,e,n,r,i)=>{const s=pr(t,e,n),c=i?"prefer-hardware":"prefer-software",d=[...s.map(l=>Fn(l,t,e,n,c)),...s.map(l=>Fn(l,t,e,n,"no-preference"))],u=await Wr(d);return u||Cs(t,e,n,r,i)},$r=(t,e,n)=>{const r={keyFrame:t};return e?.bitrateMode==="quantizer"&&(r.avc={quantizer:t?Math.max(16,n-3):n}),r},Cs=async(t,e,n,r,i)=>{const s=pr(t,e,n),c=i?"prefer-hardware":"prefer-software",d=m=>({codec:m,width:t,height:e,bitrate:r,framerate:n,hardwareAcceleration:c,avc:{format:"avc"}}),u=[...s.map(m=>d(m)),...s.map(m=>({...d(m),hardwareAcceleration:"no-preference"}))],l=await Wr(u);if(!l){const m=`No supported encoder config found, width: ${t}, height: ${e}, fps: ${n}, bitrate: ${r}, hwAccel: ${i}`;throw et(Y.NO_SUPPORTED_CONFIG,m)}return l},Wr=async t=>{for(const e of t)try{if((await VideoEncoder.isConfigSupported(e)).supported)return e}catch{continue}return null};var xs=Object.freeze({__proto__:null,cancel:Is,createEncoderConfig:Gr,createVideoEncodeOptions:$r,destroy:As,encode:Ds,finalize:Rs,flush:Os,init:vs,ready:ws});on(xs);
7//# sourceMappingURL=encoder.worker-BfY5cIgC.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.