UNPKG

@liveryvideo/player

Version:

Livery video player for use in web browsers.

56 lines (54 loc) 679 kB
(function(K,Ft){typeof exports=="object"&&typeof module<"u"?Ft(exports):typeof define=="function"&&define.amd?define(["exports"],Ft):(K=typeof globalThis<"u"?globalThis:K||self,Ft(K.livery={}))})(this,function(K){"use strict";var yi;const Qr=class Qr extends Event{constructor(e,t){super(Qr.type,t),this.config=e}};Qr.type="livery-config-change";let Ft=Qr;const Xr=class Xr extends Event{constructor(e,t){super(Xr.type,t),this.display=e}};Xr.type="livery-display-change";let Dn=Xr;const Yr=class Yr extends Event{constructor(e,t){super(Yr.type,t),this.error=e}};Yr.type="livery-error";let bi=Yr;const Jr=class Jr extends Event{constructor(e,t){super(Jr.type,t),this.features=e}};Jr.type="livery-features-change";let Un=Jr;const es=class es extends Event{constructor(e,t){super(es.type,t),this.fullscreen=e}};es.type="livery-fullscreen-change";let On=es;const ts=class ts extends Event{constructor(e,t){super(ts.type,t),this.mode=e}};ts.type="livery-mode-change";let $n=ts;const is=class is extends Event{constructor(e,t){super(is.type,t),this.phase=e}};is.type="livery-phase-change";let Bn=is;const ns=class ns extends Event{constructor(e,t){super(ns.type,t),this.playbackState=e,this.paused=["ENDED","PAUSED"].includes(e),this.playing=["FAST_FORWARD","PLAYING","REWIND","SLOW_MO"].includes(e),this.stalled=["BUFFERING","SEEKING"].includes(e)}};ns.type="livery-playback-change";let Vn=ns;const rs=class rs extends Event{constructor(e,t){super(rs.type,t),this.qualities=e}};rs.type="livery-qualities-change";let qn=rs;const ss=class ss extends Event{constructor(e,t){super(ss.type,t),this.quality=e}};ss.type="livery-quality-change";let Fn=ss;const os=class os extends Event{constructor(e){super(os.type,e)}};os.type="livery-recovered";let jn=os;const as=class as extends Event{constructor(e,t,i){super(as.type,i),this.volume=e,this.muted=t}};as.type="livery-volume-change";let Bi=as;/** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const zn=globalThis,Ns=zn.ShadowRoot&&(zn.ShadyCSS===void 0||zn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ps=Symbol(),pa=new WeakMap;let fa=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==Ps)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Ns&&e===void 0){const i=t!==void 0&&t.length===1;i&&(e=pa.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&pa.set(t,e))}return e}toString(){return this.cssText}};const Pu=o=>new fa(typeof o=="string"?o:o+"",void 0,Ps),ii=(o,...e)=>{const t=o.length===1?o[0]:e.reduce((i,n,r)=>i+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[r+1],o[0]);return new fa(t,o,Ps)},Lu=(o,e)=>{if(Ns)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const i=document.createElement("style"),n=zn.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=t.cssText,o.appendChild(i)}},ma=Ns?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return Pu(t)})(o):o;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const{is:Mu,defineProperty:Du,getOwnPropertyDescriptor:Uu,getOwnPropertyNames:Ou,getOwnPropertySymbols:$u,getPrototypeOf:Bu}=Object,Gn=globalThis,ga=Gn.trustedTypes,Vu=ga?ga.emptyScript:"",qu=Gn.reactiveElementPolyfillSupport,Vi=(o,e)=>o,Hn={toAttribute(o,e){switch(e){case Boolean:o=o?Vu:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},Ls=(o,e)=>!Mu(o,e),ya={attribute:!0,type:String,converter:Hn,reflect:!1,hasChanged:Ls};Symbol.metadata??=Symbol("metadata"),Gn.litPropertyMetadata??=new WeakMap;let vi=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ya){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),n=this.getPropertyDescriptor(e,i,t);n!==void 0&&Du(this.prototype,e,n)}}static getPropertyDescriptor(e,t,i){const{get:n,set:r}=Uu(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get(){return n?.call(this)},set(s){const c=n?.call(this);r.call(this,s),this.requestUpdate(e,c,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ya}static _$Ei(){if(this.hasOwnProperty(Vi("elementProperties")))return;const e=Bu(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Vi("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Vi("properties"))){const t=this.properties,i=[...Ou(t),...$u(t)];for(const n of i)this.createProperty(n,t[n])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[i,n]of t)this.elementProperties.set(i,n)}this._$Eh=new Map;for(const[t,i]of this.elementProperties){const n=this._$Eu(t,i);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const n of i)t.unshift(ma(n))}else e!==void 0&&t.push(ma(e));return t}static _$Eu(e,t){const i=t.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Lu(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$EC(e,t){const i=this.constructor.elementProperties.get(e),n=this.constructor._$Eu(e,i);if(n!==void 0&&i.reflect===!0){const r=(i.converter?.toAttribute!==void 0?i.converter:Hn).toAttribute(t,i.type);this._$Em=e,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(e,t){const i=this.constructor,n=i._$Eh.get(e);if(n!==void 0&&this._$Em!==n){const r=i.getPropertyOptions(n),s=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:Hn;this._$Em=n,this[n]=s.fromAttribute(t,r.type),this._$Em=null}}requestUpdate(e,t,i){if(e!==void 0){if(i??=this.constructor.getPropertyOptions(e),!(i.hasChanged??Ls)(this[e],t))return;this.P(e,t,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,t,i){this._$AL.has(e)||this._$AL.set(e,t),i.reflect===!0&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,r]of i)r.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(i=>i.hostUpdate?.()),this.update(t)):this._$EU()}catch(i){throw e=!1,this._$EU(),i}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach(t=>this._$EC(t,this[t])),this._$EU()}updated(e){}firstUpdated(e){}};vi.elementStyles=[],vi.shadowRootOptions={mode:"open"},vi[Vi("elementProperties")]=new Map,vi[Vi("finalized")]=new Map,qu?.({ReactiveElement:vi}),(Gn.reactiveElementVersions??=[]).push("2.0.4");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Ms=globalThis,Wn=Ms.trustedTypes,ba=Wn?Wn.createPolicy("lit-html",{createHTML:o=>o}):void 0,Ds="$lit$",Mt=`lit$${Math.random().toFixed(9).slice(2)}$`,Us="?"+Mt,Fu=`<${Us}>`,ni=document,qi=()=>ni.createComment(""),Fi=o=>o===null||typeof o!="object"&&typeof o!="function",Os=Array.isArray,va=o=>Os(o)||typeof o?.[Symbol.iterator]=="function",$s=`[ \f\r]`,ji=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,wa=/-->/g,Sa=/>/g,ri=RegExp(`>|${$s}(?:([^\\s"'>=/]+)(${$s}*=${$s}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ea=/'/g,Ca=/"/g,Ta=/^(?:script|style|textarea|title)$/i,ju=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),yt=ju(1),jt=Symbol.for("lit-noChange"),Xe=Symbol.for("lit-nothing"),Aa=new WeakMap,si=ni.createTreeWalker(ni,129);function Ia(o,e){if(!Os(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return ba!==void 0?ba.createHTML(e):e}const Ra=(o,e)=>{const t=o.length-1,i=[];let n,r=e===2?"<svg>":e===3?"<math>":"",s=ji;for(let c=0;c<t;c++){const a=o[c];let d,l,u=-1,h=0;for(;h<a.length&&(s.lastIndex=h,l=s.exec(a),l!==null);)h=s.lastIndex,s===ji?l[1]==="!--"?s=wa:l[1]!==void 0?s=Sa:l[2]!==void 0?(Ta.test(l[2])&&(n=RegExp("</"+l[2],"g")),s=ri):l[3]!==void 0&&(s=ri):s===ri?l[0]===">"?(s=n??ji,u=-1):l[1]===void 0?u=-2:(u=s.lastIndex-l[2].length,d=l[1],s=l[3]===void 0?ri:l[3]==='"'?Ca:Ea):s===Ca||s===Ea?s=ri:s===wa||s===Sa?s=ji:(s=ri,n=void 0);const p=s===ri&&o[c+1].startsWith("/>")?" ":"";r+=s===ji?a+Fu:u>=0?(i.push(d),a.slice(0,u)+Ds+a.slice(u)+Mt+p):a+Mt+(u===-2?c:p)}return[Ia(o,r+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};let Bs=class ku{constructor({strings:e,_$litType$:t},i){let n;this.parts=[];let r=0,s=0;const c=e.length-1,a=this.parts,[d,l]=Ra(e,t);if(this.el=ku.createElement(d,i),si.currentNode=this.el.content,t===2||t===3){const u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(n=si.nextNode())!==null&&a.length<c;){if(n.nodeType===1){if(n.hasAttributes())for(const u of n.getAttributeNames())if(u.endsWith(Ds)){const h=l[s++],p=n.getAttribute(u).split(Mt),f=/([.?@])?(.*)/.exec(h);a.push({type:1,index:r,name:f[2],strings:p,ctor:f[1]==="."?_a:f[1]==="?"?ka:f[1]==="@"?Na:zi}),n.removeAttribute(u)}else u.startsWith(Mt)&&(a.push({type:6,index:r}),n.removeAttribute(u));if(Ta.test(n.tagName)){const u=n.textContent.split(Mt),h=u.length-1;if(h>0){n.textContent=Wn?Wn.emptyScript:"";for(let p=0;p<h;p++)n.append(u[p],qi()),si.nextNode(),a.push({type:2,index:++r});n.append(u[h],qi())}}}else if(n.nodeType===8)if(n.data===Us)a.push({type:2,index:r});else{let u=-1;for(;(u=n.data.indexOf(Mt,u+1))!==-1;)a.push({type:7,index:r}),u+=Mt.length-1}r++}}static createElement(e,t){const i=ni.createElement("template");return i.innerHTML=e,i}};function oi(o,e,t=o,i){if(e===jt)return e;let n=i!==void 0?t._$Co?.[i]:t._$Cl;const r=Fi(e)?void 0:e._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(o),n._$AT(o,t,i)),i!==void 0?(t._$Co??=[])[i]=n:t._$Cl=n),n!==void 0&&(e=oi(o,n._$AS(o,e.values),n,i)),e}let xa=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:i}=this._$AD,n=(e?.creationScope??ni).importNode(t,!0);si.currentNode=n;let r=si.nextNode(),s=0,c=0,a=i[0];for(;a!==void 0;){if(s===a.index){let d;a.type===2?d=new Zn(r,r.nextSibling,this,e):a.type===1?d=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(d=new Pa(r,this,e)),this._$AV.push(d),a=i[++c]}s!==a?.index&&(r=si.nextNode(),s++)}return si.currentNode=ni,n}p(e){let t=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}},Zn=class Nu{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,n){this.type=2,this._$AH=Xe,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=oi(this,e,t),Fi(e)?e===Xe||e==null||e===""?(this._$AH!==Xe&&this._$AR(),this._$AH=Xe):e!==this._$AH&&e!==jt&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):va(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Xe&&Fi(this._$AH)?this._$AA.nextSibling.data=e:this.T(ni.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:i}=e,n=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Bs.createElement(Ia(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===n)this._$AH.p(t);else{const r=new xa(n,this),s=r.u(this.options);r.p(t),this.T(s),this._$AH=r}}_$AC(e){let t=Aa.get(e.strings);return t===void 0&&Aa.set(e.strings,t=new Bs(e)),t}k(e){Os(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,n=0;for(const r of e)n===t.length?t.push(i=new Nu(this.O(qi()),this.O(qi()),this,this.options)):i=t[n],i._$AI(r),n++;n<t.length&&(this._$AR(i&&i._$AB.nextSibling,n),t.length=n)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}};class zi{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,n,r){this.type=1,this._$AH=Xe,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Xe}_$AI(e,t=this,i,n){const r=this.strings;let s=!1;if(r===void 0)e=oi(this,e,t,0),s=!Fi(e)||e!==this._$AH&&e!==jt,s&&(this._$AH=e);else{const c=e;let a,d;for(e=r[0],a=0;a<r.length-1;a++)d=oi(this,c[i+a],t,a),d===jt&&(d=this._$AH[a]),s||=!Fi(d)||d!==this._$AH[a],d===Xe?e=Xe:e!==Xe&&(e+=(d??"")+r[a+1]),this._$AH[a]=d}s&&!n&&this.j(e)}j(e){e===Xe?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class _a extends zi{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Xe?void 0:e}}let ka=class extends zi{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Xe)}},Na=class extends zi{constructor(e,t,i,n,r){super(e,t,i,n,r),this.type=5}_$AI(e,t=this){if((e=oi(this,e,t,0)??Xe)===jt)return;const i=this._$AH,n=e===Xe&&i!==Xe||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==Xe&&(i===Xe||n);n&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Pa=class{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){oi(this,e)}};const zu={M:Ds,P:Mt,A:Us,C:1,L:Ra,R:xa,D:va,V:oi,I:Zn,H:zi,N:ka,U:Na,B:_a,F:Pa},Gu=Ms.litHtmlPolyfillSupport;Gu?.(Bs,Zn),(Ms.litHtmlVersions??=[]).push("3.2.1");const Hu=(o,e,t)=>{const i=t?.renderBefore??e;let n=i._$litPart$;if(n===void 0){const r=t?.renderBefore??null;i._$litPart$=n=new Zn(e.insertBefore(qi(),r),r,void 0,t??{})}return n._$AI(o),n};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */let bt=class extends vi{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Hu(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return jt}};bt._$litElement$=!0,bt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:bt});const Wu=globalThis.litElementPolyfillSupport;Wu?.({LitElement:bt}),(globalThis.litElementVersions??=[]).push("4.1.1");/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Kn=o=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(o,e)}):customElements.define(o,e)};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const Zu={attribute:!0,type:String,converter:Hn,reflect:!1,hasChanged:Ls},Ku=(o=Zu,e,t)=>{const{kind:i,metadata:n}=t;let r=globalThis.litPropertyMetadata.get(n);if(r===void 0&&globalThis.litPropertyMetadata.set(n,r=new Map),r.set(t.name,o),i==="accessor"){const{name:s}=t;return{set(c){const a=e.get.call(this);e.set.call(this,c),this.requestUpdate(s,a,o)},init(c){return c!==void 0&&this.P(s,void 0,o),c}}}if(i==="setter"){const{name:s}=t;return function(c){const a=this[s];e.call(this,c),this.requestUpdate(s,a,o)}}throw Error("Unsupported decorator location: "+i)};function Ee(o){return(e,t)=>typeof t=="object"?Ku(o,e,t):((i,n,r)=>{const s=n.hasOwnProperty(r);return n.constructor.createProperty(r,s?{...i,wrapped:!0}:i),s?Object.getOwnPropertyDescriptor(n,r):void 0})(o,e,t)}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function ot(o){return Ee({...o,state:!0,attribute:!1})}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const La=(o,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(o,e,t),t);/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function zt(o,e){return(t,i,n)=>{const r=s=>s.renderRoot?.querySelector(o)??null;if(e){const{get:s,set:c}=typeof i=="object"?t:n??(()=>{const a=Symbol();return{get(){return this[a]},set(d){this[a]=d}}})();return La(t,i,{get(){let a=s.call(this);return a===void 0&&(a=r(this),(a!==null||this.hasUpdated)&&c.call(this,a)),a}})}return La(t,i,{get(){return r(this)}})}}function Qn(o){const e=typeof o=="number"?`Timed out after ${o}ms`:o;return new DOMException(e,"TimeoutError")}let Vs=!0;try{const o=new EventTarget,e=new AbortController;e.abort(),o.addEventListener("test",()=>{Vs=!1},{signal:e.signal}),o.dispatchEvent(new Event("test"))}catch{Vs=!1}class Be extends AbortController{constructor(...e){super(),this.promise=new Promise((t,i)=>{this.onAbort(i)}),this.promise.catch(()=>{});for(const t of e){if(!t)continue;const i=()=>this.abort(Be.getAbortError(t));if(t.aborted){i();return}this.eventListener(t,"abort",i)}}get aborted(){return this.signal.aborted}get reason(){return this.signal.reason}static abort(e=Be.createAbortError()){if(AbortSignal.abort)return AbortSignal.abort(e);const t=new Be;return t.abort(e),t.signal}static catchAbortError(e){if(!Be.isAbortError(e))throw e}static createAbortError(e="Aborted"){return new DOMException(e,"AbortError")}static getAbortError(e){if(!e.aborted)throw new Error("Signal is not aborted");return e.reason instanceof Error?e.reason:e.reason===void 0?Be.createAbortError():Be.createAbortError(String(e.reason))}static isAbortError(e){return e instanceof Error&&e.name==="AbortError"}static timeout(e){if(AbortSignal.timeout)return AbortSignal.timeout(e);const t=new Be;return window.setTimeout(()=>{t.abort(Qn(e))},e),t.signal}abort(e=Be.createAbortError()){this.aborted||(super.abort(e),this.reason!==e&&(this.signal.reason=e))}all(e){return this.race(t=>[Promise.all(e(t))])}any(e){return this.race(t=>[Promise.any(e(t))])}call(e){let t,i;return this.race(n=>[new Promise((r,s)=>{t=e(r,s,n),t&&(i=this.onAbort(t))})]).finally(()=>{i?.()})}delay(e){return this.call(t=>{const i=window.setTimeout(t,e);return()=>window.clearTimeout(i)})}eventListener(e,t,i,n={}){if(this.aborted)return()=>{};const r={...n,signal:this.signal};e.addEventListener(t,i,r);const s=()=>e.removeEventListener(t,i,r);if(Vs)return s;const c=this.onAbort(s);return()=>{s(),c()}}interval(e,t,...i){const n=window.setInterval(e,t,...i),r=()=>window.clearInterval(n),s=this.onAbort(r);return()=>{r(),s()}}onAbort(e){const t=()=>e(this.reason);return this.aborted?(t(),()=>{}):(this.signal.addEventListener("abort",t,{once:!0}),()=>{this.signal.removeEventListener("abort",t)})}race(e){if(this.reason)return Promise.reject(this.reason);const t=new Be(this.signal),i=e(t.signal),n=this.promise;return Promise.race([n,...i]).finally(()=>{t.abort(Be.createAbortError("Settled"))})}throwIfAborted(){if(this.signal.throwIfAborted){this.signal.throwIfAborted();return}if(this.reason)throw this.reason}timeout(e,t,...i){const n=window.setTimeout(()=>{s(),e(...i)},t),r=()=>window.clearTimeout(n),s=this.onAbort(r);return()=>{r(),s()}}}function vt(o,e=[],t=!1){if(e.includes(o))return"[circular reference]";if(Array.isArray(o)){const i=e.slice(0);return i.push(o),`[${o.map(r=>vt(r,i,!0)).join(", ")}]`}if(o instanceof Error)return`${o.name}: ${o.message}`;if(typeof o=="object"&&o!==null){const i=e.concat(o);return`{ ${Object.entries(o).map(([r,s])=>`${r}: ${vt(s,i,!0)}`).join(", ")} }`}return typeof o=="function"||typeof o=="symbol"?`[${typeof o}]`:typeof o=="string"?t?`'${o}'`:o:String(o)}function Qu(o=new Date,e=3){const t=o instanceof Date?o:new Date(o),i=t.toTimeString().substring(0,8),n=(t.getMilliseconds()/1e3).toFixed(e).substring(1);return`${i}${n}`}function Oe(o){return o instanceof Error?o:new Error(String(o))}const qs={DEBUG:{consoleMethod:"debug",emoji:"🔸",weight:2},ERROR:{consoleMethod:"error",emoji:"❌",weight:5},INFO:{consoleMethod:"info",emoji:"🔹",weight:3},QUIET:{weight:6},SPAM:{consoleMethod:"debug",emoji:"⬩",weight:1},WARN:{consoleMethod:"warn",emoji:"⚠️",weight:4}},Xu=Object.keys(qs),ut=class ut{constructor(e){const t=ut.nameCountMap.get(e)||0;this.name=e,this.nr=t+1,ut.nameCountMap.set(e,this.nr)}static addLogListener(e){if(ut.logListeners.has(e))throw new Error("listener has already been added");return ut.logListeners.add(e),()=>{ut.logListeners.delete(e)}}static createPrefix(e){const{emoji:t,name:i,nr:n,timestamp:r}=e,s=n===1?"":`#${n}`;return`${r} ${t} [${i}${s}]`}static createStack(e,t){const{stack:i}=e;if(!i)return"Error stack unsupported";const n=i.split(` `);return n[0]===e.toString()&&n.shift(),e.message===""&&n.shift(),n[n.length-1]===""&&n.pop(),n.length>t&&(n.length=t),n.map(r=>r.trim()).join(` `)}static createString(e){const t=[ut.createPrefix(e)],{details:i,error:n,message:r}=e;if(r&&t.push(r),i&&t.push(vt(i)),n){const s=ut.createStack(n,3).split(` `).map(c=>` ${c}`).join(` `);t.push(`${n.toString()} ${s}`)}return t.join(" ")}static isLevelName(e){return Xu.includes(e)}assert(e,t,i){if(!e){const n=new Error(t);throw this.log("ERROR",{message:t,details:i,error:n}),n}}debug(e,t){this.log("DEBUG",{message:e,details:t})}error(e,t,i=new Error("Undefined error")){if(e instanceof Error){this.log("ERROR",{details:t,error:e});return}this.log("ERROR",{message:e,details:t,error:i})}handleError(){return e=>this.error(Oe(e))}handleWarn(){return e=>this.warn(Oe(e))}info(e,t){this.log("INFO",{message:e,details:t})}log(e,{details:t,error:i,message:n}){if(e==="QUIET")throw new Error("Can not log at level QUIET");const{options:r}=ut,s=qs[e],c=r.level?s.weight>=qs[r.level].weight:!1,a={details:t,emoji:s.emoji,enabled:c,error:i,level:e,message:n,name:this.name,nr:this.nr,timestamp:Qu()};for(const d of ut.logListeners)d(a);if(c&&r.console){const d=[ut.createPrefix(a),n,t,i].filter(l=>l!==void 0);console[s.consoleMethod](...d)}}spam(e,t){this.log("SPAM",{message:e,details:t})}warn(e,t,i=new Error("Undefined error")){if(e instanceof Error){this.log("WARN",{error:e});return}this.log("WARN",{message:e,details:t,error:i})}};ut.options={console:!0,level:"INFO"},ut.logListeners=new Set,ut.nameCountMap=new Map;let Ae=ut;var Yu=Object.defineProperty,Ju=Object.getOwnPropertyDescriptor,ht=(o,e,t,i)=>{for(var n=i>1?void 0:i?Ju(e,t):e,r=o.length-1,s;r>=0;r--)(s=o[r])&&(n=(i?s(e,t,n):s(n))||n);return i&&n&&Yu(e,t,n),n};K.LiveryBufferGraph=class extends bt{constructor(){super(...arguments),this.audioColor=null,this.backgroundColor=null,this.bubbles=!1,this.bufferColor=null,this.decodedColor=null,this.droppedColor=null,this.latencyColor=null,this.maxRows=60,this.player=null,this.textColor=null,this.updateInterval=500,this.videoColor=null,this.log=new Ae("livery-buffer-graph")}get eventInit(){return{bubbles:this.bubbles,composed:this.bubbles}}connectedCallback(){super.connectedCallback(),this.onStateChange()}disconnectedCallback(){super.disconnectedCallback(),this.onStateChange()}render(){return yt`<div id="container"></div>`}updated(){this.onStateChange(!0)}addRow(){const{chart:e,rows:t}=this.active;t.push(this.createRow());const i=this.maxRows*this.updateInterval,n=Date.now(),r=t.findIndex(({date:c})=>n-c<i);r>2&&t.splice(0,r-2);const s=(c,a)=>t.map(d=>({name:String(d.date),value:[d.date,a?a(d[c]):d[c]]}));e.setOption({series:[{data:s("audioBuffer")},{data:s("videoBuffer")},{data:s("latency")},{data:s("decodedFrames",c=>Math.max(0,c))},{data:s("droppedFrames",c=>Math.max(0,c))}],xAxis:{min:n-i}},!1)}createChart(){const e=this.container,t=window.echarts.init(e),i=new ResizeObserver(()=>t.resize());return i.observe(e),t.setOption({animation:!1,grid:{backgroundColor:this.backgroundColor??"transparent"},legend:{show:!0,textStyle:{align:"",color:this.textColor??"#eee"},width:"75%"},series:[{itemStyle:{color:this.audioColor??this.bufferColor??"#0b8"},name:"Audio",symbol:"none",type:"line"},{itemStyle:{color:this.videoColor??this.bufferColor??"#00bfff"},name:"Video",symbol:"none",type:"line"},{itemStyle:{color:this.latencyColor??"#ffa500"},name:"Latency",symbol:"none",type:"line"},{itemStyle:{color:this.decodedColor??"#f6c2f3"},lineStyle:{opacity:.5},name:"Decoded",showSymbol:!1,symbol:"triangle",type:"line",yAxisIndex:1},{itemStyle:{color:this.droppedColor??"#fc1c1c"},lineStyle:{opacity:.5},name:"Dropped",showSymbol:!1,symbol:"triangle",type:"line",yAxisIndex:1}],xAxis:{axisLabel:{rotate:30},axisLine:{lineStyle:{color:this.textColor??"#eee"}},type:"time"},yAxis:[{axisLine:{lineStyle:{color:this.textColor??"#eee"}},max:({max:n})=>Math.ceil((n+.01)*10)/10,minInterval:.1,min:({min:n})=>Math.trunc((n-.01)*10)/10,name:"● Seconds",type:"value"},{axisLine:{lineStyle:{color:this.textColor??"#eee"}},name:"▲ FPS",splitLine:{lineStyle:{opacity:.5}},type:"value"}]}),{chart:t,resizeObserver:i}}createRow(){const e=this.active,{lastDecoded:t,lastDropped:i,lastTime:n,player:{engine:r}}=e,s=Date.now();if(!r)return{audioBuffer:Number.NaN,date:s,decodedFrames:Number.NaN,droppedFrames:Number.NaN,latency:Number.NaN,videoBuffer:Number.NaN};const{audioBuffer:c,buffer:a,decodedFrames:d,droppedFrames:l,latency:u,playing:h,videoBuffer:p}=r,f=(s-n)/1e3;return e.lastTime=s,e.lastDecoded=d,e.lastDropped=l,{audioBuffer:Number.isNaN(c)?a:c,date:s,decodedFrames:(d-t)/f||Number.NaN,droppedFrames:(l-i)/f||Number.NaN,latency:h?u:Number.NaN,videoBuffer:Number.isNaN(p)?a:p}}handleEngine(e){const t=this.active;if(window.clearInterval(t.intervalId),t.intervalId=Number.NaN,t.lastDecoded=Number.NaN,t.lastDropped=Number.NaN,t.lastTime=Number.NaN,!e){this.addRow();return}e.onProperty("paused",i=>{window.clearInterval(t.intervalId),t.intervalId=Number.NaN,this.addRow(),!i&&(t.intervalId=window.setInterval(()=>this.addRow(),this.updateInterval))})}loadScript(){if(!!document.getElementById(K.LiveryBufferGraph.scriptId))return;this.log.debug("loadScript");const t=document.createElement("script");t.id=K.LiveryBufferGraph.scriptId,t.onload=()=>this.onStateChange(),t.onerror=()=>this.onError(new Error(`Error loading script: ${t.src}`)),t.src="https://cdn.jsdelivr.net/npm/echarts@5.5.0/dist/echarts.min.js",document.head.appendChild(t)}onError(e){const t=Oe(e);this.log.error(t),this.dispatchEvent(new bi(t,this.eventInit))}onStateChange(e=!1){if(!window.echarts){this.loadScript();return}this.isConnected?(e&&this.stop(),this.start()):this.stop()}start(){if(this.active){this.log.debug("start(): already active");return}const e=this.player??document.querySelector("livery-player");if(!e){this.log.debug("start(): wait for player reference to be set");return}this.log.debug("start");const t=new Be,{chart:i,resizeObserver:n}=this.createChart();this.active={abortable:t,chart:i,intervalId:Number.NaN,lastDecoded:Number.NaN,lastDropped:Number.NaN,lastTime:Number.NaN,player:e,resizeObserver:n,rows:[]},this.handleEngine(e.engine),t.eventListener(e,"livery-engine-change",({engine:r})=>this.handleEngine(r))}stop(){if(!this.active)return;this.log.debug("stop");const{abortable:e,chart:t,intervalId:i,resizeObserver:n}=this.active;e.abort(),window.clearInterval(i),t.dispose(),n.disconnect(),this.active=void 0}},K.LiveryBufferGraph.styles=ii` :host { display: block; } :host([hidden]) { display: none; } #container { height: 300px; } `,K.LiveryBufferGraph.scriptId="livery-buffer-graph-loader",ht([Ee({reflect:!0,type:String})],K.LiveryBufferGraph.prototype,"audioColor",2),ht([Ee({reflect:!0,type:String})],K.LiveryBufferGraph.prototype,"backgroundColor",2),ht([Ee({reflect:!0,type:Boolean})],K.LiveryBufferGraph.prototype,"bubbles",2),ht([Ee({reflect:!0,type:String})],K.LiveryBufferGraph.prototype,"bufferColor",2),ht([Ee({reflect:!0,type:String})],K.LiveryBufferGraph.prototype,"decodedColor",2),ht([Ee({reflect:!0,type:String})],K.LiveryBufferGraph.prototype,"droppedColor",2),ht([Ee({reflect:!0,type:String})],K.LiveryBufferGraph.prototype,"latencyColor",2),ht([Ee({reflect:!0,type:Number})],K.LiveryBufferGraph.prototype,"maxRows",2),ht([Ee({type:Object})],K.LiveryBufferGraph.prototype,"player",2),ht([Ee({reflect:!0,type:String})],K.LiveryBufferGraph.prototype,"textColor",2),ht([Ee({reflect:!0,type:Number})],K.LiveryBufferGraph.prototype,"updateInterval",2),ht([Ee({reflect:!0,type:String})],K.LiveryBufferGraph.prototype,"videoColor",2),ht([zt("#container")],K.LiveryBufferGraph.prototype,"container",2),K.LiveryBufferGraph=ht([Kn("livery-buffer-graph")],K.LiveryBufferGraph);var el="1.0.37",Xn="",Ma="?",Fs="function",js="undefined",zs="object",Yn="string",Da="major",W="model",ee="name",j="type",Z="vendor",se="version",wt="architecture",Gi="console",ke="mobile",Ne="tablet",gt="smarttv",wi="wearable",Gs="embedded",Hs=500,Jn="Amazon",Hi="Apple",Ua="ASUS",Oa="BlackBerry",ai="Browser",er="Chrome",tl="Edge",tr="Firefox",ir="Google",$a="Huawei",Ws="LG",Zs="Microsoft",Ba="Motorola",nr="Opera",rr="Samsung",Va="Sharp",sr="Sony",Ks="Xiaomi",Qs="Zebra",qa="Facebook",Fa="Chromium OS",ja="Mac OS",il=function(o,e){var t={};for(var i in o)e[i]&&e[i].length%2===0?t[i]=e[i].concat(o[i]):t[i]=o[i];return t},or=function(o){for(var e={},t=0;t<o.length;t++)e[o[t].toUpperCase()]=o[t];return e},za=function(o,e){return typeof o===Yn?Wi(e).indexOf(Wi(o))!==-1:!1},Wi=function(o){return o.toLowerCase()},nl=function(o){return typeof o===Yn?o.replace(/[^\d\.]/g,Xn).split(".")[0]:void 0},Xs=function(o,e){if(typeof o===Yn)return o=o.replace(/^\s\s*/,Xn),typeof e===js?o:o.substring(0,Hs)},Zi=function(o,e){for(var t=0,i,n,r,s,c,a;t<e.length&&!c;){var d=e[t],l=e[t+1];for(i=n=0;i<d.length&&!c&&d[i];)if(c=d[i++].exec(o),c)for(r=0;r<l.length;r++)a=c[++n],s=l[r],typeof s===zs&&s.length>0?s.length===2?typeof s[1]==Fs?this[s[0]]=s[1].call(this,a):this[s[0]]=s[1]:s.length===3?typeof s[1]===Fs&&!(s[1].exec&&s[1].test)?this[s[0]]=a?s[1].call(this,a,s[2]):void 0:this[s[0]]=a?a.replace(s[1],s[2]):void 0:s.length===4&&(this[s[0]]=a?s[3].call(this,a.replace(s[1],s[2])):void 0):this[s]=a||void 0;t+=2}},Ys=function(o,e){for(var t in e)if(typeof e[t]===zs&&e[t].length>0){for(var i=0;i<e[t].length;i++)if(za(e[t][i],o))return t===Ma?void 0:t}else if(za(e[t],o))return t===Ma?void 0:t;return o},rl={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Ga={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Ha={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[se,[ee,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[se,[ee,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[ee,se],[/opios[\/ ]+([\w\.]+)/i],[se,[ee,nr+" Mini"]],[/\bopr\/([\w\.]+)/i],[se,[ee,nr]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[se,[ee,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[ee,se],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[se,[ee,"UC"+ai]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[se,[ee,"WeChat"]],[/konqueror\/([\w\.]+)/i],[se,[ee,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[se,[ee,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[se,[ee,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[se,[ee,"Smart Lenovo "+ai]],[/(avast|avg)\/([\w\.]+)/i],[[ee,/(.+)/,"$1 Secure "+ai],se],[/\bfocus\/([\w\.]+)/i],[se,[ee,tr+" Focus"]],[/\bopt\/([\w\.]+)/i],[se,[ee,nr+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[se,[ee,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[se,[ee,"Dolphin"]],[/coast\/([\w\.]+)/i],[se,[ee,nr+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[se,[ee,"MIUI "+ai]],[/fxios\/([-\w\.]+)/i],[se,[ee,tr]],[/\bqihu|(qi?ho?o?|360)browser/i],[[ee,"360 "+ai]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[ee,/(.+)/,"$1 "+ai],se],[/samsungbrowser\/([\w\.]+)/i],[se,[ee,rr+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[ee,/_/g," "],se],[/metasr[\/ ]?([\d\.]+)/i],[se,[ee,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[ee,"Sogou Mobile"],se],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[ee,se],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[ee],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[ee,qa],se],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[ee,se],[/\bgsa\/([\w\.]+) .*safari\//i],[se,[ee,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[se,[ee,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[se,[ee,er+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[ee,er+" WebView"],se],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[se,[ee,"Android "+ai]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[ee,se],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[se,[ee,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[se,ee],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[ee,[se,Ys,rl]],[/(webkit|khtml)\/([\w\.]+)/i],[ee,se],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[ee,"Netscape"],se],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[se,[ee,tr+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[ee,se],[/(cobalt)\/([\w\.]+)/i],[ee,[se,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[wt,"amd64"]],[/(ia32(?=;))/i],[[wt,Wi]],[/((?:i[346]|x)86)[;\)]/i],[[wt,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[wt,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[wt,"armhf"]],[/windows (ce|mobile); ppc;/i],[[wt,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[wt,/ower/,Xn,Wi]],[/(sun4\w)[;\)]/i],[[wt,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[wt,Wi]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[W,[Z,rr],[j,Ne]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[W,[Z,rr],[j,ke]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[W,[Z,Hi],[j,ke]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[W,[Z,Hi],[j,Ne]],[/(macintosh);/i],[W,[Z,Hi]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[W,[Z,Va],[j,ke]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[W,[Z,$a],[j,Ne]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[W,[Z,$a],[j,ke]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[W,/_/g," "],[Z,Ks],[j,ke]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[W,/_/g," "],[Z,Ks],[j,Ne]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[W,[Z,"OPPO"],[j,ke]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[W,[Z,"Vivo"],[j,ke]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[W,[Z,"Realme"],[j,ke]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[W,[Z,Ba],[j,ke]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[W,[Z,Ba],[j,Ne]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[W,[Z,Ws],[j,Ne]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[W,[Z,Ws],[j,ke]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[W,[Z,"Lenovo"],[j,Ne]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[W,/_/g," "],[Z,"Nokia"],[j,ke]],[/(pixel c)\b/i],[W,[Z,ir],[j,Ne]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[W,[Z,ir],[j,ke]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[W,[Z,sr],[j,ke]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[W,"Xperia Tablet"],[Z,sr],[j,Ne]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[W,[Z,"OnePlus"],[j,ke]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[W,[Z,Jn],[j,Ne]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[W,/(.+)/g,"Fire Phone $1"],[Z,Jn],[j,ke]],[/(playbook);[-\w\),; ]+(rim)/i],[W,Z,[j,Ne]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[W,[Z,Oa],[j,ke]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[W,[Z,Ua],[j,Ne]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[W,[Z,Ua],[j,ke]],[/(nexus 9)/i],[W,[Z,"HTC"],[j,Ne]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[Z,[W,/_/g," "],[j,ke]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[W,[Z,"Acer"],[j,Ne]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[W,[Z,"Meizu"],[j,ke]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[W,[Z,"Ulefone"],[j,ke]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[Z,W,[j,ke]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[Z,W,[j,Ne]],[/(surface duo)/i],[W,[Z,Zs],[j,Ne]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[W,[Z,"Fairphone"],[j,ke]],[/(u304aa)/i],[W,[Z,"AT&T"],[j,ke]],[/\bsie-(\w*)/i],[W,[Z,"Siemens"],[j,ke]],[/\b(rct\w+) b/i],[W,[Z,"RCA"],[j,Ne]],[/\b(venue[\d ]{2,7}) b/i],[W,[Z,"Dell"],[j,Ne]],[/\b(q(?:mv|ta)\w+) b/i],[W,[Z,"Verizon"],[j,Ne]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[W,[Z,"Barnes & Noble"],[j,Ne]],[/\b(tm\d{3}\w+) b/i],[W,[Z,"NuVision"],[j,Ne]],[/\b(k88) b/i],[W,[Z,"ZTE"],[j,Ne]],[/\b(nx\d{3}j) b/i],[W,[Z,"ZTE"],[j,ke]],[/\b(gen\d{3}) b.+49h/i],[W,[Z,"Swiss"],[j,ke]],[/\b(zur\d{3}) b/i],[W,[Z,"Swiss"],[j,Ne]],[/\b((zeki)?tb.*\b) b/i],[W,[Z,"Zeki"],[j,Ne]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[Z,"Dragon Touch"],W,[j,Ne]],[/\b(ns-?\w{0,9}) b/i],[W,[Z,"Insignia"],[j,Ne]],[/\b((nxa|next)-?\w{0,9}) b/i],[W,[Z,"NextBook"],[j,Ne]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[Z,"Voice"],W,[j,ke]],[/\b(lvtel\-)?(v1[12]) b/i],[[Z,"LvTel"],W,[j,ke]],[/\b(ph-1) /i],[W,[Z,"Essential"],[j,ke]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[W,[Z,"Envizen"],[j,Ne]],[/\b(trio[-\w\. ]+) b/i],[W,[Z,"MachSpeed"],[j,Ne]],[/\btu_(1491) b/i],[W,[Z,"Rotor"],[j,Ne]],[/(shield[\w ]+) b/i],[W,[Z,"Nvidia"],[j,Ne]],[/(sprint) (\w+)/i],[Z,W,[j,ke]],[/(kin\.[onetw]{3})/i],[[W,/\./g," "],[Z,Zs],[j,ke]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[W,[Z,Qs],[j,Ne]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[W,[Z,Qs],[j,ke]],[/smart-tv.+(samsung)/i],[Z,[j,gt]],[/hbbtv.+maple;(\d+)/i],[[W,/^/,"SmartTV"],[Z,rr],[j,gt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[Z,Ws],[j,gt]],[/(apple) ?tv/i],[Z,[W,Hi+" TV"],[j,gt]],[/crkey/i],[[W,er+"cast"],[Z,ir],[j,gt]],[/droid.+aft(\w+)( bui|\))/i],[W,[Z,Jn],[j,gt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[W,[Z,Va],[j,gt]],[/(bravia[\w ]+)( bui|\))/i],[W,[Z,sr],[j,gt]],[/(mitv-\w{5}) bui/i],[W,[Z,Ks],[j,gt]],[/Hbbtv.*(technisat) (.*);/i],[Z,W,[j,gt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[Z,Xs],[W,Xs],[j,gt]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[j,gt]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[Z,W,[j,Gi]],[/droid.+; (shield) bui/i],[W,[Z,"Nvidia"],[j,Gi]],[/(playstation [345portablevi]+)/i],[W,[Z,sr],[j,Gi]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[W,[Z,Zs],[j,Gi]],[/((pebble))app/i],[Z,W,[j,wi]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[W,[Z,Hi],[j,wi]],[/droid.+; (glass) \d/i],[W,[Z,ir],[j,wi]],[/droid.+; (wt63?0{2,3})\)/i],[W,[Z,Qs],[j,wi]],[/(quest( 2| pro)?)/i],[W,[Z,qa],[j,wi]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[Z,[j,Gs]],[/(aeobc)\b/i],[W,[Z,Jn],[j,Gs]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[W,[j,ke]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[W,[j,Ne]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[j,Ne]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[j,ke]],[/(android[-\w\. ]{0,9});.+buil/i],[W,[Z,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[se,[ee,tl+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[se,[ee,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[ee,se],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[se,ee]],os:[[/microsoft (windows) (vista|xp)/i],[ee,se],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[ee,[se,Ys,Ga]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[se,Ys,Ga],[ee,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[se,/_/g,"."],[ee,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[ee,ja],[se,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[se,ee],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[ee,se],[/\(bb(10);/i],[se,[ee,Oa]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[se,[ee,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[se,[ee,tr+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[se,[ee,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[se,[ee,"watchOS"]],[/crkey\/([\d\.]+)/i],[se,[ee,er+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[ee,Fa],se],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[ee,se],[/(sunos) ?([\w\.\d]*)/i],[[ee,"Solaris"],se],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[ee,se]]};function Dt(o,e){if(typeof o===zs&&(e=o,o=void 0),!(this instanceof Dt))return new Dt(o,e).getResult();var t=typeof window!==js&&window.navigator?window.navigator:void 0,i=o||(t&&t.userAgent?t.userAgent:Xn),n=t&&t.userAgentData?t.userAgentData:void 0,r=e?il(Ha,e):Ha,s=t&&t.userAgent==i;return this.getBrowser=function(){var c={};return c[ee]=void 0,c[se]=void 0,Zi.call(c,i,r.browser),c[Da]=nl(c[se]),s&&t&&t.brave&&typeof t.brave.isBrave==Fs&&(c[ee]="Brave"),c},this.getCPU=function(){var c={};return c[wt]=void 0,Zi.call(c,i,r.cpu),c},this.getDevice=function(){var c={};return c[Z]=void 0,c[W]=void 0,c[j]=void 0,Zi.call(c,i,r.device),s&&!c[j]&&n&&n.mobile&&(c[j]=ke),s&&c[W]=="Macintosh"&&t&&typeof t.standalone!==js&&t.maxTouchPoints&&t.maxTouchPoints>2&&(c[W]="iPad",c[j]=Ne),c},this.getEngine=function(){var c={};return c[ee]=void 0,c[se]=void 0,Zi.call(c,i,r.engine),c},this.getOS=function(){var c={};return c[ee]=void 0,c[se]=void 0,Zi.call(c,i,r.os),s&&!c[ee]&&n&&n.platform!="Unknown"&&(c[ee]=n.platform.replace(/chrome os/i,Fa).replace(/macos/i,ja)),c},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(c){return i=typeof c===Yn&&c.length>Hs?Xs(c,Hs):c,this},this.setUA(i),this}Dt.VERSION=el,Dt.BROWSER=or([ee,se,Da]),Dt.CPU=or([wt]),Dt.DEVICE=or([W,Z,j,Gi,ke,gt,Ne,wi,Gs]),Dt.ENGINE=Dt.OS=or([ee,se]);const Si=Dt(),Ei=Si.browser,Wa=Si.cpu,Ki=Si.device,ar=Si.engine,Gt=Si.os;Gt.name==="iOS"&&Ki.model==="iPad"&&(Gt.name="iPadOS");const sl=Si.ua,Qi=ar.name==="WebKit",Za=Qi&&Gt.name==="iOS"||Gt.name==="iPadOS",Js="__JsonPlus__",eo=`${Js}Number__`,to=`${Js}Date__`,ol=/^\d+$/;function al(o){return JSON.parse(o,ll)}function cl(o){return ci(o,ul)}function ci(o,e,t=new Set){const i=e?e(o):o;if(t.has(i))throw new TypeError("JSON does not support objects with circular references");if(typeof i=="object"){if(i===null)return"null";if(i.constructor===Object){const n=Object.getOwnPropertySymbols(i);if(n.length>0)throw new TypeError(`JSON does not support objects with Symbol keys: ${n.join(", ")}`);const r=Object.getOwnPropertyDescriptors(i);for(const[s,c]of Object.entries(r)){if(!c.configurable)throw new TypeError(`JSON does not support objects with properties that are not configurable: ${s}`);if(!c.enumerable)throw new TypeError(`JSON does not support objects with properties that are not enumerable: ${s}`);if(!c.writable)throw new TypeError(`JSON does not support objects with properties that are not writable: ${s}`);if(c.get)throw new TypeError(`JSON does not support objects with properties with a get function: ${s}`);if(c.set)throw new TypeError(`JSON does not support objects with properties with a set function: ${s}`)}return`{${Object.entries(i).map(([s,c])=>`"${s}":${ci(c,e,new Set([i,...t]))}`).join(",")}}`}if(Array.isArray(i)&&i.constructor===Array){const n=Object.getOwnPropertyNames(i).filter(s=>!(s==="length"||ol.test(s))),r=Object.getOwnPropertySymbols(i);if(n.length>0||r.length>0)throw new TypeError(`JSON does not support arrays with object properties: ${[...n,...r].join(", ")}`);return`[${i.map(s=>ci(s,e,new Set