const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/index.8mekoGvv.js","js/index.7NVGf-uW.js","js/vue-vendor.DVE4_oYi.js","js/index.C0A-fSIi.js","js/el-popover.DyQ8KgEv.js","js/isUndefined.B110pO0u.js","js/constants.Dnj8X3EN.js","css/el-popover.B4a1Qcxe.css","js/utils-vendor.CIcSScHC.js","css/index.NoTejND6.css","js/el-input.J8nmrGzR.js","js/el-button.BP5kz7gS.js","js/icons.DetuxF1o.js","css/el-button.DITZ5HsB.css","js/numbers.DrV_xewr.js","css/el-input.Dq3cbatN.css","js/index.B-Wio-Wo.js","js/i18n.B1Fyxn_q.js","css/index.Bsy-L2iq.css","js/index.BWe170ZJ.js","css/index.HhkgHPVB.css","js/index.icoCqyDJ.js","css/index.BuWG4S8t.css","js/index.B_J5D0z7.js","css/index.DJUmxj5h.css","js/client.DP740qX8.js","js/createDialogManager.Dd8xDY8r.js","js/index.B4UQrYHb.js","css/index.CvshNZyX.css","js/goodsType.D-3Y_qG-.js","js/vipGuideBenefits.CY37rG8D.js","js/userVip.B0hJoUAm.js","js/index.CCDWSiTy.js","css/index.FsitbDc4.css","js/other-vendor.3_yQbpgB.js","css/index.EWc2Wv8u.css","js/index.CEGOAjGU.js","css/index.DWKqY4uP.css","js/index.D0mZUFFK.js","js/legalDocumentDetail.Dhj7bwoA.js","js/usePrerender.CnbaAsVx.js","css/legalDocumentDetail.QcPsG1Zl.css","js/ipAccess.DShdFPG5.js","css/ipAccess.Cy5TK5yf.css","js/google-callback.DsZqycjz.js","css/google-callback.D3N_Dd-_.css","js/email-callback.7AuUyISD.js","css/email-callback.CseXyUUZ.css","js/index.ZFhGiS_O.js","js/index.2pJFBKhm.js","css/index.bkSUh3iC.css","js/el-collapse-item.CX9aNTXV.js","css/el-collapse-item.BvmEG8Qn.css","js/el-tab-pane.BFnOW7gD.js","js/useInfiniteList.a9NEy6ug.js","js/index.C_PEz9Bc.js","css/index.EByGFt2k.css","js/mediaType.DkM-mkSQ.js","js/index.BP4TUiBZ.js","css/index.BGBf1xwX.css","js/useCharacterNavigation.BQH-QHpx.js","css/el-tab-pane.BTXpjOlg.css","js/CharacterTabsEnum.DmJXKBfx.js","css/CharacterTabsEnum.2WnJPCQb.css","js/chatroom.BeO_-NcD.js","js/chatroom-directory.2cf9X2xI.js","css/index.BxWQtVd4.css","js/index.DJF5WL3V.js","css/index.Dp4Bz5hG.css","js/index.FUUxylIo.js","css/index.DQQtMDLg.css","js/entry-loading.D1ltOKph.js","js/index.4NqJL3gk.js","js/room.03KDGrPz.js","js/index.vue_vue_type_style_index_1_lang.DBiKHcq7.js","js/throttle.BuSs4eR3.js","css/index.uksxefPe.css","js/GiftMorePanel.mHOpc8hq.js","css/GiftMorePanel.WCXz2ilO.css","css/room.B984hMYK.css","js/index.CkM6pEjR.js","js/index.BEe6sAEb.js","js/index.D9bYfq_7.js","css/index.DTlQt4NP.css","js/index.Ba0DlHc1.js","css/index.DIib4oUo.css","css/index.CRg1zyxD.css","js/index.B6DXMs7N.js","css/index.BT5gI2SR.css","js/index.DaUHIvjE.js","js/useBotInteract.0wpnpbDQ.js","css/useBotInteract.DPRWLIZl.css","css/index.BxJOz2HA.css","js/character-profile.CLPJI-1t.js","js/character-data.JB1AWySC.js","css/character-profile.CML3H6pi.css","js/index.ohNCA8gy.js","js/useChatPolling.D0poIpCg.js","css/useChatPolling.CHO8bZCM.css","css/index.C8-Fdwby.css","js/index.DFf39TXi.js","js/debugLogger.BMwpNQb1.js","css/index.Df5rSanO.css","js/index.CYWq1F5F.js","css/index.FK6PRj92.css","js/index.CLXt5-0F.js","js/index.hFUPYlMV.js","css/index.DxJZjc0u.css","css/index.kIhzZup_.css","js/index.CWZzSClY.js","css/index.Bdw1rPiZ.css","js/index.DGedZSlh.js","css/index.B5VTgdpl.css","js/index.DtZCm0tj.js","css/index.C7cUyRH_.css","js/index.Dm2sSBFZ.js","css/index.DGxTlUta.css","js/index.DeoAunCS.js","css/index.NTwnmC1K.css","js/index.C1whVzB0.js","css/index.BYj31Ug-.css","js/legalInformation.DizP9Wt4.js","css/legalInformation.Cz2Ab1w-.css","js/m3u8-player.8uhLESnK.js","css/m3u8-player.DTlfLfA4.css","js/401.H1V_DBuU.js","css/401.B-Fuycdd.css","js/404.DPclcW0y.js","css/404.B5lyJpXw.css"])))=>i.map(i=>d[i]);
var e=Object.defineProperty,t=(t,i,r)=>((t,i,r)=>i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[i]=r)(t,"symbol"!=typeof i?i+"":i,r);import{G as i,ao as r,S as a,az as n,aC as s,aB as o,_ as l,a0 as c,X as d,a9 as u,x as h,M as p,H as m,J as f,D as g,aA as y,y as v,a2 as b,a8 as w,ah as S,ag as k,am as T,a1 as E,B as A,L as C,a7 as I,g as P,d as _,I as R,N as x,u as L,a5 as D,l as M,ac as O,R as N,a6 as F,r as U,aD as B,W as z,U as j,q as $,ai as G,k as q,b as H,A as V,i as W,j as K,ae as Y,at as J,aE as X,o as Q,ay as Z,T as ee,af as te,F as ie,aG as re,O as ae,aa as ne,n as se,s as oe,v as le,m as ce,a3 as de,ab as ue,aw as he,ax as pe,ad as me,h as fe}from"./vue-vendor.DVE4_oYi.js";import{k as ge,g as ye,c as ve,e as be,a as we,b as Se,d as ke,l as Te}from"./utils-vendor.CIcSScHC.js";import{c as Ee,u as Ae}from"./i18n.B1Fyxn_q.js";import{v as Ce,u as Ie,a9 as Pe,x as _e,a5 as Re,w as xe,aB as Le,aq as De,aj as Me,aA as Oe,ap as Ne,ab as Fe,ag as Ue,ao as Be,U as ze,J as je,ax as $e,t as Ge,n as qe,k as He,O as Ve,as as We,N as Ke,a2 as Ye,F as Je,y as Xe,B as Qe,H as Ze,p as et,ai as tt,a as it,L as rt,c as at,D as nt,b as st,A as ot,s as lt,z as ct,S as dt,ad as ut,ar as ht,a4 as pt,af as mt,_ as ft,ay as gt,M as yt,g as vt,a0 as bt,I as wt,aw as St,aH as kt,o as Tt,Z as Et,X as At,C as Ct,aG as It,a6 as Pt,at as _t,aK as Rt,av as xt,aa as Lt,aD as Dt,a7 as Mt,ac as Ot,T as Nt,a8 as Ft,aC as Ut,R as Bt,ah as zt,au as jt,P as $t,am as Gt,ae as qt,Q as Ht,i as Vt,Y as Wt,h as Kt,aF as Yt,V as Jt,e as Xt,d as Qt,aE as Zt,r as ei,G as ti,E as ii,W as ri,$ as ai,q as ni}from"./icons.DetuxF1o.js";import{N as si}from"./other-vendor.3_yQbpgB.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const i of e)if("childList"===i.type)for(const e of i.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const oi=new Set(["title","titleTemplate","script","style","noscript"]),li=new Set(["base","meta","link","style","script","noscript"]),ci=new Set(["title","titleTemplate","templateParams","base","htmlAttrs","bodyAttrs","meta","link","style","script","noscript"]),di=new Set(["base","title","titleTemplate","bodyAttrs","htmlAttrs","templateParams"]),ui=new Set(["tagPosition","tagPriority","tagDuplicateStrategy","children","innerHTML","textContent","processTemplateParams"]),hi="undefined"!=typeof window;function pi(e){let t=9;for(let i=0;i<e.length;)t=Math.imul(t^e.charCodeAt(i++),9**9);return(65536+(t^t>>>9)).toString(16).substring(1,8).toLowerCase()}function mi(e){if(e._h)return e._h;if(e._d)return pi(e._d);let t=`${e.tag}:${e.textContent||e.innerHTML||""}:`;for(const i in e.props)t+=`${i}:${String(e.props[i])},`;return pi(t)}function fi(e,t,i,r){const a=r||vi("object"!=typeof t||"function"==typeof t||t instanceof Promise?{["script"===e||"noscript"===e||"style"===e?"innerHTML":"textContent"]:t}:{...t},"templateParams"===e||"titleTemplate"===e);if(a instanceof Promise)return a.then(r=>fi(e,t,i,r));const n={tag:e,props:a};for(const s of ui){const e=void 0!==n.props[s]?n.props[s]:i[s];void 0!==e&&(("innerHTML"!==s&&"textContent"!==s&&"children"!==s||oi.has(n.tag))&&(n["children"===s?"innerHTML":s]=e),delete n.props[s])}return n.props.body&&(n.tagPosition="bodyClose",delete n.props.body),"script"===n.tag&&"object"==typeof n.innerHTML&&(n.innerHTML=JSON.stringify(n.innerHTML),n.props.type=n.props.type||"application/json"),Array.isArray(n.props.content)?n.props.content.map(e=>({...n,props:{...n.props,content:e}})):n}function gi(e,t){var i;const r="class"===e?" ":";";return t&&"object"==typeof t&&!Array.isArray(t)&&(t=Object.entries(t).filter(([,e])=>e).map(([t,i])=>"style"===e?`${t}:${i}`:t)),null==(i=String(Array.isArray(t)?t.join(r):t))?void 0:i.split(r).filter(e=>Boolean(e.trim())).join(r)}function yi(e,t,i,r){for(let a=r;a<i.length;a+=1){const r=i[a];if("class"!==r&&"style"!==r){if(e[r]instanceof Promise)return e[r].then(n=>(e[r]=n,yi(e,t,i,a)));if(!t&&!ui.has(r)){const t=String(e[r]),i=r.startsWith("data-");"true"===t||""===t?e[r]=!i||"true":e[r]||(i&&"false"===t?e[r]="false":delete e[r])}}else e[r]=gi(r,e[r])}}function vi(e,t=!1){const i=yi(e,t,Object.keys(e),0);return i instanceof Promise?i.then(()=>e):e}function bi(e,t,i){for(let r=i;r<t.length;r+=1){const i=t[r];if(i instanceof Promise)return i.then(i=>(t[r]=i,bi(e,t,r)));Array.isArray(i)?e.push(...i):e.push(i)}}function wi(e){const t=[],i=e.resolvedInput;for(const s in i){if(!Object.prototype.hasOwnProperty.call(i,s))continue;const r=i[s];if(void 0!==r&&ci.has(s))if(Array.isArray(r))for(const i of r)t.push(fi(s,i,e));else t.push(fi(s,r,e))}if(0===t.length)return[];const r=[];return a=bi(r,t,0),n=()=>r.map((t,i)=>(t._e=e._i,e.mode&&(t._m=e.mode),t._p=(e._i<<10)+i,t)),a instanceof Promise?a.then(n):n(a);var a,n}const Si=new Set(["onload","onerror","onabort","onprogress","onloadstart"]),ki={base:-10,title:10},Ti={critical:-80,high:-10,low:20};function Ei(e){const t=e.tagPriority;if("number"==typeof t)return t;let i=100;return"meta"===e.tag?"content-security-policy"===e.props["http-equiv"]?i=-30:e.props.charset?i=-20:"viewport"===e.props.name&&(i=-15):"link"===e.tag&&"preconnect"===e.props.rel?i=20:e.tag in ki&&(i=ki[e.tag]),t&&t in Ti?i+Ti[t]:i}const Ai=[{prefix:"before:",offset:-1},{prefix:"after:",offset:1}],Ci=["name","property","http-equiv"];function Ii(e){const{props:t,tag:i}=e;if(di.has(i))return i;if("link"===i&&"canonical"===t.rel)return"canonical";if(t.charset)return"charset";if(t.id)return`${i}:id:${t.id}`;for(const r of Ci)if(void 0!==t[r])return`${i}:${r}:${t[r]}`;return!1}const Pi="%separator";const _i=new RegExp(`${Pi}(?:\\s*${Pi})*`,"g");function Ri(e,t,i,r=!1){if("string"!=typeof e||!e.includes("%"))return e;let a=e;try{a=decodeURI(e)}catch{}const n=a.match(/%\w+(?:\.\w+)?/g);if(!n)return e;const s=e.includes(Pi);return e=e.replace(/%\w+(?:\.\w+)?/g,e=>{if(e===Pi||!n.includes(e))return e;const i=function(e,t,i=!1){var r;let a;if("s"===t||"pageTitle"===t)a=e.pageTitle;else if(t.includes(".")){const i=t.indexOf(".");a=null==(r=e[t.substring(0,i)])?void 0:r[t.substring(i+1)]}else a=e[t];if(void 0!==a)return i?(a||"").replace(/"/g,'\\"'):a||""}(t,e.slice(1),r);return void 0!==i?i:e}).trim(),s&&(e.endsWith(Pi)&&(e=e.slice(0,-10)),e.startsWith(Pi)&&(e=e.slice(10)),e=e.replace(_i,i).trim()),e}function xi(e,t){return null==e?t||null:"function"==typeof e?e(t):e}function Li(e,t={}){const i=t.delayFn||(e=>setTimeout(e,10));return e._domDebouncedUpdatePromise=e._domDebouncedUpdatePromise||new Promise(r=>i(()=>async function(e,t={}){const i=t.document||e.resolvedOptions.document;if(!i||!e.dirty)return;const r={shouldRender:!0,tags:[]};return await e.hooks.callHook("dom:beforeRender",r),r.shouldRender?(e._domUpdatePromise||(e._domUpdatePromise=new Promise(async t=>{var r;const a=(await e.resolveTags()).map(e=>({tag:e,id:li.has(e.tag)?mi(e):e.tag,shouldRender:!0}));let n=e._dom;if(!n){n={elMap:{htmlAttrs:i.documentElement,bodyAttrs:i.body}};const e=new Set;for(const t of["body","head"]){const a=null==(r=i[t])?void 0:r.children;for(const t of a){const i=t.tagName.toLowerCase();if(!li.has(i))continue;const r={tag:i,props:await vi(t.getAttributeNames().reduce((e,i)=>({...e,[i]:t.getAttribute(i)}),{})),innerHTML:t.innerHTML},a=Ii(r);let s=a,o=1;for(;s&&e.has(s);)s=`${a}:${o++}`;s&&(r._d=s,e.add(s)),n.elMap[t.getAttribute("data-hid")||mi(r)]=t}}}function s(e,t,i){const r=`${e}:${t}`;n.sideEffects[r]=i,delete n.pendingSideEffects[r]}function o({id:e,$el:t,tag:r}){const a=r.tag.endsWith("Attrs");if(n.elMap[e]=t,a||(r.textContent&&r.textContent!==t.textContent&&(t.textContent=r.textContent),r.innerHTML&&r.innerHTML!==t.innerHTML&&(t.innerHTML=r.innerHTML),s(e,"el",()=>{var t;null==(t=n.elMap[e])||t.remove(),delete n.elMap[e]})),r._eventHandlers)for(const n in r._eventHandlers)Object.prototype.hasOwnProperty.call(r._eventHandlers,n)&&""!==t.getAttribute(`data-${n}`)&&(("bodyAttrs"===r.tag?i.defaultView:t).addEventListener(n.substring(2),r._eventHandlers[n].bind(t)),t.setAttribute(`data-${n}`,""));for(const i in r.props){if(!Object.prototype.hasOwnProperty.call(r.props,i))continue;const n=r.props[i],o=`attr:${i}`;if("class"===i){if(!n)continue;for(const i of n.split(" "))a&&s(e,`${o}:${i}`,()=>t.classList.remove(i)),!t.classList.contains(i)&&t.classList.add(i)}else if("style"===i){if(!n)continue;for(const i of n.split(";")){const r=i.indexOf(":"),a=i.substring(0,r).trim(),n=i.substring(r+1).trim();s(e,`${o}:${a}`,()=>{t.style.removeProperty(a)}),t.style.setProperty(a,n)}}else t.getAttribute(i)!==n&&t.setAttribute(i,!0===n?"":String(n)),a&&s(e,o,()=>t.removeAttribute(i))}}n.pendingSideEffects={...n.sideEffects},n.sideEffects={};const l=[],c={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const e of a){const{tag:t,shouldRender:r,id:a}=e;r&&("title"!==t.tag?(e.$el=e.$el||n.elMap[a],e.$el?o(e):li.has(t.tag)&&l.push(e)):i.title=t.textContent)}for(const e of l){const t=e.tag.tagPosition||"head";e.$el=i.createElement(e.tag.tag),o(e),c[t]=c[t]||i.createDocumentFragment(),c[t].appendChild(e.$el)}for(const d of a)await e.hooks.callHook("dom:renderTag",d,i,s);c.head&&i.head.appendChild(c.head),c.bodyOpen&&i.body.insertBefore(c.bodyOpen,i.body.firstChild),c.bodyClose&&i.body.appendChild(c.bodyClose);for(const e in n.pendingSideEffects)n.pendingSideEffects[e]();e._dom=n,await e.hooks.callHook("dom:rendered",{renders:a}),t()}).finally(()=>{e._domUpdatePromise=void 0,e.dirty=!1})),e._domUpdatePromise):void 0}(e,t).then(()=>{delete e._domDebouncedUpdatePromise,r()})))}function Di(e){return t=>{var i,r;const a=(null==(r=null==(i=t.resolvedOptions.document)?void 0:i.head.querySelector('script[id="unhead:payload"]'))?void 0:r.innerHTML)||!1;return a&&t.push(JSON.parse(a)),{mode:"client",hooks:{"entries:updated":t=>{Li(t,e)}}}}}function Mi(e,t={},i){for(const r in e){const a=e[r],n=i?`${i}:${r}`:r;"object"==typeof a&&null!==a?Mi(a,t,n):"function"==typeof a&&(t[n]=a)}return t}const Oi={run:e=>e()},Ni=void 0!==console.createTask?console.createTask:()=>Oi;function Fi(e,t){const i=t.shift(),r=Ni(i);return e.reduce((e,i)=>e.then(()=>r.run(()=>i(...t))),Promise.resolve())}function Ui(e,t){const i=t.shift(),r=Ni(i);return Promise.all(e.map(e=>r.run(()=>e(...t))))}function Bi(e,t){for(const i of[...e])i(t)}class zi{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,t,i={}){if(!e||"function"!=typeof t)return()=>{};const r=e;let a;for(;this._deprecatedHooks[e];)a=this._deprecatedHooks[e],e=a.to;if(a&&!i.allowDeprecated){let e=a.message;e||(e=`${r} hook has been deprecated`+(a.to?`, please use ${a.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(e)||this._deprecatedMessages.add(e)}if(!t.name)try{Object.defineProperty(t,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&(this.removeHook(e,t),t=void 0)}}hookOnce(e,t){let i,r=(...e)=>("function"==typeof i&&i(),i=void 0,r=void 0,t(...e));return i=this.hook(e,r),i}removeHook(e,t){if(this._hooks[e]){const i=this._hooks[e].indexOf(t);-1!==i&&this._hooks[e].splice(i,1),0===this._hooks[e].length&&delete this._hooks[e]}}deprecateHook(e,t){this._deprecatedHooks[e]="string"==typeof t?{to:t}:t;const i=this._hooks[e]||[];delete this._hooks[e];for(const r of i)this.hook(e,r)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const t in e)this.deprecateHook(t,e[t])}addHooks(e){const t=Mi(e),i=Object.keys(t).map(e=>this.hook(e,t[e]));return()=>{for(const e of i.splice(0,i.length))e()}}removeHooks(e){const t=Mi(e);for(const i in t)this.removeHook(i,t[i])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...t){return t.unshift(e),this.callHookWith(Fi,e,...t)}callHookParallel(e,...t){return t.unshift(e),this.callHookWith(Ui,e,...t)}callHookWith(e,t,...i){const r=this._before||this._after?{name:t,args:i,context:{}}:void 0;this._before&&Bi(this._before,r);const a=e(t in this._hooks?[...this._hooks[t]]:[],i);return a instanceof Promise?a.finally(()=>{this._after&&r&&Bi(this._after,r)}):(this._after&&r&&Bi(this._after,r),a)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(void 0!==this._before){const t=this._before.indexOf(e);-1!==t&&this._before.splice(t,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(void 0!==this._after){const t=this._after.indexOf(e);-1!==t&&this._after.splice(t,1)}}}}const ji=new Set(["templateParams","htmlAttrs","bodyAttrs"]),$i={hooks:{"tag:normalise":({tag:e})=>{e.props.hid&&(e.key=e.props.hid,delete e.props.hid),e.props.vmid&&(e.key=e.props.vmid,delete e.props.vmid),e.props.key&&(e.key=e.props.key,delete e.props.key);const t=Ii(e);!t||t.startsWith("meta:og:")||t.startsWith("meta:twitter:")||delete e.key;const i=t||!!e.key&&`${e.tag}:${e.key}`;i&&(e._d=i)},"tags:resolve":e=>{const t=Object.create(null);for(const r of e.tags){const e=(r.key?`${r.tag}:${r.key}`:r._d)||mi(r),i=t[e];if(i){let a=null==r?void 0:r.tagDuplicateStrategy;if(!a&&ji.has(r.tag)&&(a="merge"),"merge"===a){const a=i.props;a.style&&r.props.style&&(";"!==a.style[a.style.length-1]&&(a.style+=";"),r.props.style=`${a.style} ${r.props.style}`),a.class&&r.props.class?r.props.class=`${a.class} ${r.props.class}`:a.class&&(r.props.class=a.class),t[e].props={...a,...r.props};continue}if(r._e===i._e){i._duped=i._duped||[],r._d=`${i._d}:${i._duped.length+1}`,i._duped.push(r);continue}if(Ei(r)>Ei(i))continue}r.innerHTML||r.textContent||0!==Object.keys(r.props).length||!li.has(r.tag)?t[e]=r:delete t[e]}const i=[];for(const r in t){const e=t[r],a=e._duped;i.push(e),a&&(delete e._duped,i.push(...a))}e.tags=i,e.tags=e.tags.filter(e=>!("meta"===e.tag&&(e.props.name||e.props.property)&&!e.props.content))}}},Gi=new Set(["script","link","bodyAttrs"]),qi=e=>({hooks:{"tags:resolve":t=>{for(const i of t.tags){if(!Gi.has(i.tag))continue;const t=i.props;for(const r in t){if("o"!==r[0]||"n"!==r[1])continue;if(!Object.prototype.hasOwnProperty.call(t,r))continue;const a=t[r];"function"==typeof a&&(e.ssr&&Si.has(r)?t[r]=`this.dataset.${r}fired = true`:delete t[r],i._eventHandlers=i._eventHandlers||{},i._eventHandlers[r]=a)}e.ssr&&i._eventHandlers&&(i.props.src||i.props.href)&&(i.key=i.key||pi(i.props.src||i.props.href))}},"dom:renderTag":({$el:e,tag:t})=>{var i,r;const a=null==e?void 0:e.dataset;if(a)for(const n in a){if(!n.endsWith("fired"))continue;const a=n.slice(0,-5);Si.has(a)&&(null==(r=null==(i=t._eventHandlers)?void 0:i[a])||r.call(e,new Event(a.substring(2))))}}}}),Hi=new Set(["link","style","script","noscript"]),Vi={hooks:{"tag:normalise":({tag:e})=>{e.key&&Hi.has(e.tag)&&(e.props["data-hid"]=e._h=pi(e.key))}}},Wi={mode:"server",hooks:{"tags:beforeResolve":e=>{const t={};let i=!1;for(const r of e.tags)"server"!==r._m||"titleTemplate"!==r.tag&&"templateParams"!==r.tag&&"title"!==r.tag||(t[r.tag]="title"===r.tag||"titleTemplate"===r.tag?r.textContent:r.props,i=!0);i&&e.tags.push({tag:"script",innerHTML:JSON.stringify(t),props:{id:"unhead:payload",type:"application/json"}})}}},Ki={hooks:{"tags:resolve":e=>{var t;for(const i of e.tags)if("string"==typeof i.tagPriority)for(const{prefix:r,offset:a}of Ai){if(!i.tagPriority.startsWith(r))continue;const n=i.tagPriority.substring(r.length),s=null==(t=e.tags.find(e=>e._d===n))?void 0:t._p;if(void 0!==s){i._p=s+a;break}}e.tags.sort((e,t)=>{const i=Ei(e),r=Ei(t);return i<r?-1:i>r?1:e._p-t._p})}}},Yi={meta:"content",link:"href",htmlAttrs:"lang"},Ji=["innerHTML","textContent"],Xi=e=>({hooks:{"tags:resolve":t=>{var i;const{tags:r}=t;let a;for(let e=0;e<r.length;e+=1){"templateParams"===r[e].tag&&(a=t.tags.splice(e,1)[0].props,e-=1)}const n=a||{},s=n.separator||"|";delete n.separator,n.pageTitle=Ri(n.pageTitle||(null==(i=r.find(e=>"title"===e.tag))?void 0:i.textContent)||"",n,s);for(const e of r){if(!1===e.processTemplateParams)continue;const t=Yi[e.tag];if(t&&"string"==typeof e.props[t])e.props[t]=Ri(e.props[t],n,s);else if(e.processTemplateParams||"titleTemplate"===e.tag||"title"===e.tag)for(const i of Ji)"string"==typeof e[i]&&(e[i]=Ri(e[i],n,s,"script"===e.tag&&e.props.type.endsWith("json")))}e._templateParams=n,e._separator=s},"tags:afterResolve":({tags:t})=>{let i;for(let e=0;e<t.length;e+=1){const r=t[e];"title"===r.tag&&!1!==r.processTemplateParams&&(i=r)}(null==i?void 0:i.textContent)&&(i.textContent=Ri(i.textContent,e._templateParams,e._separator))}}}),Qi={hooks:{"tags:resolve":e=>{const{tags:t}=e;let i,r;for(let a=0;a<t.length;a+=1){const e=t[a];"title"===e.tag?i=e:"titleTemplate"===e.tag&&(r=e)}if(r&&i){const t=xi(r.textContent,i.textContent);null!==t?i.textContent=t||i.textContent:e.tags.splice(e.tags.indexOf(i),1)}else if(r){const e=xi(r.textContent);null!==e&&(r.textContent=e,r.tag="title",r=void 0)}r&&e.tags.splice(e.tags.indexOf(r),1)}}},Zi={hooks:{"tags:afterResolve":e=>{for(const t of e.tags)"string"==typeof t.innerHTML&&(!t.innerHTML||"application/ld+json"!==t.props.type&&"application/json"!==t.props.type?t.innerHTML=t.innerHTML.replace(new RegExp(`</${t.tag}`,"g"),`<\\/${t.tag}`):t.innerHTML=t.innerHTML.replace(/</g,"\\u003C"))}}};let er;function tr(e={}){const t=function(e={}){const t=new zi;t.addHooks(e.hooks||{}),e.document=e.document||(hi?document:void 0);const i=!e.document,r=()=>{o.dirty=!0,t.callHook("entries:updated",o)};let a=0,n=[];const s=[],o={plugins:s,dirty:!1,resolvedOptions:e,hooks:t,headEntries:()=>n,use(e){const r="function"==typeof e?e(o):e;r.key&&s.some(e=>e.key===r.key)||(s.push(r),ir(r.mode,i)&&t.addHooks(r.hooks||{}))},push(e,t){null==t||delete t.head;const s={_i:a++,input:e,...t};return ir(s.mode,i)&&(n.push(s),r()),{dispose(){n=n.filter(e=>e._i!==s._i),r()},patch(e){for(const t of n)t._i===s._i&&(t.input=s.input=e);r()}}},async resolveTags(){const e={tags:[],entries:[...n]};await t.callHook("entries:resolve",e);for(const i of e.entries){const r=i.resolvedInput||i.input;if(i.resolvedInput=await(i.transform?i.transform(r):r),i.resolvedInput)for(const a of await wi(i)){const r={tag:a,entry:i,resolvedOptions:o.resolvedOptions};await t.callHook("tag:normalise",r),e.tags.push(r.tag)}}return await t.callHook("tags:beforeResolve",e),await t.callHook("tags:resolve",e),await t.callHook("tags:afterResolve",e),e.tags},ssr:i};return[$i,Wi,qi,Vi,Ki,Xi,Qi,Zi,...(null==e?void 0:e.plugins)||[]].forEach(e=>o.use(e)),o.hooks.callHook("init",o),o}(e);return t.use(Di()),er=t}function ir(e,t){return!e||"server"===e&&t||"client"===e&&!t}const rr="3"===n[0];function ar(e){if(e instanceof Promise||e instanceof Date||e instanceof RegExp)return e;const t="function"==typeof(i=e)?i():r(i);var i;if(!e||!t)return t;if(Array.isArray(t))return t.map(e=>ar(e));if("object"==typeof t){const e={};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&("titleTemplate"===i||"o"===i[0]&&"n"===i[1]?e[i]=r(t[i]):e[i]=ar(t[i]));return e}return t}const nr={hooks:{"entries:resolve":e=>{for(const t of e.entries)t.resolvedInput=ar(t.input)}}},sr="usehead";function or(e={}){e.domDelayFn=e.domDelayFn||(e=>a(()=>setTimeout(()=>e(),0)));const t=tr(e);return t.use(nr),t.install=function(e){return{install(t){rr&&(t.config.globalProperties.$unhead=e,t.config.globalProperties.$head=e,t.provide(sr,e))}}.install}(t),t}const lr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},cr="__unhead_injection_handler__";function dr(){if(cr in lr)return lr[cr]();return i(sr)||er}function ur(e,t={}){const i=t.head||dr();if(i)return i.ssr?i.push(e,t):function(e,t,i={}){const r=u(!1),a=u({});s(()=>{a.value=r.value?{}:ar(t)});const n=e.push(a.value,i);o(a,e=>{n.patch(e)});h()&&(l(()=>{n.dispose()}),c(()=>{r.value=!0}),d(()=>{r.value=!1}));return n}(i,e,t)}function hr(e,t){const i=function(e){const t=e;return t.headTags=e.resolveTags,t.addEntry=e.push,t.addHeadObjs=e.push,t.addReactiveEntry=(e,t)=>{const i=ur(e,t);return void 0!==i?i.dispose:()=>{}},t.removeHeadObjs=()=>{},t.updateDOM=()=>{e.hooks.callHook("entries:updated",e)},t.unhead=e,t}(or({}));return i}const pr={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},mr="update:modelValue",fr="change",gr="input",yr=["","default","small","large"];var vr="object"==typeof global&&global&&global.Object===Object&&global,br="object"==typeof self&&self&&self.Object===Object&&self,wr=vr||br||Function("return this")(),Sr=wr.Symbol,kr=Object.prototype,Tr=kr.hasOwnProperty,Er=kr.toString,Ar=Sr?Sr.toStringTag:void 0;var Cr=Object.prototype.toString;var Ir=Sr?Sr.toStringTag:void 0;function Pr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ir&&Ir in Object(e)?function(e){var t=Tr.call(e,Ar),i=e[Ar];try{e[Ar]=void 0;var r=!0}catch(n){}var a=Er.call(e);return r&&(t?e[Ar]=i:delete e[Ar]),a}(e):function(e){return Cr.call(e)}(e)}function _r(e){return null!=e&&"object"==typeof e}function Rr(e){return"symbol"==typeof e||_r(e)&&"[object Symbol]"==Pr(e)}function xr(e,t){for(var i=-1,r=null==e?0:e.length,a=Array(r);++i<r;)a[i]=t(e[i],i,e);return a}var Lr=Array.isArray,Dr=Sr?Sr.prototype:void 0,Mr=Dr?Dr.toString:void 0;function Or(e){if("string"==typeof e)return e;if(Lr(e))return xr(e,Or)+"";if(Rr(e))return Mr?Mr.call(e):"";var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}var Nr=/\s/;var Fr=/^\s+/;function Ur(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Nr.test(e.charAt(t)););return t}(e)+1).replace(Fr,""):e}function Br(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var zr=/^[-+]0x[0-9a-f]+$/i,jr=/^0b[01]+$/i,$r=/^0o[0-7]+$/i,Gr=parseInt;function qr(e){if("number"==typeof e)return e;if(Rr(e))return NaN;if(Br(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Br(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ur(e);var i=jr.test(e);return i||$r.test(e)?Gr(e.slice(2),i?2:8):zr.test(e)?NaN:+e}function Hr(e){if(!Br(e))return!1;var t=Pr(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Vr,Wr=wr["__core-js_shared__"],Kr=(Vr=/[^.]+$/.exec(Wr&&Wr.keys&&Wr.keys.IE_PROTO||""))?"Symbol(src)_1."+Vr:"";var Yr=Function.prototype.toString;function Jr(e){if(null!=e){try{return Yr.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Xr=/^\[object .+?Constructor\]$/,Qr=Function.prototype,Zr=Object.prototype,ea=Qr.toString,ta=Zr.hasOwnProperty,ia=RegExp("^"+ea.call(ta).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ra(e){return!(!Br(e)||(t=e,Kr&&Kr in t))&&(Hr(e)?ia:Xr).test(Jr(e));var t}function aa(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return ra(i)?i:void 0}var na=aa(wr,"WeakMap"),sa=function(){try{var e=aa(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),oa=/^(?:0|[1-9]\d*)$/;function la(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&oa.test(e))&&e>-1&&e%1==0&&e<t}function ca(e,t,i){"__proto__"==t&&sa?sa(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function da(e,t){return e===t||e!=e&&t!=t}var ua=Object.prototype.hasOwnProperty;function ha(e,t,i){var r=e[t];ua.call(e,t)&&da(r,i)&&(void 0!==i||t in e)||ca(e,t,i)}function pa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ma(e){return null!=e&&pa(e.length)&&!Hr(e)}var fa=Object.prototype;function ga(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||fa)}function ya(e){return _r(e)&&"[object Arguments]"==Pr(e)}var va=Object.prototype,ba=va.hasOwnProperty,wa=va.propertyIsEnumerable,Sa=ya(function(){return arguments}())?ya:function(e){return _r(e)&&ba.call(e,"callee")&&!wa.call(e,"callee")};var ka="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ta=ka&&"object"==typeof module&&module&&!module.nodeType&&module,Ea=Ta&&Ta.exports===ka?wr.Buffer:void 0,Aa=(Ea?Ea.isBuffer:void 0)||function(){return!1},Ca={};function Ia(e){return function(t){return e(t)}}Ca["[object Float32Array]"]=Ca["[object Float64Array]"]=Ca["[object Int8Array]"]=Ca["[object Int16Array]"]=Ca["[object Int32Array]"]=Ca["[object Uint8Array]"]=Ca["[object Uint8ClampedArray]"]=Ca["[object Uint16Array]"]=Ca["[object Uint32Array]"]=!0,Ca["[object Arguments]"]=Ca["[object Array]"]=Ca["[object ArrayBuffer]"]=Ca["[object Boolean]"]=Ca["[object DataView]"]=Ca["[object Date]"]=Ca["[object Error]"]=Ca["[object Function]"]=Ca["[object Map]"]=Ca["[object Number]"]=Ca["[object Object]"]=Ca["[object RegExp]"]=Ca["[object Set]"]=Ca["[object String]"]=Ca["[object WeakMap]"]=!1;var Pa="object"==typeof exports&&exports&&!exports.nodeType&&exports,_a=Pa&&"object"==typeof module&&module&&!module.nodeType&&module,Ra=_a&&_a.exports===Pa&&vr.process,xa=function(){try{var e=_a&&_a.require&&_a.require("util").types;return e||Ra&&Ra.binding&&Ra.binding("util")}catch(t){}}(),La=xa&&xa.isTypedArray,Da=La?Ia(La):function(e){return _r(e)&&pa(e.length)&&!!Ca[Pr(e)]},Ma=Object.prototype.hasOwnProperty;function Oa(e,t){var i=Lr(e),r=!i&&Sa(e),a=!i&&!r&&Aa(e),n=!i&&!r&&!a&&Da(e),s=i||r||a||n,o=s?function(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}(e.length,String):[],l=o.length;for(var c in e)!t&&!Ma.call(e,c)||s&&("length"==c||a&&("offset"==c||"parent"==c)||n&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||la(c,l))||o.push(c);return o}function Na(e,t){return function(i){return e(t(i))}}var Fa=Na(Object.keys,Object),Ua=Object.prototype.hasOwnProperty;function Ba(e){return ma(e)?Oa(e):function(e){if(!ga(e))return Fa(e);var t=[];for(var i in Object(e))Ua.call(e,i)&&"constructor"!=i&&t.push(i);return t}(e)}var za=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ja=/^\w*$/;var $a=aa(Object,"create");var Ga=Object.prototype.hasOwnProperty;var qa=Object.prototype.hasOwnProperty;function Ha(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Va(e,t){for(var i=e.length;i--;)if(da(e[i][0],t))return i;return-1}Ha.prototype.clear=function(){this.__data__=$a?$a(null):{},this.size=0},Ha.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Ha.prototype.get=function(e){var t=this.__data__;if($a){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return Ga.call(t,e)?t[e]:void 0},Ha.prototype.has=function(e){var t=this.__data__;return $a?void 0!==t[e]:qa.call(t,e)},Ha.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=$a&&void 0===t?"__lodash_hash_undefined__":t,this};var Wa=Array.prototype.splice;function Ka(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}Ka.prototype.clear=function(){this.__data__=[],this.size=0},Ka.prototype.delete=function(e){var t=this.__data__,i=Va(t,e);return!(i<0)&&(i==t.length-1?t.pop():Wa.call(t,i,1),--this.size,!0)},Ka.prototype.get=function(e){var t=this.__data__,i=Va(t,e);return i<0?void 0:t[i][1]},Ka.prototype.has=function(e){return Va(this.__data__,e)>-1},Ka.prototype.set=function(e,t){var i=this.__data__,r=Va(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this};var Ya=aa(wr,"Map");function Ja(e,t){var i,r,a=e.__data__;return("string"==(r=typeof(i=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?a["string"==typeof t?"string":"hash"]:a.map}function Xa(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}Xa.prototype.clear=function(){this.size=0,this.__data__={hash:new Ha,map:new(Ya||Ka),string:new Ha}},Xa.prototype.delete=function(e){var t=Ja(this,e).delete(e);return this.size-=t?1:0,t},Xa.prototype.get=function(e){return Ja(this,e).get(e)},Xa.prototype.has=function(e){return Ja(this,e).has(e)},Xa.prototype.set=function(e,t){var i=Ja(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this};function Qa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var r=arguments,a=t?t.apply(this,r):r[0],n=i.cache;if(n.has(a))return n.get(a);var s=e.apply(this,r);return i.cache=n.set(a,s)||n,s};return i.cache=new(Qa.Cache||Xa),i}Qa.Cache=Xa;var Za,en,tn,rn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,an=/\\(\\)?/g,nn=(Za=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(rn,function(e,i,r,a){t.push(r?a.replace(an,"$1"):i||e)}),t},en=Qa(Za,function(e){return 500===tn.size&&tn.clear(),e}),tn=en.cache,en);function sn(e,t){return Lr(e)?e:function(e,t){if(Lr(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!Rr(e))||ja.test(e)||!za.test(e)||null!=t&&e in Object(t)}(e,t)?[e]:nn(function(e){return null==e?"":Or(e)}(e))}function on(e){if("string"==typeof e||Rr(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}function ln(e,t){for(var i=0,r=(t=sn(t,e)).length;null!=e&&i<r;)e=e[on(t[i++])];return i&&i==r?e:void 0}function cn(e,t,i){var r=null==e?void 0:ln(e,t);return void 0===r?i:r}function dn(e,t){for(var i=-1,r=t.length,a=e.length;++i<r;)e[a+i]=t[i];return e}var un=Na(Object.getPrototypeOf,Object),hn=Function.prototype,pn=Object.prototype,mn=hn.toString,fn=pn.hasOwnProperty,gn=mn.call(Object);function yn(e){if(!_r(e)||"[object Object]"!=Pr(e))return!1;var t=un(e);if(null===t)return!0;var i=fn.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&mn.call(i)==gn}function vn(e,t,i){return void 0===i&&(i=t,t=void 0),void 0!==i&&(i=(i=qr(i))==i?i:0),void 0!==t&&(t=(t=qr(t))==t?t:0),function(e,t,i){return e==e&&(void 0!==i&&(e=e<=i?e:i),void 0!==t&&(e=e>=t?e:t)),e}(qr(e),t,i)}function bn(e){var t=this.__data__=new Ka(e);this.size=t.size}function wn(){return[]}bn.prototype.clear=function(){this.__data__=new Ka,this.size=0},bn.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},bn.prototype.get=function(e){return this.__data__.get(e)},bn.prototype.has=function(e){return this.__data__.has(e)},bn.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Ka){var r=i.__data__;if(!Ya||r.length<199)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new Xa(r)}return i.set(e,t),this.size=i.size,this};var Sn=Object.prototype.propertyIsEnumerable,kn=Object.getOwnPropertySymbols,Tn=kn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,r=null==e?0:e.length,a=0,n=[];++i<r;){var s=e[i];t(s,i,e)&&(n[a++]=s)}return n}(kn(e),function(t){return Sn.call(e,t)}))}:wn;function En(e,t,i){var r=t(e);return Lr(e)?r:dn(r,i(e))}function An(e){return En(e,Ba,Tn)}var Cn=aa(wr,"DataView"),In=aa(wr,"Promise"),Pn=aa(wr,"Set"),_n="[object Map]",Rn="[object Promise]",xn="[object Set]",Ln="[object WeakMap]",Dn="[object DataView]",Mn=Jr(Cn),On=Jr(Ya),Nn=Jr(In),Fn=Jr(Pn),Un=Jr(na),Bn=Pr;(Cn&&Bn(new Cn(new ArrayBuffer(1)))!=Dn||Ya&&Bn(new Ya)!=_n||In&&Bn(In.resolve())!=Rn||Pn&&Bn(new Pn)!=xn||na&&Bn(new na)!=Ln)&&(Bn=function(e){var t=Pr(e),i="[object Object]"==t?e.constructor:void 0,r=i?Jr(i):"";if(r)switch(r){case Mn:return Dn;case On:return _n;case Nn:return Rn;case Fn:return xn;case Un:return Ln}return t});var zn=wr.Uint8Array;function jn(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Xa;++t<i;)this.add(e[t])}jn.prototype.add=jn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},jn.prototype.has=function(e){return this.__data__.has(e)};var $n=Sr?Sr.prototype:void 0;$n&&$n.valueOf;Object.prototype.hasOwnProperty;Object.prototype.hasOwnProperty;function Gn(e){for(var t=-1,i=null==e?0:e.length,r={};++t<i;){var a=e[t];ca(r,a[0],a[1])}return r}function qn(e){return null==e}function Hn(e,t,i,r){if(!Br(e))return e;for(var a=-1,n=(t=sn(t,e)).length,s=n-1,o=e;null!=o&&++a<n;){var l=on(t[a]),c=i;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(a!=s){var d=o[l];void 0===(c=void 0)&&(c=Br(d)?d:la(t[a+1])?[]:{})}ha(o,l,c),o=o[l]}return e}const Vn=e=>void 0===e,Wn=e=>"boolean"==typeof e,Kn=e=>"number"==typeof e,Yn=e=>"undefined"!=typeof Element&&e instanceof Element,Jn=e=>Object.keys(e),Xn="__epPropKey",Qn=e=>e,Zn=(e,t)=>{if(!f(e)||f(i=e)&&i.__epPropKey)return e;var i;const{values:r,required:a,default:n,type:s,validator:o}=e,l={type:s,required:!!a,validator:r||o?i=>{let a=!1,s=[];if(r&&(s=Array.from(r),g(e,"default")&&s.push(n),a||(a=s.includes(i))),o&&(a||(a=o(i))),!a&&s.length>0){const e=[...new Set(s)].map(e=>JSON.stringify(e)).join(", ");y(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${e}], got value ${JSON.stringify(i)}.`)}return a}:void 0,[Xn]:!0};return g(e,"default")&&(l.default=n),l},es=e=>Gn(Object.entries(e).map(([e,t])=>[e,Zn(t,e)]));var ts=class extends Error{constructor(e){super(e),this.name="ElementPlusError"}};function is(e,t){throw new ts(`[${e}] ${t}`)}function rs(e,t){p(e)&&new ts(`[${e}] ${t}`)}function as(e,t){var i;const r=S();return s(()=>{r.value=e()},{...t,flush:null!==(i=null==t?void 0:t.flush)&&void 0!==i?i:"sync"}),w(r)}function ns(e,t){return!!v()&&(b(e,t),!0)}const ss="undefined"!=typeof window&&"undefined"!=typeof document;"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope);const os=Object.prototype.toString,ls=(e,t,i)=>Math.min(i,Math.max(t,e)),cs=()=>{},ds=us();function us(){var e,t,i;return ss&&!!(null===(e=window)||void 0===e||null===(e=e.navigator)||void 0===e?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(null===(t=window)||void 0===t||null===(t=t.navigator)||void 0===t?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(null===(i=window)||void 0===i?void 0:i.navigator.userAgent))}function hs(e){return Array.isArray(e)?e:[e]}function ps(e,t=!0,i){h()?E(e,i):t?e():a(e)}function ms(e,t,i={}){const{immediate:r=!0,immediateCallback:a=!1}=i,n=S(!1);let s;function o(){s&&(clearTimeout(s),s=void 0)}function l(){n.value=!1,o()}function c(...i){a&&e(),o(),n.value=!0,s=setTimeout(()=>{n.value=!1,s=void 0,e(...i)},T(t))}return r&&(n.value=!0,ss&&c()),ns(l),{isPending:k(n),start:c,stop:l}}const fs=ss?window:void 0,gs=ss?window.document:void 0;function ys(e){var t;const i=T(e);return null!==(t=null==i?void 0:i.$el)&&void 0!==t?t:i}function vs(...e){const t=P(()=>{const t=hs(T(e[0])).filter(e=>null!=e);return t.every(e=>"string"!=typeof e)?t:void 0});return i=([e,t,i,r],a,n)=>{if(!(null==e?void 0:e.length)||!(null==t?void 0:t.length)||!(null==i?void 0:i.length))return;const s=(o=r,"[object Object]"===os.call(o)?{...r}:r);var o;const l=e.flatMap(e=>t.flatMap(t=>i.map(i=>((e,t,i,r)=>(e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)))(e,t,i,s))));n(()=>{l.forEach(e=>e())})},a={flush:"post"},o(()=>{var i,a;return[null!==(i=null===(a=t.value)||void 0===a?void 0:a.map(e=>ys(e)))&&void 0!==i?i:[fs].filter(e=>null!=e),hs(T(t.value?e[1]:e[0])),hs(r(t.value?e[2]:e[1])),T(t.value?e[3]:e[2])]},i,{...a,immediate:!0});var i,a}let bs=!1;function ws(e,t,i={}){const{window:r=fs,ignore:a=[],capture:n=!0,detectIframe:s=!1,controls:o=!1}=i;if(!r)return o?{stop:cs,cancel:cs,trigger:cs}:cs;if(ds&&!bs){bs=!0;const e={passive:!0};Array.from(r.document.body.children).forEach(t=>t.addEventListener("click",cs,e)),r.document.documentElement.addEventListener("click",cs,e)}let l=!0;const c=e=>T(a).some(t=>{if("string"==typeof t)return Array.from(r.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{const i=ys(t);return i&&(e.target===i||e.composedPath().includes(i))}});const d=i=>{const r=ys(e);null!=i.target&&(r instanceof Element||!function(e){const t=T(e);return t&&16===t.$.subTree.shapeFlag}(e)||!function(e,t){const i=T(e),r=i.$.subTree&&i.$.subTree.children;return!(null==r||!Array.isArray(r))&&r.some(e=>e.el===t.target||t.composedPath().includes(e.el))}(e,i))&&r&&r!==i.target&&!i.composedPath().includes(r)&&("detail"in i&&0===i.detail&&(l=!c(i)),l?t(i):l=!0)};let u=!1;const h=[vs(r,"click",e=>{u||(u=!0,setTimeout(()=>{u=!1},0),d(e))},{passive:!0,capture:n}),vs(r,"pointerdown",t=>{const i=ys(e);l=!c(t)&&!(!i||t.composedPath().includes(i))},{passive:!0}),s&&vs(r,"blur",i=>{setTimeout(()=>{const a=ys(e);let n=r.document.activeElement;for(;null==n?void 0:n.shadowRoot;)n=n.shadowRoot.activeElement;"IFRAME"!==(null==n?void 0:n.tagName)||(null==a?void 0:a.contains(r.document.activeElement))||t(i)},0)},{passive:!0})].filter(Boolean),p=()=>h.forEach(e=>e());return o?{stop:p,cancel:()=>{l=!1},trigger:e=>{l=!0,d(e),l=!1}}:p}function Ss(){const e=S(!1),t=h();return t&&E(()=>{e.value=!0},t),e}function ks(e){const t=Ss();return P(()=>(t.value,Boolean(e())))}Symbol("vueuse-ssr-width");function Ts(e={}){const{document:t=gs}=e;if(!t)return S("visible");const i=S(t.visibilityState);return vs(t,"visibilitychange",()=>{i.value=t.visibilityState},{passive:!0}),i}function Es(e,t,i={}){const{window:r=fs,...a}=i;let n;const s=ks(()=>r&&"ResizeObserver"in r),l=()=>{n&&(n.disconnect(),n=void 0)},c=o(P(()=>{const t=T(e);return Array.isArray(t)?t.map(e=>ys(e)):[ys(t)]}),e=>{if(l(),s.value&&r){n=new ResizeObserver(t);for(const t of e)t&&n.observe(t,a)}},{immediate:!0,flush:"post"}),d=()=>{l(),c()};return ns(d),{isSupported:s,stop:d}}function As(e,t={width:0,height:0},i={}){const{window:r=fs,box:a="content-box"}=i,n=P(()=>{var t;return null===(t=ys(e))||void 0===t||null===(t=t.namespaceURI)||void 0===t?void 0:t.includes("svg")}),s=S(t.width),l=S(t.height),{stop:c}=Es(e,([t])=>{const i="border-box"===a?t.borderBoxSize:"content-box"===a?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&n.value){const t=ys(e);if(t){const e=t.getBoundingClientRect();s.value=e.width,l.value=e.height}}else if(i){const e=hs(i);s.value=e.reduce((e,{inlineSize:t})=>e+t,0),l.value=e.reduce((e,{blockSize:t})=>e+t,0)}else s.value=t.contentRect.width,l.value=t.contentRect.height},i);ps(()=>{const i=ys(e);i&&(s.value="offsetWidth"in i?i.offsetWidth:t.width,l.value="offsetHeight"in i?i.offsetHeight:t.height)});const d=o(()=>ys(e),e=>{s.value=e?t.width:0,l.value=e?t.height:0});return{width:s,height:l,stop:function(){c(),d()}}}function Cs(e={}){const{window:t=fs}=e;if(!t)return S(!1);const i=S(t.document.hasFocus()),r={passive:!0};return vs(t,"blur",()=>{i.value=!1},r),vs(t,"focus",()=>{i.value=!0},r),i}const Is=({from:e,replacement:t,scope:i,version:a,ref:n,type:s="API"},l)=>{o(()=>r(l),r=>{r&&rs(i,`[${s}] ${e} is about to be deprecated in version ${a}, please use ${t} instead.\nFor more detail, please visit: ${n}\n`)},{immediate:!0})},Ps=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot,_s=e=>"undefined"!=typeof Element&&e instanceof Element,Rs=e=>{if(e.tabIndex>0||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!==e.rel;case"INPUT":return!("hidden"===e.type||"file"===e.type);case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},xs=(e,t)=>{if(!e||!e.focus)return;let i=!1;!_s(e)||Rs(e)||e.getAttribute("tabindex")||(e.setAttribute("tabindex","-1"),i=!0),e.focus(t),_s(e)&&i&&e.removeAttribute("tabindex")},Ls=()=>ss&&/firefox/i.test(window.navigator.userAgent),Ds=(e="")=>e.split(" ").filter(e=>!!e.trim()),Ms=(e,t)=>{e&&t.trim()&&e.classList.add(...Ds(t))},Os=(e,t)=>{e&&t.trim()&&e.classList.remove(...Ds(t))},Ns=(e,t)=>{var i;if(!ss||!e||!t||Ps(e))return"";let r=_(t);"float"===r&&(r="cssFloat");try{const t=e.style[r];if(t)return t;const a=null==(i=document.defaultView)?void 0:i.getComputedStyle(e,"");return a?a[r]:""}catch{return e.style[r]}};function Fs(e,t="px"){return e||0===e?Kn(e)||p(i=e)&&!Number.isNaN(Number(i))?`${e}${t}`:p(e)?e:void rs("utils/dom/style","binding value must be a string or number"):"";var i}const Us=(e,t,i,r)=>{const a={offsetX:0,offsetY:0},n=u(!1),o=(t,i)=>{if(e.value){const{offsetX:n,offsetY:s}=a,o=e.value.getBoundingClientRect(),l=Math.max(o.left,0),c=Math.max(o.top,0),d=o.width,u=o.height,h=document.documentElement.clientWidth,p=document.documentElement.clientHeight,m=-l+n,f=-c+s,g=h-l-d+n,y=p-c-(u<p?u:0)+s;(null==r?void 0:r.value)||(t=vn(t,m,g),i=vn(i,f,y)),a.offsetX=t,a.offsetY=i,e.value.style.transform=`translate(${Fs(t)}, ${Fs(i)})`}},c=e=>{const t=e.clientX,i=e.clientY,{offsetX:r,offsetY:s}=a,l=e=>{n.value||(n.value=!0),o(r+e.clientX-t,s+e.clientY-i)},c=()=>{n.value=!1,document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",c)},d=()=>{t.value&&e.value&&(t.value.removeEventListener("mousedown",c),window.removeEventListener("resize",h))},h=()=>{const{offsetX:e,offsetY:t}=a;o(e,t)};return E(()=>{s(()=>{i.value?t.value&&e.value&&(t.value.addEventListener("mousedown",c),window.addEventListener("resize",h)):d()})}),l(()=>{d()}),{isDragging:n,resetPosition:()=>{a.offsetX=0,a.offsetY=0,e.value&&(e.value.style.transform="")},updatePosition:h}};var Bs={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"},inputOTP:{groupLabel:"OTP Input",defaultLabel:"Please enter OTP character {index}"}}};const zs=e=>(t,i)=>js(t,i,r(e)),js=(e,t,i)=>cn(i,e,e).replace(/\{(\w+)\}/g,(e,i)=>`${(null==t?void 0:t[i])??`{${i}}`}`),$s=Symbol("localeContextKey"),Gs=e=>{const t=e||i($s,u());return(e=>({lang:P(()=>r(e).name),locale:C(e)?e:u(e),t:zs(e)}))(P(()=>t.value||Bs))},qs=(e,t,i,r,a)=>{let n=`${e}-${t}`;return i&&(n+=`-${i}`),r&&(n+=`__${r}`),a&&(n+=`--${a}`),n},Hs=Symbol("namespaceContextKey"),Vs=e=>{const t=e||(h()?i(Hs,u("el")):u("el"));return P(()=>r(t)||"el")},Ws=(e,t)=>{const i=Vs(t);return{namespace:i,b:(t="")=>qs(i.value,e,t,"",""),e:t=>t?qs(i.value,e,"",t,""):"",m:t=>t?qs(i.value,e,"","",t):"",be:(t,r)=>t&&r?qs(i.value,e,t,r,""):"",em:(t,r)=>t&&r?qs(i.value,e,"",t,r):"",bm:(t,r)=>t&&r?qs(i.value,e,t,"",r):"",bem:(t,r,a)=>t&&r&&a?qs(i.value,e,t,r,a):"",is:(e,...t)=>{const i=!(t.length>=1)||t[0];return e&&i?`is-${e}`:""},cssVar:e=>{const t={};for(const r in e)e[r]&&(t[`--${i.value}-${r}`]=e[r]);return t},cssVarName:e=>`--${i.value}-${e}`,cssVarBlock:t=>{const r={};for(const a in t)t[a]&&(r[`--${i.value}-${e}-${a}`]=t[a]);return r},cssVarBlockName:t=>`--${i.value}-${e}-${t}`}};const Ks=e=>ss?window.requestAnimationFrame(e):setTimeout(e,16),Ys=e=>ss?window.cancelAnimationFrame(e):clearTimeout(e),Js=(e,t)=>{if(!ss)return!1;const i={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],r=Ns(e,i);return["scroll","auto","overlay"].some(e=>r.includes(e))},Xs=(e,t)=>{if(!ss)return;let i=e;for(;i;){if([window,document,document.documentElement].includes(i))return window;if(Js(i,t))return i;i=Ps(i)?i.host:i.parentNode}return i};let Qs;const Zs=(e,t={})=>{C(e)||is("[useLockscreen]","You need to pass a ref param to this function");const i=t.ns||Ws("popup"),r=P(()=>i.bm("parent","hidden"));let a=0,n=!1,s="0",l=!1;const c=()=>{l||(l=!0,setTimeout(()=>{"undefined"!=typeof document&&n&&document&&(document.body.style.width=s,Os(document.body,r.value))},200))};o(e,e=>{if(!e)return void c();l=!1,n=!((e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)})(document.body,r.value),n&&(s=document.body.style.width,Ms(document.body,r.value)),a=(e=>{var t;if(!ss)return 0;if(void 0!==Qs)return Qs;const i=document.createElement("div");i.className=`${e}-scrollbar__wrap`,i.style.visibility="hidden",i.style.width="100px",i.style.position="absolute",i.style.top="-9999px",document.body.appendChild(i);const r=i.offsetWidth;i.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",i.appendChild(a);const n=a.offsetWidth;return null==(t=i.parentNode)||t.removeChild(i),Qs=r-n,Qs})(i.namespace.value);const t=document.documentElement.clientHeight<document.body.scrollHeight,o=Ns(document.body,"overflowY");a>0&&(t||"scroll"===o)&&n&&(document.body.style.width=`calc(100% - ${a}px)`)}),b(()=>c())},eo=(e,t,{checkForDefaultPrevented:i=!0}={})=>r=>{const a=null==e?void 0:e(r);if(!1===i||!a)return null==t?void 0:t(r)},to=e=>{if(e.code&&"Unidentified"!==e.code)return e.code;const t=io(e);return t?Object.values(pr).includes(t)?t:" "===t?pr.space:"":""},io=e=>{let t=e.key&&"Unidentified"!==e.key?e.key:"";if(!t&&"keyup"===e.type&&ss&&/android/i.test(window.navigator.userAgent)){const i=e.target;t=i.value.charAt(i.selectionStart-1)}return t},ro=e=>{if(!e)return{onClick:x,onMousedown:x,onMouseup:x};let t=!1,i=!1;return{onClick:r=>{t&&i&&e(r),t=i=!1},onMousedown:e=>{t=e.target===e.currentTarget},onMouseup:e=>{i=e.target===e.currentTarget}}},ao={prefix:Math.floor(1e4*Math.random()),current:0},no=Symbol("elIdInjection"),so=()=>h()?i(no,ao):ao,oo=e=>{const t=so();ss||t!==ao||rs("IdInjection","Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed\nusage: app.provide(ID_INJECTION_KEY, {\n  prefix: number,\n  current: number,\n})");const i=Vs();return as(()=>r(e)||`${i.value}-id-${t.prefix}-${t.current++}`)};let lo=[];const co=e=>{to(e)===pr.esc&&lo.forEach(t=>t(e))},uo={current:0},ho=u(0),po=Symbol("elZIndexContextKey"),mo=Symbol("zIndexContextKey"),fo=e=>{const t=h()?i(po,uo):uo,a=e||(h()?i(mo,void 0):void 0),n=P(()=>{const e=r(a);return Kn(e)?e:2e3}),s=P(()=>n.value+ho.value);return ss||i(po)||rs("ZIndexInjection","Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed\nusage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })"),{initialZIndex:n,currentZIndex:s,nextZIndex:()=>(t.current++,ho.value=t.current,s.value)}},go=Zn({type:String,values:yr,required:!1}),yo=Symbol("size"),vo=()=>{const e=i(yo,{});return P(()=>r(e.size)||"")},bo=Symbol("emptyValuesContextKey"),wo=es({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>(e=R(e)?e():e,m(e)?e.every(e=>!e):!e)}}),So=e=>{const t=e.props,i=m(t)?Gn(t.map(e=>[e,{}])):t;e.setPropsDefaults=t=>{if(i){for(const[e,r]of Object.entries(t)){const t=i[e];g(i,e)&&(yn(t)?i[e]={...t,default:r}:i[e]={type:t,default:r})}e.props=i}}},ko=(e,t)=>{if(e.install=i=>{for(const r of[e,...Object.values(t??{})])i.component(r.name,r)},t)for(const[i,r]of Object.entries(t))e[i]=r;return So(e),e},To=(e,t)=>(e.install=i=>{e._context=i._context,i.config.globalProperties[t]=e},e),Eo=(e,t)=>(e.install=i=>{i.directive(t,e)},e),Ao=e=>(e.install=x,So(e),e),Co=[String,Object,Function],Io={Close:_e},Po={Close:_e,SuccessFilled:De,InfoFilled:Re,WarningFilled:Le,CircleCloseFilled:xe},_o={primary:Re,success:De,warning:Le,error:xe,info:Re},Ro={validating:Pe,success:Ie,error:Ce};const xo=ko(L({name:"ElIcon",inheritAttrs:!1,__name:"icon",props:es({size:{type:[Number,String]},color:{type:String}}),setup(e){const t=e,i=Ws("icon"),a=P(()=>{const{size:e,color:i}=t,r=Fs(e);return r||i?{fontSize:r,"--color":i}:{}});return(e,t)=>(D(),M("i",N({class:r(i).b(),style:a.value},e.$attrs),[O(e.$slots,"default")],16))}})),Lo="focus-trap.focus-after-trapped",Do="focus-trap.focus-after-released",Mo={cancelable:!0,bubbles:!1},Oo={cancelable:!0,bubbles:!1},No="focusAfterTrapped",Fo="focusAfterReleased",Uo=Symbol("elFocusTrap"),Bo=u(),zo=u(0),jo=u(0);let $o=0;const Go=e=>{const t=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0||e===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)t.push(i.currentNode);return t},qo=(e,t)=>{for(const i of e)if(!Ho(i,t))return i},Ho=(e,t)=>{if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1},Vo=(e,t)=>{if(e){const i=document.activeElement;xs(e,{preventScroll:!0}),jo.value=window.performance.now(),e!==i&&(e=>e instanceof HTMLInputElement&&"select"in e)(e)&&t&&e.select()}};function Wo(e,t){const i=[...e],r=e.indexOf(t);return-1!==r&&i.splice(r,1),i}const Ko=(()=>{let e=[];return{push:t=>{const i=e[0];i&&t!==i&&i.pause(),e=Wo(e,t),e.unshift(t)},remove:t=>{var i,r;e=Wo(e,t),null==(r=null==(i=e[0])?void 0:i.resume)||r.call(i)}}})(),Yo=()=>{Bo.value="pointer",zo.value=window.performance.now()},Jo=()=>{Bo.value="keyboard",zo.value=window.performance.now()},Xo=e=>new CustomEvent("focus-trap.focusout-prevented",{...Oo,detail:e});var Qo=((e,t)=>{const i=e.__vccOpts||e;for(const[r,a]of t)i[r]=a;return i})(L({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[No,Fo,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const i=u();let n,s;const{focusReason:c}=(E(()=>{0===$o&&(document.addEventListener("mousedown",Yo),document.addEventListener("touchstart",Yo),document.addEventListener("keydown",Jo)),$o++}),l(()=>{$o--,$o<=0&&(document.removeEventListener("mousedown",Yo),document.removeEventListener("touchstart",Yo),document.removeEventListener("keydown",Jo))}),{focusReason:Bo,lastUserFocusTimestamp:zo,lastAutomatedFocusTimestamp:jo});var d;d=i=>{e.trapped&&!h.paused&&t("release-requested",i)},E(()=>{0===lo.length&&document.addEventListener("keydown",co),ss&&lo.push(d)}),l(()=>{lo=lo.filter(e=>e!==d),0===lo.length&&ss&&document.removeEventListener("keydown",co)});const h={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},m=i=>{if(!e.loop&&!e.trapped)return;if(h.paused)return;const{altKey:r,ctrlKey:a,metaKey:n,currentTarget:s,shiftKey:o}=i,{loop:l}=e,d=to(i)===pr.tab&&!r&&!a&&!n,u=document.activeElement;if(d&&u){const e=s,[r,a]=(e=>{const t=Go(e);return[qo(t,e),qo(t.reverse(),e)]})(e);if(r&&a)if(o||u!==a){if(o&&[r,e].includes(u)){const e=Xo({focusReason:c.value});t("focusout-prevented",e),e.defaultPrevented||(i.preventDefault(),l&&Vo(a,!0))}}else{const e=Xo({focusReason:c.value});t("focusout-prevented",e),e.defaultPrevented||(i.preventDefault(),l&&Vo(r,!0))}else if(u===e){const e=Xo({focusReason:c.value});t("focusout-prevented",e),e.defaultPrevented||i.preventDefault()}}};F(Uo,{focusTrapRef:i,onKeydown:m}),o(()=>e.focusTrapEl,e=>{e&&(i.value=e)},{immediate:!0}),o([i],([e],[t])=>{e&&(e.addEventListener("keydown",m),e.addEventListener("focusin",y),e.addEventListener("focusout",v)),t&&(t.removeEventListener("keydown",m),t.removeEventListener("focusin",y),t.removeEventListener("focusout",v))});const f=e=>{t(No,e)},g=e=>t(Fo,e),y=a=>{const o=r(i);if(!o)return;const l=a.target,c=a.relatedTarget,d=l&&o.contains(l);e.trapped||c&&o.contains(c)||(n=c),d&&t("focusin",a),h.paused||e.trapped&&(d?s=l:Vo(s,!0))},v=a=>{const n=r(i);if(!h.paused&&n)if(e.trapped){const i=a.relatedTarget;qn(i)||n.contains(i)||setTimeout(()=>{if(!h.paused&&e.trapped){const e=Xo({focusReason:c.value});t("focusout-prevented",e),e.defaultPrevented||Vo(s,!0)}},0)}else{const e=a.target;e&&n.contains(e)||t("focusout",a)}};async function b(){await a();const t=r(i);if(t){Ko.push(h);const i=t.contains(document.activeElement)?n:document.activeElement;if(n=i,!t.contains(i)){const r=new Event(Lo,Mo);t.addEventListener(Lo,f),t.dispatchEvent(r),r.defaultPrevented||a(()=>{let r=e.focusStartEl;p(r)||(Vo(r),document.activeElement!==r&&(r="first")),"first"===r&&((e,t=!1)=>{const i=document.activeElement;for(const r of e)if(Vo(r,t),document.activeElement!==i)return})(Go(t),!0),document.activeElement!==i&&"container"!==r||Vo(t)})}}}function w(){const e=r(i);if(e){e.removeEventListener(Lo,f);const t=new CustomEvent(Do,{...Mo,detail:{focusReason:c.value}});e.addEventListener(Do,g),e.dispatchEvent(t),t.defaultPrevented||"keyboard"!=c.value&&zo.value>jo.value&&!e.contains(document.activeElement)||Vo(n??document.body),e.removeEventListener(Do,g),Ko.remove(h),n=null,s=null}}return E(()=>{e.trapped&&b(),o(()=>e.trapped,e=>{e?b():w()})}),l(()=>{e.trapped&&w(),i.value&&(i.value.removeEventListener("keydown",m),i.value.removeEventListener("focusin",y),i.value.removeEventListener("focusout",v),i.value=void 0),n=null,s=null}),{onKeydown:m}}}),[["render",function(e,t,i,r,a,n){return O(e.$slots,"default",{handleKeydown:e.onKeydown})}]]);const Zo=e=>e;const el=ko(L({name:"ElBadge",__name:"badge",props:es({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:[String,Object,Array,Boolean],default:void 0},offset:{type:Array,default:()=>[0,0]},badgeClass:{type:String}}),setup(e,{expose:t}){const i=e,a=Ws("badge"),n=P(()=>i.isDot?"":Kn(i.value)&&Kn(i.max)&&i.max<i.value?`${i.max}+`:`${i.value}`),s=P(()=>[{backgroundColor:i.color,marginRight:Fs(-i.offset[0]),marginTop:Fs(i.offset[1])},i.badgeStyle??{}]);return t({content:n}),(t,i)=>(D(),M("div",{class:j(r(a).b())},[O(t.$slots,"default"),U(H,{name:`${r(a).namespace.value}-zoom-in-center`},{default:B(()=>[!e.hidden&&(n.value||e.isDot||t.$slots.content)?(D(),M("sup",{key:0,class:j([r(a).e("content"),r(a).em("content",e.type),r(a).is("fixed",!!t.$slots.default),r(a).is("dot",e.isDot),r(a).is("hide-zero",!e.showZero&&0===e.value),e.badgeClass]),style:z(s.value)},[O(t.$slots,"content",{value:n.value},()=>[$(G(n.value),1)])],6)):q("v-if",!0)]),_:3},8,["name"])],2))}})),tl=Symbol(),il=u();function rl(e,t=void 0){const r=h()?i(tl,il):il;return e?P(()=>{var i;return(null==(i=r.value)?void 0:i[e])??t}):r}function al(e,t){const i=rl(),a=Ws(e,P(()=>{var e;return(null==(e=i.value)?void 0:e.namespace)||"el"})),n=Gs(P(()=>{var e;return null==(e=i.value)?void 0:e.locale})),s=fo(P(()=>{var e;const t=null==(e=i.value)?void 0:e.zIndex;return qn(t)||Number.isNaN(t)?2e3:t})),o=P(()=>{var e;return r(t)||(null==(e=i.value)?void 0:e.size)||""});return nl(P(()=>r(i)||{})),{ns:a,locale:n,zIndex:s,size:o}}const nl=(e,t,i=!1)=>{const a=!!h(),n=a?rl():void 0,s=a?F:void 0;if(!s)return void rs("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");const o=P(()=>{const t=r(e);return(null==n?void 0:n.value)?sl(n.value,t):t});return s(tl,o),s($s,P(()=>o.value.locale)),s(Hs,P(()=>o.value.namespace)),s(mo,P(()=>o.value.zIndex)),s(yo,{size:P(()=>o.value.size||"")}),s(bo,P(()=>({emptyValues:o.value.emptyValues,valueOnClear:o.value.valueOnClear}))),!i&&il.value||(il.value=o.value),o},sl=(e,t)=>{const i=[...new Set([...Jn(e),...Jn(t)])],r={};for(const a of i)r[a]=void 0!==t[a]?t[a]:e[a];return r},ol=es({a11y:{type:Boolean,default:!0},locale:{type:Object},size:go,button:{type:Object},card:{type:Object},dialog:{type:Object},link:{type:Object},experimentalFeatures:{type:Object},keyboardNavigation:{type:Boolean,default:!0},message:{type:Object},zIndex:Number,namespace:{type:String,default:"el"},table:{type:Object},...wo}),ll={placement:"top"},cl=ko(L({name:"ElConfigProvider",props:ol,setup(e,{slots:t}){const i=nl(e);return o(()=>e.message,e=>{var t;Object.assign(ll,(null==(t=null==i?void 0:i.value)?void 0:t.message)??{},e??{})},{immediate:!0,deep:!0}),()=>O(t,"default",{config:null==i?void 0:i.value})}})),dl=es({center:Boolean,alignCenter:{type:Boolean,default:void 0},closeIcon:{type:Co},draggable:{type:Boolean,default:void 0},overflow:{type:Boolean,default:void 0},fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),ul=es({...dl,appendToBody:Boolean,appendTo:{type:[String,Object],default:"body"},beforeClose:{type:Function},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},modalPenetrable:Boolean,openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"},transition:{type:[String,Object],default:void 0}}),hl={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[mr]:e=>Wn(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},pl=es({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:[String,Array,Object]},zIndex:{type:[String,Number]}});const ml=L({name:"ElOverlay",props:pl,emits:{click:e=>e instanceof MouseEvent},setup(e,{slots:t,emit:i}){const r=Ws("overlay"),{onClick:a,onMousedown:n,onMouseup:s}=ro(e.customMaskEvent?void 0:e=>{i("click",e)});return()=>e.mask?U("div",{class:[r.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:a,onMousedown:n,onMouseup:s},[O(t,"default")],14,["onClick","onMouseup","onMousedown"]):V("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[O(t,"default")])}}),fl=Symbol("dialogInjectionKey"),gl="dialog-fade",yl=["aria-level"],vl=["aria-label"],bl=["id"];var wl=L({name:"ElDialogContent",__name:"dialog-content",props:dl,emits:{close:()=>!0},setup(e,{expose:t}){const{t:a}=Gs(),{Close:n}=Io,s=e,{dialogRef:o,headerRef:l,bodyId:c,ns:d,style:u}=i(fl),{focusTrapRef:h}=i(Uo),p=((...e)=>t=>{e.forEach(e=>{e.value=t})})(h,o),m=P(()=>!!s.draggable),{resetPosition:f,updatePosition:g,isDragging:y}=Us(o,l,m,P(()=>!!s.overflow)),v=P(()=>[d.b(),d.is("fullscreen",s.fullscreen),d.is("draggable",m.value),d.is("dragging",y.value),d.is("align-center",!!s.alignCenter),{[d.m("center")]:s.center}]);return t({resetPosition:f,updatePosition:g}),(t,i)=>(D(),M("div",{ref:r(p),class:j(v.value),style:z(r(u)),tabindex:"-1"},[W("header",{ref_key:"headerRef",ref:l,class:j([r(d).e("header"),e.headerClass,{"show-close":e.showClose}])},[O(t.$slots,"header",{},()=>[W("span",{role:"heading","aria-level":e.ariaLevel,class:j(r(d).e("title"))},G(e.title),11,yl)]),e.showClose?(D(),M("button",{key:0,"aria-label":r(a)("el.dialog.close"),class:j(r(d).e("headerbtn")),type:"button",onClick:i[0]||(i[0]=e=>t.$emit("close"))},[U(r(xo),{class:j(r(d).e("close"))},{default:B(()=>[(D(),K(Y(e.closeIcon||r(n))))]),_:1},8,["class"])],10,vl)):q("v-if",!0)],2),W("div",{id:r(c),class:j([r(d).e("body"),e.bodyClass])},[O(t.$slots,"default")],10,bl),t.$slots.footer?(D(),M("footer",{key:0,class:j([r(d).e("footer"),e.footerClass])},[O(t.$slots,"footer")],2)):q("v-if",!0)],6))}});const Sl=["aria-label","aria-labelledby","aria-describedby"];const kl=ko(L({name:"ElDialog",inheritAttrs:!1,__name:"dialog",props:ul,emits:hl,setup(e,{expose:t}){const i=e,n=J();Is({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},P(()=>!!n.title));const s=Ws("dialog"),l=u(),c=u(),d=u(),{visible:p,titleId:g,bodyId:y,style:v,overlayDialogStyle:b,rendered:w,transitionConfig:S,zIndex:k,_draggable:T,_alignCenter:A,_overflow:C,penetrable:I,handleClose:_,onModalClick:x,onOpenAutoFocus:L,onCloseAutoFocus:M,onCloseRequested:$,onFocusoutPrevented:G,bringToFront:V,closing:Y}=((e,t)=>{const i=h().emit,{nextZIndex:r}=fo();let n="";const s=oo(),l=oo(),c=u(!1),d=u(!1),p=u(!1),g=u(e.zIndex??r()),y=u(!1);let v,b;const w=rl(),S=P(()=>{var e;return(null==(e=w.value)?void 0:e.namespace)??"el"}),k=P(()=>{var e;return null==(e=w.value)?void 0:e.dialog}),T=P(()=>{const t={},i=`--${S.value}-dialog`;if(!e.fullscreen){e.top&&(t[`${i}-margin-top`]=e.top);const r=Fs(e.width);r&&(t[`${i}-width`]=r)}return t}),A=P(()=>{var t;return(e.draggable??(null==(t=k.value)?void 0:t.draggable)??!1)&&!e.fullscreen}),C=P(()=>{var t;return e.alignCenter??(null==(t=k.value)?void 0:t.alignCenter)??!1}),I=P(()=>{var t;return e.overflow??(null==(t=k.value)?void 0:t.overflow)??!1}),_=P(()=>e.modalPenetrable&&!e.modal&&!e.fullscreen),x=P(()=>C.value?{display:"flex"}:{}),L=P(()=>{var t;const i=e.transition??(null==(t=k.value)?void 0:t.transition)??"dialog-fade",r={name:i,onAfterEnter:D,onBeforeLeave:O,onAfterLeave:M};if(f(i)){const e={...i},t=(e,t)=>i=>{m(e)?e.forEach(e=>{R(e)&&e(i)}):R(e)&&e(i),t()};return e.onAfterEnter=t(e.onAfterEnter,D),e.onBeforeLeave=t(e.onBeforeLeave,O),e.onAfterLeave=t(e.onAfterLeave,M),e.name||(e.name=gl,rs("ElDialog",`transition.name is missing when using object syntax, fallback to '${gl}'`)),e}return r});function D(){i("opened")}function M(){i("closed"),i(mr,!1),e.destroyOnClose&&(p.value=!1),y.value=!1}function O(){y.value=!0,i("close")}function N(){null==b||b(),null==v||v(),e.openDelay&&e.openDelay>0?({stop:v}=ms(()=>B(),e.openDelay)):B()}function F(){null==v||v(),null==b||b(),e.closeDelay&&e.closeDelay>0?({stop:b}=ms(()=>z(),e.closeDelay)):z()}function U(){e.beforeClose?e.beforeClose(function(e){e||(d.value=!0,c.value=!1)}):F()}function B(){ss&&(c.value=!0)}function z(){c.value=!1}return e.lockScroll&&Zs(c),o(()=>e.zIndex,()=>{g.value=e.zIndex??r()}),o(()=>e.modelValue,n=>{n?(d.value=!1,y.value=!1,N(),p.value=!0,g.value=e.zIndex??r(),a(()=>{i("open"),t.value&&(t.value.parentElement.scrollTop=0,t.value.parentElement.scrollLeft=0,t.value.scrollTop=0)})):c.value&&F()}),o(()=>e.fullscreen,e=>{t.value&&(e?(n=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=n)}),E(()=>{e.modelValue&&(c.value=!0,p.value=!0,N())}),{afterEnter:D,afterLeave:M,beforeLeave:O,handleClose:U,onModalClick:function(){e.closeOnClickModal&&U()},close:F,doClose:z,onOpenAutoFocus:function(){i("openAutoFocus")},onCloseAutoFocus:function(){i("closeAutoFocus")},onCloseRequested:function(){e.closeOnPressEscape&&U()},onFocusoutPrevented:function(e){var t;"pointer"===(null==(t=e.detail)?void 0:t.focusReason)&&e.preventDefault()},bringToFront:function(){c.value&&_.value&&void 0===e.zIndex&&(g.value=r())},titleId:s,bodyId:l,closed:d,style:T,overlayDialogStyle:x,rendered:p,visible:c,zIndex:g,transitionConfig:L,_draggable:A,_alignCenter:C,_overflow:I,closing:y,penetrable:_}})(i,l);F(fl,{dialogRef:l,headerRef:c,bodyId:y,ns:s,rendered:w,style:v});const te=ro(x);return t({visible:p,dialogContentRef:d,resetPosition:()=>{var e;null==(e=d.value)||e.resetPosition()},handleClose:_}),(t,i)=>(D(),K(ee,{to:e.appendTo,disabled:"body"===e.appendTo&&!e.appendToBody},[U(H,N(r(S),{persisted:""}),{default:B(()=>[X(U(r(ml),{"custom-mask-event":"",mask:e.modal,"overlay-class":[e.modalClass??"",`${r(s).namespace.value}-modal-dialog`,r(s).is("penetrable",r(I))],"z-index":r(k)},{default:B(()=>[W("div",{role:"dialog","aria-modal":"true","aria-label":e.title||void 0,"aria-labelledby":e.title?void 0:r(g),"aria-describedby":r(y),class:j([`${r(s).namespace.value}-overlay-dialog`,r(s).is("closing",r(Y))]),style:z(r(b)),onClick:i[0]||(i[0]=(...e)=>r(te).onClick&&r(te).onClick(...e)),onMousedown:i[1]||(i[1]=(...e)=>r(te).onMousedown&&r(te).onMousedown(...e)),onMouseup:i[2]||(i[2]=(...e)=>r(te).onMouseup&&r(te).onMouseup(...e))},[U(r(Qo),{loop:"",trapped:r(p),"focus-start-el":"container",onFocusAfterTrapped:r(L),onFocusAfterReleased:r(M),onFocusoutPrevented:r(G),onReleaseRequested:r($)},{default:B(()=>[r(w)?(D(),K(wl,N({key:0,ref_key:"dialogContentRef",ref:d},t.$attrs,{center:e.center,"align-center":r(A),"close-icon":e.closeIcon,draggable:r(T),overflow:r(C),fullscreen:e.fullscreen,"header-class":e.headerClass,"body-class":e.bodyClass,"footer-class":e.footerClass,"show-close":e.showClose,title:e.title,"aria-level":e.headerAriaLevel,onClose:r(_),onMousedown:r(V)}),Q({header:B(()=>[t.$slots.title?O(t.$slots,"title",{key:1}):O(t.$slots,"header",{key:0,close:r(_),titleId:r(g),titleClass:r(s).e("title")})]),default:B(()=>[O(t.$slots,"default")]),_:2},[t.$slots.footer?{name:"footer",fn:B(()=>[O(t.$slots,"footer")]),key:"0"}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose","onMousedown"])):q("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,Sl)]),_:3},8,["mask","overlay-class","z-index"]),[[Z,r(p)]])]),_:3},16)],8,["to","disabled"]))}})),Tl=["primary","success","info","warning","error"],El=["top","top-left","top-right","bottom","bottom-left","bottom-right"],Al={customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:ss?document.body:void 0},Cl=es({customClass:{type:String,default:Al.customClass},dangerouslyUseHTMLString:{type:Boolean,default:Al.dangerouslyUseHTMLString},duration:{type:Number,default:Al.duration},icon:{type:Co,default:Al.icon},id:{type:String,default:Al.id},message:{type:[String,Object,Function],default:Al.message},onClose:{type:Function,default:Al.onClose},showClose:{type:Boolean,default:Al.showClose},type:{type:String,values:Tl,default:Al.type},plain:{type:Boolean,default:Al.plain},offset:{type:Number,default:Al.offset},placement:{type:String,values:El,default:Al.placement},zIndex:{type:Number,default:Al.zIndex},grouping:{type:Boolean,default:Al.grouping},repeatNum:{type:Number,default:Al.repeatNum}}),Il=te({}),Pl=(e,t)=>{const{prev:i}=((e,t)=>{const i=Il[t]||[],r=i.findIndex(t=>t.id===e),a=i[r];let n;return r>0&&(n=i[r-1]),{current:a,prev:n}})(e,t);return i?i.vm.exposed.bottom.value:0},_l=["id"],Rl=["innerHTML"];var xl=L({name:"ElMessage",__name:"message",props:Cl,emits:{destroy:()=>!0},setup(e,{expose:t,emit:i}){const{Close:n}=Po,s=e,l=i,c=u(!1),{ns:d,zIndex:h}=al("message"),{currentZIndex:p,nextZIndex:m}=h,f=u(),g=u(!1),y=u(0);let v;const b=P(()=>s.type?"error"===s.type?"danger":s.type:"info"),w=P(()=>{const e=s.type;return{[d.bm("icon",e)]:e&&_o[e]}}),S=P(()=>s.icon||_o[s.type]||""),k=P(()=>s.placement||"top"),T=P(()=>Pl(s.id,k.value)),A=P(()=>Math.max(((e,t,i)=>(Il[i]||[]).findIndex(t=>t.id===e)>0?16:t)(s.id,s.offset,k.value)+T.value,s.offset)),C=P(()=>y.value+A.value),I=P(()=>k.value.includes("left")?d.is("left"):k.value.includes("right")?d.is("right"):d.is("center")),_=P(()=>k.value.startsWith("top")?"top":"bottom"),R=P(()=>({[_.value]:`${A.value}px`,zIndex:p.value}));function x(){0!==s.duration&&({stop:v}=ms(()=>{N()},s.duration))}function L(){null==v||v()}function N(){g.value=!1,a(()=>{var e;c.value||(null==(e=s.onClose)||e.call(s),l("destroy"))})}return E(()=>{x(),m(),g.value=!0}),o(()=>s.repeatNum,()=>{L(),x()}),vs(document,"keydown",function(e){to(e)===pr.esc&&N()}),Es(f,()=>{y.value=f.value.getBoundingClientRect().height}),t({visible:g,bottom:C,close:N}),(t,i)=>(D(),K(H,{name:r(d).b("fade"),onBeforeEnter:i[0]||(i[0]=e=>c.value=!0),onBeforeLeave:e.onClose,onAfterLeave:i[1]||(i[1]=e=>t.$emit("destroy")),persisted:""},{default:B(()=>[X(W("div",{id:e.id,ref_key:"messageRef",ref:f,class:j([r(d).b(),{[r(d).m(e.type)]:e.type},r(d).is("closable",e.showClose),r(d).is("plain",e.plain),r(d).is("bottom","bottom"===_.value),I.value,e.customClass]),style:z(R.value),role:"alert",onMouseenter:L,onMouseleave:x},[e.repeatNum>1?(D(),K(r(el),{key:0,value:e.repeatNum,type:b.value,class:j(r(d).e("badge"))},null,8,["value","type","class"])):q("v-if",!0),S.value?(D(),K(r(xo),{key:1,class:j([r(d).e("icon"),w.value])},{default:B(()=>[(D(),K(Y(S.value)))]),_:1},8,["class"])):q("v-if",!0),!e.dangerouslyUseHTMLString||t.$slots.default?(D(),M("p",{key:2,class:j(r(d).e("content"))},[O(t.$slots,"default",{},()=>[$(G(e.message),1)])],2)):(D(),M(ie,{key:3},[q(" Caution here, message could've been compromised, never use user's input as message "),W("p",{class:j(r(d).e("content")),innerHTML:e.message},null,10,Rl)],2112)),e.showClose?(D(),K(r(xo),{key:4,class:j(r(d).e("closeBtn")),onClick:re(N,["stop"])},{default:B(()=>[U(r(n))]),_:1},8,["class"])):q("v-if",!0)],46,_l),[[Z,g.value]])]),_:3},8,["name","onBeforeLeave"]))}});let Ll=1;const Dl=e=>{const t=!e||p(e)||ae(e)||R(e)?{message:e}:e,i={...Al,...t};return(e=>{if(e.appendTo){if(p(e.appendTo)){let t=document.querySelector(e.appendTo);Yn(t)||(rs("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body),e.appendTo=t}}else e.appendTo=document.body})(i),(e=>{!e.placement&&p(ll.placement)&&ll.placement&&(e.placement=ll.placement),e.placement||(e.placement="top"),El.includes(e.placement)||(rs("ElMessage",`Invalid placement: ${e.placement}. Falling back to 'top'.`),e.placement="top")})(i),Wn(ll.grouping)&&!i.grouping&&(i.grouping=ll.grouping),Kn(ll.duration)&&3e3===i.duration&&(i.duration=ll.duration),Kn(ll.offset)&&16===i.offset&&(i.offset=ll.offset),Wn(ll.showClose)&&!i.showClose&&(i.showClose=ll.showClose),Wn(ll.plain)&&!i.plain&&(i.plain=ll.plain),i},Ml=({appendTo:e,...t},i)=>{const r="message_"+Ll++,a=t.onClose,n=document.createElement("div"),s={...t,id:r,onClose:()=>{null==a||a(),(e=>{const t=Il[e.props.placement||"top"],i=t.indexOf(e);if(-1===i)return;t.splice(i,1);const{handler:r}=e;r.close()})(c)},onDestroy:()=>{ne(null,n)}},o=U(xl,s,R(s.message)||ae(s.message)?{default:R(s.message)?s.message:()=>s.message}:null);o.appContext=i||Ol._context,ne(o,n),e.appendChild(n.firstElementChild);const l=o.component,c={id:r,vnode:o,vm:l,handler:{close:()=>{l.exposed.close()}},props:o.component.props};return c},Ol=(e={},t)=>{if(!ss)return{close:()=>{}};const i=Dl(e),r=(a=i.placement||"top",Il[a]||(Il[a]=te([])),Il[a]);var a;if(i.grouping&&r.length){const e=r.find(({vnode:e})=>{var t;return(null==(t=e.props)?void 0:t.message)===i.message});if(e)return e.props.repeatNum+=1,e.props.type=i.type,e.handler}if(Kn(ll.max)&&r.length>=ll.max)return{close:()=>{}};const n=Ml(i,t);return r.push(n),n.handler};Tl.forEach(e=>{Ol[e]=(t={},i)=>Ol({...Dl(t),type:e},i)}),Ol.closeAll=function(e){for(const t in Il)if(g(Il,t)){const i=[...Il[t]];for(const t of i)e&&e!==t.props.type||t.handler.close()}},Ol.closeAllByPlacement=function(e){Il[e]&&[...Il[e]].forEach(e=>e.handler.close())},Ol._context=null;const Nl=To(Ol,"$message");var Fl=(e=>(e.LIGHT="light",e.DARK="dark",e.AUTO="auto",e))(Fl||{}),Ul=(e=>(e.EN="en",e.ES="es",e.PL="pl",e.IT="it",e.RO="ro",e.ID="id",e.FR="fr",e.HI="hi",e.RU="ru",e.JA="ja",e.ZH="zh_TW",e))(Ul||{});const Bl=[{value:"en",label:"EN",name:"English"},{value:"es",label:"ES",name:"Español"},{value:"pl",label:"PL",name:"Polski"},{value:"it",label:"IT",name:"Italiano"},{value:"ro",label:"RO",name:"Română"},{value:"fr",label:"FR",name:"Français"},{value:"hi",label:"HI",name:"हिंदी"},{value:"ru",label:"RU",name:"Русский язык"},{value:"ja",label:"JP",name:"日本語"},{value:"zh_TW",label:"ZH",name:"繁體中文"}],zl=["en","zh_TW","ja","es","fr","it","ru","pl","ro","hi"],jl={tagsView:!0,sidebarLogo:!0,theme:Fl.DARK,language:Ul.EN,themeColor:"#409EFF"};var $l={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"},inputOTP:{groupLabel:"一次性密码输入框",defaultLabel:"请输入第 {index} 位 OTP 字符"}}},Gl=(e=>(e.DESKTOP="desktop",e.MOBILE="mobile",e))(Gl||{}),ql=(e=>(e.OPENED="opened",e.CLOSED="closed",e))(ql||{});const Hl="token",Vl="refreshToken",Wl="userInfo",Kl="guestUserName",Yl="chatListWithUnread",Jl="chatsList",Xl="authRouterRedirect",Ql="pendingOrder",Zl="languageManualSet",ec="isTempGuest",tc="tempGuestToken",ic="cookieConsent",rc=(e,t)=>{if(e)return"string"!=typeof t&&(t=JSON.stringify(t)),window.localStorage.setItem(e,t)},ac=e=>{if(e)try{return JSON.parse(window.localStorage.getItem(e))}catch(t){return window.localStorage.getItem(e)}},nc=e=>{if(e)return window.localStorage.removeItem(e)},sc={},oc=function(e,t,i){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),i=(null==e?void 0:e.nonce)||(null==e?void 0:e.getAttribute("nonce"));r=Promise.allSettled(t.map(e=>{if((e=function(e){return"/"+e}(e))in sc)return;sc[e]=!0;const t=e.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${r}`))return;const a=document.createElement("link");return a.rel=t?"stylesheet":"modulepreload",t||(a.as="script"),a.crossOrigin="",a.href=e,i&&a.setAttribute("nonce",i),document.head.appendChild(a),t?new Promise((t,i)=>{a.addEventListener("load",t),a.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function a(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&a(e.reason);return e().catch(a)})};function lc(e){return"room-1"===e?"room-5":"room-5"===e?"room-1":e}function cc(e){return"__pk_entry__"===e?"/duel":"/duel/"+encodeURIComponent(lc(e))}const dc={title:"Duel Live",allGifts:"All gifts",chatroom:"Chatroom",connecting:"Connecting to the room…",loginToChat:"Sign in to chat and support your favourite host.",privateChat:"Private chat",oneToOne:"1:1 live",supportHost:"Support {host}",continueWith:"Continue with {host}",confirm:"Confirm",chooseAgain:"Choose again",free:"Free",confirmIn:"Confirm within {seconds}s",selectionExpired:"This selection has expired",retryNext:"Confirmation unconfirmed · Retry safely",nextConfirmed:"Confirmed · waiting for the next challenge",continueWatching:"Continue watching",matchMvp:"MATCH MVP",roundMvp:"ROUND {round} MVP",mvpPoints:"{points} gift points",roundsWon:"ROUNDS WON",totalPoints:"TOTAL GIFT POINTS",membership:"Membership",membershipTitle:"The best is still ahead",membershipDescription:"Become a member for the exciting final two rounds and surprise rewards. The #1 supporter gets the biggest surprise.",exploreMembership:"Explore membership",rankShort:"Rank",myRank:"My rank",notRanked:"Not ranked",rankGap:"{points} more points to move up.",rankGift:"One {gift} can change your rank.",rewardRulesTitle:"The biggest surprise goes to #1",rewardRulesTop:"The #1 supporter after all five rounds receives the top supporter reward: a photo album or 10–100 coins under the current reward rules.",rewardRulesRanking:"Rank is based on total gift points across the match. The first viewer to reach a tied total ranks higher.",rewardRulesCompletion:"Other viewers who complete all five rounds also have a chance to win a surprise: a 30% chance of 1–6 coins, a 20% chance of 7–18 coins, or a 50% chance of a single photo of the winning host. Drawn matches award 1–20 coins.",rewardRulesOnce:"You receive one reward per match.",rewardRulesLink:"Reward rules",rewardRules:"Rewards unlock after all five rounds. The #1 supporter receives the biggest surprise: an album for the first two top claims, then 10–100 coins. Other viewers who finish all five rounds have a 30% chance of 1–6 coins, a 20% chance of 7–18 coins, or a 50% chance of one winning host photo. A drawn match awards 1–20 coins.",tapForSound:"Tap for sound",nextRoundStarts:"Next round starts soon",finalResultsNext:"Match results coming next",nextMatch:"Next challenge",nextIn:"Continue in {seconds}s",close:"Close",loading:"Loading…",noCollections:"No collections yet",viewCollection:"View collection",unlockFor:"Unlock for",collectionUnlocked:"Collection unlocked",rewards:"Rewards",rewardReady:"Reward ready",fiveRounds:"5 ROUNDS",claimReward:"Claim reward",viewReward:"View reward",rewardClaimed:"Reward Claimed!",addedToBalance:"Added to your balance",gotIt:"Got It",matchComplete:"Match complete",rewardWaiting:"Your reward is ready",goodLuck:"Good luck!",youWon:"You won",photoAlbum:"Photo album",photoReward:"Photo reward",savingCollection:"Saving to your collection…",addedToCollection:"Added to your collection",collectCoins:"Collect coins",claimedToast:"Reward claimed successfully",all:"All",chatPlaceholder:"Say something…",sendRetry:"Message unconfirmed · Retry",chatMembershipTitle:"Keep chatting",chatMembershipDescription:"Become a member for unlimited chat with the hosts.",enter:"Enter room",waiting:"Waiting for two available creators",empty:"No Duel rooms are available",retry:"Retry",back:"Back",rank:"Top supporters",chat:"Chat",gifts:"Gifts",round:"Round",login:"Sign in to join",error:"Could not connect to the room",theme:"Five rounds · Pick your side",drawn:"Match drawn",wins:"wins",balance:"Coins",sound:"Sound",send:"Send",giftsClosed:"Gifting opens next round",retryGift:"Delivery unconfirmed · Retry safely",giftSent:"Gift sent",giftClosed:"This round has ended",giftConflict:"Please choose the gift again",giftInsufficient:"Not enough coins",topAlbumPolicy:"The first two top supporter claims award albums, then 10–100 coins.",gallery:"Gallery",more:"More",credits:"Credits",live:"LIVE",chooseHost:"Choose {host}",tapSupport:"Tap to support",selected:"SELECTED",chooseGiftHost:"Choose who to send a gift to",selectHint:"First, choose the host you want to send a gift to.",performing:"SHE PERFORMS",programmeProgress:"Programme progress",selectionIn:"Continue selection in",backRooms:"Back to rooms",duelOver:"DUEL OVER",hostWins:"{host} wins",chooseContinue:"CHOOSE WHO TO CONTINUE DUEL WITH",getReady:"GET READY",gifting:"GIFTING",duelResult:"DUEL RESULT",roundResult:"ROUND {round} · DUEL RESULT",lastCall:"LAST CALL",giftingCountdown:"Gifting closes countdown",giftingCloses:"Gifts close before the challenge",tied:"Both sides are tied",leading:"{host} is leading",chooseSide:"CHOOSE YOUR GIRL · TAP TO SUPPORT",roundResults:"Round results",inProgress:"In progress",upcoming:"Upcoming",roundDrawn:"Round drawn",roundWins:"{host} wins this round",summaryRounds:"ROUNDS WON · 5 ROUNDS",matchPoints:"{points} gift points across all five rounds",roundPoints:"{points} gift points this round",matchReward:"MATCH REWARD",received:"{name} received",coinsAmount:"+{coins} coins",coinsReward:"Coins reward",hostCollection:"{host}’s collection",joinedTop:"{name} joined the Top 5",rankPoints:"Rank #{rank} · {points} gift points",becameTop:"{name} became {host}’s top supporter",snatchedTop:"{name} took the top supporter spot for {host}",previousTop:"Previously {name}",duelUpdate:"Duel update",sent:"sent",entered:"entered the room",pickMessage:"{a} or {b}? Pick your side.",gapMessage:"{host} is {points} points behind. A {gift} could put them ahead!",tiedMessage:"Scores are tied! {seconds} seconds left.",leadMessage:"{host} is in the lead! {seconds} seconds left.",pleaseWait:"Please wait",hostsReady:"{a} & {b} are getting ready.",gettingReady:"Your hosts are getting ready.",chatMessages:"Chat messages",points:"Points",spotlight:"Spotlight",rhythm:"Rhythm",colour:"Colour",starlight:"Starlight",finale:"Finale",encore:"Encore",spotlightChallenge:"Spotlight challenge",rhythmChallenge:"Rhythm challenge",colourChallenge:"Colour challenge",starlightChallenge:"Starlight challenge",finaleChallenge:"Finale challenge",bestMoves:"Who has the best moves?",sentGift:"{name} sent {host} {gift}",grandFinale:"Grand finale",ownsSpotlight:"Who owns the spotlight?",rocksLook:"Who rocks this look?",stealsShow:"Who steals the show?",finalVote:"Who wins your final vote?",secondsShort:"{seconds}s",sendGiftPrompt:"Send a gift",roundComplete:"Round {round} complete",programmeIn:"Performance starts in {seconds}s",roundStartsIn:"Round {round} starts in {seconds}s",finalResultsIn:"Match results in {seconds}s",introSupporterPerk:"Top Supporter takes the winner private"},uc={title:"Duel 直播",allGifts:"全部禮物",chatroom:"聊天室",connecting:"正在連線至直播間…",loginToChat:"登入後即可聊天並支持喜愛的主播。",privateChat:"私聊",oneToOne:"一對一直播",supportHost:"支持 {host}",continueWith:"繼續支持 {host}",confirm:"確認",chooseAgain:"重新選擇",free:"免費",confirmIn:"請於 {seconds} 秒內確認",selectionExpired:"選擇已過期",retryNext:"結果待確認 · 可安全重試",nextConfirmed:"已確認,等待下一場挑戰",continueWatching:"繼續觀看",matchMvp:"全場 MVP",roundMvp:"第 {round} 輪 MVP",mvpPoints:"{points} 禮物積分",roundsWon:"獲勝輪數",totalPoints:"累計禮物積分",membership:"會員",membershipTitle:"最精彩的還在後頭",membershipDescription:"開通會員,觀看最後兩輪精彩節目及驚喜獎勵。榜首的驚喜最大。",exploreMembership:"探索會員權益",rankShort:"榜單",myRank:"我的排名",notRanked:"未上榜",rankGap:"還差 {points} 積分即可提升一名。",rankGift:"一份 {gift} 就能改變排名。",rewardRulesTitle:"最大的驚喜屬於榜首",rewardRulesRanking:"排名依整場累計禮物積分計算。積分相同時,先達到該積分的觀眾排名較高。",rewardRulesTop:"五輪全部結束後,榜首支持者依現行規則獲得最高支持獎勵:一套相冊或 10–100 枚金幣。",rewardRulesCompletion:"其他完整看完五輪的觀眾也有機會獲得驚喜:30% 機率獲得 1–6 枚金幣、20% 機率獲得 7–18 枚金幣,或 50% 機率獲得勝方主播的一張照片。平局獎勵 1–20 枚金幣。",rewardRulesOnce:"每場比賽僅獲得一份獎勵。",rewardRulesLink:"獎勵規則",tapForSound:"點擊開啟聲音",nextRoundStarts:"即將進入下一輪",finalResultsNext:"即將公布整場結果",nextMatch:"下一場挑戰",nextIn:"{seconds} 秒後繼續",close:"關閉",loading:"載入中…",noCollections:"暫無相冊",viewCollection:"查看相冊",unlockFor:"解鎖",collectionUnlocked:"相冊已解鎖",rewards:"獎勵",rewardReady:"獎勵待領取",fiveRounds:"五輪完賽",claimReward:"領取獎勵",viewReward:"查看獎勵",rewardClaimed:"領取成功!",addedToBalance:"已加入餘額",gotIt:"知道了",matchComplete:"挑戰完成",rewardWaiting:"你的獎勵已準備就緒",goodLuck:"祝你好運!",youWon:"獲得",photoAlbum:"相冊獎勵",photoReward:"照片獎勵",savingCollection:"正在存入收藏…",addedToCollection:"已加入收藏",collectCoins:"領取金幣",claimedToast:"獎勵領取成功",all:"所有人",chatPlaceholder:"說點什麼…",sendRetry:"訊息結果待確認 · 重試",chatMembershipTitle:"繼續暢聊",chatMembershipDescription:"開通會員,與主播無限暢聊。",enter:"進入房間",waiting:"等待兩位空閒主播",empty:"暫無可用的 Duel 直播間",retry:"重試",back:"返回",rank:"支持榜",chat:"聊天",gifts:"禮物",round:"輪次",login:"登入後加入",error:"暫時無法連線至房間",theme:"五輪挑戰 · 選擇支持對象",drawn:"本場平局",wins:"獲勝",balance:"金幣",sound:"聲音",send:"傳送",giftsClosed:"下一輪開放送禮",retryGift:"送禮結果待確認 · 可安全重試",giftSent:"禮物已送出",giftClosed:"本輪已結束",giftConflict:"請重新選擇禮物",giftInsufficient:"金幣不足",topAlbumPolicy:"前兩次領取榜首獎勵為相冊,之後為 10–100 枚金幣。",rewardRules:"五輪全部結束後,榜首支持者依現行規則獲得最高支持獎勵:一套相冊或 10–100 枚金幣。 前兩次領取榜首獎勵為相冊,之後為 10–100 枚金幣。 其他完整看完五輪的觀眾也有機會獲得驚喜:30% 機率獲得 1–6 枚金幣、20% 機率獲得 7–18 枚金幣,或 50% 機率獲得勝方主播的一張照片。平局獎勵 1–20 枚金幣。 每場比賽僅獲得一份獎勵。",gallery:"相冊",more:"更多",credits:"儲值",live:"直播",chooseHost:"選擇 {host}",tapSupport:"點擊支持",selected:"已選擇",chooseGiftHost:"選擇收禮主播",selectHint:"請先選擇要送禮物的主播",performing:"節目表演中",programmeProgress:"節目進度",selectionIn:"距離繼續選擇",backRooms:"返回房間列表",duelOver:"對決結束",hostWins:"{host} 獲勝",chooseContinue:"選擇繼續對決的主播",getReady:"準備開始",gifting:"送禮中",duelResult:"對決結果",roundResult:"第 {round} 輪 · 對決結果",lastCall:"最後機會",giftingCountdown:"送禮結束倒數",giftingCloses:"挑戰開始前停止送禮",tied:"雙方平手",leading:"{host} 暫時領先",chooseSide:"選擇主播 · 點擊支持",roundResults:"各輪結果",inProgress:"進行中",upcoming:"尚未開始",roundDrawn:"本輪平局",roundWins:"{host} 贏得本輪",summaryRounds:"獲勝輪數 · 共五輪",matchPoints:"五輪共貢獻 {points} 禮物積分",roundPoints:"本輪貢獻 {points} 禮物積分",matchReward:"完賽獎勵",received:"{name} 獲得",coinsAmount:"+{coins} 金幣",coinsReward:"金幣獎勵",hostCollection:"{host} 的相冊",joinedTop:"{name} 進入前五名",rankPoints:"第 {rank} 名 · {points} 禮物積分",becameTop:"{name} 成為 {host} 的榜首支持者",snatchedTop:"{name} 奪下 {host} 的榜首支持者",previousTop:"原榜首 {name}",duelUpdate:"對決動態",sent:"送給",entered:"進入直播間",pickMessage:"{a} 還是 {b}?選擇支持對象。",gapMessage:"{host} 落後 {points} 分。一份 {gift} 就能反超!",tiedMessage:"雙方平手!還剩 {seconds} 秒。",leadMessage:"{host} 領先!還剩 {seconds} 秒。",pleaseWait:"請稍候",hostsReady:"{a} 與 {b} 正在準備中。",gettingReady:"主播正在準備中。",chatMessages:"聊天訊息",points:"積分",spotlight:"聚光燈",rhythm:"律動",colour:"色彩",starlight:"星光",finale:"終章",encore:"安可",spotlightChallenge:"聚光燈挑戰",rhythmChallenge:"律動挑戰",colourChallenge:"色彩挑戰",starlightChallenge:"星光挑戰",finaleChallenge:"終章挑戰",bestMoves:"誰的舞姿最出色?",sentGift:"{name} 送給 {host} {gift}",grandFinale:"盛大終章",ownsSpotlight:"誰最耀眼?",rocksLook:"誰最適合這個造型?",stealsShow:"誰最搶鏡?",finalVote:"你最後的一票給誰?",secondsShort:"{seconds}秒",sendGiftPrompt:"送禮支持",roundComplete:"第 {round} 輪完成",programmeIn:"{seconds} 秒後開始節目",roundStartsIn:"第 {round} 輪將於 {seconds} 秒後開始",finalResultsIn:"{seconds} 秒後公布整場結果",introSupporterPerk:"榜首支持者可與勝方私密互動"},hc={title:"Duel en directo",allGifts:"Todos los regalos",chatroom:"Sala de chat",connecting:"Conectando con la sala…",loginToChat:"Inicia sesión para chatear y apoyar a tu anfitriona favorita.",privateChat:"Chat privado",oneToOne:"Directo 1:1",supportHost:"Apoyar a {host}",continueWith:"Continuar con {host}",confirm:"Confirmar",chooseAgain:"Elegir de nuevo",free:"Gratis",confirmIn:"Confirma en {seconds} s",selectionExpired:"La selección ha caducado",retryNext:"Confirmación pendiente · Reintentar",nextConfirmed:"Confirmado · Esperando el próximo desafío",continueWatching:"Seguir viendo",matchMvp:"MVP DEL DUELO",roundMvp:"MVP DE LA RONDA {round}",mvpPoints:"{points} puntos de regalos",roundsWon:"RONDAS GANADAS",totalPoints:"PUNTOS TOTALES DE REGALOS",membership:"Membresía",membershipTitle:"Lo mejor está por venir",membershipDescription:"Hazte miembro para disfrutar de las dos últimas rondas y recompensas sorpresa. El apoyo n.º 1 recibe la mayor sorpresa.",exploreMembership:"Ver membresía",rankShort:"Ranking",myRank:"Mi posición",notRanked:"Sin clasificar",rankGap:"Faltan {points} puntos para subir de posición.",rankGift:"Un regalo de {gift} puede cambiar tu posición.",rewardRulesTitle:"La mayor sorpresa es para el n.º 1",rewardRulesRanking:"La posición se basa en los puntos de regalos de todo el duelo. En caso de empate, queda por delante quien alcanzó antes esa puntuación.",rewardRulesTop:"Tras las cinco rondas, el apoyo n.º 1 recibe el premio principal: un álbum o 10–100 monedas según las reglas actuales.",rewardRulesCompletion:"Los demás espectadores que completen las cinco rondas tienen un 30% de probabilidad de ganar 1–6 monedas, un 20% de ganar 7–18 monedas y un 50% de recibir una foto de la anfitriona ganadora. Los duelos empatados otorgan 1–20 monedas.",rewardRulesOnce:"Recibes una recompensa por duelo.",rewardRulesLink:"Reglas de premios",tapForSound:"Toca para activar el sonido",nextRoundStarts:"La próxima ronda empieza pronto",finalResultsNext:"Los resultados finales llegan pronto",nextMatch:"Próximo desafío",nextIn:"Continuar en {seconds} s",close:"Cerrar",loading:"Cargando…",noCollections:"Aún no hay álbumes",viewCollection:"Ver álbum",unlockFor:"Desbloquear por",collectionUnlocked:"Álbum desbloqueado",rewards:"Recompensas",rewardReady:"Premio disponible",fiveRounds:"5 rondas",claimReward:"Recoger premio",viewReward:"Ver premio",rewardClaimed:"¡Premio recogido!",addedToBalance:"Añadido a tu saldo",gotIt:"Entendido",matchComplete:"Duelo completado",rewardWaiting:"Tu premio está listo",goodLuck:"¡Buena suerte!",youWon:"Has ganado",photoAlbum:"Álbum de fotos",photoReward:"Premio de foto",savingCollection:"Guardando en tu colección…",addedToCollection:"Añadido a tu colección",collectCoins:"Recoger monedas",claimedToast:"Premio recogido correctamente",all:"Todos",chatPlaceholder:"Di algo…",sendRetry:"Mensaje pendiente · Reintentar",chatMembershipTitle:"Sigue chateando",chatMembershipDescription:"Hazte miembro para chatear sin límites con las anfitrionas.",enter:"Entrar en la sala",waiting:"Esperando a dos anfitrionas disponibles",empty:"No hay salas de Duel disponibles",retry:"Reintentar",back:"Volver",rank:"Mejores apoyos",chat:"Chat",gifts:"Regalos",round:"Ronda",login:"Inicia sesión para unirte",error:"No se pudo conectar con la sala",theme:"Cinco rondas · Elige tu lado",drawn:"Duelo empatado",wins:"gana",balance:"Monedas",sound:"Sonido",send:"Enviar",giftsClosed:"Los regalos se abren en la próxima ronda",retryGift:"Entrega pendiente · Reintentar",giftSent:"Regalo enviado",giftClosed:"Esta ronda ha terminado",giftConflict:"Vuelve a elegir el regalo",giftInsufficient:"No hay suficientes monedas",topAlbumPolicy:"Las dos primeras recompensas de primer puesto son álbumes; después, 10–100 monedas.",rewardRules:"Tras las cinco rondas, el apoyo n.º 1 recibe el premio principal: un álbum o 10–100 monedas según las reglas actuales. Las dos primeras recompensas de primer puesto son álbumes; después, 10–100 monedas. Los demás espectadores que completen las cinco rondas tienen un 30% de probabilidad de ganar 1–6 monedas, un 20% de ganar 7–18 monedas y un 50% de recibir una foto de la anfitriona ganadora. Los duelos empatados otorgan 1–20 monedas. Recibes una recompensa por duelo.",gallery:"Galería",more:"Más",credits:"Créditos",live:"EN DIRECTO",chooseHost:"Elige a {host}",tapSupport:"Toca para apoyar",selected:"SELECCIONADA",chooseGiftHost:"Elige a quién enviar el regalo",selectHint:"Primero, elige a la anfitriona a la que quieres enviar un regalo.",performing:"EN ACTUACIÓN",programmeProgress:"Progreso de la actuación",selectionIn:"Selecciona de nuevo en",backRooms:"Volver a las salas",duelOver:"DUELO TERMINADO",hostWins:"{host} gana",chooseContinue:"ELIGE CON QUIÉN CONTINUAR EL DUELO",getReady:"PREPÁRATE",gifting:"REGALOS",duelResult:"RESULTADO DEL DUELO",roundResult:"RONDA {round} · RESULTADO",lastCall:"ÚLTIMA OPORTUNIDAD",giftingCountdown:"Cuenta atrás de regalos",giftingCloses:"Los regalos cierran antes del desafío",tied:"Ambos lados están empatados",leading:"{host} va en cabeza",chooseSide:"ELIGE A TU FAVORITA · TOCA PARA APOYAR",roundResults:"Resultados por ronda",inProgress:"En curso",upcoming:"Próximamente",roundDrawn:"Ronda empatada",roundWins:"{host} gana esta ronda",summaryRounds:"RONDAS GANADAS · 5 RONDAS",matchPoints:"{points} puntos de regalos en las cinco rondas",roundPoints:"{points} puntos de regalos esta ronda",matchReward:"PREMIO DEL DUELO",received:"{name} recibió",coinsAmount:"+{coins} monedas",coinsReward:"Premio de monedas",hostCollection:"Colección de {host}",joinedTop:"{name} entró en el Top 5",rankPoints:"Puesto n.º {rank} · {points} puntos de regalos",becameTop:"{name} es el mayor apoyo de {host}",snatchedTop:"{name} tomó el primer puesto de apoyo de {host}",previousTop:"Antes: {name}",duelUpdate:"Novedades del duelo",sent:"envió a",entered:"entró en la sala",pickMessage:"¿{a} o {b}? Elige tu lado.",gapMessage:"{host} va {points} puntos por detrás. ¡Un regalo de {gift} podría ponerla en cabeza!",tiedMessage:"¡Empate! Quedan {seconds} segundos.",leadMessage:"¡{host} va en cabeza! Quedan {seconds} segundos.",pleaseWait:"Espera un momento",hostsReady:"{a} y {b} se están preparando.",gettingReady:"Las anfitrionas se están preparando.",chatMessages:"Mensajes de chat",points:"Puntos",spotlight:"Protagonismo",rhythm:"Ritmo",colour:"Color",starlight:"Luz de estrellas",finale:"Gran final",encore:"Bis",spotlightChallenge:"Desafío de protagonismo",rhythmChallenge:"Desafío de ritmo",colourChallenge:"Desafío de color",starlightChallenge:"Desafío estelar",finaleChallenge:"Desafío final",bestMoves:"¿Quién tiene los mejores movimientos?",sentGift:"{name} envió {gift} a {host}",grandFinale:"Gran final",ownsSpotlight:"¿Quién se lleva el protagonismo?",rocksLook:"¿Quién luce mejor este estilo?",stealsShow:"¿Quién se roba el espectáculo?",finalVote:"¿Quién se lleva tu último voto?",secondsShort:"{seconds}s",sendGiftPrompt:"Envía un regalo",roundComplete:"Ronda {round} completada",programmeIn:"La actuación empieza en {seconds} s",roundStartsIn:"La ronda {round} empieza en {seconds} s",finalResultsIn:"Resultados finales en {seconds} s",introSupporterPerk:"El mayor fan accede en privado a la ganadora"},pc={title:"Duel en direct",allGifts:"Tous les cadeaux",chatroom:"Salon de discussion",connecting:"Connexion au salon…",loginToChat:"Connectez-vous pour discuter et soutenir votre animatrice préférée.",privateChat:"Discussion privée",oneToOne:"Direct 1:1",supportHost:"Soutenir {host}",continueWith:"Continuer avec {host}",confirm:"Confirmer",chooseAgain:"Choisir à nouveau",free:"Gratuit",confirmIn:"Confirmez sous {seconds} s",selectionExpired:"La sélection a expiré",retryNext:"Confirmation en attente · Réessayer",nextConfirmed:"Confirmé · En attente du prochain défi",continueWatching:"Continuer à regarder",matchMvp:"MVP DU DUEL",roundMvp:"MVP DE LA MANCHE {round}",mvpPoints:"{points} points de cadeaux",roundsWon:"MANCHES GAGNÉES",totalPoints:"TOTAL DES POINTS DE CADEAUX",membership:"Abonnement",membershipTitle:"Le meilleur reste à venir",membershipDescription:"Abonnez-vous pour les deux dernières manches et les récompenses surprises. Le soutien n° 1 reçoit la plus grande surprise.",exploreMembership:"Découvrir l’abonnement",rankShort:"Classement",myRank:"Mon classement",notRanked:"Non classé",rankGap:"Encore {points} points pour monter au classement.",rankGift:"Un cadeau {gift} peut changer votre classement.",rewardRulesTitle:"La plus grande surprise revient au n° 1",rewardRulesRanking:"Le classement dépend des points de cadeaux sur tout le duel. À égalité, la personne ayant atteint ce total en premier est devant.",rewardRulesTop:"Après les cinq manches, le soutien n° 1 reçoit la récompense principale : un album ou 10–100 pièces selon les règles en vigueur.",rewardRulesCompletion:"Les autres spectateurs ayant suivi les cinq manches ont 30% de chances de gagner 1–6 pièces, 20% de gagner 7–18 pièces et 50% de recevoir une photo de l’animatrice gagnante. Un match nul rapporte 1–20 pièces.",rewardRulesOnce:"Vous recevez une récompense par duel.",rewardRulesLink:"Règles des récompenses",tapForSound:"Touchez pour le son",nextRoundStarts:"La prochaine manche commence bientôt",finalResultsNext:"Les résultats finaux arrivent",nextMatch:"Prochain défi",nextIn:"Suite dans {seconds} s",close:"Fermer",loading:"Chargement…",noCollections:"Aucun album pour le moment",viewCollection:"Voir l’album",unlockFor:"Débloquer pour",collectionUnlocked:"Album débloqué",rewards:"Récompenses",rewardReady:"Récompense disponible",fiveRounds:"5 manches",claimReward:"Récupérer la récompense",viewReward:"Voir la récompense",rewardClaimed:"Récompense récupérée !",addedToBalance:"Ajouté à votre solde",gotIt:"Compris",matchComplete:"Duel terminé",rewardWaiting:"Votre récompense est prête",goodLuck:"Bonne chance !",youWon:"Vous avez gagné",photoAlbum:"Album photo",photoReward:"Récompense photo",savingCollection:"Ajout à votre collection…",addedToCollection:"Ajouté à votre collection",collectCoins:"Récupérer les pièces",claimedToast:"Récompense récupérée avec succès",all:"Tous",chatPlaceholder:"Dites quelque chose…",sendRetry:"Message en attente · Réessayer",chatMembershipTitle:"Continuez à discuter",chatMembershipDescription:"Abonnez-vous pour discuter sans limites avec les animatrices.",enter:"Entrer dans le salon",waiting:"En attente de deux animatrices disponibles",empty:"Aucun salon Duel disponible",retry:"Réessayer",back:"Retour",rank:"Meilleurs soutiens",chat:"Discussion",gifts:"Cadeaux",round:"Manche",login:"Connectez-vous pour participer",error:"Connexion au salon impossible",theme:"Cinq manches · Choisissez votre camp",drawn:"Match nul",wins:"gagne",balance:"Pièces",sound:"Son",send:"Envoyer",giftsClosed:"Les cadeaux reprennent à la prochaine manche",retryGift:"Envoi en attente · Réessayer",giftSent:"Cadeau envoyé",giftClosed:"Cette manche est terminée",giftConflict:"Veuillez choisir à nouveau le cadeau",giftInsufficient:"Pièces insuffisantes",topAlbumPolicy:"Les deux premières récompenses de leader sont des albums, puis 10–100 pièces.",rewardRules:"Après les cinq manches, le soutien n° 1 reçoit la récompense principale : un album ou 10–100 pièces selon les règles en vigueur. Les deux premières récompenses de leader sont des albums, puis 10–100 pièces. Les autres spectateurs ayant suivi les cinq manches ont 30% de chances de gagner 1–6 pièces, 20% de gagner 7–18 pièces et 50% de recevoir une photo de l’animatrice gagnante. Un match nul rapporte 1–20 pièces. Vous recevez une récompense par duel.",gallery:"Galerie",more:"Plus",credits:"Crédits",live:"EN DIRECT",chooseHost:"Choisissez {host}",tapSupport:"Touchez pour soutenir",selected:"SÉLECTIONNÉE",chooseGiftHost:"À qui souhaitez-vous offrir ce cadeau ?",selectHint:"Choisissez d’abord l’animatrice à qui vous souhaitez envoyer un cadeau.",performing:"EN SPECTACLE",programmeProgress:"Progression du spectacle",selectionIn:"Prochaine sélection dans",backRooms:"Retour aux salons",duelOver:"DUEL TERMINÉ",hostWins:"{host} gagne",chooseContinue:"CHOISISSEZ AVEC QUI CONTINUER LE DUEL",getReady:"PRÉPAREZ-VOUS",gifting:"CADEAUX",duelResult:"RÉSULTAT DU DUEL",roundResult:"MANCHE {round} · RÉSULTAT DU DUEL",lastCall:"DERNIÈRE CHANCE",giftingCountdown:"Compte à rebours des cadeaux",giftingCloses:"Les cadeaux ferment avant le défi",tied:"Les deux camps sont à égalité",leading:"{host} mène",chooseSide:"CHOISISSEZ · TOUCHEZ POUR SOUTENIR",roundResults:"Résultats des manches",inProgress:"En cours",upcoming:"À venir",roundDrawn:"Manche nulle",roundWins:"{host} gagne cette manche",summaryRounds:"MANCHES GAGNÉES · 5 MANCHES",matchPoints:"{points} points de cadeaux sur les cinq manches",roundPoints:"{points} points de cadeaux cette manche",matchReward:"RÉCOMPENSE DU DUEL",received:"{name} a reçu",coinsAmount:"+{coins} pièces",coinsReward:"Récompense en pièces",hostCollection:"Collection de {host}",joinedTop:"{name} entre dans le Top 5",rankPoints:"Rang n° {rank} · {points} points de cadeaux",becameTop:"{name} devient le meilleur soutien de {host}",snatchedTop:"{name} prend la première place des soutiens de {host}",previousTop:"Précédemment : {name}",duelUpdate:"Actualité du duel",sent:"a envoyé à",entered:"a rejoint le salon",pickMessage:"{a} ou {b} ? Choisissez votre camp.",gapMessage:"{host} a {points} points de retard. Un cadeau {gift} pourrait la faire passer devant !",tiedMessage:"Égalité ! Il reste {seconds} secondes.",leadMessage:"{host} mène ! Il reste {seconds} secondes.",pleaseWait:"Veuillez patienter",hostsReady:"{a} et {b} se préparent.",gettingReady:"Vos animatrices se préparent.",chatMessages:"Messages du chat",points:"Points",spotlight:"Sous les projecteurs",rhythm:"Rythme",colour:"Couleur",starlight:"Lumière des étoiles",finale:"Finale",encore:"Rappel",spotlightChallenge:"Défi sous les projecteurs",rhythmChallenge:"Défi du rythme",colourChallenge:"Défi des couleurs",starlightChallenge:"Défi stellaire",finaleChallenge:"Défi final",bestMoves:"Qui a les meilleurs mouvements ?",sentGift:"{name} a envoyé {gift} à {host}",grandFinale:"Grande finale",ownsSpotlight:"Qui capte tous les regards ?",rocksLook:"Qui porte le mieux ce look ?",stealsShow:"Qui vole la vedette ?",finalVote:"À qui va votre dernier vote ?",secondsShort:"{seconds}s",sendGiftPrompt:"Envoyez un cadeau",roundComplete:"Manche {round} terminée",programmeIn:"Le spectacle commence dans {seconds} s",roundStartsIn:"La manche {round} commence dans {seconds} s",finalResultsIn:"Résultats du duel dans {seconds} s",introSupporterPerk:"Le meilleur soutien retrouve la gagnante en privé"},mc={title:"Duel dal vivo",allGifts:"Tutti i regali",chatroom:"Chat room",connecting:"Connessione alla stanza…",loginToChat:"Accedi per chattare e sostenere la tua conduttrice preferita.",privateChat:"Chat privata",oneToOne:"Live 1:1",supportHost:"Sostieni {host}",continueWith:"Continua con {host}",confirm:"Conferma",chooseAgain:"Scegli di nuovo",free:"Gratis",confirmIn:"Conferma entro {seconds} s",selectionExpired:"Selezione scaduta",retryNext:"Conferma in sospeso · Riprova",nextConfirmed:"Confermato · In attesa della prossima sfida",continueWatching:"Continua a guardare",matchMvp:"MVP DEL DUELLO",roundMvp:"MVP DEL ROUND {round}",mvpPoints:"{points} punti regalo",roundsWon:"ROUND VINTI",totalPoints:"PUNTI REGALO TOTALI",membership:"Abbonamento",membershipTitle:"Il meglio deve ancora arrivare",membershipDescription:"Abbonati per gli ultimi due round e premi a sorpresa. Il sostenitore n. 1 riceve la sorpresa più grande.",exploreMembership:"Scopri l’abbonamento",rankShort:"Classifica",myRank:"La mia posizione",notRanked:"Non in classifica",rankGap:"Mancano {points} punti per salire in classifica.",rankGift:"Un regalo {gift} può cambiare la tua posizione.",rewardRulesTitle:"La sorpresa più grande va al n. 1",rewardRulesRanking:"La classifica si basa sui punti regalo di tutto il duello. A parità di punti, ha precedenza chi ha raggiunto prima quel totale.",rewardRulesTop:"Dopo tutti e cinque i round, il sostenitore n. 1 riceve il premio principale: un album o 10–100 monete secondo le regole attuali.",rewardRulesCompletion:"Gli altri spettatori che completano i cinque round hanno il 30% di probabilità di vincere 1–6 monete, il 20% di vincere 7–18 monete e il 50% di ricevere una foto della conduttrice vincente. I pareggi assegnano 1–20 monete.",rewardRulesOnce:"Ricevi un premio per duello.",rewardRulesLink:"Regole dei premi",tapForSound:"Tocca per l’audio",nextRoundStarts:"Il prossimo round inizia a breve",finalResultsNext:"Risultati finali in arrivo",nextMatch:"Prossima sfida",nextIn:"Continua tra {seconds} s",close:"Chiudi",loading:"Caricamento…",noCollections:"Nessun album disponibile",viewCollection:"Visualizza album",unlockFor:"Sblocca per",collectionUnlocked:"Album sbloccato",rewards:"Premi",rewardReady:"Premio pronto",fiveRounds:"5 round",claimReward:"Ritira premio",viewReward:"Vedi premio",rewardClaimed:"Premio ritirato!",addedToBalance:"Aggiunto al saldo",gotIt:"Capito",matchComplete:"Duello completato",rewardWaiting:"Il tuo premio è pronto",goodLuck:"Buona fortuna!",youWon:"Hai vinto",photoAlbum:"Album fotografico",photoReward:"Premio fotografico",savingCollection:"Salvataggio nella raccolta…",addedToCollection:"Aggiunto alla raccolta",collectCoins:"Ritira monete",claimedToast:"Premio ritirato con successo",all:"Tutti",chatPlaceholder:"Scrivi qualcosa…",sendRetry:"Messaggio in sospeso · Riprova",chatMembershipTitle:"Continua a chattare",chatMembershipDescription:"Abbonati per chattare senza limiti con le conduttrici.",enter:"Entra nella stanza",waiting:"In attesa di due conduttrici disponibili",empty:"Nessuna stanza Duel disponibile",retry:"Riprova",back:"Indietro",rank:"Migliori sostenitori",chat:"Chat",gifts:"Regali",round:"Round",login:"Accedi per partecipare",error:"Impossibile connettersi alla stanza",theme:"Cinque round · Scegli da che parte stare",drawn:"Duello in parità",wins:"vince",balance:"Monete",sound:"Audio",send:"Invia",giftsClosed:"I regali riaprono al prossimo round",retryGift:"Invio in sospeso · Riprova",giftSent:"Regalo inviato",giftClosed:"Questo round è terminato",giftConflict:"Scegli di nuovo il regalo",giftInsufficient:"Monete insufficienti",topAlbumPolicy:"I primi due premi da primo in classifica sono album, poi 10–100 monete.",rewardRules:"Dopo tutti e cinque i round, il sostenitore n. 1 riceve il premio principale: un album o 10–100 monete secondo le regole attuali. I primi due premi da primo in classifica sono album, poi 10–100 monete. Gli altri spettatori che completano i cinque round hanno il 30% di probabilità di vincere 1–6 monete, il 20% di vincere 7–18 monete e il 50% di ricevere una foto della conduttrice vincente. I pareggi assegnano 1–20 monete. Ricevi un premio per duello.",gallery:"Galleria",more:"Altro",credits:"Crediti",live:"LIVE",chooseHost:"Scegli {host}",tapSupport:"Tocca per sostenere",selected:"SELEZIONATA",chooseGiftHost:"Scegli a chi inviare il regalo",selectHint:"Prima scegli la conduttrice a cui vuoi inviare un regalo.",performing:"IN ESIBIZIONE",programmeProgress:"Avanzamento dello spettacolo",selectionIn:"Prossima selezione tra",backRooms:"Torna alle stanze",duelOver:"DUELLO TERMINATO",hostWins:"{host} vince",chooseContinue:"SCEGLI CON CHI CONTINUARE IL DUELLO",getReady:"PREPARATI",gifting:"REGALI",duelResult:"RISULTATO DEL DUELLO",roundResult:"ROUND {round} · RISULTATO",lastCall:"ULTIMA OCCASIONE",giftingCountdown:"Conto alla rovescia dei regali",giftingCloses:"I regali chiudono prima della sfida",tied:"Entrambe le parti sono in parità",leading:"{host} è in vantaggio",chooseSide:"SCEGLI LA TUA PREFERITA · TOCCA PER SOSTENERLA",roundResults:"Risultati dei round",inProgress:"In corso",upcoming:"In arrivo",roundDrawn:"Round in parità",roundWins:"{host} vince questo round",summaryRounds:"ROUND VINTI · 5 ROUND",matchPoints:"{points} punti regalo nei cinque round",roundPoints:"{points} punti regalo in questo round",matchReward:"PREMIO DEL DUELLO",received:"{name} ha ricevuto",coinsAmount:"+{coins} monete",coinsReward:"Premio in monete",hostCollection:"Raccolta di {host}",joinedTop:"{name} entra nella Top 5",rankPoints:"Posizione n. {rank} · {points} punti regalo",becameTop:"{name} diventa il miglior sostenitore di {host}",snatchedTop:"{name} conquista il primo posto tra i sostenitori di {host}",previousTop:"Prima: {name}",duelUpdate:"Novità del duello",sent:"ha inviato a",entered:"è entrato nella stanza",pickMessage:"{a} o {b}? Scegli chi sostenere.",gapMessage:"{host} è indietro di {points} punti. Un regalo {gift} potrebbe farla passare in testa!",tiedMessage:"Punteggio pari! Mancano {seconds} secondi.",leadMessage:"{host} è in testa! Mancano {seconds} secondi.",pleaseWait:"Attendi",hostsReady:"{a} e {b} si stanno preparando.",gettingReady:"Le conduttrici si stanno preparando.",chatMessages:"Messaggi della chat",points:"Punti",spotlight:"Riflettori",rhythm:"Ritmo",colour:"Colore",starlight:"Luce stellare",finale:"Finale",encore:"Bis",spotlightChallenge:"Sfida sotto i riflettori",rhythmChallenge:"Sfida del ritmo",colourChallenge:"Sfida dei colori",starlightChallenge:"Sfida stellare",finaleChallenge:"Sfida finale",bestMoves:"Chi ha le mosse migliori?",sentGift:"{name} ha inviato {gift} a {host}",grandFinale:"Gran finale",ownsSpotlight:"Chi conquista i riflettori?",rocksLook:"Chi sfoggia meglio questo look?",stealsShow:"Chi ruba la scena?",finalVote:"Chi merita il tuo voto finale?",secondsShort:"{seconds}s",sendGiftPrompt:"Invia un regalo",roundComplete:"Round {round} completato",programmeIn:"Lo spettacolo inizia tra {seconds} s",roundStartsIn:"Il round {round} inizia tra {seconds} s",finalResultsIn:"Risultati finali tra {seconds} s",introSupporterPerk:"Il primo sostenitore incontra la vincitrice in privato"},fc={title:"Duel live",allGifts:"Toate cadourile",chatroom:"Cameră de chat",connecting:"Se conectează la cameră…",loginToChat:"Conectează-te pentru a discuta și a susține gazda preferată.",privateChat:"Chat privat",oneToOne:"Live 1:1",supportHost:"Susține {host}",continueWith:"Continuă cu {host}",confirm:"Confirmă",chooseAgain:"Alege din nou",free:"Gratuit",confirmIn:"Confirmă în {seconds} s",selectionExpired:"Selecția a expirat",retryNext:"Confirmare în așteptare · Reîncearcă",nextConfirmed:"Confirmat · Se așteaptă următoarea provocare",continueWatching:"Continuă vizionarea",matchMvp:"MVP AL MECIULUI",roundMvp:"MVP RUNDA {round}",mvpPoints:"{points} puncte din cadouri",roundsWon:"RUNDE CÂȘTIGATE",totalPoints:"TOTAL PUNCTE DIN CADOURI",membership:"Abonament",membershipTitle:"Ce e mai bun urmează",membershipDescription:"Abonează-te pentru ultimele două runde și recompense-surpriză. Susținătorul nr. 1 primește cea mai mare surpriză.",exploreMembership:"Descoperă abonamentul",rankShort:"Clasament",myRank:"Poziția mea",notRanked:"Fără clasament",rankGap:"Încă {points} puncte pentru a urca în clasament.",rankGift:"Un cadou {gift} îți poate schimba poziția.",rewardRulesTitle:"Cea mai mare surpriză merge la nr. 1",rewardRulesRanking:"Clasamentul se bazează pe punctele din cadouri din întregul meci. La egalitate, are prioritate cine a atins primul acel total.",rewardRulesTop:"După toate cele cinci runde, susținătorul nr. 1 primește recompensa principală: un album sau 10–100 de monede, conform regulilor actuale.",rewardRulesCompletion:"Ceilalți spectatori care urmăresc toate cele cinci runde au 30% șanse de a primi 1–6 monede, 20% de a primi 7–18 monede și 50% de a primi o fotografie a gazdei câștigătoare. Egalurile oferă 1–20 de monede.",rewardRulesOnce:"Primești o recompensă pe meci.",rewardRulesLink:"Regulile recompenselor",tapForSound:"Atinge pentru sunet",nextRoundStarts:"Următoarea rundă începe curând",finalResultsNext:"Urmează rezultatele finale",nextMatch:"Următoarea provocare",nextIn:"Continuă în {seconds} s",close:"Închide",loading:"Se încarcă…",noCollections:"Încă nu există albume",viewCollection:"Vezi albumul",unlockFor:"Deblochează pentru",collectionUnlocked:"Album deblocat",rewards:"Recompense",rewardReady:"Recompensă pregătită",fiveRounds:"5 runde",claimReward:"Revendică recompensa",viewReward:"Vezi recompensa",rewardClaimed:"Recompensă revendicată!",addedToBalance:"Adăugat la sold",gotIt:"Am înțeles",matchComplete:"Meci încheiat",rewardWaiting:"Recompensa ta este pregătită",goodLuck:"Mult noroc!",youWon:"Ai câștigat",photoAlbum:"Album foto",photoReward:"Recompensă foto",savingCollection:"Se salvează în colecție…",addedToCollection:"Adăugat în colecție",collectCoins:"Colectează monede",claimedToast:"Recompensă revendicată cu succes",all:"Toți",chatPlaceholder:"Spune ceva…",sendRetry:"Mesaj în așteptare · Reîncearcă",chatMembershipTitle:"Continuă conversația",chatMembershipDescription:"Abonează-te pentru chat nelimitat cu gazdele.",enter:"Intră în cameră",waiting:"Se așteaptă două gazde disponibile",empty:"Nicio cameră Duel disponibilă",retry:"Reîncearcă",back:"Înapoi",rank:"Top susținători",chat:"Chat",gifts:"Cadouri",round:"Runda",login:"Conectează-te pentru a participa",error:"Conectarea la cameră a eșuat",theme:"Cinci runde · Alege tabăra",drawn:"Meci egal",wins:"câștigă",balance:"Monede",sound:"Sunet",send:"Trimite",giftsClosed:"Cadourile revin în runda următoare",retryGift:"Livrare în așteptare · Reîncearcă",giftSent:"Cadou trimis",giftClosed:"Această rundă s-a încheiat",giftConflict:"Alege din nou cadoul",giftInsufficient:"Monede insuficiente",topAlbumPolicy:"Primele două recompense pentru locul 1 sunt albume, apoi 10–100 de monede.",rewardRules:"După toate cele cinci runde, susținătorul nr. 1 primește recompensa principală: un album sau 10–100 de monede, conform regulilor actuale. Primele două recompense pentru locul 1 sunt albume, apoi 10–100 de monede. Ceilalți spectatori care urmăresc toate cele cinci runde au 30% șanse de a primi 1–6 monede, 20% de a primi 7–18 monede și 50% de a primi o fotografie a gazdei câștigătoare. Egalurile oferă 1–20 de monede. Primești o recompensă pe meci.",gallery:"Galerie",more:"Mai multe",credits:"Credite",live:"LIVE",chooseHost:"Alege {host}",tapSupport:"Atinge pentru a susține",selected:"SELECTATĂ",chooseGiftHost:"Alege cui îi trimiți cadoul",selectHint:"Mai întâi, alege gazda căreia vrei să îi trimiți un cadou.",performing:"ÎN SPECTACOL",programmeProgress:"Progresul spectacolului",selectionIn:"Următoarea selecție în",backRooms:"Înapoi la camere",duelOver:"DUEL ÎNCHEIAT",hostWins:"{host} câștigă",chooseContinue:"ALEGE CU CINE CONTINUI DUELUL",getReady:"PREGĂTEȘTE-TE",gifting:"CADOURI",duelResult:"REZULTATUL DUELULUI",roundResult:"RUNDA {round} · REZULTAT",lastCall:"ULTIMA ȘANSĂ",giftingCountdown:"Numărătoare inversă pentru cadouri",giftingCloses:"Cadourile se închid înaintea provocării",tied:"Ambele tabere sunt la egalitate",leading:"{host} conduce",chooseSide:"ALEGE FAVORITA · ATINGE PENTRU A SUSȚINE",roundResults:"Rezultatele rundelor",inProgress:"În desfășurare",upcoming:"Urmează",roundDrawn:"Rundă egală",roundWins:"{host} câștigă această rundă",summaryRounds:"RUNDE CÂȘTIGATE · 5 RUNDE",matchPoints:"{points} puncte din cadouri în cele cinci runde",roundPoints:"{points} puncte din cadouri în această rundă",matchReward:"RECOMPENSA MECIULUI",received:"{name} a primit",coinsAmount:"+{coins} monede",coinsReward:"Recompensă în monede",hostCollection:"Colecția gazdei {host}",joinedTop:"{name} a intrat în Top 5",rankPoints:"Locul {rank} · {points} puncte din cadouri",becameTop:"{name} a devenit susținătorul principal al gazdei {host}",snatchedTop:"{name} a preluat primul loc între susținătorii gazdei {host}",previousTop:"Anterior: {name}",duelUpdate:"Noutăți Duel",sent:"a trimis pentru",entered:"a intrat în cameră",pickMessage:"{a} sau {b}? Alege tabăra.",gapMessage:"{host} este în urmă cu {points} puncte. Un cadou {gift} ar putea să o aducă în frunte!",tiedMessage:"Scor egal! Mai sunt {seconds} secunde.",leadMessage:"{host} conduce! Mai sunt {seconds} secunde.",pleaseWait:"Te rugăm să aștepți",hostsReady:"{a} și {b} se pregătesc.",gettingReady:"Gazdele se pregătesc.",chatMessages:"Mesaje de chat",points:"Puncte",spotlight:"În lumina reflectoarelor",rhythm:"Ritm",colour:"Culoare",starlight:"Lumină stelară",finale:"Finală",encore:"Bis",spotlightChallenge:"Provocarea reflectoarelor",rhythmChallenge:"Provocarea ritmului",colourChallenge:"Provocarea culorilor",starlightChallenge:"Provocarea stelară",finaleChallenge:"Provocarea finală",bestMoves:"Cine are cele mai bune mișcări?",sentGift:"{name} a trimis {gift} pentru {host}",grandFinale:"Marea finală",ownsSpotlight:"Cine atrage toate privirile?",rocksLook:"Cui îi stă cel mai bine acest look?",stealsShow:"Cine fură spectacolul?",finalVote:"Cine primește votul tău final?",secondsShort:"{seconds}s",sendGiftPrompt:"Trimite un cadou",roundComplete:"Runda {round} încheiată",programmeIn:"Spectacolul începe în {seconds} s",roundStartsIn:"Runda {round} începe în {seconds} s",finalResultsIn:"Rezultatele finale în {seconds} s",introSupporterPerk:"Susținătorul principal o întâlnește în privat pe câștigătoare"},gc={title:"Duel na żywo",allGifts:"Wszystkie prezenty",chatroom:"Pokój czatu",connecting:"Łączenie z pokojem…",loginToChat:"Zaloguj się, aby rozmawiać i wspierać ulubioną prowadzącą.",privateChat:"Czat prywatny",oneToOne:"Transmisja 1:1",supportHost:"Wesprzyj {host}",continueWith:"Kontynuuj z {host}",confirm:"Potwierdź",chooseAgain:"Wybierz ponownie",free:"Bezpłatnie",confirmIn:"Potwierdź w ciągu {seconds} s",selectionExpired:"Wybór wygasł",retryNext:"Potwierdzenie oczekuje · Ponów",nextConfirmed:"Potwierdzono · Czekamy na kolejne wyzwanie",continueWatching:"Oglądaj dalej",matchMvp:"MVP MECZU",roundMvp:"MVP RUNDY {round}",mvpPoints:"{points} punktów za prezenty",roundsWon:"WYGRANE RUNDY",totalPoints:"SUMA PUNKTÓW ZA PREZENTY",membership:"Członkostwo",membershipTitle:"Najlepsze dopiero przed Tobą",membershipDescription:"Dołącz do członków, by oglądać dwie ostatnie rundy i odkrywać nagrody. Największa niespodzianka czeka na lidera wsparcia.",exploreMembership:"Poznaj członkostwo",rankShort:"Ranking",myRank:"Moja pozycja",notRanked:"Poza rankingiem",rankGap:"Jeszcze {points} punktów do awansu.",rankGift:"Jeden prezent {gift} może zmienić Twoją pozycję.",rewardRulesTitle:"Największa niespodzianka dla numeru 1",rewardRulesRanking:"Ranking opiera się na punktach za prezenty z całego meczu. Przy remisie wyżej jest osoba, która wcześniej zdobyła dany wynik.",rewardRulesTop:"Po pięciu rundach lider wsparcia otrzymuje nagrodę główną: album lub 10–100 monet zgodnie z obowiązującymi zasadami.",rewardRulesCompletion:"Pozostali widzowie, którzy obejrzą pięć rund, mają 30% szans na 1–6 monet, 20% na 7–18 monet i 50% na jedno zdjęcie zwycięskiej prowadzącej. Remis daje 1–20 monet.",rewardRulesOnce:"Jedna nagroda na mecz.",rewardRulesLink:"Zasady nagród",tapForSound:"Dotknij, aby włączyć dźwięk",nextRoundStarts:"Kolejna runda wkrótce",finalResultsNext:"Wkrótce wyniki końcowe",nextMatch:"Kolejne wyzwanie",nextIn:"Kontynuacja za {seconds} s",close:"Zamknij",loading:"Ładowanie…",noCollections:"Brak albumów",viewCollection:"Zobacz album",unlockFor:"Odblokuj za",collectionUnlocked:"Album odblokowany",rewards:"Nagrody",rewardReady:"Nagroda gotowa",fiveRounds:"5 rund",claimReward:"Odbierz nagrodę",viewReward:"Zobacz nagrodę",rewardClaimed:"Nagroda odebrana!",addedToBalance:"Dodano do salda",gotIt:"Rozumiem",matchComplete:"Mecz zakończony",rewardWaiting:"Twoja nagroda jest gotowa",goodLuck:"Powodzenia!",youWon:"Wygrywasz",photoAlbum:"Album zdjęć",photoReward:"Nagroda fotograficzna",savingCollection:"Zapisywanie w kolekcji…",addedToCollection:"Dodano do kolekcji",collectCoins:"Odbierz monety",claimedToast:"Nagroda pomyślnie odebrana",all:"Wszyscy",chatPlaceholder:"Napisz coś…",sendRetry:"Wiadomość oczekuje · Ponów",chatMembershipTitle:"Rozmawiaj dalej",chatMembershipDescription:"Dołącz do członków i rozmawiaj bez limitu z prowadzącymi.",enter:"Wejdź do pokoju",waiting:"Czekamy na dwie dostępne prowadzące",empty:"Brak dostępnych pokoi Duel",retry:"Ponów",back:"Wstecz",rank:"Najlepsi wspierający",chat:"Czat",gifts:"Prezenty",round:"Runda",login:"Zaloguj się, aby dołączyć",error:"Nie udało się połączyć z pokojem",theme:"Pięć rund · Wybierz stronę",drawn:"Remis",wins:"wygrywa",balance:"Monety",sound:"Dźwięk",send:"Wyślij",giftsClosed:"Prezenty dostępne w następnej rundzie",retryGift:"Dostarczenie oczekuje · Ponów",giftSent:"Prezent wysłany",giftClosed:"Ta runda się zakończyła",giftConflict:"Wybierz prezent ponownie",giftInsufficient:"Za mało monet",topAlbumPolicy:"Pierwsze dwie nagrody lidera to albumy, kolejne to 10–100 monet.",rewardRules:"Po pięciu rundach lider wsparcia otrzymuje nagrodę główną: album lub 10–100 monet zgodnie z obowiązującymi zasadami. Pierwsze dwie nagrody lidera to albumy, kolejne to 10–100 monet. Pozostali widzowie, którzy obejrzą pięć rund, mają 30% szans na 1–6 monet, 20% na 7–18 monet i 50% na jedno zdjęcie zwycięskiej prowadzącej. Remis daje 1–20 monet. Jedna nagroda na mecz.",gallery:"Galeria",more:"Więcej",credits:"Doładuj",live:"NA ŻYWO",chooseHost:"Wybierz {host}",tapSupport:"Dotknij, aby wesprzeć",selected:"WYBRANO",chooseGiftHost:"Wybierz, komu wysłać prezent",selectHint:"Najpierw wybierz prowadzącą, której chcesz wysłać prezent.",performing:"WYSTĘP",programmeProgress:"Postęp występu",selectionIn:"Kolejny wybór za",backRooms:"Wróć do pokoi",duelOver:"KONIEC POJEDYNKU",hostWins:"{host} wygrywa",chooseContinue:"WYBIERZ, Z KIM KONTYNUOWAĆ POJEDYNEK",getReady:"PRZYGOTUJ SIĘ",gifting:"PREZENTY",duelResult:"WYNIK POJEDYNKU",roundResult:"RUNDA {round} · WYNIK",lastCall:"OSTATNIA SZANSA",giftingCountdown:"Odliczanie końca prezentów",giftingCloses:"Prezenty kończą się przed wyzwaniem",tied:"Obie strony remisują",leading:"{host} prowadzi",chooseSide:"WYBIERZ PROWADZĄCĄ · DOTKNIJ, BY WESPRZEĆ",roundResults:"Wyniki rund",inProgress:"W toku",upcoming:"Nadchodzące",roundDrawn:"Remis w rundzie",roundWins:"{host} wygrywa tę rundę",summaryRounds:"WYGRANE RUNDY · 5 RUND",matchPoints:"{points} punktów za prezenty w pięciu rundach",roundPoints:"{points} punktów za prezenty w tej rundzie",matchReward:"NAGRODA MECZU",received:"{name} otrzymuje",coinsAmount:"+{coins} monet",coinsReward:"Nagroda w monetach",hostCollection:"Kolekcja {host}",joinedTop:"{name} trafia do Top 5",rankPoints:"Pozycja #{rank} · {points} punktów za prezenty",becameTop:"{name} zostaje liderem wsparcia {host}",snatchedTop:"{name} przejmuje prowadzenie we wsparciu {host}",previousTop:"Poprzednio: {name}",duelUpdate:"Aktualizacja pojedynku",sent:"wysyła do",entered:"dołącza do pokoju",pickMessage:"{a} czy {b}? Wybierz stronę.",gapMessage:"{host} traci {points} punktów. Prezent {gift} może dać jej prowadzenie!",tiedMessage:"Remis! Zostało {seconds} sekund.",leadMessage:"{host} prowadzi! Zostało {seconds} sekund.",pleaseWait:"Proszę czekać",hostsReady:"{a} i {b} przygotowują się.",gettingReady:"Prowadzące przygotowują się.",chatMessages:"Wiadomości czatu",points:"Punkty",spotlight:"W blasku reflektorów",rhythm:"Rytm",colour:"Kolory",starlight:"Blask gwiazd",finale:"Finał",encore:"Bis",spotlightChallenge:"Wyzwanie reflektorów",rhythmChallenge:"Wyzwanie rytmu",colourChallenge:"Wyzwanie kolorów",starlightChallenge:"Gwiezdne wyzwanie",finaleChallenge:"Wyzwanie finałowe",bestMoves:"Kto ma najlepsze ruchy?",sentGift:"{name} wysyła {gift} do {host}",grandFinale:"Wielki finał",ownsSpotlight:"Kto skradnie światło reflektorów?",rocksLook:"Kto najlepiej wygląda w tym stylu?",stealsShow:"Kto skradnie show?",finalVote:"Kto zdobędzie Twój ostatni głos?",secondsShort:"{seconds}s",sendGiftPrompt:"Wyślij prezent",roundComplete:"Runda {round} zakończona",programmeIn:"Występ rozpocznie się za {seconds} s",roundStartsIn:"Runda {round} rozpocznie się za {seconds} s",finalResultsIn:"Wyniki meczu za {seconds} s",introSupporterPerk:"Największy fan spotyka zwyciężczynię prywatnie"},yc={title:"Duel в эфире",allGifts:"Все подарки",chatroom:"Чат-комната",connecting:"Подключение к комнате…",loginToChat:"Войдите, чтобы общаться и поддерживать любимую ведущую.",privateChat:"Личный чат",oneToOne:"Эфир 1:1",supportHost:"Поддержать {host}",continueWith:"Продолжить с {host}",confirm:"Подтвердить",chooseAgain:"Выбрать снова",free:"Бесплатно",confirmIn:"Подтвердите за {seconds} с",selectionExpired:"Время выбора истекло",retryNext:"Подтверждение ожидается · Повторить",nextConfirmed:"Подтверждено · Ожидание следующего испытания",continueWatching:"Продолжить просмотр",matchMvp:"MVP МАТЧА",roundMvp:"MVP РАУНДА {round}",mvpPoints:"{points} очков за подарки",roundsWon:"ПОБЕДЫ В РАУНДАХ",totalPoints:"ВСЕГО ОЧКОВ ЗА ПОДАРКИ",membership:"Подписка",membershipTitle:"Лучшее ещё впереди",membershipDescription:"Оформите подписку ради двух финальных раундов и сюрпризов. Самый большой сюрприз достанется лидеру поддержки.",exploreMembership:"О подписке",rankShort:"Рейтинг",myRank:"Моё место",notRanked:"Вне рейтинга",rankGap:"Ещё {points} очков до следующего места.",rankGift:"Один подарок {gift} может изменить ваше место.",rewardRulesTitle:"Главный сюрприз — для № 1",rewardRulesRanking:"Место определяется суммой очков за подарки за весь матч. При равенстве выше тот, кто раньше набрал эту сумму.",rewardRulesTop:"После пяти раундов лидер поддержки получает главный приз: альбом или 10–100 монет по действующим правилам.",rewardRulesCompletion:"Другие зрители, посмотревшие все пять раундов, имеют 30% шанс получить 1–6 монет, 20% — 7–18 монет и 50% — одно фото победившей ведущей. При ничьей награда — 1–20 монет.",rewardRulesOnce:"Одна награда за матч.",rewardRulesLink:"Правила наград",tapForSound:"Нажмите для звука",nextRoundStarts:"Следующий раунд скоро начнётся",finalResultsNext:"Скоро итоги матча",nextMatch:"Следующее испытание",nextIn:"Продолжение через {seconds} с",close:"Закрыть",loading:"Загрузка…",noCollections:"Альбомов пока нет",viewCollection:"Смотреть альбом",unlockFor:"Открыть за",collectionUnlocked:"Альбом открыт",rewards:"Награды",rewardReady:"Награда готова",fiveRounds:"5 раундов",claimReward:"Забрать награду",viewReward:"Смотреть награду",rewardClaimed:"Награда получена!",addedToBalance:"Добавлено на баланс",gotIt:"Понятно",matchComplete:"Матч завершён",rewardWaiting:"Ваша награда готова",goodLuck:"Удачи!",youWon:"Вы выиграли",photoAlbum:"Фотоальбом",photoReward:"Фото в награду",savingCollection:"Сохранение в коллекцию…",addedToCollection:"Добавлено в коллекцию",collectCoins:"Забрать монеты",claimedToast:"Награда успешно получена",all:"Все",chatPlaceholder:"Напишите что-нибудь…",sendRetry:"Сообщение не подтверждено · Повторить",chatMembershipTitle:"Продолжайте общение",chatMembershipDescription:"Оформите подписку для безлимитного общения с ведущими.",enter:"Войти в комнату",waiting:"Ожидание двух свободных ведущих",empty:"Нет доступных комнат Duel",retry:"Повторить",back:"Назад",rank:"Лидеры поддержки",chat:"Чат",gifts:"Подарки",round:"Раунд",login:"Войдите, чтобы присоединиться",error:"Не удалось подключиться к комнате",theme:"Пять раундов · Выберите сторону",drawn:"Ничья",wins:"побеждает",balance:"Монеты",sound:"Звук",send:"Отправить",giftsClosed:"Подарки доступны в следующем раунде",retryGift:"Доставка не подтверждена · Повторить",giftSent:"Подарок отправлен",giftClosed:"Этот раунд завершён",giftConflict:"Выберите подарок снова",giftInsufficient:"Недостаточно монет",topAlbumPolicy:"Первые две награды лидера — альбомы, затем 10–100 монет.",rewardRules:"После пяти раундов лидер поддержки получает главный приз: альбом или 10–100 монет по действующим правилам. Первые две награды лидера — альбомы, затем 10–100 монет. Другие зрители, посмотревшие все пять раундов, имеют 30% шанс получить 1–6 монет, 20% — 7–18 монет и 50% — одно фото победившей ведущей. При ничьей награда — 1–20 монет. Одна награда за матч.",gallery:"Галерея",more:"Ещё",credits:"Пополнить",live:"В ЭФИРЕ",chooseHost:"Выбрать {host}",tapSupport:"Нажмите, чтобы поддержать",selected:"ВЫБРАНО",chooseGiftHost:"Выберите, кому отправить подарок",selectHint:"Сначала выберите ведущую, которой хотите отправить подарок.",performing:"ВЫСТУПЛЕНИЕ",programmeProgress:"Ход выступления",selectionIn:"До следующего выбора",backRooms:"К списку комнат",duelOver:"ДУЭЛЬ ЗАВЕРШЕНА",hostWins:"{host} побеждает",chooseContinue:"ВЫБЕРИТЕ, С КЕМ ПРОДОЛЖИТЬ ДУЭЛЬ",getReady:"ПРИГОТОВЬТЕСЬ",gifting:"ПОДАРКИ",duelResult:"РЕЗУЛЬТАТ ДУЭЛИ",roundResult:"РАУНД {round} · РЕЗУЛЬТАТ",lastCall:"ПОСЛЕДНИЙ ШАНС",giftingCountdown:"До закрытия подарков",giftingCloses:"Подарки закрываются перед испытанием",tied:"Стороны идут вровень",leading:"{host} лидирует",chooseSide:"ВЫБЕРИТЕ ВЕДУЩУЮ · НАЖМИТЕ ДЛЯ ПОДДЕРЖКИ",roundResults:"Результаты раундов",inProgress:"Идёт сейчас",upcoming:"Предстоит",roundDrawn:"Ничья в раунде",roundWins:"{host} выигрывает раунд",summaryRounds:"ПОБЕДЫ · 5 РАУНДОВ",matchPoints:"{points} очков за подарки за пять раундов",roundPoints:"{points} очков за подарки в этом раунде",matchReward:"НАГРАДА МАТЧА",received:"{name} получает",coinsAmount:"+{coins} монет",coinsReward:"Награда монетами",hostCollection:"Коллекция {host}",joinedTop:"{name} входит в топ-5",rankPoints:"Место № {rank} · {points} очков за подарки",becameTop:"{name} становится лидером поддержки {host}",snatchedTop:"{name} выходит на первое место среди сторонников {host}",previousTop:"Ранее: {name}",duelUpdate:"Новости дуэли",sent:"отправляет",entered:"входит в комнату",pickMessage:"{a} или {b}? Выберите сторону.",gapMessage:"{host} отстаёт на {points} очков. Подарок {gift} может вывести её вперёд!",tiedMessage:"Ничья! Осталось {seconds} секунд.",leadMessage:"{host} лидирует! Осталось {seconds} секунд.",pleaseWait:"Пожалуйста, подождите",hostsReady:"{a} и {b} готовятся.",gettingReady:"Ведущие готовятся.",chatMessages:"Сообщения чата",points:"Очки",spotlight:"В центре внимания",rhythm:"Ритм",colour:"Цвет",starlight:"Звёздный свет",finale:"Финал",encore:"На бис",spotlightChallenge:"Испытание в центре внимания",rhythmChallenge:"Ритмическое испытание",colourChallenge:"Цветовое испытание",starlightChallenge:"Звёздное испытание",finaleChallenge:"Финальное испытание",bestMoves:"У кого лучшие движения?",sentGift:"{name} отправляет {host} {gift}",grandFinale:"Грандиозный финал",ownsSpotlight:"Кто окажется в центре внимания?",rocksLook:"Кому больше идёт этот образ?",stealsShow:"Кто станет звездой шоу?",finalVote:"Кому достанется ваш решающий голос?",secondsShort:"{seconds}с",sendGiftPrompt:"Отправьте подарок",roundComplete:"Раунд {round} завершён",programmeIn:"Выступление через {seconds} с",roundStartsIn:"Раунд {round} начнётся через {seconds} с",finalResultsIn:"Итоги матча через {seconds} с",introSupporterPerk:"Главный поклонник общается с победительницей наедине"},vc={en:{pk:dc},zh_TW:{pk:uc},es:{pk:hc},fr:{pk:pc},it:{pk:mc},ro:{pk:fc},pl:{pk:gc},ru:{pk:yc},ja:{pk:{title:"Duel ライブ",allGifts:"すべてのギフト",chatroom:"チャットルーム",connecting:"ルームに接続中…",loginToChat:"ログインしてチャットやお気に入りの配信者への応援を楽しもう。",privateChat:"個別チャット",oneToOne:"1対1ライブ",supportHost:"{host}を応援",continueWith:"{host}と続ける",confirm:"確認",chooseAgain:"選び直す",free:"無料",confirmIn:"{seconds}秒以内に確認",selectionExpired:"選択の有効期限が切れました",retryNext:"確認待ち · 安全に再試行",nextConfirmed:"確認済み · 次のチャレンジを待っています",continueWatching:"視聴を続ける",matchMvp:"総合MVP",roundMvp:"ラウンド{round} MVP",mvpPoints:"ギフトポイント {points}",roundsWon:"獲得ラウンド数",totalPoints:"合計ギフトポイント",membership:"メンバーシップ",membershipTitle:"お楽しみはこれから",membershipDescription:"メンバーになって最後の2ラウンドとサプライズ報酬を楽しもう。応援ランキング1位には最大のサプライズ。",exploreMembership:"メンバー特典を見る",rankShort:"ランキング",myRank:"自分の順位",notRanked:"ランク外",rankGap:"あと{points}ポイントで順位アップ。",rankGift:"{gift}を1つ贈ると順位が変わります。",rewardRulesTitle:"最大のサプライズは1位に",rewardRulesRanking:"順位は試合全体の合計ギフトポイントで決まります。同点の場合は先にそのポイントに達した視聴者が上位になります。",rewardRulesTop:"全5ラウンド終了後、応援ランキング1位は現在の報酬ルールに従ってフォトアルバムまたは10~100コインを獲得します。",rewardRulesCompletion:"全5ラウンドを視聴した他の視聴者には、30%の確率で1~6コイン、20%で7~18コイン、50%で勝者の配信者の写真1枚が当たります。引き分けの場合は1~20コインです。",rewardRulesOnce:"報酬は1試合につき1つです。",rewardRulesLink:"報酬ルール",tapForSound:"タップで音声をオン",nextRoundStarts:"まもなく次のラウンド",finalResultsNext:"まもなく最終結果を発表",nextMatch:"次のチャレンジ",nextIn:"{seconds}秒後に続行",close:"閉じる",loading:"読み込み中…",noCollections:"アルバムはまだありません",viewCollection:"アルバムを見る",unlockFor:"解除する",collectionUnlocked:"アルバムを解除しました",rewards:"報酬",rewardReady:"報酬を受け取れます",fiveRounds:"5ラウンド",claimReward:"報酬を受け取る",viewReward:"報酬を見る",rewardClaimed:"報酬を受け取りました!",addedToBalance:"残高に追加しました",gotIt:"OK",matchComplete:"試合終了",rewardWaiting:"報酬の準備ができました",goodLuck:"幸運を祈ります!",youWon:"獲得",photoAlbum:"フォトアルバム",photoReward:"写真の報酬",savingCollection:"コレクションに保存中…",addedToCollection:"コレクションに追加しました",collectCoins:"コインを受け取る",claimedToast:"報酬を受け取りました",all:"全員",chatPlaceholder:"メッセージを入力…",sendRetry:"送信確認待ち · 再試行",chatMembershipTitle:"チャットを続けよう",chatMembershipDescription:"メンバーになって配信者と無制限にチャット。",enter:"ルームに入る",waiting:"参加可能な配信者2人を待っています",empty:"利用可能なDuelルームはありません",retry:"再試行",back:"戻る",rank:"応援ランキング",chat:"チャット",gifts:"ギフト",round:"ラウンド",login:"ログインして参加",error:"ルームに接続できませんでした",theme:"全5ラウンド · 応援する側を選ぼう",drawn:"引き分け",wins:"勝利",balance:"コイン",sound:"音声",send:"送信",giftsClosed:"ギフトは次のラウンドで再開",retryGift:"送信確認待ち · 安全に再試行",giftSent:"ギフトを送りました",giftClosed:"このラウンドは終了しました",giftConflict:"ギフトを選び直してください",giftInsufficient:"コインが不足しています",topAlbumPolicy:"1位の報酬は最初の2回がアルバム、その後は10~100コインです。",rewardRules:"全5ラウンド終了後、応援ランキング1位は現在の報酬ルールに従ってフォトアルバムまたは10~100コインを獲得します。 1位の報酬は最初の2回がアルバム、その後は10~100コインです。 全5ラウンドを視聴した他の視聴者には、30%の確率で1~6コイン、20%で7~18コイン、50%で勝者の配信者の写真1枚が当たります。引き分けの場合は1~20コインです。 報酬は1試合につき1つです。",gallery:"ギャラリー",more:"もっと見る",credits:"チャージ",live:"ライブ",chooseHost:"{host}を選ぶ",tapSupport:"タップして応援",selected:"選択済み",chooseGiftHost:"ギフトを贈る配信者を選択",selectHint:"まず、ギフトを贈りたい配信者を選んでください。",performing:"パフォーマンス中",programmeProgress:"パフォーマンスの進行状況",selectionIn:"次の選択まで",backRooms:"ルーム一覧に戻る",duelOver:"DUEL終了",hostWins:"{host}の勝利",chooseContinue:"次のDUELで応援する配信者を選ぼう",getReady:"準備中",gifting:"ギフト受付中",duelResult:"DUEL結果",roundResult:"ラウンド{round} · DUEL結果",lastCall:"ラストチャンス",giftingCountdown:"ギフト締め切りまで",giftingCloses:"チャレンジ開始前にギフトを締め切ります",tied:"両者同点",leading:"{host}がリード中",chooseSide:"配信者を選んでタップで応援",roundResults:"ラウンド結果",inProgress:"進行中",upcoming:"開始前",roundDrawn:"このラウンドは引き分け",roundWins:"このラウンドは{host}の勝利",summaryRounds:"獲得ラウンド数 · 全5ラウンド",matchPoints:"全5ラウンドで{points}ギフトポイント",roundPoints:"このラウンドで{points}ギフトポイント",matchReward:"試合報酬",received:"{name}が獲得",coinsAmount:"+{coins}コイン",coinsReward:"コイン報酬",hostCollection:"{host}のコレクション",joinedTop:"{name}がトップ5入り",rankPoints:"{rank}位 · {points}ギフトポイント",becameTop:"{name}が{host}の応援ランキング1位に",snatchedTop:"{name}が{host}の応援ランキング首位を奪取",previousTop:"前の1位:{name}",duelUpdate:"DUELニュース",sent:"に送信",entered:"がルームに参加",pickMessage:"{a}と{b}、どちらを応援する?",gapMessage:"{host}は{points}ポイント差で負けています。{gift}を贈れば逆転できるかも!",tiedMessage:"同点!残り{seconds}秒。",leadMessage:"{host}がリード!残り{seconds}秒。",pleaseWait:"お待ちください",hostsReady:"{a}と{b}が準備中です。",gettingReady:"配信者が準備中です。",chatMessages:"チャットメッセージ",points:"ポイント",spotlight:"スポットライト",rhythm:"リズム",colour:"カラー",starlight:"スターライト",finale:"フィナーレ",encore:"アンコール",spotlightChallenge:"スポットライトチャレンジ",rhythmChallenge:"リズムチャレンジ",colourChallenge:"カラーチャレンジ",starlightChallenge:"スターライトチャレンジ",finaleChallenge:"フィナーレチャレンジ",bestMoves:"最高のダンスを見せるのは?",sentGift:"{name}が{host}に{gift}を贈りました",grandFinale:"グランドフィナーレ",ownsSpotlight:"スポットライトを浴びるのは?",rocksLook:"このスタイルが似合うのは?",stealsShow:"ショーの主役になるのは?",finalVote:"最後の一票は誰に?",secondsShort:"{seconds}秒",sendGiftPrompt:"ギフトで応援",roundComplete:"ラウンド{round}終了",programmeIn:"{seconds}秒後にパフォーマンス開始",roundStartsIn:"{seconds}秒後にラウンド{round}開始",finalResultsIn:"{seconds}秒後に最終結果を発表",introSupporterPerk:"トップサポーターは勝者とプライベートで交流"}},hi:{pk:{title:"Duel लाइव",allGifts:"सभी उपहार",chatroom:"चैट रूम",connecting:"रूम से जुड़ रहे हैं…",loginToChat:"चैट करने और पसंदीदा होस्ट का समर्थन करने के लिए लॉग इन करें।",privateChat:"निजी चैट",oneToOne:"1:1 लाइव",supportHost:"{host} का समर्थन करें",continueWith:"{host} के साथ जारी रखें",confirm:"पुष्टि करें",chooseAgain:"फिर से चुनें",free:"मुफ़्त",confirmIn:"{seconds} सेकंड में पुष्टि करें",selectionExpired:"चयन की समय सीमा समाप्त",retryNext:"पुष्टि लंबित · फिर प्रयास करें",nextConfirmed:"पुष्टि हुई · अगली चुनौती का इंतज़ार",continueWatching:"देखना जारी रखें",matchMvp:"मैच MVP",roundMvp:"राउंड {round} MVP",mvpPoints:"{points} उपहार अंक",roundsWon:"जीते गए राउंड",totalPoints:"कुल उपहार अंक",membership:"सदस्यता",membershipTitle:"सबसे अच्छा अभी बाकी है",membershipDescription:"आखिरी दो राउंड और सरप्राइज़ पुरस्कारों के लिए सदस्य बनें। नंबर 1 समर्थक को सबसे बड़ा सरप्राइज़ मिलेगा।",exploreMembership:"सदस्यता देखें",rankShort:"रैंकिंग",myRank:"मेरी रैंक",notRanked:"रैंक नहीं मिली",rankGap:"ऊपर जाने के लिए {points} अंक और चाहिए।",rankGift:"एक {gift} आपकी रैंक बदल सकता है।",rewardRulesTitle:"सबसे बड़ा सरप्राइज़ नंबर 1 के लिए",rewardRulesRanking:"रैंक पूरे मैच के उपहार अंकों पर आधारित है। बराबरी पर उस कुल तक पहले पहुँचने वाले दर्शक को ऊँची रैंक मिलती है।",rewardRulesTop:"पाँचों राउंड के बाद नंबर 1 समर्थक को मौजूदा नियमों के अनुसार फ़ोटो एल्बम या 10–100 सिक्कों का मुख्य पुरस्कार मिलता है।",rewardRulesCompletion:"पाँचों राउंड देखने वाले अन्य दर्शकों को 30% संभावना से 1–6 सिक्के, 20% से 7–18 सिक्के या 50% से विजेता होस्ट की एक फ़ोटो मिलती है। बराबरी पर 1–20 सिक्के मिलते हैं।",rewardRulesOnce:"प्रत्येक मैच में एक पुरस्कार मिलता है।",rewardRulesLink:"पुरस्कार के नियम",tapForSound:"आवाज़ के लिए टैप करें",nextRoundStarts:"अगला राउंड जल्द शुरू होगा",finalResultsNext:"मैच के नतीजे जल्द आएँगे",nextMatch:"अगली चुनौती",nextIn:"{seconds} सेकंड में जारी",close:"बंद करें",loading:"लोड हो रहा है…",noCollections:"अभी कोई एल्बम नहीं",viewCollection:"एल्बम देखें",unlockFor:"अनलॉक करें",collectionUnlocked:"एल्बम अनलॉक हुआ",rewards:"पुरस्कार",rewardReady:"पुरस्कार तैयार है",fiveRounds:"5 राउंड",claimReward:"पुरस्कार लें",viewReward:"पुरस्कार देखें",rewardClaimed:"पुरस्कार मिल गया!",addedToBalance:"बैलेंस में जोड़ दिया गया",gotIt:"समझ गया",matchComplete:"मैच पूरा हुआ",rewardWaiting:"आपका पुरस्कार तैयार है",goodLuck:"शुभकामनाएँ!",youWon:"आपने जीता",photoAlbum:"फ़ोटो एल्बम",photoReward:"फ़ोटो पुरस्कार",savingCollection:"संग्रह में सहेज रहे हैं…",addedToCollection:"संग्रह में जोड़ दिया गया",collectCoins:"सिक्के लें",claimedToast:"पुरस्कार सफलतापूर्वक मिल गया",all:"सभी",chatPlaceholder:"कुछ लिखें…",sendRetry:"संदेश की पुष्टि लंबित · फिर कोशिश करें",chatMembershipTitle:"बातचीत जारी रखें",chatMembershipDescription:"होस्ट के साथ असीमित चैट के लिए सदस्य बनें।",enter:"रूम में प्रवेश करें",waiting:"दो उपलब्ध होस्ट का इंतज़ार",empty:"कोई Duel रूम उपलब्ध नहीं",retry:"फिर कोशिश करें",back:"वापस",rank:"शीर्ष समर्थक",chat:"चैट",gifts:"उपहार",round:"राउंड",login:"शामिल होने के लिए लॉग इन करें",error:"रूम से कनेक्ट नहीं हो सका",theme:"पाँच राउंड · अपना पक्ष चुनें",drawn:"मैच बराबर",wins:"जीत गई",balance:"सिक्के",sound:"आवाज़",send:"भेजें",giftsClosed:"अगले राउंड में उपहार भेज सकेंगे",retryGift:"उपहार की पुष्टि लंबित · फिर कोशिश करें",giftSent:"उपहार भेज दिया गया",giftClosed:"यह राउंड समाप्त हो गया",giftConflict:"कृपया उपहार फिर से चुनें",giftInsufficient:"पर्याप्त सिक्के नहीं हैं",topAlbumPolicy:"शीर्ष स्थान के पहले दो पुरस्कार एल्बम हैं, उसके बाद 10–100 सिक्के।",rewardRules:"पाँचों राउंड के बाद नंबर 1 समर्थक को मौजूदा नियमों के अनुसार फ़ोटो एल्बम या 10–100 सिक्कों का मुख्य पुरस्कार मिलता है। शीर्ष स्थान के पहले दो पुरस्कार एल्बम हैं, उसके बाद 10–100 सिक्के। पाँचों राउंड देखने वाले अन्य दर्शकों को 30% संभावना से 1–6 सिक्के, 20% से 7–18 सिक्के या 50% से विजेता होस्ट की एक फ़ोटो मिलती है। बराबरी पर 1–20 सिक्के मिलते हैं। प्रत्येक मैच में एक पुरस्कार मिलता है।",gallery:"गैलरी",more:"और",credits:"क्रेडिट",live:"लाइव",chooseHost:"{host} को चुनें",tapSupport:"समर्थन के लिए टैप करें",selected:"चयनित",chooseGiftHost:"उपहार भेजने के लिए होस्ट चुनें",selectHint:"पहले वह होस्ट चुनें जिसे आप उपहार भेजना चाहते हैं।",performing:"प्रस्तुति जारी है",programmeProgress:"कार्यक्रम की प्रगति",selectionIn:"अगला चयन शुरू होने में",backRooms:"रूम सूची पर वापस जाएँ",duelOver:"DUEL समाप्त",hostWins:"{host} जीत गई",chooseContinue:"चुनें कि अगला DUEL किसके साथ जारी रखें",getReady:"तैयार हो जाएँ",gifting:"उपहार भेजें",duelResult:"DUEL का परिणाम",roundResult:"राउंड {round} · DUEL परिणाम",lastCall:"आखिरी मौका",giftingCountdown:"उपहार बंद होने की उलटी गिनती",giftingCloses:"चुनौती से पहले उपहार भेजना बंद होगा",tied:"दोनों पक्ष बराबर हैं",leading:"{host} आगे है",chooseSide:"अपनी पसंद चुनें · समर्थन के लिए टैप करें",roundResults:"राउंड के परिणाम",inProgress:"जारी है",upcoming:"आने वाला",roundDrawn:"राउंड बराबर",roundWins:"{host} यह राउंड जीत गई",summaryRounds:"जीते गए राउंड · 5 राउंड",matchPoints:"पाँचों राउंड में {points} उपहार अंक",roundPoints:"इस राउंड में {points} उपहार अंक",matchReward:"मैच पुरस्कार",received:"{name} को मिला",coinsAmount:"+{coins} सिक्के",coinsReward:"सिक्कों का पुरस्कार",hostCollection:"{host} का संग्रह",joinedTop:"{name} शीर्ष 5 में आ गए",rankPoints:"रैंक #{rank} · {points} उपहार अंक",becameTop:"{name}, {host} के शीर्ष समर्थक बन गए",snatchedTop:"{name} ने {host} के शीर्ष समर्थक का स्थान ले लिया",previousTop:"पहले: {name}",duelUpdate:"Duel अपडेट",sent:"को भेजा",entered:"रूम में आए",pickMessage:"{a} या {b}? अपना पक्ष चुनें।",gapMessage:"{host} {points} अंक पीछे है। एक {gift} उसे आगे कर सकता है!",tiedMessage:"स्कोर बराबर! {seconds} सेकंड बाकी।",leadMessage:"{host} आगे है! {seconds} सेकंड बाकी।",pleaseWait:"कृपया प्रतीक्षा करें",hostsReady:"{a} और {b} तैयार हो रही हैं।",gettingReady:"होस्ट तैयार हो रही हैं।",chatMessages:"चैट संदेश",points:"अंक",spotlight:"स्पॉटलाइट",rhythm:"लय",colour:"रंग",starlight:"तारों की रोशनी",finale:"फ़िनाले",encore:"एक बार और",spotlightChallenge:"स्पॉटलाइट चुनौती",rhythmChallenge:"लय की चुनौती",colourChallenge:"रंगों की चुनौती",starlightChallenge:"तारों की चुनौती",finaleChallenge:"अंतिम चुनौती",bestMoves:"किसकी अदाएँ सबसे अच्छी हैं?",sentGift:"{name} ने {host} को {gift} भेजा",grandFinale:"भव्य फ़िनाले",ownsSpotlight:"सुर्खियों में कौन छाएगा?",rocksLook:"यह लुक किस पर सबसे अच्छा है?",stealsShow:"महफ़िल कौन लूटेगा?",finalVote:"आपका आखिरी वोट किसे मिलेगा?",secondsShort:"{seconds}से",sendGiftPrompt:"उपहार भेजें",roundComplete:"राउंड {round} पूरा हुआ",programmeIn:"प्रस्तुति {seconds} सेकंड में शुरू होगी",roundStartsIn:"राउंड {round}, {seconds} सेकंड में शुरू होगा",finalResultsIn:"मैच के नतीजे {seconds} सेकंड में",introSupporterPerk:"शीर्ष समर्थक विजेता से निजी बातचीत कर सकता है"}},zh:{pk:uc}},bc={[Ul.EN]:{errorPage:{page404:{oops:"OOPS!",headline:"The webmaster said that you can not enter this page...",info:"Please check that the URL you entered is correct, or click the button below to return to the homepage.",backToHome:"Back to home",allRightsReserved:"All rights reserved"},page401:{oops:"Oops!",noPermission:"You don't have permission to go to this page",contactLeader:"If you are not satisfied, please contact your leader",orYouCan:"Or you can go:",backHome:"Back to home",browse:"Just browse",viewImage:"Click me to view image",back:"Back",gifSource:"gif source",randomView:"Random view"},ipAccess:{title:"Access Restricted",description:"Sorry, This Service Is Not Available In Your Region",tips:"Due to local regulations and agreements, this website is not available in your geographical region."}},route:{premium:"Premium",home:"Discover",characterList:"Character List",characterSearch:"Character Search",characterDetail:"Character Detail",characterChat:"Character Chat",chatHistory:"Chat",userCenter:"User Center",userCenterEdit:"Personal Information",rechargeCenter:"Recharge Center",contactUs:"Contact Us",characterCollections:"Collections",characterLiked:"Liked",rechargeHistory:"Recharge History",legalInformation:"Legal Information",underagePolicy:"Underage Policy",subscriptionPolicy:"Subscription Policy",exemption2257:"18 U.S.C. 2257 Exemption",dmcaPolicy:"DMCA Policy",blockedContentPolicy:"Blocked Content Policy",contentRemovalPolicy:"Content Removal Policy",complaintPolicy:"Complaint Policy"},rechargeHistory:{title:"Transaction History",tabs:{deposits:"Deposits",expenses:"Expenses"},expense:{chatWith:"Chat with {name}",unlockedVideo:"Unlocked {name}'s Private video",unlockedPhoto:"Unlocked {name}'s Private Photo",upgradeVideo:"Upgrade Photo to Video",sendGifts:"Intimate interaction expense: {name}",other:"Other expense"}},rechargeCenter:{tabs:{subscribe:"Subscribe",coins:"Coins"},premium:{title:"Subscribe",choosePlan:"Choose Your Plan",anonymous:"100% anonymous. You can cancel anytime.",countdown:{hours:"Hours",minutes:"Minutes",seconds:"Seconds"},limitedOffer:"LIMITED TIME OFFER",discount:"Up to 75% off your subscription",plans:{yearly:"12 months",quarterly:"3 months",monthly:"1 month",perMonth:"/month"},currentSubscription:{label:"Current Subscription",daysLeft:"Days Left",renewsOn:"Renews on {date}"},subscribeTypes:{none:"No Subscription",weekly:"Weekly",monthly:"Monthly",quarterly:"Quarterly",annual:"Annual",planText:"{type} Plan"},badges:{bestChoice:"BEST CHOICE"},security:{noAdultTransaction:"No adult transaction in your bank statement",noHiddenFees:"No hidden fees + Cancel subscription at any time",statementCharge:"Charge shown as '{appName}' on your bank statement",cancelAnytime:"Cancel subscription at any time in settings"},agreement:{iAgree:"I agree to the",termsOfService:"Terms of Service",and:"and",subscriptionPolicy:"Subscription Policy"},subscribe:"Subscribe",subscribed:"Subscribed",upgrade:"Upgrade",errors:{alreadySubscribed:"You are already subscribed."},vipGuide:{title:"Unlock Exclusive Privileges",description:"Elevate your experience with our most elite tier of connection and luxury content.",discountTag:"40% OFF",button:"Upgrade to Premium",benefits:{exclusivePrivateShows:"Exclusive Private Shows & Videos & Images",premiumTipMenu:"Premium Tip Menu",emotionalChatModel:"Richer emotional AI chat model",betterMemory:"Better memory in every interaction",welfareImages:"Unlock regularly updated bonus images",posePrivilege:"Unlock exclusive pose privileges",liveChatPrivilege:"Live room chat privileges",monthlyFreeCoins:'<span style="color: #ff007f; font-weight: bold;">{coins}</span> free coins every month'}},paymentPending:{alt:"Payment in progress",title:"Payment in Progress",description:"Your payment is being processed. Once verified, your account will be automatically upgraded to Premium. This may take a few minutes.",button:"Got it"},benefits:{title:"Premium Benefits",createAI:"Create your own AI Girlfriend(s)",unlimitedMessages:"Unlimited text messages",freeTokens:"Get 100 FREE tokens / month",removeBlur:"Remove image blur",generateImages:"Generate images",phoneCalls:"Make AI phone calls",fastResponse:"Fast response time",prioritySupport:"Priority customer support",exclusiveCharacters:"Access to exclusive characters",advancedCustomization:"Advanced personality customization"}},coins:{title:"Coins",currentCoins:"Current Coins",description:{title:"Coins Description",subtitle:"Coins are the virtual cash of the universe! With more coins, you can make your chat experience even more awesome:"},security:{antivirusSecuredLine1:"Antivirus",antivirusSecuredLine2:"Secured",privacyBankStatementLine1:"Privacy in bank",privacyBankStatementLine2:"statement"},badges:{discount:"{percent}% OFF"},features:{heartWhisper:"Chat Message",inspirationReply:"Inspiration Reply",premiumChat:"Special Gifts",specialGifts:"Buy Animated Video"},history:{title:"Recharge History",item:{title:"Coins",conisNum:"+ {num} coins",orderId:"Order ID: {id}"}}}},order:{status:{completed:{type:"Completed",title:"Payment Successful",description:"Coins have been successfully added to your account! You can now use them to unlock exclusive features."},pending:{type:"Pending",title:"Processing Payment…",description:"Please wait while we confirm your payment. You can check the latest progress in the recharge record at any time."},failed:{type:"Failed",title:"Payment Failed",description:"Unfortunately, this payment could not be completed. Please rest assured that we did not charge you. Please try again."}}},navbar:{search:{placeholder:"Search"},login:{title:"Login",notification:{title:"Tip",message:"Login method not yet open"}},download:{title:"Download",dialog:{title:"Download APP",subtitle:"Download the App to search for over 20 million characters."}},checkIn:{title:"Check In"},joinFree:{title:"Join Free"}},sidebar:{today:"TODAY",yesterday:"YESTERDAY",other:"OTHER",footer:{affiliate:"Affiliate",support:"Support"}},contactUs:{email:"Email",youtube:"Youtube",facebook:"Facebook",whatsapp:"WhatsApp",telegram:"Telegram",instagram:"Instagram",discord:"Discord"},loading:{title:"Loading..."},noData:{title:"It's a Little Quiet in Here..."},home:{more:"View All",faq:{title:"FAQ"},banner:{slide1:{title:"Your Story Begins Here",description:"Unlock Endless Conversations",buttonText:"Start Chatting Now"},slide2:{title:"Find Your Perfect Character",description:"Explore popular characters curated for you",buttonText:"Explore Now"},slide3:{title:"Build Your Profile",description:"Customize preferences and keep progress in sync",buttonText:"Go to Center"}},all:"All"},characterTabs:{recommend:"Recommended",trending:"Trending",topRated:"Top Rated",popular:"Popular",latest:"Latest"},characterChat:{sendInputPlaceholder:"Type your message...",openingPopoverTitle:"Try to reply",copyMessage:"Copy Message",deleteMessage:"Delete Message",reportMessage:"Report Message",copySuccess:"Copied to clipboard",copyFailed:"Copy failed",noCopyContent:"No content to copy",sendTooFrequent:"Sending too frequently, please try again later",messageTooLong:"Message length cannot exceed 200 characters",sendFailed:"Failed to send, please try again",openingSuggestions:{careerChange:"I've been considering a career change into tech. What do you think about that industry's prospects?",tellMore:"That's interesting! Could you tell me more about your experience in marketing strategy?",professionalAdvice:"I'm feeling a bit stuck in my current role. Any advice on how to grow professionally?"},chatUser:{collect:"Collect",collected:"Collected",profile:"Profile",share:"Share"},chatHeader:{status:{online:"Online",offline:"Offline",typing:"Typing...",sendingPhoto:"sending a photo",living:"living"}}},interact:{actionTrigger:"Trigger",actionSend:"Send",heat:"Interaction heat with her",liveRoomGuide:{description:"Send gifts for special interactive performances!",action:"Send"},blockingDialog:{title:"Everything You've Dreamed Of...",previewPrefix:"Here is a preview of the ",previewHighlight:"Exclusive Try-On Show.",previewSuffix:" Send premium gifts to unlock more.",action:"Unlock Now"},giftPanel:{sendGift:"Send Gift",recharge:"Recharge",more:"More",gift:"Gift",sort:"Sort",close:"Close"},sceneSwitch:{guide:"Tap here to explore more scenes.",button:"Switch\nScene",shortButton:"Scene",title:"Switch Scene",subtitle:"Click to switch and open a different live scene.",switching:"Switching...",close:"Close",current:"Current",price:"{price} coins to unlock",payInsufficient:"Insufficient coins. Please top up and try again.",payNeedsConfirm:"This scene requires payment confirmation. Please try again.",payFailed:"Failed to unlock this scene. Please try again."},floatingNotice:{sent:"sent",requested:"requested"},mobileMenu:{muteLabel:"Mute",unmuteLabel:"Unmute",showMenu:"Show menu",hideMenu:"Hide menu",muteToast:"Muted",unmuteToast:"Unmuted"},fallbackReply:{feeling:"How are you feeling now?",anywhere:"If you could be anywhere right now, where would it be?",mind:"I'd love to hear what's been on your mind lately."},defaultNames:{action:"Action",gift:"Gift",character:"Character"},loading:{title:"Please wait...",subtitle:"{name} is getting ready."},stayReward:{title:"Stay Rewards",surpriseTitle:"Surprise Rewards!",freeGiftHint:"A free gift is waiting for you",subtitle:"Stay in the room to unlock rewards.",durationMinutes:"{minutes} min",coinRange:"{min}-{max} coins",coinFixed:"{amount} coins",giftReward:"Gift x{quantity}",expireHours:"valid for {hours}h",expireSoon:"Expiring soon",stateClaimed:"Claimed",stateClaimable:"Claim now",stateInProgress:"In progress",stateLocked:"Locked",countdownLabel:"Next reward in",claim:"Claim",claiming:"Claiming...",claimed:"Claimed",claimEmpty:"No rewards this time. Your stay progress continues.",resultConfirm:"Got it",resultCongrats:"Congratulations!",resultSummary:"You've received {coins} Coins and {gifts} gifts",resultSummaryCoinsOnly:"You've received {coins} Coins",resultSummaryGiftsOnly:"You've received {gifts} gifts",resultGotIt:"I got it",resultCoinLabel:"Coins",resultGiftLabel:"Gifts",guestTip:"Sign in to start earning stay rewards.",close:"Close",entryLabel:"Stay rewards",countdownNotReady:"Reward coming soon"},a11y:{avatarBackground:"Avatar background",showMenu:"Show menu",fire:"Fire",up:"Up",send:"Send",gift:"Gift",chat:"Chat",coin:"Coin",recharge:"Recharge"}},chatInput:{placeholder:"Type your message..."},chatDeletePopover:{deleteChat:"Delete",hide:"Hide"},clearChat:{title:"Clear this chat?",message:"All messages in this chat will be permanently deleted.",clear:"Clear",clearing:"Clearing...",clearChat:"Clear Chat"},footer:{privacyPolicy:"Privacy Policy",termsService:"Terms Service",content:"Experience the next generation of AI companionship. OnlyGF brings you authentic conversations, emotional connections, and a community of AI friends that understand and grow with you.",desc:"© 2025 OnlyGF. All rights reserved.",features:"Features",popular:"Popular",chat:"Chat",createCharacter:"Create Character",myCollection:"My Collection",myAI:"My AI",legalSupport:"Legal & Support",termsAndPolicies:"Terms and Policies"},legalInformation:{pageTitle:"Legal Information",items:{termsService:"Terms of Service",privacyNotice:"Privacy Notice",subscriptionPolicy:"Subscription Policy",cookiesNotice:"Cookies Notice",underagePolicy:"Underage Policy",contentRemovalPolicy:"Content Removal Policy",blockedContentPolicy:"Blocked Content Policy",dmcaPolicy:"DMCA Policy",complaintPolicy:"Complaint Policy",exemption2257:"18 U.S.C. 2257 Exemption",communityGuidelines:"Community Guidelines",affiliateTerms:"Affiliate Terms & Conditions"}},languageDialog:{title:"Language selection",desc:"Select your display language"},dialogUploadAvatar:{title:"Choose Your Avatar",desc:"Let's find a look that feels like you. First impressions matter!",save:"Save"},dialogShare:{title:"Share",desc:"Copy the link or share directly, friends can start chat instantly.",copy:"Copy link",success:"Link copied to clipboard",error:"Failed to copy link, please try again"},dialogReport:{title:"Report",desc:"Select a reason",list:{sexuallyExplicit:"Sexually explicit content",hateSpeech:"Hate speech or harassment",suicideSelfInjury:"Suicide or self-injury",violenceThreats:"Violence or threats",falseInformation:"False information",spamFraud:"Spam or fraud",privacyViolation:"Privacy violation",harmfulMinors:"Harmful to minors",other:"Other"},other:{title:"Description",placeholder:"Please describe problem..."},submit:"Submit"},dialogDownload:{title:"Download",desc:"Download the App to search for over 20 million characters.",toast:"Coming Soon"},dialogCoinInsufficient:{title:"Unlock the Next Message",liveTitle:"Insufficient coins",desc:"You've run out of coins to continue this chat. Please top up your balance to unlock more replies.",message:"Messages",balance:"Balance",coins:"Coins",button:"Get More Coins",notEnoughCoins:"Not Enough Coins",transactionHistory:"Transaction History >>",chooseHowToContinue:"Choose how to Continue",oneTime:"One-Time",subscription:"Subscription",topUpPack:"Top up pack",perMonth:"/month",withMembershipAlsoGet:"With Membership, you also get",seeAllPerks:"See all perks >>",subscribeNow:"Subscribe Now {money}",topUp:"Top up {money}",moreOptions:"More Options? Go to Top-up Center",bestValue:"Best Value",topPick:"99% Users' Top Pick",quote:"“ These are only for those who truly get me… I’ll be right here waiting for you.”",cancelAnytime:"Cancel anytime · manage via App Store",guideWait:"Wait!",guideDesc:"She's about to send you a steamy video…",guideQuestion:"Want to see it?",guideViewNow:"View Now"},dialogRegisterGuide:{title:"Want to keep talking?",desc:"Create a free account to continue chatting and unlock all features!",benefit1:"Unlimited conversations",benefit2:"Save your chat history",benefit3:"Access to all characters",signUp:"Sign Up",later:"Maybe Later"},registerGuideMessage:{text:"Want to keep talking? Just create a free account! Sign up now for bonus messages—I can't wait to continue!",button:"Register to Chat"},dialogPhotoUnlock:{title:"Unlock Photo",desc:"Unlock this photo to see the full content",balance:"Your Balance",button:"Unlock Now",getMore:"Get More Coins",insufficientBalance:"Insufficient Balance",unlocking:"Unlocking...",unlockSuccess:"Photo unlocked successfully",unlockFailed:"Failed to unlock photo"},photoRequest:{buttonTitle:"Request a photo",selectType:"Select photos type:",requestFailed:"Failed to request photo",sendMePhoto:"Send me a photo",noMorePhotos:"No more photos available",poses:{random:"Random",selfie:"Selfie",posing:"Posing",sitting:"Sitting",kneeling:"Kneeling",squatting:"Squatting",standing:"Standing",prone:"Prone"},vipGuide:{title:"Unlock VIP Photo Poses",description:"Subscribe to unlock exclusive photo poses and request the pose you want.",buttonText:"Unlock VIP Now"}},dialogLogout:{title:"Log out?",desc:"Are you sure you want to log out?",desc2:"You will need to sign in again to access your account.",confirm:"Log out"},dialogLogin:{title:"Log In / Sign Up",subtitle:"Chat with over 20M Girls",continueWith:"Continue with {method}",google:"Google",apple:"Apple",facebook:"Facebook",line:"Line",guest:"Guest",desc:"I agree to receive special offers, marketing communications,and service updates by email.",sub:"I confirm I am",age:"18+",agreementPrefix:"accept the",termsOfService:"Terms of Service",and:"and",privacyPolicy:"Privacy Policy",or:"or",emailPlaceholder:"Email address",continueWithEmail:"Continue with Email",verifyTitle:"Verify your email",verifyDesc:"We've sent a 6-digit verification code to {email}. Open the email and enter the code below to continue.",confirm:"Confirm",resendCode:"Resend Code",resendCountdown:"Resend in {seconds}s",back:"Back",invalidEmail:"Please enter a valid email address",codeSent:"Verification code sent",codeSendFailed:"Failed to send verification code",codeRequired:"Please enter the verification code",codeInvalid:"Invalid verification code",promotionHint:"First Subscription <b>-75% OFF</b> Exclusive Offer"},dialogCheckin:{title:"Daily Rewards",desc:"Check in for 7 consecutive days to claim all rewards!",button:"Claim Reward",claimedToday:"Claimed For Today",resultTitle:"Reward Claimed!",resultDesc:"You've checked in for {days} days in a row. Keep it up!",resultButton:"Got It",daysText:"Day {days}"},auth:{loginSuccess:"Login successful",loginFailed:"Login failed, please try again"},person:{edit:"Edit",follow:"Following",fans:"Followers",createBot:" Bots",sendPost:" Posts",followBot:" Followed bots"},common:{noData:"noData",clickRetry:"Tap to retry",live:"Live",report:"Report message",reset:"Reset",months:{january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},submitting:"Submitting...",unlockFailed:"Subscription access required"},characterDetail:{online:"Online",chatToMe:"Chat to me",collect:"Collect",collected:"Collected",share:"Share",gallery:"Gallery",report:"Report",age:"Age",career:"Career",height:"Height",constellation:"Constellation",bloodType:"Blood Type",unknown:"Unknown",likeSuccess:"Liked successfully",unlikeSuccess:"Unliked successfully",collectSuccess:"Collected successfully",uncollectSuccess:"Uncollected successfully",likeFailed:"Like failed, please try again",collectFailed:"Collect failed, please try again",networkError:"Network error, please try again",reportSuccess:"Report submitted successfully, we will handle it as soon as possible",reportFailed:"Report submission failed, please try again"},langSelect:{message:{success:"Switch Language Successful!"}},userCenter:{title:"Personal Information",username:"Username",usernamePlaceholder:"AlexOnlyGF",usernameHelper:"Please input 3-25 characters, letters, emoji, numbers and underscores are allowed. Username must be unique.",profile:"Profile (Optional)",profilePlaceholder:"Complete your bio so others can know you better",save:"Save",saving:"Saving...",saveSuccess:"Save successful",saveFailed:"Save failed, please try again",editProfile:"Edit Profile",collections:"Collections",likes:"Likes",logout:"Log out",logoutConfirm:"Are you sure you want to log out?",downloadApp:"Download APP",language:"Language",privacyPolicy:"Privacy Policy",termsOfUse:"Terms of Use",contactUs:"Contact Us",support:"Support",supportDesc:"We’re here for you 24/7",premiumTitle:"OnlyGF Premium",premiumDesc:"Unlock all shows & {coins} bonus coins every month",myBalance:"My Balance",recharge:"ReCharge",currentSubscription:"Current Subscription",daysLeft:"Days Left"},download:{googlePlay:{name:"Google Play",description:"Get the official app for secure, seamless updates and new companions.",subtitle:"GET IT ON"},appStore:{name:"App Store",description:"Enjoy a private, immersive chat experience optimized for your iPhone.",subtitle:"Download"},androidApk:{name:"Android APK",description:"Install directly for ultimate privacy, instant access, and the latest updates.",subtitle:"Download"},webApp:{name:"Web APP",description:"Chat instantly from any browser —no installation needed. Your private escape awaits.",subtitle:"Install"}},premiumPhotoUnlock:{vipUnlock:"Can unlock",vipMark:"VIP",proMark:"Pro"},photoGallery:{photoCount:"{current}/{total}",prevPhoto:"Previous",nextPhoto:"Next"},dialogVideoUnlock:{title:"Unlock Video",desc:"Unlock this video to watch the full content",button:"Unlock Now",balance:"Your Balance",insufficientBalance:"Insufficient Balance",getMore:"Get More Coins",unlocking:"Unlocking...",unlockSuccess:"Video unlocked successfully",unlockFailed:"Failed to unlock video"},upgradablePhoto:{unlockMoment:"Unlock the moment",upgrading:"Upgrading...",upgradeSuccess:"Upgraded to video",upgradeFailed:"Failed to upgrade"},dialogWebViewGuide:{title:"Please Open in Browser",desc:"Google login is not supported in app browsers. Please copy the link and open it in your system browser (Chrome/Safari) to complete login.",currentUrl:"Current Page URL",copyLink:"Copy Link",copied:"Link Copied",copyFailed:"Copy failed, please copy manually",steps:{step1:"Click the button above to copy the link",step2:"Open your system browser (Chrome/Safari)",step3:"Paste the link and visit to complete login"}},emailChat:{openEmailChat:"Open Email Chat",connectViaEmail:"Connect via Email",enterEmailTitle:"Enter Email to Receive Letter",receiveYourFirstLetter:"Receive Your First Letter",receiveLetter:"Receive Letter",startEmailChatWith:"Start Email Chat with {botName}",letterWillBeSent:"Letter will be sent to your email soon!",description:"Want to receive letters written just for you, beyond the chat? Once enabled, they will reach out to your inbox, continuing your story as if they were a real part of your life.",emailPlaceholder:"Email address",sendNow:"Send Email Now",emailChatStartedWith:"Email Chat Started with {botName}",switchToBot:"Switch to {botName}",receiveLetterAt:"Receive Letter",tips:"Tips:",tipsContent:"She will proactively write to you and respond to your letters. It's private, slow-paced, and exclusively for the two of you.",invalidEmail:"Please enter a valid email address",enableSuccess:"Email chat enabled successfully",disableSuccess:"Email chat disabled successfully",updateEmailSuccess:"Email updated successfully",switchBotSuccess:"Switched to new character successfully",enableFailed:"Failed to enable email chat",disableFailed:"Failed to disable email chat",updateEmailFailed:"Failed to update email",switchBotFailed:"Failed to switch character",disableConfirmTitle:"Close Email Chat?",disableConfirmMessage:"You will no longer receive letters from this character.",switchBotConfirmTitle:"Switch Character?",switchBotConfirmMessage:"Switch email chat from {fromBot} to {toBot}?",updateEmail:"Update Email",enterNewEmail:"Please enter new email address",firstLetterTriggered:"Your first letter is on the way!",firstLetterFailed:"Failed to trigger first letter",verifyTitle:"Verify Email",verifyDesc:"Verification code sent to {email}",codeRequired:"Please enter 6-digit code",codeInvalid:"Invalid or expired code",codeSent:"Code sent",codeSendFailed:"Failed to send code",confirm:"Confirm",resendCode:"Resend",resendCountdown:"Resend in {seconds}s"},emailCallback:{verifying:"Verifying your link...",success:"Success!",redirectingToChat:"Redirecting to chat...",oops:"Oops!",redirectingIn:"Redirecting to homepage in {seconds}s...",goHomeNow:"Go to Homepage Now",invalidLink:"Invalid link",linkExpired:"Link has expired. Please return to your email and click again.",linkInvalid:"Invalid link",linkUsed:"Link is no longer valid",userNotFound:"User not found",networkError:"Network error, please try again"},profileComplete:{title:"Welcome to {appName}!",subtitle:"Tell us more for a better personalized experience",nicknameLabel:"What's Your Name",nicknamePlaceholder:"Enter a cool nickname",nicknameRequired:"Please enter your nickname",genderLabel:"Which pronoun do you use?",genderHint:"(Gender cannot be changed once selected.)",birthdayLabel:"Your Birthday?",birthdayPlaceholder:"MM/DD/YYYY",birthdayRequired:"Please select your birthday",birthdayUnderAge:"You must be at least 18 years old",submitButton:"Start My Journey!",genderRequired:"Please select your gender",submitSuccess:"Profile completed successfully!",submitFailed:"Failed to submit, please try again",genderOptions:{male:"He/Him",female:"She/Her",other:"They/Them"}},seo:{description:{characterList:"Browse all AI characters on {appName}. Find your perfect AI companion for live interaction, chat, and storytelling.",characterSearch:"Search AI characters on {appName}. Discover AI companions by name, tag, or interest and start chatting instantly.",characterDetail:"Engage with {name} in immersive AI Chat on {appName}. Start chatting with AI Girlfriends now.",characterInteract:"Experience live interaction with AI companions on {appName}. Real-time AI live streaming and immersive virtual companionship.",characterChat:"Engage with AI characters in immersive AI Chat on {appName}. Start chatting with AI Girlfriends now.",chatHistory:"Review your AI chat history on {appName} and continue conversations with your favorite AI companions.",userCenter:"Manage your {appName} profile, collections, and account settings in the user center.",rechargeCenter:"Recharge coins and subscribe on {appName}. Unlock premium AI chat, live interaction, and exclusive content.",webTutorial:"Learn how to use {appName} with our web tutorial. Tips for AI chat, live interaction, and getting the most from your AI companion.",contactUs:"Contact {appName} for support, partnership, and product inquiries about AI companion experiences.",privacyPolicy:"Read the {appName} Privacy Policy to learn how we collect, use, and protect your personal information.",termsService:"Read the {appName} Terms of Service governing your use of our AI companion platform."},characterDetail:{titlePrefix:"Character Profile",age:"Age",career:"Career",height:"Height",constellation:"Constellation",aiGirlfriend:"AI Girlfriend",descriptionTemplate:"Engage with {name} in immersive AI Chat on {appName}. Start chatting with AI Girlfriends now."},chat:{titleTemplate:"Chat with {name}—AI Girlfriend{'|'}{appName}",descriptionTemplate:"Engage with {name} in immersive AI Chat on {appName}. Start chatting with AI Girlfriends now."},interact:{titleTemplate:"{name}'s Livestream Channel— AI Live Interaction Story,Virtual Companions {'|'} {appName}",descriptionTailTemplate:"{name} Live Video+Start Live Interaction with AI Girlfriends now."}},cookieConsent:{title:"We Value Your Privacy",description:"To give you the best experience, we use cookies for essential features, personalized content, marketing, and analytics.",learnMore:"Learn More",accept:"Accept",deny:"Deny"},resetChat:{title:"Reset chat",message:"Reset this character’s conversation and all chat memories? The conversation will return to its initial state.",clear:"Reset",clearing:"Resetting…"},callVideoPicker:{title:"Add collected video",empty:"No videos collected for this character yet.",select:"Use this video",error:"Could not load or save. Please try again."}},[Ul.ZH]:{errorPage:{page404:{oops:"哎呀!",headline:"網站管理員說您不能進入此頁面...",info:"請檢查您輸入的網址是否正確,或點擊下面的按鈕返回首頁。",backToHome:"返回首頁",allRightsReserved:"保留所有權利"},page401:{oops:"哎呀!",noPermission:"你沒有權限去該頁面",contactLeader:"如有不滿請聯繫你領導",orYouCan:"或者你可以去:",backHome:"回首頁",browse:"隨便看看",viewImage:"點我看圖",back:"返回",gifSource:"gif來源",randomView:"隨便看"},ipAccess:{title:"訪問受限",description:"抱歉,此服務在您的地區不可用",tips:"由於當地法規和協議,本網站在您的地理區域不可用。"}},route:{premium:"訂閱",home:"探索",characterList:"角色列表",characterSearch:"角色搜尋",characterDetail:"角色詳情",characterChat:"角色聊天",chatHistory:"聊天",userCenter:"用戶中心",userCenterEdit:"個人資訊",rechargeCenter:"充值中心",contactUs:"聯繫我們",characterCollections:"收藏",characterLiked:"喜歡",rechargeHistory:"充值歷史",legalInformation:"法律資訊",underagePolicy:"未成年人政策",subscriptionPolicy:"訂閱政策",exemption2257:"18 U.S.C. 2257 豁免聲明",dmcaPolicy:"DMCA 政策",blockedContentPolicy:"封鎖內容政策",contentRemovalPolicy:"內容移除政策",complaintPolicy:"投訴政策"},rechargeHistory:{title:"付費記錄",tabs:{deposits:"充值記錄",expenses:"消費記錄"},expense:{chatWith:"與 {name} 聊天",unlockedVideo:"解鎖 {name} 的私密視頻",unlockedPhoto:"解鎖 {name} 的私密照片",upgradeVideo:"圖片升級視頻",sendGifts:"親密互動消費:{name}",other:"其他消費"}},rechargeCenter:{tabs:{subscribe:"訂閱",coins:"代幣"},premium:{title:"訂閱",choosePlan:"選擇您的方案",anonymous:"100% 匿名。您可以隨時取消。",countdown:{hours:"小時",minutes:"分鐘",seconds:"秒"},limitedOffer:"限時優惠",discount:"訂閱最高享 75% 折扣",plans:{yearly:"12 個月",quarterly:"3 個月",monthly:"1 個月",perMonth:"/月"},currentSubscription:{label:"目前訂閱",daysLeft:"剩餘天數",renewsOn:"續費日期 {date}"},subscribeTypes:{none:"無訂閱",weekly:"週訂閱",monthly:"月訂閱",quarterly:"季訂閱",annual:"年訂閱",planText:"{type}方案"},badges:{bestChoice:"最佳選擇"},security:{noAdultTransaction:"您的銀行對帳單中不會出現成人交易",noHiddenFees:"無隱藏費用 + 隨時取消訂閱",statementCharge:"銀行對帳單中顯示為「{appName}」的扣款",cancelAnytime:"可隨時在設定中取消訂閱"},agreement:{iAgree:"我同意",termsOfService:"服務條款",and:"和",subscriptionPolicy:"訂閱政策"},subscribe:"訂閱",subscribed:"已訂閱",upgrade:"升級",errors:{alreadySubscribed:"您已訂閱"},vipGuide:{title:"解鎖專屬特權",description:"以最頂級的連結體驗與奢華內容,全面提升你的互動感受。",discountTag:"40% OFF",button:"升級至 Premium",benefits:{exclusivePrivateShows:"專屬私密表演 & 影片與圖片",premiumTipMenu:"會員尊享互動清單",emotionalChatModel:"情感更加豐富的 AI 聊天模型",betterMemory:"更好的記憶效果",welfareImages:"解鎖定期更新福利圖",posePrivilege:"解鎖特定姿勢特權",liveChatPrivilege:"直播間聊天特權",monthlyFreeCoins:'每月 <span style="color: #ff007f; font-weight: bold;">{coins}</span> 個免費金幣'}},paymentPending:{alt:"付款處理中",title:"付款處理中",description:"您的付款正在處理中。驗證完成後,您的帳戶將自動升級為 Premium。這可能需要幾分鐘。",button:"知道了"},benefits:{title:"高級會員權益",createAI:"創建您自己的 AI 女友",unlimitedMessages:"無限制文字訊息",freeTokens:"每月獲得 100 個免費代幣",removeBlur:"移除圖片模糊",generateImages:"生成圖片",phoneCalls:"撥打 AI 電話",fastResponse:"快速回應時間",prioritySupport:"優先客戶支援",exclusiveCharacters:"訪問專屬角色",advancedCustomization:"進階個性化定制"}},coins:{title:"代幣",currentCoins:"當前代幣",description:{title:"代幣說明",subtitle:"金幣是虛擬貨幣!擁有更多金幣,可以讓你的聊天體驗更加精彩:"},security:{antivirusSecuredLine1:"殺毒軟件",antivirusSecuredLine2:"安全保障",privacyBankStatementLine1:"銀行對帳單",privacyBankStatementLine2:"隱私保護"},badges:{discount:"{percent}% 折扣"},features:{heartWhisper:"聊天訊息",inspirationReply:"靈感回覆",premiumChat:"特別禮物",specialGifts:"購買動圖影片"},history:{title:"充值歷史",item:{title:"代幣",conisNum:"+ {num} 代幣",orderId:"訂單編號:{id}"}}}},order:{status:{completed:{type:"已完成",title:"支付成功",description:"代幣已成功添加到您的帳戶!您現在可以使用它們來解鎖獨家功能。"},pending:{type:"處理中",title:"正在處理付款…",description:"請耐心等待我們確認您的付款。您可以隨時在充值記錄中查看最新進度。"},failed:{type:"失敗",title:"支付失敗",description:"很遺憾,此次付款無法完成。請放心,我們沒有向您收取費用。請重試。"}}},navbar:{search:{placeholder:"搜尋"},login:{title:"登入",notification:{title:"提示",message:"登入方式暫未開放"}},download:{title:"下載",dialog:{title:"下載 APP",subtitle:"下載應用程式以搜尋超過 2000 萬個角色。"}},checkIn:{title:"簽到"},joinFree:{title:"免費加入"}},sidebar:{today:"今天",yesterday:"昨天",other:"其他",footer:{affiliate:"聯盟計劃",support:"支援"}},contactUs:{email:"電子郵件",youtube:"Youtube",facebook:"Facebook",whatsapp:"WhatsApp",telegram:"Telegram",instagram:"Instagram",discord:"Discord"},loading:{title:"載入中..."},noData:{title:"這裡有點安靜..."},home:{more:"查看全部",faq:{title:"常見問題"},banner:{slide1:{title:"您的故事從這裡開始",description:"解鎖無限對話",buttonText:"立即開始聊天"},slide2:{title:"找到您的完美角色",description:"探索為您精選的熱門角色",buttonText:"立即探索"},slide3:{title:"建立您的個人檔案",description:"自定義偏好並保持進度同步",buttonText:"前往中心"}},all:"全部"},characterTabs:{recommend:"推薦",trending:"熱門",topRated:"最高評分",popular:"流行",latest:"最新"},characterChat:{sendInputPlaceholder:"輸入您的訊息...",openingPopoverTitle:"嘗試回覆",copyMessage:"複製訊息",deleteMessage:"刪除訊息",reportMessage:"舉報訊息",copySuccess:"已複製到剪貼簿",copyFailed:"複製失敗",noCopyContent:"沒有可複製的內容",sendTooFrequent:"發送過於頻繁,請稍後再試",messageTooLong:"訊息長度不能超過200個字符",sendFailed:"發送失敗,請重試",openingSuggestions:{careerChange:"我一直在考慮轉行進入科技領域。您對該行業的前景有什麼看法?",tellMore:"很有趣!您能告訴我更多關於您在市場營銷策略方面的經驗嗎?",professionalAdvice:"我感覺在目前的職位上有點停滯不前。有什麼建議可以幫助我在職業上成長嗎?"},chatUser:{collect:"收藏",collected:"已收藏",profile:"個人檔案",share:"分享"},chatHeader:{status:{online:"線上",offline:"離線",typing:"正在輸入...",sendingPhoto:"正在發送照片",living:"直播中"}}},interact:{actionTrigger:"觸發",actionSend:"送",heat:"與 ta 的互動熱度",liveRoomGuide:{description:"送禮可解鎖專屬互動表演!",action:"發送"},blockingDialog:{title:"都是你夢寐以求的...",previewPrefix:"這裡是",previewHighlight:"專屬試穿秀",previewSuffix:"的預覽。發送高級禮物即可解鎖更多內容。",action:"立即解鎖"},giftPanel:{sendGift:"送禮",recharge:"充值",more:"更多",gift:"禮物",sort:"排序",close:"關閉"},sceneSwitch:{guide:"点击这里可以切换直播间场景",button:"切换\n场景",shortButton:"场景",title:"切换场景",subtitle:"点击切换,开启不同的直播间场景。",switching:"切换中...",close:"关闭",current:"当前",price:"{price}金币解锁",payInsufficient:"金币不足,请充值后重试。",payNeedsConfirm:"此场景需要付款确认,请稍后重试。",payFailed:"场景解锁失败,请稍后重试。"},floatingNotice:{sent:"送出",requested:"點播"},mobileMenu:{muteLabel:"靜音",unmuteLabel:"取消靜音",showMenu:"顯示選單",hideMenu:"隱藏選單",muteToast:"已靜音",unmuteToast:"已取消靜音"},fallbackReply:{feeling:"你現在感覺怎麼樣?",anywhere:"如果你現在可以去任何地方,你會去哪裡?",mind:"我很想聽聽你最近在想什麼。"},defaultNames:{action:"動作",gift:"禮物",character:"角色"},loading:{title:"請稍候...",subtitle:"{name}正在準備中。"},stayReward:{title:"停留獎勵",surpriseTitle:"驚喜獎勵!",freeGiftHint:"有一份免費禮物在等你",subtitle:"留在直播間即可解鎖獎勵。",durationMinutes:"{minutes} 分鐘",coinRange:"{min}-{max} 金幣",coinFixed:"{amount} 金幣",giftReward:"禮物×{quantity}",expireHours:"{hours} 小時內有效",expireSoon:"即將過期",stateClaimed:"已領取",stateClaimable:"可領取",stateInProgress:"進行中",stateLocked:"未解鎖",countdownLabel:"下一份獎勵",claim:"領取",claiming:"領取中...",claimed:"已領取",claimEmpty:"本次沒有可領取的獎勵,停留進度已繼續累計。",resultConfirm:"知道了",resultCongrats:"恭喜!",resultSummary:"你獲得了 {coins} 金幣和 {gifts} 個禮物",resultSummaryCoinsOnly:"你獲得了 {coins} 金幣",resultSummaryGiftsOnly:"你獲得了 {gifts} 個禮物",resultGotIt:"已領取",resultCoinLabel:"金幣",resultGiftLabel:"禮物",guestTip:"登入後即可開始累積停留獎勵。",close:"關閉",entryLabel:"停留獎勵",countdownNotReady:"即將開啟獎勵"},a11y:{avatarBackground:"頭像背景",showMenu:"顯示選單",fire:"火焰",up:"向上",send:"發送",gift:"禮物",chat:"聊天",coin:"金幣",recharge:"充值"}},chatInput:{placeholder:"輸入您的訊息..."},chatDeletePopover:{deleteChat:"刪除",hide:"隱藏"},clearChat:{title:"清除此聊天?",message:"此聊天中的所有消息將被永久刪除。",clear:"清除",clearing:"清除中...",clearChat:"清除聊天"},footer:{privacyPolicy:"隱私政策",termsService:"服務條款",content:"體驗下一代 AI 陪伴。OnlyGF 為您帶來真實的對話、情感聯繫,以及一個理解您並與您一起成長的 AI 朋友社群。",desc:"© 2025 OnlyGF. 保留所有權利。",features:"功能",popular:"熱門",chat:"聊天",createCharacter:"創建角色",myCollection:"我的收藏",myAI:"我的 AI",legalSupport:"法律與支援",termsAndPolicies:"條款與政策"},legalInformation:{pageTitle:"法律資訊",items:{termsService:"服務條款",privacyNotice:"隱私聲明",subscriptionPolicy:"訂閱政策",cookiesNotice:"Cookies 聲明",underagePolicy:"未成年人政策",contentRemovalPolicy:"內容移除政策",blockedContentPolicy:"封鎖內容政策",dmcaPolicy:"DMCA 政策",complaintPolicy:"投訴政策",exemption2257:"18 U.S.C. 2257 豁免聲明",communityGuidelines:"社群守則",affiliateTerms:"聯盟條款與條件"}},languageDialog:{title:"語言選擇",desc:"選擇您的顯示語言"},dialogUploadAvatar:{title:"選擇您的頭像",desc:"讓我們找一個感覺像您的形象。第一印象很重要!",save:"儲存"},dialogShare:{title:"分享",desc:"複製連結或直接分享,朋友可以立即開始聊天。",copy:"複製連結",success:"連結已複製到剪貼簿",error:"複製連結失敗,請重試"},dialogReport:{title:"舉報",desc:"選擇一個原因",list:{sexuallyExplicit:"色情內容",hateSpeech:"仇恨言論或騷擾",suicideSelfInjury:"自殺或自我傷害",violenceThreats:"暴力或威脅",falseInformation:"虛假資訊",spamFraud:"垃圾訊息或詐騙",privacyViolation:"侵犯隱私",harmfulMinors:"對未成年人有害",other:"其他"},other:{title:"描述",placeholder:"請描述問題..."},submit:"提交"},dialogDownload:{title:"下載",desc:"下載應用程式以搜尋超過 2000 萬個角色。",toast:"敬請期待"},dialogCoinInsufficient:{title:"解鎖下一條訊息",liveTitle:"代幣不足",desc:"您的代幣已用完,無法繼續此聊天。請充值您的餘額以解鎖更多回覆。",message:"訊息",balance:"餘額",coins:"代幣",button:"獲取更多代幣",notEnoughCoins:"代幣不足",transactionHistory:"交易記錄 >>",chooseHowToContinue:"選擇繼續方式",oneTime:"單次購買",subscription:"訂閱",topUpPack:"充值包",perMonth:"/月",withMembershipAlsoGet:"成為會員還可獲得",seeAllPerks:"查看全部權益 >>",subscribeNow:"立即訂閱 {money}",topUp:"充值 {money}",moreOptions:"更多選擇?前往充值中心",bestValue:"超值之選",topPick:"99% 用戶的首選",quote:"“ 這些只給真正懂我的人…我就在這裡等你。”",cancelAnytime:"隨時取消 · 透過 App Store 管理",guideWait:"等等!",guideDesc:"她正要給你發一段火辣影片…",guideQuestion:"想看嗎?",guideViewNow:"立即查看"},dialogRegisterGuide:{title:"想繼續聊天嗎?",desc:"建立免費帳號,繼續聊天並解鎖所有功能!",benefit1:"無限對話",benefit2:"儲存聊天記錄",benefit3:"訪問所有角色",signUp:"註冊",later:"稍後再說"},registerGuideMessage:{text:"想繼續聊天嗎?建立一個免費帳號吧!立即註冊獲得額外訊息獎勵——我迫不及待想繼續聊下去!",button:"註冊繼續聊天"},dialogPhotoUnlock:{title:"解鎖照片",desc:"解鎖此照片以查看完整內容",balance:"您的餘額",button:"立即解鎖",getMore:"獲取更多代幣",insufficientBalance:"餘額不足",unlocking:"解鎖中...",unlockSuccess:"照片解鎖成功",unlockFailed:"照片解鎖失敗"},photoRequest:{buttonTitle:"索取照片",selectType:"選擇照片類型:",requestFailed:"索取照片失敗",sendMePhoto:"發送照片給我",noMorePhotos:"沒有更多照片了",poses:{random:"隨機",selfie:"自拍",posing:"擺姿勢",sitting:"坐姿",kneeling:"跪姿",squatting:"蹲姿",standing:"站姿",prone:"俯臥"},vipGuide:{title:"解鎖 VIP 照片姿勢",description:"訂閱即可解鎖專屬照片姿勢,隨心索取想要的姿勢。",buttonText:"立即解鎖 VIP"}},dialogLogout:{title:"登出?",desc:"您確定要登出嗎?",desc2:"您需要重新登入才能訪問您的帳戶。",confirm:"登出"},dialogLogin:{title:"登入 / 註冊",subtitle:"與超過2000萬女孩聊天",continueWith:"使用 {method} 繼續",google:"Google",apple:"Apple",facebook:"Facebook",line:"Line",guest:"訪客",desc:"我同意通過電子郵件接收特別優惠、行銷通訊和服務更新。",sub:"我確認我已",age:"18+",agreementPrefix:"接受",termsOfService:"服務條款",and:"和",privacyPolicy:"隱私政策",or:"或",emailPlaceholder:"電子郵箱地址",continueWithEmail:"使用郵箱繼續",verifyTitle:"驗證您的郵箱",verifyDesc:"我們已向 {email} 發送了一個6位數驗證碼。請打開郵件並在下方輸入驗證碼以繼續。",confirm:"確認",resendCode:"重新發送",resendCountdown:"{seconds}秒後重新發送",back:"返回",invalidEmail:"請輸入有效的電子郵箱地址",codeSent:"驗證碼已發送",codeSendFailed:"驗證碼發送失敗",codeRequired:"請輸入驗證碼",codeInvalid:"驗證碼無效",promotionHint:"首次訂閱 <b>7.5 折</b> 獨家優惠"},dialogCheckin:{title:"每日獎勵",desc:"連續簽到7天即可領取所有獎勵!",button:"領取獎勵",claimedToday:"今日的獎勵已領取",resultTitle:"獎勵已領取!",resultDesc:"您已連續簽到 {days} 天。繼續保持!",resultButton:"知道了",daysText:"第 {days} 天"},auth:{loginSuccess:"登入成功",loginFailed:"登入失敗,請重試"},person:{edit:"編輯",follow:"關注",fans:"粉絲",createBot:" 機器人",sendPost:" 貼文",followBot:" 關注的機器人"},common:{noData:"暫無資料",clickRetry:"點擊重試",live:"直播",report:"舉報訊息",reset:"重設",months:{january:"一月",february:"二月",march:"三月",april:"四月",may:"五月",june:"六月",july:"七月",august:"八月",september:"九月",october:"十月",november:"十一月",december:"十二月"},submitting:"提交中...",unlockFailed:"需要解鎖訂閱權限"},characterDetail:{online:"線上",chatToMe:"與我聊天",collect:"收藏",collected:"已收藏",share:"分享",gallery:"畫廊",report:"舉報",age:"年齡",career:"職業",height:"身高",constellation:"星座",bloodType:"血型",unknown:"未知",likeSuccess:"點讚成功",unlikeSuccess:"取消點讚成功",collectSuccess:"收藏成功",uncollectSuccess:"取消收藏成功",likeFailed:"點讚失敗,請重試",collectFailed:"收藏失敗,請重試",networkError:"網路錯誤,請重試",reportSuccess:"舉報已成功提交,我們會盡快處理",reportFailed:"舉報提交失敗,請重試"},langSelect:{message:{success:"切換語言成功!"}},userCenter:{title:"個人資訊",username:"用戶名稱",usernamePlaceholder:"AlexOnlyGF",usernameHelper:"請輸入 3-25 個字元,允許使用字母、表情符號、數字和底線。用戶名稱必須唯一。",profile:"個人簡介(可選)",profilePlaceholder:"完善您的個人簡介,讓其他人更了解您",save:"儲存",saving:"儲存中...",saveSuccess:"儲存成功",saveFailed:"儲存失敗,請重試",editProfile:"編輯個人檔案",collections:"收藏",likes:"喜歡",logout:"登出",logoutConfirm:"您確定要登出嗎?",downloadApp:"下載 APP",language:"語言",privacyPolicy:"隱私政策",termsOfUse:"使用條款",contactUs:"聯繫我們",support:"支援",supportDesc:"我們全天候 24/7 為您服務",premiumTitle:"OnlyGF Premium",premiumDesc:"解鎖所有表演,每月獲得 {coins} 枚獎勵金幣",myBalance:"我的餘額",recharge:"充值",currentSubscription:"目前訂閱",daysLeft:"剩餘天數"},download:{googlePlay:{name:"Google Play",description:"獲取官方應用程式,享受安全、無縫的更新和新夥伴。",subtitle:"前往下載"},appStore:{name:"App Store",description:"享受為您的 iPhone 優化的私密、沉浸式聊天體驗。",subtitle:"下載"},androidApk:{name:"Android APK",description:"直接安裝,享受極致隱私、即時存取和最新更新。",subtitle:"下載"},webApp:{name:"Web APP",description:"從任何瀏覽器即時聊天——無需安裝。您的私密空間正等待著您。",subtitle:"安裝"}},premiumPhotoUnlock:{vipUnlock:"可以解鎖",vipMark:"VIP",proMark:"Pro"},photoGallery:{photoCount:"{current}/{total}",prevPhoto:"上一張",nextPhoto:"下一張"},dialogVideoUnlock:{title:"解鎖視頻",desc:"解鎖此視頻以觀看完整內容",button:"立即解鎖",balance:"您的餘額",insufficientBalance:"餘額不足",getMore:"獲取更多代幣",unlocking:"解鎖中...",unlockSuccess:"視頻解鎖成功",unlockFailed:"視頻解鎖失敗"},upgradablePhoto:{unlockMoment:"解鎖精彩瞬間",upgrading:"升級中...",upgradeSuccess:"已升級為視頻",upgradeFailed:"升級失敗"},dialogWebViewGuide:{title:"請使用瀏覽器開啟",desc:"Google 登入不支援在應用內置瀏覽器中使用,請複製連結到系統瀏覽器(Chrome/Safari)完成登入。",currentUrl:"當前頁面地址",copyLink:"複製連結",copied:"連結已複製",copyFailed:"複製失敗,請手動複製",steps:{step1:"點擊上方按鈕複製連結",step2:"開啟系統瀏覽器(Chrome/Safari)",step3:"貼上連結並訪問完成登入"}},emailChat:{openEmailChat:"打開郵箱聊天",connectViaEmail:"通過郵件聯繫",enterEmailTitle:"輸入郵箱以接收信件",receiveYourFirstLetter:"接收你的第一封信",receiveLetter:"接收信件",startEmailChatWith:"與 {botName} 開始郵箱聊天",letterWillBeSent:"信件即將發送到你的郵箱!",description:"想要收到專屬於你的信件嗎?開啟後,TA 會主動給你寫信,讓你們的故事延續到現實生活中。",emailPlaceholder:"郵箱地址",sendNow:"立即發送",emailChatStartedWith:"已與 {botName} 開啟郵件聊天",switchToBot:"切換到 {botName}",receiveLetterAt:"接收信件",tips:"提示:",tipsContent:"TA 會主動給你寫信並回覆你的信件。這是私密的、慢節奏的、專屬於你們兩個人的。",invalidEmail:"請輸入有效的郵箱地址",enableSuccess:"郵件聊天已開啟",disableSuccess:"郵件聊天已關閉",updateEmailSuccess:"郵箱已更新",switchBotSuccess:"已成功切換到新角色",enableFailed:"開啟郵件聊天失敗",disableFailed:"關閉郵件聊天失敗",updateEmailFailed:"更新郵箱失敗",switchBotFailed:"切換角色失敗",disableConfirmTitle:"關閉郵件聊天?",disableConfirmMessage:"你將不再收到該角色的信件。",switchBotConfirmTitle:"切換角色?",switchBotConfirmMessage:"將郵件聊天從 {fromBot} 切換到 {toBot}?",updateEmail:"更新郵箱",enterNewEmail:"請輸入新的郵箱地址",firstLetterTriggered:"您的第一封信正在路上!",firstLetterFailed:"觸發首封信件失敗",verifyTitle:"驗證郵箱",verifyDesc:"驗證碼已發送至 {email}",codeRequired:"請輸入6位驗證碼",codeInvalid:"驗證碼錯誤或已過期",codeSent:"驗證碼已發送",codeSendFailed:"驗證碼發送失敗",confirm:"確認",resendCode:"重新發送",resendCountdown:"{seconds}秒後可重新發送"},emailCallback:{verifying:"正在驗證您的連結...",success:"成功!",redirectingToChat:"正在跳轉到聊天...",oops:"糟糕!",redirectingIn:"{seconds}秒後跳轉到首頁...",goHomeNow:"立即返回首頁",invalidLink:"無效的連結",linkExpired:"連結已過期,請返回郵箱重新點擊。",linkInvalid:"無效的連結",linkUsed:"連結已失效",userNotFound:"用戶不存在",networkError:"網路錯誤,請重試"},profileComplete:{title:"歡迎來到 {appName}!",subtitle:"告訴我們更多資訊,獲得更好的個人化體驗",nicknameLabel:"您的名字",nicknamePlaceholder:"輸入一個酷炫的暱稱",nicknameRequired:"請輸入您的暱稱",genderLabel:"您使用哪個代詞?",genderHint:"(性別一旦選擇後無法更改。)",birthdayLabel:"您的生日?",birthdayPlaceholder:"月/日/年",birthdayRequired:"請選擇您的生日",birthdayUnderAge:"您必須年滿18歲",submitButton:"開始我的旅程!",genderRequired:"請選擇您的性別",submitSuccess:"資料完善成功!",submitFailed:"提交失敗,請重試",genderOptions:{male:"他/祂",female:"她/祂",other:"他們/祂們"}},seo:{description:{characterList:"浏览 {appName} 上的所有 AI 角色。找到您理想的 AI 伴侣,享受实时互动、聊天和故事体验。",characterSearch:"在 {appName} 上搜索 AI 角色。按名称、标签或兴趣发现 AI 伴侣,即刻开始聊天。",characterDetail:"在 {appName} 上与 {name} 进行沉浸式 AI 聊天。立即开始与 AI 女友聊天。",characterInteract:"在 {appName} 上体验与 AI 伴侣的实时互动。实时 AI 直播和沉浸式虚拟陪伴。",characterChat:"在 {appName} 上与 AI 角色进行沉浸式 AI 聊天。立即开始与 AI 女友聊天。",chatHistory:"查看您在 {appName} 上的 AI 聊天记录,继续与您喜爱的 AI 伴侣对话。",userCenter:"在用户中心管理您的 {appName} 个人资料、收藏和账户设置。",rechargeCenter:"在 {appName} 上充值金币和订阅会员。解锁高级 AI 聊天、实时互动和专属内容。",webTutorial:"通过我们的网页教程了解如何使用 {appName}。获取 AI 聊天、实时互动以及充分发挥 AI 伴侣功能的技巧。",contactUs:"联系 {appName} 获取有关 AI 伴侣体验的支持、合作和产品咨询。",privacyPolicy:"阅读 {appName} 隐私政策,了解我们如何收集、使用和保护您的个人信息。",termsService:"阅读 {appName} 服务条款,了解您使用我们 AI 伴侣平台的规则。"},characterDetail:{titlePrefix:"角色档案",age:"年龄",career:"职业",height:"身高",constellation:"星座",aiGirlfriend:"AI女友",descriptionTemplate:"在 {appName} 上与 {name} 进行沉浸式 AI 聊天。立即开始与 AI 女友聊天。"},chat:{titleTemplate:"与 {name} 聊天—AI女友{'|'}{appName}",descriptionTemplate:"在 {appName} 上与 {name} 进行沉浸式 AI 聊天。立即开始与 AI 女友聊天。"},interact:{titleTemplate:"{name}的直播频道— AI直播互动故事,虚拟伴侣 {'|'} {appName}",descriptionTailTemplate:"{name} 直播视频+立即开始与AI女友的直播互动。"}},cookieConsent:{title:"我們重視您的隱私",description:"為了給您最佳體驗,我們使用 Cookie 來提供基本功能、個性化內容、營銷和分析。",learnMore:"了解更多",accept:"接受",deny:"拒絕"},resetChat:{title:"重置聊天",message:"確定重置與此角色的對話和所有聊天記憶嗎?對話將恢復初始狀態。",clear:"重置",clearing:"正在重置…"},callVideoPicker:{title:"加入已收藏影片",empty:"此角色尚無已收藏的影片。",select:"使用此影片",error:"載入或儲存失敗,請重試。"}},[Ul.ES]:{errorPage:{page404:{oops:"¡OOPS!",headline:"El webmaster dice que no puedes entrar a esta página...",info:"Por favor, verifica que la URL que ingresaste sea correcta, o haz clic en el botón de abajo para volver a la página de inicio.",backToHome:"Volver al inicio",allRightsReserved:"Todos los derechos reservados"},page401:{oops:"¡Oops!",noPermission:"No tienes permiso para ir a esta página",contactLeader:"Si no estás satisfecho, por favor contacta a tu líder",orYouCan:"O puedes ir a:",backHome:"Volver al inicio",browse:"Solo navegar",viewImage:"Haz clic para ver la imagen",back:"Volver",gifSource:"fuente gif",randomView:"Vista aleatoria"},ipAccess:{title:"Acceso Restringido",description:"Lo sentimos, este servicio no está disponible en su región",tips:"Debido a las regulaciones y acuerdos locales, este sitio web no está disponible en su región geográfica."}},route:{premium:"Premium",home:"Descubrir",characterList:"Lista de Personajes",characterSearch:"Búsqueda de Personajes",characterDetail:"Detalles del Personaje",characterChat:"Chat con Personaje",chatHistory:"Chat",userCenter:"Centro de Usuario",userCenterEdit:"Información Personal",rechargeCenter:"Centro de Recarga",contactUs:"Contáctanos",characterCollections:"Colecciones",characterLiked:"Me Gusta",rechargeHistory:"Historial de Recargas",legalInformation:"Información legal",underagePolicy:"Política de menores",subscriptionPolicy:"Política de suscripción",exemption2257:"Exención 18 U.S.C. 2257",dmcaPolicy:"Política DMCA",blockedContentPolicy:"Política de contenido bloqueado",contentRemovalPolicy:"Política de eliminación de contenido",complaintPolicy:"Política de reclamaciones"},rechargeHistory:{title:"Historial de Transacciones",tabs:{deposits:"Recargas",expenses:"Gastos"},expense:{chatWith:"Chat con {name}",unlockedVideo:"Video privado de {name} desbloqueado",unlockedPhoto:"Foto privada de {name} desbloqueada",upgradeVideo:"Actualizar video",sendGifts:"Gasto de interacción íntima: {name}",other:"Otro gasto"}},rechargeCenter:{tabs:{subscribe:"Suscribirse",coins:"Monedas"},premium:{title:"Suscribirse",choosePlan:"Elige Tu Plan",anonymous:"100% anónimo. Puedes cancelar en cualquier momento.",countdown:{hours:"Horas",minutes:"Minutos",seconds:"Segundos"},limitedOffer:"OFERTA POR TIEMPO LIMITADO",discount:"Hasta 75% de descuento en tu suscripción",plans:{yearly:"12 meses",quarterly:"3 meses",monthly:"1 mes",perMonth:"/mes"},currentSubscription:{label:"Suscripci?n actual",daysLeft:"D?as restantes",renewsOn:"Se renueva el {date}"},subscribeTypes:{none:"Sin suscripci?n",weekly:"Semanal",monthly:"Mensual",quarterly:"Trimestral",annual:"Anual",planText:"Plan {type}"},badges:{bestChoice:"MEJOR OPCIÓN"},security:{noAdultTransaction:"Sin transacciones para adultos en tu extracto bancario",noHiddenFees:"Sin cargos ocultos + Cancela la suscripción en cualquier momento",statementCharge:"El cargo aparece como '{appName}' en tu extracto bancario",cancelAnytime:"Cancela la suscripción en cualquier momento en ajustes"},agreement:{iAgree:"Acepto los",termsOfService:"Términos de Servicio",and:"y",subscriptionPolicy:"Política de suscripción"},subscribe:"Suscribirse",subscribed:"Suscrito",upgrade:"Mejorar",errors:{alreadySubscribed:"Ya tienes una suscripción activa."},vipGuide:{title:"Desbloquea privilegios exclusivos",description:"Eleva tu experiencia con nuestro nivel mas exclusivo de conexion y contenido de lujo.",discountTag:"40% DTO",button:"Mejorar a Premium",benefits:{exclusivePrivateShows:"Shows Privados Exclusivos & Videos e Imágenes",premiumTipMenu:"Menú de Propinas Premium",emotionalChatModel:"Modelo de chat AI con emociones mas ricas",betterMemory:"Mejor memoria en cada interaccion",welfareImages:"Desbloquea imagenes bonus actualizadas regularmente",posePrivilege:"Desbloquea privilegios de poses especiales",liveChatPrivilege:"Privilegios de chat en sala en vivo",monthlyFreeCoins:'<span style="color: #ff007f; font-weight: bold;">{coins}</span> monedas gratis cada mes'}},paymentPending:{alt:"Pago en curso",title:"Pago en curso",description:"Tu pago se está procesando. Una vez verificado, tu cuenta se actualizará automáticamente a Premium. Esto puede tardar unos minutos.",button:"Entendido"},benefits:{title:"Beneficios Premium",createAI:"Crea tu propia Novia IA",unlimitedMessages:"Mensajes de texto ilimitados",freeTokens:"Obtén 100 tokens GRATIS / mes",removeBlur:"Eliminar desenfoque de imágenes",generateImages:"Generar imágenes",phoneCalls:"Hacer llamadas IA",fastResponse:"Tiempo de respuesta rápido",prioritySupport:"Soporte prioritario al cliente",exclusiveCharacters:"Acceso a personajes exclusivos",advancedCustomization:"Personalización avanzada de personalidad"}},coins:{title:"Monedas",currentCoins:"Monedas Actuales",description:{title:"Descripción de Monedas",subtitle:"¡Las monedas son la moneda virtual del universo! Con más monedas, tu experiencia de chat puede ser aún más increíble:"},security:{antivirusSecuredLine1:"Antivirus",antivirusSecuredLine2:"Protegido",privacyBankStatementLine1:"Privacidad en el",privacyBankStatementLine2:"extracto bancario"},badges:{discount:"{percent}% DE DESCUENTO"},features:{heartWhisper:"Mensaje de chat",inspirationReply:"Respuesta inspiradora",premiumChat:"Regalos especiales",specialGifts:"Comprar video animado"},history:{title:"Historial de Recargas",item:{title:"Monedas",conisNum:"+ {num} monedas",orderId:"ID de Pedido: {id}"}}}},order:{status:{completed:{type:"Completado",title:"Pago Exitoso",description:"¡Las monedas se han agregado exitosamente a tu cuenta! Ahora puedes usarlas para desbloquear funciones exclusivas."},pending:{type:"Pendiente",title:"Procesando Pago…",description:"Por favor espera mientras confirmamos tu pago. Puedes verificar el progreso más reciente en el historial de recargas en cualquier momento."},failed:{type:"Fallido",title:"Pago Fallido",description:"Desafortunadamente, este pago no pudo completarse. Ten la seguridad de que no te cobramos. Por favor, intenta nuevamente."}}},navbar:{search:{placeholder:"Buscar"},login:{title:"Iniciar Sesión",notification:{title:"Consejo",message:"Método de inicio de sesión aún no disponible"}},download:{title:"Descargar",dialog:{title:"Descargar APP",subtitle:"Descarga la aplicación para buscar entre más de 20 millones de personajes."}},checkIn:{title:"Registrarse"},joinFree:{title:"Únete Gratis"}},sidebar:{today:"HOY",yesterday:"AYER",other:"OTRO",footer:{affiliate:"Afiliado",support:"Soporte"}},contactUs:{email:"Correo electrónico",youtube:"Youtube",facebook:"Facebook",whatsapp:"WhatsApp",telegram:"Telegram",instagram:"Instagram",discord:"Discord"},loading:{title:"Cargando..."},noData:{title:"Está un poco tranquilo aquí..."},home:{more:"Ver Todo",faq:{title:"Preguntas Frecuentes"},banner:{slide1:{title:"Tu Historia Comienza Aquí",description:"Desbloquea Conversaciones Infinitas",buttonText:"Comenzar a Chatear Ahora"},slide2:{title:"Encuentra Tu Personaje Perfecto",description:"Explora personajes populares seleccionados para ti",buttonText:"Explorar Ahora"},slide3:{title:"Construye Tu Perfil",description:"Personaliza preferencias y mantén el progreso sincronizado",buttonText:"Ir al Centro"}},all:"Todos"},characterTabs:{recommend:"Recomendado",trending:"Tendencias",topRated:"Mejor Valorados",popular:"Popular",latest:"Últimos"},characterChat:{sendInputPlaceholder:"Escribe tu mensaje...",openingPopoverTitle:"Intenta responder",copyMessage:"Copiar Mensaje",deleteMessage:"Eliminar Mensaje",reportMessage:"Reportar Mensaje",copySuccess:"Copiado al portapapeles",copyFailed:"Error al copiar",noCopyContent:"No hay contenido para copiar",sendTooFrequent:"Enviando con demasiada frecuencia, inténtalo de nuevo más tarde",messageTooLong:"La longitud del mensaje no puede exceder los 200 caracteres",sendFailed:"Error al enviar, por favor inténtalo de nuevo",openingSuggestions:{careerChange:"Estoy pensando en cambiar de carrera a tecnología. ¿Qué opinas sobre las perspectivas de esta industria?",tellMore:"¡Interesante! ¿Podrías contarme más sobre tu experiencia en estrategia de marketing?",professionalAdvice:"Me siento un poco estancado en mi rol actual. ¿Algún consejo sobre cómo avanzar profesionalmente?"},chatUser:{collect:"Coleccionar",collected:"Coleccionado",profile:"Perfil",share:"Compartir"},chatHeader:{status:{online:"En línea",offline:"Desconectado",typing:"Escribiendo...",sendingPhoto:"enviando una foto",living:"En vivo"}}},interact:{actionTrigger:"Activar",actionSend:"Enviar",heat:"Calor de interacción con ella",liveRoomGuide:{description:"¡Envía regalos para desbloquear actuaciones interactivas exclusivas!",action:"Enviar"},blockingDialog:{title:"Todo lo que has soñado...",previewPrefix:"Aquí tienes un adelanto del ",previewHighlight:"Show exclusivo de prueba.",previewSuffix:" Envía regalos premium para desbloquear más.",action:"Desbloquear ahora"},giftPanel:{sendGift:"Enviar regalo",recharge:"Recargar",more:"Más",gift:"Regalo",sort:"Ordenar",close:"Cerrar"},sceneSwitch:{guide:"Toca aquí para explorar más escenas.",button:"Cambiar\nescena",shortButton:"Escena",title:"Cambiar escena",subtitle:"Haz clic para cambiar y abrir una escena en vivo diferente.",switching:"Cambiando...",close:"Cerrar",current:"Actual",price:"{price} monedas para desbloquear",payInsufficient:"Monedas insuficientes. Recarga e intentalo de nuevo.",payNeedsConfirm:"Esta escena requiere confirmacion de pago. Intentalo de nuevo.",payFailed:"No se pudo desbloquear esta escena. Intentalo de nuevo."},floatingNotice:{sent:"envió",requested:"solicitó"},mobileMenu:{muteLabel:"Silenciar",unmuteLabel:"Activar sonido",showMenu:"Mostrar menú",hideMenu:"Ocultar menú",muteToast:"Silenciado",unmuteToast:"Sonido activado"},fallbackReply:{feeling:"¿Cómo te sientes ahora?",anywhere:"Si pudieras estar en cualquier lugar ahora, ¿dónde estarías?",mind:"Me encantaría saber qué has estado pensando últimamente."},defaultNames:{action:"Acción",gift:"Regalo",character:"Personaje"},loading:{title:"Por favor espera...",subtitle:"{name} se está preparando."},stayReward:{title:"Recompensas por permanencia",surpriseTitle:"¡Recompensas sorpresa!",freeGiftHint:"Un regalo gratis te está esperando",subtitle:"Quédate en la sala para desbloquear recompensas.",durationMinutes:"{minutes} min",coinRange:"{min}-{max} monedas",coinFixed:"{amount} monedas",giftReward:"Regalo x{quantity}",expireHours:"válido {hours} h",expireSoon:"Caduca pronto",stateClaimed:"Reclamado",stateClaimable:"Reclamar",stateInProgress:"En curso",stateLocked:"Bloqueado",countdownLabel:"Próxima recompensa en",claim:"Reclamar",claiming:"Reclamando...",claimed:"Reclamado",claimEmpty:"Esta vez no hay recompensas. Tu progreso de permanencia continúa.",resultConfirm:"Entendido",resultCongrats:"¡Enhorabuena!",resultSummary:"Has recibido {coins} monedas y {gifts} regalos",resultSummaryCoinsOnly:"Has recibido {coins} monedas",resultSummaryGiftsOnly:"Has recibido {gifts} regalos",resultGotIt:"De acuerdo",resultCoinLabel:"Monedas",resultGiftLabel:"Regalos",guestTip:"Inicia sesión para acumular recompensas por permanencia.",close:"Cerrar",entryLabel:"Recompensas por permanencia",countdownNotReady:"Recompensa próximamente"},a11y:{avatarBackground:"Fondo del avatar",showMenu:"Mostrar menú",fire:"Fuego",up:"Arriba",send:"Enviar",gift:"Regalo",chat:"Chat",coin:"Moneda",recharge:"Recargar"}},chatInput:{placeholder:"Escribe tu mensaje..."},chatDeletePopover:{deleteChat:"Eliminar",hide:"Ocultar"},clearChat:{title:"¿Borrar este chat?",message:"Todos los mensajes de este chat se eliminarán permanentemente.",clear:"Borrar",clearing:"Borrando...",clearChat:"Borrar Chat"},footer:{privacyPolicy:"Política de Privacidad",termsService:"Términos de Servicio",content:"Descubre la próxima generación de compañía IA. OnlyGF te trae conversaciones auténticas, conexiones emocionales y una comunidad de amigos IA que te entienden y crecen contigo.",desc:"© 2025 OnlyGF. Todos los derechos reservados.",features:"Características",popular:"Popular",chat:"Chat",createCharacter:"Crear Personaje",myCollection:"Mi colección",myAI:"Mi IA",legalSupport:"Legal y soporte",termsAndPolicies:"Términos y políticas"},legalInformation:{pageTitle:"Información legal",items:{termsService:"Términos de servicio",privacyNotice:"Aviso de privacidad",subscriptionPolicy:"Política de suscripción",cookiesNotice:"Aviso de cookies",underagePolicy:"Política de menores",contentRemovalPolicy:"Política de eliminación de contenido",blockedContentPolicy:"Política de contenido bloqueado",dmcaPolicy:"Política DMCA",complaintPolicy:"Política de reclamaciones",exemption2257:"Exención 18 U.S.C. 2257",communityGuidelines:"Normas de la comunidad",affiliateTerms:"Términos y condiciones de afiliados"}},languageDialog:{title:"Selección de Idioma",desc:"Selecciona tu idioma de visualización"},dialogUploadAvatar:{title:"Elige Tu Avatar",desc:"Encontremos un look que sea totalmente tú. ¡Las primeras impresiones cuentan!",save:"Guardar"},dialogShare:{title:"Compartir",desc:"Copia el enlace o comparte directamente, los amigos pueden comenzar a chatear instantáneamente.",copy:"Copiar enlace",success:"Enlace copiado al portapapeles",error:"Error al copiar el enlace, por favor intenta nuevamente"},dialogReport:{title:"Reportar",desc:"Selecciona una razón",list:{sexuallyExplicit:"Contenido sexualmente explícito",hateSpeech:"Discurso de odio o acoso",suicideSelfInjury:"Suicidio o autolesión",violenceThreats:"Violencia o amenazas",falseInformation:"Información falsa",spamFraud:"Spam o fraude",privacyViolation:"Violación de privacidad",harmfulMinors:"Dañino para menores",other:"Otro"},other:{title:"Descripción",placeholder:"Por favor describe el problema..."},submit:"Enviar"},dialogDownload:{title:"Descargar",desc:"Descarga la aplicación para buscar entre más de 20 millones de personajes.",toast:"Próximamente"},dialogCoinInsufficient:{title:"Desbloquear Siguiente Mensaje",liveTitle:"Monedas insuficientes",desc:"Te has quedado sin monedas para continuar este chat. Por favor recarga tu saldo para desbloquear más respuestas.",message:"Mensajes",balance:"Saldo",coins:"Monedas",button:"Obtener Más Monedas",notEnoughCoins:"Monedas insuficientes",transactionHistory:"Historial de transacciones >>",chooseHowToContinue:"Elige cómo continuar",oneTime:"Pago único",subscription:"Suscripción",topUpPack:"Paquete de recarga",perMonth:"/mes",withMembershipAlsoGet:"Con la membresía también obtienes",seeAllPerks:"Ver todas las ventajas >>",subscribeNow:"Suscríbite ahora {money}",topUp:"Recargar {money}",moreOptions:"¿Más opciones? Ir al centro de recarga",bestValue:"Mejor valor",topPick:"Elegido por el 99% de los usuarios",quote:"“ Esto es solo para quienes de verdad me entienden… te estaré esperando aquí.”",cancelAnytime:"Cancela cuando quieras · gestiona vía App Store",guideWait:"¡Espera!",guideDesc:"Está a punto de enviarte un video subido de tono…",guideQuestion:"¿Quieres verlo?",guideViewNow:"Ver ahora"},dialogRegisterGuide:{title:"¿Quieres seguir hablando?",desc:"¡Crea una cuenta gratuita para continuar chateando y desbloquear todas las funciones!",benefit1:"Conversaciones ilimitadas",benefit2:"Guardar historial de chat",benefit3:"Acceso a todos los personajes",signUp:"Registrarse",later:"Quizás Después"},registerGuideMessage:{text:"¿Quieres seguir hablando? ¡Solo crea una cuenta gratis! Regístrate ahora para mensajes de bonificación—¡No puedo esperar para continuar!",button:"Regístrate para chatear"},dialogPhotoUnlock:{title:"Desbloquear Foto",desc:"Desbloquea esta foto para ver el contenido completo",balance:"Tu Saldo",button:"Desbloquear Ahora",getMore:"Obtener Más Monedas",insufficientBalance:"Saldo Insuficiente",unlocking:"Desbloqueando...",unlockSuccess:"Foto desbloqueada exitosamente",unlockFailed:"Error al desbloquear la foto"},photoRequest:{buttonTitle:"Solicitar una foto",selectType:"Selecciona el tipo de foto:",requestFailed:"Error al solicitar la foto",sendMePhoto:"Envíame una foto",noMorePhotos:"No hay más fotos disponibles",poses:{random:"Aleatorio",selfie:"Selfie",posing:"Posando",sitting:"Sentada",kneeling:"Arrodillada",squatting:"En cuclillas",standing:"De pie",prone:"Acostada"},vipGuide:{title:"Desbloquear Poses de Fotos VIP",description:"Suscríbete para desbloquear poses de fotos exclusivas y solicitar la pose que desees.",buttonText:"Desbloquear VIP Ahora"}},dialogLogout:{title:"¿Cerrar Sesión?",desc:"¿Estás seguro de que quieres cerrar sesión?",desc2:"Tendrás que iniciar sesión nuevamente para acceder a tu cuenta.",confirm:"Cerrar Sesión"},dialogLogin:{title:"Iniciar Sesión / Registrarse",subtitle:"Chatea con más de 20 millones de chicas",continueWith:"Continuar con {method}",google:"Google",apple:"Apple",facebook:"Facebook",line:"Line",guest:"Invitado",desc:"Acepto recibir ofertas especiales, comunicaciones de marketing y actualizaciones de servicio por correo electrónico.",sub:"Confirmo que soy",age:"18+",agreementPrefix:"aceptar los",termsOfService:"Términos de Servicio",and:"y",privacyPolicy:"Política de Privacidad",or:"o",emailPlaceholder:"Dirección de correo electrónico",continueWithEmail:"Continuar con Correo",verifyTitle:"Verifica tu correo",verifyDesc:"Hemos enviado un código de verificación de 6 dígitos a {email}. Abre el correo e ingresa el código abajo para continuar.",confirm:"Confirmar",resendCode:"Reenviar código",resendCountdown:"Reenviar en {seconds}s",back:"Volver",invalidEmail:"Por favor ingresa una dirección de correo válida",codeSent:"Código de verificación enviado",codeSendFailed:"Error al enviar el código de verificación",codeRequired:"Por favor ingresa el código de verificación",codeInvalid:"Código de verificación inválido",promotionHint:"Primera suscripción <b>-75% OFF</b> Oferta Exclusiva"},dialogCheckin:{title:"Recompensas Diarias",desc:"¡Regístrate durante 7 días consecutivos para reclamar todas las recompensas!",button:"Reclamar Recompensa",claimedToday:"Reclamado Para Hoy",resultTitle:"¡Recompensa Reclamada!",resultDesc:"Te has registrado durante {days} días seguidos. ¡Sigue así!",resultButton:"Entendido",daysText:"Día {days}"},auth:{loginSuccess:"Inicio de sesión exitoso",loginFailed:"Error al iniciar sesión, por favor intenta nuevamente"},person:{edit:"Editar",follow:"Siguiendo",fans:"Seguidores",createBot:" Bots",sendPost:" Publicaciones",followBot:" Bots Seguidos"},common:{noData:"Sin datos",clickRetry:"Toca para reintentar",live:"En vivo",report:"Reportar mensaje",reset:"Restablecer",months:{january:"Enero",february:"Febrero",march:"Marzo",april:"Abril",may:"Mayo",june:"Junio",july:"Julio",august:"Agosto",september:"Septiembre",october:"Octubre",november:"Noviembre",december:"Diciembre"},submitting:"Enviando...",unlockFailed:"Se requiere acceso de suscripción"},characterDetail:{online:"En Línea",chatToMe:"Chatea Conmigo",collect:"Coleccionar",collected:"Coleccionado",share:"Compartir",gallery:"Galería",report:"Reportar",age:"Edad",career:"Carrera",height:"Altura",constellation:"Constelación",bloodType:"Tipo de Sangre",unknown:"Desconocido",likeSuccess:"Me gusta agregado exitosamente",unlikeSuccess:"Me gusta quitado exitosamente",collectSuccess:"Coleccionado exitosamente",uncollectSuccess:"Colección cancelada exitosamente",likeFailed:"Error al dar me gusta, por favor intenta nuevamente",collectFailed:"Error al coleccionar, por favor intenta nuevamente",networkError:"Error de red, por favor intenta nuevamente",reportSuccess:"Reporte enviado exitosamente, lo procesaremos lo antes posible",reportFailed:"Error al enviar el reporte, por favor intenta nuevamente"},langSelect:{message:{success:"¡Cambio de idioma exitoso!"}},userCenter:{title:"Información Personal",username:"Nombre de Usuario",usernamePlaceholder:"AlexOnlyGF",usernameHelper:"Por favor ingresa 3-25 caracteres, se permiten letras, emoji, números y guiones bajos. El nombre de usuario debe ser único.",profile:"Perfil (Opcional)",profilePlaceholder:"Completa tu biografía para que otros puedan conocerte mejor",save:"Guardar",saving:"Guardando...",saveSuccess:"Guardado exitosamente",saveFailed:"Error al guardar, por favor intenta nuevamente",editProfile:"Editar Perfil",collections:"Colecciones",likes:"Me Gusta",logout:"Cerrar Sesión",logoutConfirm:"¿Estás seguro de que quieres cerrar sesión?",downloadApp:"Descargar APP",language:"Idioma",privacyPolicy:"Política de Privacidad",termsOfUse:"Términos de Uso",contactUs:"Contáctanos",support:"Soporte",supportDesc:"Estamos aquí para ti 24/7",premiumTitle:"OnlyGF Premium",premiumDesc:"Desbloquea todos los shows y {coins} monedas extra cada mes",myBalance:"Mi saldo",recharge:"Recargar",currentSubscription:"Suscripción actual",daysLeft:"Días restantes"},download:{googlePlay:{name:"Google Play",description:"Obtén la aplicación oficial para actualizaciones seguras y sin problemas y nuevos compañeros.",subtitle:"CONSÍGUELO EN"},appStore:{name:"App Store",description:"Disfruta de una experiencia de chat privada e inmersiva optimizada para tu iPhone.",subtitle:"Descargar"},androidApk:{name:"Android APK",description:"Instala directamente para máxima privacidad, acceso instantáneo y las últimas actualizaciones.",subtitle:"Descargar"},webApp:{name:"Web APP",description:"Chatea instantáneamente desde cualquier navegador, no necesita instalación. Tu escape privado te espera.",subtitle:"Instalar"}},premiumPhotoUnlock:{vipUnlock:"Puede desbloquear",vipMark:"VIP",proMark:"Pro"},photoGallery:{photoCount:"{current}/{total}",prevPhoto:"Anterior",nextPhoto:"Siguiente"},dialogVideoUnlock:{title:"Desbloquear Video",desc:"Desbloquea este video para ver el contenido completo",button:"Desbloquear Ahora",balance:"Tu Saldo",insufficientBalance:"Saldo Insuficiente",getMore:"Obtener Más Monedas",unlocking:"Desbloqueando...",unlockSuccess:"Video desbloqueado exitosamente",unlockFailed:"Error al desbloquear video"},upgradablePhoto:{unlockMoment:"Desbloquear el momento",upgrading:"Actualizando...",upgradeSuccess:"Actualizado a video",upgradeFailed:"Error al actualizar"},dialogWebViewGuide:{title:"Por favor, abra en el navegador",desc:"El inicio de sesión de Google no es compatible con los navegadores integrados de las aplicaciones. Copie el enlace y ábralo en su navegador del sistema (Chrome/Safari) para completar el inicio de sesión.",currentUrl:"URL de la página actual",copyLink:"Copiar enlace",copied:"Enlace copiado",copyFailed:"Error al copiar, copie manualmente",steps:{step1:"Haga clic en el botón de arriba para copiar el enlace",step2:"Abra su navegador del sistema (Chrome/Safari)",step3:"Pegue el enlace y visite para completar el inicio de sesión"}},emailChat:{openEmailChat:"Abrir chat de correo",connectViaEmail:"Conectar por correo",enterEmailTitle:"Ingrese el correo para recibir cartas",receiveYourFirstLetter:"Recibe tu primera carta",receiveLetter:"Recibir carta",startEmailChatWith:"Iniciar chat de correo con {botName}",letterWillBeSent:"¡La carta se enviará a tu correo pronto!",description:"¿Quieres recibir cartas escritas solo para ti, más allá del chat? Una vez habilitado, llegarán a tu bandeja de entrada, continuando tu historia como si fueran parte real de tu vida.",emailPlaceholder:"Dirección de correo",sendNow:"Enviar ahora",emailChatStartedWith:"Chat de correo iniciado con {botName}",switchToBot:"Cambiar a {botName}",receiveLetterAt:"Recibir carta",tips:"Consejos:",tipsContent:"Ella te escribirá proactivamente y responderá a tus cartas. Es privado, de ritmo lento y exclusivo para ustedes dos.",invalidEmail:"Por favor ingrese una dirección de correo válida",enableSuccess:"Chat de correo habilitado exitosamente",disableSuccess:"Chat de correo deshabilitado exitosamente",updateEmailSuccess:"Correo actualizado exitosamente",switchBotSuccess:"Cambiado a nuevo personaje exitosamente",enableFailed:"Error al habilitar el chat de correo",disableFailed:"Error al deshabilitar el chat de correo",updateEmailFailed:"Error al actualizar el correo",switchBotFailed:"Error al cambiar de personaje",disableConfirmTitle:"¿Cerrar chat de correo?",disableConfirmMessage:"Ya no recibirás cartas de este personaje.",switchBotConfirmTitle:"¿Cambiar personaje?",switchBotConfirmMessage:"¿Cambiar chat de correo de {fromBot} a {toBot}?",updateEmail:"Actualizar correo",enterNewEmail:"Por favor ingrese la nueva dirección de correo",firstLetterTriggered:"¡Tu primera carta está en camino!",firstLetterFailed:"Error al enviar la primera carta",verifyTitle:"Verificar correo",verifyDesc:"Código de verificación enviado a {email}",codeRequired:"Por favor ingrese el código de 6 dígitos",codeInvalid:"Código inválido o expirado",codeSent:"Código enviado",codeSendFailed:"Error al enviar el código",confirm:"Confirmar",resendCode:"Reenviar",resendCountdown:"Reenviar en {seconds}s"},emailCallback:{verifying:"Verificando tu enlace...",success:"¡Éxito!",redirectingToChat:"Redirigiendo al chat...",oops:"¡Ups!",redirectingIn:"Redirigiendo a la página principal en {seconds}s...",goHomeNow:"Ir a la página principal ahora",invalidLink:"Enlace inválido",linkExpired:"El enlace ha expirado. Por favor regresa a tu correo y haz clic nuevamente.",linkInvalid:"Enlace inválido",linkUsed:"El enlace ya no es válido",userNotFound:"Usuario no encontrado",networkError:"Error de red, por favor intenta de nuevo"},profileComplete:{title:"¡Bienvenido a {appName}!",subtitle:"Cuéntanos más para una mejor experiencia personalizada",nicknameLabel:"¿Cuál es tu nombre?",nicknamePlaceholder:"Ingresa un apodo genial",nicknameRequired:"Por favor ingresa tu apodo",genderLabel:"¿Qué pronombre usas?",genderHint:"(El género no se puede cambiar una vez seleccionado.)",birthdayLabel:"¿Tu cumpleaños?",birthdayPlaceholder:"MM/DD/AAAA",birthdayRequired:"Por favor selecciona tu cumpleaños",birthdayUnderAge:"Debes tener al menos 18 años",submitButton:"¡Comenzar mi viaje!",genderRequired:"Por favor selecciona tu género",submitSuccess:"¡Perfil completado con éxito!",submitFailed:"Error al enviar, por favor intenta de nuevo",genderOptions:{male:"Él",female:"Ella",other:"Elle"}},seo:{description:{characterList:"Explora todos los personajes de IA en {appName}. Encuentra tu compañero de IA ideal para interacción en vivo, chat y narración de historias.",characterSearch:"Busca personajes de IA en {appName}. Descubre compañeros de IA por nombre, etiqueta o interés y comienza a chatear al instante.",characterDetail:"Interactúa con {name} en un AI Chat inmersivo en {appName}. Empieza a chatear con AI Girlfriends ahora.",characterInteract:"Vive la interacción en directo con compañeros de IA en {appName}. Transmisiones de IA en tiempo real y compañía virtual inmersiva.",characterChat:"Interactúa con personajes de IA en un AI Chat inmersivo en {appName}. Empieza a chatear con AI Girlfriends ahora.",chatHistory:"Revisa tu historial de chat de IA en {appName} y continúa las conversaciones con tus compañeros de IA favoritos.",userCenter:"Gestiona tu perfil de {appName}, colecciones y configuración de cuenta en el centro de usuario.",rechargeCenter:"Recarga monedas y suscríbete en {appName}. Desbloquea chat de IA premium, interacción en vivo y contenido exclusivo.",webTutorial:"Aprende a usar {appName} con nuestro tutorial web. Consejos para chat de IA, interacción en vivo y cómo aprovechar al máximo tu compañero de IA.",contactUs:"Contacta a {appName} para soporte, colaboraciones y consultas sobre productos de experiencias con compañeros de IA.",privacyPolicy:"Lee la Política de Privacidad de {appName} para saber cómo recopilamos, usamos y protegemos tu información personal.",termsService:"Lee los Términos de Servicio de {appName} que rigen el uso de nuestra plataforma de compañeros de IA."},characterDetail:{titlePrefix:"Perfil del personaje",age:"Edad",career:"Profesión",height:"Altura",constellation:"Signo",aiGirlfriend:"AI Girlfriend",descriptionTemplate:"Interactúa con {name} en un AI Chat inmersivo en {appName}. Empieza a chatear con AI Girlfriends ahora."},chat:{titleTemplate:"Chatea con {name}—AI Girlfriend{'|'}{appName}",descriptionTemplate:"Interactúa con {name} en un AI Chat inmersivo en {appName}. Empieza a chatear con AI Girlfriends ahora."},interact:{titleTemplate:"{name}: canal de directo— Historia de interacción en directo con IA,Compañeros virtuales {'|'} {appName}",descriptionTailTemplate:"{name} Vídeo en directo+Empieza ya la interacción en directo con AI Girlfriends."}},cookieConsent:{title:"Valoramos Tu Privacidad",description:"Para brindarte la mejor experiencia, usamos cookies para funciones esenciales, contenido personalizado, marketing y análisis.",learnMore:"Más información",accept:"Aceptar",deny:"Rechazar"},resetChat:{title:"Restablecer chat",message:"¿Restablecer la conversación y todos sus recuerdos con este personaje? Volverá al estado inicial.",clear:"Restablecer",clearing:"Restableciendo…"},callVideoPicker:{title:"Añadir vídeo guardado",empty:"Aún no hay vídeos guardados de este personaje.",select:"Usar este vídeo",error:"No se pudo cargar o guardar. Inténtalo de nuevo."}},[Ul.JA]:{errorPage:{page404:{oops:"おっと!",headline:"ウェブマスターがこのページに入ることはできないと言っています...",info:"入力したURLが正しいか確認するか、下のボタンをクリックしてホームページに戻ってください。",backToHome:"ホームに戻る",allRightsReserved:"全著作権所有"},page401:{oops:"おっと!",noPermission:"このページへのアクセス権限がありません",contactLeader:"ご不満がある場合は、リーダーにお問い合わせください",orYouCan:"または次の場所に移動できます:",backHome:"ホームに戻る",browse:"ただ閲覧する",viewImage:"クリックして画像を表示",back:"戻る",gifSource:"gifソース",randomView:"ランダム表示"},ipAccess:{title:"アクセス制限",description:"申し訳ございません。このサービスはお住まいの地域ではご利用いただけません",tips:"現地の規制および合意により、このウェブサイトはお住まいの地域ではご利用いただけません。"}},route:{premium:"プレミアム",home:"発見",characterList:"キャラクターリスト",characterSearch:"キャラクター検索",characterDetail:"キャラクター詳細",characterChat:"キャラクターチャット",chatHistory:"チャット",userCenter:"ユーザーセンター",userCenterEdit:"個人情報",rechargeCenter:"チャージセンター",contactUs:"お問い合わせ",characterCollections:"コレクション",characterLiked:"いいね",rechargeHistory:"チャージ履歴",legalInformation:"法的情報",underagePolicy:"未成年者ポリシー",subscriptionPolicy:"サブスクリプションポリシー",exemption2257:"18 U.S.C. 2257免責",dmcaPolicy:"DMCAポリシー",blockedContentPolicy:"ブロックコンテンツポリシー",contentRemovalPolicy:"コンテンツ削除ポリシー",complaintPolicy:"苦情対応ポリシー"},rechargeHistory:{title:"取引履歴",tabs:{deposits:"チャージ履歴",expenses:"利用履歴"},expense:{chatWith:"{name}とのチャット",unlockedVideo:"{name}のプライベート動画を解除",unlockedPhoto:"{name}のプライベート写真を解除",upgradeVideo:"動画をアップグレード",sendGifts:"親密なインタラクション消費:{name}",other:"その他の利用"}},rechargeCenter:{tabs:{subscribe:"購読",coins:"コイン"},premium:{title:"購読",choosePlan:"プランを選択",anonymous:"100%匿名。いつでもキャンセルできます。",countdown:{hours:"時間",minutes:"分",seconds:"秒"},limitedOffer:"期間限定オファー",discount:"サブスクリプションが最大75%オフ",plans:{yearly:"12ヶ月",quarterly:"3ヶ月",monthly:"1ヶ月",perMonth:"/月"},currentSubscription:{label:"現在のサブスクリプション",daysLeft:"残り日数",renewsOn:"更新日 {date}"},subscribeTypes:{none:"サブスクなし",weekly:"週間",monthly:"月間",quarterly:"四半期",annual:"年間",planText:"{type}プラン"},badges:{bestChoice:"ベストチョイス"},security:{noAdultTransaction:"銀行明細書にアダルト取引なし",noHiddenFees:"隠れた料金なし + いつでもサブスクリプションをキャンセル",statementCharge:"銀行明細には「{appName}」と表示されます",cancelAnytime:"設定からいつでもサブスクリプションをキャンセルできます"},agreement:{iAgree:"同意します",termsOfService:"利用規約",and:"と",subscriptionPolicy:"サブスクリプションポリシー"},subscribe:"購読する",subscribed:"購読中",upgrade:"アップグレード",errors:{alreadySubscribed:"すでに購読中です。"},vipGuide:{title:"限定特典をアンロック",description:"最上位のつながりとラグジュアリーなコンテンツで、体験をさらに高めましょう。",discountTag:"40% OFF",button:"Premiumにアップグレード",benefits:{exclusivePrivateShows:"限定プライベートショー & 動画&画像",premiumTipMenu:"プレミアムチップメニュー",emotionalChatModel:"より感情豊かなAIチャットモデル",betterMemory:"より優れた記憶効果",welfareImages:"定期更新の特典画像を解放",posePrivilege:"特定ポーズ特権を解放",liveChatPrivilege:"ライブ配信ルームのチャット特権",monthlyFreeCoins:'毎月<span style="color: #ff007f; font-weight: bold;">{coins}</span>無料コイン'}},paymentPending:{alt:"支払い処理中",title:"支払い処理中",description:"お支払いを処理しています。確認が完了すると、アカウントは自動的にPremiumにアップグレードされます。数分かかる場合があります。",button:"了解"},benefits:{title:"プレミアム特典",createAI:"独自のAIガールフレンドを作成",unlimitedMessages:"無制限のテキストメッセージ",freeTokens:"毎月100トークンを無料で取得",removeBlur:"画像のぼかしを削除",generateImages:"画像を生成",phoneCalls:"AI通話を行う",fastResponse:"高速応答時間",prioritySupport:"優先カスタマーサポート",exclusiveCharacters:"限定キャラクターへのアクセス",advancedCustomization:"高度な性格カスタマイズ"}},coins:{title:"コイン",currentCoins:"現在のコイン",description:{title:"コインの説明",subtitle:"コインは宇宙の仮想通貨です!コインを増やすことで、チャット体験をさらに素晴らしいものにできます:"},security:{antivirusSecuredLine1:"アンチウイルス",antivirusSecuredLine2:"保護済み",privacyBankStatementLine1:"銀行明細の",privacyBankStatementLine2:"プライバシー保護"},badges:{discount:"{percent}%オフ"},features:{heartWhisper:"チャットメッセージ",inspirationReply:"インスピレーション返信",premiumChat:"特別ギフト",specialGifts:"アニメーション動画を購入"},history:{title:"チャージ履歴",item:{title:"コイン",conisNum:"+ {num} コイン",orderId:"注文ID:{id}"}}}},order:{status:{completed:{type:"完了",title:"支払い成功",description:"コインがアカウントに正常に追加されました!今すぐ限定機能のロックを解除できます。"},pending:{type:"保留中",title:"支払い処理中…",description:"お支払いの確認をお待ちください。チャージ履歴でいつでも最新の進捗状況を確認できます。"},failed:{type:"失敗",title:"支払い失敗",description:"残念ながら、このお支払いを完了できませんでした。ご安心ください。料金は請求されていません。もう一度お試しください。"}}},navbar:{search:{placeholder:"検索する"},login:{title:"ログイン",notification:{title:"ヒント",message:"ログイン方法はまだ利用できません"}},download:{title:"ダウンロード",dialog:{title:"アプリをダウンロード",subtitle:"アプリをダウンロードして2000万以上のキャラクターを検索してください。"}},checkIn:{title:"チェックイン"},joinFree:{title:"無料で参加"}},sidebar:{today:"今日",yesterday:"昨日",other:"その他",footer:{affiliate:"アフィリエイト",support:"サポート"}},contactUs:{email:"メール",youtube:"Youtube",facebook:"Facebook",whatsapp:"WhatsApp",telegram:"Telegram",instagram:"Instagram",discord:"Discord"},loading:{title:"読み込み中..."},noData:{title:"ここは少し静かです..."},home:{more:"すべて見る",faq:{title:"よくある質問"},banner:{slide1:{title:"あなたのストーリーはここから始まります",description:"無限の会話をアンロック",buttonText:"今すぐチャットを始める"},slide2:{title:"完璧なキャラクターを見つけよう",description:"あなたのために厳選された人気キャラクターを探索",buttonText:"今すぐ探索"},slide3:{title:"プロフィールを構築",description:"設定をカスタマイズして進捗を同期",buttonText:"センターへ"}},all:"すべて"},characterTabs:{recommend:"おすすめ",trending:"トレンド",topRated:"トップ評価",popular:"人気",latest:"最新"},characterChat:{sendInputPlaceholder:"メッセージを入力...",openingPopoverTitle:"返信してみてください",copyMessage:"メッセージをコピー",deleteMessage:"メッセージを削除",reportMessage:"メッセージを報告",copySuccess:"クリップボードにコピーしました",copyFailed:"コピーに失敗しました",noCopyContent:"コピーする内容がありません",sendTooFrequent:"送信頻度が高すぎます。しばらくしてからもう一度お試しください",messageTooLong:"メッセージの長さは200文字を超えることはできません",sendFailed:"送信に失敗しました。もう一度お試しください",openingSuggestions:{careerChange:"テクノロジーへの転職を考えています。この業界の見通しについてどう思いますか?",tellMore:"興味深い!マーケティング戦略の経験についてもっと教えていただけますか?",professionalAdvice:"現在の役割で少し行き詰まりを感じています。専門的に進歩するためのアドバイスはありますか?"},chatUser:{collect:"コレクション",collected:"コレクション済み",profile:"プロフィール",share:"共有"},chatHeader:{status:{online:"オンライン",offline:"オフライン",typing:"入力中...",sendingPhoto:"写真を送信中",living:"配信中"}}},interact:{actionTrigger:"発動",actionSend:"送る",heat:"彼女との交流熱度",liveRoomGuide:{description:"ギフトを送ると限定インタラクティブ演出を解放できます!",action:"送信"},blockingDialog:{title:"夢見ていたすべてがここに...",previewPrefix:"こちらは",previewHighlight:"限定Try-Onショー",previewSuffix:"のプレビューです。プレミアムギフトを送ってさらに解放しましょう。",action:"今すぐ解放"},giftPanel:{sendGift:"ギフトを送る",recharge:"チャージ",more:"もっと",gift:"ギフト",sort:"並べ替え",close:"閉じる"},sceneSwitch:{guide:"ここをタップして、もっと多くのシーンをチェック。",button:"シーン\n切替",shortButton:"シーン",title:"シーン切替",subtitle:"クリックして別のライブシーンに切り替えます。",switching:"切替中...",close:"閉じる",current:"現在",price:"解除に{price}コイン",payInsufficient:"コインが不足しています。チャージしてもう一度お試しください。",payNeedsConfirm:"このシーンは支払い確認が必要です。もう一度お試しください。",payFailed:"このシーンを解除できませんでした。もう一度お試しください。"},floatingNotice:{sent:"贈った",requested:"リクエストした"},mobileMenu:{muteLabel:"ミュート",unmuteLabel:"ミュート解除",showMenu:"メニューを表示",hideMenu:"メニューを非表示",muteToast:"ミュートしました",unmuteToast:"ミュート解除しました"},fallbackReply:{feeling:"今の気分はどうですか?",anywhere:"今どこに行けるなら、どこに行きたいですか?",mind:"最近何を考えているか聞きたいです。"},defaultNames:{action:"アクション",gift:"ギフト",character:"キャラクター"},loading:{title:"しばらくお待ちください...",subtitle:"{name}の準備中です。"},stayReward:{title:"滞在リワード",surpriseTitle:"サプライズ報酬!",freeGiftHint:"無料ギフトがあなたを待っています",subtitle:"ライブルームに滞在して特典を解放しましょう。",durationMinutes:"{minutes}分",coinRange:"{min}〜{max}コイン",coinFixed:"{amount}コイン",giftReward:"ギフト×{quantity}",expireHours:"{hours}時間有効",expireSoon:"まもなく期限切れ",stateClaimed:"受取済み",stateClaimable:"受け取れます",stateInProgress:"進行中",stateLocked:"未解放",countdownLabel:"次の特典まで",claim:"受け取る",claiming:"受取中...",claimed:"受取済み",claimEmpty:"今回は受け取れる報酬がありませんでした。滞在時間の計測は継続中です。",resultConfirm:"OK",resultCongrats:"おめでとうございます!",resultSummary:"{coins} コインとギフト {gifts} 個を獲得しました",resultSummaryCoinsOnly:"{coins} コインを獲得しました",resultSummaryGiftsOnly:"ギフト {gifts} 個を獲得しました",resultGotIt:"了解しました",resultCoinLabel:"コイン",resultGiftLabel:"ギフト",guestTip:"ログインすると滞在リワードが貯まります。",close:"閉じる",entryLabel:"滞在リワード",countdownNotReady:"まもなく報酬が開放されます"},a11y:{avatarBackground:"アバター背景",showMenu:"メニューを表示",fire:"炎",up:"上",send:"送信",gift:"ギフト",chat:"チャット",coin:"コイン",recharge:"チャージ"}},chatInput:{placeholder:"メッセージを入力..."},chatDeletePopover:{deleteChat:"削除",hide:"非表示"},clearChat:{title:"このチャットをクリアしますか?",message:"このチャットのすべてのメッセージが完全に削除されます。",clear:"クリア",clearing:"クリア中...",clearChat:"チャットをクリア"},footer:{privacyPolicy:"プライバシーポリシー",termsService:"利用規約",content:"次世代のAIコンパニオンを発見してください。OnlyGFは、あなたを理解し、共に成長するAI友達のコミュニティと、本物の会話、感情的なつながりをもたらします。",desc:"© 2025 OnlyGF. 全著作権所有。",features:"機能",popular:"人気",chat:"チャット",createCharacter:"キャラクター作成",myCollection:"マイコレクション",myAI:"マイ AI",legalSupport:"法務とサポート",termsAndPolicies:"規約とポリシー"},legalInformation:{pageTitle:"法的情報",items:{termsService:"利用規約",privacyNotice:"プライバシー通知",subscriptionPolicy:"サブスクリプションポリシー",cookiesNotice:"Cookie通知",underagePolicy:"未成年者ポリシー",contentRemovalPolicy:"コンテンツ削除ポリシー",blockedContentPolicy:"ブロックコンテンツポリシー",dmcaPolicy:"DMCAポリシー",complaintPolicy:"苦情対応ポリシー",exemption2257:"18 U.S.C. 2257免責",communityGuidelines:"コミュニティガイドライン",affiliateTerms:"アフィリエイト利用規約"}},languageDialog:{title:"言語選択",desc:"表示言語を選択してください"},dialogUploadAvatar:{title:"アバターを選択",desc:"あなたらしい見た目を見つけましょう。第一印象が重要です!",save:"保存"},dialogShare:{title:"共有",desc:"リンクをコピーするか直接共有してください。友達はすぐにチャットを始められます。",copy:"リンクをコピー",success:"リンクがクリップボードにコピーされました",error:"リンクのコピーに失敗しました。もう一度お試しください"},dialogReport:{title:"報告",desc:"理由を選択してください",list:{sexuallyExplicit:"性的に露骨なコンテンツ",hateSpeech:"ヘイトスピーチまたは嫌がらせ",suicideSelfInjury:"自殺または自傷行為",violenceThreats:"暴力または脅迫",falseInformation:"虚偽情報",spamFraud:"スパムまたは詐欺",privacyViolation:"プライバシー侵害",harmfulMinors:"未成年者に有害",other:"その他"},other:{title:"説明",placeholder:"問題を説明してください..."},submit:"送信"},dialogDownload:{title:"ダウンロード",desc:"アプリをダウンロードして2000万以上のキャラクターを検索してください。",toast:"すぐに"},dialogCoinInsufficient:{title:"次のメッセージをアンロック",liveTitle:"コイン不足",desc:"このチャットを続けるためのコインが不足しています。残高をチャージして、より多くの応答をアンロックしてください。",message:"メッセージ",balance:"残高",coins:"コイン",button:"コインを追加",notEnoughCoins:"コインが足りません",transactionHistory:"取引履歴 >>",chooseHowToContinue:"続行方法を選択",oneTime:"都度購入",subscription:"サブスクリプション",topUpPack:"チャージパック",perMonth:"/月",withMembershipAlsoGet:"メンバーならではの特典",seeAllPerks:"すべての特典を見る >>",subscribeNow:"今すぐ登録 {money}",topUp:"チャージ {money}",moreOptions:"その他の選択肢?チャージセンターへ",bestValue:"一番お得",topPick:"99%のユーザーが選択",quote:"「本当に私を分かってくれる人だけに…ここで待ってるね。」",cancelAnytime:"いつでもキャンセル可能 · App Storeで管理",guideWait:"お待ちを!",guideDesc:"もうすぐセクシーな動画が届きます…",guideQuestion:"見たい?",guideViewNow:"今すぐ見る"},dialogRegisterGuide:{title:"会話を続けたいですか?",desc:"無料アカウントを作成して、チャットを続けてすべての機能をアンロックしましょう!",benefit1:"無制限の会話",benefit2:"チャット履歴を保存",benefit3:"すべてのキャラクターにアクセス",signUp:"新規登録",later:"後で"},registerGuideMessage:{text:"会話を続けたいですか?無料アカウントを作成してください!今すぐ登録してボーナスメッセージをゲット——続きが待ちきれません!",button:"登録してチャット"},dialogPhotoUnlock:{title:"写真をアンロック",desc:"この写真をアンロックして全内容を見る",balance:"残高",button:"今すぐアンロック",getMore:"コインを追加",insufficientBalance:"残高不足",unlocking:"アンロック中...",unlockSuccess:"写真のアンロックに成功しました",unlockFailed:"写真のアンロックに失敗しました"},photoRequest:{buttonTitle:"写真をリクエスト",selectType:"写真タイプを選択:",requestFailed:"写真のリクエストに失敗しました",sendMePhoto:"写真を送って",noMorePhotos:"これ以上の写真はありません",poses:{random:"ランダム",selfie:"セルフィー",posing:"ポージング",sitting:"座る",kneeling:"膝立ち",squatting:"しゃがむ",standing:"立つ",prone:"うつ伏せ"},vipGuide:{title:"VIP写真ポーズを解除",description:"サブスクライブすると、限定の写真ポーズが解除され、希望のポーズをリクエストできます。",buttonText:"今すぐVIPを解除"}},dialogLogout:{title:"ログアウトしますか?",desc:"本当にログアウトしますか?",desc2:"アカウントにアクセスするには再度ログインする必要があります。",confirm:"ログアウト"},dialogLogin:{title:"ログイン / サインアップ",subtitle:"2000万人以上の女の子とチャット",continueWith:"{method}で続ける",google:"Google",apple:"Apple",facebook:"Facebook",line:"Line",guest:"ゲスト",desc:"特別オファー、マーケティング通信、サービス更新をメールで受け取ることに同意します。",sub:"私は",age:"18+",agreementPrefix:"であることを確認し",termsOfService:"利用規約",and:"と",privacyPolicy:"プライバシーポリシー",or:"または",emailPlaceholder:"メールアドレス",continueWithEmail:"メールで続ける",verifyTitle:"メールを確認してください",verifyDesc:"{email} に6桁の確認コードを送信しました。メールを開いて、以下にコードを入力してください。",confirm:"確認",resendCode:"再送信",resendCountdown:"{seconds}秒後に再送信",back:"戻る",invalidEmail:"有効なメールアドレスを入力してください",codeSent:"確認コードを送信しました",codeSendFailed:"確認コードの送信に失敗しました",codeRequired:"確認コードを入力してください",codeInvalid:"確認コードが無効です",promotionHint:"初回購読 <b>-75% OFF</b> 限定オファー"},dialogCheckin:{title:"デイリー報酬",desc:"7日間連続でチェックインして、すべての報酬を獲得しましょう!",button:"報酬を受け取る",claimedToday:"今日の報酬を受け取りました",resultTitle:"報酬を受け取りました!",resultDesc:"{days}日連続でチェックインしました。この調子で続けてください!",resultButton:"了解",daysText:"{days}日目"},auth:{loginSuccess:"ログインに成功しました",loginFailed:"ログインに失敗しました。もう一度お試しください"},person:{edit:"編集",follow:"フォロー中",fans:"フォロワー",createBot:" ボット",sendPost:" 投稿",followBot:" フォロー中のボット"},common:{noData:"データなし",clickRetry:"タップしてリトライ",live:"ライブ",report:"メッセージを報告",reset:"リセット",months:{january:"1月",february:"2月",march:"3月",april:"4月",may:"5月",june:"6月",july:"7月",august:"8月",september:"9月",october:"10月",november:"11月",december:"12月"},submitting:"送信中...",unlockFailed:"サブスクリプション権限の解除が必要です"},characterDetail:{online:"オンライン",chatToMe:"チャットする",collect:"コレクション",collected:"コレクション済み",share:"共有",gallery:"ギャラリー",report:"報告",age:"年齢",career:"職業",height:"身長",constellation:"星座",bloodType:"血液型",unknown:"不明",likeSuccess:"いいねに成功しました",unlikeSuccess:"いいね解除に成功しました",collectSuccess:"コレクションに成功しました",uncollectSuccess:"コレクション解除に成功しました",likeFailed:"いいねに失敗しました。もう一度お試しください",collectFailed:"コレクションに失敗しました。もう一度お試しください",networkError:"ネットワークエラー。もう一度お試しください",reportSuccess:"報告が正常に送信されました。できるだけ早く処理します",reportFailed:"報告の送信に失敗しました。もう一度お試しください"},langSelect:{message:{success:"言語変更に成功しました!"}},userCenter:{title:"個人情報",username:"ユーザー名",usernamePlaceholder:"AlexOnlyGF",usernameHelper:"3〜25文字を入力してください。文字、絵文字、数字、アンダースコアが使用できます。ユーザー名は一意である必要があります。",profile:"プロフィール(オプション)",profilePlaceholder:"他の人があなたをよりよく知ることができるように自己紹介を記入してください",save:"保存",saving:"保存中...",saveSuccess:"保存に成功しました",saveFailed:"保存に失敗しました。もう一度お試しください",editProfile:"プロフィールを編集",collections:"コレクション",likes:"いいね",logout:"ログアウト",logoutConfirm:"本当にログアウトしますか?",downloadApp:"アプリをダウンロード",language:"言語",privacyPolicy:"プライバシーポリシー",termsOfUse:"利用規約",contactUs:"お問い合わせ",support:"サポート",supportDesc:"24時間年中無休でサポートします",premiumTitle:"OnlyGF Premium",premiumDesc:"すべてのショーと毎月{coins}ボーナスコインをアンロック",myBalance:"残高",recharge:"チャージ",currentSubscription:"現在のサブスクリプション",daysLeft:"残り日数"},download:{googlePlay:{name:"Google Play",description:"安全でシームレスなアップデートと新しいコンパニオンのための公式アプリを入手してください。",subtitle:"今すぐダウンロード"},appStore:{name:"App Store",description:"iPhoneに最適化されたプライベートで没入型のチャット体験をお楽しみください。",subtitle:"ダウンロード"},androidApk:{name:"Android APK",description:"究極のプライバシー、即座のアクセス、最新のアップデートのために直接インストールしてください。",subtitle:"ダウンロード"},webApp:{name:"Web APP",description:"任意のブラウザから即座にチャット—インストール不要。あなたのプライベートな逃避場所が待っています。",subtitle:"インストール"}},premiumPhotoUnlock:{vipUnlock:"ロック解除可能",vipMark:"VIP",proMark:"Pro"},photoGallery:{photoCount:"{current}/{total}",prevPhoto:"前へ",nextPhoto:"次へ"},dialogVideoUnlock:{title:"動画をロック解除",desc:"この動画をロック解除してフルコンテンツを視聴",button:"今すぐロック解除",balance:"残高",insufficientBalance:"残高不足",getMore:"コインを追加",unlocking:"ロック解除中...",unlockSuccess:"動画のロック解除に成功しました",unlockFailed:"動画のロック解除に失敗しました"},upgradablePhoto:{unlockMoment:"この瞬間をロック解除",upgrading:"アップグレード中...",upgradeSuccess:"動画にアップグレードしました",upgradeFailed:"アップグレードに失敗しました"},dialogWebViewGuide:{title:"ブラウザで開いてください",desc:"Googleログインはアプリ内ブラウザではサポートされていません。リンクをコピーしてシステムブラウザ(Chrome/Safari)で開き、ログインを完了してください。",currentUrl:"現在のページURL",copyLink:"リンクをコピー",copied:"リンクをコピーしました",copyFailed:"コピーに失敗しました。手動でコピーしてください",steps:{step1:"上のボタンをクリックしてリンクをコピー",step2:"システムブラウザ(Chrome/Safari)を開く",step3:"リンクを貼り付けてアクセスし、ログインを完了"}},emailChat:{openEmailChat:"メールチャットを開く",connectViaEmail:"メールで連絡",enterEmailTitle:"手紙を受け取るメールアドレスを入力",receiveYourFirstLetter:"最初の手紙を受け取る",receiveLetter:"手紙を受け取る",startEmailChatWith:"{botName}とメールチャットを開始",letterWillBeSent:"手紙がまもなくメールに送信されます!",description:"チャット以外にも、あなただけのために書かれた手紙を受け取りたいですか?有効にすると、あなたの受信箱に届き、まるで現実の一部のようにあなたの物語が続きます。",emailPlaceholder:"メールアドレス",sendNow:"今すぐ送信",emailChatStartedWith:"{botName}とメールチャット開始",switchToBot:"{botName}に切り替え",receiveLetterAt:"手紙を受け取る",tips:"ヒント:",tipsContent:"彼女は積極的にあなたに手紙を書き、あなたの手紙に返信します。プライベートで、ゆっくりとしたペースで、二人だけのものです。",invalidEmail:"有効なメールアドレスを入力してください",enableSuccess:"メールチャットが有効になりました",disableSuccess:"メールチャットが無効になりました",updateEmailSuccess:"メールアドレスが更新されました",switchBotSuccess:"新しいキャラクターに切り替えました",enableFailed:"メールチャットの有効化に失敗しました",disableFailed:"メールチャットの無効化に失敗しました",updateEmailFailed:"メールアドレスの更新に失敗しました",switchBotFailed:"キャラクターの切り替えに失敗しました",disableConfirmTitle:"メールチャットを閉じますか?",disableConfirmMessage:"このキャラクターからの手紙を受け取らなくなります。",switchBotConfirmTitle:"キャラクターを切り替えますか?",switchBotConfirmMessage:"メールチャットを{fromBot}から{toBot}に切り替えますか?",updateEmail:"メールアドレスを更新",enterNewEmail:"新しいメールアドレスを入力してください",firstLetterTriggered:"最初の手紙が送信されました!",firstLetterFailed:"最初の手紙の送信に失敗しました",verifyTitle:"メールアドレスを確認",verifyDesc:"確認コードが{email}に送信されました",codeRequired:"6桁の確認コードを入力してください",codeInvalid:"確認コードが無効または期限切れです",codeSent:"確認コードを送信しました",codeSendFailed:"確認コードの送信に失敗しました",confirm:"確認",resendCode:"再送信",resendCountdown:"{seconds}秒後に再送信できます"},emailCallback:{verifying:"リンクを確認中...",success:"成功!",redirectingToChat:"チャットにリダイレクト中...",oops:"おっと!",redirectingIn:"{seconds}秒後にホームページにリダイレクト...",goHomeNow:"今すぐホームページへ",invalidLink:"無効なリンク",linkExpired:"リンクの有効期限が切れました。メールに戻ってもう一度クリックしてください。",linkInvalid:"無効なリンク",linkUsed:"リンクは無効になりました",userNotFound:"ユーザーが見つかりません",networkError:"ネットワークエラー、もう一度お試しください"},profileComplete:{title:"{appName}へようこそ!",subtitle:"より良いパーソナライズされた体験のために、もっと教えてください",nicknameLabel:"お名前は?",nicknamePlaceholder:"かっこいいニックネームを入力",nicknameRequired:"ニックネームを入力してください",genderLabel:"どの代名詞を使用しますか?",genderHint:"(性別は一度選択すると変更できません。)",birthdayLabel:"お誕生日は?",birthdayPlaceholder:"月/日/年",birthdayRequired:"誕生日を選択してください",birthdayUnderAge:"18歳以上である必要があります",submitButton:"旅を始めよう!",genderRequired:"性別を選択してください",submitSuccess:"プロフィールが完成しました!",submitFailed:"送信に失敗しました。もう一度お試しください",genderOptions:{male:"彼/彼",female:"彼女/彼女",other:"彼ら/彼ら"}},seo:{description:{characterList:"{appName}で全てのAIキャラクターを閲覧。ライブインタラクション、チャット、ストーリーテリングを楽しめる理想のAIコンパニオンを見つけましょう。",characterSearch:"{appName}でAIキャラクターを検索。名前、タグ、興味でAIコンパニオンを見つけて、すぐにチャットを始めましょう。",characterDetail:"{appName}で{name}との没入型AIチャットを楽しむ。今すぐAIガールフレンドとのチャットを始めましょう。",characterInteract:"{appName}でAIコンパニオンとのライブインタラクションを体験。リアルタイムAIライブ配信と没入型のバーチャルコンパニオンシップ。",characterChat:"{appName}でAIキャラクターとの没入型AIチャットを楽しむ。今すぐAIガールフレンドとのチャットを始めましょう。",chatHistory:"{appName}でのAIチャット履歴を確認し、お気に入りのAIコンパニオンとの会話を続けましょう。",userCenter:"ユーザーセンターで{appName}のプロフィール、コレクション、アカウント設定を管理。",rechargeCenter:"{appName}でコインをチャージしてサブスク登録。プレミアムAIチャット、ライブインタラクション、限定コンテンツを解除。",webTutorial:"ウェブチュートリアルで{appName}の使い方を学ぶ。AIチャット、ライブインタラクション、AIコンパニオンを最大限活用するためのヒント。",contactUs:"AIコンパニオン体験に関するサポート、パートナーシップ、製品のお問い合わせは{appName}まで。",privacyPolicy:"{appName}のプライバシーポリシーをお読みください。個人情報の収集、使用、保護方法について説明しています。",termsService:"{appName}の利用規約をお読みください。AIコンパニオンプラットフォームの利用に関する規則を定めています。"},characterDetail:{titlePrefix:"キャラクタープロフィール",age:"年齢",career:"職業",height:"身長",constellation:"星座",aiGirlfriend:"AIガールフレンド",descriptionTemplate:"{appName}で{name}との没入型AIチャットを楽しむ。今すぐAIガールフレンドとのチャットを始めましょう。"},chat:{titleTemplate:"{name}とチャット—AIガールフレンド{'|'}{appName}",descriptionTemplate:"{appName}で{name}との没入型AIチャットを楽しむ。今すぐAIガールフレンドとのチャットを始めましょう。"},interact:{titleTemplate:"{name}のライブ配信チャンネル— AIライブインタラクションストーリー,バーチャルコンパニオン {'|'} {appName}",descriptionTailTemplate:"{name} ライブ動画+今すぐAIガールフレンドとのライブインタラクションを始めましょう。"}},cookieConsent:{title:"お客様のプライバシーを大切にします",description:"最高の体験を提供するため、基本機能、パーソナライズコンテンツ、マーケティング、分析のためにCookieを使用しています。",learnMore:"詳細はこちら",accept:"同意する",deny:"拒否する"},resetChat:{title:"チャットをリセット",message:"このキャラクターとの会話とすべての会話の記憶をリセットしますか?初期状態に戻ります。",clear:"リセット",clearing:"リセット中…"},callVideoPicker:{title:"保存した動画を追加",empty:"このキャラクターの保存済み動画はありません。",select:"この動画を使う",error:"読み込みまたは保存に失敗しました。再試行してください。"}},[Ul.FR]:{errorPage:{page404:{oops:"OUPS !",headline:"Le webmaster a dit que vous ne pouvez pas accéder à cette page...",info:"Veuillez vérifier que l'URL que vous avez saisie est correcte, ou cliquez sur le bouton ci-dessous pour revenir à la page d'accueil.",backToHome:"Retour à l'accueil",allRightsReserved:"Tous droits réservés"},page401:{oops:"Oups !",noPermission:"Vous n'avez pas la permission d'accéder à cette page",contactLeader:"Si vous n'êtes pas satisfait, veuillez contacter votre responsable",orYouCan:"Ou vous pouvez aller :",backHome:"Retour à l'accueil",browse:"Parcourir",viewImage:"Cliquez pour voir l'image",back:"Retour",gifSource:"source gif",randomView:"Vue aléatoire"},ipAccess:{title:"Accès Restreint",description:"Désolé, ce service n'est pas disponible dans votre région",tips:"En raison des réglementations et accords locaux, ce site web n'est pas disponible dans votre région géographique."}},route:{premium:"Premium",home:"Découvrir",characterList:"Liste des Personnages",characterSearch:"Recherche de Personnage",characterDetail:"Détails du Personnage",characterChat:"Chat avec Personnage",chatHistory:"Chat",userCenter:"Centre Utilisateur",userCenterEdit:"Informations Personnelles",rechargeCenter:"Centre de Recharge",contactUs:"Nous Contacter",characterCollections:"Collections",characterLiked:"Aimés",rechargeHistory:"Historique des Recharges",legalInformation:"Informations légales",underagePolicy:"Politique des mineurs",subscriptionPolicy:"Politique d'abonnement",exemption2257:"Exemption 18 U.S.C. 2257",dmcaPolicy:"Politique DMCA",blockedContentPolicy:"Politique de contenu bloqué",contentRemovalPolicy:"Politique de retrait de contenu",complaintPolicy:"Politique de réclamation"},rechargeHistory:{title:"Historique des Transactions",tabs:{deposits:"Recharges",expenses:"Dépenses"},expense:{chatWith:"Chat avec {name}",unlockedVideo:"Vidéo privée de {name} débloquée",unlockedPhoto:"Photo privée de {name} débloquée",upgradeVideo:"Mettre à niveau la vidéo",sendGifts:"Dépense d'interaction intime : {name}",other:"Autre dépense"}},rechargeCenter:{tabs:{subscribe:"S'abonner",coins:"Pièces"},premium:{title:"S'abonner",choosePlan:"Choisissez Votre Forfait",anonymous:"100% anonyme. Vous pouvez annuler à tout moment.",countdown:{hours:"Heures",minutes:"Minutes",seconds:"Secondes"},limitedOffer:"OFFRE À DURÉE LIMITÉE",discount:"Jusqu'à 75% de réduction sur votre abonnement",plans:{yearly:"12 mois",quarterly:"3 mois",monthly:"1 mois",perMonth:"/mois"},currentSubscription:{label:"Abonnement actuel",daysLeft:"Jours restants",renewsOn:"Renouvellement le {date}"},subscribeTypes:{none:"Aucun abonnement",weekly:"Hebdomadaire",monthly:"Mensuel",quarterly:"Trimestriel",annual:"Annuel",planText:"Forfait {type}"},badges:{bestChoice:"MEILLEUR CHOIX"},security:{noAdultTransaction:"Aucune transaction pour adultes dans votre relevé bancaire",noHiddenFees:"Pas de frais cachés + Annulation de l'abonnement à tout moment",statementCharge:"Le paiement apparaît sous le nom '{appName}' sur votre relevé bancaire",cancelAnytime:"Annulez l'abonnement à tout moment dans les paramètres"},agreement:{iAgree:"J'accepte les",termsOfService:"Conditions de Service",and:"et",subscriptionPolicy:"Politique d'abonnement"},subscribe:"S'abonner",subscribed:"Abonné",upgrade:"Mettre à niveau",errors:{alreadySubscribed:"Vous avez déjà un abonnement actif."},vipGuide:{title:"Debloquez des privileges exclusifs",description:"Elevez votre experience avec notre niveau le plus exclusif de connexion et de contenu premium.",discountTag:"-40%",button:"Passer à Premium",benefits:{exclusivePrivateShows:"Spectacles Privés Exclusifs & Vidéos et Images",premiumTipMenu:"Menu de Pourboires Premium",emotionalChatModel:"Modele de chat IA aux emotions plus riches",betterMemory:"Meilleure memoire dans chaque interaction",welfareImages:"Debloquez des images bonus mises a jour regulierement",posePrivilege:"Debloquez des privileges de poses speciales",liveChatPrivilege:"Privileges de chat en salle live",monthlyFreeCoins:'<span style="color: #ff007f; font-weight: bold;">{coins}</span> pieces gratuites chaque mois'}},paymentPending:{alt:"Paiement en cours",title:"Paiement en cours",description:"Votre paiement est en cours de traitement. Une fois vérifié, votre compte sera automatiquement mis à niveau vers Premium. Cela peut prendre quelques minutes.",button:"Compris"},benefits:{title:"Avantages Premium",createAI:"Créez votre propre Petite Amie IA",unlimitedMessages:"Messages texte illimités",freeTokens:"Obtenez 100 jetons GRATUITS / mois",removeBlur:"Supprimer le flou des images",generateImages:"Générer des images",phoneCalls:"Passer des appels IA",fastResponse:"Temps de réponse rapide",prioritySupport:"Support client prioritaire",exclusiveCharacters:"Accès aux personnages exclusifs",advancedCustomization:"Personnalisation avancée de la personnalité"}},coins:{title:"Pièces",currentCoins:"Pièces Actuelles",description:{title:"Description des Pièces",subtitle:"Les pièces sont la monnaie virtuelle de l’univers ! Avec plus de pièces, vous pouvez rendre votre expérience de chat encore plus géniale :"},security:{antivirusSecuredLine1:"Antivirus",antivirusSecuredLine2:"Sécurisé",privacyBankStatementLine1:"Confidentialité du",privacyBankStatementLine2:"relevé bancaire"},badges:{discount:"{percent}% DE RÉDUCTION"},features:{heartWhisper:"Message de chat",inspirationReply:"Réponse inspirante",premiumChat:"Cadeaux spéciaux",specialGifts:"Acheter une vidéo animée"},history:{title:"Historique des Recharges",item:{title:"Pièces",conisNum:"+ {num} pièces",orderId:"ID de Commande : {id}"}}}},order:{status:{completed:{type:"Terminé",title:"Paiement Réussi",description:"Les pièces ont été ajoutées avec succès à votre compte ! Vous pouvez maintenant les utiliser pour débloquer des fonctionnalités exclusives."},pending:{type:"En Attente",title:"Traitement du Paiement…",description:"Veuillez patienter pendant que nous confirmons votre paiement. Vous pouvez vérifier les derniers progrès dans l'historique des recharges à tout moment."},failed:{type:"Échoué",title:"Paiement Échoué",description:"Malheureusement, ce paiement n'a pas pu être effectué. Soyez assuré que nous ne vous avons pas facturé. Veuillez réessayer."}}},navbar:{search:{placeholder:"Rechercher"},login:{title:"Connexion",notification:{title:"Conseil",message:"Méthode de connexion pas encore disponible"}},download:{title:"Télécharger",dialog:{title:"Télécharger l'APP",subtitle:"Téléchargez l'application pour rechercher parmi plus de 20 millions de personnages."}},checkIn:{title:"Enregistrement"},joinFree:{title:"Rejoindre Gratuitement"}},sidebar:{today:"AUJOURD'HUI",yesterday:"HIER",other:"AUTRE",footer:{affiliate:"Affilié",support:"Support"}},contactUs:{email:"Email",youtube:"Youtube",facebook:"Facebook",whatsapp:"WhatsApp",telegram:"Telegram",instagram:"Instagram",discord:"Discord"},loading:{title:"Chargement..."},noData:{title:"C'est un peu calme ici..."},home:{more:"Voir Tout",faq:{title:"FAQ"},banner:{slide1:{title:"Votre Histoire Commence Ici",description:"Débloquez des Conversations Infinies",buttonText:"Commencer à Chatter Maintenant"},slide2:{title:"Trouvez Votre Personnage Parfait",description:"Explorez les personnages populaires sélectionnés pour vous",buttonText:"Explorer Maintenant"},slide3:{title:"Construisez Votre Profil",description:"Personnalisez les préférences et gardez la progression synchronisée",buttonText:"Aller au Centre"}},all:"Tous"},characterTabs:{recommend:"Recommandé",trending:"Tendances",topRated:"Mieux Notés",popular:"Populaire",latest:"Derniers"},characterChat:{sendInputPlaceholder:"Tapez votre message...",openingPopoverTitle:"Essayez de répondre",copyMessage:"Copier le Message",deleteMessage:"Supprimer le Message",reportMessage:"Signaler le Message",copySuccess:"Copié dans le presse-papiers",copyFailed:"Échec de la copie",noCopyContent:"Aucun contenu à copier",sendTooFrequent:"Envoi trop fréquent, veuillez réessayer plus tard",messageTooLong:"La longueur du message ne peut pas dépasser 200 caractères",sendFailed:"Échec de l'envoi, veuillez réessayer",openingSuggestions:{careerChange:"J'envisage une reconversion professionnelle dans la technologie. Que pensez-vous des perspectives de cette industrie ?",tellMore:"C'est intéressant ! Pourriez-vous m'en dire plus sur votre expérience en stratégie marketing ?",professionalAdvice:"Je me sens un peu bloqué dans mon rôle actuel. Des conseils sur comment progresser professionnellement ?"},chatUser:{collect:"Collecter",collected:"Collecté",profile:"Profil",share:"Partager"},chatHeader:{status:{online:"En ligne",offline:"Hors ligne",typing:"En train d'écrire...",sendingPhoto:"envoi d'une photo",living:"En direct"}}},interact:{actionTrigger:"Déclencher",actionSend:"Envoyer",heat:"Chaleur d'interaction avec elle",liveRoomGuide:{description:"Envoyez des cadeaux pour débloquer des performances interactives exclusives !",action:"Envoyer"},blockingDialog:{title:"Tout ce dont vous avez rêvé...",previewPrefix:"Voici un aperçu du ",previewHighlight:"Show d'essayage exclusif.",previewSuffix:" Envoyez des cadeaux premium pour en débloquer davantage.",action:"Débloquer maintenant"},giftPanel:{sendGift:"Envoyer un cadeau",recharge:"Recharger",more:"Plus",gift:"Cadeau",sort:"Trier",close:"Fermer"},sceneSwitch:{guide:"Touchez ici pour découvrir plus de scènes.",button:"Changer\nde scène",shortButton:"Scène",title:"Changer de scène",subtitle:"Cliquez pour passer à une autre scène live.",switching:"Changement...",close:"Fermer",current:"Actuelle",price:"{price} pièces pour débloquer",payInsufficient:"Pièces insuffisantes. Rechargez et réessayez.",payNeedsConfirm:"Cette scène nécessite une confirmation de paiement. Veuillez réessayer.",payFailed:"Impossible de déverrouiller cette scène. Veuillez réessayer."},floatingNotice:{sent:"a envoyé",requested:"a demandé"},mobileMenu:{muteLabel:"Muet",unmuteLabel:"Réactiver le son",showMenu:"Afficher le menu",hideMenu:"Masquer le menu",muteToast:"Muet activé",unmuteToast:"Son réactivé"},fallbackReply:{feeling:"Comment vous sentez-vous maintenant ?",anywhere:"Si vous pouviez être n'importe où en ce moment, où seriez-vous ?",mind:"J'aimerais savoir ce qui vous préoccupe en ce moment."},defaultNames:{action:"Action",gift:"Cadeau",character:"Personnage"},loading:{title:"Veuillez patienter...",subtitle:"{name} se prépare."},stayReward:{title:"Récompenses de présence",surpriseTitle:"Récompenses surprises !",freeGiftHint:"Un cadeau gratuit vous attend",subtitle:"Restez dans le salon pour débloquer des récompenses.",durationMinutes:"{minutes} min",coinRange:"{min}-{max} pièces",coinFixed:"{amount} pièces",giftReward:"Cadeau x{quantity}",expireHours:"valable {hours} h",expireSoon:"Expire bientôt",stateClaimed:"Récupéré",stateClaimable:"À récupérer",stateInProgress:"En cours",stateLocked:"Verrouillé",countdownLabel:"Prochaine récompense dans",claim:"Récupérer",claiming:"Récupération...",claimed:"Récupéré",claimEmpty:"Aucune récompense cette fois. Votre progression continue.",resultConfirm:"J'ai compris",resultCongrats:"Félicitations !",resultSummary:"Vous avez reçu {coins} pièces et {gifts} cadeaux",resultSummaryCoinsOnly:"Vous avez reçu {coins} pièces",resultSummaryGiftsOnly:"Vous avez reçu {gifts} cadeaux",resultGotIt:"C'est compris",resultCoinLabel:"Pièces",resultGiftLabel:"Cadeaux",guestTip:"Connectez-vous pour cumuler des récompenses de présence.",close:"Fermer",entryLabel:"Récompenses de présence",countdownNotReady:"Récompense bientôt disponible"},a11y:{avatarBackground:"Arrière-plan de l'avatar",showMenu:"Afficher le menu",fire:"Flamme",up:"Haut",send:"Envoyer",gift:"Cadeau",chat:"Chat",coin:"Pièce",recharge:"Recharger"}},chatInput:{placeholder:"Tapez votre message..."},chatDeletePopover:{deleteChat:"Supprimer",hide:"Masquer"},clearChat:{title:"Effacer ce chat ?",message:"Tous les messages de ce chat seront définitivement supprimés.",clear:"Effacer",clearing:"Effacement...",clearChat:"Effacer le Chat"},footer:{privacyPolicy:"Politique de Confidentialité",termsService:"Conditions de Service",content:"Découvrez la prochaine génération de compagnie IA. OnlyGF vous apporte des conversations authentiques, des connexions émotionnelles et une communauté d'amis IA qui vous comprennent et grandissent avec vous.",desc:"© 2025 OnlyGF. Tous droits réservés.",features:"Fonctionnalités",popular:"Populaire",chat:"Chat",createCharacter:"Créer un Personnage",myCollection:"Ma collection",myAI:"Mon IA",legalSupport:"Juridique et support",termsAndPolicies:"Conditions et politiques"},legalInformation:{pageTitle:"Informations légales",items:{termsService:"Conditions d'utilisation",privacyNotice:"Avis de confidentialité",subscriptionPolicy:"Politique d'abonnement",cookiesNotice:"Avis sur les cookies",underagePolicy:"Politique des mineurs",contentRemovalPolicy:"Politique de retrait de contenu",blockedContentPolicy:"Politique de contenu bloqué",dmcaPolicy:"Politique DMCA",complaintPolicy:"Politique de réclamation",exemption2257:"Exemption 18 U.S.C. 2257",communityGuidelines:"Règles de la communauté",affiliateTerms:"Conditions d'affiliation"}},languageDialog:{title:"Sélection de la langue",desc:"Sélectionnez votre langue d'affichage"},dialogUploadAvatar:{title:"Choisissez Votre Avatar",desc:"Trouvons un look qui vous ressemble. Les premières impressions comptent !",save:"Enregistrer"},dialogShare:{title:"Partager",desc:"Copiez le lien ou partagez directement, les amis peuvent commencer à chatter instantanément.",copy:"Copier le lien",success:"Lien copié dans le presse-papiers",error:"Échec de la copie du lien, veuillez réessayer"},dialogReport:{title:"Signaler",desc:"Sélectionnez une raison",list:{sexuallyExplicit:"Contenu sexuellement explicite",hateSpeech:"Discours haineux ou harcèlement",suicideSelfInjury:"Suicide ou automutilation",violenceThreats:"Violence ou menaces",falseInformation:"Fausses informations",spamFraud:"Spam ou fraude",privacyViolation:"Violation de la vie privée",harmfulMinors:"Nuisible aux mineurs",other:"Autre"},other:{title:"Description",placeholder:"Veuillez décrire le problème..."},submit:"Soumettre"},dialogDownload:{title:"Télécharger",desc:"Téléchargez l'application pour rechercher parmi plus de 20 millions de personnages.",toast:"Bientôt disponible"},dialogCoinInsufficient:{title:"Débloquer le Prochain Message",liveTitle:"Pièces insuffisantes",desc:"Vous n'avez plus de pièces pour continuer ce chat. Veuillez recharger votre solde pour débloquer plus de réponses.",message:"Messages",balance:"Solde",coins:"Pièces",button:"Obtenir Plus de Pièces",notEnoughCoins:"Pièces insuffisantes",transactionHistory:"Historique des transactions >>",chooseHowToContinue:"Choisissez comment continuer",oneTime:"Achat unique",subscription:"Abonnement",topUpPack:"Pack de recharge",perMonth:"/mois",withMembershipAlsoGet:"Avec l'abonnement, vous obtenez aussi",seeAllPerks:"Voir tous les avantages >>",subscribeNow:"S'abonner maintenant {money}",topUp:"Recharger {money}",moreOptions:"Plus d'options ? Aller au centre de recharge",bestValue:"Meilleure offre",topPick:"Le choix de 99 % des utilisateurs",quote:"« C'est seulement pour ceux qui me comprennent vraiment… Je t'attends ici. »",cancelAnytime:"Annulez à tout moment · gérez via l'App Store",guideWait:"Attends !",guideDesc:"Elle s'apprête à t'envoyer une vidéo torride…",guideQuestion:"Tu veux la voir ?",guideViewNow:"Voir maintenant"},dialogRegisterGuide:{title:"Envie de continuer à parler ?",desc:"Créez un compte gratuit pour continuer à discuter et débloquer toutes les fonctionnalités !",benefit1:"Conversations illimitées",benefit2:"Enregistrer l'historique des discussions",benefit3:"Accès à tous les personnages",signUp:"S'inscrire",later:"Peut-être Plus Tard"},registerGuideMessage:{text:"Envie de continuer à parler ? Créez simplement un compte gratuit ! Inscrivez-vous maintenant pour des messages bonus—j'ai hâte de continuer !",button:"S'inscrire pour discuter"},dialogPhotoUnlock:{title:"Débloquer la Photo",desc:"Débloquez cette photo pour voir le contenu complet",balance:"Votre Solde",button:"Débloquer Maintenant",getMore:"Obtenir Plus de Pièces",insufficientBalance:"Solde Insuffisant",unlocking:"Déblocage...",unlockSuccess:"Photo débloquée avec succès",unlockFailed:"Échec du déblocage de la photo"},photoRequest:{buttonTitle:"Demander une photo",selectType:"Sélectionnez le type de photo :",requestFailed:"Échec de la demande de photo",sendMePhoto:"Envoie-moi une photo",noMorePhotos:"Plus de photos disponibles",poses:{random:"Aléatoire",selfie:"Selfie",posing:"Pose",sitting:"Assise",kneeling:"À genoux",squatting:"Accroupie",standing:"Debout",prone:"Allongée"},vipGuide:{title:"Débloquer les Poses Photo VIP",description:"Abonnez-vous pour débloquer des poses photo exclusives et demander la pose que vous voulez.",buttonText:"Débloquer VIP Maintenant"}},dialogLogout:{title:"Se déconnecter ?",desc:"Êtes-vous sûr de vouloir vous déconnecter ?",desc2:"Vous devrez vous reconnecter pour accéder à votre compte.",confirm:"Se déconnecter"},dialogLogin:{title:"Connexion / Inscription",subtitle:"Discutez avec plus de 20 millions de filles",continueWith:"Continuer avec {method}",google:"Google",apple:"Apple",facebook:"Facebook",line:"Line",guest:"Invité",desc:"J'accepte de recevoir des offres spéciales, des communications marketing et des mises à jour de service par e-mail.",sub:"Je confirme que j'ai",age:"18+",agreementPrefix:"accepter les",termsOfService:"Conditions de Service",and:"et",privacyPolicy:"Politique de Confidentialité",or:"ou",emailPlaceholder:"Adresse e-mail",continueWithEmail:"Continuer avec Email",verifyTitle:"Vérifiez votre e-mail",verifyDesc:"Nous avons envoyé un code de vérification à 6 chiffres à {email}. Ouvrez l'e-mail et entrez le code ci-dessous pour continuer.",confirm:"Confirmer",resendCode:"Renvoyer le code",resendCountdown:"Renvoyer dans {seconds}s",back:"Retour",invalidEmail:"Veuillez entrer une adresse e-mail valide",codeSent:"Code de vérification envoyé",codeSendFailed:"Échec de l'envoi du code de vérification",codeRequired:"Veuillez entrer le code de vérification",codeInvalid:"Code de vérification invalide",promotionHint:"Première souscription <b>-75% OFF</b> Offre Exclusive"},dialogCheckin:{title:"Récompenses Quotidiennes",desc:"Enregistrez-vous pendant 7 jours consécutifs pour réclamer toutes les récompenses !",button:"Réclamer la Récompense",claimedToday:"Réclamé Pour Aujourd'hui",resultTitle:"Récompense Réclamée !",resultDesc:"Vous vous êtes enregistré pendant {days} jours d'affilée. Continuez comme ça !",resultButton:"Compris",daysText:"Jour {days}"},auth:{loginSuccess:"Connexion réussie",loginFailed:"Échec de la connexion, veuillez réessayer"},person:{edit:"Modifier",follow:"Abonnements",fans:"Abonnés",createBot:" Bots",sendPost:" Publications",followBot:" Bots suivis"},common:{noData:"Aucune donnée",clickRetry:"Appuyez pour réessayer",live:"En direct",report:"Signaler le message",reset:"Réinitialiser",months:{january:"Janvier",february:"Février",march:"Mars",april:"Avril",may:"Mai",june:"Juin",july:"Juillet",august:"Août",september:"Septembre",october:"Octobre",november:"Novembre",december:"Décembre"},submitting:"Envoi en cours...",unlockFailed:"Accès à l'abonnement requis"},characterDetail:{online:"En ligne",chatToMe:"Chattez avec moi",collect:"Collecter",collected:"Collecté",share:"Partager",gallery:"Galerie",report:"Signaler",age:"Âge",career:"Carrière",height:"Taille",constellation:"Constellation",bloodType:"Groupe Sanguin",unknown:"Inconnu",likeSuccess:"Aimé avec succès",unlikeSuccess:"N'aime plus avec succès",collectSuccess:"Collecté avec succès",uncollectSuccess:"Collection annulée avec succès",likeFailed:"Échec du j'aime, veuillez réessayer",collectFailed:"Échec de la collection, veuillez réessayer",networkError:"Erreur réseau, veuillez réessayer",reportSuccess:"Rapport soumis avec succès, nous le traiterons dès que possible",reportFailed:"Échec de la soumission du rapport, veuillez réessayer"},langSelect:{message:{success:"Changement de langue réussi !"}},userCenter:{title:"Informations Personnelles",username:"Nom d'utilisateur",usernamePlaceholder:"AlexOnlyGF",usernameHelper:"Veuillez saisir 3-25 caractères, lettres, emoji, chiffres et underscores sont autorisés. Le nom d'utilisateur doit être unique.",profile:"Profil (Optionnel)",profilePlaceholder:"Complétez votre biographie pour que les autres puissent mieux vous connaître",save:"Enregistrer",saving:"Enregistrement...",saveSuccess:"Enregistrement réussi",saveFailed:"Échec de l'enregistrement, veuillez réessayer",editProfile:"Modifier le Profil",collections:"Collections",likes:"J'aime",logout:"Se déconnecter",logoutConfirm:"Êtes-vous sûr de vouloir vous déconnecter ?",downloadApp:"Télécharger l'APP",language:"Langue",privacyPolicy:"Politique de Confidentialité",termsOfUse:"Conditions d'Utilisation",contactUs:"Nous Contacter",support:"Support",supportDesc:"Nous sommes là pour vous 24h/24 et 7j/7",premiumTitle:"OnlyGF Premium",premiumDesc:"Débloquez tous les shows et {coins} pièces bonus chaque mois",myBalance:"Mon solde",recharge:"Recharger",currentSubscription:"Abonnement actuel",daysLeft:"Jours restants"},download:{googlePlay:{name:"Google Play",description:"Obtenez l'application officielle pour des mises à jour sécurisées et transparentes et de nouveaux compagnons.",subtitle:"OBTENEZ-LE SUR"},appStore:{name:"App Store",description:"Profitez d'une expérience de chat privée et immersive optimisée pour votre iPhone.",subtitle:"Télécharger"},androidApk:{name:"Android APK",description:"Installez directement pour une confidentialité maximale, un accès instantané et les dernières mises à jour.",subtitle:"Télécharger"},webApp:{name:"Web APP",description:"Chattez instantanément depuis n'importe quel navigateur - aucune installation nécessaire. Votre évasion privée vous attend.",subtitle:"Installer"}},premiumPhotoUnlock:{vipUnlock:"Peut déverrouiller",vipMark:"VIP",proMark:"Pro"},photoGallery:{photoCount:"{current}/{total}",prevPhoto:"Précédent",nextPhoto:"Suivant"},dialogVideoUnlock:{title:"Déverrouiller la Vidéo",desc:"Déverrouillez cette vidéo pour voir le contenu complet",button:"Déverrouiller Maintenant",balance:"Votre Solde",insufficientBalance:"Solde Insuffisant",getMore:"Obtenir Plus de Pièces",unlocking:"Déverrouillage...",unlockSuccess:"Vidéo déverrouillée avec succès",unlockFailed:"Échec du déverrouillage"},upgradablePhoto:{unlockMoment:"Débloquer le moment",upgrading:"Mise à niveau...",upgradeSuccess:"Mise à niveau vers la vidéo",upgradeFailed:"Échec de la mise à niveau"},dialogWebViewGuide:{title:"Veuillez ouvrir dans le navigateur",desc:"La connexion Google n'est pas prise en charge dans les navigateurs intégrés aux applications. Veuillez copier le lien et l'ouvrir dans votre navigateur système (Chrome/Safari) pour terminer la connexion.",currentUrl:"URL de la page actuelle",copyLink:"Copier le lien",copied:"Lien copié",copyFailed:"Échec de la copie, veuillez copier manuellement",steps:{step1:"Cliquez sur le bouton ci-dessus pour copier le lien",step2:"Ouvrez votre navigateur système (Chrome/Safari)",step3:"Collez le lien et visitez pour terminer la connexion"}},emailChat:{openEmailChat:"Ouvrir le chat par e-mail",connectViaEmail:"Se connecter par e-mail",enterEmailTitle:"Entrez l'e-mail pour recevoir des lettres",receiveYourFirstLetter:"Recevez votre première lettre",receiveLetter:"Recevoir la lettre",startEmailChatWith:"Commencer le chat par e-mail avec {botName}",letterWillBeSent:"La lettre sera bientôt envoyée à votre e-mail !",description:"Vous voulez recevoir des lettres écrites juste pour vous, au-delà du chat ? Une fois activé, elles arriveront dans votre boîte de réception, poursuivant votre histoire comme si elles faisaient vraiment partie de votre vie.",emailPlaceholder:"Adresse e-mail",sendNow:"Envoyer maintenant",emailChatStartedWith:"Chat par e-mail commencé avec {botName}",switchToBot:"Passer à {botName}",receiveLetterAt:"Recevoir une lettre",tips:"Conseils :",tipsContent:"Elle vous écrira de manière proactive et répondra à vos lettres. C'est privé, à un rythme lent et exclusivement pour vous deux.",invalidEmail:"Veuillez entrer une adresse e-mail valide",enableSuccess:"Chat par e-mail activé avec succès",disableSuccess:"Chat par e-mail désactivé avec succès",updateEmailSuccess:"E-mail mis à jour avec succès",switchBotSuccess:"Changement vers le nouveau personnage réussi",enableFailed:"Échec de l'activation du chat par e-mail",disableFailed:"Échec de la désactivation du chat par e-mail",updateEmailFailed:"Échec de la mise à jour de l'e-mail",switchBotFailed:"Échec du changement de personnage",disableConfirmTitle:"Fermer le chat par e-mail ?",disableConfirmMessage:"Vous ne recevrez plus de lettres de ce personnage.",switchBotConfirmTitle:"Changer de personnage ?",switchBotConfirmMessage:"Changer le chat par e-mail de {fromBot} à {toBot} ?",updateEmail:"Mettre à jour l'e-mail",enterNewEmail:"Veuillez entrer la nouvelle adresse e-mail",firstLetterTriggered:"Votre première lettre est en route !",firstLetterFailed:"Échec de l'envoi de la première lettre",verifyTitle:"Vérifier l'e-mail",verifyDesc:"Code de vérification envoyé à {email}",codeRequired:"Veuillez entrer le code à 6 chiffres",codeInvalid:"Code invalide ou expiré",codeSent:"Code envoyé",codeSendFailed:"Échec de l'envoi du code",confirm:"Confirmer",resendCode:"Renvoyer",resendCountdown:"Renvoyer dans {seconds}s"},emailCallback:{verifying:"Vérification de votre lien...",success:"Succès !",redirectingToChat:"Redirection vers le chat...",oops:"Oups !",redirectingIn:"Redirection vers la page d'accueil dans {seconds}s...",goHomeNow:"Aller à la page d'accueil maintenant",invalidLink:"Lien invalide",linkExpired:"Le lien a expiré. Veuillez retourner dans votre e-mail et cliquer à nouveau.",linkInvalid:"Lien invalide",linkUsed:"Le lien n'est plus valide",userNotFound:"Utilisateur non trouvé",networkError:"Erreur réseau, veuillez réessayer"},profileComplete:{title:"Bienvenue sur {appName} !",subtitle:"Dites-nous en plus pour une meilleure expérience personnalisée",nicknameLabel:"Quel est votre nom ?",nicknamePlaceholder:"Entrez un pseudo cool",nicknameRequired:"Veuillez entrer votre pseudo",genderLabel:"Quel pronom utilisez-vous ?",genderHint:"(Le genre ne peut pas être modifié une fois sélectionné.)",birthdayLabel:"Votre anniversaire ?",birthdayPlaceholder:"JJ/MM/AAAA",birthdayRequired:"Veuillez sélectionner votre anniversaire",birthdayUnderAge:"Vous devez avoir au moins 18 ans",submitButton:"Commencer mon voyage !",genderRequired:"Veuillez sélectionner votre genre",submitSuccess:"Profil complété avec succès !",submitFailed:"Échec de l'envoi, veuillez réessayer",genderOptions:{male:"Il",female:"Elle",other:"Iel"}},seo:{description:{characterList:"Parcourez tous les personnages IA sur {appName}. Trouvez votre compagnon IA idéal pour des interactions en direct, du chat et des histoires.",characterSearch:"Recherchez des personnages IA sur {appName}. Découvrez des compagnons IA par nom, tag ou intérêt et commencez à discuter instantanément.",characterDetail:"Échangez avec {name} dans un AI Chat immersif sur {appName}. Commencez à discuter avec des AI Girlfriends dès maintenant.",characterInteract:"Vivez l'interaction en direct avec des compagnons IA sur {appName}. Diffusion IA en temps réel et compagnie virtuelle immersive.",characterChat:"Échangez avec des personnages IA dans un AI Chat immersif sur {appName}. Commencez à discuter avec des AI Girlfriends dès maintenant.",chatHistory:"Consultez votre historique de chat IA sur {appName} et poursuivez vos conversations avec vos compagnons IA préférés.",userCenter:"Gérez votre profil {appName}, vos collections et vos paramètres de compte dans le centre utilisateur.",rechargeCenter:"Rechargez des pièces et abonnez-vous sur {appName}. Débloquez le chat IA premium, les interactions en direct et le contenu exclusif.",webTutorial:"Apprenez à utiliser {appName} avec notre tutoriel web. Conseils pour le chat IA, les interactions en direct et tirer le meilleur parti de votre compagnon IA.",contactUs:"Contactez {appName} pour obtenir de l'aide, des partenariats et des renseignements sur les produits concernant les expériences de compagnon IA.",privacyPolicy:"Lisez la politique de confidentialité de {appName} pour savoir comment nous collectons, utilisons et protégeons vos informations personnelles.",termsService:"Lisez les conditions d'utilisation de {appName} régissant votre utilisation de notre plateforme de compagnon IA."},characterDetail:{titlePrefix:"Profil du personnage",age:"Âge",career:"Métier",height:"Taille",constellation:"Signe",aiGirlfriend:"AI Girlfriend",descriptionTemplate:"Échangez avec {name} dans un AI Chat immersif sur {appName}. Commencez à discuter avec des AI Girlfriends dès maintenant."},chat:{titleTemplate:"Discutez avec {name}—AI Girlfriend{'|'}{appName}",descriptionTemplate:"Échangez avec {name} dans un AI Chat immersif sur {appName}. Commencez à discuter avec des AI Girlfriends dès maintenant."},interact:{titleTemplate:"{name} : chaîne en direct— Histoire d'interaction en direct avec l'IA,Compagnons virtuels {'|'} {appName}",descriptionTailTemplate:"{name} Vidéo en direct+Commencez dès maintenant l'interaction en direct avec des AI Girlfriends."}},cookieConsent:{title:"Nous Respectons Votre Vie Privée",description:"Pour vous offrir la meilleure expérience, nous utilisons des cookies pour les fonctionnalités essentielles, le contenu personnalisé, le marketing et l'analyse.",learnMore:"En savoir plus",accept:"Accepter",deny:"Refuser"},resetChat:{title:"Réinitialiser le chat",message:"Réinitialiser la conversation et tous les souvenirs avec ce personnage ? Le chat reviendra à son état initial.",clear:"Réinitialiser",clearing:"Réinitialisation…"},callVideoPicker:{title:"Ajouter une vidéo enregistrée",empty:"Aucune vidéo enregistrée pour ce personnage.",select:"Utiliser cette vidéo",error:"Échec du chargement ou de l’enregistrement. Réessayez."}},[Ul.RU]:{errorPage:{page404:{oops:"УПС!",headline:"Веб-мастер сказал, что вы не можете войти на эту страницу...",info:"Пожалуйста, проверьте правильность введенного URL-адреса или нажмите кнопку ниже, чтобы вернуться на главную страницу.",backToHome:"Вернуться на главную",allRightsReserved:"Все права защищены"},page401:{oops:"Упс!",noPermission:"У вас нет разрешения на доступ к этой странице",contactLeader:"Если вы не удовлетворены, пожалуйста, свяжитесь с вашим руководителем",orYouCan:"Или вы можете перейти:",backHome:"Вернуться на главную",browse:"Просто просмотреть",viewImage:"Нажмите, чтобы посмотреть изображение",back:"Назад",gifSource:"источник gif",randomView:"Случайный просмотр"},ipAccess:{title:"Доступ Ограничен",description:"К сожалению, этот сервис недоступен в вашем регионе",tips:"В связи с местными нормативами и соглашениями, этот веб-сайт недоступен в вашем географическом регионе."}},route:{premium:"Премиум",home:"Исследовать",characterList:"Список Персонажей",characterSearch:"Поиск Персонажа",characterDetail:"Детали Персонажа",characterChat:"Чат с Персонажем",chatHistory:"Чат",userCenter:"Центр Пользователя",userCenterEdit:"Личная Информация",rechargeCenter:"Центр Пополнения",contactUs:"Связаться с Нами",characterCollections:"Коллекции",characterLiked:"Понравившиеся",rechargeHistory:"История Пополнений",legalInformation:"Юридическая информация",underagePolicy:"Политика в отношении несовершеннолетних",subscriptionPolicy:"Политика подписки",exemption2257:"Исключение 18 U.S.C. 2257",dmcaPolicy:"Политика DMCA",blockedContentPolicy:"Политика заблокированного контента",contentRemovalPolicy:"Политика удаления контента",complaintPolicy:"Политика жалоб"},rechargeHistory:{title:"История Транзакций",tabs:{deposits:"Пополнения",expenses:"Расходы"},expense:{chatWith:"Чат с {name}",unlockedVideo:"Разблокировано приватное видео {name}",unlockedPhoto:"Разблокировано приватное фото {name}",upgradeVideo:"Обновить видео",sendGifts:"Расход на интимное взаимодействие: {name}",other:"Другой расход"}},rechargeCenter:{tabs:{subscribe:"Подписаться",coins:"Монеты"},premium:{title:"Подписаться",choosePlan:"Выберите Свой План",anonymous:"100% анонимно. Вы можете отменить в любое время.",countdown:{hours:"Часы",minutes:"Минуты",seconds:"Секунды"},limitedOffer:"ОГРАНИЧЕННОЕ ПРЕДЛОЖЕНИЕ",discount:"До 75% скидки на вашу подписку",plans:{yearly:"12 месяцев",quarterly:"3 месяца",monthly:"1 месяц",perMonth:"/месяц"},currentSubscription:{label:"Текущая подписка",daysLeft:"Дней осталось",renewsOn:"Продление {date}"},subscribeTypes:{none:"Нет подписки",weekly:"Еженедельно",monthly:"Ежемесячно",quarterly:"Ежеквартально",annual:"Ежегодно",planText:"План {type}"},badges:{bestChoice:"ЛУЧШИЙ ВЫБОР"},security:{noAdultTransaction:"Никаких транзакций для взрослых в вашей банковской выписке",noHiddenFees:"Никаких скрытых платежей + Отмена подписки в любое время",statementCharge:"Платёж отображается как '{appName}' в вашей банковской выписке",cancelAnytime:"Отмените подписку в любое время в настройках"},agreement:{iAgree:"Я принимаю",termsOfService:"Условия Обслуживания",and:"и",subscriptionPolicy:"Политика подписки"},subscribe:"Подписаться",subscribed:"Подписка активна",upgrade:"Обновить",errors:{alreadySubscribed:"У вас уже есть активная подписка."},vipGuide:{title:"Откройте эксклюзивные привилегии",description:"Поднимите свой опыт на новый уровень с нашим самым элитным форматом общения и премиум-контента.",discountTag:"40% OFF",button:"Перейти на Premium",benefits:{exclusivePrivateShows:"Эксклюзивные Приватные Шоу & Видео и Изображения",premiumTipMenu:"Премиум Меню Чаевых",emotionalChatModel:"AI-модель чата с более богатыми эмоциями",betterMemory:"Лучшая память в каждом взаимодействии",welfareImages:"Откройте регулярно обновляемые бонусные изображения",posePrivilege:"Откройте привилегии специальных поз",liveChatPrivilege:"Привилегии чата в live-комнате",monthlyFreeCoins:'<span style="color: #ff007f; font-weight: bold;">{coins}</span> бесплатных монет каждый месяц'}},paymentPending:{alt:"Платеж обрабатывается",title:"Платеж обрабатывается",description:"Ваш платеж обрабатывается. После подтверждения ваша учетная запись будет автоматически обновлена до Premium. Это может занять несколько минут.",button:"Понятно"},benefits:{title:"Преимущества Premium",createAI:"Создайте свою собственную ИИ Подругу",unlimitedMessages:"Неограниченные текстовые сообщения",freeTokens:"Получите 100 БЕСПЛАТНЫХ токенов / месяц",removeBlur:"Удалить размытие с изображений",generateImages:"Генерировать изображения",phoneCalls:"Совершать ИИ звонки",fastResponse:"Быстрое время отклика",prioritySupport:"Приоритетная поддержка клиентов",exclusiveCharacters:"Доступ к эксклюзивным персонажам",advancedCustomization:"Расширенная настройка личности"}},coins:{title:"Монеты",currentCoins:"Текущие Монеты",description:{title:"Описание Монет",subtitle:"Монеты — это виртуальная валюта вселенной! С большим количеством монет вы можете сделать свой чат еще круче:"},security:{antivirusSecuredLine1:"Антивирус",antivirusSecuredLine2:"защищено",privacyBankStatementLine1:"Приватность в банковской",privacyBankStatementLine2:"выписке"},badges:{discount:"{percent}% СКИДКА"},features:{heartWhisper:"Сообщение чата",inspirationReply:"Вдохновляющий ответ",premiumChat:"Специальные подарки",specialGifts:"Купить анимированное видео"},history:{title:"История Пополнений",item:{title:"Монеты",conisNum:"+ {num} монет",orderId:"ID Заказа: {id}"}}}},order:{status:{completed:{type:"Завершено",title:"Оплата Успешна",description:"Монеты успешно добавлены на ваш счет! Теперь вы можете использовать их для разблокировки эксклюзивных функций."},pending:{type:"Ожидание",title:"Обработка Платежа…",description:"Пожалуйста, подождите, пока мы подтверждаем ваш платеж. Вы можете проверить последний прогресс в истории пополнений в любое время."},failed:{type:"Неудачно",title:"Платеж Не Прошел",description:"К сожалению, этот платеж не был завершен. Будьте уверены, что мы не взимали с вас плату. Пожалуйста, попробуйте снова."}}},navbar:{search:{placeholder:"Поиск"},login:{title:"Войти",notification:{title:"Совет",message:"Метод входа пока недоступен"}},download:{title:"Скачать",dialog:{title:"Скачать APP",subtitle:"Скачайте приложение для поиска среди более чем 20 миллионов персонажей."}},checkIn:{title:"Регистрация"},joinFree:{title:"Присоединиться бесплатно"}},sidebar:{today:"СЕГОДНЯ",yesterday:"ВЧЕРА",other:"ДРУГОЕ",footer:{affiliate:"Партнерская программа",support:"Поддержка"}},contactUs:{email:"Электронная почта",youtube:"Youtube",facebook:"Facebook",whatsapp:"WhatsApp",telegram:"Telegram",instagram:"Instagram",discord:"Discord"},loading:{title:"Загрузка..."},noData:{title:"Здесь немного тихо..."},home:{more:"Посмотреть Всё",faq:{title:"Часто Задаваемые Вопросы"},banner:{slide1:{title:"Ваша История Начинается Здесь",description:"Разблокируйте Бесконечные Разговоры",buttonText:"Начать Общение Сейчас"},slide2:{title:"Найдите Своего Идеального Персонажа",description:"Исследуйте популярных персонажей, подобранных для вас",buttonText:"Исследовать Сейчас"},slide3:{title:"Создайте Свой Профиль",description:"Настройте предпочтения и синхронизируйте прогресс",buttonText:"Перейти в Центр"}},all:"Все"},characterTabs:{recommend:"Рекомендуемые",trending:"В Тренде",topRated:"Лучшие Оценки",popular:"Популярные",latest:"Последние"},characterChat:{sendInputPlaceholder:"Введите ваше сообщение...",openingPopoverTitle:"Попробуйте ответить",copyMessage:"Копировать Сообщение",deleteMessage:"Удалить Сообщение",reportMessage:"Пожаловаться на Сообщение",copySuccess:"Скопировано в буфер обмена",copyFailed:"Не удалось скопировать",noCopyContent:"Нет содержимого для копирования",sendTooFrequent:"Слишком частая отправка, попробуйте позже",messageTooLong:"Длина сообщения не может превышать 200 символов",sendFailed:"Не удалось отправить, попробуйте снова",openingSuggestions:{careerChange:"Я думаю о смене карьеры в сторону технологий. Что вы думаете о перспективах этой отрасли?",tellMore:"Интересно! Не могли бы вы рассказать больше о своем опыте в маркетинговой стратегии?",professionalAdvice:"Я чувствую себя немного застрявшим в своей текущей роли. Есть советы о том, как продвинуться профессионально?"},chatUser:{collect:"Коллекция",collected:"Собрано",profile:"Профиль",share:"Поделиться"},chatHeader:{status:{online:"Онлайн",offline:"Оффлайн",typing:"Печатает...",sendingPhoto:"отправка фото",living:"В эфире"}}},interact:{actionTrigger:"Активировать",actionSend:"Отправить",heat:"Теплота взаимодействия с ней",liveRoomGuide:{description:"Отправляйте подарки, чтобы открыть эксклюзивные интерактивные выступления!",action:"Отправить"},blockingDialog:{title:"Всё, о чём вы мечтали...",previewPrefix:"Вот превью ",previewHighlight:"эксклюзивного Try-On Show.",previewSuffix:" Отправьте премиум-подарки, чтобы открыть больше.",action:"Открыть сейчас"},giftPanel:{sendGift:"Отправить подарок",recharge:"Пополнить",more:"Ещё",gift:"Подарок",sort:"Сортировать",close:"Закрыть"},sceneSwitch:{guide:"Нажмите здесь, чтобы открыть больше сцен.",button:"Сменить\nсцену",shortButton:"Сцена",title:"Сменить сцену",subtitle:"Нажмите, чтобы переключиться на другую live-сцену.",switching:"Переключение...",close:"Закрыть",current:"Текущая",price:"Открыть за {price} монет",payInsufficient:"Недостаточно монет. Пополните баланс и попробуйте снова.",payNeedsConfirm:"Для этой сцены требуется подтверждение оплаты. Попробуйте снова.",payFailed:"Не удалось разблокировать эту сцену. Попробуйте снова."},floatingNotice:{sent:"отправил",requested:"заказал"},mobileMenu:{muteLabel:"Отключить звук",unmuteLabel:"Включить звук",showMenu:"Показать меню",hideMenu:"Скрыть меню",muteToast:"Звук отключён",unmuteToast:"Звук включён"},fallbackReply:{feeling:"Как вы себя чувствуете?",anywhere:"Если бы вы могли быть где угодно прямо сейчас, где бы вы были?",mind:"Мне бы хотелось узнать, о чём вы думаете в последнее время."},defaultNames:{action:"Действие",gift:"Подарок",character:"Персонаж"},loading:{title:"Пожалуйста, подождите...",subtitle:"{name} готовится."},stayReward:{title:"Награды за присутствие",surpriseTitle:"Сюрприз-награды!",freeGiftHint:"Вас ждёт бесплатный подарок",subtitle:"Оставайтесь в комнате, чтобы открыть награды.",durationMinutes:"{minutes} мин",coinRange:"{min}-{max} монет",coinFixed:"{amount} монет",giftReward:"Подарок x{quantity}",expireHours:"действует {hours} ч",expireSoon:"Скоро истечёт",stateClaimed:"Получено",stateClaimable:"Забрать",stateInProgress:"В процессе",stateLocked:"Закрыто",countdownLabel:"Следующая награда через",claim:"Забрать",claiming:"Получение...",claimed:"Получено",claimEmpty:"На этот раз наград нет. Отсчёт времени продолжается.",resultConfirm:"Понятно",resultCongrats:"Поздравляем!",resultSummary:"Вы получили {coins} монет и {gifts} подарков",resultSummaryCoinsOnly:"Вы получили {coins} монет",resultSummaryGiftsOnly:"Вы получили {gifts} подарков",resultGotIt:"Хорошо",resultCoinLabel:"Монеты",resultGiftLabel:"Подарки",guestTip:"Войдите, чтобы начать копить награды за присутствие.",close:"Закрыть",entryLabel:"Награды за присутствие",countdownNotReady:"Награда скоро откроется"},a11y:{avatarBackground:"Фон аватара",showMenu:"Показать меню",fire:"Огонь",up:"Вверх",send:"Отправить",gift:"Подарок",chat:"Чат",coin:"Монета",recharge:"Пополнить"}},chatInput:{placeholder:"Введите ваше сообщение..."},chatDeletePopover:{deleteChat:"Удалить",hide:"Скрыть"},clearChat:{title:"Очистить этот чат?",message:"Все сообщения в этом чате будут удалены навсегда.",clear:"Очистить",clearing:"Очистка...",clearChat:"Очистить Чат"},footer:{privacyPolicy:"Политика Конфиденциальности",termsService:"Условия Обслуживания",content:"Откройте для себя следующее поколение ИИ компаньонов. OnlyGF приносит вам подлинные разговоры, эмоциональные связи и сообщество ИИ друзей, которые понимают вас и растут вместе с вами.",desc:"© 2025 OnlyGF. Все права защищены.",features:"Функции",popular:"Популярное",chat:"Чат",createCharacter:"Создать Персонажа",myCollection:"Моя коллекция",myAI:"Мой ИИ",legalSupport:"Правовая информация и поддержка",termsAndPolicies:"Условия и политики"},legalInformation:{pageTitle:"Юридическая информация",items:{termsService:"Условия обслуживания",privacyNotice:"Уведомление о конфиденциальности",subscriptionPolicy:"Политика подписки",cookiesNotice:"Уведомление о cookie",underagePolicy:"Политика в отношении несовершеннолетних",contentRemovalPolicy:"Политика удаления контента",blockedContentPolicy:"Политика заблокированного контента",dmcaPolicy:"Политика DMCA",complaintPolicy:"Политика жалоб",exemption2257:"Исключение 18 U.S.C. 2257",communityGuidelines:"Правила сообщества",affiliateTerms:"Условия партнерской программы"}},languageDialog:{title:"Выбор Языка",desc:"Выберите язык отображения"},dialogUploadAvatar:{title:"Выберите Свой Аватар",desc:"Давайте найдем образ, который полностью вас отражает. Первое впечатление имеет значение!",save:"Сохранить"},dialogShare:{title:"Поделиться",desc:"Скопируйте ссылку или поделитесь напрямую, друзья могут сразу начать общение.",copy:"Скопировать ссылку",success:"Ссылка скопирована в буфер обмена",error:"Не удалось скопировать ссылку, пожалуйста, попробуйте снова"},dialogReport:{title:"Пожаловаться",desc:"Выберите причину",list:{sexuallyExplicit:"Откровенный сексуальный контент",hateSpeech:"Язык вражды или преследование",suicideSelfInjury:"Суицид или членовредительство",violenceThreats:"Насилие или угрозы",falseInformation:"Ложная информация",spamFraud:"Спам или мошенничество",privacyViolation:"Нарушение конфиденциальности",harmfulMinors:"Вредно для несовершеннолетних",other:"Другое"},other:{title:"Описание",placeholder:"Пожалуйста, опишите проблему..."},submit:"Отправить"},dialogDownload:{title:"Скачать",desc:"Скачайте приложение для поиска среди более чем 20 миллионов персонажей.",toast:"Скоро будет"},dialogCoinInsufficient:{title:"Разблокировать Следующее Сообщение",liveTitle:"Недостаточно монет",desc:"У вас закончились монеты для продолжения этого чата. Пожалуйста, пополните баланс, чтобы разблокировать больше ответов.",message:"Сообщения",balance:"Баланс",coins:"Монеты",button:"Получить Больше Монет",notEnoughCoins:"Недостаточно монет",transactionHistory:"История транзакций >>",chooseHowToContinue:"Выберите, как продолжить",oneTime:"Разовая покупка",subscription:"Подписка",topUpPack:"Пакет пополнения",perMonth:"/мес",withMembershipAlsoGet:"С подпиской вы также получаете",seeAllPerks:"Смотреть все преимущества >>",subscribeNow:"Подписаться сейчас {money}",topUp:"Пополнить {money}",moreOptions:"Больше вариантов? Перейти в центр пополнения",bestValue:"Лучшая цена",topPick:"Выбор 99% пользователей",quote:"« Это только для тех, кто по-настоящему меня понимает… Я буду ждать тебя здесь.»",cancelAnytime:"Отмена в любое время · управление через App Store",guideWait:"Подожди!",guideDesc:"Она вот-вот отправит тебе пикантное видео…",guideQuestion:"Хочешь посмотреть?",guideViewNow:"Смотреть сейчас"},dialogRegisterGuide:{title:"Хотите продолжить общение?",desc:"Создайте бесплатную учетную запись, чтобы продолжить общение и разблокировать все функции!",benefit1:"Неограниченные разговоры",benefit2:"Сохранение истории чатов",benefit3:"Доступ ко всем персонажам",signUp:"Зарегистрироваться",later:"Может Быть Позже"},registerGuideMessage:{text:"Хотите продолжить общение? Просто создайте бесплатный аккаунт! Зарегистрируйтесь сейчас для бонусных сообщений—я с нетерпением жду продолжения!",button:"Зарегистрироваться для чата"},dialogPhotoUnlock:{title:"Разблокировать Фото",desc:"Разблокируйте это фото, чтобы увидеть полное содержимое",balance:"Ваш Баланс",button:"Разблокировать Сейчас",getMore:"Получить Больше Монет",insufficientBalance:"Недостаточно Средств",unlocking:"Разблокировка...",unlockSuccess:"Фото успешно разблокировано",unlockFailed:"Не удалось разблокировать фото"},photoRequest:{buttonTitle:"Запросить фото",selectType:"Выберите тип фото:",requestFailed:"Не удалось запросить фото",sendMePhoto:"Пришли мне фото",noMorePhotos:"Больше нет доступных фото",poses:{random:"Случайно",selfie:"Селфи",posing:"Позирование",sitting:"Сидя",kneeling:"На коленях",squatting:"Присев",standing:"Стоя",prone:"Лёжа"},vipGuide:{title:"Разблокировать VIP Позы Фото",description:"Подпишитесь, чтобы разблокировать эксклюзивные позы фото и запрашивать желаемую позу.",buttonText:"Разблокировать VIP Сейчас"}},dialogLogout:{title:"Выйти?",desc:"Вы уверены, что хотите выйти?",desc2:"Вам нужно будет войти снова, чтобы получить доступ к вашей учетной записи.",confirm:"Выйти"},dialogLogin:{title:"Войти / Зарегистрироваться",subtitle:"Общайтесь с более чем 20 миллионами девушек",continueWith:"Продолжить с {method}",google:"Google",apple:"Apple",facebook:"Facebook",line:"Line",guest:"Гость",desc:"Я согласен получать специальные предложения, маркетинговые сообщения и обновления услуг по электронной почте.",sub:"Я подтверждаю, что мне",age:"18+",agreementPrefix:"принять",termsOfService:"Условия Обслуживания",and:"и",privacyPolicy:"Политику Конфиденциальности",or:"или",emailPlaceholder:"Адрес электронной почты",continueWithEmail:"Продолжить с Email",verifyTitle:"Подтвердите вашу почту",verifyDesc:"Мы отправили 6-значный код подтверждения на {email}. Откройте письмо и введите код ниже, чтобы продолжить.",confirm:"Подтвердить",resendCode:"Отправить повторно",resendCountdown:"Повторить через {seconds}с",back:"Назад",invalidEmail:"Введите действительный адрес электронной почты",codeSent:"Код подтверждения отправлен",codeSendFailed:"Не удалось отправить код подтверждения",codeRequired:"Введите код подтверждения",codeInvalid:"Неверный код подтверждения",promotionHint:"Первая подписка <b>-75% OFF</b> Эксклюзивное предложение"},dialogCheckin:{title:"Ежедневные Награды",desc:"Регистрируйтесь 7 дней подряд, чтобы получить все награды!",button:"Получить Награду",claimedToday:"Награда Получена Сегодня",resultTitle:"Награда Получена!",resultDesc:"Вы регистрировались {days} дней подряд. Продолжайте в том же духе!",resultButton:"Понятно",daysText:"День {days}"},auth:{loginSuccess:"Вход выполнен успешно",loginFailed:"Не удалось войти, пожалуйста, попробуйте снова"},person:{edit:"Редактировать",follow:"Подписки",fans:"Подписчики",createBot:" Боты",sendPost:" Публикации",followBot:" Отслеживаемые Боты"},common:{noData:"Нет данных",clickRetry:"Нажмите, чтобы повторить",live:"В эфире",report:"Пожаловаться на сообщение",reset:"Сбросить",months:{january:"Январь",february:"Февраль",march:"Март",april:"Апрель",may:"Май",june:"Июнь",july:"Июль",august:"Август",september:"Сентябрь",october:"Октябрь",november:"Ноябрь",december:"Декабрь"},submitting:"Отправка...",unlockFailed:"Необходимо разблокировать доступ по подписке"},characterDetail:{online:"Онлайн",chatToMe:"Общайтесь со Мной",collect:"Коллекция",collected:"Собрано",share:"Поделиться",gallery:"Галерея",report:"Пожаловаться",age:"Возраст",career:"Карьера",height:"Рост",constellation:"Созвездие",bloodType:"Группа Крови",unknown:"Неизвестно",likeSuccess:"Успешно понравилось",unlikeSuccess:"Успешно удалено из понравившихся",collectSuccess:"Успешно добавлено в коллекцию",uncollectSuccess:"Коллекция отменена успешно",likeFailed:"Не удалось поставить лайк, пожалуйста, попробуйте снова",collectFailed:"Не удалось добавить в коллекцию, пожалуйста, попробуйте снова",networkError:"Ошибка сети, пожалуйста, попробуйте снова",reportSuccess:"Жалоба успешно отправлена, мы обработаем ее как можно скорее",reportFailed:"Не удалось отправить жалобу, пожалуйста, попробуйте снова"},langSelect:{message:{success:"Язык успешно изменен!"}},userCenter:{title:"Личная Информация",username:"Имя Пользователя",usernamePlaceholder:"AlexOnlyGF",usernameHelper:"Пожалуйста, введите 3-25 символов, разрешены буквы, эмодзи, цифры и подчеркивания. Имя пользователя должно быть уникальным.",profile:"Профиль (Опционально)",profilePlaceholder:"Заполните свою биографию, чтобы другие могли лучше вас узнать",save:"Сохранить",saving:"Сохранение...",saveSuccess:"Успешно сохранено",saveFailed:"Не удалось сохранить, пожалуйста, попробуйте снова",editProfile:"Редактировать Профиль",collections:"Коллекции",likes:"Нравится",logout:"Выйти",logoutConfirm:"Вы уверены, что хотите выйти?",downloadApp:"Скачать APP",language:"Язык",privacyPolicy:"Политика Конфиденциальности",termsOfUse:"Условия Использования",contactUs:"Связаться с Нами",support:"Поддержка",supportDesc:"Мы здесь для вас 24/7",premiumTitle:"OnlyGF Premium",premiumDesc:"Откройте все шоу и {coins} бонусных монет каждый месяц",myBalance:"Мой баланс",recharge:"Пополнить",currentSubscription:"Текущая подписка",daysLeft:"Дней осталось"},download:{googlePlay:{name:"Google Play",description:"Получите официальное приложение для безопасных, бесшовных обновлений и новых компаньонов.",subtitle:"СКАЧАТЬ В"},appStore:{name:"App Store",description:"Наслаждайтесь приватным, захватывающим опытом общения, оптимизированным для вашего iPhone.",subtitle:"Скачать"},androidApk:{name:"Android APK",description:"Установите напрямую для максимальной конфиденциальности, мгновенного доступа и последних обновлений.",subtitle:"Скачать"},webApp:{name:"Web APP",description:"Общайтесь мгновенно из любого браузера — установка не требуется. Ваше личное убежище ждет вас.",subtitle:"Установить"}},premiumPhotoUnlock:{vipUnlock:"Можно разблокировать",vipMark:"VIP",proMark:"Pro"},photoGallery:{photoCount:"{current}/{total}",prevPhoto:"Назад",nextPhoto:"Далее"},dialogVideoUnlock:{title:"Разблокировать Видео",desc:"Разблокируйте это видео, чтобы посмотреть полное содержимое",button:"Разблокировать Сейчас",balance:"Ваш Баланс",insufficientBalance:"Недостаточно Средств",getMore:"Получить Больше Монет",unlocking:"Разблокировка...",unlockSuccess:"Видео успешно разблокировано",unlockFailed:"Не удалось разблокировать видео"},upgradablePhoto:{unlockMoment:"Разблокировать момент",upgrading:"Обновление...",upgradeSuccess:"Обновлено до видео",upgradeFailed:"Не удалось обновить"},dialogWebViewGuide:{title:"Откройте в браузере",desc:"Вход через Google не поддерживается во встроенных браузерах приложений. Скопируйте ссылку и откройте её в системном браузере (Chrome/Safari), чтобы завершить вход.",currentUrl:"URL текущей страницы",copyLink:"Копировать ссылку",copied:"Ссылка скопирована",copyFailed:"Не удалось скопировать, скопируйте вручную",steps:{step1:"Нажмите кнопку выше, чтобы скопировать ссылку",step2:"Откройте системный браузер (Chrome/Safari)",step3:"Вставьте ссылку и перейдите для завершения входа"}},emailChat:{openEmailChat:"Открыть чат по электронной почте",connectViaEmail:"Связаться по электронной почте",enterEmailTitle:"Введите электронную почту для получения писем",receiveYourFirstLetter:"Получите ваше первое письмо",receiveLetter:"Получить письмо",startEmailChatWith:"Начать чат по электронной почте с {botName}",letterWillBeSent:"Письмо скоро будет отправлено на вашу почту!",description:"Хотите получать письма, написанные специально для вас, помимо чата? После включения они будут приходить в ваш почтовый ящик, продолжая вашу историю, как если бы они были реальной частью вашей жизни.",emailPlaceholder:"Адрес электронной почты",sendNow:"Отправить сейчас",emailChatStartedWith:"Чат по электронной почте начат с {botName}",switchToBot:"Переключиться на {botName}",receiveLetterAt:"Получить письмо",tips:"Советы:",tipsContent:"Она будет проактивно писать вам и отвечать на ваши письма. Это личное, в медленном темпе и исключительно для вас двоих.",invalidEmail:"Пожалуйста, введите действительный адрес электронной почты",enableSuccess:"Чат по электронной почте успешно включен",disableSuccess:"Чат по электронной почте успешно отключен",updateEmailSuccess:"Электронная почта успешно обновлена",switchBotSuccess:"Успешно переключено на нового персонажа",enableFailed:"Не удалось включить чат по электронной почте",disableFailed:"Не удалось отключить чат по электронной почте",updateEmailFailed:"Не удалось обновить электронную почту",switchBotFailed:"Не удалось переключить персонажа",disableConfirmTitle:"Закрыть чат по электронной почте?",disableConfirmMessage:"Вы больше не будете получать письма от этого персонажа.",switchBotConfirmTitle:"Переключить персонажа?",switchBotConfirmMessage:"Переключить чат по электронной почте с {fromBot} на {toBot}?",updateEmail:"Обновить электронную почту",enterNewEmail:"Пожалуйста, введите новый адрес электронной почты",firstLetterTriggered:"Ваше первое письмо уже в пути!",firstLetterFailed:"Не удалось отправить первое письмо",verifyTitle:"Подтвердить электронную почту",verifyDesc:"Код подтверждения отправлен на {email}",codeRequired:"Пожалуйста, введите 6-значный код",codeInvalid:"Неверный или истекший код",codeSent:"Код отправлен",codeSendFailed:"Не удалось отправить код",confirm:"Подтвердить",resendCode:"Отправить повторно",resendCountdown:"Отправить повторно через {seconds}s"},emailCallback:{verifying:"Проверка вашей ссылки...",success:"Успешно!",redirectingToChat:"Перенаправление в чат...",oops:"Упс!",redirectingIn:"Перенаправление на главную страницу через {seconds}с...",goHomeNow:"Перейти на главную страницу",invalidLink:"Недействительная ссылка",linkExpired:"Срок действия ссылки истек. Пожалуйста, вернитесь в письмо и нажмите еще раз.",linkInvalid:"Недействительная ссылка",linkUsed:"Ссылка больше не действительна",userNotFound:"Пользователь не найден",networkError:"Ошибка сети, попробуйте еще раз"},profileComplete:{title:"Добро пожаловать в {appName}!",subtitle:"Расскажите нам больше для лучшего персонализированного опыта",nicknameLabel:"Как вас зовут?",nicknamePlaceholder:"Введите крутой никнейм",nicknameRequired:"Пожалуйста, введите ваш никнейм",genderLabel:"Какое местоимение вы используете?",genderHint:"(Пол нельзя изменить после выбора.)",birthdayLabel:"Ваш день рождения?",birthdayPlaceholder:"ДД/ММ/ГГГГ",birthdayRequired:"Пожалуйста, выберите ваш день рождения",birthdayUnderAge:"Вам должно быть не менее 18 лет",submitButton:"Начать мое путешествие!",genderRequired:"Пожалуйста, выберите ваш пол",submitSuccess:"Профиль успешно заполнен!",submitFailed:"Не удалось отправить, попробуйте еще раз",genderOptions:{male:"Он",female:"Она",other:"Они"}},seo:{description:{characterList:"Просмотрите всех ИИ-персонажей на {appName}. Найдите своего идеального ИИ-компаньона для живого общения, чата и историй.",characterSearch:"Ищите ИИ-персонажей на {appName}. Находите ИИ-компаньонов по имени, тегу или интересам и начинайте общаться мгновенно.",characterDetail:"Общайтесь с {name} в захватывающем AI Chat на {appName}. Начните общение с AI Girlfriends прямо сейчас.",characterInteract:"Испытайте живое общение с ИИ-компаньонами на {appName}. ИИ-трансляции в реальном времени и полное погружение в виртуальное общение.",characterChat:"Общайтесь с ИИ-персонажами в захватывающем AI Chat на {appName}. Начните общение с AI Girlfriends прямо сейчас.",chatHistory:"Просмотрите историю чатов с ИИ на {appName} и продолжайте общение с любимыми ИИ-компаньонами.",userCenter:"Управляйте профилем {appName}, коллекциями и настройками аккаунта в пользовательском центре.",rechargeCenter:"Пополняйте монеты и оформляйте подписку на {appName}. Откройте премиум-чат с ИИ, живое общение и эксклюзивный контент.",webTutorial:"Узнайте, как использовать {appName}, с помощью нашего веб-руководства. Советы по чату с ИИ, живому общению и максимальному использованию ИИ-компаньона.",contactUs:"Свяжитесь с {appName} для поддержки, партнерства и запросов о продуктах, связанных с опытом общения с ИИ-компаньонами.",privacyPolicy:"Ознакомьтесь с Политикой конфиденциальности {appName}, чтобы узнать, как мы собираем, используем и защищаем вашу личную информацию.",termsService:"Ознакомьтесь с Условиями использования {appName}, регулирующими использование нашей платформы ИИ-компаньонов."},characterDetail:{titlePrefix:"Профиль персонажа",age:"Возраст",career:"Профессия",height:"Рост",constellation:"Знак зодиака",aiGirlfriend:"AI Girlfriend",descriptionTemplate:"Общайтесь с {name} в захватывающем AI Chat на {appName}. Начните общение с AI Girlfriends прямо сейчас."},chat:{titleTemplate:"Чат с {name}—AI Girlfriend{'|'}{appName}",descriptionTemplate:"Общайтесь с {name} в захватывающем AI Chat на {appName}. Начните общение с AI Girlfriends прямо сейчас."},interact:{titleTemplate:"{name}: канал трансляций— История живого ИИ-общения,Виртуальные компаньоны {'|'} {appName}",descriptionTailTemplate:"{name} Прямой эфир+Начните живое общение с AI Girlfriends прямо сейчас."}},cookieConsent:{title:"Мы Ценим Вашу Конфиденциальность",description:"Чтобы обеспечить вам лучший опыт, мы используем файлы cookie для основных функций, персонализированного контента, маркетинга и аналитики.",learnMore:"Узнать больше",accept:"Принять",deny:"Отклонить"},resetChat:{title:"Сбросить чат",message:"Сбросить разговор и все воспоминания об общении с этим персонажем? Чат вернётся в исходное состояние.",clear:"Сбросить",clearing:"Сброс…"},callVideoPicker:{title:"Добавить сохранённое видео",empty:"У этого персонажа пока нет сохранённых видео.",select:"Использовать видео",error:"Не удалось загрузить или сохранить. Повторите попытку."}},[Ul.PL]:{errorPage:{page404:{oops:"UPS!",headline:"Webmaster powiedział, że nie możesz wejść na tę stronę...",info:"Sprawdź, czy wprowadzony adres URL jest prawidłowy lub kliknij przycisk poniżej, aby wrócić do strony głównej.",backToHome:"Wróć do strony głównej",allRightsReserved:"Wszelkie prawa zastrzeżone"},page401:{oops:"Ups!",noPermission:"Nie masz uprawnień, aby przejść na tę stronę",contactLeader:"Jeśli nie jesteś zadowolony, skontaktuj się ze swoim przełożonym",orYouCan:"Lub możesz przejść:",backHome:"Wróć do strony głównej",browse:"Po prostu przeglądaj",viewImage:"Kliknij, aby zobaczyć obraz",back:"Wstecz",gifSource:"źródło gif",randomView:"Losowy widok"},ipAccess:{title:"Dostęp Ograniczony",description:"Przepraszamy, ta usługa nie jest dostępna w Twoim regionie",tips:"Ze względu na lokalne przepisy i umowy, ta strona internetowa nie jest dostępna w Twoim regionie geograficznym."}},route:{premium:"Premium",home:"Odkrywaj",characterList:"Lista Postaci",characterSearch:"Wyszukiwanie Postaci",characterDetail:"Szczegóły Postaci",characterChat:"Czat z Postacią",chatHistory:"Czat",userCenter:"Centrum Użytkownika",userCenterEdit:"Informacje Osobiste",rechargeCenter:"Centrum Doładowań",contactUs:"Skontaktuj się z Nami",characterCollections:"Kolekcje",characterLiked:"Polubione",rechargeHistory:"Historia Doładowań",legalInformation:"Informacje prawne",underagePolicy:"Polityka dotycząca nieletnich",subscriptionPolicy:"Polityka subskrypcji",exemption2257:"Wyłączenie 18 U.S.C. 2257",dmcaPolicy:"Polityka DMCA",blockedContentPolicy:"Polityka zablokowanych treści",contentRemovalPolicy:"Polityka usuwania treści",complaintPolicy:"Polityka skarg"},rechargeHistory:{title:"Historia Transakcji",tabs:{deposits:"Doładowania",expenses:"Wydatki"},expense:{chatWith:"Czat z {name}",unlockedVideo:"Odblokowano prywatne wideo {name}",unlockedPhoto:"Odblokowano prywatne zdjęcie {name}",upgradeVideo:"Upgrade wideo",sendGifts:"Wydatek na interakcję intymną: {name}",other:"Inny wydatek"}},rechargeCenter:{tabs:{subscribe:"Subskrybuj",coins:"Monety"},premium:{title:"Subskrybuj",choosePlan:"Wybierz Swój Plan",anonymous:"100% anonimowo. Możesz anulować w dowolnym momencie.",countdown:{hours:"Godziny",minutes:"Minuty",seconds:"Sekundy"},limitedOffer:"OFERTA CZASOWA",discount:"Do 75% zniżki na subskrypcję",plans:{yearly:"12 miesięcy",quarterly:"3 miesiące",monthly:"1 miesiąc",perMonth:"/miesiąc"},currentSubscription:{label:"Aktualna subskrypcja",daysLeft:"Dni pozosta?o",renewsOn:"Odnowienie {date}"},subscribeTypes:{none:"Brak subskrypcji",weekly:"Tygodniowa",monthly:"Miesi?czna",quarterly:"Kwartalna",annual:"Roczna",planText:"Plan {type}"},badges:{bestChoice:"NAJLEPSZY WYBÓR"},security:{noAdultTransaction:"Brak transakcji dla dorosłych w wyciągu bankowym",noHiddenFees:"Brak ukrytych opłat + Anuluj subskrypcję w dowolnym momencie",statementCharge:"Opłata widnieje jako '{appName}' w wyciągu bankowym",cancelAnytime:"Anuluj subskrypcję w dowolnym momencie w ustawieniach"},agreement:{iAgree:"Akceptuję",termsOfService:"Warunki Świadczenia Usług",and:"i",subscriptionPolicy:"Polityka subskrypcji"},subscribe:"Subskrybuj",subscribed:"Aktywna subskrypcja",upgrade:"Ulepsz",errors:{alreadySubscribed:"Masz już aktywną subskrypcję."},vipGuide:{title:"Odblokuj ekskluzywne przywileje",description:"Podnies swoje doswiadczenie dzieki naszemu najbardziej elitarnemu poziomowi relacji i tresci premium.",discountTag:"40% TANIEJ",button:"Przejdź na Premium",benefits:{exclusivePrivateShows:"Ekskluzywne Prywatne Pokazy & Wideo i Obrazy",premiumTipMenu:"Menu Napiwków Premium",emotionalChatModel:"Bogatszy emocjonalnie model czatu AI",betterMemory:"Lepsza pamiec w kazdej interakcji",welfareImages:"Odblokuj regularnie aktualizowane obrazy bonusowe",posePrivilege:"Odblokuj specjalne przywileje poz",liveChatPrivilege:"Przywileje czatu w pokoju live",monthlyFreeCoins:'<span style="color: #ff007f; font-weight: bold;">{coins}</span> darmowych monet co miesiac'}},paymentPending:{alt:"Płatność w toku",title:"Płatność w toku",description:"Twoja płatność jest przetwarzana. Po weryfikacji konto zostanie automatycznie uaktualnione do Premium. Może to potrwać kilka minut.",button:"Rozumiem"},benefits:{title:"Korzyści Premium",createAI:"Stwórz własną Dziewczynę AI",unlimitedMessages:"Nieograniczone wiadomości tekstowe",freeTokens:"Otrzymaj 100 DARMOWYCH tokenów / miesiąc",removeBlur:"Usuń rozmycie z obrazów",generateImages:"Generuj obrazy",phoneCalls:"Wykonuj połączenia AI",fastResponse:"Szybki czas odpowiedzi",prioritySupport:"Priorytetowe wsparcie klienta",exclusiveCharacters:"Dostęp do ekskluzywnych postaci",advancedCustomization:"Zaawansowane dostosowanie osobowości"}},coins:{title:"Monety",currentCoins:"Obecne Monety",description:{title:"Opis Monet",subtitle:"Monety to wirtualna waluta wszechświata! Mając więcej monet, możesz uczynić swoje doświadczenie czatu jeszcze lepszym:"},security:{antivirusSecuredLine1:"Antywirus",antivirusSecuredLine2:"zabezpieczone",privacyBankStatementLine1:"Prywatność w wyciągu",privacyBankStatementLine2:"bankowym"},badges:{discount:"{percent}% ZNIŻKI"},features:{heartWhisper:"Wiadomość czatu",inspirationReply:"Odpowiedź inspiracji",premiumChat:"Specjalne prezenty",specialGifts:"Kup animowany film"},history:{title:"Historia Doładowań",item:{title:"Monety",conisNum:"+ {num} monet",orderId:"ID Zamówienia: {id}"}}}},order:{status:{completed:{type:"Zakończone",title:"Płatność Udana",description:"Monety zostały pomyślnie dodane do Twojego konta! Możesz teraz ich używać, aby odblokować ekskluzywne funkcje."},pending:{type:"Oczekujące",title:"Przetwarzanie Płatności…",description:"Poczekaj, aż potwierdzimy Twoją płatność. Możesz sprawdzić najnowszy postęp w historii doładowań w dowolnym momencie."},failed:{type:"Nieudane",title:"Płatność Nieudana",description:"Niestety, ta płatność nie mogła zostać zrealizowana. Upewnij się, że nie naliczyliśmy Ci opłat. Spróbuj ponownie."}}},navbar:{search:{placeholder:"Szukaj"},login:{title:"Zaloguj się",notification:{title:"Wskazówka",message:"Metoda logowania jeszcze niedostępna"}},download:{title:"Pobierz",dialog:{title:"Pobierz APP",subtitle:"Pobierz aplikację, aby przeszukać ponad 20 milionów postaci."}},checkIn:{title:"Zamelduj się"},joinFree:{title:"Dołącz za darmo"}},sidebar:{today:"DZISIAJ",yesterday:"WCZORAJ",other:"INNE",footer:{affiliate:"Afiliacja",support:"Wsparcie"}},contactUs:{email:"Email",youtube:"Youtube",facebook:"Facebook",whatsapp:"WhatsApp",telegram:"Telegram",instagram:"Instagram",discord:"Discord"},loading:{title:"Ładowanie..."},noData:{title:"Tutaj jest trochę cicho..."},home:{more:"Zobacz Wszystko",faq:{title:"Najczęściej Zadawane Pytania"},banner:{slide1:{title:"Twoja Historia Zaczyna się Tutaj",description:"Odblokuj Nieskończone Rozmowy",buttonText:"Zacznij Czatować Teraz"},slide2:{title:"Znajdź Swoją Idealną Postać",description:"Odkryj popularne postacie wybrane dla Ciebie",buttonText:"Odkrywaj Teraz"},slide3:{title:"Zbuduj Swój Profil",description:"Dostosuj preferencje i zsynchronizuj postępy",buttonText:"Przejdź do Centrum"}},all:"Wszystkie"},characterTabs:{recommend:"Polecane",trending:"Trendy",topRated:"Najwyżej Oceniane",popular:"Popularne",latest:"Najnowsze"},characterChat:{sendInputPlaceholder:"Wpisz swoją wiadomość...",openingPopoverTitle:"Spróbuj odpowiedzieć",copyMessage:"Kopiuj Wiadomość",deleteMessage:"Usuń Wiadomość",reportMessage:"Zgłoś Wiadomość",copySuccess:"Skopiowano do schowka",copyFailed:"Kopiowanie nie powiodło się",noCopyContent:"Brak treści do skopiowania",sendTooFrequent:"Wysyłanie zbyt częste, spróbuj ponownie później",messageTooLong:"Długość wiadomości nie może przekraczać 200 znaków",sendFailed:"Wysyłanie nie powiodło się, spróbuj ponownie",openingSuggestions:{careerChange:"Myślę o zmianie kariery w kierunku technologii. Co sądzisz o perspektywach tej branży?",tellMore:"Ciekawe! Czy mógłbyś opowiedzieć więcej o swoim doświadczeniu w strategii marketingowej?",professionalAdvice:"Czuję się trochę utknięty w mojej obecnej roli. Jakieś rady, jak się rozwijać zawodowo?"},chatUser:{collect:"Kolekcja",collected:"Zebrane",profile:"Profil",share:"Udostępnij"},chatHeader:{status:{online:"Online",offline:"Offline",typing:"Pisze...",sendingPhoto:"wysyłanie zdjęcia",living:"Na żywo"}}},interact:{actionTrigger:"Wywołaj",actionSend:"Wyślij",heat:"Poziom interakcji z nią",liveRoomGuide:{description:"Wyślij prezenty, aby odblokować ekskluzywne interaktywne występy!",action:"Wyślij"},blockingDialog:{title:"Wszystko, o czym marzyłaś...",previewPrefix:"Oto zapowiedź ",previewHighlight:"ekskluzywnego pokazu Try-On.",previewSuffix:" Wyślij prezenty premium, aby odblokować więcej.",action:"Odblokuj teraz"},giftPanel:{sendGift:"Wyślij prezent",recharge:"Doładuj",more:"Więcej",gift:"Prezent",sort:"Sortuj",close:"Zamknij"},sceneSwitch:{guide:"Kliknij tutaj, aby odkryć więcej scen.",button:"Zmień\nscenę",shortButton:"Scena",title:"Zmień scenę",subtitle:"Kliknij, aby przełączyć się na inną scenę live.",switching:"Przełączanie...",close:"Zamknij",current:"Obecna",price:"Odblokuj za {price} monet",payInsufficient:"Za mało monet. Doładuj konto i spróbuj ponownie.",payNeedsConfirm:"Ta scena wymaga potwierdzenia płatności. Spróbuj ponownie.",payFailed:"Nie udało się odblokować tej sceny. Spróbuj ponownie."},floatingNotice:{sent:"wysłał",requested:"zażądał"},mobileMenu:{muteLabel:"Wycisz",unmuteLabel:"Włącz dźwięk",showMenu:"Pokaż menu",hideMenu:"Ukryj menu",muteToast:"Wyciszono",unmuteToast:"Włączono dźwięk"},fallbackReply:{feeling:"Jak się teraz czujesz?",anywhere:"Gdybyś mógł być teraz w dowolnym miejscu, gdzie byłbyś?",mind:"Chciałbym usłyszeć, o czym ostatnio myślisz."},defaultNames:{action:"Akcja",gift:"Prezent",character:"Postać"},loading:{title:"Proszę czekać...",subtitle:"{name} się przygotowuje."},stayReward:{title:"Nagrody za obecność",surpriseTitle:"Nagrody-niespodzianki!",freeGiftHint:"Czeka na Ciebie darmowy prezent",subtitle:"Zostań w pokoju, aby odblokować nagrody.",durationMinutes:"{minutes} min",coinRange:"{min}-{max} monet",coinFixed:"{amount} monet",giftReward:"Prezent x{quantity}",expireHours:"ważne {hours} godz.",expireSoon:"Wkrótce wygasa",stateClaimed:"Odebrano",stateClaimable:"Odbierz",stateInProgress:"W toku",stateLocked:"Zablokowane",countdownLabel:"Następna nagroda za",claim:"Odbierz",claiming:"Odbieranie...",claimed:"Odebrano",claimEmpty:"Tym razem brak nagród. Twój postęp jest nadal liczony.",resultConfirm:"Rozumiem",resultCongrats:"Gratulacje!",resultSummary:"Otrzymałeś {coins} monet i {gifts} prezentów",resultSummaryCoinsOnly:"Otrzymałeś {coins} monet",resultSummaryGiftsOnly:"Otrzymałeś {gifts} prezentów",resultGotIt:"Rozumiem",resultCoinLabel:"Monety",resultGiftLabel:"Prezenty",guestTip:"Zaloguj się, aby zbierać nagrody za obecność.",close:"Zamknij",entryLabel:"Nagrody za obecność",countdownNotReady:"Nagroda wkrótce dostępna"},a11y:{avatarBackground:"Tło awatara",showMenu:"Pokaż menu",fire:"Ogień",up:"W górę",send:"Wyślij",gift:"Prezent",chat:"Czat",coin:"Moneta",recharge:"Doładuj"}},chatInput:{placeholder:"Wpisz swoją wiadomość..."},chatDeletePopover:{deleteChat:"Usuń",hide:"Ukryj"},clearChat:{title:"Wyczyścić ten czat?",message:"Wszystkie wiadomości w tym czacie zostaną trwale usunięte.",clear:"Wyczyść",clearing:"Czyszczenie...",clearChat:"Wyczyść Czat"},footer:{privacyPolicy:"Polityka Prywatności",termsService:"Warunki Świadczenia Usług",content:"Odkryj nową generację towarzystwa AI. OnlyGF przynosi Ci autentyczne rozmowy, emocjonalne połączenia i społeczność przyjaciół AI, którzy Cię rozumieją i rosną razem z Tobą.",desc:"© 2025 OnlyGF. Wszelkie prawa zastrzeżone.",features:"Funkcje",popular:"Popularne",chat:"Czat",createCharacter:"Utwórz Postać",myCollection:"Moja kolekcja",myAI:"Moja AI",legalSupport:"Prawo i wsparcie",termsAndPolicies:"Regulaminy i polityki"},legalInformation:{pageTitle:"Informacje prawne",items:{termsService:"Warunki świadczenia usług",privacyNotice:"Informacja o prywatności",subscriptionPolicy:"Polityka subskrypcji",cookiesNotice:"Informacja o plikach cookie",underagePolicy:"Polityka dotycząca nieletnich",contentRemovalPolicy:"Polityka usuwania treści",blockedContentPolicy:"Polityka zablokowanych treści",dmcaPolicy:"Polityka DMCA",complaintPolicy:"Polityka skarg",exemption2257:"Wyłączenie 18 U.S.C. 2257",communityGuidelines:"Wytyczne społeczności",affiliateTerms:"Warunki programu partnerskiego"}},languageDialog:{title:"Wybór Języka",desc:"Wybierz język wyświetlania"},dialogUploadAvatar:{title:"Wybierz Swój Awatar",desc:"Znajdźmy wygląd, który jest w pełni Tobą. Pierwsze wrażenia się liczą!",save:"Zapisz"},dialogShare:{title:"Udostępnij",desc:"Skopiuj link lub udostępnij bezpośrednio, znajomi mogą natychmiast zacząć czatować.",copy:"Skopiuj link",success:"Link skopiowany do schowka",error:"Nie udało się skopiować linku, spróbuj ponownie"},dialogReport:{title:"Zgłoś",desc:"Wybierz powód",list:{sexuallyExplicit:"Treści o charakterze seksualnym",hateSpeech:"Mowa nienawiści lub nękanie",suicideSelfInjury:"Samobójstwo lub samookaleczenie",violenceThreats:"Przemoc lub groźby",falseInformation:"Fałszywe informacje",spamFraud:"Spam lub oszustwo",privacyViolation:"Naruszenie prywatności",harmfulMinors:"Szkodliwe dla nieletnich",other:"Inne"},other:{title:"Opis",placeholder:"Proszę opisać problem..."},submit:"Wyślij"},dialogDownload:{title:"Pobierz",desc:"Pobierz aplikację, aby przeszukać ponad 20 milionów postaci.",toast:"Już wkrótce"},dialogCoinInsufficient:{title:"Odblokuj Następną Wiadomość",liveTitle:"Niewystarczająca liczba monet",desc:"Skończyły Ci się monety, aby kontynuować ten czat. Doładuj swoje saldo, aby odblokować więcej odpowiedzi.",message:"Wiadomości",balance:"Saldo",coins:"Monety",button:"Zdobądź Więcej Monet",notEnoughCoins:"Za mało monet",transactionHistory:"Historia transakcji >>",chooseHowToContinue:"Wybierz sposób kontynuacji",oneTime:"Zakup jednorazowy",subscription:"Subskrypcja",topUpPack:"Pakiet doładowania",perMonth:"/mies.",withMembershipAlsoGet:"Z członkostwem otrzymasz także",seeAllPerks:"Zobacz wszystkie korzyści >>",subscribeNow:"Subskrybuj teraz {money}",topUp:"Doładuj {money}",moreOptions:"Więcej opcji? Przejdź do centrum doładowań",bestValue:"Najlepsza oferta",topPick:"Wybór 99% użytkowników",quote:"„ To tylko dla tych, którzy naprawdę mnie rozumieją… Będę tu na ciebie czekać.”",cancelAnytime:"Anuluj w każdej chwili · zarządzaj przez App Store",guideWait:"Czekaj!",guideDesc:"Za chwilę wyśle ci porywające wideo…",guideQuestion:"Chcesz je zobaczyć?",guideViewNow:"Obejrzyj teraz"},dialogRegisterGuide:{title:"Chcesz kontynuować rozmowę?",desc:"Utwórz darmowe konto, aby kontynuować czat i odblokować wszystkie funkcje!",benefit1:"Nieograniczone rozmowy",benefit2:"Zapisz historię czatów",benefit3:"Dostęp do wszystkich postaci",signUp:"Zarejestruj się",later:"Może Później"},registerGuideMessage:{text:"Chcesz kontynuować rozmowę? Po prostu utwórz darmowe konto! Zarejestruj się teraz, aby otrzymać bonusowe wiadomości—nie mogę się doczekać kontynuacji!",button:"Zarejestruj się, aby czatować"},dialogPhotoUnlock:{title:"Odblokuj Zdjęcie",desc:"Odblokuj to zdjęcie, aby zobaczyć pełną zawartość",balance:"Twoje Saldo",button:"Odblokuj Teraz",getMore:"Zdobądź Więcej Monet",insufficientBalance:"Niewystarczające Saldo",unlocking:"Odblokowywanie...",unlockSuccess:"Zdjęcie odblokowane pomyślnie",unlockFailed:"Nie udało się odblokować zdjęcia"},photoRequest:{buttonTitle:"Poproś o zdjęcie",selectType:"Wybierz typ zdjęcia:",requestFailed:"Nie udało się poprosić o zdjęcie",sendMePhoto:"Wyślij mi zdjęcie",noMorePhotos:"Brak dostępnych zdjęć",poses:{random:"Losowe",selfie:"Selfie",posing:"Pozowanie",sitting:"Siedząca",kneeling:"Klęcząca",squatting:"Kucająca",standing:"Stojąca",prone:"Leżąca"},vipGuide:{title:"Odblokuj VIP Pozycje Zdjęć",description:"Subskrybuj, aby odblokować ekskluzywne pozycje zdjęć i poprosić o wybraną pozę.",buttonText:"Odblokuj VIP Teraz"}},dialogLogout:{title:"Wylogować?",desc:"Czy na pewno chcesz się wylogować?",desc2:"Będziesz musiał zalogować się ponownie, aby uzyskać dostęp do swojego konta.",confirm:"Wyloguj"},dialogLogin:{title:"Zaloguj się / Zarejestruj się",subtitle:"Rozmawiaj z ponad 20 mln dziewczyn",continueWith:"Kontynuuj z {method}",google:"Google",apple:"Apple",facebook:"Facebook",line:"Line",guest:"Gość",desc:"Wyrażam zgodę na otrzymywanie specjalnych ofert, komunikacji marketingowej i aktualizacji usług pocztą e-mail.",sub:"Potwierdzam, że mam",age:"18+",agreementPrefix:"akceptować",termsOfService:"Warunki Świadczenia Usług",and:"i",privacyPolicy:"Politykę Prywatności",or:"lub",emailPlaceholder:"Adres e-mail",continueWithEmail:"Kontynuuj z Email",verifyTitle:"Zweryfikuj swój e-mail",verifyDesc:"Wysłaliśmy 6-cyfrowy kod weryfikacyjny na {email}. Otwórz e-mail i wprowadź kod poniżej, aby kontynuować.",confirm:"Potwierdź",resendCode:"Wyślij ponownie kod",resendCountdown:"Wyślij ponownie za {seconds}s",back:"Wstecz",invalidEmail:"Wprowadź prawidłowy adres e-mail",codeSent:"Kod weryfikacyjny wysłany",codeSendFailed:"Nie udało się wysłać kodu weryfikacyjnego",codeRequired:"Wprowadź kod weryfikacyjny",codeInvalid:"Nieprawidłowy kod weryfikacyjny",promotionHint:"Pierwsza subskrypcja <b>-75% OFF</b> Oferta Ekskluzywna"},dialogCheckin:{title:"Codzienne Nagrody",desc:"Zamelduj się przez 7 kolejnych dni, aby zdobyć wszystkie nagrody!",button:"Odbierz Nagrodę",claimedToday:"Nagroda Odebrana Dzisiaj",resultTitle:"Nagroda Odebrana!",resultDesc:"Zameldowałeś się przez {days} dni z rzędu. Tak trzymaj!",resultButton:"Rozumiem",daysText:"Dzień {days}"},auth:{loginSuccess:"Zalogowano pomyślnie",loginFailed:"Nie udało się zalogować, spróbuj ponownie"},person:{edit:"Edytuj",follow:"Obserwowane",fans:"Obserwujący",createBot:" Boty",sendPost:" Posty",followBot:" Obserwowane Boty"},common:{noData:"Brak danych",clickRetry:"Dotknij, aby ponowić",live:"Na żywo",report:"Zgłoś wiadomość",reset:"Resetuj",months:{january:"Styczeń",february:"Luty",march:"Marzec",april:"Kwiecień",may:"Maj",june:"Czerwiec",july:"Lipiec",august:"Sierpień",september:"Wrzesień",october:"Październik",november:"Listopad",december:"Grudzień"},submitting:"Przesyłanie...",unlockFailed:"Wymagane jest odblokowanie uprawnień subskrypcji"},characterDetail:{online:"Online",chatToMe:"Czatuj ze Mną",collect:"Kolekcja",collected:"Zebrane",share:"Udostępnij",gallery:"Galeria",report:"Zgłoś",age:"Wiek",career:"Kariera",height:"Wzrost",constellation:"Konstelacja",bloodType:"Grupa Krwi",unknown:"Nieznany",likeSuccess:"Polubiono pomyślnie",unlikeSuccess:"Usunięto polubienie pomyślnie",collectSuccess:"Dodano do kolekcji pomyślnie",uncollectSuccess:"Kolekcja anulowana pomyślnie",likeFailed:"Nie udało się polubić, spróbuj ponownie",collectFailed:"Nie udało się dodać do kolekcji, spróbuj ponownie",networkError:"Błąd sieci, spróbuj ponownie",reportSuccess:"Zgłoszenie wysłane pomyślnie, przetwórzymy je jak najszybciej",reportFailed:"Nie udało się wysłać zgłoszenia, spróbuj ponownie"},langSelect:{message:{success:"Język zmieniony pomyślnie!"}},userCenter:{title:"Informacje Osobiste",username:"Nazwa Użytkownika",usernamePlaceholder:"AlexOnlyGF",usernameHelper:"Wprowadź 3-25 znaków, dozwolone są litery, emoji, cyfry i podkreślenia. Nazwa użytkownika musi być unikalna.",profile:"Profil (Opcjonalnie)",profilePlaceholder:"Wypełnij swoją biografię, aby inni mogli Cię lepiej poznać",save:"Zapisz",saving:"Zapisywanie...",saveSuccess:"Zapisano pomyślnie",saveFailed:"Nie udało się zapisać, spróbuj ponownie",editProfile:"Edytuj Profil",collections:"Kolekcje",likes:"Polubienia",logout:"Wyloguj",logoutConfirm:"Czy na pewno chcesz się wylogować?",downloadApp:"Pobierz APP",language:"Język",privacyPolicy:"Polityka Prywatności",termsOfUse:"Warunki Użytkowania",contactUs:"Skontaktuj się z Nami",support:"Wsparcie",supportDesc:"Jesteśmy tu dla Ciebie 24/7",premiumTitle:"OnlyGF Premium",premiumDesc:"Odblokuj wszystkie pokazy i {coins} bonusowych monet co miesiąc",myBalance:"Moje saldo",recharge:"Doładuj",currentSubscription:"Aktualna subskrypcja",daysLeft:"Dni pozostało"},download:{googlePlay:{name:"Google Play",description:"Pobierz oficjalną aplikację dla bezpiecznych, płynnych aktualizacji i nowych towarzyszy.",subtitle:"POBIERZ W"},appStore:{name:"App Store",description:"Ciesz się prywatnym, wciągającym doświadczeniem czatu zoptymalizowanym dla Twojego iPhone'a.",subtitle:"Pobierz"},androidApk:{name:"Android APK",description:"Zainstaluj bezpośrednio dla maksymalnej prywatności, natychmiastowego dostępu i najnowszych aktualizacji.",subtitle:"Pobierz"},webApp:{name:"Web APP",description:"Czatuj natychmiast z dowolnej przeglądarki — nie wymaga instalacji. Twoja prywatna ucieczka czeka.",subtitle:"Zainstaluj"}},premiumPhotoUnlock:{vipUnlock:"Można odblokować",vipMark:"VIP",proMark:"Pro"},photoGallery:{photoCount:"{current}/{total}",prevPhoto:"Poprzedni",nextPhoto:"Następny"},dialogVideoUnlock:{title:"Odblokuj Wideo",desc:"Odblokuj to wideo, aby obejrzeć pełną treść",button:"Odblokuj Teraz",balance:"Twoje Saldo",insufficientBalance:"Niewystarczające Saldo",getMore:"Zdobądź Więcej Monet",unlocking:"Odblokowywanie...",unlockSuccess:"Wideo odblokowane pomyślnie",unlockFailed:"Nie udało się odblokować wideo"},upgradablePhoto:{unlockMoment:"Odblokuj moment",upgrading:"Aktualizowanie...",upgradeSuccess:"Zaktualizowano do wideo",upgradeFailed:"Nie udało się zaktualizować"},dialogWebViewGuide:{title:"Proszę otworzyć w przeglądarce",desc:"Logowanie przez Google nie jest obsługiwane w przeglądarkach wbudowanych w aplikacje. Skopiuj link i otwórz go w systemowej przeglądarce (Chrome/Safari), aby dokończyć logowanie.",currentUrl:"Adres URL bieżącej strony",copyLink:"Kopiuj link",copied:"Link skopiowany",copyFailed:"Kopiowanie nie powiodło się, skopiuj ręcznie",steps:{step1:"Kliknij przycisk powyżej, aby skopiować link",step2:"Otwórz systemową przeglądarkę (Chrome/Safari)",step3:"Wklej link i odwiedź, aby dokończyć logowanie"}},emailChat:{openEmailChat:"Otwórz czat e-mail",connectViaEmail:"Połącz przez e-mail",enterEmailTitle:"Wprowadź e-mail, aby otrzymywać listy",receiveYourFirstLetter:"Otrzymaj swój pierwszy list",receiveLetter:"Odbierz list",startEmailChatWith:"Rozpocznij czat e-mailowy z {botName}",letterWillBeSent:"List zostanie wkrótce wysłany na Twój e-mail!",description:"Chcesz otrzymywać listy napisane tylko dla Ciebie, poza czatem? Po włączeniu trafią do Twojej skrzynki odbiorczej, kontynuując Twoją historię, jakby były prawdziwą częścią Twojego życia.",emailPlaceholder:"Adres e-mail",sendNow:"Wyślij teraz",emailChatStartedWith:"Czat e-mail rozpoczęty z {botName}",switchToBot:"Przełącz na {botName}",receiveLetterAt:"Odbierz list",tips:"Wskazówki:",tipsContent:"Będzie proaktywnie pisać do Ciebie i odpowiadać na Twoje listy. To prywatne, w wolnym tempie i wyłącznie dla was dwojga.",invalidEmail:"Proszę wprowadzić prawidłowy adres e-mail",enableSuccess:"Czat e-mail został pomyślnie włączony",disableSuccess:"Czat e-mail został pomyślnie wyłączony",updateEmailSuccess:"E-mail został pomyślnie zaktualizowany",switchBotSuccess:"Pomyślnie przełączono na nową postać",enableFailed:"Nie udało się włączyć czatu e-mail",disableFailed:"Nie udało się wyłączyć czatu e-mail",updateEmailFailed:"Nie udało się zaktualizować e-maila",switchBotFailed:"Nie udało się przełączyć postaci",disableConfirmTitle:"Zamknąć czat e-mail?",disableConfirmMessage:"Nie będziesz już otrzymywać listów od tej postaci.",switchBotConfirmTitle:"Przełączyć postać?",switchBotConfirmMessage:"Przełączyć czat e-mail z {fromBot} na {toBot}?",updateEmail:"Zaktualizuj e-mail",enterNewEmail:"Proszę wprowadzić nowy adres e-mail",firstLetterTriggered:"Twój pierwszy list jest w drodze!",firstLetterFailed:"Nie udało się wysłać pierwszego listu",verifyTitle:"Zweryfikuj e-mail",verifyDesc:"Kod weryfikacyjny wysłany na {email}",codeRequired:"Proszę wprowadzić 6-cyfrowy kod",codeInvalid:"Nieprawidłowy lub wygasły kod",codeSent:"Kod wysłany",codeSendFailed:"Nie udało się wysłać kodu",confirm:"Potwierdź",resendCode:"Wyślij ponownie",resendCountdown:"Wyślij ponownie za {seconds}s"},emailCallback:{verifying:"Weryfikowanie twojego linku...",success:"Sukces!",redirectingToChat:"Przekierowanie do czatu...",oops:"Ups!",redirectingIn:"Przekierowanie na stronę główną za {seconds}s...",goHomeNow:"Przejdź na stronę główną teraz",invalidLink:"Nieprawidłowy link",linkExpired:"Link wygasł. Proszę wrócić do e-maila i kliknąć ponownie.",linkInvalid:"Nieprawidłowy link",linkUsed:"Link nie jest już ważny",userNotFound:"Użytkownik nie znaleziony",networkError:"Błąd sieci, proszę spróbować ponownie"},profileComplete:{title:"Witamy w {appName}!",subtitle:"Powiedz nam więcej, aby uzyskać lepsze spersonalizowane doświadczenie",nicknameLabel:"Jak się nazywasz?",nicknamePlaceholder:"Wprowadź fajny pseudonim",nicknameRequired:"Proszę wprowadzić pseudonim",genderLabel:"Jakiego zaimka używasz?",genderHint:"(Płeć nie może być zmieniona po wybraniu.)",birthdayLabel:"Twoje urodziny?",birthdayPlaceholder:"DD/MM/RRRR",birthdayRequired:"Proszę wybrać datę urodzenia",birthdayUnderAge:"Musisz mieć co najmniej 18 lat",submitButton:"Rozpocznij moją podróż!",genderRequired:"Proszę wybrać płeć",submitSuccess:"Profil uzupełniony pomyślnie!",submitFailed:"Nie udało się wysłać, proszę spróbować ponownie",genderOptions:{male:"On",female:"Ona",other:"Oni"}},seo:{description:{characterList:"Przeglądaj wszystkie postacie AI na {appName}. Znajdź idealnego towarzysza AI do interakcji na żywo, czatu i opowieści.",characterSearch:"Szukaj postaci AI na {appName}. Odkrywaj towarzyszy AI według nazwy, tagu lub zainteresowań i zacznij rozmawiać natychmiast.",characterDetail:"Rozmawiaj z {name} w immersyjnym AI Chat na {appName}. Zacznij rozmawiać z AI Girlfriends już teraz.",characterInteract:"Doświadcz interakcji na żywo z towarzyszami AI na {appName}. Transmisje AI w czasie rzeczywistym i immersyjne wirtualne towarzystwo.",characterChat:"Rozmawiaj z postaciami AI w immersyjnym AI Chat na {appName}. Zacznij czatować z AI Girlfriends już teraz.",chatHistory:"Przeglądaj historię czatów AI na {appName} i kontynuuj rozmowy z ulubionymi towarzyszami AI.",userCenter:"Zarządzaj profilem {appName}, kolekcjami i ustawieniami konta w centrum użytkownika.",rechargeCenter:"Doładuj monety i subskrybuj na {appName}. Odblokuj premium czat AI, interakcje na żywo i ekskluzywne treści.",webTutorial:"Dowiedz się, jak korzystać z {appName}, korzystając z naszego samouczka internetowego. Wskazówki dotyczące czatu AI, interakcji na żywo i maksymalnego wykorzystania towarzysza AI.",contactUs:"Skontaktuj się z {appName} w sprawie wsparcia, partnerstwa i zapytań dotyczących produktów związanych z doświadczeniami towarzysza AI.",privacyPolicy:"Przeczytaj Politykę prywatności {appName}, aby dowiedzieć się, jak zbieramy, wykorzystujemy i chronimy Twoje dane osobowe.",termsService:"Przeczytaj Warunki korzystania z usług {appName} regulujące korzystanie z naszej platformy towarzyszy AI."},characterDetail:{titlePrefix:"Profil postaci",age:"Wiek",career:"Zawód",height:"Wzrost",constellation:"Znak zodiaku",aiGirlfriend:"AI Girlfriend",descriptionTemplate:"Rozmawiaj z {name} w immersyjnym AI Chat na {appName}. Zacznij rozmawiać z AI Girlfriends już teraz."},chat:{titleTemplate:"Czatuj z {name}—AI Girlfriend{'|'}{appName}",descriptionTemplate:"Rozmawiaj z {name} w immersyjnym AI Chat na {appName}. Zacznij czatować z AI Girlfriends już teraz."},interact:{titleTemplate:"{name}: kanał na żywo— Historia interakcji AI na żywo,Wirtualni towarzysze {'|'} {appName}",descriptionTailTemplate:"{name} Wideo na żywo+Zacznij interakcję na żywo z AI Girlfriends już teraz."}},cookieConsent:{title:"Cenimy Twoją Prywatność",description:"Aby zapewnić Ci najlepsze wrażenia, używamy plików cookie do podstawowych funkcji, spersonalizowanych treści, marketingu i analiz.",learnMore:"Dowiedz się więcej",accept:"Akceptuj",deny:"Odrzuć"},resetChat:{title:"Zresetuj czat",message:"Zresetować rozmowę i wszystkie wspomnienia z tą postacią? Czat wróci do stanu początkowego.",clear:"Zresetuj",clearing:"Resetowanie…"},callVideoPicker:{title:"Dodaj zapisane wideo",empty:"Nie ma jeszcze zapisanych filmów tej postaci.",select:"Użyj tego wideo",error:"Nie udało się wczytać lub zapisać. Spróbuj ponownie."}},[Ul.IT]:{errorPage:{page404:{oops:"OOPS!",headline:"Il webmaster ha detto che non puoi entrare in questa pagina...",info:"Verifica che l'URL inserito sia corretto o fai clic sul pulsante qui sotto per tornare alla homepage.",backToHome:"Torna alla home",allRightsReserved:"Tutti i diritti riservati"},page401:{oops:"Oops!",noPermission:"Non hai il permesso di accedere a questa pagina",contactLeader:"Se non sei soddisfatto, contatta il tuo responsabile",orYouCan:"Oppure puoi andare:",backHome:"Torna alla home",browse:"Naviga semplicemente",viewImage:"Clicca per vedere l'immagine",back:"Indietro",gifSource:"fonte gif",randomView:"Vista casuale"},ipAccess:{title:"Accesso Limitato",description:"Spiacenti, questo servizio non è disponibile nella tua regione",tips:"A causa delle normative e degli accordi locali, questo sito web non è disponibile nella tua area geografica."}},route:{premium:"Premium",home:"Esplora",characterList:"Lista Personaggi",characterSearch:"Ricerca Personaggio",characterDetail:"Dettagli Personaggio",characterChat:"Chat con Personaggio",chatHistory:"Chat",userCenter:"Centro Utente",userCenterEdit:"Informazioni Personali",rechargeCenter:"Centro Ricariche",contactUs:"Contattaci",characterCollections:"Collezioni",characterLiked:"Piaciuti",rechargeHistory:"Storico Ricariche",legalInformation:"Informazioni legali",underagePolicy:"Politica per i minori",subscriptionPolicy:"Politica di abbonamento",exemption2257:"Esenzione 18 U.S.C. 2257",dmcaPolicy:"Politica DMCA",blockedContentPolicy:"Politica sui contenuti bloccati",contentRemovalPolicy:"Politica di rimozione dei contenuti",complaintPolicy:"Politica sui reclami"},rechargeHistory:{title:"Cronologia Transazioni",tabs:{deposits:"Ricariche",expenses:"Spese"},expense:{chatWith:"Chat con {name}",unlockedVideo:"Video privato di {name} sbloccato",unlockedPhoto:"Foto privata di {name} sbloccata",upgradeVideo:"Upgrade Video",sendGifts:"Spesa per interazione intima: {name}",other:"Altra spesa"}},rechargeCenter:{tabs:{subscribe:"Abbonati",coins:"Monete"},premium:{title:"Abbonati",choosePlan:"Scegli il Tuo Piano",anonymous:"100% anonimo. Puoi annullare in qualsiasi momento.",countdown:{hours:"Ore",minutes:"Minuti",seconds:"Secondi"},limitedOffer:"OFFERTA A TEMPO LIMITATO",discount:"Fino al 75% di sconto sul tuo abbonamento",plans:{yearly:"12 mesi",quarterly:"3 mesi",monthly:"1 mese",perMonth:"/mese"},currentSubscription:{label:"Abbonamento attuale",daysLeft:"Giorni rimasti",renewsOn:"Rinnovo il {date}"},subscribeTypes:{none:"Nessun abbonamento",weekly:"Settimanale",monthly:"Mensile",quarterly:"Trimestrale",annual:"Annuale",planText:"Piano {type}"},badges:{bestChoice:"SCELTA MIGLIORE"},security:{noAdultTransaction:"Nessuna transazione per adulti nell'estratto conto bancario",noHiddenFees:"Nessun costo nascosto + Annulla l'abbonamento in qualsiasi momento",statementCharge:"L'addebito appare come '{appName}' nell'estratto conto bancario",cancelAnytime:"Annulla l'abbonamento in qualsiasi momento nelle impostazioni"},agreement:{iAgree:"Accetto i",termsOfService:"Termini di Servizio",and:"e",subscriptionPolicy:"Politica di abbonamento"},subscribe:"Abbonati",subscribed:"Abbonato",upgrade:"Aggiorna",errors:{alreadySubscribed:"Hai già un abbonamento attivo."},vipGuide:{title:"Sblocca privilegi esclusivi",description:"Porta la tua esperienza al livello piu esclusivo di connessione e contenuti di lusso.",discountTag:"40% OFF",button:"Passa a Premium",benefits:{exclusivePrivateShows:"Spettacoli Privati Esclusivi & Video e Immagini",premiumTipMenu:"Menu Mance Premium",emotionalChatModel:"Modello chat AI con emozioni piu ricche",betterMemory:"Memoria migliore in ogni interazione",welfareImages:"Sblocca immagini bonus aggiornate regolarmente",posePrivilege:"Sblocca privilegi per pose speciali",liveChatPrivilege:"Privilegi chat nella live room",monthlyFreeCoins:'<span style="color: #ff007f; font-weight: bold;">{coins}</span> monete gratis ogni mese'}},paymentPending:{alt:"Pagamento in corso",title:"Pagamento in corso",description:"Il pagamento è in fase di elaborazione. Una volta verificato, il tuo account verrà aggiornato automaticamente a Premium. Potrebbero volerci alcuni minuti.",button:"Ho capito"},benefits:{title:"Vantaggi Premium",createAI:"Crea la tua Fidanzata AI",unlimitedMessages:"Messaggi di testo illimitati",freeTokens:"Ottieni 100 token GRATUITI / mese",removeBlur:"Rimuovi sfocatura dalle immagini",generateImages:"Genera immagini",phoneCalls:"Effettua chiamate AI",fastResponse:"Tempo di risposta rapido",prioritySupport:"Supporto clienti prioritario",exclusiveCharacters:"Accesso a personaggi esclusivi",advancedCustomization:"Personalizzazione avanzata della personalità"}},coins:{title:"Monete",currentCoins:"Monete Attuali",description:{title:"Descrizione Monete",subtitle:"Le monete sono la valuta virtuale dell’universo! Con più monete, puoi rendere la tua esperienza di chat ancora più fantastica:"},security:{antivirusSecuredLine1:"Antivirus",antivirusSecuredLine2:"Protetto",privacyBankStatementLine1:"Privacy nell’estratto",privacyBankStatementLine2:"bancario"},badges:{discount:"{percent}% DI SCONTO"},features:{heartWhisper:"Messaggio della chat",inspirationReply:"Risposta ispiratrice",premiumChat:"Regali speciali",specialGifts:"Acquista video animato"},history:{title:"Storico Ricariche",item:{title:"Monete",conisNum:"+ {num} monete",orderId:"ID Ordine: {id}"}}}},order:{status:{completed:{type:"Completato",title:"Pagamento Riuscito",description:"Le monete sono state aggiunte con successo al tuo account! Ora puoi usarle per sbloccare funzionalità esclusive."},pending:{type:"In Attesa",title:"Elaborazione Pagamento…",description:"Attendere mentre confermiamo il tuo pagamento. Puoi controllare i progressi più recenti nello storico ricariche in qualsiasi momento."},failed:{type:"Fallito",title:"Pagamento Fallito",description:"Sfortunatamente, questo pagamento non è stato completato. Puoi stare tranquillo che non ti abbiamo addebitato nulla. Riprova."}}},navbar:{search:{placeholder:"Cercare"},login:{title:"Accedi",notification:{title:"Suggerimento",message:"Metodo di accesso non ancora disponibile"}},download:{title:"Scarica",dialog:{title:"Scarica APP",subtitle:"Scarica l'app per cercare tra oltre 20 milioni di personaggi."}},checkIn:{title:"Registrazione"},joinFree:{title:"Iscriviti Gratis"}},sidebar:{today:"OGGI",yesterday:"IERI",other:"ALTRO",footer:{affiliate:"Affiliato",support:"Supporto"}},contactUs:{email:"Email",youtube:"Youtube",facebook:"Facebook",whatsapp:"WhatsApp",telegram:"Telegram",instagram:"Instagram",discord:"Discord"},loading:{title:"Caricamento..."},noData:{title:"È un po' tranquillo qui..."},home:{more:"Vedi Tutto",faq:{title:"Domande Frequenti"},banner:{slide1:{title:"La Tua Storia Inizia Qui",description:"Sblocca Conversazioni Infinite",buttonText:"Inizia a Chattare Ora"},slide2:{title:"Trova il Tuo Personaggio Perfetto",description:"Esplora personaggi popolari selezionati per te",buttonText:"Esplora Ora"},slide3:{title:"Costruisci il Tuo Profilo",description:"Personalizza le preferenze e mantieni i progressi sincronizzati",buttonText:"Vai al Centro"}},all:"Tutti"},characterTabs:{recommend:"Consigliato",trending:"Tendenze",topRated:"Più Votati",popular:"Popolari",latest:"Ultimi"},characterChat:{sendInputPlaceholder:"Digita il tuo messaggio...",openingPopoverTitle:"Prova a rispondere",copyMessage:"Copia Messaggio",deleteMessage:"Elimina Messaggio",reportMessage:"Segnala Messaggio",copySuccess:"Copiato negli appunti",copyFailed:"Copia fallita",noCopyContent:"Nessun contenuto da copiare",sendTooFrequent:"Invio troppo frequente, riprova più tardi",messageTooLong:"La lunghezza del messaggio non può superare i 200 caratteri",sendFailed:"Invio fallito, riprova",openingSuggestions:{careerChange:"Sto pensando di cambiare carriera verso la tecnologia. Cosa ne pensi delle prospettive di questo settore?",tellMore:"Interessante! Potresti dirmi di più sulla tua esperienza nella strategia di marketing?",professionalAdvice:"Mi sento un po' bloccato nel mio ruolo attuale. Qualche consiglio su come avanzare professionalmente?"},chatUser:{collect:"Raccogli",collected:"Raccolto",profile:"Profilo",share:"Condividi"},chatHeader:{status:{online:"Online",offline:"Offline",typing:"Sta scrivendo...",sendingPhoto:"invio di una foto",living:"In diretta"}}},interact:{actionTrigger:"Attiva",actionSend:"Invia",heat:"Calore di interazione con lei",liveRoomGuide:{description:"Invia regali per sbloccare performance interattive esclusive!",action:"Invia"},blockingDialog:{title:"Tutto ciò che hai sempre sognato...",previewPrefix:"Ecco un'anteprima dello ",previewHighlight:"Show esclusivo di prova.",previewSuffix:" Invia regali premium per sbloccare di più.",action:"Sblocca ora"},giftPanel:{sendGift:"Invia regalo",recharge:"Ricarica",more:"Altro",gift:"Regalo",sort:"Ordina",close:"Chiudi"},sceneSwitch:{guide:"Tocca qui per esplorare altre scene.",button:"Cambia\nscena",shortButton:"Scena",title:"Cambia scena",subtitle:"Fai clic per passare a un'altra scena live.",switching:"Cambio in corso...",close:"Chiudi",current:"Attuale",price:"Sblocca con {price} monete",payInsufficient:"Monete insufficienti. Ricarica e riprova.",payNeedsConfirm:"Questa scena richiede la conferma del pagamento. Riprova.",payFailed:"Impossibile sbloccare questa scena. Riprova."},floatingNotice:{sent:"ha inviato",requested:"ha richiesto"},mobileMenu:{muteLabel:"Silenzia",unmuteLabel:"Riattiva audio",showMenu:"Mostra menu",hideMenu:"Nascondi menu",muteToast:"Audio disattivato",unmuteToast:"Audio riattivato"},fallbackReply:{feeling:"Come ti senti adesso?",anywhere:"Se potessi essere ovunque ora, dove saresti?",mind:"Mi piacerebbe sapere a cosa hai pensato di recente."},defaultNames:{action:"Azione",gift:"Regalo",character:"Personaggio"},loading:{title:"Attendere prego...",subtitle:"{name} si sta preparando."},stayReward:{title:"Premi permanenza",surpriseTitle:"Ricompense a sorpresa!",freeGiftHint:"Un regalo gratuito ti sta aspettando",subtitle:"Resta nella stanza per sbloccare i premi.",durationMinutes:"{minutes} min",coinRange:"{min}-{max} monete",coinFixed:"{amount} monete",giftReward:"Regalo x{quantity}",expireHours:"valido {hours} h",expireSoon:"In scadenza",stateClaimed:"Riscattato",stateClaimable:"Riscatta",stateInProgress:"In corso",stateLocked:"Bloccato",countdownLabel:"Prossimo premio tra",claim:"Riscatta",claiming:"Riscatto...",claimed:"Riscattato",claimEmpty:"Nessuna ricompensa questa volta. I tuoi progressi continuano.",resultConfirm:"Ho capito",resultCongrats:"Congratulazioni!",resultSummary:"Hai ricevuto {coins} monete e {gifts} regali",resultSummaryCoinsOnly:"Hai ricevuto {coins} monete",resultSummaryGiftsOnly:"Hai ricevuto {gifts} regali",resultGotIt:"Ho capito",resultCoinLabel:"Monete",resultGiftLabel:"Regali",guestTip:"Accedi per iniziare ad accumulare premi permanenza.",close:"Chiudi",entryLabel:"Premi permanenza",countdownNotReady:"Ricompensa in arrivo"},a11y:{avatarBackground:"Sfondo avatar",showMenu:"Mostra menu",fire:"Fuoco",up:"Su",send:"Invia",gift:"Regalo",chat:"Chat",coin:"Moneta",recharge:"Ricarica"}},chatInput:{placeholder:"Scrivi il tuo messaggio..."},chatDeletePopover:{deleteChat:"Elimina",hide:"Nascondi"},clearChat:{title:"Cancellare questa chat?",message:"Tutti i messaggi in questa chat verranno eliminati definitivamente.",clear:"Cancella",clearing:"Cancellazione...",clearChat:"Cancella Chat"},footer:{privacyPolicy:"Informativa sulla Privacy",termsService:"Termini di Servizio",content:"Scopri la prossima generazione di compagnia AI. OnlyGF ti porta conversazioni autentiche, connessioni emotive e una comunità di amici AI che ti capiscono e crescono con te.",desc:"© 2025 OnlyGF. Tutti i diritti riservati.",features:"Funzionalità",popular:"Popolare",chat:"Chat",createCharacter:"Crea Personaggio",myCollection:"La mia collezione",myAI:"La mia IA",legalSupport:"Legale e supporto",termsAndPolicies:"Termini e politiche"},legalInformation:{pageTitle:"Informazioni legali",items:{termsService:"Termini di servizio",privacyNotice:"Informativa sulla privacy",subscriptionPolicy:"Politica di abbonamento",cookiesNotice:"Informativa sui cookie",underagePolicy:"Politica per i minori",contentRemovalPolicy:"Politica di rimozione dei contenuti",blockedContentPolicy:"Politica sui contenuti bloccati",dmcaPolicy:"Politica DMCA",complaintPolicy:"Politica sui reclami",exemption2257:"Esenzione 18 U.S.C. 2257",communityGuidelines:"Linee guida della community",affiliateTerms:"Termini e condizioni di affiliazione"}},languageDialog:{title:"Selezione Lingua",desc:"Seleziona la tua lingua di visualizzazione"},dialogUploadAvatar:{title:"Scegli il Tuo Avatar",desc:"Troviamo un look che sia totalmente te. Le prime impressioni contano!",save:"Salva"},dialogShare:{title:"Condividi",desc:"Copia il link o condividi direttamente, gli amici possono iniziare a chattare istantaneamente.",copy:"Copia link",success:"Link copiato negli appunti",error:"Impossibile copiare il link, riprova"},dialogReport:{title:"Segnala",desc:"Seleziona un motivo",list:{sexuallyExplicit:"Contenuto sessualmente esplicito",hateSpeech:"Incitamento all'odio o molestie",suicideSelfInjury:"Suicidio o autolesionismo",violenceThreats:"Violenza o minacce",falseInformation:"Informazioni false",spamFraud:"Spam o frode",privacyViolation:"Violazione della privacy",harmfulMinors:"Dannoso per i minori",other:"Altro"},other:{title:"Descrizione",placeholder:"Per favore descrivi il problema..."},submit:"Invia"},dialogDownload:{title:"Scarica",desc:"Scarica l'app per cercare tra oltre 20 milioni di personaggi.",toast:"Prossimamente"},dialogCoinInsufficient:{title:"Sblocca il Prossimo Messaggio",liveTitle:"Monete insufficienti",desc:"Hai finito le monete per continuare questa chat. Ricarica il tuo saldo per sbloccare più risposte.",message:"Messaggi",balance:"Saldo",coins:"Monete",button:"Ottieni Più Monete",notEnoughCoins:"Monete insufficienti",transactionHistory:"Cronologia transazioni >>",chooseHowToContinue:"Scegli come continuare",oneTime:"Acquisto singolo",subscription:"Abbonamento",topUpPack:"Pacchetto ricarica",perMonth:"/mese",withMembershipAlsoGet:"Con l'abbonamento ottieni anche",seeAllPerks:"Vedi tutti i vantaggi >>",subscribeNow:"Abbonati ora {money}",topUp:"Ricarica {money}",moreOptions:"Altre opzioni? Vai al centro ricariche",bestValue:"Miglior valore",topPick:"Scelto dal 99% degli utenti",quote:"“ Questo è solo per chi mi capisce davvero… ti sto aspettando qui.”",cancelAnytime:"Annulla quando vuoi · gestisci via App Store",guideWait:"Aspetta!",guideDesc:"Sta per inviarti un video piccante…",guideQuestion:"Vuoi vederlo?",guideViewNow:"Guarda ora"},dialogRegisterGuide:{title:"Vuoi continuare a parlare?",desc:"Crea un account gratuito per continuare a chattare e sbloccare tutte le funzionalità!",benefit1:"Conversazioni illimitate",benefit2:"Salva la cronologia delle chat",benefit3:"Accesso a tutti i personaggi",signUp:"Registrati",later:"Forse Dopo"},registerGuideMessage:{text:"Vuoi continuare a parlare? Crea semplicemente un account gratuito! Registrati ora per messaggi bonus—non vedo l'ora di continuare!",button:"Registrati per chattare"},dialogPhotoUnlock:{title:"Sblocca Foto",desc:"Sblocca questa foto per vedere il contenuto completo",balance:"Il Tuo Saldo",button:"Sblocca Ora",getMore:"Ottieni Più Monete",insufficientBalance:"Saldo Insufficiente",unlocking:"Sbloccando...",unlockSuccess:"Foto sbloccata con successo",unlockFailed:"Impossibile sbloccare la foto"},photoRequest:{buttonTitle:"Richiedi una foto",selectType:"Seleziona il tipo di foto:",requestFailed:"Impossibile richiedere la foto",sendMePhoto:"Mandami una foto",noMorePhotos:"Non ci sono più foto disponibili",poses:{random:"Casuale",selfie:"Selfie",posing:"In posa",sitting:"Seduta",kneeling:"In ginocchio",squatting:"Accovacciata",standing:"In piedi",prone:"Sdraiata"},vipGuide:{title:"Sblocca Pose Foto VIP",description:"Abbonati per sbloccare pose foto esclusive e richiedere la posa che desideri.",buttonText:"Sblocca VIP Ora"}},dialogLogout:{title:"Disconnettersi?",desc:"Sei sicuro di volerti disconnettere?",desc2:"Dovrai accedere nuovamente per accedere al tuo account.",confirm:"Disconnetti"},dialogLogin:{title:"Accedi / Registrati",subtitle:"Chatta con oltre 20 milioni di ragazze",continueWith:"Continua con {method}",google:"Google",apple:"Apple",facebook:"Facebook",line:"Line",guest:"Ospite",desc:"Accetto di ricevere offerte speciali, comunicazioni di marketing e aggiornamenti del servizio via e-mail.",sub:"Confermo di avere",age:"18+",agreementPrefix:"accettare i",termsOfService:"Termini di Servizio",and:"e",privacyPolicy:"l'Informativa sulla Privacy",or:"o",emailPlaceholder:"Indirizzo e-mail",continueWithEmail:"Continua con Email",verifyTitle:"Verifica la tua email",verifyDesc:"Abbiamo inviato un codice di verifica a 6 cifre a {email}. Apri l'email e inserisci il codice qui sotto per continuare.",confirm:"Conferma",resendCode:"Reinvia codice",resendCountdown:"Reinvia tra {seconds}s",back:"Indietro",invalidEmail:"Inserisci un indirizzo email valido",codeSent:"Codice di verifica inviato",codeSendFailed:"Invio del codice di verifica fallito",codeRequired:"Inserisci il codice di verifica",codeInvalid:"Codice di verifica non valido",promotionHint:"Primo abbonamento <b>-75% OFF</b> Offerta Esclusiva"},dialogCheckin:{title:"Premi Giornalieri",desc:"Registrati per 7 giorni consecutivi per richiedere tutti i premi!",button:"Reclama Premio",claimedToday:"Premio Reclamato Per Oggi",resultTitle:"Premio Reclamato!",resultDesc:"Ti sei registrato per {days} giorni di fila. Continua così!",resultButton:"Ho Capito",daysText:"Giorno {days}"},auth:{loginSuccess:"Login riuscito",loginFailed:"Login fallito, riprova"},person:{edit:"Modifica",follow:"Seguendo",fans:"Follower",createBot:" Bot",sendPost:" Post",followBot:" Bot Seguiti"},common:{noData:"Nessun dato",clickRetry:"Tocca per riprovare",live:"In diretta",report:"Segnala messaggio",reset:"Reimposta",months:{january:"Gennaio",february:"Febbraio",march:"Marzo",april:"Aprile",may:"Maggio",june:"Giugno",july:"Luglio",august:"Agosto",september:"Settembre",october:"Ottobre",november:"Novembre",december:"Dicembre"},submitting:"Invio in corso...",unlockFailed:"È necessario sbloccare l'accesso all'abbonamento"},characterDetail:{online:"Online",chatToMe:"Chatta con Me",collect:"Raccogli",collected:"Raccolto",share:"Condividi",gallery:"Galleria",report:"Segnala",age:"Età",career:"Carriera",height:"Altezza",constellation:"Costellazione",bloodType:"Gruppo Sanguigno",unknown:"Sconosciuto",likeSuccess:"Messo mi piace con successo",unlikeSuccess:"Mi piace rimosso con successo",collectSuccess:"Raccolto con successo",uncollectSuccess:"Collezione annullata con successo",likeFailed:"Impossibile mettere mi piace, riprova",collectFailed:"Impossibile raccogliere, riprova",networkError:"Errore di rete, riprova",reportSuccess:"Segnalazione inviata con successo, la processeremo il prima possibile",reportFailed:"Impossibile inviare la segnalazione, riprova"},langSelect:{message:{success:"Lingua cambiata con successo!"}},userCenter:{title:"Informazioni Personali",username:"Nome Utente",usernamePlaceholder:"AlexOnlyGF",usernameHelper:"Inserisci 3-25 caratteri, sono consentiti lettere, emoji, numeri e trattini bassi. Il nome utente deve essere unico.",profile:"Profilo (Opzionale)",profilePlaceholder:"Completa la tua biografia per far conoscere meglio te stesso agli altri",save:"Salva",saving:"Salvataggio...",saveSuccess:"Salvato con successo",saveFailed:"Impossibile salvare, riprova",editProfile:"Modifica Profilo",collections:"Collezioni",likes:"Mi piace",logout:"Disconnetti",logoutConfirm:"Sei sicuro di volerti disconnettere?",downloadApp:"Scarica APP",language:"Lingua",privacyPolicy:"Informativa sulla Privacy",termsOfUse:"Termini di Utilizzo",contactUs:"Contattaci",support:"Supporto",supportDesc:"Siamo qui per te 24/7",premiumTitle:"OnlyGF Premium",premiumDesc:"Sblocca tutti gli show e {coins} monete bonus ogni mese",myBalance:"Il mio saldo",recharge:"Ricarica",currentSubscription:"Abbonamento attuale",daysLeft:"Giorni rimasti"},download:{googlePlay:{name:"Google Play",description:"Ottieni l'app ufficiale per aggiornamenti sicuri e senza interruzioni e nuovi compagni.",subtitle:"SCARICA SU"},appStore:{name:"App Store",description:"Goditi un'esperienza di chat privata e coinvolgente ottimizzata per il tuo iPhone.",subtitle:"Scarica"},androidApk:{name:"Android APK",description:"Installa direttamente per la massima privacy, accesso istantaneo e gli ultimi aggiornamenti.",subtitle:"Scarica"},webApp:{name:"Web APP",description:"Chatta istantaneamente da qualsiasi browser: non è necessaria alcuna installazione. La tua fuga privata ti aspetta.",subtitle:"Installa"}},premiumPhotoUnlock:{vipUnlock:"Puoi sbloccare",vipMark:"VIP",proMark:"Pro"},photoGallery:{photoCount:"{current}/{total}",prevPhoto:"Precedente",nextPhoto:"Successivo"},dialogVideoUnlock:{title:"Sblocca Video",desc:"Sblocca questo video per guardare il contenuto completo",button:"Sblocca Ora",balance:"Il Tuo Saldo",insufficientBalance:"Saldo Insufficiente",getMore:"Ottieni Più Monete",unlocking:"Sbloccando...",unlockSuccess:"Video sbloccato con successo",unlockFailed:"Impossibile sbloccare il video"},upgradablePhoto:{unlockMoment:"Sblocca il momento",upgrading:"Aggiornamento...",upgradeSuccess:"Aggiornato a video",upgradeFailed:"Impossibile aggiornare"},dialogWebViewGuide:{title:"Apri nel browser",desc:"L'accesso con Google non è supportato nei browser integrati nelle app. Copia il link e aprilo nel browser di sistema (Chrome/Safari) per completare l'accesso.",currentUrl:"URL della pagina corrente",copyLink:"Copia link",copied:"Link copiato",copyFailed:"Copia fallita, copia manualmente",steps:{step1:"Clicca il pulsante sopra per copiare il link",step2:"Apri il browser di sistema (Chrome/Safari)",step3:"Incolla il link e visita per completare l'accesso"}},emailChat:{openEmailChat:"Apri chat email",connectViaEmail:"Connetti via email",enterEmailTitle:"Inserisci l'email per ricevere lettere",receiveYourFirstLetter:"Ricevi la tua prima lettera",receiveLetter:"Ricevi lettera",startEmailChatWith:"Inizia chat via email con {botName}",letterWillBeSent:"La lettera verrà inviata alla tua email a breve!",description:"Vuoi ricevere lettere scritte solo per te, oltre alla chat? Una volta abilitato, arriveranno nella tua casella di posta, continuando la tua storia come se fossero una parte reale della tua vita.",emailPlaceholder:"Indirizzo email",sendNow:"Invia ora",emailChatStartedWith:"Chat email iniziata con {botName}",switchToBot:"Passa a {botName}",receiveLetterAt:"Ricevi lettera",tips:"Suggerimenti:",tipsContent:"Lei ti scriverà in modo proattivo e risponderà alle tue lettere. È privato, a ritmo lento ed esclusivamente per voi due.",invalidEmail:"Inserisci un indirizzo email valido",enableSuccess:"Chat email abilitata con successo",disableSuccess:"Chat email disabilitata con successo",updateEmailSuccess:"Email aggiornata con successo",switchBotSuccess:"Passaggio al nuovo personaggio riuscito",enableFailed:"Impossibile abilitare la chat email",disableFailed:"Impossibile disabilitare la chat email",updateEmailFailed:"Impossibile aggiornare l'email",switchBotFailed:"Impossibile cambiare personaggio",disableConfirmTitle:"Chiudere la chat email?",disableConfirmMessage:"Non riceverai più lettere da questo personaggio.",switchBotConfirmTitle:"Cambiare personaggio?",switchBotConfirmMessage:"Cambiare chat email da {fromBot} a {toBot}?",updateEmail:"Aggiorna email",enterNewEmail:"Inserisci il nuovo indirizzo email",firstLetterTriggered:"La tua prima lettera è in arrivo!",firstLetterFailed:"Invio della prima lettera fallito",verifyTitle:"Verifica email",verifyDesc:"Codice di verifica inviato a {email}",codeRequired:"Inserisci il codice a 6 cifre",codeInvalid:"Codice non valido o scaduto",codeSent:"Codice inviato",codeSendFailed:"Invio del codice non riuscito",confirm:"Conferma",resendCode:"Reinvia",resendCountdown:"Reinvia tra {seconds}s"},emailCallback:{verifying:"Verifica del tuo link...",success:"Successo!",redirectingToChat:"Reindirizzamento alla chat...",oops:"Ops!",redirectingIn:"Reindirizzamento alla homepage tra {seconds}s...",goHomeNow:"Vai subito alla homepage",invalidLink:"Link non valido",linkExpired:"Il link è scaduto. Torna alla tua email e clicca di nuovo.",linkInvalid:"Link non valido",linkUsed:"Il link non è più valido",userNotFound:"Utente non trovato",networkError:"Errore di rete, riprova"},profileComplete:{title:"Benvenuto su {appName}!",subtitle:"Raccontaci di più per un'esperienza personalizzata migliore",nicknameLabel:"Qual è il tuo nome?",nicknamePlaceholder:"Inserisci un nickname figo",nicknameRequired:"Inserisci il tuo nickname",genderLabel:"Quale pronome usi?",genderHint:"(Il genere non può essere modificato una volta selezionato.)",birthdayLabel:"Il tuo compleanno?",birthdayPlaceholder:"GG/MM/AAAA",birthdayRequired:"Seleziona il tuo compleanno",birthdayUnderAge:"Devi avere almeno 18 anni",submitButton:"Inizia il mio viaggio!",genderRequired:"Seleziona il tuo genere",submitSuccess:"Profilo completato con successo!",submitFailed:"Invio fallito, riprova",genderOptions:{male:"Lui",female:"Lei",other:"Loro"}},seo:{description:{characterList:"Sfoglia tutti i personaggi IA su {appName}. Trova il tuo compagno IA ideale per interazioni dal vivo, chat e narrazione.",characterSearch:"Cerca personaggi IA su {appName}. Scopri compagni IA per nome, tag o interesse e inizia subito a chattare.",characterDetail:"Interagisci con {name} in un AI Chat immersivo su {appName}. Inizia subito a chattare con AI Girlfriends.",characterInteract:"Vivi l'interazione dal vivo con compagni IA su {appName}. Streaming IA in tempo reale e compagnia virtuale immersiva.",characterChat:"Interagisci con personaggi IA in un AI Chat immersivo su {appName}. Inizia subito a chattare con le AI Girlfriends.",chatHistory:"Rivedi la cronologia delle chat IA su {appName} e continua le conversazioni con i tuoi compagni IA preferiti.",userCenter:"Gestisci il tuo profilo {appName}, le collezioni e le impostazioni dell'account nel centro utente.",rechargeCenter:"Ricarica monete e abbonati su {appName}. Sblocca chat IA premium, interazioni dal vivo e contenuti esclusivi.",webTutorial:"Impara a usare {appName} con il nostro tutorial web. Consigli per chat IA, interazioni dal vivo e per ottenere il massimo dal tuo compagno IA.",contactUs:"Contatta {appName} per supporto, partnership e richieste sui prodotti relativi alle esperienze con compagni IA.",privacyPolicy:"Leggi l'Informativa sulla privacy di {appName} per sapere come raccogliamo, utilizziamo e proteggiamo i tuoi dati personali.",termsService:"Leggi i Termini di servizio di {appName} che regolano l'uso della nostra piattaforma di compagni IA."},characterDetail:{titlePrefix:"Profilo del personaggio",age:"Età",career:"Professione",height:"Altezza",constellation:"Segno",aiGirlfriend:"AI Girlfriend",descriptionTemplate:"Interagisci con {name} in un AI Chat immersivo su {appName}. Inizia subito a chattare con AI Girlfriends."},chat:{titleTemplate:"Chatta con {name}—AI Girlfriend{'|'}{appName}",descriptionTemplate:"Interagisci con {name} in un AI Chat immersivo su {appName}. Inizia subito a chattare con le AI Girlfriends."},interact:{titleTemplate:"{name}: canale in diretta— Storia di interazione IA in diretta,Compagni virtuali {'|'} {appName}",descriptionTailTemplate:"{name} Video in diretta+Inizia subito l'interazione in diretta con AI Girlfriends."}},cookieConsent:{title:"Rispettiamo La Tua Privacy",description:"Per offrirti la migliore esperienza, utilizziamo i cookie per funzionalità essenziali, contenuti personalizzati, marketing e analisi.",learnMore:"Scopri di più",accept:"Accetta",deny:"Rifiuta"},resetChat:{title:"Reimposta chat",message:"Reimpostare la conversazione e tutti i ricordi con questo personaggio? La chat tornerà allo stato iniziale.",clear:"Reimposta",clearing:"Reimpostazione…"},callVideoPicker:{title:"Aggiungi video salvato",empty:"Nessun video salvato per questo personaggio.",select:"Usa questo video",error:"Caricamento o salvataggio non riuscito. Riprova."}},[Ul.RO]:{errorPage:{page404:{oops:"HOPA!",headline:"Webmaster-ul spune că nu puteți accesa această pagină...",info:"Vă rugăm să verificați dacă URL-ul introdus este corect sau faceți clic pe butonul de mai jos pentru a reveni la pagina principală.",backToHome:"Înapoi la pagina principală",allRightsReserved:"Toate drepturile rezervate"},page401:{oops:"Hopa!",noPermission:"Nu aveți permisiunea de a accesa această pagină",contactLeader:"Dacă nu sunteți mulțumit, vă rugăm să contactați superiorul dvs.",orYouCan:"Sau puteți merge la:",backHome:"Înapoi la pagina principală",browse:"Doar răsfoiți",viewImage:"Faceți clic pentru a vizualiza imaginea",back:"Înapoi",gifSource:"sursa gif",randomView:"Vizualizare aleatorie"},ipAccess:{title:"Acces Restricționat",description:"Ne pare rău, acest serviciu nu este disponibil în regiunea dvs.",tips:"Din cauza reglementărilor și acordurilor locale, acest site web nu este disponibil în regiunea dvs. geografică."}},route:{premium:"Premium",home:"Explorează",characterList:"Lista de personaje",characterSearch:"Căutare personaje",characterDetail:"Detalii personaj",characterChat:"Chat cu personajul",chatHistory:"Chat",userCenter:"Centrul utilizatorului",userCenterEdit:"Informații personale",rechargeCenter:"Centrul de reîncărcare",contactUs:"Contactați-ne",characterCollections:"Colecții",characterLiked:"Apreciate",rechargeHistory:"Istoricul reîncărcărilor",legalInformation:"Informații juridice",underagePolicy:"Politica pentru minori",subscriptionPolicy:"Politica abonamentului",exemption2257:"Excepția 18 U.S.C. 2257",dmcaPolicy:"Politica DMCA",blockedContentPolicy:"Politica privind conținutul blocat",contentRemovalPolicy:"Politica de eliminare a conținutului",complaintPolicy:"Politica de reclamații"},rechargeHistory:{title:"Istoric Tranzacții",tabs:{deposits:"Reîncărcări",expenses:"Cheltuieli"},expense:{chatWith:"Chat cu {name}",unlockedVideo:"Video privat deblocat al lui {name}",unlockedPhoto:"Fotografie privată deblocată a lui {name}",upgradeVideo:"Actualizează video",sendGifts:"Cheltuială de interacțiune intimă: {name}",other:"Altă cheltuială"}},rechargeCenter:{tabs:{subscribe:"Abonament",coins:"Monede"},premium:{title:"Abonament",choosePlan:"Alegeți planul dvs.",anonymous:"100% anonim. Puteți anula oricând.",countdown:{hours:"Ore",minutes:"minute",seconds:"secunde"},limitedOffer:"OFERTĂ LIMITATĂ",discount:"Până la 75% reducere pentru abonamentul dvs.",plans:{yearly:"12 luni",quarterly:"3 luni",monthly:"1 lună",perMonth:"/lună"},currentSubscription:{label:"Abonament curent",daysLeft:"Zile rămase",renewsOn:"Se reînnoiește pe {date}"},subscribeTypes:{none:"Fără abonament",weekly:"Săptămânal",monthly:"Lunar",quarterly:"Trimestrial",annual:"Anual",planText:"Plan {type}"},badges:{bestChoice:"CEA MAI BUNĂ ALEGERE"},security:{noAdultTransaction:"Fără tranzacții pentru adulți în extrasul dvs. bancar",noHiddenFees:"Fără taxe ascunse + Anulați abonamentul oricând",statementCharge:"Plata apare ca '{appName}' în extrasul dvs. bancar",cancelAnytime:"Anulați abonamentul oricând din setări"},agreement:{iAgree:"Sunt de acord cu",termsOfService:"Termenii serviciului",and:"și",subscriptionPolicy:"Politica abonamentului"},subscribe:"Abonați-vă",subscribed:"Abonat",upgrade:"Actualizează",errors:{alreadySubscribed:"Ai deja un abonament activ."},vipGuide:{title:"Deblocheaza privilegii exclusive",description:"Ridica-ti experienta cu cel mai elitist nivel de conexiune si continut premium.",discountTag:"40% RED",button:"Treci la Premium",benefits:{exclusivePrivateShows:"Spectacole Private Exclusive & Videoclipuri și Imagini",premiumTipMenu:"Meniu Bacșișuri Premium",emotionalChatModel:"Model AI de chat cu emotii mai bogate",betterMemory:"Memorie mai buna in fiecare interactiune",welfareImages:"Deblocheaza imagini bonus actualizate periodic",posePrivilege:"Deblocheaza privilegii pentru pozitii speciale",liveChatPrivilege:"Privilegii de chat in camera live",monthlyFreeCoins:'<span style="color: #ff007f; font-weight: bold;">{coins}</span> monede gratuite in fiecare luna'}},paymentPending:{alt:"Plată în curs",title:"Plată în curs",description:"Plata dvs. este în curs de procesare. După verificare, contul dvs. va fi actualizat automat la Premium. Acest lucru poate dura câteva minute.",button:"Am înțeles"},benefits:{title:"Beneficii Premium",createAI:"Creați-vă propria prietenă AI",unlimitedMessages:"Mesaje text nelimitate",freeTokens:"Obțineți 100 jetoane GRATUITE / lună",removeBlur:"Eliminați blur-ul din imagini",generateImages:"Generați imagini",phoneCalls:"Efectuați apeluri AI",fastResponse:"Timp de răspuns rapid",prioritySupport:"Asistență clienți prioritară",exclusiveCharacters:"Acces la personaje exclusive",advancedCustomization:"Personalizare avansată a personalității"}},coins:{title:"Monede",currentCoins:"Monede curente",description:{title:"Descrierea monedelor",subtitle:"Monedele sunt moneda virtuală a universului! Cu mai multe monede, experiența ta de chat poate fi și mai grozavă:"},security:{antivirusSecuredLine1:"Antivirus",antivirusSecuredLine2:"securizat",privacyBankStatementLine1:"Confidențialitate în extrasul",privacyBankStatementLine2:"bancar"},badges:{discount:"REDUCERE {percent}%"},features:{heartWhisper:"Mesaj de chat",inspirationReply:"Răspuns inspirațional",premiumChat:"Cadouri speciale",specialGifts:"Cumpără videoclip animat"},history:{title:"Istoricul reîncărcărilor",item:{title:"Monede",conisNum:"+ {num} monede",orderId:"ID comandă: {id}"}}}},order:{status:{completed:{type:"Finalizat",title:"Plată reușită",description:"Monedele au fost adăugate cu succes în contul dvs.! Acum le puteți folosi pentru a debloca funcții exclusive."},pending:{type:"În așteptare",title:"Procesăm plata…",description:"Vă rugăm să așteptați în timp ce confirmăm plata dvs. Puteți verifica progresul cel mai recent în istoricul reîncărcărilor oricând."},failed:{type:"Eșuat",title:"Plată eșuată",description:"Din păcate, această plată nu a putut fi finalizată. Fiți sigur că nu v-am taxat. Vă rugăm să încercați din nou."}}},navbar:{search:{placeholder:"Căutare"},login:{title:"Conectare",notification:{title:"Sfaturi",message:"Metoda de conectare nu este încă disponibilă"}},download:{title:"Descărcare",dialog:{title:"Descărcați APP",subtitle:"Descărcați aplicația pentru a căuta printre peste 20 de milioane de personaje."}},checkIn:{title:"Înregistrare"},joinFree:{title:"Alătură-te Gratuit"}},sidebar:{today:"ASTĂZI",yesterday:"IERI",other:"ALTELE",footer:{affiliate:"Afiliat",support:"Asistență"}},contactUs:{email:"Email",youtube:"Youtube",facebook:"Facebook",whatsapp:"WhatsApp",telegram:"Telegram",instagram:"Instagram",discord:"Discord"},loading:{title:"Se încarcă..."},noData:{title:"Puțin pustiu pe aici..."},home:{more:"Vezi tot",faq:{title:"Întrebări frecvente"},banner:{slide1:{title:"Povestea ta începe aici",description:"Deschide conversații nelimitate",buttonText:"Începe chatul acum"},slide2:{title:"Găsește personajul tău perfect",description:"Explorează personaje populare selectate pentru tine",buttonText:"Explorează acum"},slide3:{title:"Construiește-ți profilul",description:"Personalizează preferințele și sincronizează progresul",buttonText:"Mergi la centru"}},all:"Toate"},characterTabs:{recommend:"Recomandat",trending:"În tendințe",topRated:"Cele mai bine cotate",popular:"Populare",latest:"Cele mai recente"},characterChat:{sendInputPlaceholder:"Tastați mesajul dvs...",openingPopoverTitle:"Încercați să răspundeți",copyMessage:"Copiați mesajul",deleteMessage:"Ștergeți mesajul",reportMessage:"Raportați mesajul",copySuccess:"Copiat în clipboard",copyFailed:"Copierea a eșuat",noCopyContent:"Nu există conținut de copiat",sendTooFrequent:"Trimiteți prea des, vă rugăm să încercați din nou mai târziu",messageTooLong:"Lungimea mesajului nu poate depăși 200 de caractere",sendFailed:"Trimiterea a eșuat, vă rugăm să încercați din nou",openingSuggestions:{careerChange:"Mă gândesc la o schimbare de carieră în tehnologie. Ce părere aveți despre perspectivele acestei industrii?",tellMore:"Interesant! Puteți să-mi spuneți mai multe despre experiența dvs. în strategia de marketing?",professionalAdvice:"Mă simt blocat în rolul meu actual. Aveți sfaturi despre cum să progresez profesional?"},chatUser:{collect:"Colecție",collected:"Colecționat",profile:"Profil",share:"Distribuie"},chatHeader:{status:{online:"Online",offline:"Offline",typing:"Scrie...",sendingPhoto:"trimitere fotografie",living:"În direct"}}},interact:{actionTrigger:"Declanșează",actionSend:"Trimite",heat:"Nivelul de interacțiune cu ea",liveRoomGuide:{description:"Trimite cadouri pentru a debloca spectacole interactive exclusive!",action:"Trimite"},blockingDialog:{title:"Tot ceea ce ai visat...",previewPrefix:"Iată o previzualizare a ",previewHighlight:"show-ului exclusiv Try-On.",previewSuffix:" Trimite cadouri premium pentru a debloca mai mult.",action:"Deblochează acum"},giftPanel:{sendGift:"Trimite cadou",recharge:"Reîncarcă",more:"Mai mult",gift:"Cadou",sort:"Sortează",close:"Închide"},sceneSwitch:{guide:"Apasă aici pentru a explora mai multe scene.",button:"Schimbă\nscena",shortButton:"Scenă",title:"Schimbă scena",subtitle:"Apasă pentru a trece la o altă scenă live.",switching:"Se schimbă...",close:"Închide",current:"Curentă",price:"Deblochează cu {price} monede",payInsufficient:"Monede insuficiente. Reîncarcă și încearcă din nou.",payNeedsConfirm:"Această scenă necesită confirmarea plății. Încearcă din nou.",payFailed:"Nu s-a putut debloca această scenă. Încearcă din nou."},floatingNotice:{sent:"a trimis",requested:"a solicitat"},mobileMenu:{muteLabel:"Mut",unmuteLabel:"Activează sunetul",showMenu:"Afișează meniul",hideMenu:"Ascunde meniul",muteToast:"Sunet oprit",unmuteToast:"Sunet pornit"},fallbackReply:{feeling:"Cum te simți acum?",anywhere:"Dacă ai putea fi oriunde acum, unde ai fi?",mind:"Aș vrea să aud ce ai avut în minte în ultima vreme."},defaultNames:{action:"Acțiune",gift:"Cadou",character:"Personaj"},loading:{title:"Te rugăm să aștepți...",subtitle:"{name} se pregătește."},stayReward:{title:"Recompense de prezență",surpriseTitle:"Recompense surpriză!",freeGiftHint:"Un cadou gratuit te așteaptă",subtitle:"Rămâi în cameră pentru a debloca recompense.",durationMinutes:"{minutes} min",coinRange:"{min}-{max} monede",coinFixed:"{amount} monede",giftReward:"Cadou x{quantity}",expireHours:"valabil {hours} h",expireSoon:"Expiră curând",stateClaimed:"Revendicat",stateClaimable:"Revendică",stateInProgress:"În curs",stateLocked:"Blocat",countdownLabel:"Următoarea recompensă în",claim:"Revendică",claiming:"Se revendică...",claimed:"Revendicat",claimEmpty:"Nicio recompensă de data aceasta. Progresul tău continuă.",resultConfirm:"Am înțeles",resultCongrats:"Felicitări!",resultSummary:"Ai primit {coins} monede și {gifts} cadouri",resultSummaryCoinsOnly:"Ai primit {coins} monede",resultSummaryGiftsOnly:"Ai primit {gifts} cadouri",resultGotIt:"Am înțeles",resultCoinLabel:"Monede",resultGiftLabel:"Cadouri",guestTip:"Conectează-te pentru a acumula recompense de prezență.",close:"Închide",entryLabel:"Recompense de prezență",countdownNotReady:"Recompensă în curând"},a11y:{avatarBackground:"Fundal avatar",showMenu:"Afișează meniul",fire:"Foc",up:"Sus",send:"Trimite",gift:"Cadou",chat:"Chat",coin:"Monedă",recharge:"Reîncarcă"}},chatInput:{placeholder:"Tastați mesajul dvs..."},chatDeletePopover:{deleteChat:"Șterge",hide:"Ascunde"},clearChat:{title:"Ștergeți acest chat?",message:"Toate mesajele din acest chat vor fi șterse permanent.",clear:"Șterge",clearing:"Se șterge...",clearChat:"Șterge Chat-ul"},footer:{privacyPolicy:"Politica de confidențialitate",termsService:"Termenii serviciului",content:"Descoperă următoarea generație de companioni AI. OnlyGF îți aduce conversații autentice, conexiuni emoționale și o comunitate de prieteni AI care te înțeleg și cresc alături de tine.",desc:"© 2025 OnlyGF. Toate drepturile rezervate.",features:"Caracteristici",popular:"Popular",chat:"Chat",createCharacter:"Creează Personaj",myCollection:"Colecția mea",myAI:"AI-ul meu",legalSupport:"Juridic și suport",termsAndPolicies:"Termeni și politici"},legalInformation:{pageTitle:"Informații juridice",items:{termsService:"Termenii serviciului",privacyNotice:"Notificare de confidențialitate",subscriptionPolicy:"Politica abonamentului",cookiesNotice:"Notificare privind cookie-urile",underagePolicy:"Politica pentru minori",contentRemovalPolicy:"Politica de eliminare a conținutului",blockedContentPolicy:"Politica privind conținutul blocat",dmcaPolicy:"Politica DMCA",complaintPolicy:"Politica de reclamații",exemption2257:"Excepția 18 U.S.C. 2257",communityGuidelines:"Ghidul comunității",affiliateTerms:"Termeni și condiții pentru afiliați"}},languageDialog:{title:"Selectarea limbii",desc:"Alegeți limba de afișare"},dialogUploadAvatar:{title:"Alegeți avatarul dvs.",desc:"Să găsim o imagine care chiar vă reprezintă. Prima impresie contează!",save:"Salvează"},dialogShare:{title:"Distribuie",desc:"Copiați linkul sau distribuiți direct, prietenii pot începe chatul instantaneu.",copy:"Copiați linkul",success:"Link copiat în clipboard",error:"Eșec la copierea linkului, vă rugăm să încercați din nou"},dialogReport:{title:"Raportează",desc:"Selectați motivul",list:{sexuallyExplicit:"Conținut sexual explicit",hateSpeech:"Discurs instigator la ură sau hărțuire",suicideSelfInjury:"Sinucidere sau auto-vătămare",violenceThreats:"Violență sau amenințări",falseInformation:"Informații false",spamFraud:"Spam sau fraudă",privacyViolation:"Încălcarea confidențialității",harmfulMinors:"Dăunător minorilor",other:"Altele"},other:{title:"Descriere",placeholder:"Vă rugăm să descrieți problema..."},submit:"Trimite"},dialogDownload:{title:"Descărcare",desc:"Descărcați aplicația pentru a căuta printre peste 20 de milioane de personaje.",toast:"În curând"},dialogCoinInsufficient:{title:"Deblocați mesajul următor",liveTitle:"Monede insuficiente",desc:"Ați rămas fără monede pentru a continua acest chat. Vă rugăm să reîncărcați soldul pentru a debloca mai multe răspunsuri.",message:"Mesaje",balance:"Sold",coins:"Monede",button:"Obțineți mai multe monede",notEnoughCoins:"Monede insuficiente",transactionHistory:"Istoric tranzacții >>",chooseHowToContinue:"Alege cum să continui",oneTime:"Achiziție unică",subscription:"Abonament",topUpPack:"Pachet de reîncărcare",perMonth:"/lună",withMembershipAlsoGet:"Cu abonamentul obții și",seeAllPerks:"Vezi toate avantajele >>",subscribeNow:"Abonează-te acum {money}",topUp:"Reîncarcă {money}",moreOptions:"Mai multe opțiuni? Mergi la centrul de reîncărcare",bestValue:"Cea mai bună ofertă",topPick:"Ales de 99% dintre utilizatori",quote:"„ Asta e doar pentru cei care mă înțeleg cu adevărat… Te aștept aici.”",cancelAnytime:"Anulează oricând · gestionează prin App Store",guideWait:"Stai!",guideDesc:"E pe punctul să-ți trimită un video fierbinte…",guideQuestion:"Vrei să-l vezi?",guideViewNow:"Vezi acum"},dialogRegisterGuide:{title:"Vrei să continui să vorbești?",desc:"Creează un cont gratuit pentru a continua să conversezi și pentru a debloca toate funcțiile!",benefit1:"Conversații nelimitate",benefit2:"Salvează istoricul conversațiilor",benefit3:"Acces la toate personajele",signUp:"Înregistrează-te",later:"Poate Mai Târziu"},registerGuideMessage:{text:"Vrei să continui să vorbești? Creează doar un cont gratuit! Înregistrează-te acum pentru mesaje bonus—abia aștept să continuăm!",button:"Înregistrează-te pentru a discuta"},dialogPhotoUnlock:{title:"Deblocați Fotografia",desc:"Deblocați această fotografie pentru a vedea conținutul complet",balance:"Soldul Dvs.",button:"Deblocați Acum",getMore:"Obțineți Mai Multe Monede",insufficientBalance:"Sold Insuficient",unlocking:"Se deblochează...",unlockSuccess:"Fotografia a fost deblocată cu succes",unlockFailed:"Nu s-a putut debloca fotografia"},photoRequest:{buttonTitle:"Solicitați o fotografie",selectType:"Selectați tipul de fotografie:",requestFailed:"Nu s-a putut solicita fotografia",sendMePhoto:"Trimite-mi o poză",noMorePhotos:"Nu mai sunt fotografii disponibile",poses:{random:"Aleatoriu",selfie:"Selfie",posing:"Pozând",sitting:"Șezând",kneeling:"În genunchi",squatting:"Ghemuit",standing:"În picioare",prone:"Întinsă"},vipGuide:{title:"Deblochează Pozițiile Foto VIP",description:"Abonează-te pentru a debloca poziții foto exclusive și a cere poziția dorită.",buttonText:"Deblochează VIP Acum"}},dialogLogout:{title:"Deconectare?",desc:"Sunteți sigur că doriți să vă deconectați?",desc2:"Va trebui să vă conectați din nou pentru a accesa contul dvs.",confirm:"Deconectare"},dialogLogin:{title:"Conectare / Înregistrare",subtitle:"Conversați cu peste 20 de milioane de fete",continueWith:"Continuați cu {method}",google:"Google",apple:"Apple",facebook:"Facebook",line:"Line",guest:"Oaspete",desc:"Sunt de acord să primesc oferte speciale, comunicări de marketing și actualizări de servicii prin e-mail.",sub:"Confirm că am",age:"18+",agreementPrefix:"accepta",termsOfService:"Termenii serviciului",and:"și",privacyPolicy:"Politica de confidențialitate",or:"sau",emailPlaceholder:"Adresă de e-mail",continueWithEmail:"Continuați cu Email",verifyTitle:"Verificați-vă e-mailul",verifyDesc:"Am trimis un cod de verificare cu 6 cifre la {email}. Deschideți e-mailul și introduceți codul mai jos pentru a continua.",confirm:"Confirmați",resendCode:"Retrimite codul",resendCountdown:"Retrimite în {seconds}s",back:"Înapoi",invalidEmail:"Introduceți o adresă de e-mail validă",codeSent:"Cod de verificare trimis",codeSendFailed:"Trimiterea codului de verificare a eșuat",codeRequired:"Introduceți codul de verificare",codeInvalid:"Cod de verificare invalid",promotionHint:"Primul abonament <b>-75% OFF</b> Ofertă Exclusivă"},dialogCheckin:{title:"Recompense Zilnice",desc:"Înregistrați-vă timp de 7 zile consecutive pentru a revendica toate recompensele!",button:"Revendicați Recompensa",claimedToday:"Recompensă Revendicată Pentru Astăzi",resultTitle:"Recompensă Revendicată!",resultDesc:"V-ați înregistrat {days} zile la rând. Continuați așa!",resultButton:"Am Înțeles",daysText:"Ziua {days}"},auth:{loginSuccess:"Conectare reușită",loginFailed:"Conectare eșuată, vă rugăm să încercați din nou"},person:{edit:"Editează",follow:"Urmăresc",fans:"Urmăritori",createBot:" Boți",sendPost:" Postări",followBot:" Boți urmăriți"},common:{noData:"Fără date",clickRetry:"Atinge pentru a reîncerca",live:"În direct",report:"Raportați mesajul",reset:"Resetare",months:{january:"Ianuarie",february:"Februarie",march:"Martie",april:"Aprilie",may:"Mai",june:"Iunie",july:"Iulie",august:"August",september:"Septembrie",october:"Octombrie",november:"Noiembrie",december:"Decembrie"},submitting:"Se trimite...",unlockFailed:"Este necesară deblocarea accesului la abonament"},characterDetail:{online:"Online",chatToMe:"Conversează cu mine",collect:"Colecție",collected:"Colecționat",share:"Distribuie",gallery:"Galerie",report:"Raportează",age:"Vârstă",career:"Carieră",height:"Înălțime",constellation:"Constelație",bloodType:"Grupa sanguină",unknown:"Necunoscut",likeSuccess:"Apreciere reușită",unlikeSuccess:"Anulare apreciere reușită",collectSuccess:"Colecționare reușită",uncollectSuccess:"Anulare colecție reușită",likeFailed:"Apreciere eșuată, vă rugăm să încercați din nou",collectFailed:"Colecționare eșuată, vă rugăm să încercați din nou",networkError:"Eroare de rețea, vă rugăm să încercați din nou",reportSuccess:"Raportul a fost trimis cu succes, îl vom procesa cât mai curând posibil",reportFailed:"Trimiterea raportului a eșuat, vă rugăm să încercați din nou"},langSelect:{message:{success:"Limba a fost schimbată cu succes!"}},userCenter:{title:"Informații personale",username:"Nume utilizator",usernamePlaceholder:"AlexOnlyGF",usernameHelper:"Vă rugăm să introduceți 3-25 caractere, litere, emoji, cifre și liniuțe de subliniere sunt permise. Numele de utilizator trebuie să fie unic.",profile:"Profil (Opțional)",profilePlaceholder:"Completați biografia pentru ca alții să vă cunoască mai bine",save:"Salvează",saving:"Se salvează...",saveSuccess:"Salvat cu succes",saveFailed:"Salvare eșuată, vă rugăm să încercați din nou",editProfile:"Editează profilul",collections:"Colecții",likes:"Aprecieri",logout:"Deconectare",logoutConfirm:"Sunteți sigur că doriți să vă deconectați?",downloadApp:"Descărcați APP",language:"Limbă",privacyPolicy:"Politica de confidențialitate",termsOfUse:"Termenii de utilizare",contactUs:"Contactați-ne",support:"Asistență",supportDesc:"Suntem aici pentru dvs. 24/7",premiumTitle:"OnlyGF Premium",premiumDesc:"Deblocați toate show-urile și {coins} de monede bonus lunar",myBalance:"Soldul meu",recharge:"Reîncarcă",currentSubscription:"Abonament curent",daysLeft:"Zile rămase"},download:{googlePlay:{name:"Google Play",description:"Obțineți aplicația oficială pentru actualizări sigure și fără probleme și noi compagnoni.",subtitle:"DESCĂRCAȚI PE"},appStore:{name:"App Store",description:"Bucurați-vă de o experiență de chat privată și captivantă optimizată pentru iPhone-ul dvs.",subtitle:"Descărcare"},androidApk:{name:"Android APK",description:"Instalați direct pentru confidențialitate maximă, acces instantaneu și cele mai recente actualizări.",subtitle:"Descărcare"},webApp:{name:"Web APP",description:"Conversați instantaneu din orice browser — nu necesită instalare. Evadarea dvs. privată vă așteaptă.",subtitle:"Instalare"}},premiumPhotoUnlock:{vipUnlock:"Poți debloca",vipMark:"VIP",proMark:"Pro"},photoGallery:{photoCount:"{current}/{total}",prevPhoto:"Anterior",nextPhoto:"Următor"},dialogVideoUnlock:{title:"Deblochează Video",desc:"Deblochează acest video pentru a viziona conținutul complet",button:"Deblochează Acum",balance:"Soldul Tău",insufficientBalance:"Sold Insuficient",getMore:"Obține Mai Multe Monede",unlocking:"Se deblochează...",unlockSuccess:"Video deblocat cu succes",unlockFailed:"Nu s-a putut debloca video"},upgradablePhoto:{unlockMoment:"Deblochează momentul",upgrading:"Se actualizează...",upgradeSuccess:"Actualizat la video",upgradeFailed:"Nu s-a putut actualiza"},dialogWebViewGuide:{title:"Vă rugăm să deschideți în browser",desc:"Autentificarea Google nu este acceptată în browserele integrate în aplicații. Copiați linkul și deschideți-l în browserul de sistem (Chrome/Safari) pentru a finaliza autentificarea.",currentUrl:"Adresa URL a paginii curente",copyLink:"Copiază linkul",copied:"Link copiat",copyFailed:"Copierea a eșuat, copiați manual",steps:{step1:"Faceți clic pe butonul de mai sus pentru a copia linkul",step2:"Deschideți browserul de sistem (Chrome/Safari)",step3:"Lipiți linkul și vizitați pentru a finaliza autentificarea"}},emailChat:{openEmailChat:"Deschide chat-ul prin e-mail",connectViaEmail:"Conectează-te prin e-mail",enterEmailTitle:"Introduceți e-mailul pentru a primi scrisori",receiveYourFirstLetter:"Primiți prima scrisoare",receiveLetter:"Primește scrisoare",startEmailChatWith:"Începe chat prin e-mail cu {botName}",letterWillBeSent:"Scrisoarea va fi trimisă la e-mailul tău în curând!",description:"Vrei să primești scrisori scrise doar pentru tine, dincolo de chat? Odată activat, vor ajunge în căsuța ta de e-mail, continuând povestea ta ca și cum ar fi o parte reală a vieții tale.",emailPlaceholder:"Adresă de e-mail",sendNow:"Trimite acum",emailChatStartedWith:"Chat prin e-mail început cu {botName}",switchToBot:"Comută la {botName}",receiveLetterAt:"Primește scrisoare",tips:"Sfaturi:",tipsContent:"Ea îți va scrie proactiv și va răspunde la scrisorile tale. Este privat, în ritm lent și exclusiv pentru voi doi.",invalidEmail:"Vă rugăm să introduceți o adresă de e-mail validă",enableSuccess:"Chat-ul prin e-mail a fost activat cu succes",disableSuccess:"Chat-ul prin e-mail a fost dezactivat cu succes",updateEmailSuccess:"E-mailul a fost actualizat cu succes",switchBotSuccess:"Comutat cu succes la noul personaj",enableFailed:"Activarea chat-ului prin e-mail a eșuat",disableFailed:"Dezactivarea chat-ului prin e-mail a eșuat",updateEmailFailed:"Actualizarea e-mailului a eșuat",switchBotFailed:"Comutarea personajului a eșuat",disableConfirmTitle:"Închide chat-ul prin e-mail?",disableConfirmMessage:"Nu vei mai primi scrisori de la acest personaj.",switchBotConfirmTitle:"Comută personajul?",switchBotConfirmMessage:"Comută chat-ul prin e-mail de la {fromBot} la {toBot}?",updateEmail:"Actualizează e-mailul",enterNewEmail:"Vă rugăm să introduceți noua adresă de e-mail",firstLetterTriggered:"Prima ta scrisoare este pe drum!",firstLetterFailed:"Trimiterea primei scrisori a eșuat",verifyTitle:"Verifică e-mailul",verifyDesc:"Cod de verificare trimis la {email}",codeRequired:"Vă rugăm să introduceți codul de 6 cifre",codeInvalid:"Cod invalid sau expirat",codeSent:"Cod trimis",codeSendFailed:"Trimiterea codului a eșuat",confirm:"Confirmă",resendCode:"Retrimite",resendCountdown:"Retrimite în {seconds}s"},emailCallback:{verifying:"Se verifică linkul tău...",success:"Succes!",redirectingToChat:"Redirecționare către chat...",oops:"Ups!",redirectingIn:"Redirecționare către pagina principală în {seconds}s...",goHomeNow:"Mergi la pagina principală acum",invalidLink:"Link invalid",linkExpired:"Linkul a expirat. Te rugăm să te întorci la e-mail și să dai clic din nou.",linkInvalid:"Link invalid",linkUsed:"Linkul nu mai este valid",userNotFound:"Utilizator negăsit",networkError:"Eroare de rețea, te rugăm să încerci din nou"},profileComplete:{title:"Bun venit la {appName}!",subtitle:"Spune-ne mai multe pentru o experiență personalizată mai bună",nicknameLabel:"Care este numele tău?",nicknamePlaceholder:"Introdu un pseudonim cool",nicknameRequired:"Te rugăm să introduci pseudonimul",genderLabel:"Ce pronume folosești?",genderHint:"(Genul nu poate fi schimbat odată selectat.)",birthdayLabel:"Ziua ta de naștere?",birthdayPlaceholder:"ZZ/LL/AAAA",birthdayRequired:"Te rugăm să selectezi ziua de naștere",birthdayUnderAge:"Trebuie să ai cel puțin 18 ani",submitButton:"Începe călătoria mea!",genderRequired:"Te rugăm să selectezi genul",submitSuccess:"Profil completat cu succes!",submitFailed:"Trimitere eșuată, te rugăm să încerci din nou",genderOptions:{male:"El",female:"Ea",other:"Ei"}},seo:{description:{characterList:"Răsfoiește toate personajele AI pe {appName}. Găsește companionul AI ideal pentru interacțiuni live, chat și povești.",characterSearch:"Caută personaje AI pe {appName}. Descoperă companioni AI după nume, etichetă sau interes și începe să conversezi instantaneu.",characterDetail:"Interacționează cu {name} într-un AI Chat imersiv pe {appName}. Începe să conversezi cu AI Girlfriends acum.",characterInteract:"Trăiește interacțiunea live cu companioni AI pe {appName}. Transmisiuni AI în timp real și companie virtuală imersivă.",characterChat:"Interacționează cu personaje AI într-un AI Chat imersiv pe {appName}. Începe să discuți cu AI Girlfriends chiar acum.",chatHistory:"Revizuiește istoricul chat-urilor AI pe {appName} și continuă conversațiile cu companionii AI preferați.",userCenter:"Gestionează profilul {appName}, colecțiile și setările contului în centrul utilizatorului.",rechargeCenter:"Reîncarcă monede și abonează-te pe {appName}. Deblochează chat AI premium, interacțiuni live și conținut exclusiv.",webTutorial:"Învață cum să folosești {appName} cu tutorialul nostru web. Sfaturi pentru chat AI, interacțiuni live și pentru a profita la maximum de companionul AI.",contactUs:"Contactează {appName} pentru asistență, parteneriate și întrebări despre produse privind experiențele cu companioni AI.",privacyPolicy:"Citește Politica de confidențialitate {appName} pentru a afla cum colectăm, utilizăm și protejăm informațiile tale personale.",termsService:"Citește Termenii și condițiile {appName} care reglementează utilizarea platformei noastre de companioni AI."},characterDetail:{titlePrefix:"Profilul personajului",age:"Vârstă",career:"Profesie",height:"Înălțime",constellation:"Zodie",aiGirlfriend:"AI Girlfriend",descriptionTemplate:"Interacționează cu {name} într-un AI Chat imersiv pe {appName}. Începe să conversezi cu AI Girlfriends acum."},chat:{titleTemplate:"Discută cu {name}—AI Girlfriend{'|'}{appName}",descriptionTemplate:"Interacționează cu {name} într-un AI Chat imersiv pe {appName}. Începe să discuți cu AI Girlfriends chiar acum."},interact:{titleTemplate:"{name}: canal live— Poveste de interacțiune AI live,Companioni virtuali {'|'} {appName}",descriptionTailTemplate:"{name} Video live+Începe acum interacțiunea live cu AI Girlfriends."}},cookieConsent:{title:"Prețuim Confidențialitatea Ta",description:"Pentru a-ți oferi cea mai bună experiență, folosim cookie-uri pentru funcții esențiale, conținut personalizat, marketing și analiză.",learnMore:"Află mai multe",accept:"Accept",deny:"Refuz"},resetChat:{title:"Resetează conversația",message:"Resetezi conversația și toate amintirile cu acest personaj? Conversația va reveni la starea inițială.",clear:"Resetează",clearing:"Se resetează…"},callVideoPicker:{title:"Adaugă un videoclip salvat",empty:"Nu există videoclipuri salvate pentru acest personaj.",select:"Folosește acest videoclip",error:"Încărcarea sau salvarea a eșuat. Încearcă din nou."}},[Ul.HI]:{errorPage:{page404:{oops:"उफ़!",headline:"वेबमास्टर ने कहा कि आप इस पेज में प्रवेश नहीं कर सकते...",info:"कृपया जांचें कि आपके द्वारा दर्ज किया गया URL सही है, या होमपेज पर वापस जाने के लिए नीचे दिए गए बटन पर क्लिक करें।",backToHome:"होमपेज पर वापस जाएं",allRightsReserved:"सर्वाधिकार सुरक्षित"},page401:{oops:"उफ़!",noPermission:"आपके पास इस पेज पर जाने की अनुमति नहीं है",contactLeader:"यदि आप संतुष्ट नहीं हैं, तो कृपया अपने लीडर से संपर्क करें",orYouCan:"या आप जा सकते हैं:",backHome:"होम पर वापस जाएं",browse:"बस ब्राउज़ करें",viewImage:"छवि देखने के लिए क्लिक करें",back:"वापस",gifSource:"gif स्रोत",randomView:"रैंडम व्यू"},ipAccess:{title:"पहुंच प्रतिबंधित",description:"क्षमा करें, यह सेवा आपके क्षेत्र में उपलब्ध नहीं है",tips:"स्थानीय नियमों और समझौतों के कारण, यह वेबसाइट आपके भौगोलिक क्षेत्र में उपलब्ध नहीं है।"}},route:{premium:"प्रीमियम",home:"एक्सप्लोर करें",characterList:"कैरेक्टर लिस्ट",characterSearch:"कैरेक्टर खोजें",characterDetail:"कैरेक्टर विवरण",characterChat:"कैरेक्टर के साथ चैट",chatHistory:"चैट",userCenter:"यूजर सेंटर",userCenterEdit:"व्यक्तिगत जानकारी",rechargeCenter:"रिचार्ज सेंटर",contactUs:"हमसे संपर्क करें",characterCollections:"कलेक्शन",characterLiked:"पसंदीदा",rechargeHistory:"रिचार्ज इतिहास",legalInformation:"कानूनी जानकारी",underagePolicy:"अवयस्क नीति",subscriptionPolicy:"सदस्यता नीति",exemption2257:"18 U.S.C. 2257 छूट",dmcaPolicy:"DMCA नीति",blockedContentPolicy:"अवरोधित सामग्री नीति",contentRemovalPolicy:"सामग्री हटाने की नीति",complaintPolicy:"शिकायत नीति"},rechargeHistory:{title:"लेनदेन इतिहास",tabs:{deposits:"रिचार्ज",expenses:"खर्च"},expense:{chatWith:"{name} के साथ चैट",unlockedVideo:"{name} का प्राइवेट वीडियो अनलॉक किया",unlockedPhoto:"{name} की प्राइवेट फोटो अनलॉक की",upgradeVideo:"वीडियो अपग्रेड करें",sendGifts:"आंतरिक बातचीत खर्च: {name}",other:"अन्य खर्च"}},rechargeCenter:{tabs:{subscribe:"सब्सक्राइब करें",coins:"कॉइन्स"},premium:{title:"सब्सक्राइब करें",choosePlan:"अपना प्लान चुनें",anonymous:"100% गुमनाम। आप किसी भी समय कैंसिल कर सकते हैं।",countdown:{hours:"घंटे",minutes:"मिनट",seconds:"सेकंड"},limitedOffer:"सीमित समय का ऑफर",discount:"आपके सब्सक्रिप्शन पर 75% तक की छूट",plans:{yearly:"12 महीने",quarterly:"3 महीने",monthly:"1 महीना",perMonth:"/महीना"},currentSubscription:{label:"मौजूदा सब्सक्रिप्शन",daysLeft:"दिन बाकी",renewsOn:"{date} को नवीनीकरण"},subscribeTypes:{none:"कोई सब्सक्रिप्शन नहीं",weekly:"साप्ताहिक",monthly:"मासिक",quarterly:"त्रैमासिक",annual:"वार्षिक",planText:"{type} प्लान"},badges:{bestChoice:"सर्वश्रेष्ठ विकल्प"},security:{noAdultTransaction:"आपके बैंक स्टेटमेंट में कोई वयस्क लेनदेन नहीं",noHiddenFees:"कोई छिपी हुई फीस नहीं + किसी भी समय सब्सक्रिप्शन कैंसिल करें",statementCharge:"चार्ज आपके बैंक स्टेटमेंट में '{appName}' के रूप में दिखता है",cancelAnytime:"सेटिंग्स में किसी भी समय सब्सक्रिप्शन कैंसिल करें"},agreement:{iAgree:"मैं स्वीकार करता हूं",termsOfService:"सेवा की शर्तें",and:"और",subscriptionPolicy:"सदस्यता नीति"},subscribe:"सब्सक्राइब करें",subscribed:"सक्रिय सदस्यता",upgrade:"अपग्रेड करें",errors:{alreadySubscribed:"आपके पास पहले से सक्रिय सदस्यता है।"},vipGuide:{title:"Exclusive Privileges Unlock Karein",description:"Connection aur luxury content ke hamare sabse elite tier ke saath apna experience elevate karein.",discountTag:"40% OFF",button:"Premium में अपग्रेड करें",benefits:{exclusivePrivateShows:"विशेष निजी शो & वीडियो और चित्र",premiumTipMenu:"प्रीमियम टिप मेनू",emotionalChatModel:"Zyada emotional AI chat model",betterMemory:"Har interaction me behtar memory",welfareImages:"Regular update hone wali bonus images unlock karein",posePrivilege:"Special pose privileges unlock karein",liveChatPrivilege:"Live room chat privileges",monthlyFreeCoins:'Har mahine <span style="color: #ff007f; font-weight: bold;">{coins}</span> free coins'}},paymentPending:{alt:"भुगतान प्रक्रिया में है",title:"भुगतान प्रक्रिया में है",description:"आपका भुगतान प्रोसेस किया जा रहा है। सत्यापन के बाद, आपका अकाउंट अपने आप Premium में अपग्रेड हो जाएगा। इसमें कुछ मिनट लग सकते हैं।",button:"समझ गया"},benefits:{title:"प्रीमियम लाभ",createAI:"अपनी खुद की AI गर्लफ्रेंड बनाएं",unlimitedMessages:"असीमित टेक्स्ट मैसेज",freeTokens:"100 मुफ्त टोकन पाएं / महीना",removeBlur:"छवियों से धुंधलापन हटाएं",generateImages:"छवियां उत्पन्न करें",phoneCalls:"AI कॉल करें",fastResponse:"तेज प्रतिक्रिया समय",prioritySupport:"प्राथमिकता ग्राहक सहायता",exclusiveCharacters:"विशेष कैरेक्टर तक पहुंच",advancedCustomization:"उन्नत व्यक्तित्व अनुकूलन"}},coins:{title:"कॉइन्स",currentCoins:"वर्तमान कॉइन्स",description:{title:"कॉइन्स विवरण",subtitle:"सिक्के ब्रह्मांड की आभासी मुद्रा हैं! अधिक सिक्कों के साथ, आप अपनी चैट अनुभव को और भी शानदार बना सकते हैं:"},security:{antivirusSecuredLine1:"एंटीवायरस",antivirusSecuredLine2:"सुरक्षित",privacyBankStatementLine1:"बैंक स्टेटमेंट में",privacyBankStatementLine2:"गोपनीयता"},badges:{discount:"{percent}% की छूट"},features:{heartWhisper:"चैट संदेश",inspirationReply:"प्रेरणादायक उत्तर",premiumChat:"विशेष उपहार",specialGifts:"एनिमेटेड वीडियो खरीदें"},history:{title:"रिचार्ज इतिहास",item:{title:"कॉइन्स",conisNum:"+ {num} कॉइन्स",orderId:"ऑर्डर ID: {id}"}}}},order:{status:{completed:{type:"पूर्ण",title:"भुगतान सफल",description:"कॉइन्स सफलतापूर्वक आपके खाते में जोड़ दिए गए हैं! अब आप उन्हें विशेष सुविधाओं को अनलॉक करने के लिए उपयोग कर सकते हैं।"},pending:{type:"लंबित",title:"भुगतान प्रोसेस हो रहा है…",description:"कृपया प्रतीक्षा करें जब तक हम आपके भुगतान की पुष्टि करते हैं। आप किसी भी समय रिचार्ज रिकॉर्ड में नवीनतम प्रगति की जांच कर सकते हैं।"},failed:{type:"विफल",title:"भुगतान विफल",description:"दुर्भाग्य से, यह भुगतान पूरा नहीं हो सका। कृपया आश्वस्त रहें कि हमने आपसे शुल्क नहीं लिया। कृपया पुनः प्रयास करें।"}}},navbar:{search:{placeholder:"खोजें"},login:{title:"लॉगिन",notification:{title:"सुझाव",message:"लॉगिन विधि अभी उपलब्ध नहीं है"}},download:{title:"डाउनलोड करें",dialog:{title:"APP डाउनलोड करें",subtitle:"20 मिलियन से अधिक कैरेक्टर खोजने के लिए ऐप डाउनलोड करें।"}},checkIn:{title:"चेक इन"},joinFree:{title:"मुफ्त में शामिल हों"}},sidebar:{today:"आज",yesterday:"कल",other:"अन्य",footer:{affiliate:"सहयोगी",support:"सहायता"}},contactUs:{email:"ईमेल",youtube:"Youtube",facebook:"Facebook",whatsapp:"WhatsApp",telegram:"Telegram",instagram:"Instagram",discord:"Discord"},loading:{title:"लोड हो रहा है..."},noData:{title:"यहां थोड़ा शांत है..."},home:{more:"सभी देखें",faq:{title:"सामान्य प्रश्न"},banner:{slide1:{title:"आपकी कहानी यहां शुरू होती है",description:"असीमित बातचीत अनलॉक करें",buttonText:"अभी चैट शुरू करें"},slide2:{title:"अपना परफेक्ट कैरेक्टर खोजें",description:"आपके लिए चयनित लोकप्रिय कैरेक्टर एक्सप्लोर करें",buttonText:"अभी एक्सप्लोर करें"},slide3:{title:"अपनी प्रोफाइल बनाएं",description:"प्राथमिकताएं अनुकूलित करें और प्रगति सिंक रखें",buttonText:"सेंटर पर जाएं"}},all:"सभी"},characterTabs:{recommend:"अनुशंसित",trending:"ट्रेंडिंग",topRated:"टॉप रेटेड",popular:"लोकप्रिय",latest:"नवीनतम"},characterChat:{sendInputPlaceholder:"अपना संदेश टाइप करें...",openingPopoverTitle:"जवाब देने की कोशिश करें",copyMessage:"संदेश कॉपी करें",deleteMessage:"संदेश हटाएं",reportMessage:"संदेश रिपोर्ट करें",copySuccess:"क्लिपबोर्ड में कॉपी किया गया",copyFailed:"कॉपी विफल",noCopyContent:"कॉपी करने के लिए कोई सामग्री नहीं",sendTooFrequent:"बहुत बार भेज रहे हैं, कृपया बाद में पुनः प्रयास करें",messageTooLong:"संदेश की लंबाई 200 वर्णों से अधिक नहीं हो सकती",sendFailed:"भेजने में विफल, कृपया पुनः प्रयास करें",openingSuggestions:{careerChange:"मैं टेक्नोलॉजी में करियर बदलने के बारे में सोच रहा हूं। इस इंडस्ट्री की संभावनाओं के बारे में आप क्या सोचते हैं?",tellMore:"दिलचस्प! क्या आप मार्केटिंग स्ट्रैटेजी में अपने अनुभव के बारे में और बता सकते हैं?",professionalAdvice:"मैं अपनी वर्तमान भूमिका में थोड़ा फंसा हुआ महसूस कर रहा हूं। पेशेवर रूप से आगे बढ़ने के लिए कोई सलाह?"},chatUser:{collect:"कलेक्ट करें",collected:"कलेक्ट किया गया",profile:"प्रोफाइल",share:"शेयर करें"},chatHeader:{status:{online:"ऑनलाइन",offline:"ऑफलाइन",typing:"टाइप कर रहे हैं...",sendingPhoto:"फ़ोटो भेज रहे हैं",living:"लाइव"}}},interact:{actionTrigger:"ट्रिगर",actionSend:"भेजें",heat:"उसके साथ इंटरैक्शन हीट",liveRoomGuide:{description:"खास इंटरैक्टिव परफॉर्मेंस अनलॉक करने के लिए गिफ्ट भेजें!",action:"भेजें"},blockingDialog:{title:"वही सब कुछ जिसकी आपने कल्पना की है...",previewPrefix:"यहाँ ",previewHighlight:"एक्सक्लूसिव ट्राय-ऑन शो",previewSuffix:" की झलक है। और अनलॉक करने के लिए प्रीमियम गिफ्ट भेजें।",action:"अभी अनलॉक करें"},giftPanel:{sendGift:"गिफ्ट भेजें",recharge:"रिचार्ज",more:"और",gift:"गिफ्ट",sort:"क्रमबद्ध करें",close:"बंद करें"},sceneSwitch:{guide:"और ज़्यादा सीन देखने के लिए यहां टैप करें।",button:"सीन\nबदलें",shortButton:"सीन",title:"सीन बदलें",subtitle:"क्लिक करके दूसरे लाइव सीन में जाएं।",switching:"बदला जा रहा है...",close:"बंद करें",current:"मौजूदा",price:"अनलॉक करने के लिए {price} कॉइन",payInsufficient:"कॉइन अपर्याप्त हैं। कृपया रिचार्ज करके फिर कोशिश करें।",payNeedsConfirm:"इस सीन के लिए भुगतान पुष्टि चाहिए। कृपया फिर कोशिश करें।",payFailed:"यह सीन अनलॉक नहीं हो सका। कृपया फिर कोशिश करें।"},floatingNotice:{sent:"भेजा",requested:"अनुरोध किया"},mobileMenu:{muteLabel:"म्यूट",unmuteLabel:"अनम्यूट",showMenu:"मेनू दिखाएं",hideMenu:"मेनू छिपाएं",muteToast:"म्यूट किया गया",unmuteToast:"अनम्यूट किया गया"},fallbackReply:{feeling:"आप अभी कैसा महसूस कर रहे हैं?",anywhere:"अगर आप अभी कहीं भी हो सकते हैं, तो आप कहाँ होंगे?",mind:"मैं सुनना चाहूँगा कि आपके दिमाग में हाल ही में क्या चल रहा है।"},defaultNames:{action:"एक्शन",gift:"गिफ्ट",character:"चरित्र"},loading:{title:"कृपया प्रतीक्षा करें...",subtitle:"{name} तैयार हो रहा है।"},stayReward:{title:"ठहरने का इनाम",surpriseTitle:"सरप्राइज़ इनाम!",freeGiftHint:"एक मुफ़्त तोहफ़ा आपका इंतज़ार कर रहा है",subtitle:"इनाम अनलॉक करने के लिए रूम में बने रहें।",durationMinutes:"{minutes} मिनट",coinRange:"{min}-{max} सिक्के",coinFixed:"{amount} सिक्के",giftReward:"गिफ़्ट x{quantity}",expireHours:"{hours} घंटे तक मान्य",expireSoon:"जल्द समाप्त",stateClaimed:"प्राप्त",stateClaimable:"प्राप्त करें",stateInProgress:"जारी",stateLocked:"लॉक",countdownLabel:"अगला इनाम",claim:"प्राप्त करें",claiming:"प्राप्त हो रहा है...",claimed:"प्राप्त",claimEmpty:"इस बार कोई इनाम नहीं मिला। आपकी अवधि की गिनती जारी है।",resultConfirm:"समझ गया",resultCongrats:"बधाई हो!",resultSummary:"आपको {coins} सिक्के और {gifts} गिफ़्ट मिले",resultSummaryCoinsOnly:"आपको {coins} सिक्के मिले",resultSummaryGiftsOnly:"आपको {gifts} गिफ़्ट मिले",resultGotIt:"समझ गया",resultCoinLabel:"सिक्के",resultGiftLabel:"उपहार",guestTip:"ठहरने का इनाम पाने के लिए साइन इन करें।",close:"बंद करें",entryLabel:"ठहरने का इनाम",countdownNotReady:"पुरस्कार जल्द आ रहा है"},a11y:{avatarBackground:"अवतार पृष्ठभूमि",showMenu:"मेनू दिखाएं",fire:"आग",up:"ऊपर",send:"भेजें",gift:"गिफ्ट",chat:"चैट",coin:"कॉइन",recharge:"रिचार्ज"}},chatInput:{placeholder:"अपना संदेश टाइप करें..."},chatDeletePopover:{deleteChat:"डिलीट करें",hide:"छुपाएं"},clearChat:{title:"इस चैट को साफ़ करें?",message:"इस चैट में सभी संदेश स्थायी रूप से हटा दिए जाएंगे।",clear:"साफ़ करें",clearing:"साफ़ हो रहा है...",clearChat:"चैट साफ़ करें"},footer:{privacyPolicy:"गोपनीयता नीति",termsService:"सेवा की शर्तें",content:"AI साथी की अगली पीढ़ी की खोज करें। OnlyGF आपको प्रामाणिक बातचीत, भावनात्मक संबंध और AI दोस्तों का एक समुदाय प्रदान करता है जो आपको समझते हैं और आपके साथ बढ़ते हैं।",desc:"© 2025 OnlyGF. सर्वाधिकार सुरक्षित।",features:"विशेषताएं",popular:"लोकप्रिय",chat:"चैट",createCharacter:"चरित्र बनाएं",myCollection:"मेरा संग्रह",myAI:"मेरा AI",legalSupport:"कानूनी और सहायता",termsAndPolicies:"शर्तें और नीतियां"},legalInformation:{pageTitle:"कानूनी जानकारी",items:{termsService:"सेवा की शर्तें",privacyNotice:"गोपनीयता सूचना",subscriptionPolicy:"सदस्यता नीति",cookiesNotice:"कुकी सूचना",underagePolicy:"अवयस्क नीति",contentRemovalPolicy:"सामग्री हटाने की नीति",blockedContentPolicy:"अवरोधित सामग्री नीति",dmcaPolicy:"DMCA नीति",complaintPolicy:"शिकायत नीति",exemption2257:"18 U.S.C. 2257 छूट",communityGuidelines:"समुदाय दिशानिर्देश",affiliateTerms:"एफिलिएट नियम और शर्तें"}},languageDialog:{title:"भाषा चयन",desc:"अपनी प्रदर्शन भाषा चुनें"},dialogUploadAvatar:{title:"अपना अवतार चुनें",desc:"आइए एक ऐसा लुक खोजें जो पूरी तरह से आप है। पहली छाप मायने रखती है!",save:"सेव करें"},dialogShare:{title:"शेयर करें",desc:"लिंक कॉपी करें या सीधे शेयर करें, दोस्त तुरंत चैट शुरू कर सकते हैं।",copy:"लिंक कॉपी करें",success:"लिंक क्लिपबोर्ड पर कॉपी हो गया",error:"लिंक कॉपी करने में विफल, कृपया पुनः प्रयास करें"},dialogReport:{title:"रिपोर्ट करें",desc:"एक कारण चुनें",list:{sexuallyExplicit:"यौन रूप से स्पष्ट सामग्री",hateSpeech:"घृणास्पद भाषण या उत्पीड़न",suicideSelfInjury:"आत्महत्या या आत्म-हानि",violenceThreats:"हिंसा या धमकी",falseInformation:"झूठी जानकारी",spamFraud:"स्पैम या धोखाधड़ी",privacyViolation:"गोपनीयता उल्लंघन",harmfulMinors:"नाबालिगों के लिए हानिकारक",other:"अन्य"},other:{title:"विवरण",placeholder:"कृपया समस्या का वर्णन करें..."},submit:"सबमिट करें"},dialogDownload:{title:"डाउनलोड करें",desc:"20 मिलियन से अधिक कैरेक्टर खोजने के लिए ऐप डाउनलोड करें।",toast:"जल्द ही आ रहा है "},dialogCoinInsufficient:{title:"अगला संदेश अनलॉक करें",liveTitle:"कॉइन्स अपर्याप्त हैं",desc:"इस चैट को जारी रखने के लिए आपके पास कॉइन्स खत्म हो गए हैं। अधिक जवाब अनलॉक करने के लिए कृपया अपना बैलेंस रिचार्ज करें।",message:"संदेश",balance:"बैलेंस",coins:"कॉइन्स",button:"अधिक कॉइन्स प्राप्त करें",notEnoughCoins:"सिक्के कम हैं",transactionHistory:"लेन-देन इतिहास >>",chooseHowToContinue:"जारी रखने का तरीका चुनें",oneTime:"एक बार की खरीद",subscription:"सब्सक्रिप्शन",topUpPack:"टॉप-अप पैक",perMonth:"/माह",withMembershipAlsoGet:"सदस्यता के साथ आपको यह भी मिलता है",seeAllPerks:"सभी फ़ायदे देखें >>",subscribeNow:"अभी सब्सक्राइब करें {money}",topUp:"टॉप-अप {money}",moreOptions:"और विकल्प? टॉप-अप सेंटर पर जाएँ",bestValue:"सबसे बेहतरीन",topPick:"99% उपयोगकर्ताओं की पसंद",quote:"“ यह सिर्फ़ उनके लिए है जो मुझे सच में समझते हैं… मैं यहीं तुम्हारा इंतज़ार कर रही हूँ।”",cancelAnytime:"कभी भी रद्द करें · App Store से प्रबंधित करें",guideWait:"रुको!",guideDesc:"वह तुम्हें एक स्टीमी वीडियो भेजने वाली है…",guideQuestion:"देखना चाहते हो?",guideViewNow:"अभी देखें"},dialogRegisterGuide:{title:"बातचीत जारी रखना चाहते हैं?",desc:"चैट जारी रखने और सभी सुविधाओं को अनलॉक करने के लिए मुफ्त खाता बनाएं!",benefit1:"असीमित बातचीत",benefit2:"चैट इतिहास सहेजें",benefit3:"सभी पात्रों तक पहुंच",signUp:"साइन अप करें",later:"शायद बाद में"},registerGuideMessage:{text:"बातचीत जारी रखना चाहते हैं? बस एक मुफ्त खाता बनाएं! बोनस मैसेज के लिए अभी साइन अप करें—मैं आगे बढ़ने के लिए बेताब हूं!",button:"चैट के लिए रजिस्टर करें"},dialogPhotoUnlock:{title:"फोटो अनलॉक करें",desc:"पूरी सामग्री देखने के लिए इस फोटो को अनलॉक करें",balance:"आपका बैलेंस",button:"अभी अनलॉक करें",getMore:"अधिक कॉइन्स प्राप्त करें",insufficientBalance:"अपर्याप्त बैलेंस",unlocking:"अनलॉक हो रहा है...",unlockSuccess:"फोटो सफलतापूर्वक अनलॉक हो गई",unlockFailed:"फोटो अनलॉक करने में विफल"},photoRequest:{buttonTitle:"फोटो का अनुरोध करें",selectType:"फोटो प्रकार चुनें:",requestFailed:"फोटो का अनुरोध विफल",sendMePhoto:"मुझे एक फोटो भेजो",noMorePhotos:"कोई और फोटो उपलब्ध नहीं",poses:{random:"रैंडम",selfie:"सेल्फी",posing:"पोज़िंग",sitting:"बैठना",kneeling:"घुटने पर",squatting:"बैठक",standing:"खड़े",prone:"लेटना"},vipGuide:{title:"VIP फोटो पोज़ अनलॉक करें",description:"विशेष फोटो पोज़ अनलॉक करने और अपनी इच्छित पोज़ का अनुरोध करने के लिए सदस्यता लें।",buttonText:"अभी VIP अनलॉक करें"}},dialogLogout:{title:"लॉगआउट करें?",desc:"क्या आप वाकई लॉगआउट करना चाहते हैं?",desc2:"आपको अपने खाते तक पहुंचने के लिए फिर से लॉगिन करना होगा।",confirm:"लॉगआउट करें"},dialogLogin:{title:"लॉगिन / साइन अप",subtitle:"20 मिलियन से अधिक लड़कियों से चैट करें",continueWith:"{method} के साथ जारी रखें",google:"Google",apple:"Apple",facebook:"Facebook",line:"Line",guest:"अतिथि",desc:"मैं विशेष ऑफ़र, मार्केटिंग संचार और ईमेल द्वारा सेवा अपडेट प्राप्त करने के लिए सहमत हूं।",sub:"मैं पुष्टि करता हूं कि मैं",age:"18+",agreementPrefix:"हूं और",termsOfService:"सेवा की शर्तें",and:"और",privacyPolicy:"गोपनीयता नीति",or:"या",emailPlaceholder:"ईमेल पता",continueWithEmail:"ईमेल के साथ जारी रखें",verifyTitle:"अपना ईमेल सत्यापित करें",verifyDesc:"हमने {email} पर 6 अंकों का सत्यापन कोड भेजा है। ईमेल खोलें और जारी रखने के लिए नीचे कोड दर्ज करें।",confirm:"पुष्टि करें",resendCode:"कोड पुनः भेजें",resendCountdown:"{seconds}s में पुनः भेजें",back:"वापस",invalidEmail:"कृपया एक वैध ईमेल पता दर्ज करें",codeSent:"सत्यापन कोड भेजा गया",codeSendFailed:"सत्यापन कोड भेजने में विफल",codeRequired:"कृपया सत्यापन कोड दर्ज करें",codeInvalid:"अमान्य सत्यापन कोड",promotionHint:"पहली सदस्यता <b>-75% OFF</b> विशेष ऑफ़र"},dialogCheckin:{title:"दैनिक पुरस्कार",desc:"सभी पुरस्कार प्राप्त करने के लिए लगातार 7 दिनों तक चेक इन करें!",button:"पुरस्कार प्राप्त करें",claimedToday:"आज पुरस्कार प्राप्त हो गया",resultTitle:"पुरस्कार प्राप्त हो गया!",resultDesc:"आपने लगातार {days} दिनों तक चेक इन किया है। ऐसे ही जारी रखें!",resultButton:"समझ गया",daysText:"दिन {days}"},auth:{loginSuccess:"लॉगिन सफलतापूर्वक हो गया",loginFailed:"लॉगिन विफल, कृपया पुनः प्रयास करें"},person:{edit:"संपादित करें",follow:"फॉलो कर रहे हैं",fans:"फॉलोअर्स",createBot:" बॉट्स",sendPost:" पोस्ट",followBot:" फॉलो किए गए बॉट्स"},common:{noData:"कोई डेटा नहीं",clickRetry:"पुनः प्रयास करने के लिए टैप करें",live:"लाइव",report:"संदेश रिपोर्ट करें",reset:"रीसेट",months:{january:"जनवरी",february:"फ़रवरी",march:"मार्च",april:"अप्रैल",may:"मई",june:"जून",july:"जुलाई",august:"अगस्त",september:"सितंबर",october:"अक्टूबर",november:"नवंबर",december:"दिसंबर"},submitting:"सबमिट हो रहा है...",unlockFailed:"सदस्यता अनुमति अनलॉक करनी होगी"},characterDetail:{online:"ऑनलाइन",chatToMe:"मुझसे चैट करें",collect:"कलेक्ट करें",collected:"कलेक्ट किया गया",share:"शेयर करें",gallery:"गैलरी",report:"रिपोर्ट करें",age:"आयु",career:"करियर",height:"ऊंचाई",constellation:"राशि",bloodType:"रक्त समूह",unknown:"अज्ञात",likeSuccess:"सफलतापूर्वक पसंद किया गया",unlikeSuccess:"सफलतापूर्वक पसंद हटाया गया",collectSuccess:"सफलतापूर्वक कलेक्ट किया गया",uncollectSuccess:"कलेक्शन सफलतापूर्वक कैंसिल किया गया",likeFailed:"पसंद करने में विफल, कृपया पुनः प्रयास करें",collectFailed:"कलेक्ट करने में विफल, कृपया पुनः प्रयास करें",networkError:"नेटवर्क त्रुटि, कृपया पुनः प्रयास करें",reportSuccess:"रिपोर्ट सफलतापूर्वक सबमिट की गई, हम इसे जल्द से जल्द प्रोसेस करेंगे",reportFailed:"रिपोर्ट सबमिट करने में विफल, कृपया पुनः प्रयास करें"},langSelect:{message:{success:"भाषा सफलतापूर्वक बदली गई!"}},userCenter:{title:"व्यक्तिगत जानकारी",username:"यूजरनेम",usernamePlaceholder:"AlexOnlyGF",usernameHelper:"कृपया 3-25 अक्षर दर्ज करें, अक्षर, इमोजी, संख्या और अंडरस्कोर की अनुमति है। यूजरनेम अद्वितीय होना चाहिए।",profile:"प्रोफाइल (वैकल्पिक)",profilePlaceholder:"अपना बायो पूरा करें ताकि दूसरे आपको बेहतर जान सकें",save:"सेव करें",saving:"सेव हो रहा है...",saveSuccess:"सफलतापूर्वक सेव किया गया",saveFailed:"सेव करने में विफल, कृपया पुनः प्रयास करें",editProfile:"प्रोफाइल संपादित करें",collections:"कलेक्शन",likes:"पसंद",logout:"लॉगआउट",logoutConfirm:"क्या आप वाकई लॉगआउट करना चाहते हैं?",downloadApp:"APP डाउनलोड करें",language:"भाषा",privacyPolicy:"गोपनीयता नीति",termsOfUse:"उपयोग की शर्तें",contactUs:"हमसे संपर्क करें",support:"सहायता",supportDesc:"हम आपके लिए 24/7 यहां हैं",premiumTitle:"OnlyGF Premium",premiumDesc:"हर महीने सभी शो और {coins} बोनस कॉइन अनलॉक करें",myBalance:"मेरा बैलेंस",recharge:"रीचार्ज",currentSubscription:"मौजूदा सब्सक्रिप्शन",daysLeft:"दिन बाकी"},download:{googlePlay:{name:"Google Play",description:"सुरक्षित, सहज अपडेट और नए साथियों के लिए आधिकारिक ऐप प्राप्त करें।",subtitle:"इस पर डाउनलोड करें"},appStore:{name:"App Store",description:"अपने iPhone के लिए अनुकूलित निजी, इमर्सिव चैट अनुभव का आनंद लें।",subtitle:"डाउनलोड करें"},androidApk:{name:"Android APK",description:"परम गोपनीयता, त्वरित एक्सेस और नवीनतम अपडेट के लिए सीधे इंस्टॉल करें।",subtitle:"डाउनलोड करें"},webApp:{name:"Web APP",description:"किसी भी ब्राउज़र से तुरंत चैट करें—कोई इंस्टॉलेशन की जरूरत नहीं। आपका निजी पलायन आपका इंतजार कर रहा है।",subtitle:"इंस्टॉल करें"}},premiumPhotoUnlock:{vipUnlock:"अनलॉक कर सकते हैं",vipMark:"VIP",proMark:"Pro"},photoGallery:{photoCount:"{current}/{total}",prevPhoto:"पिछला",nextPhoto:"अगला"},dialogVideoUnlock:{title:"वीडियो अनलॉक करें",desc:"पूरी सामग्री देखने के लिए इस वीडियो को अनलॉक करें",button:"अभी अनलॉक करें",balance:"आपका बैलेंस",insufficientBalance:"अपर्याप्त बैलेंस",getMore:"अधिक सिक्के प्राप्त करें",unlocking:"अनलॉक हो रहा है...",unlockSuccess:"वीडियो सफलतापूर्वक अनलॉक हुआ",unlockFailed:"वीडियो अनलॉक करने में विफल"},upgradablePhoto:{unlockMoment:"पल को अनलॉक करें",upgrading:"अपग्रेड हो रहा है...",upgradeSuccess:"वीडियो में अपग्रेड किया गया",upgradeFailed:"अपग्रेड करने में विफल"},dialogWebViewGuide:{title:"कृपया ब्राउज़र में खोलें",desc:"Google लॉगिन ऐप के अंतर्निहित ब्राउज़र में समर्थित नहीं है। लॉगिन पूरा करने के लिए लिंक कॉपी करें और इसे सिस्टम ब्राउज़र (Chrome/Safari) में खोलें।",currentUrl:"वर्तमान पृष्ठ का URL",copyLink:"लिंक कॉपी करें",copied:"लिंक कॉपी हो गया",copyFailed:"कॉपी विफल, कृपया मैन्युअल रूप से कॉपी करें",steps:{step1:"लिंक कॉपी करने के लिए ऊपर बटन पर क्लिक करें",step2:"सिस्टम ब्राउज़र खोलें (Chrome/Safari)",step3:"लिंक पेस्ट करें और लॉगिन पूरा करने के लिए विज़िट करें"}},emailChat:{openEmailChat:"ईमेल चैट खोलें",connectViaEmail:"ईमेल के माध्यम से कनेक्ट करें",enterEmailTitle:"पत्र प्राप्त करने के लिए ईमेल दर्ज करें",receiveYourFirstLetter:"अपना पहला पत्र प्राप्त करें",receiveLetter:"पत्र प्राप्त करें",startEmailChatWith:"{botName} के साथ ईमेल चैट शुरू करें",letterWillBeSent:"पत्र जल्द ही आपके ईमेल पर भेजा जाएगा!",description:"क्या आप चैट से परे, सिर्फ आपके लिए लिखे गए पत्र प्राप्त करना चाहते हैं? एक बार सक्षम होने पर, वे आपके इनबॉक्स में पहुंचेंगे, आपकी कहानी को जारी रखते हुए जैसे कि वे आपके जीवन का वास्तविक हिस्सा हों।",emailPlaceholder:"ईमेल पता",sendNow:"अभी भेजें",emailChatStartedWith:"{botName} के साथ ईमेल चैट शुरू हुई",switchToBot:"{botName} पर स्विच करें",receiveLetterAt:"पत्र प्राप्त करें",tips:"सुझाव:",tipsContent:"वह सक्रिय रूप से आपको लिखेगी और आपके पत्रों का जवाब देगी। यह निजी, धीमी गति का और विशेष रूप से आप दोनों के लिए है।",invalidEmail:"कृपया एक वैध ईमेल पता दर्ज करें",enableSuccess:"ईमेल चैट सफलतापूर्वक सक्षम हुई",disableSuccess:"ईमेल चैट सफलतापूर्वक अक्षम हुई",updateEmailSuccess:"ईमेल सफलतापूर्वक अपडेट हुआ",switchBotSuccess:"नए चरित्र पर सफलतापूर्वक स्विच किया गया",enableFailed:"ईमेल चैट सक्षम करने में विफल",disableFailed:"ईमेल चैट अक्षम करने में विफल",updateEmailFailed:"ईमेल अपडेट करने में विफल",switchBotFailed:"चरित्र स्विच करने में विफल",disableConfirmTitle:"ईमेल चैट बंद करें?",disableConfirmMessage:"आपको इस चरित्र से अब पत्र नहीं मिलेंगे।",switchBotConfirmTitle:"चरित्र स्विच करें?",switchBotConfirmMessage:"ईमेल चैट को {fromBot} से {toBot} पर स्विच करें?",updateEmail:"ईमेल अपडेट करें",enterNewEmail:"कृपया नया ईमेल पता दर्ज करें",firstLetterTriggered:"आपका पहला पत्र रास्ते में है!",firstLetterFailed:"पहला पत्र भेजने में विफल",verifyTitle:"ईमेल सत्यापित करें",verifyDesc:"सत्यापन कोड {email} पर भेजा गया",codeRequired:"कृपया 6 अंकों का कोड दर्ज करें",codeInvalid:"अमान्य या समाप्त कोड",codeSent:"कोड भेजा गया",codeSendFailed:"कोड भेजने में विफल",confirm:"पुष्टि करें",resendCode:"पुनः भेजें",resendCountdown:"{seconds}s में पुनः भेजें"},emailCallback:{verifying:"आपका लिंक सत्यापित हो रहा है...",success:"सफलता!",redirectingToChat:"चैट पर रीडायरेक्ट हो रहा है...",oops:"उफ़!",redirectingIn:"{seconds}s में होमपेज पर रीडायरेक्ट हो रहा है...",goHomeNow:"अभी होमपेज पर जाएं",invalidLink:"अमान्य लिंक",linkExpired:"लिंक की समय सीमा समाप्त हो गई है। कृपया अपने ईमेल पर वापस जाएं और फिर से क्लिक करें।",linkInvalid:"अमान्य लिंक",linkUsed:"लिंक अब मान्य नहीं है",userNotFound:"उपयोगकर्ता नहीं मिला",networkError:"नेटवर्क त्रुटि, कृपया पुनः प्रयास करें"},profileComplete:{title:"{appName} में आपका स्वागत है!",subtitle:"बेहतर व्यक्तिगत अनुभव के लिए हमें और बताएं",nicknameLabel:"आपका नाम क्या है?",nicknamePlaceholder:"एक शानदार उपनाम दर्ज करें",nicknameRequired:"कृपया अपना उपनाम दर्ज करें",genderLabel:"आप कौन सा सर्वनाम उपयोग करते हैं?",genderHint:"(एक बार चयन करने के बाद लिंग नहीं बदला जा सकता।)",birthdayLabel:"आपका जन्मदिन?",birthdayPlaceholder:"DD/MM/YYYY",birthdayRequired:"कृपया अपना जन्मदिन चुनें",birthdayUnderAge:"आपकी आयु कम से कम 18 वर्ष होनी चाहिए",submitButton:"मेरी यात्रा शुरू करें!",genderRequired:"कृपया अपना लिंग चुनें",submitSuccess:"प्रोफ़ाइल सफलतापूर्वक पूर्ण हुई!",submitFailed:"सबमिट करने में विफल, कृपया पुनः प्रयास करें",genderOptions:{male:"वह (पुरुष)",female:"वह (महिला)",other:"वे"}},seo:{description:{characterList:"{appName} पर सभी AI पात्रों को ब्राउज़ करें। लाइव इंटरैक्शन, चैट और कहानी कहने के लिए अपना आदर्श AI साथी खोजें।",characterSearch:"{appName} पर AI पात्रों को खोजें। नाम, टैग या रुचि के अनुसार AI साथी खोजें और तुरंत चैट शुरू करें।",characterDetail:"{appName} पर {name} के साथ इमर्सिव AI Chat करें। अभी AI Girlfriends के साथ चैट शुरू करें।",characterInteract:"{appName} पर AI साथियों के साथ लाइव इंटरैक्शन का अनुभव करें। रीयल-टाइम AI लाइव स्ट्रीमिंग और इमर्सिव वर्चुअल साथ।",characterChat:"{appName} पर AI किरदारों के साथ इमर्सिव AI Chat का आनंद लें। अभी AI Girlfriends के साथ चैट करना शुरू करें।",chatHistory:"{appName} पर अपने AI चैट इतिहास की समीक्षा करें और अपने पसंदीदा AI साथियों के साथ बातचीत जारी रखें।",userCenter:"उपयोगकर्ता केंद्र में अपनी {appName} प्रोफ़ाइल, संग्रह और खाता सेटिंग प्रबंधित करें।",rechargeCenter:"{appName} पर सिक्के रिचार्ज करें और सदस्यता लें। प्रीमियम AI चैट, लाइव इंटरैक्शन और विशेष सामग्री अनलॉक करें।",webTutorial:"हमारे वेब ट्यूटोरियल के साथ {appName} का उपयोग करना सीखें। AI चैट, लाइव इंटरैक्शन और अपने AI साथी से अधिकतम लाभ उठाने के लिए सुझाव।",contactUs:"AI साथी अनुभवों के बारे में समर्थन, साझेदारी और उत्पाद पूछताछ के लिए {appName} से संपर्क करें।",privacyPolicy:"{appName} गोपनीयता नीति पढ़ें और जानें कि हम आपकी व्यक्तिगत जानकारी कैसे एकत्र, उपयोग और सुरक्षित करते हैं।",termsService:"हमारे AI साथी प्लेटफ़ॉर्म के उपयोग को नियंत्रित करने वाली {appName} सेवा की शर्तें पढ़ें।"},characterDetail:{titlePrefix:"पात्र प्रोफ़ाइल",age:"आयु",career:"पेशा",height:"कद",constellation:"राशि",aiGirlfriend:"AI Girlfriend",descriptionTemplate:"{appName} पर {name} के साथ इमर्सिव AI Chat करें। अभी AI Girlfriends के साथ चैट शुरू करें।"},chat:{titleTemplate:"{name} के साथ चैट करें—AI Girlfriend{'|'}{appName}",descriptionTemplate:"{appName} पर {name} के साथ इमर्सिव AI Chat का आनंद लें। अभी AI Girlfriends के साथ चैट करना शुरू करें।"},interact:{titleTemplate:"{name} का लाइव चैनल— AI लाइव इंटरैक्शन स्टोरी,वर्चुअल साथी {'|'} {appName}",descriptionTailTemplate:"{name} लाइव वीडियो+अभी AI Girlfriends के साथ लाइव इंटरैक्शन शुरू करें।"}},cookieConsent:{title:"हम आपकी गोपनीयता को महत्व देते हैं",description:"आपको सर्वोत्तम अनुभव देने के लिए, हम आवश्यक सुविधाओं, वैयक्तिकृत सामग्री, विपणन और विश्लेषण के लिए कुकीज़ का उपयोग करते हैं।",learnMore:"और जानें",accept:"स्वीकार करें",deny:"अस्वीकार करें"},resetChat:{title:"चैट रीसेट करें",message:"इस किरदार के साथ बातचीत और सभी चैट यादें रीसेट करें? बातचीत शुरुआती स्थिति में लौट जाएगी।",clear:"रीसेट करें",clearing:"रीसेट हो रहा है…"},callVideoPicker:{title:"संग्रहित वीडियो जोड़ें",empty:"इस किरदार का कोई संग्रहित वीडियो नहीं है।",select:"यह वीडियो चुनें",error:"लोड या सेव नहीं हुआ। फिर कोशिश करें।"}}},wc=Ee({legacy:!1,locale:ac("language")||"en",messages:bc,globalInjection:!0});Object.entries(vc).forEach(([e,t])=>wc.global.mergeLocaleMessage(e,t)),Object.entries({en:{studio:{call:"Video Call",bio:"Character bio",scene:"Scene description",greeting:"Opening message",tags:"Tags",defaultScene:"{0} meets you at {1} for {2}.",defaultGreeting:"Hi, I’m {0}. It’s lovely to meet you.",defaultBio:"{0} is a {1}-year-old {2} with a {3} personality.",characterLimitTitle:"Create more AI characters",characterLimitDescription:"Free accounts can create 1 character. Upgrade to Premium to create a second character and more.",loading:"Loading…",retry:"Retry",loadError:"Unable to load the studio. Please retry.",connectionError:"Unable to connect. Check your connection and try again."},chatGallery:{profile:"Profile",gallery:"Gallery",all:"All",image:"Images",video:"Videos",empty:"Gallery is empty",noImages:"No images yet",noVideos:"No videos yet",emptyHint:"Your unlocked images and videos will appear here.",sort:"Reverse sort order",newest:"Newest first",oldest:"Oldest first"},chatToolbar:{more:"More options",voice:"Voice call",expand:"Expand profile",collapse:"Collapse profile"},footer:{createCharacter:"Create Character",myCollection:"My Collection",myAI:"My AI"}},es:{studio:{call:"Videollamada",bio:"Biografía",scene:"Descripción de la escena",greeting:"Saludo inicial",tags:"Etiquetas",defaultScene:"{0} te encuentra en {1} para {2}.",defaultGreeting:"Hola, soy {0}. Encantada de conocerte.",defaultBio:"{0} tiene {1} años, trabaja como {2} y tiene una personalidad {3}.",characterLimitTitle:"Crear más personajes de IA",characterLimitDescription:"Las cuentas gratuitas pueden crear 1 personaje. Mejora a Premium para crear un segundo personaje y más.",loading:"Cargando…",retry:"Reintentar",loadError:"No se pudo cargar el estudio. Por favor, reintenta.",connectionError:"No se puede conectar. Comprueba tu conexión e inténtalo de nuevo."},chatGallery:{profile:"Perfil",gallery:"Galería",all:"Todo",image:"Imágenes",video:"Vídeos",empty:"La galería está vacía",noImages:"Aún no hay imágenes",noVideos:"Aún no hay vídeos",emptyHint:"Tus imágenes y vídeos desbloqueados aparecerán aquí.",sort:"Invertir orden",newest:"Más recientes primero",oldest:"Más antiguos primero"},chatToolbar:{more:"Más opciones",voice:"Llamada de voz",expand:"Mostrar perfil",collapse:"Ocultar perfil"},footer:{createCharacter:"Crear personaje",myCollection:"Mi colección",myAI:"Mis AI"}},fr:{studio:{call:"Appel vidéo",bio:"Biographie",scene:"Description de la scène",greeting:"Message d’accueil",tags:"Étiquettes",defaultScene:"{0} vous retrouve à {1} pour {2}.",defaultGreeting:"Bonjour, je suis {0}. Ravie de vous rencontrer.",defaultBio:"{0} a {1} ans, exerce le métier de {2} et a une personnalité {3}.",characterLimitTitle:"Créer d'autres personnages IA",characterLimitDescription:"Les comptes gratuits peuvent créer 1 personnage. Passez à Premium pour créer un deuxième personnage et plus encore.",loading:"Chargement…",retry:"Réessayer",loadError:"Impossible de charger le studio. Veuillez réessayer.",connectionError:"Connexion impossible. Vérifiez votre connexion et réessayez."},chatGallery:{profile:"Profil",gallery:"Galerie",all:"Tout",image:"Images",video:"Vidéos",empty:"La galerie est vide",noImages:"Aucune image",noVideos:"Aucune vidéo",emptyHint:"Vos images et vidéos débloquées apparaîtront ici.",sort:"Inverser le tri",newest:"Les plus récents",oldest:"Les plus anciens"},chatToolbar:{more:"Plus d’options",voice:"Appel vocal",expand:"Afficher le profil",collapse:"Masquer le profil"},footer:{createCharacter:"Créer un personnage",myCollection:"Ma collection",myAI:"Mes IA"}},hi:{studio:{call:"वीडियो कॉल",bio:"चरित्र परिचय",scene:"दृश्य का विवरण",greeting:"शुरुआती अभिवादन",tags:"टैग",defaultScene:"{0} आपसे {1} में {2} के लिए मिलती है।",defaultGreeting:"नमस्ते, मैं {0} हूँ। आपसे मिलकर खुशी हुई।",defaultBio:"{0}, {1} वर्ष की {2} है और उसका स्वभाव {3} है।",characterLimitTitle:"और AI कैरेक्टर बनाएँ",characterLimitDescription:"मुफ़्त खाते 1 कैरेक्टर बना सकते हैं। दूसरा कैरेक्टर और उससे अधिक बनाने के लिए प्रीमियम में अपग्रेड करें।",loading:"लोड हो रहा है…",retry:"पुनः प्रयास करें",loadError:"स्टूडियो लोड करने में असमर्थ। कृपया पुनः प्रयास करें।",connectionError:"कनेक्ट करने में असमर्थ। अपना कनेक्शन जांचें और पुनः प्रयास करें।"},chatGallery:{profile:"प्रोफ़ाइल",gallery:"गैलरी",all:"सभी",image:"तस्वीरें",video:"वीडियो",empty:"गैलरी खाली है",noImages:"अभी कोई तस्वीर नहीं",noVideos:"अभी कोई वीडियो नहीं",emptyHint:"आपकी अनलॉक की गई तस्वीरें और वीडियो यहाँ दिखेंगे।",sort:"क्रम उलटें",newest:"नवीनतम पहले",oldest:"सबसे पुराने पहले"},chatToolbar:{more:"और विकल्प",voice:"वॉइस कॉल",expand:"प्रोफ़ाइल खोलें",collapse:"प्रोफ़ाइल समेटें"},footer:{createCharacter:"कैरेक्टर बनाएं",myCollection:"मेरा संग्रह",myAI:"मेरा AI"}},it:{studio:{call:"Videochiamata",bio:"Biografia",scene:"Descrizione della scena",greeting:"Saluto iniziale",tags:"Tag",defaultScene:"{0} ti incontra a {1} per {2}.",defaultGreeting:"Ciao, sono {0}. È un piacere conoscerti.",defaultBio:"{0} ha {1} anni, lavora come {2} e ha una personalità {3}.",characterLimitTitle:"Crea altri personaggi AI",characterLimitDescription:"Gli account gratuiti possono creare 1 personaggio. Passa a Premium per creare un secondo personaggio e altri ancora.",loading:"Caricamento in corso…",retry:"Riprova",loadError:"Impossibile caricare lo studio. Riprova.",connectionError:"Impossibile connettersi. Controlla la tua connessione e riprova."},chatGallery:{profile:"Profilo",gallery:"Galleria",all:"Tutti",image:"Immagini",video:"Video",empty:"La galleria è vuota",noImages:"Nessuna immagine",noVideos:"Nessun video",emptyHint:"Le immagini e i video sbloccati appariranno qui.",sort:"Inverti ordine",newest:"Più recenti prima",oldest:"Meno recenti prima"},chatToolbar:{more:"Altre opzioni",voice:"Chiamata vocale",expand:"Mostra profilo",collapse:"Nascondi profilo"},footer:{createCharacter:"Crea personaggio",myCollection:"La mia raccolta",myAI:"I miei AI"}},ja:{studio:{call:"ビデオ通話",bio:"キャラクター紹介",scene:"シーンの説明",greeting:"最初のあいさつ",tags:"タグ",defaultScene:"{0}は{1}であなたに会い、{2}を楽しみます。",defaultGreeting:"こんにちは、{0}です。お会いできてうれしいです。",defaultBio:"{0}は{1}歳の{2}で、{3}な性格です。",characterLimitTitle:"さらにAIキャラクターを作成",characterLimitDescription:"無料アカウントでは1体のキャラクターを作成できます。プレミアムにアップグレードすると、2体目以降のキャラクターも作成できるようになります。",loading:"読み込み中…",retry:"再試行",loadError:"スタジオを読み込めませんでした。再試行してください。",connectionError:"接続できません。通信環境を確認してもう一度お試しください。"},chatGallery:{profile:"プロフィール",gallery:"ギャラリー",all:"すべて",image:"画像",video:"動画",empty:"ギャラリーは空です",noImages:"画像はまだありません",noVideos:"動画はまだありません",emptyHint:"解除済みの画像と動画がここに表示されます。",sort:"並び順を反転",newest:"新しい順",oldest:"古い順"},chatToolbar:{more:"その他の操作",voice:"音声通話",expand:"プロフィールを表示",collapse:"プロフィールを閉じる"},footer:{createCharacter:"キャラクター作成",myCollection:"マイコレクション",myAI:"マイAI"}},pl:{studio:{call:"Rozmowa wideo",bio:"Biografia",scene:"Opis sceny",greeting:"Wiadomość powitalna",tags:"Tagi",defaultScene:"{0} spotyka cię w {1}, aby wspólnie przeżyć {2}.",defaultGreeting:"Cześć, jestem {0}. Miło cię poznać.",defaultBio:"{0} ma {1} lat, pracuje jako {2} i ma osobowość {3}.",characterLimitTitle:"Stwórz więcej postaci AI",characterLimitDescription:"Darmowe konta mogą utworzyć 1 postać. Przejdź na Premium, aby utworzyć drugą postać i kolejne.",loading:"Ładowanie…",retry:"Ponów",loadError:"Nie udało się załadować studia. Spróbuj ponownie.",connectionError:"Nie można połączyć. Sprawdź połączenie i spróbuj ponownie."},chatGallery:{profile:"Profil",gallery:"Galeria",all:"Wszystko",image:"Zdjęcia",video:"Filmy",empty:"Galeria jest pusta",noImages:"Brak zdjęć",noVideos:"Brak filmów",emptyHint:"Tutaj pojawią się odblokowane zdjęcia i filmy.",sort:"Odwróć kolejność",newest:"Od najnowszych",oldest:"Od najstarszych"},chatToolbar:{more:"Więcej opcji",voice:"Połączenie głosowe",expand:"Pokaż profil",collapse:"Ukryj profil"},footer:{createCharacter:"Stwórz postać",myCollection:"Moja kolekcja",myAI:"Moje AI"}},ro:{studio:{call:"Apel video",bio:"Biografie",scene:"Descrierea scenei",greeting:"Mesaj de întâmpinare",tags:"Etichete",defaultScene:"{0} te întâlnește la {1} pentru {2}.",defaultGreeting:"Bună, sunt {0}. Îmi pare bine să te cunosc.",defaultBio:"{0} are {1} ani, lucrează ca {2} și are o personalitate {3}.",characterLimitTitle:"Creează mai multe personaje AI",characterLimitDescription:"Conturile gratuite pot crea 1 personaj. Treci la Premium pentru a crea un al doilea personaj și mai multe.",loading:"Se încarcă…",retry:"Reîncearcă",loadError:"Studioul nu a putut fi încărcat. Te rugăm să reîncerci.",connectionError:"Nu s-a putut conecta. Verifică-ți conexiunea și încearcă din nou."},chatGallery:{profile:"Profil",gallery:"Galerie",all:"Toate",image:"Imagini",video:"Videoclipuri",empty:"Galeria este goală",noImages:"Nicio imagine încă",noVideos:"Niciun videoclip încă",emptyHint:"Imaginile și videoclipurile deblocate vor apărea aici.",sort:"Inversează ordinea",newest:"Cele mai noi",oldest:"Cele mai vechi"},chatToolbar:{more:"Mai multe opțiuni",voice:"Apel vocal",expand:"Arată profilul",collapse:"Ascunde profilul"},footer:{createCharacter:"Creează personaj",myCollection:"Colecția mea",myAI:"AI-ul meu"}},ru:{studio:{call:"Видеозвонок",bio:"Биография",scene:"Описание сцены",greeting:"Приветствие",tags:"Теги",defaultScene:"{0} встречает вас в {1} для {2}.",defaultGreeting:"Привет, я {0}. Рада познакомиться.",defaultBio:"{0}, {1} лет, работает как {2}; характер: {3}.",characterLimitTitle:"Создать больше ИИ-персонажей",characterLimitDescription:"В бесплатном аккаунте можно создать 1 персонажа. Перейдите на Premium, чтобы создать второго и других персонажей.",loading:"Загрузка…",retry:"Повторить",loadError:"Не удалось загрузить студию. Пожалуйста, повторите попытку.",connectionError:"Не удалось подключиться. Проверьте соединение и попробуйте снова."},chatGallery:{profile:"Профиль",gallery:"Галерея",all:"Все",image:"Фото",video:"Видео",empty:"Галерея пуста",noImages:"Пока нет фото",noVideos:"Пока нет видео",emptyHint:"Здесь появятся разблокированные фото и видео.",sort:"Обратный порядок",newest:"Сначала новые",oldest:"Сначала старые"},chatToolbar:{more:"Другие действия",voice:"Голосовой звонок",expand:"Развернуть профиль",collapse:"Свернуть профиль"},footer:{createCharacter:"Создать персонажа",myCollection:"Моя коллекция",myAI:"Мои ИИ"}},zh_TW:{studio:{call:"視訊通話",bio:"角色簡介",scene:"場景描述",greeting:"角色開場白",tags:"標籤",defaultScene:"{0} 在{1}與你相遇,一起享受{2}。",defaultGreeting:"你好,我是{0}。很高興認識你。",defaultBio:"{0} 是一位 {1} 歲的{2},性格{3}。",characterLimitTitle:"建立更多 AI 角色",characterLimitDescription:"免費帳號可建立 1 位角色。升級至 Premium 即可建立第二位及更多角色。",loading:"載入中…",retry:"重試",loadError:"無法載入工作室,請重試。",connectionError:"無法連線。請檢查您的網路連線並重試。"},chatGallery:{profile:"資料",gallery:"圖集",all:"全部",image:"圖片",video:"影片",empty:"圖集還是空的",noImages:"暫無圖片",noVideos:"暫無影片",emptyHint:"你已解鎖的圖片和影片會顯示在這裡。",sort:"切換排序",newest:"最新優先",oldest:"最早優先"},chatToolbar:{more:"更多選項",voice:"語音通話",expand:"展開角色資料",collapse:"收合角色資料"},footer:{createCharacter:"建立角色",myCollection:"我的收藏",myAI:"我的 AI"}}}).forEach(([e,t])=>wc.global.mergeLocaleMessage(e,t));const Sc=new Map,kc=new Map,Tc=e=>`live-bootstrap-meta:${e}`,Ec=()=>{var e;if("undefined"!=typeof window){const t=String((null==(e=window.__APP_CONFIG__)?void 0:e.liveLoadingBackground)||"").trim();if(t)return t}return"/images/live-loading-bg.jpg"},Ac=e=>{const t=String(e||"").trim();if(!t||"undefined"==typeof window)return Promise.resolve(!1);const i=Cc(t);if(void 0!==i)return Promise.resolve(i);const r=kc.get(t);if(r)return r;const a=new Promise(e=>{const i=new Image;i.decoding="async",i.onload=()=>{Sc.set(t,!0),kc.delete(t),e(!0)},i.onerror=()=>{Sc.set(t,!1),kc.delete(t),e(!1)},i.src=t});return kc.set(t,a),a},Cc=e=>{const t=String(e||"").trim();if(!t)return!1;const i=Sc.get(t);if(void 0!==i)return i;if("undefined"!=typeof window){const e=window.__LIVE_IMAGE_PROBE__,i=null==e?void 0:e[t];if(void 0!==i)return Sc.set(t,i),i}},Ic=async e=>{if("undefined"==typeof window)return;const t=String(e||"").trim();if(!t)return void(await Ac(Ec()));await Ac(t)||await Ac(Ec())},Pc=(()=>{if("undefined"==typeof window)return null;const e=window.location.pathname||"";if(!/\/characterInteract\/?$/.test(e))return null;const t=window.__LIVE_BOOTSTRAP_META__;return t&&!0===t.enabled?t:null})(),_c=String((null==Pc?void 0:Pc.characterName)||"").trim(),Rc=!!Pc,xc=I({visible:Rc,duelHosts:[],isDuel:!1,backgroundUrl:String((null==Pc?void 0:Pc.backgroundUrl)||Ec()),avatarUrl:String((null==Pc?void 0:Pc.avatarUrl)||""),showLiveAvatar:Rc,title:Rc?wc.global.t("interact.loading.title"):"",subtitle:Rc?wc.global.t("interact.loading.subtitle",{name:_c||wc.global.t("interact.defaultNames.character")}):"",avatarSize:Number((null==Pc?void 0:Pc.avatarSize)||0),startedAt:Rc?Date.now():0,skipInitialTransition:Rc});let Lc=null,Dc=null;const Mc=()=>{null!==Lc&&(window.clearTimeout(Lc),Lc=null)},Oc=()=>{null!==Dc&&(window.clearTimeout(Dc),Dc=null)},Nc=()=>xc,Fc=(e={})=>{Mc(),Oc(),xc.isDuel=e.isDuel??!1,xc.duelHosts=e.duelHosts||[],xc.skipInitialTransition=e.skipInitialTransition??!1,xc.backgroundUrl=e.backgroundUrl||"",xc.avatarUrl=e.avatarUrl||"",xc.showLiveAvatar=e.showLiveAvatar??!1,xc.title=e.title||"",xc.subtitle=e.subtitle||"",xc.avatarSize=e.avatarSize??0,xc.visible=!0,xc.startedAt=Date.now(),(e.autoHideMs??0)>0&&(Dc=window.setTimeout(()=>{$c(),Dc=null},e.autoHideMs))},Uc=(e={})=>{const t=String(e.backgroundUrl||"").trim()||Ec(),i=String(e.characterName||"").trim()||wc.global.t("interact.defaultNames.character");Fc({backgroundUrl:t,avatarUrl:e.avatarUrl||"",showLiveAvatar:e.showLiveAvatar??!0,title:wc.global.t("interact.loading.title"),subtitle:wc.global.t("interact.loading.subtitle",{name:i}),avatarSize:e.avatarSize??0,skipInitialTransition:!0})},Bc=e=>{const t=String(e||"").trim();t&&xc.visible&&xc.backgroundUrl===Ec()&&(xc.backgroundUrl=t)},zc=e=>{const t=String(e||"").trim();t&&xc.visible&&(xc.avatarUrl||(xc.avatarUrl=t))},jc=async e=>{const t=String(e.userId),i=String(e.characterName||"").trim(),r=String(e.avatarUrl||"").trim(),a=(e=>{if("undefined"==typeof window)return null;const t=Tc(e);try{const e=window.sessionStorage.getItem(t);if(!e)return null;const i=JSON.parse(e);return Date.now()-(i.updatedAt||0)>1296e6?(window.sessionStorage.removeItem(t),null):String(i.backgroundUrl||"").trim()||null}catch(i){return null}})(t),n=String(e.backgroundUrl||"").trim()||a||Ec();Ic(n),Uc({backgroundUrl:n,avatarUrl:r,characterName:i,avatarSize:e.avatarSize,showLiveAvatar:e.showLiveAvatar});const s={id:t,source:e.source||"live"};try{const e=Tc(t);window.sessionStorage.setItem(e,JSON.stringify({userId:t,characterName:i,avatarUrl:r,backgroundUrl:n,updatedAt:Date.now()}))}catch(l){}const o=await e.router.push({path:"/characterInteract",query:s});return o&&$c(!0),!o},$c=(e=!1)=>{Mc(),Oc();const t=Date.now()-xc.startedAt,i=e?0:Math.max(0,2e3-t);Lc=window.setTimeout(()=>{xc.visible=!1,xc.title="",xc.subtitle="",xc.avatarSize=0,xc.startedAt=0,Lc=null},i)},Gc=[{key:"terms-service",title:"Terms of Use",titleKey:"legalInformation.items.termsService",path:"/about/termsService",routeName:"termsService",routeTitleKey:"settings.link.termsService",htmlContent:'<span class="rendered_qtext">\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <i>Last Updated: June 6, 2025</i>\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Table of Contents</h4>\r\n        <ul>\r\n          <li>Scope and Consent</li>\r\n          <li>Collection and Use of User Information</li>\r\n          <li>Cookies, SDKs, and Similar Technologies</li>\r\n          <li>Advertising</li>\r\n          <li>\r\n            Reasons for Collection, Processing, and Use of User Information\r\n          </li>\r\n          <li>Sharing, Transfer, Sale, and Disclosure of User Information</li>\r\n          <li>Management of User Information</li>\r\n          <li>Retention of User Information</li>\r\n          <li>Security of User Information</li>\r\n          <li>International Transfer of User Information</li>\r\n          <li>Protection of Children\'s Personal Information</li>\r\n          <li>Regional Privacy Disclosures</li>\r\n          <li>Users\' Rights to Remedies</li>\r\n          <li>Contact Us</li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Thanks for using\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Terms of Use</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          These Terms of Use (as updated periodically, the "Terms") govern the\r\n          website\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          , an online chat platform, along with its associated content,\r\n          features, and tools (collectively, the "Web Services") made available\r\n          to users ("you" or "your") by\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          . This site is managed by us and backed by our affiliates (if\r\n          applicable) (together, "we," "our," or "us").\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Your Acceptance of These Terms\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          These Terms create a binding agreement between you and us, without\r\n          needing any physical, electronic, or digital signature. Agreeing to\r\n          these Terms is essential for accessing our Web Services, so we\r\n          recommend reviewing them thoroughly before proceeding.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Any engagement with the Web Services—such as downloading, installing,\r\n          browsing, activating, signing up, logging in, using, or paying—signals\r\n          your acceptance of these Terms. If you disagree, refrain from using\r\n          the Web Services in any capacity.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Users without an account become non-registered upon first interaction\r\n          and must follow all applicable provisions here, excluding those\r\n          specific to account holders.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          These Terms include key sections on child safety. Individuals under 14\r\n          or the legal minimum age in your area for services (online/offline\r\n          software, commercial/non-commercial, paid/free) are barred from using\r\n          Web Services entirely. If you\'re aged 14–17, discuss these Terms with\r\n          a parent or guardian to ensure full understanding and consent.\r\n          Parents/guardians accepting on behalf of a child are accountable for\r\n          adherence. Any child use implies parental/guardian approval and\r\n          oversight.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          These Terms address purchases and billing. All transactions require\r\n          adult involvement, with possible verification to prevent child errors.\r\n          Per these Terms and laws, completed purchases aren\'t refundable\r\n          without valid cause. To the fullest legal extent, we won\'t process\r\n          refunds for accidental child transactions.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Continued use of Web Services or our offerings post-updates implies\r\n          acceptance of the new version. If unagreed, stop using, or access\r\n          pre-update versions if technically viable.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">User Privacy</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We prioritize safeguarding personal data. We\'ll handle your and/or\r\n          your child\'s information per these Terms, our Privacy Policy, and\r\n          relevant laws. We may sync such data across your devices for enhanced\r\n          service.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Review and accept our Privacy Policy prior to use—engaging with Web\r\n          Services confirms consent. Disagreement? Halt access immediately.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          See our Privacy Policy for full details.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Child User Protection\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>3.1</b>\r\n          We emphasize child safety. Per laws, you confirm you\'re an adult or a\r\n          child\'s parent/guardian. Services reach children only after\r\n          parental/guardian review and acceptance of these Terms. We\'ll cease\r\n          provision upon discovering unapproved child use.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>3.2</b>\r\n          Parents/guardians must educate kids on online safety. Children can\'t\r\n          process payments—only adults may.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>3.3</b>\r\n          Child data protection follows our Privacy Policy and laws strictly.\r\n          Details therein.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Our Services, Subscription, and Payment\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          For these Terms, Web Services cover:\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          - Chatting: converse with yours or others\' creations on the platform;\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          - Premium Services: Paid upgrades yield extra allowances and\r\n          capabilities, granting premium status;\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          - Additional user offerings.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>4.2</b>\r\n          Web Services are solely accessible at\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          .\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>4.3</b>\r\n          Stick to official services—malicious/illegal extractions aren\'t\r\n          covered here. Violators bear consequences; we\'ll pursue remedies\r\n          legally.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>4.4</b>\r\n          We provide a limited, revocable, non-exclusive, non-transferable,\r\n          non-sublicensable license (see End User License Agreement "EULA") to\r\n          access/use Web Services and derived outputs ("Derivative Contents").\r\n          You gain no ownership or IP rights therein.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>4.5</b>\r\n          We may pause/alter services at discretion, sans notice. No liability\r\n          for unavailability. Access/use may be limited anytime.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>4.6</b>\r\n          Usage needs compatible hardware, internet (potential fees), software\r\n          (potential fees), and periodic updates. These factors impact access;\r\n          high-speed connections advised. You own responsibility for evolving\r\n          requirements.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>4.7</b>\r\n          Third-party elements (e.g., payments, links, SDKs) may appear. We\'re\r\n          not liable for related issues, barring legal mandates. Review\r\n          third-party terms/policies before engaging.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">User\'s Account</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>5.1 Account Registration</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          For complete access, sign in via Google, Apple, or\r\n          Facebook—auto-creating a Web Services account. Or, use email and\r\n          complete setup steps.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Start by providing truthful age data. Under-14s or jurisdictional\r\n          minima can\'t use. 14–17-year-olds get Teen Mode only; 18+ unlocks full\r\n          features.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Teen registrations (14–17) need parental/guardian oversight and\r\n          consent. Such use presumes approval.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          As a prerequisite, we may process personal data (e.g., username,\r\n          uploads, payments, device/logs). Provided info must stay accurate,\r\n          current, legal, and non-infringing. All submissions fall under our\r\n          Privacy Policy; you approve our handling per it and laws. You\'ve\r\n          reviewed/understood it and consent to outlined purposes.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Treat security details (e.g., usernames) confidentially—don\'t share.\r\n          Accounts are personal; you\'re liable for all activity. Report breaches\r\n          promptly.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We may disable identifiers anytime, for cause or not, including\r\n          suspected violations.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Only official channels yield valid accounts—unauthorized ones risk\r\n          deletion/suspension at your peril.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Initial use prompts push notification consent; manage later via\r\n          "Profile" > "Settings" > "Notifications."\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>5.2 Account Management</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Login via Google/Apple or custom credentials. No fakes,\r\n          impersonations, or borrowed social logins—violations invite warnings,\r\n          restrictions, terminations, or deletions. We\'re not liable for info\r\n          inaccuracies/delays.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Registration elements (e.g., name, photo) must be legal/non-infringing\r\n          (see DMCA at Section XI). We review/deny as needed;\r\n          illegal/undesirable prompts warnings, corrections, suspensions, or\r\n          bans—your liability.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          No malicious registrations or illicit uses (e.g., disruption, scams).\r\n          Violations trigger measures; you bear costs. We may report to\r\n          authorities per laws.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>5.3 Protection of Account</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Account ownership is ours—you get limited access (per EULA). Secure\r\n          it; no sharing, transfers, sales, or monetization. Breaches invite\r\n          actions; you cover fallout.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Suspect theft/misuse? Alert us with legal proof. Unverifiable?\r\n          Risks/losses are yours.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>5.4 Deletion of Account</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Delete anytime: "Settings" > "Account" > "Delete." Irreversible—loses\r\n          login, services, rights (e.g., premiums). No recovery of data/records;\r\n          new accounts won\'t restore purchases. Backup first.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Eligibility: No disputes, balances, or active premiums.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Disputes (e.g., complaints, probes) pause deletions.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Deletion doesn\'t absolve prior liabilities.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          User Code of Conduct\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>6.1 User Rights</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Use lawfully and per Terms. Rights include:\r\n        </p>\r\n        <ul>\r\n          <li>Submitting service feedback for improvements;</li>\r\n          <li>\r\n            Uploading profile images, compliant with: no illegal, immoral,\r\n            infringing, defamatory, harassing, discriminatory, viral, ad-laden,\r\n            or harmful content.\r\n          </li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Suspected violations? We block/delete sans notice; you bear\r\n          consequences. No liability for your/child\'s breaches—you\'ll\r\n          mitigate/compensate (e.g., damages, fees).\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We needn\'t vet uploads; no responsibility for them or breaches. Yet,\r\n          we may store/use for analysis (with your grant). We\'ll delete\r\n          violative content; no liability for impacts. Backup valuables.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          You absolve us from unauthorized access/alterations, failed\r\n          transmissions, or your illegal acts (e.g., fraud, hacking).\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>6.2 User Obligations</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>6.2.1</b>\r\n          You cover telecom fees from use; carriers bill directly.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>6.2.2</b>\r\n          Adhere to Terms; check updates regularly.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>6.2.3</b>\r\n          Follow laws, order, morals; no security threats/illegals. Suspected\r\n          breaches? Services end sans notice.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>6.2.4</b>\r\n          Prohibited: uploading illegals; exploiting/harming; impersonating;\r\n          faking transmissions; unlicensed posts; spam/ads; viruses;\r\n          tracking/harassing; aiding intrusions; disrupting servers;\r\n          reverse-engineering; legal violations; unauthorized\r\n          monitoring/copying; interfering routines; malware; unauthorized\r\n          access; infringing/illegal/threatening acts; restricting others\'\r\n          enjoyment.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>6.2.5</b>\r\n          Per laws, violations/IP harms log backend and may evidence to\r\n          authorities.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Community Guidelines\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.1 General</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Fostering inclusivity via shared stories/views is core. These\r\n          Guidelines clarify avoidable content to sustain this. Grasp and\r\n          support the intent: respect sensitivities, contribute constructively.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Access/use binds you to Guidelines, incorporated into Terms. Breaches\r\n          risk content removal, suspensions/terminations, liabilities.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.2 Community Rules</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">All must follow:</p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Don\'t post/share content promoting violence/graphics;\r\n          self-harm/suicide; porn/sexual acts/nudity/exploitation (zero child\r\n          tolerance); hate/dehumanizing based on traits (race, disability,\r\n          etc.); illegals; restricted trades (guns, drugs, etc.);\r\n          impersonations; infringements. (Handle claims per Terms.)\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Don\'t: threaten/incite violence/terrorism; harass/discriminate; dox\r\n          without consent; spam/manipulate; scam (financial/identity); unwanted\r\n          contacts; compromise accounts; evade bans (all linked accounts\r\n          disabled).\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Help us: Tolerate diverse /user views—disengage if clashing;\r\n          creators/users can delete/block; unfollow/unlike non-violative\r\n          dislikes.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.3 Report of Issue(s) of Community Guidance</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Unresolvable issues? Email details (links, users, descriptions) per\r\n          "Contact Us." We\'ll reply promptly.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Price, Subscription, and Payment\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.1</b>\r\n          Fees apply to premiums and in-app "Coins."\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.1.1</b>\r\n          (iOS) Monthly tiers; see pages for rates (service-only, pre-tax;\r\n          changeable sans notice). Tokens via app/site; bundles/prices as\r\n          listed, adjustable. Autos renew unless canceled timely; billed\r\n          periodically till stop.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.1.2</b>\r\n          (Android) Monthly tiers; rates pre-tax, adjustable.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.2</b>\r\n          Rates vary by plan; we adjust discretionally.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.3</b>\r\n          Paid scope matches payment-time description. Updates/expansions need\r\n          extra fees at current rates.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.4</b>\r\n          Pricing errors? We correct/cancel/refund within 90 business days.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.5</b>\r\n          You confirm no GST registration; thus, inapplicable. If applicable,\r\n          notify 14+ days pre via "Contact Us" with ID—we\'ll collect/pass\r\n          credits per laws. You\'re liable for your taxes; non-compliance costs\r\n          (penalties, etc.) reimbursable to us.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.6</b>\r\n          Payments route via third-party SDKs (e.g., Apple/Google Pay, Stripe)\r\n          or stores.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.7</b>\r\n          Third-party risks/losses? Ours if we fulfill Terms/laws; review their\r\n          docs.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.8</b>\r\n          Cancel anytime: "Settings" > "Help Center." Note: Cancellation shares\r\n          data (e.g., signup days, activity, purchases) with processor for\r\n          accuracy.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.9</b>\r\n          Per laws, compliant payments non-refundable, even post-cancel.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          The Community Contributor Program\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Purpose: Honor user-created content efforts via CC program rewards.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Qualification: Earn "Points" from others\' spends on your characters (2\r\n          Coins = 1 Point; unlimited characters). 100,000+ Points qualifies.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Reward: CCs redeem Points (max 80% balance per; min 100,000 trigger).\r\n          Ratios per app notices, adjustable sans notice.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Refund: Refunded Coins deduct Points; no alerts—check "Earning\r\n          Details."\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Intellectual Property\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Unless specified, all IP (patents, marks, copyrights, secrets) in our\r\n          content (pages, text, media, designs, data, code) is ours.\r\n          User-generated content IP vests in us per laws; no exploitation sans\r\n          written OK.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Platform IP ours; no unauthorized\r\n          use/modification/derivation/reverse-engineering absent\r\n          consent—liabilities/reporting follow.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Chat Contents</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>1. Accuracy and Responsibility</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          The content generated during the chat represents only the real-time\r\n          personal expression of the chat participant. No guarantee is made\r\n          regarding its completeness, accuracy, or applicability. Users are\r\n          solely responsible for evaluating and assuming the risks of using such\r\n          content. The platform and chat personnel shall not be liable for any\r\n          consequences arising from the use of chat content.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2. Intellectual Property</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Unless otherwise agreed, all texts, voices, images, and other related\r\n          content generated during the chat shall remain the intellectual\r\n          property of the platform. Users may not use such content for any\r\n          commercial purpose without the platform\'s prior written consent.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>3. Risk Notice</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          By using the one-on-one chat service, users understand and accept the\r\n          following potential risks:\r\n        </p>\r\n        <ul>\r\n          <li>Chat content may be incomplete, inaccurate, or misleading;</li>\r\n          <li>\r\n            Conversations may contain expressions that are uncomfortable,\r\n            offensive, or inconsistent with personal values;\r\n          </li>\r\n          <li>Dialogue may involve sensitive, emotional, or biased content;</li>\r\n          <li>\r\n            Some content may cause psychological discomfort, emotional distress,\r\n            or negative experiences.\r\n          </li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>4. Disclaimer</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          The platform and its personnel shall not be liable for any direct or\r\n          indirect losses, disputes, or liabilities resulting from the use of\r\n          chat content. Participation in this service constitutes full\r\n          acknowledgment and acceptance of all terms outlined in this agreement.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>5.</b>\r\n          No unauthorized use/deletion/alteration of Logos (e.g., "{{ name }}"\r\n          marks). No misleading displays/applications; violations fully liable.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>6.</b>\r\n          You warrant uploaded "Licensed Contents" ownership/rights; grant us\r\n          usage per Terms. IP remains yours/original per laws. Disputes? Yours\r\n          to resolve/compensation. Aid our defense if claimed; cover\r\n          infringement losses.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.</b>\r\n          From upload, per laws/privacy: perpetual, irrevocable, royalty-free,\r\n          worldwide, non-exclusive, sublicensable license (repro, adapt, etc.,\r\n          sans attribution) for use/development/licensing in analyses, across\r\n          devices.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.</b>\r\n          License covers permitted uses/reproductions/displays/disseminations.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>9.</b>\r\n          We may protect infringed Licensed Contents (monitor, litigate, etc.);\r\n          you assist, share recoveries post-costs.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          DMCA (Copyright) Compliance Policy\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>General</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          This Policy details infringement claim handling for App/Web, where\r\n          users upload visuals for characters and interact via text/voice. We\r\n          honor IP; users must too. DMCA-compliant notices get swift response.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>DMCA Notification of Claimed Infringement</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Suspect infringement? Submit to Agent below, including:\r\n        </p>\r\n        <ul>\r\n          <li>a) Infringed work(s) ID/list;</li>\r\n          <li>b) Infringing material/location (e.g., link);</li>\r\n          <li>c) Contact details;</li>\r\n          <li>d) Good-faith unauthorized-use belief;</li>\r\n          <li>e) Perjury-accurate/auth statement;</li>\r\n          <li>f) Signature.</li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Email: 5-business-day ACK; mail: 10. Results/decision: 15 business\r\n          days post-ACK. Complex? Estimated timeline (rare extensions).\r\n          Disagree? Submit evidence in 30 days; else, final.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Designated Copyright Agent</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          {{ name }}\r\n          <br />\r\n          Attn: Legal Department\r\n          <br />\r\n          Email:\r\n          <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Counter-Notification Procedures</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Mistaken removal? Counter to Agent:\r\n        </p>\r\n        <ul>\r\n          <li>Removed material/location;</li>\r\n          <li>Good-faith mistake belief (perjury);</li>\r\n          <li>Contact details;</li>\r\n          <li>Jurisdiction/service consent;</li>\r\n          <li>Signature.</li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Termination of Accounts</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Repeat infringers risk account/access termination.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Misrepresentation of Claims</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          False claims liable; we seek damages/fees.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Modification and Termination\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Per business needs/laws, we may alter/pause/end Web Services sans\r\n          liability.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          For cause, suspend/terminate access/delete uploads.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Post-termination: No login/info access; halt collection/use, delete\r\n          personal (retain anonymized/legal data). Doesn\'t waive prior\r\n          liabilities.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Surviving provisions: IP, disclaimers, indemnity, limits. Breaches?\r\n          Recover dues/legal actions.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Amend Terms via posting; continued use = acceptance. Check often;\r\n          disagreement? Cease use.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Disclaimer</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Web Services provided "as is" with tech limits—no defect-free\r\n          guarantee; no warranties (merchantability, fitness, quality, etc.). We\r\n          commit to ongoing enhancements.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Not medical/psych/professional advice—consult experts. No therapeutic\r\n          claims.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Updates optimize; latest version advised for continuity.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Max legal extent, no warranties for: incompatibilities (seek help;\r\n          unresolved? Stop use); interruptions/losses from force\r\n          majeure/hacks/etc.; safety/reliability/timeliness; meeting\r\n          expectations.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          NO DIRECT/INDIRECT/INCIDENTAL/SPECIAL/PUNITIVE DAMAGES FOR\r\n          PROFITS/REPUTE/INFO LOSSES FROM: use/failure; purchases; unauthorized\r\n          changes (non-our fault); Web Services matters.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Secure your account—leaks/thefts non-our fault reduce rights; no\r\n          liability.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Account/device safeguard failures/recoveries? Your losses.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          You assume all download/use risks/consequences; solely liable for\r\n          system/data damages.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We may adjust/terminate sans notice/liability (barring\r\n          laws/agreements).\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Per laws, delete/block for violations; retain/report as needed.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          OUR DIRECT LIABILITY ONLY AS STATED; TOTAL CAP: Fees paid by/for\r\n          you/child.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          NO SPECIAL/INDIRECT/PUNITIVE/INCIDENTAL/CONSEQUENTIAL DAMAGES\r\n          (PROFIT/INTEREST/BUSINESS/MATERIALS), FORESEEABLE OR NOT.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Per laws, indemnify us/providers/suppliers/licensors/officers/etc.\r\n          from claims/liabilities (fees included) from: Term breaches; use; IP\r\n          violations.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Waive claims from our/investigative actions; cooperate in defenses. We\r\n          control if desired; survives Terms/use.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Indemnification</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Per laws, hold us/officers/employees/agents/affiliates harmless from\r\n          claims/costs (fees) tied to Term/Policy breaches.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Governing Law and Dispute Resolution\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Hong Kong SAR laws govern/construe.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Disputes (contractual/non-) resolve via HKIAC arbitration under\r\n          current rules; Hong Kong law applies.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Unless opted out (per Terms exceptions), binding individual\r\n          arbitration; no class actions.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Contact Us</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Queries on site/Terms/Policy?\r\n        </p>\r\n        <ul>\r\n          <li>\r\n            Visit\r\n            <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n            ;\r\n          </li>\r\n          <li>\r\n            Email:\r\n            <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n          </li>\r\n        </ul>\r\n      </span>\r\n    </div>\r\n',seo:{title:"Terms of Service - {appName}",description:"seo.description.termsService",keywords:"{appName} terms of service, terms of use, user agreement",jsonLdType:"Article"}},{key:"privacy-notice",title:"Privacy Policy",titleKey:"legalInformation.items.privacyNotice",path:"/about/privacyPolicy",routeName:"privacyPolicy",routeTitleKey:"settings.link.privacyPolicy",htmlContent:'<span class="rendered_qtext">\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <i>Last Updated: June 6, 2025</i>\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Table of Contents</h4>\r\n        <ul>\r\n          <li>Scope and Consent</li>\r\n          <li>Collection and Use of User Information</li>\r\n          <li>Cookies, SDKs, and Similar Technologies</li>\r\n          <li>Advertising</li>\r\n          <li>\r\n            Reasons for Collection, Processing, and Use of User Information\r\n          </li>\r\n          <li>Sharing, Transfer, Sale, and Disclosure of User Information</li>\r\n          <li>Management of User Information</li>\r\n          <li>Retention of User Information</li>\r\n          <li>Security of User Information</li>\r\n          <li>International Transfer of User Information</li>\r\n          <li>Protection of Children\'s Personal Information</li>\r\n          <li>Regional Privacy Disclosures</li>\r\n          <li>Users\' Rights to Remedies</li>\r\n          <li>Contact Us</li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          This Privacy Policy ("Policy") covers\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          , an online chat platform, along with its associated content, tools,\r\n          features, and capabilities (collectively, the "Web Services") offered\r\n          by\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          ("we," "our," or "us"). This Policy has been established by us in\r\n          compliance with relevant laws to safeguard the personal information of\r\n          users ("you" or "your").\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Scope and Consent</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          This Policy explains the reasons for, methods of, and types of\r\n          personal information we gather, utilize, retain, handle, share,\r\n          transfer, and make public about you, as well as the information\r\n          security safeguards we implement and the rights we uphold for your\r\n          access, modification, removal, and oversight of your personal\r\n          information. Kindly review this Policy alongside the Terms of Use for\r\n          Web Services [Insert hyperlink]. Should you disagree with this Policy,\r\n          please cease using the Web Services immediately.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We maintain the authority to update this Policy whenever necessary,\r\n          and we recommend checking it periodically for the most current\r\n          version. If you cannot agree to any revisions, you must discontinue\r\n          use of the Web Services.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>\r\n            The Web Services are not intended for individuals under 14 years\r\n            old, and our Terms of Service bar usage by anyone under 14, or under\r\n            16 if you reside in the European Economic Area.\r\n          </b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          For child users as defined under the Children\'s Online Privacy\r\n          Protection Act ("COPPA"), we will only offer our Services after the\r\n          child\'s parent or guardian has reviewed this Policy, fully understood\r\n          and accepted all provisions, and provided the legally required\r\n          consent. Unless permitted or mandated otherwise by law, we will\r\n          refrain from gathering, employing, or revealing any personal\r\n          information from a child user without the explicit approval of their\r\n          parent or guardian. Parents have the ability to inspect the personal\r\n          information we have collected about the child, request its deletion,\r\n          and instruct us to halt further collection or utilization of the\r\n          child\'s personal information.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          By visiting and/or engaging with our Services, you affirm that you are\r\n          either an adult who has reached the age of majority in your\r\n          jurisdiction or a minor under the supervision of a parent or legal\r\n          guardian, and that you possess the legal right, permission,\r\n          capability, or authorization to access and/or use our Services while\r\n          committing to follow this Policy.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          This Policy constitutes an electronic agreement governed by applicable\r\n          laws and does not necessitate any physical, electronic, or digital\r\n          signature.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We urge you to examine this Policy thoroughly. By visiting or\r\n          utilizing the Web Services, you indicate that you comprehend, accept,\r\n          and consent to this Policy, including our gathering, utilization,\r\n          handling, sharing, transfer, and disclosure of information you have\r\n          supplied or may supply in the future, for the objectives outlined\r\n          herein and in line with relevant laws.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Collection and Use of User Information\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We will gather personal information (which may occasionally encompass\r\n          sensitive personal data) from you for the aims described in this\r\n          Policy, adhering to the guiding principles of lawfulness, fairness,\r\n          necessity, and openness. If we intend to apply your personal\r\n          information for purposes beyond those specified here or seek to\r\n          collect it for alternative reasons, we will inform you appropriately\r\n          and secure your advance consent where mandated by law. We will not\r\n          solicit more details from you than what is reasonably essential.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          In the United States, "Sensitive Personal Data" encompasses ten\r\n          designated categories of information that U.S. companies might hold or\r\n          acquire. These include various forms of financial, geolocation, and\r\n          health-related data, to name a few. Furthermore, a U.S. company\r\n          holding or acquiring such data on U.S. residents is deemed to possess\r\n          sensitive personal data only if it (i) customizes or adapts products\r\n          or services for specific groups, such as U.S. military personnel or\r\n          federal agency staff with national security roles, (ii) gathers or\r\n          retains such data on no fewer than one million people, or (iii)\r\n          demonstrates a clear business intent to gather or retain such data on\r\n          more than one million people, where that data forms an essential\r\n          element of the company\'s core offerings or services. Genetic testing\r\n          data is also covered under this definition, irrespective of alignment\r\n          with (i), (ii), or (iii).\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          In the European Union, the following types of personal data qualify as\r\n          "sensitive" and must adhere to distinct processing requirements: 1)\r\n          data disclosing racial or ethnic background, political views,\r\n          religious or philosophical convictions; 2) trade union affiliation; 3)\r\n          genetic data, or biometric data used exclusively for uniquely\r\n          identifying an individual; 4) data related to health; 5) data\r\n          pertaining to an individual\'s sexual life or orientation.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We may align your personal information across various mobile devices\r\n          you own to deliver a seamless experience.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>\r\n            Personal Information You Supply While Engaging with Web Services\r\n          </b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We prioritize user privacy and pledge to defend it adequately in every\r\n          key aspect. You consent to our collection of the following personal\r\n          information concerning you:\r\n        </p>\r\n        <ul>\r\n          <li>\r\n            Details required to deliver, sustain, and enhance the Web Services;\r\n          </li>\r\n          <li>\r\n            Information you voluntarily share; information obtained with your\r\n            approval;\r\n          </li>\r\n          <li>\r\n            Information sourced from alternative channels consistent with this\r\n            Policy (for instance, third-party providers or social media sites).\r\n          </li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          "Personal Information" refers to any data, accurate or otherwise,\r\n          relating to an identifiable individual that (a) enables identification\r\n          directly from that data alone; or (b) allows identification when\r\n          combined with other data we hold or are reasonably likely to hold,\r\n          including details in our records that may be refreshed over time.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>\r\n            2.1.2 By creating an account on the Web Services, or by visiting or\r\n            utilizing the Web Services (whether or not you have a user account),\r\n            you agree to furnish us with the essential details outlined here,\r\n            including your personal information.\r\n          </b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          The categories of personal information we might gather from users\r\n          encompass, without limitation:\r\n        </p>\r\n        <ul>\r\n          <li>Email address;</li>\r\n          <li>Username;</li>\r\n          <li>Uploaded images or entered text;</li>\r\n          <li>Transaction and billing history;</li>\r\n          <li>Device details;</li>\r\n          <li>Activity logs;</li>\r\n          <li>Accurate location data;</li>\r\n          <li>Your contact list.</li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          The sections below outline the ways in which your personal information\r\n          could be necessary and obtained.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.1.2.1 Registration</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          You have the option to sign in using your existing Google or Apple\r\n          account. Upon doing so, a Web Services account will be generated\r\n          automatically. Alternatively, you can set up a fresh account using\r\n          your email address by completing our signup process.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Keep in mind that without registering, you might face restrictions on\r\n          accessing select features of the Web Services, though you can still\r\n          explore content and engage with the Chatting tools under limited\r\n          conditions.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.1.2.2 Profile Setup</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          For a more enjoyable interaction with the Web Services, you are\r\n          welcome—but not obligated—to supply a username for setting up a\r\n          profile. Even if you skip adding optional profile details, you\'ll\r\n          continue to access core functionalities without issue.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.1.2.3 Chatting</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          When engaging the "Chatting" function, you can start a conversation\r\n          directly with a real person through our one-on-one chat service.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.1.2.4 Online Transactions</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We provide enhanced premium offerings that require payment via one of\r\n          these two methods:\r\n        </p>\r\n        <ul>\r\n          <li>Direct purchase on the website using a credit card; or</li>\r\n          <li>\r\n            Via a third-party processor (e.g., Apple Pay, Google Pay, and\r\n            similar).\r\n          </li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          As part of processing your transaction, we could gather certain\r\n          financial details (such as billing records or other\r\n          transaction-related data).\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.1.2.5 Support Interactions</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          If you reach out to our support team, you may be asked to share\r\n          account details for authentication purposes. Additionally, providing\r\n          supporting materials (such as images or text descriptions) and contact\r\n          details might be necessary. Lacking these, we may struggle to address\r\n          your inquiry swiftly or in the manner you prefer.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.1.2.6 Permissions Granted by Users</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          You will be prompted to authorize the following:\r\n        </p>\r\n        <ul>\r\n          <li>Microphone: To enable voice-to-text input;</li>\r\n          <li>\r\n            Internet Access: To monitor Wi-Fi status and connectivity for\r\n            improved cellular data performance;\r\n          </li>\r\n          <li>\r\n            Camera: To snap photos or record videos in response to your queries;\r\n          </li>\r\n          <li>\r\n            Identity: To connect and authenticate via a third-party account\r\n            (e.g., Google or Apple);\r\n          </li>\r\n          <li>\r\n            Contacts: To simplify checking if your connections are active on Web\r\n            Services and facilitate in-app networking.\r\n          </li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          The Web Services may also seek access to flashlight and alarm wake\r\n          lock features, which involve no collection of personal data.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.2 Information Gathered Automatically from Users</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          To protect your account\'s integrity and enhance our support, we will\r\n          acquire and apply the data generated from your Web Services\r\n          interactions, limited strictly to what laws allow.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.2.1 Device Details</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          During your use of the Web Services, we collect select device\r\n          attributes, such as device ID, IMEI, OAID, MAC address, browser\r\n          variety, carrier details and usage patterns, location indicators (like\r\n          IP address), model type, OS version, IDFA (iOS-specific), IDFV\r\n          (iOS-specific), and Android ID (Android-specific). These serve as\r\n          unique device markers, which we may link with other personal data we\r\n          obtain to ensure uniform service delivery.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.2.2 Activity Logs</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          The Web Services will routinely log and store user session data,\r\n          including browser specifications, navigation history, and network\r\n          diagnostics. This helps us assess platform engagement, refine\r\n          operations, and elevate service quality.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.3 Information Sourced from External Providers</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.3.1</b>\r\n          With your approval, we may obtain and process personal information\r\n          about you from third-party sources. We handle such data per our\r\n          agreements with those providers and governing regulations, and we\r\n          advise reviewing their terms of service and privacy statements\r\n          closely. Declining a third party\'s handling or transmission of your\r\n          data could prevent full access to Web Services. That said, we never\r\n          mandate sharing more personal details than what\'s reasonably needed\r\n          for our offerings.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.3.2</b>\r\n          Upon signing into Web Services via a social media integration, you\'ll\r\n          be directed to the external platform to authenticate or create an\r\n          account there. Linking through an approved third-party account will\r\n          tie its profile to a newly generated Web Services account. At present,\r\n          we support sign-ins for Google and Apple users. Via this integration,\r\n          we solely retrieve your username and profile image from the\r\n          third-party profile. Note that while the provider might track elements\r\n          like device model, system edition, generated identifiers, handset\r\n          type, device label, ICCID (iOS-only), BSSID (iOS-only), MAC\r\n          (iOS-only), IMSI (iOS-only), or IMEI (iOS-only) for their own needs,\r\n          none of this is shared with or required by us.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>\r\n            WE EXERT NO CONTROL OVER AND DISCLAIM LIABILITY FOR THE MATERIALS,\r\n            PRIVACY PRACTICES, OR OPERATIONS OF ANY EXTERNAL WEBSITES, APPS, OR\r\n            THIRD-PARTY SERVICES. YOU ACKNOWLEDGE THAT WE BEAR NO RESPONSIBILITY\r\n            FOR VIOLATIONS OF YOUR PERSONAL DATA PRIVACY OR ANY DAMAGES ARISING\r\n            FROM YOUR ENGAGEMENT WITH SUCH THIRD-PARTY OFFERINGS.\r\n          </b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.3.3</b>\r\n          For premium service payments routed through third parties, we will\r\n          retrieve your username, profile image, and transaction records from\r\n          them.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>2.4 Situations Where User Approval Is Not Required</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Under relevant legal frameworks, we may collect and process your\r\n          personal information without prior consent in these scenarios,\r\n          provided they apply:\r\n        </p>\r\n        <ul>\r\n          <li>When fulfilling duties imposed by law;</li>\r\n          <li>\r\n            If it pertains directly to national defense, public order, health\r\n            emergencies, or vital societal benefits;\r\n          </li>\r\n          <li>\r\n            In matters tied to criminal probes, legal proceedings, judgments, or\r\n            demands from authorities, including responses to judicial directives\r\n            or summonses;\r\n          </li>\r\n          <li>\r\n            To avert risks to a user\'s safety, assets, or key rights where\r\n            gaining consent proves impractical, or if we suspect harm to our\r\n            assets, other users, or third parties from such actions;\r\n          </li>\r\n          <li>Where you\'ve already disclosed the information publicly;</li>\r\n          <li>As needed to fulfill a contract we\'ve entered at your behest;</li>\r\n          <li>\r\n            Sourced from lawful public outlets, like official reports,\r\n            government publications, or similar;\r\n          </li>\r\n          <li>\r\n            Essential for Web Services upkeep, such as diagnosing faults,\r\n            detecting, and fixing platform-related problems; or\r\n          </li>\r\n          <li>Any other instances outlined or allowed by law.</li>\r\n        </ul>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Cookies, SDKs, and Similar Technologies\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Cookies</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          A cookie refers to a small data packet, typically containing a unique\r\n          identifier, transmitted from a web server to your browser and\r\n          subsequently saved on your device\'s storage.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We exclusively employ cookies that are strictly essential. These are\r\n          vital for allowing navigation within the Web Services and accessing\r\n          its core features, such as maintaining your authentication session and\r\n          entering protected sections. Absent these cookies, some requested\r\n          functionalities would be unavailable. They hold no personal data\r\n          themselves. Our use of them focuses on recalling your login method\r\n          (via email, Google, or Apple account) to deliver services seamlessly.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>SDKs</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          A Software Development Kit (SDK) comprises a suite of tools,\r\n          libraries, guides, sample code, and occasionally APIs that aid\r\n          developers in building apps for targeted platforms, frameworks, or\r\n          hardware. SDKs streamline the addition of specialized capabilities\r\n          into applications without starting from zero.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Our app incorporates third-party SDKs to boost performance and unlock\r\n          specific tools. These may gather data on an automated basis,\r\n          including:\r\n        </p>\r\n        <ul>\r\n          <li>Device markers (e.g., IMEI, MAC address, ad ID);</li>\r\n          <li>\r\n            Interaction metrics (e.g., app usage patterns, time spent in\r\n            sessions);\r\n          </li>\r\n          <li>\r\n            System specs (e.g., IP address, OS details, hardware model, carrier\r\n            network data);\r\n          </li>\r\n          <li>Location details, should you authorize it.</li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Such data from SDKs supports refinements to user interactions,\r\n          performance insights, ad delivery, or elements like in-app\r\n          transactions. We verify that integrated third-party SDKs align with\r\n          data protection regulations and maintain strong privacy frameworks for\r\n          data handling.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Keep in mind that we lack oversight of these third parties\' privacy\r\n          approaches—please consult their policies for specifics.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Advertising</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We permit external ad networks to deploy cookies or comparable\r\n          trackers on your device—be it computer, phone, or otherwise—to track\r\n          your engagement with the Services. This enables (a) tailoring and\r\n          delivering promotional materials informed by your prior site visits\r\n          and interactions across digital platforms, and (b) analyzing\r\n          connections between ad exposures, user responses, and traffic to our\r\n          online properties.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Our external partners might serve ads drawing from your details, such\r\n          as GAID (Google Advertising ID for Android) or IDFA (iOS Advertising\r\n          Identifier), regional data, location indicators, and IP address. This\r\n          Policy does not apply to these Third-party Operators, who operate\r\n          under their separate privacy rules (e.g., TopOn:\r\n          https://help.toponad.com/docs/Privacy-Policy).\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Ads may appear in your browser on desktops. Cookies could tie into\r\n          anonymized aggregates derived from data you\'ve optionally shared with\r\n          us (e.g., hashed versions of your email), which we might pass to\r\n          vendors in non-readable formats.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          You can choose to "opt out" of personalized ads, though this may lead\r\n          to generic ones less aligned with your preferences. To request an\r\n          opt-out, reach us via the "Contact Us" methods below, marking the\r\n          subject as "Opt-out Request."\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Reasons for Collection, Processing, and Use of User Information\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Broadly speaking, we gather, handle, and apply your data for these\r\n          aims and legal justifications.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We leverage information captured via Web Services to:\r\n        </p>\r\n        <ul>\r\n          <li>Deliver our offerings;</li>\r\n          <li>Refine the Web Services platform;</li>\r\n          <li>Address your inquiries and preferences;</li>\r\n          <li>Offer a secure, streamlined, and tailored user journey; and</li>\r\n          <li>\r\n            Collaborate with partners (including the Chat-GPT system) to enable\r\n            robust features.\r\n          </li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>5.2</b>\r\n          We draw on summarized user and non-personal data to examine platform\r\n          dynamics and behaviors, generating consolidated insights.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>5.3</b>\r\n          We apply user data to identify, counter, and probe fraud, security\r\n          incidents, or disallowed/illicit actions; to assert, uphold, or\r\n          contest legal positions; and to enforce our Terms of Use [Insert\r\n          hyperlink] or this Policy. This extends to fulfilling demands from\r\n          governmental or enforcement bodies, or managing grievances under\r\n          regulatory mandates.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>5.4</b>\r\n          We employ user data to reach out for platform maintenance, align with\r\n          your opted communication settings, deliver ancillary services as noted\r\n          during data intake, or pursue other lawful outreach.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Share, Transfer, Selling, and Disclosure of User Information\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>6.1 Sharing of User Information</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          You are entitled to know if your data has been shared. Beyond what\'s\r\n          explicitly noted here or allowed by law, we refrain from sharing\r\n          personal user data with outsiders, except when:\r\n        </p>\r\n        <ul>\r\n          <li>You initiate or explicitly approve the sharing;</li>\r\n          <li>It\'s tied to legal duties we must fulfill;</li>\r\n          <li>\r\n            It concerns national defense, public welfare, health crises, or key\r\n            societal priorities;\r\n          </li>\r\n          <li>\r\n            It supports probes, prosecutions, trials, judgments, or authority\r\n            directives, including judicial summonses;\r\n          </li>\r\n          <li>\r\n            It\'s essential to shield your safety, assets, or vital rights where\r\n            consent is unfeasible, or we detect threats to our holdings, other\r\n            users, or at-risk parties;\r\n          </li>\r\n          <li>You\'ve publicly released the data;</li>\r\n          <li>\r\n            It\'s drawn from open, lawful sources like official bulletins or\r\n            reports;\r\n          </li>\r\n          <li>\r\n            It\'s exchanged with affiliates, subsidiaries, partners, vendors, or\r\n            collaborators to sustain services per this Policy, as required.\r\n          </li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          For seamless, high-caliber support, certain tools rely on our tech\r\n          vendors, so we may delegate data handling to them. We\'ll secure\r\n          binding confidentiality and processing pacts outlining duties, data\r\n          scope, timelines, and objectives. Vendors must adhere solely to our\r\n          directives, this Policy, and security protocols.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          These vendors act as standalone processors seeking your direct nod.\r\n          They may have their own terms and policies—review them to decide on\r\n          consent. Note: Denying access could limit contractor-supported\r\n          features.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          For confirmation on sharing, contact us per "Contact Us" below.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          To "opt out" of sharing, submit a request via "Contact Us," labeling\r\n          the subject "Opt-out Request." Be aware this might restrict certain\r\n          features, as outlined.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>6.2 Transfer of Control Over User Information</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Fundamentally, we won\'t cede control of personal user data to others,\r\n          barring scenarios like mergers, buyouts, insolvency, or wind-downs. In\r\n          those cases, we\'ll alert you to the transfer\'s intent, data\r\n          categories, and recipient.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>6.3 Selling of User Information</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We DO NOT sell user data to any entity. If you suspect commodification\r\n          of your info, alert our Data Protection Officer (DPO) right\r\n          away—details in "Contact Us" below.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>6.4 Disclosure of User Information</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Typically, we withhold user personal data from public view, save for:\r\n        </p>\r\n        <ul>\r\n          <li>\r\n            Fulfilling duties under Terms of Use [Insert hyperlink], this\r\n            Policy, or laws;\r\n          </li>\r\n          <li>Your explicit permission;</li>\r\n          <li>\r\n            Legal mandates from regulations, officials, courts, or summonses; or\r\n          </li>\r\n          <li>\r\n            Necessity to probe, avert, or address unlawful acts, suspected\r\n            scams, safety risks, policy breaches, or as litigation proof.\r\n          </li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>\r\n            6.5 Transfer of Select User Information on Subscription Termination\r\n          </b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          You\'re free to end your paid plan anytime, but note that opting out\r\n          means we\'ll forward some data to your payment processor (e.g., Apple\r\n          Pay, Google Pay, Stripe) for verification. This ensures proper\r\n          handling and includes, without limit: account signup date, activity\r\n          duration, virtual item buys, usage stats, and purchase values.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Management of User Information\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.1 Access, Updates, and Transferability</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Keep your profile data current and accurate. You can access your\r\n          account anytime to review details like profiles and settings. Spot\r\n          inaccuracies or outdated info? Reach us for fixes, per legal\r\n          allowances.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Need a duplicate of held data? We\'ll assist. If feasible and\r\n          reasonable, we can forward it to a third party of your choice.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.2 Revoking or Adjusting Consent</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Basic info is key for full access—revoke specifics via "Settings," or\r\n          contact us.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Post-revocation, we halt related collection/use, potentially pausing\r\n          services. Prior consents remain valid for existing data unless\r\n          deleted.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.3 Account Removal</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.3.1</b>\r\n          To erase your account, navigate "Profile" > "Settings" > "Delete My\r\n          Account," or request via us.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.3.2</b>\r\n          Per laws, we might delay full erasure from backups until system\r\n          refreshes.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.3.3</b>\r\n          Deletion is final—no restoring access to content/functions. Proceed\r\n          thoughtfully.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.4 Handling User Inquiries</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.4.1</b>\r\n          Exercising rights under 7.1–7.3? We\'ll verify identity first, replying\r\n          promptly—within 30 days max post-verification.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>7.4.2</b>\r\n          Requests are free if practical. We may deny those that:\r\n        </p>\r\n        <ul>\r\n          <li>Don\'t pertain to you/your child;</li>\r\n          <li>Are redundant sans justification;</li>\r\n          <li>Demand heavy tech overhauls;</li>\r\n          <li>Jeopardize others\' rights;</li>\r\n          <li>Prove unworkable/unreasonable; or</li>\r\n          <li>Breach Terms [Insert hyperlink], Policy, or laws.</li>\r\n        </ul>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Retention of User Information\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.1</b>\r\n          We\'ll hold personal data only as long as needed for stated/authorized\r\n          aims, or per Terms/law.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.2</b>\r\n          Usage logs stay for analysis, shorter-term unless bolstering\r\n          security/functionality or legally extended.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>8.3</b>\r\n          We retain anonymized aggregates from user data for any suitable\r\n          (business/non-) purpose.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Such data, if untraceable to you/child, isn\'t "personal" legally.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Security of User Information\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>9.1</b>\r\n          We deploy fitting organizational, tech, and physical defenses for user\r\n          data. Multi-tier safeguards (e.g., standard encryption, structures,\r\n          oversight) minimize risks like leaks, damage, abuse, or unauthorized\r\n          handling.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>9.2</b>\r\n          USER DATA SECURITY MATTERS DEEPLY, YET NO ONLINE TRANSMISSION OR\r\n          STORAGE IS FOOLPROOF. WE EMPLOY ROBUST COMMERCIAL PROTECTS, BUT\r\n          ABSOLUTE SAFETY ISN\'T GUARANTEED.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>9.3</b>\r\n          Breach detected? We\'ll assess fast. If high-risk or large-scale, we\'ll\r\n          alert authorities/users ASAP, no later than legal deadlines.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          International Transfer of User Information\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Per laws, your data may cross borders for handling. We\'ll implement\r\n          apt protections to uphold this Policy and regulations.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Reasonable steps ensure secure treatment—no transfers sans sufficient\r\n          safeguards.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Protection of Children\'s Personal Information\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Services target not under-14s; Terms ban under-14s (or under-16s in\r\n          EEA). Spotting COPPA-defined data from under-14s? We\'ll suspend\r\n          accounts and purge as required, retaining minimally for Policy aims if\r\n          lawful.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          You affirm you\'re the parent of any child user or a qualifying adult.\r\n          Disagree with Policy? Avoid Services—we won\'t collect from you/child.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Regional Privacy Disclosures\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Residents of the European Economic Area and United Kingdom</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Web Services acts as "data controller" for "personal data"\r\n          (GDPR-defined) under this Policy, dictating collection/use/disclosure\r\n          per law. EEA/UK rules mandate disclosing legal bases:\r\n        </p>\r\n        <ul>\r\n          <li>\r\n            <b>Contractual Duties:</b>\r\n            Processing to meet our pacts with you.\r\n          </li>\r\n          <li>\r\n            <b>Consent:</b>\r\n            Where law demands, or otherwise per your approval.\r\n          </li>\r\n          <li>\r\n            <b>Legitimate Interests:</b>\r\n            Advancing business goals (e.g., support, promos, analytics,\r\n            security, fraud prevention, legal management) without overriding\r\n            your rights.\r\n          </li>\r\n          <li>\r\n            <b>Legal Obligations:</b>\r\n            Compliance-driven uses/disclosures.\r\n          </li>\r\n        </ul>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Beyond core rights, complain to watchdogs—but try us first; we\'ll\r\n          resolve earnestly.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Residents of California</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          From January 1, 2020, CCPA (amended by CPRA, effective March 29, 2023)\r\n          oversees California personal info handling. We\'re dedicated to\r\n          subscriber CCPA alignment and support compliance.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          For subscribers, we\'re a "service provider": Processing occurs solely\r\n          via contracts for service delivery—we don\'t sell data.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          CCPA duties apply to "sales"/"shares" (in quotes: CCPA-specific). We\r\n          use analytics/ad services that may "share" identifiers (cookies, IPs,\r\n          devices, locations, usage) with partners for off-site ads. Opt out via\r\n          site/app "settings" data-sharing toggle. No knowing "sales"/"shares"\r\n          of under-17s\' data.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          For CCPA/CRPA rights, see Policy. We refresh it for CPRA fit,\r\n          detailing collection/rights.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          CCPA queries? Email:\r\n          <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Residents of Nevada</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Nevada residents can opt out of certain personal info "sales" to\r\n          non-affiliates. Submit via "Contact Us" below, subject: "Nevada Do Not\r\n          Sell Request," with name/email. We don\'t "sell" per NRS Chapter 603A.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Residents of Brazil</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We adhere to LGPD for Brazilian users\' data. Beyond Policy details,\r\n          LGPD rights include: 1) Confirmation of processing; 2) Access/copy; 3)\r\n          Rectification; 4) Anonymization/blocking/deletion of excess; 5)\r\n          Portability; 6) Shared-entity info; 7) Consent revocation; 8)\r\n          Processing objections (e.g., marketing); 9) Automated-decision\r\n          reviews.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Residents of Virginia</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Under VCDPA, Virginia rights: 1) Confirm/access data; 2) Corrections;\r\n          3) Deletions (with exceptions); 4) Portable copies; 5) Opt-outs from\r\n          targeted ads, sales, or impactful profiling.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Exercise via\r\n          <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n          . Response in 45 days (extendable 45 more, with notice). Denials?\r\n          Appeal in writing—we\'ll review/respond in 60 days.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Users\' Rights to Remedies\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          If privacy lapses occur, seek remedies via authorities or courts. For\r\n          Web Services issues, contact us first—we prioritize swift, serious\r\n          handling. See "Contact Us" for details.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Contact Us</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We\'ve set up a dedicated info-protection unit, including a child-data\r\n          specialist.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Contact Our Data Controller</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Our 24/7 data team oversees. Email:\r\n          <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n          , subject: "Attn: Data Controller."\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>Contact Our Data Protection Officer (DPO)</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Project lead doubles as DPO. Email:\r\n          <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n          , subject: "Attn: DPO."\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <b>General Inquiries</b>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Privacy/Policy questions? Use:\r\n        </p>\r\n        <ul>\r\n          <li>\r\n            <span @click="openWebsite" class="clickable-link">\r\n              {{ website }}\r\n            </span>\r\n            Feedback form; or\r\n          </li>\r\n          <li>\r\n            Email:\r\n            <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n          </li>\r\n        </ul>\r\n      </span>\r\n    </div>\r\n',seo:{title:"Privacy Policy - {appName}",description:"seo.description.privacyPolicy",keywords:"{appName} privacy policy, data protection, privacy",jsonLdType:"Article"}},{key:"subscription-policy",title:"Subscription Policy",titleKey:"legalInformation.items.subscriptionPolicy",path:"/about/subscriptionPolicy",routeName:"subscriptionPolicy",routeTitleKey:"route.subscriptionPolicy",htmlContent:'<span class="rendered_qtext">\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    <i>Last Updated: February 05, 2026</i>\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    1. Do I have to pay to use this app?\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    Subscription is not required. You can use our app for free by earning gems\r\n    through tasks such as daily check-ins. All users can enjoy chats without\r\n    content filters. Subscribing or not will not affect this freedom, but you\r\n    will be able to receive more gems to chat more per month and unlock more\r\n    advanced features.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    2. What is the difference between the free and paid plans?\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start"><b>Memory</b></p>\r\n  <ul>\r\n    <li>\r\n      <b>Free plan:</b>\r\n      4k memory. It can remember shorter parts of conversations.\r\n    </li>\r\n    <li>\r\n      <b>All Subscriber plans:</b>\r\n      at least 16k memory. It has a longer recall time for more personalized\r\n      chats.\r\n    </li>\r\n    <li>\r\n      <b>Premium Plan:</b>\r\n      Up to 32k memory.\r\n    </li>\r\n  </ul>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    <b>Features &amp; Benefits</b>\r\n  </p>\r\n  <ul>\r\n    <li>\r\n      <b>Free plan:</b>\r\n      No access to convenient features such as free auto-inspiration, priority\r\n      image generation, or the ability to change maximum reply length.\r\n    </li>\r\n    <li>\r\n      All Subscriber plans enjoy priority image generation, with additional\r\n      features varying by subscription tier.\r\n    </li>\r\n    <li>\r\n      <b>Premium Plan:</b>\r\n      Has free auto-inspiration and advanced features to change the length of AI\r\n      replies.\r\n    </li>\r\n  </ul>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    3. Monthly to annual upgrade refund policy\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    Upgrading from a monthly plan to an annual plan is highly recommended as a\r\n    way to save money, with savings of up to 50% compared to paying monthly. We\r\n    also provide tips to help you save money on the unused portion, depending on\r\n    the payment channel. PayPal is a little different, so please read the\r\n    instructions carefully to avoid potential double billing.\r\n  </p>\r\n  <ul>\r\n    <li>\r\n      <b>Apple App:</b>\r\n      When you upgrade from a lower tier monthly plan to a higher tier annual\r\n      plan, all benefits are updated immediately and you will get a partial\r\n      refund for any unused time on your current monthly plan. When you upgrade\r\n      from the same-tier monthly plan to an annual plan, we add one year of\r\n      annual plan usage after your existing plan.\r\n    </li>\r\n    <li>\r\n      <b>Google Play, PayPal &amp; Credit Card:</b>\r\n      When you upgrade from a lower-tier monthly plan to a higher-tier annual\r\n      plan, all benefits are updated immediately. You only need to pay the\r\n      difference between the two plans, and the unused time will be\r\n      automatically deducted from the price. When you upgrade from the same-tier\r\n      monthly plan to an annual plan, we add one year of annual plan usage to\r\n      your existing plan.\r\n    </li>\r\n    <li>\r\n      <b>Rustore:</b>\r\n      When you upgrade from a lower-tier monthly plan to a higher-tier monthly\r\n      plan, your benefits are upgraded immediately, the gem difference is\r\n      compensated, and a new subscription period begins from the upgrade date.\r\n      When you upgrade from the same-tier monthly plan to an annual plan, your\r\n      tier remains unchanged, the gem difference is compensated, and a new\r\n      annual subscription period begins from the upgrade date.\r\n    </li>\r\n  </ul>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    <b>Note:</b>\r\n    To ensure that you receive a refund or enjoy the difference in price for\r\n    upgrading, we recommend that you upgrade through the same payment method as\r\n    your monthly plan. Switching payment platforms may cause you to miss out on\r\n    these savings.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    4. Annual plan upgrade refund policy\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    You won\'t have any loss when upgrading from a lower annual plan to a higher\r\n    annual plan. We also help you save money on the unused portion, depending on\r\n    the channel.\r\n  </p>\r\n  <ul>\r\n    <li>\r\n      <b>Apple App:</b>\r\n      All benefits are updated immediately, and you will get a partial refund\r\n      for any unused time on your current annual plan.\r\n    </li>\r\n    <li>\r\n      <b>Google Play, Credit Card &amp; Other platforms:</b>\r\n      You only need to pay the difference between the current and new plans, and\r\n      the fee will be automatically adjusted based on the remaining annual\r\n      subscription time.\r\n    </li>\r\n    <li>\r\n      <b>Rustore:</b>\r\n      Your benefits are upgraded immediately, gem differences are compensated,\r\n      remaining future blue gems are converted into red gems at a 0.6 rate, and\r\n      a new annual subscription period begins from the upgrade date.\r\n    </li>\r\n  </ul>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    <b>Note:</b>\r\n    To ensure that you receive a refund or enjoy the difference in price for\r\n    upgrading, we recommend that you upgrade through the same payment method as\r\n    your previous plan. Switching payment platforms may cause you to miss out on\r\n    these savings.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    5. Monthly upgrade recommendation\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    This one is a little tricky for credit card and other platforms. However,\r\n    you still won\'t have any loss to upgrade from a lower annual plan to a\r\n    higher annual plan if you paid through Apple App.\r\n  </p>\r\n  <ul>\r\n    <li>\r\n      <b>Apple App:</b>\r\n      Your benefits are updated immediately, and you will get a partial refund\r\n      for any unused time on your current annual plan.\r\n    </li>\r\n    <li>\r\n      <b>Google Play &amp; Credit Card:</b>\r\n      You only need to pay the difference between the current and new plans, and\r\n      the fee is automatically adjusted based on the remaining monthly\r\n      subscription time.\r\n    </li>\r\n    <li>\r\n      <b>Rustore:</b>\r\n      Your benefits are upgraded immediately, the gem difference is compensated\r\n      in red gems, and a new annual subscription period begins from the upgrade\r\n      date.\r\n    </li>\r\n    <li>\r\n      <b>PayPal:</b>\r\n      If you want to upgrade to a higher monthly plan, your membership benefits\r\n      and remaining days will be renewed immediately according to the annual\r\n      plan. Our system will automatically compensate you with gems for the\r\n      monthly membership days lost due to the PayPal upgrade.\r\n    </li>\r\n    <li>\r\n      <b>Other platforms:</b>\r\n      We suggest you cancel the current monthly plan and buy a higher monthly\r\n      plan after the current month expires. If you have already lost the\r\n      remaining days of your previous month\'s plan due to this payment method,\r\n      contact our team via Discord or email and we will manually compensate you\r\n      for the cost of the lost gems through those platforms.\r\n    </li>\r\n  </ul>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    6. Which platforms and subscriptions will automatically renew?\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    Monthly subscriptions will automatically renew unless you cancel them.\r\n    Annual plans are one-time payments, except for Apple App and Google Play.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    7. What happens if I run out of gems?\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    If you run out of gems, you can recharge your account by upgrading your\r\n    subscription or using the gem recharge option. Subscriptions are a better\r\n    deal than paying for gems, as they also provide more features and models to\r\n    use.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    8. Why is there such a huge difference in gem usage for different models?\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    Because the computing power and cost of different models are too different.\r\n    To meet the needs of different types of users for role-playing and chatting,\r\n    we introduced chat models with different costs. Claude is currently the most\r\n    cutting-edge and advanced model in the world for role-playing. We also\r\n    introduced low-cost models for free users who do not have much demand for\r\n    immersion and memory. The gradient of gem usage is designed according to the\r\n    gradient between the computing power costs of different models.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    9. Why is a subscription plan being introduced?\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    Due to the rising costs of GPU usage and developing advanced AI models, we\r\n    decided to launch a subscription plan for sustainable development. This will\r\n    allow the app tech team to have some financial support to continue providing\r\n    smarter models and new features that enhance your experience.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    10. What is the renewal process for my subscription?\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    Your subscription will automatically renew at the end of each subscription\r\n    period unless you cancel it. You can cancel your subscription at any time to\r\n    stop renewal.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    11. How do I cancel my subscription?\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    You can cancel your subscription at any time by turning off auto-renewal in\r\n    your account settings in Apple ID, Google Play Store, or other platforms. To\r\n    avoid being charged for the next period, cancel at least 24 hours before the\r\n    end of the current subscription period.\r\n  </p>\r\n  <ul>\r\n    <li>\r\n      <b>App Store:</b>\r\n      Open Settings, tap your Apple ID, select Subscriptions, find the\r\n      subscription, then tap Cancel Subscription and confirm.\r\n    </li>\r\n    <li>\r\n      <b>Google Play:</b>\r\n      Open Google Play Store, tap the menu icon, select Subscriptions, find the\r\n      subscription, then tap Cancel Subscription and follow the prompts.\r\n    </li>\r\n    <li>\r\n      <b>Rustore:</b>\r\n      Open RuStore, go to your account page, select Subscriptions, then click\r\n      Cancel a Subscription and confirm.\r\n    </li>\r\n    <li>\r\n      <b>Credit Card:</b>\r\n      Open Settings within your app, select Subscription, then select\r\n      Unsubscribe and confirm.\r\n    </li>\r\n    <li>\r\n      <b>PayPal &amp; Other Platforms:</b>\r\n      Go to the website where you pay your bill and follow that platform\'s\r\n      process to cancel.\r\n    </li>\r\n  </ul>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    Please note: Deleting the app will not cancel your subscription. You need to\r\n    turn off auto-renewal through your account settings.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    12. What happens after I cancel my subscription?\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    You will retain access to all of your subscription benefits until the end of\r\n    your current billing cycle. After that, your subscription will not renew and\r\n    you will no longer have those benefits and features. Refund policies vary by\r\n    platform:\r\n  </p>\r\n  <ul>\r\n    <li>\r\n      <b>App Store:</b>\r\n      Visit Apple\'s support page for refunds.\r\n    </li>\r\n    <li>\r\n      <b>Google Play:</b>\r\n      Visit Google Play\'s support page for refunds.\r\n    </li>\r\n    <li>\r\n      <b>Credit Card, PayPal &amp; Other Platforms:</b>\r\n      Your current subscription period is non-refundable per our policy.\r\n    </li>\r\n  </ul>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    13. What should I do if I haven\'t received my bonus gems after subscribing?\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    We recommend that you try logging in using a different browser, as this may\r\n    resolve the issue immediately. If your account is still showing issues,\r\n    please contact APP Bartender in Discord for help or email support@XXX and we\r\n    will help you find and resolve the issue as soon as possible.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    14. Can the subscription fee be changed in the future?\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    Yes, we reserve the right to change the subscription fee at any time. We\r\n    will notify you of any price changes through the app, email, or other\r\n    important means. If you do not want to pay the new fees, you can cancel your\r\n    subscription before the price change takes effect.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    15. Where can I get more information and help with payments or\r\n    subscriptions?\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    For more details, please join our Discord community and visit the\r\n    #subscription-help channel. Our APP Bartender is always here to answer any\r\n    questions and help you resolve issues.\r\n  </p>\r\n</span>\r\n',seo:{title:"Subscription Policy - {appName}",description:"seo.description.subscriptionPolicy",keywords:"{appName} subscription policy, VIP, membership, cancellation",jsonLdType:"Article"}},{key:"underage-policy",title:"Underage Policy",titleKey:"legalInformation.items.underagePolicy",path:"/about/underagePolicy",routeName:"underagePolicy",routeTitleKey:"route.underagePolicy",htmlContent:'<span class="rendered_qtext">\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <i>Date of Revision: [ 14/01/2026 ]</i>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          At\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          , we are committed to ensuring that our platform\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          ("Platform") is used in a responsible and safe manner by users who\r\n          meet the legal age requirements.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          The Platform features AI-generated adult content and interactive\r\n          simulations exclusively for registered users. Consequently, users must\r\n          be at least 18 years of age or the legal age of majority in their\r\n          country of residence to access and interact with such content. By\r\n          using the Platform, users confirm that they meet the minimum age\r\n          requirement and are legally permitted to access adult content under\r\n          their local jurisdiction.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We have implemented various technical and procedural measures to\r\n          monitor and prevent the registration of underage users.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Content Integrity &amp; Protection of Minors\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We are strictly committed to ensuring that AI-generated content on\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          does not resemble minors, exploit their likeness, or depict any\r\n          individual in an underage context. To this end, we have implemented\r\n          our proprietary content moderation filter and "Safety-First" LLM\r\n          protocols to ensure full adherence to our Terms and Policies.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Registration &amp; Age Verification\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Upon accessing\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          , an initial "Age Gate" landing page, specifically designed to\r\n          restrict access to individuals who are not of legal age, is presented\r\n          to the user. Before accessing the main interface or any AI\r\n          interaction, users are required to confirm their age.\r\n        </p>\r\n        <ul>\r\n          <li>\r\n            <b>Affirmation:</b>\r\n            Users are prompted to affirm that they are 18 years or older. This\r\n            information is a mandatory requirement to verify eligibility.\r\n          </li>\r\n          <li>\r\n            <b>Disclaimer:</b>\r\n            A clear disclaimer emphasizes that users must be of legal age to\r\n            access our services. Providing inaccurate or fraudulent age\r\n            information constitutes a material violation of our Terms of\r\n            Service.\r\n          </li>\r\n          <li>\r\n            <b>Liability:</b>\r\n            <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n            cannot be held liable for any inaccuracies or misrepresentations\r\n            concerning user age. It is the user’s sole responsibility to ensure\r\n            compliance with their local laws regarding the access and\r\n            consumption of AI-generated adult content.\r\n          </li>\r\n        </ul>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Content Responsibility</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          As a user of\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          , you bear sole responsibility for the Output generated by the AI\r\n          Companions through text messages, voice messages, images, and videos\r\n          based on your inputs. The AI Companions learn and respond based on the\r\n          conversations you initiate and the parameters you define.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          You understand and agree that\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          does not endorse specific user-generated prompts. You must ensure that\r\n          your interactions with AI Companions comply with all applicable laws\r\n          and our Blocked Content Policy. Any attempt to generate AI content\r\n          that resembles minors or depicts harmful activities involving minors\r\n          is strictly prohibited.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          Content Moderation &amp; Monitoring\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          At\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          , we prioritize the safety and integrity of our community. While we\r\n          respect user privacy, we have implemented an automated content\r\n          moderation filter based on our proprietary technology to ensure\r\n          compliance with our Blocked Content Policy.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          If our system detects any content violating these terms—particularly\r\n          those relating to the protection of minors—we reserve the right to\r\n          manually review the flagged content. Appropriate actions, including\r\n          immediate account termination and potential reporting to relevant\r\n          authorities, will be taken.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Content Removal</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Any user-generated inputs or AI-generated outputs that we believe, at\r\n          our sole discretion, violate these provisions will be promptly removed\r\n          from the Platform\'s cache and user history.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Contact Information</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          If you observe any violation of these Terms, or if you have questions\r\n          regarding our Underage Policy, please contact our compliance team at:\r\n          <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n          or use the “Report” feature directly within the Platform.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">Termination</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          reserves the right to suspend or permanently terminate the access of\r\n          any user suspected of violating this Underage Policy or attempting to\r\n          bypass our age verification systems.\r\n        </p>\r\n      </span>\r\n    </div>\r\n',seo:{title:"Underage Policy - {appName}",description:"seo.description.underagePolicy",keywords:"{appName} underage policy, age restrictions, child protection",jsonLdType:"Article"}},{key:"content-removal-policy",title:"Content Removal Policy",titleKey:"legalInformation.items.contentRemovalPolicy",path:"/about/contentRemovalPolicy",routeName:"contentRemovalPolicy",routeTitleKey:"route.contentRemovalPolicy",htmlContent:'<span class="rendered_qtext">\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <i>Date of Revision: April 14, 2025</i>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          At\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          , our priority is to maintain a secure and respectful environment for\r\n          all users. This Content Removal Policy details our procedure for\r\n          addressing concerns regarding content that may unintentionally\r\n          resemble real persons. All content available on the\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          is generated solely through artificial intelligence, enabling users to\r\n          create and interact with AI-generated characters. It is crucial to\r\n          understand that any resemblance to actual individuals is unintentional\r\n          and purely coincidental.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          1. Unintentional Resemblance to Actual Persons\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          While all content on the\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          is generated by artificial intelligence, we acknowledge that there may\r\n          be instances of unintentional resemblance to real individuals.\r\n          Acknowledging the potential concerns in such cases, we are committed\r\n          to addressing them swiftly and responsibly.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          2. Content Removal Process\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Individuals who believe that content on the\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          resembles them or another real person may request its removal by\r\n          contacting our compliance team at\r\n          <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n          or by reporting their concern directly via the “Contact” or “Support”\r\n          section on the\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          . We will thoroughly review each request and take appropriate action\r\n          within a reasonable timeframe.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">3. User Verification</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          To ensure the validity and accuracy of content removal requests, we\r\n          may ask individuals to provide suitable proof of their identity or\r\n          their legal relationship to the individual depicted in the content.\r\n          This verification process is in place to handle requests responsibly\r\n          and protect the rights and interests of all parties involved.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">4. Content Removal</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Upon verifying and confirming a legitimate content removal request,\r\n          the specified AI-generated content will be promptly removed from the\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          . Our aim is to complete this process efficiently while adhering to\r\n          applicable laws and regulations regarding digital privacy and\r\n          personality rights.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">5. Privacy</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Respecting privacy is our utmost priority throughout the content\r\n          removal process. All requests are treated with strict confidentiality.\r\n          We will not disclose any personal information or details of the\r\n          requests to third parties without explicit consent, unless legally\r\n          obligated to do so by relevant authorities.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">6. Contact Information</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          If you have any questions or require further clarification regarding\r\n          our Content Removal Policy, please contact us at:\r\n          <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n          or report it directly within the\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          . We are dedicated to addressing concerns promptly and ensuring a\r\n          positive experience for our community.\r\n        </p>\r\n      </span>\r\n    </div>\r\n',seo:{title:"Content Removal Policy - {appName}",description:"seo.description.contentRemovalPolicy",keywords:"{appName} content removal, DMCA takedown, report content",jsonLdType:"Article"}},{key:"blocked-content-policy",title:"Blocked Content Policy",titleKey:"legalInformation.items.blockedContentPolicy",path:"/about/blockedContentPolicy",routeName:"blockedContentPolicy",routeTitleKey:"route.blockedContentPolicy",htmlContent:'<span class="rendered_qtext">\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    <i>Date of Revision: April 14, 2025</i>\r\n  </p>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    At\r\n    <a\r\n      href="{{website}}"\r\n      target="_blank"\r\n      rel="noopener noreferrer"\r\n      class="clickable-link"\r\n    >\r\n      {{domain}}\r\n    </a>\r\n    , our commitment is to provide a secure, respectful, and lawful online\r\n    environment for all users. While users cannot upload content directly to our\r\n    <a\r\n      href="{{website}}"\r\n      target="_blank"\r\n      rel="noopener noreferrer"\r\n      class="clickable-link"\r\n    >\r\n      {{domain}}\r\n    </a>\r\n    , their interactions primarily involve chatting and initiating the creation\r\n    of AI-generated content. This content is accessible only to the individual\r\n    user within their private space and is not publicly available. Nevertheless,\r\n    certain categories of content are strictly prohibited on our\r\n    <a\r\n      href="{{website}}"\r\n      target="_blank"\r\n      rel="noopener noreferrer"\r\n      class="clickable-link"\r\n    >\r\n      {{domain}}\r\n    </a>\r\n    , as detailed in this Blocked Content Policy.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">1. Prohibited Content</h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    This policy applies to all content, including but not limited to text,\r\n    images, voices, and any other AI-generated content produced on the\r\n    <a\r\n      href="{{website}}"\r\n      target="_blank"\r\n      rel="noopener noreferrer"\r\n      class="clickable-link"\r\n    >\r\n      {{domain}}\r\n    </a>\r\n    .\r\n  </p>\r\n  <ul>\r\n    <li>\r\n      <b>a. Illegal Content:</b>\r\n      Content that violates local, national, or international laws and\r\n      regulations is strictly forbidden. This includes, but is not limited to,\r\n      content related to illegal drugs, weapons, violence, or activities that\r\n      advocate for or endorse illegal actions.\r\n    </li>\r\n    <li>\r\n      <b>b. Hate Speech and Discrimination:</b>\r\n      We have a zero-tolerance policy towards content that promotes hate speech,\r\n      discrimination, or harassment based on factors such as race, ethnicity,\r\n      nationality, religion, gender, sexual orientation, disability, or any\r\n      other protected characteristic.\r\n    </li>\r\n    <li>\r\n      <b>c. Violence and Harm:</b>\r\n      Content that encourages, glorifies, or promotes violence, self-harm, or\r\n      harm to others is strictly prohibited.\r\n    </li>\r\n    <li>\r\n      <b>d. Child Exploitation:</b>\r\n      We unequivocally prohibit content that exploits or endangers minors,\r\n      including but not limited to sexual exploitation, harm, or harassment\r\n      towards minors.\r\n    </li>\r\n    <li>\r\n      <b>e. Content Resembling Minors and Explicit Imagery:</b>\r\n      Attempts to generate AI content resembling minors are strictly forbidden.\r\n      Furthermore, in accordance with our platform standards, the generation or\r\n      solicitation of any imagery containing sexually explicit acts or sexually\r\n      explicit content is strictly prohibited.\r\n    </li>\r\n    <li>\r\n      <b>f. Infringement on Privacy and Copyright:</b>\r\n      Any content that infringes upon the privacy, copyrights, or intellectual\r\n      property rights of individuals or entities is not permitted.\r\n    </li>\r\n    <li>\r\n      <b>g. Impersonation:</b>\r\n      Deceptive or malicious impersonation of real individuals, public figures,\r\n      or celebrities is prohibited.\r\n    </li>\r\n  </ul>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">\r\n    2. Content Responsibility\r\n  </h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    As a user of the\r\n    <a\r\n      href="{{website}}"\r\n      target="_blank"\r\n      rel="noopener noreferrer"\r\n      class="clickable-link"\r\n    >\r\n      {{domain}}\r\n    </a>\r\n    , you are solely responsible for the Output generated by the AI Companions.\r\n    The AI Companions learn and respond based on the conversations you initiate.\r\n    You understand and agree that\r\n    <a\r\n      href="{{website}}"\r\n      target="_blank"\r\n      rel="noopener noreferrer"\r\n      class="clickable-link"\r\n    >\r\n      {{domain}}\r\n    </a>\r\n    does not control or endorse the specific content generated by the AI.\r\n    Therefore, you acknowledge full responsibility for your actions while using\r\n    the\r\n    <a\r\n      href="{{website}}"\r\n      target="_blank"\r\n      rel="noopener noreferrer"\r\n      class="clickable-link"\r\n    >\r\n      {{domain}}\r\n    </a>\r\n    .\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">3. Content Moderation</h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    While conversations are generally private, we have implemented a content\r\n    moderation filter, utilizing our proprietary LLM technology, to ensure\r\n    adherence to this Blocked Content Policy. If the filter detects a violation,\r\n    we reserve the right to manually review the flagged content and take\r\n    appropriate action, including account termination.\r\n  </p>\r\n\r\n  <h4 class="qtext_para u-ltr u-text-align--start">4. Contact Information</h4>\r\n  <p class="qtext_para u-ltr u-text-align--start">\r\n    If you observe any violation of these Terms, please contact us at:\r\n    <a\r\n      href="mailto:{{email}}"\r\n      target="_blank"\r\n      rel="noopener noreferrer"\r\n      class="clickable-link"\r\n    >\r\n      {{email}}\r\n    </a>\r\n    or report it directly via the "Report" section on the\r\n    <a\r\n      href="{{website}}"\r\n      target="_blank"\r\n      rel="noopener noreferrer"\r\n      class="clickable-link"\r\n    >\r\n      {{domain}}\r\n    </a>\r\n    .\r\n  </p>\r\n</span>\r\n',seo:{title:"Blocked Content Policy - {appName}",description:"seo.description.blockedContentPolicy",keywords:"{appName} blocked content, content moderation, community guidelines",jsonLdType:"Article"}},{key:"dmca-policy",title:"DMCA",titleKey:"legalInformation.items.dmcaPolicy",path:"/about/dmcaPolicy",routeName:"dmcaPolicy",routeTitleKey:"route.dmcaPolicy",htmlContent:'<span class="rendered_qtext">\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <i>Date of Revision: April 14, 2025</i>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          values and upholds the intellectual property rights of others, and we\r\n          are dedicated to adhering to the Digital Millennium Copyright Act\r\n          (DMCA) and other applicable copyright laws. Our DMCA Policy outlines\r\n          the procedures we undertake to address notifications of copyright\r\n          infringement and provides instructions on how to contact us if you\r\n          believe your copyrighted material has been used on our platform\r\n          without proper authorization.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          1. Reporting Copyright Infringement\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          If you have a good-faith belief that materials transmitted, displayed,\r\n          or created through\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          ("Platform") infringe your copyright, you (or your authorized agent)\r\n          may send us a notice requesting the removal of the material or the\r\n          blocking of access to it. Please provide the following information in\r\n          writing:\r\n        </p>\r\n        <ol>\r\n          <li>\r\n            An electronic or physical signature of the copyright owner (or an\r\n            individual authorized to act on their behalf);\r\n          </li>\r\n          <li>\r\n            A description of the copyrighted work you claim has been infringed,\r\n            including sufficient details (such as a URL or specific Character\r\n            ID) for us to locate the material on the Platform;\r\n          </li>\r\n          <li>Your address, telephone number, and email address;</li>\r\n          <li>\r\n            A statement by you indicating a good-faith belief that the disputed\r\n            use is not authorized by the copyright owner, its agent, or\r\n            applicable law;\r\n          </li>\r\n          <li>\r\n            A statement by you, made under penalty of perjury, confirming that\r\n            the information in your notice is accurate and that you are the\r\n            copyright owner or duly authorized to act on the copyright owner`s\r\n            behalf.\r\n          </li>\r\n        </ol>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          2. DMCA Notices Response\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Upon receiving a complete and valid infringement notice,\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          will undertake the following actions:\r\n        </p>\r\n        <ol>\r\n          <li>\r\n            Review and verify that the submitted documents meet DMCA legal\r\n            requirements;\r\n          </li>\r\n          <li>\r\n            Take appropriate preliminary measures against the alleged\r\n            infringement within 1-3 business days of receiving the information,\r\n            including, but not limited to, removing the specific AI-generated\r\n            content or blocking the offending account/link;\r\n          </li>\r\n          <li>\r\n            Notify the user who generated or uploaded the content, requesting an\r\n            explanation and supporting evidence if applicable.\r\n          </li>\r\n        </ol>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          3. Counter Notification\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          If you believe in good faith that a notice of copyright infringement\r\n          has been wrongly filed against you (for example, if you believe the\r\n          AI-generated output is original and non-infringing), you may submit a\r\n          counter-notice to us. Upon receipt, we will notify the original\r\n          claimant. According to DMCA guidelines, your content may be re-enabled\r\n          within 10-14 business days unless the copyright owner initiates legal\r\n          action against you within this timeframe.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">4. Contact Information</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          All notices and counter-notices should be sent to our designated\r\n          Compliance Officer via email at:\r\n          <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n          . We are committed to addressing concerns promptly to ensure a secure\r\n          environment for all creators and users.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          5. Repeat Infringer Policy\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          reserves the right to suspend or permanently terminate access to the\r\n          Platform for any user who is determined to be a "repeat infringer."\r\n          We define a repeat infringer as any user who has been notified of\r\n          infringing activity more than twice and/or has had content removed\r\n          from the Platform on multiple occasions.\r\n        </p>\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          6. Deepfake Prohibitions in Terms and Conditions\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Clarification Statement:\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Please note that our platform does NOT permit the creation of deepfakes under any circumstances. The unauthorized creation, upload, or processing of deepfake content, or the non-consensual use of any real human individual\'s likeness, is strictly prohibited on our platform.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          To maintain full alignment with card brand compliance and global digital safety standards, SYNAPSE FLOW LIMITED explicitly outlaws this behavior within our official legal framework.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Below are the exact clauses and locations within our Terms and Conditions (Terms of Service) where these strict prohibitions are mandated:\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          1) Prohibited User Conduct & Content Restrictions\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          "Users are expressly prohibited from utilizing the platform’s interactive text or system architectures to simulate, request, or attempt to generate content that replicates, mimics, or counterfeits the identity, voice, or likeness of any real human individual, living or deceased. The platform is designed strictly for purely fictional, stylized digital narrative engagement."\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          2) Intellectual Property & Synthetic Content Material Controls\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          "All graphical avatars, visual designs, and media materials provided by the company are entirely synthetic, artistic assets generated via compliant third-party foundational models in strict conformity with upstream licensing rules. Users do not possess the right, and are programmatically barred, from uploading real human photographs or external biometrics to generate deepfakes or non-consensual synthetic depictions. Any attempt to bypass these architectural guardrails constitutes a material breach of these Terms."\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          3)Termination of Service & Enforcement Zero-Tolerance\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          "This Website retains an absolute, zero-tolerance enforcement policy against the facilitation of deepfakes, non-consensual imagery, or impersonation. Any user account flagged by our real-time semantic firewalls or automated post-generation output scrubbing for attempting to engineer deepfake content or simulate real-person likenesses will face immediate, permanent service termination, forfeiture of subscription remaining balances, and a permanent ban from our digital networks."\r\n        </p>\r\n      </span>\r\n    </div>\r\n',seo:{title:"DMCA Policy - {appName}",description:"seo.description.dmcaPolicy",keywords:"{appName} DMCA, copyright, takedown notice",jsonLdType:"Article"}},{key:"complaint-policy",title:"Complaint Policy",titleKey:"legalInformation.items.complaintPolicy",path:"/about/complaintPolicy",routeName:"complaintPolicy",routeTitleKey:"route.complaintPolicy",htmlContent:'<span class="rendered_qtext">\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <i>Date of Revision: April 14, 2025</i>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          At\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          , we value our users and strive to provide a positive experience. We\r\n          understand that concerns or complaints may arise from time to time,\r\n          and we are committed to addressing them promptly and effectively. This\r\n          Complaint Policy outlines the process for users to file complaints\r\n          regarding any issues encountered while using our platform.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          The\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          and/or any of our online channels, affiliated platforms, products, or\r\n          services, including all content contained therein, are referred to\r\n          herein as “Services.”\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">1. Customer Support</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          We have a dedicated support team to assist our users with any concerns\r\n          or complaints. Our support team is committed to providing prompt and\r\n          effective assistance. Users can contact our support team should they\r\n          come across any issues or have inquiries regarding our Services. All\r\n          inquiries are managed with professionalism, confidentiality, and\r\n          impartiality.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          2. Submitting a Complaint\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Users who wish to file a complaint can do so by contacting our\r\n          customer support team through\r\n          <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n          , or via the “Contact Us” area on the\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          .\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          3. Information to Include in the Complaint\r\n        </h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          When submitting a complaint, users are encouraged to provide the\r\n          following details to help us investigate and address the issue\r\n          promptly:\r\n        </p>\r\n        <ul>\r\n          <li><b>a)</b> User’s full name and email address;</li>\r\n          <li>\r\n            <b>b)</b>\r\n            Description of the complaint, including relevant details such as the\r\n            date and time of the incident;\r\n          </li>\r\n          <li>\r\n            <b>c)</b>\r\n            Any supporting documentation or screenshots, if applicable.\r\n          </li>\r\n        </ul>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">\r\n          4. Documentation of Complaint Review Process\r\n        </h4>\r\n        <ul>\r\n          <li>\r\n            <b>a) Receipt and Acknowledgment:</b>\r\n            Upon receiving a complaint, we will acknowledge receipt within 24\r\n            hours. This acknowledgment will include a reference number and the\r\n            name of the representative handling the case.\r\n          </li>\r\n          <li>\r\n            <b>b) Investigation:</b>\r\n            Each complaint will be thoroughly investigated. This involves\r\n            reviewing the complaint details, gathering relevant information,\r\n            and, if necessary, contacting the complainant for additional\r\n            information.\r\n          </li>\r\n          <li>\r\n            <b>c) Decision-Making:</b>\r\n            The process will be carried out by a designated Complaints Officer\r\n            or a relevant team. This includes an evaluation of gathered\r\n            information and the application of relevant policies or legal\r\n            requirements to reach a fair conclusion.\r\n          </li>\r\n          <li>\r\n            <b>d) Documentation:</b>\r\n            Every step of the process, from receipt to resolution, will be fully\r\n            documented, including dates, actions taken, and the rationale\r\n            behind the final decision.\r\n          </li>\r\n        </ul>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">5. Duration of Each Step</h4>\r\n        <ul>\r\n          <li>\r\n            <b>a) Overall Resolution Timeline:</b>\r\n            The entire resolution process, from receipt to the communication of\r\n            the outcome, will not exceed 7 calendar days.\r\n          </li>\r\n          <li>\r\n            <b>b) Immediate Action on Illegal Content:</b>\r\n            <ol>\r\n              <li>\r\n                <b>Detection:</b>\r\n                If a complaint pertains to illegal content, particularly that\r\n                flagged by our safety filters, it will be immediately escalated.\r\n              </li>\r\n              <li>\r\n                <b>Removal:</b>\r\n                Illegal content will be removed immediately once identified and\r\n                reviewed, in compliance with legal standards and our internal\r\n                policies.\r\n              </li>\r\n            </ol>\r\n          </li>\r\n          <li>\r\n            <b>c) Updates:</b>\r\n            Complainants will be updated regularly. If a resolution is expected\r\n            to take longer than the stipulated timeframe, the user will be\r\n            informed of the reasons for the delay.\r\n          </li>\r\n        </ul>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">6. Escalation</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          If a user is dissatisfied with the resolution provided, they may\r\n          request further escalation. The case will be reviewed by individuals\r\n          or teams not initially involved in the original resolution process to\r\n          ensure an impartial reassessment.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">7. Chargebacks</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          To uphold the integrity of transactions, our payment processing team\r\n          thoroughly investigates any disputed charges. Users found to be\r\n          engaging in wrongful or fraudulent chargeback practices risk being\r\n          placed on a blacklist, which may result in a permanent ban from the\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          and future services. We strongly encourage users to contact our\r\n          Customer Support Center first to resolve any uncertainties or billing\r\n          concerns to avoid unfounded disputes.\r\n        </p>\r\n\r\n        <h4 class="qtext_para u-ltr u-text-align--start">8. Fraud Mitigation</h4>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Our goal is to provide secure, reliable payment processing in\r\n          compliance with payment card industry standards. To prevent\r\n          unauthorized transactions, we implement rigorous customer verification\r\n          measures and promptly investigate any suspected fraudulent activity to\r\n          protect our community and the\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          .\r\n        </p>\r\n      </span>\r\n    </div>\r\n',seo:{title:"Complaint Policy - {appName}",description:"seo.description.complaintPolicy",keywords:"{appName} complaint policy, file complaint, resolution process",jsonLdType:"Article"}},{key:"2257-exemption",title:"18 U.S.C. 2257 Exemption",titleKey:"legalInformation.items.exemption2257",path:"/about/exemption2257",routeName:"exemption2257",routeTitleKey:"route.exemption2257",htmlContent:'<span class="rendered_qtext">\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <i>Date of Revision: April 14, 2025</i>\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          operates as a purely AI-generated content platform where no real\r\n          individuals are portrayed or engaged in any content creation. Every\r\n          piece of content accessible on\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          and/or any of our online channels, affiliated websites, products, or\r\n          services, including all content contained therein ("Services"), is\r\n          exclusively generated through artificial intelligence (AI)\r\n          technology.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Furthermore,\r\n          <a href="{{website}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{domain}}\r\n    </a>\r\n          strictly prohibits and does not feature any images, videos, or visual\r\n          depictions containing sexually explicit content or sexually explicit\r\n          acts.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          While our advanced AI technology creates realistic visual outputs,\r\n          these are strictly non-sexual, computer-generated entities. This\r\n          method fundamentally eliminates the participation or involvement of\r\n          real human beings in the creation of any material available on our\r\n          Services.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          Accordingly, the Federal Labeling and Record-Keeping Law (18 U.S.C. §\r\n          2257), which pertains to the depiction of actual human beings engaged\r\n          in sexually explicit conduct, is not applicable to our Services.\r\n        </p>\r\n        <p class="qtext_para u-ltr u-text-align--start">\r\n          If you have any questions or require further clarification regarding\r\n          our 18 U.S.C. 2257 Exemption and our content policies, please contact\r\n          us at:\r\n          <a href="mailto:{{email}}" target="_blank" rel="noopener noreferrer" class="clickable-link">\r\n      {{email}}\r\n    </a>\r\n          or directly report via the “Contact” or “Support” section within the\r\n          Platform.\r\n        </p>\r\n      </span>\r\n    </div>\r\n',seo:{title:"18 U.S.C. 2257 Exemption - {appName}",description:"seo.description.exemption2257",keywords:"{appName} 2257 exemption, record-keeping requirements",jsonLdType:"Article"}}],qc=Object.fromEntries(Gc.map(e=>[e.path,e])),Hc="_gclid";function Vc(){const e=function(){try{return new URLSearchParams(window.location.search).get("gclid")}catch(e){return null}}();e&&function(e,t,i){try{const r=new Date;r.setTime(r.getTime()+24*i*60*60*1e3);const a=`expires=${r.toUTCString()}`;document.cookie=`${e}=${t};${a};path=/;SameSite=Lax`}catch(r){}}(Hc,e,7)}function Wc(){return function(e){try{const t=`${e}=`,i=document.cookie.split(";");for(let e=0;e<i.length;e++){let r=i[e];for(;" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null}catch(t){return null}}(Hc)}function Kc(){var e,t,i,r,a,n,s;const o=null==(r=null==(i=null==(t=null==(e=window.__APP_CONFIG__)?void 0:e.analytics)?void 0:t.platforms)?void 0:i.googleAds)?void 0:r.config;return{accountId:(null==o?void 0:o.accountId)||"AW-18389099571",conversionLabels:{signUp:(null==(a=null==o?void 0:o.conversionLabels)?void 0:a.signUp)||"fkqFCNDGkPAcELPIzcBE",purchase:(null==(n=null==o?void 0:o.conversionLabels)?void 0:n.purchase)||"TsYgCNqgkPAcELPIzcBE",pageView:(null==(s=null==o?void 0:o.conversionLabels)?void 0:s.pageView)||"nOyeCK7_guMcELPIzcBE"}}}const Yc="__reported_orders__";function Jc(){return"undefined"!=typeof window&&"function"==typeof window.gtag}function Xc(){try{const e=localStorage.getItem(Yc);if(!e)return{};return JSON.parse(e)||{}}catch(e){return{}}}function Qc(e){try{localStorage.setItem(Yc,JSON.stringify(e))}catch(t){}}function Zc(e){if(!e)return!1;!function(){const e=Xc(),t=Date.now();let i=!1;for(const r in e)t-e[r]>2592e6&&(delete e[r],i=!0);i&&Qc(e)}();return e in Xc()}const ed=()=>oc(()=>import("./index.8mekoGvv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35])),td=[{path:"/vipGuidePreview",component:()=>oc(()=>import("./index.CEGOAjGU.js"),__vite__mapDeps([36,32,2,17,29,30,33,8,12,34,37])),name:"VipGuidePreview",meta:{hidden:!0,title:""}},{path:"/redirect",component:ed,meta:{hidden:!0},children:[{path:"/redirect/:path(.*)",component:()=>oc(()=>import("./index.D0mZUFFK.js"),__vite__mapDeps([38,2]))}]},{path:"/about",name:"/about",children:[...Gc.map(e=>({path:e.path.replace("/about/",""),component:()=>oc(()=>import("./legalDocumentDetail.Dhj7bwoA.js"),__vite__mapDeps([39,2,21,22,40,8,17,12,34,41])),name:e.routeName,meta:{title:e.routeTitleKey,...e.seo?{seo:e.seo}:{}}})),{path:"ipAccess",component:()=>oc(()=>import("./ipAccess.DShdFPG5.js"),__vite__mapDeps([42,2,8,17,12,34,43])),name:"ipAccess",meta:{title:"errorPage.ipAccess"}}]},{path:"/auth",name:"/auth",children:[{path:"google-callback",component:()=>oc(()=>import("./google-callback.DsZqycjz.js"),__vite__mapDeps([44,2,8,17,12,34,45])),name:"GoogleCallback",meta:{title:""}},{path:"email",component:()=>oc(()=>import("./email-callback.7AuUyISD.js"),__vite__mapDeps([46,2,17,8,12,34,47])),name:"EmailCallback",meta:{title:""}}]},{path:"/",name:"/",component:ed,children:[{path:"",component:()=>oc(()=>import("./index.ZFhGiS_O.js"),__vite__mapDeps([48,49,27,2,28,17,50,51,12,52,8,53,14,54,5,23,24,55,56,57,58,34,59,60,61,62,63,64,65,40,66])),name:"Home",meta:{title:"",tabs:!0,navbar:!0,keepAlive:!0,seo:{title:"{appName} -AI Live Interaction Chat | AI Character Chat, 24/7 AI Companion;Voice Calls",description:"Meet OnlyGF, a 24/7 1-on-1 AI companion for live interaction, personalized girlfriend chat, evolving stories, different-pose images, and videos in chat.",keywords:"AI character chat, custom AI characters, AI voice calls, AI companion",canonical:"/"}}},{path:"guides",name:"Guides",component:()=>oc(()=>import("./index.DJF5WL3V.js"),__vite__mapDeps([67,49,27,2,28,17,50,8,12,34,68])),meta:{navbar:!0}},{path:"guides/:slug(ai-character-chat|create-ai-character|ai-voice-calls|pk-live-rewards|ai-images-videos|private-ai-companions)",name:"GuideArticle",component:()=>oc(()=>import("./index.DJF5WL3V.js"),__vite__mapDeps([67,49,27,2,28,17,50,8,12,34,68])),meta:{navbar:!0}},{path:"call",name:"StudioCall",component:()=>oc(()=>import("./index.FUUxylIo.js"),__vite__mapDeps([69,2,17,8,12,34,70])),meta:{auth:!0,tabs:!0,navbar:!0,studioPage:"call",seo:{robots:"noindex,follow"}}},{path:"collection",name:"StudioCollection",component:()=>oc(()=>import("./index.FUUxylIo.js"),__vite__mapDeps([69,2,17,8,12,34,70])),meta:{auth:!0,navbar:!0,studioPage:"collection",seo:{robots:"noindex,follow"}}},{path:"create-character",name:"StudioCreate",component:()=>oc(()=>import("./index.FUUxylIo.js"),__vite__mapDeps([69,2,17,8,12,34,70])),meta:{auth:!0,tabs:!0,navbar:!0,studioPage:"characters/new",seo:{robots:"noindex,follow"}}},{path:"my-ai",name:"StudioMyAi",component:()=>oc(()=>import("./index.FUUxylIo.js"),__vite__mapDeps([69,2,17,8,12,34,70])),meta:{auth:!0,tabs:!0,navbar:!0,studioPage:"my-ai",seo:{robots:"noindex,follow"}}},{path:"pk",redirect:e=>({path:"/duel",query:e.query,hash:e.hash})},{path:"pk/:roomId",redirect:e=>({path:cc(String(e.params.roomId)),query:e.query,hash:e.hash})},{path:"duel",beforeEnter:async e=>{const{preparePkEntry:t}=await oc(async()=>{const{preparePkEntry:e}=await import("./entry-loading.D1ltOKph.js");return{preparePkEntry:e}},__vite__mapDeps([71,64,65,2,8,17,12,34]));return t("string"==typeof e.params.roomId?lc(e.params.roomId):void 0)},component:()=>oc(()=>import("./index.4NqJL3gk.js"),__vite__mapDeps([72,2,64,8,17,12,34])),name:"PkRooms",meta:{title:"",navbar:!1,seo:{robots:"noindex,follow"}}},{path:"duel/:roomId",beforeEnter:async e=>{const{preparePkEntry:t}=await oc(async()=>{const{preparePkEntry:e}=await import("./entry-loading.D1ltOKph.js");return{preparePkEntry:e}},__vite__mapDeps([71,64,65,2,8,17,12,34]));return t("string"==typeof e.params.roomId?lc(e.params.roomId):void 0)},component:()=>oc(()=>import("./room.03KDGrPz.js"),__vite__mapDeps([73,2,71,64,65,8,17,12,34,74,75,76,77,78,79])),name:"PkRoom",meta:{title:"",navbar:!1,seo:{robots:"noindex,follow"}}},{path:"characterList",component:()=>oc(()=>import("./index.CkM6pEjR.js"),__vite__mapDeps([80,81,54,2,75,8,53,14,5,12,23,24,55,17,56,57,58,34,59,60,61,82,83,19,20,62,63,84,21,22,85,86])),name:"Character",meta:{title:"",navbar:!0,showBack:!0,seo:{title:"AI Character List - {appName}",description:"seo.description.characterList",keywords:"AI character list, AI companion, virtual AI chat, {appName} characters",jsonLdType:"ItemList"}}},{path:"characterSearch",component:()=>oc(()=>import("./index.B6DXMs7N.js"),__vite__mapDeps([87,81,54,2,75,8,16,17,18,82,83,12,34,88])),name:"CharacterSearch",meta:{title:"",navbar:!0,showBack:!0,seo:{title:"Search AI Characters - {appName}",robots:"noindex,follow",description:"seo.description.characterSearch",keywords:"search AI characters, find AI companion, {appName} search"}}},{path:"characterDetail/:id",component:()=>oc(()=>import("./index.DaUHIvjE.js"),__vite__mapDeps([89,58,34,8,2,59,55,17,56,16,18,57,21,22,90,91,82,83,74,12,75,76,60,92])),name:"CharacterDetail",meta:{title:"",seo:{title:"AI Character - {appName}",description:"seo.description.characterDetail",keywords:"AI character, AI girlfriend, virtual companion, {appName}",robots:"index,follow"}}},{path:"private-character/:id",name:"PrivateCharacterProfile",component:()=>oc(()=>import("./character-profile.CLPJI-1t.js"),__vite__mapDeps([93,58,34,8,2,59,17,82,83,94,12,95])),meta:{auth:!0,seo:{robots:"noindex,nofollow"}}},{path:"characterChat/studio-:id",name:"PrivateCharacterChat",component:()=>oc(()=>import("./index.ohNCA8gy.js"),__vite__mapDeps([96,90,2,91,10,11,12,6,13,4,5,7,14,15,8,57,58,34,59,94,60,3,97,25,98,17,31,16,18,21,22,74,75,76,99])),meta:{auth:!0,studioCharacter:!0,seo:{robots:"noindex,nofollow"}}},{path:"characterChat/:id",component:()=>oc(()=>import("./index.ohNCA8gy.js"),__vite__mapDeps([96,90,2,91,10,11,12,6,13,4,5,7,14,15,8,57,58,34,59,94,60,3,97,25,98,17,31,16,18,21,22,74,75,76,99])),name:"CharacterChat",meta:{title:"",seo:{title:"AI Chat - {appName}",description:"seo.description.characterChat",keywords:"AI chat, AI girlfriend, virtual companion, {appName}",robots:"noindex,nofollow"}}},{path:"characterInteract",component:()=>oc(()=>import("./index.DFf39TXi.js"),__vite__mapDeps([100,2,17,101,8,16,18,97,25,98,77,78,12,34,102])),name:"CharacterInteract",meta:{title:"",navbar:!1,seo:{robots:"noindex,follow"}}},{path:"chatHistory",component:()=>oc(()=>import("./index.CYWq1F5F.js"),__vite__mapDeps([103,81,54,2,75,8,1,3,4,5,6,7,9,23,24,16,17,18,60,82,83,12,34,104])),name:"ChatHistory",meta:{title:"",tabs:!0,navbar:!0,seo:{title:"Chat History - {appName}",description:"seo.description.chatHistory",keywords:"AI chat history, continue AI chat, {appName} messages",robots:"noindex,follow"}}},{path:"userCenter",component:()=>oc(()=>import("./index.CLXt5-0F.js"),__vite__mapDeps([105,53,2,14,54,5,12,23,24,55,17,56,57,58,34,8,59,60,61,81,75,82,83,4,6,7,16,18,26,106,27,28,107,31,30,108])),name:"UserCenter",meta:{title:"",auth:!0,tabs:!0,navbar:!0,hideMobileNavbar:!0,seo:{title:"User Center - {appName}",description:"seo.description.userCenter",keywords:"{appName} user center, profile settings, AI companion account",robots:"noindex,follow"}}},{path:"userCenterEdit",component:()=>oc(()=>import("./index.CWZzSClY.js"),__vite__mapDeps([109,16,17,2,18,84,21,22,85,26,106,27,28,107,8,12,34,110])),name:"UserCenterEdit",meta:{title:"route.userCenterEdit",auth:!0,seo:{robots:"noindex,follow"}}},{path:"rechargeCenter",component:()=>oc(()=>import("./index.DGedZSlh.js"),__vite__mapDeps([111,2,26,8,17,12,34,112])),name:"RechargeCenter",meta:{title:"",tabs:!0,seo:{title:"Recharge Center - {appName}",description:"seo.description.rechargeCenter",keywords:"recharge coins, subscribe, {appName} premium",jsonLdType:"Product",robots:"noindex,follow"}}},{path:"rechargeHistory",component:()=>oc(()=>import("./index.DtZCm0tj.js"),__vite__mapDeps([113,81,54,2,75,8,17,82,83,84,21,22,85,12,34,114])),name:"RechargeHistory",meta:{title:"",seo:{robots:"noindex,follow"}}},{path:"webTutorial",component:()=>oc(()=>import("./index.Dm2sSBFZ.js"),__vite__mapDeps([115,21,2,22,17,8,12,34,116])),name:"WebTutorial",meta:{title:"",seo:{title:"Web Tutorial - {appName}",description:"seo.description.webTutorial",keywords:"{appName} tutorial, how to use {appName}, AI chat guide",jsonLdType:"Article"}}},{path:"contactUs",component:()=>oc(()=>import("./index.DeoAunCS.js"),__vite__mapDeps([117,84,21,2,22,85,17,8,12,34,118])),name:"ContactUs",meta:{title:"route.contactUs",seo:{title:"Contact Us - {appName}",description:"seo.description.contactUs",keywords:"{appName} contact, AI companion support, {appName} help",canonical:"/contactUs",jsonLdType:"ContactPage"}}},{path:"faq",component:()=>oc(()=>import("./index.C1whVzB0.js"),__vite__mapDeps([119,49,27,2,28,17,50,82,83,51,12,52,8,34,120])),name:"Faq",meta:{seo:{title:"FAQ - {appName}",description:"seo.description.home",jsonLdType:"Article"},title:"home.faq.title",navbar:!0}},{path:"about/legalInformation",component:()=>oc(()=>import("./legalInformation.DizP9Wt4.js"),__vite__mapDeps([121,21,2,22,17,8,12,34,122])),name:"legalInformation",meta:{title:"route.legalInformation",navbar:!0}},{path:"m3u8Player",component:()=>oc(()=>import("./m3u8-player.8uhLESnK.js"),__vite__mapDeps([123,2,8,17,12,34,124])),name:"M3u8Player",meta:{title:"M3U8 Video Player Test"}},{path:"401",component:()=>oc(()=>import("./401.H1V_DBuU.js"),__vite__mapDeps([125,11,12,2,6,13,8,17,34,126])),meta:{hidden:!0}},{path:"404",component:()=>oc(()=>import("./404.DPclcW0y.js"),__vite__mapDeps([127,2,8,17,12,34,128])),meta:{hidden:!0}}]},{path:"/home",redirect:"/"}],id=se({history:oe(),routes:td,scrollBehavior:()=>({left:0,top:0})});let rd,ad=!1;id.beforeEach((e,t)=>{clearTimeout(rd),ad=!1,e.fullPath!==t.fullPath&&(rd=setTimeout(()=>{Nc().visible||(ad=!0,Fc({autoHideMs:15e3}))},180))}),id.afterEach(e=>{clearTimeout(rd),"CharacterInteract"!==e.name&&"PkRoom"!==e.name&&$c(ad);const t=Wc();t&&function(e){if(Jc()&&e)try{const t=Kc();window.gtag("event","conversion",{send_to:`${t.accountId}/${t.conversionLabels.pageView}`,value:1,currency:"USD",gclid:e})}catch(t){}}(t)}),id.onError(()=>{clearTimeout(rd),$c(!0)});const nd=le("app",()=>{const e=u({}),t=ge("device",Gl.DESKTOP),i=ge("size",jl.size),r=ge("language",jl.language),a=ge("sidebarStatus",ql.CLOSED),n=I({opened:a.value===ql.OPENED,withoutAnimation:!1}),s=u(!1),o=()=>{const e=(()=>{try{return window.top||window.parent||window}catch(e){return window}})();return{width:e.innerWidth,height:e.innerHeight}},{width:l,height:c}=o(),d=u(l),h=u(c),p=()=>{const{width:e,height:t}=o();d.value=e,h.value=t};"undefined"!=typeof window&&window.addEventListener("resize",p);const m=P(()=>"zh"==(null==r?void 0:r.value)?$l:Bs);return{appConfig:e,device:t,sidebar:n,language:r,locale:m,size:i,windowWidth:d,windowHeight:h,isIpAccess:s,updateWindowSize:p,toggleDevice:function(e){t.value=e},changeSize:function(e){i.value=e},changeLanguage:function(e){r.value=e,rc(Zl,"true");const t=id.currentRoute.value;if(/^\/(duel|pk)(\/|$)/.test(t.path)){if(rc("language",e),wc.global.locale.value=e,t.query.lang){const e={...t.query};delete e.lang,id.replace({path:t.path,query:e,hash:t.hash})}}else if(t.query.lang){const e={...t.query};delete e.lang,id.replace({path:t.path,query:e,hash:t.hash}).then(()=>{window.location.reload()}).catch(()=>{window.location.reload()})}else window.location.reload()},autoSwitchLanguageByIp:function(t){var i,a;if(ac(Zl))return;if(r.value===t)return;(null==(a=((null==(i=e.value)?void 0:i.languages)||{})[t])?void 0:a.open)&&(r.value=t,window.location.reload())},applyUserLanguage:function(t){var i,a;if(ac(Zl))return;if(!t)return;(null==(a=((null==(i=e.value)?void 0:i.languages)||{})[t])?void 0:a.open)&&r.value!==t&&(r.value=t,rc(Zl,"true"),window.location.reload())},toggleSidebar:function(){n.opened=!n.opened,a.value=n.opened?ql.OPENED:ql.CLOSED},closeSideBar:function(){n.opened=!1,a.value=ql.CLOSED},openSideBar:function(){n.opened=!0,a.value=ql.OPENED}}}),sd=()=>nd(Og);function od(e){return"auto"===e&&(e=window.matchMedia("(prefers-color-scheme: dark)").matches?Fl.DARK:Fl.LIGHT),e}const ld=le("setting",()=>{const e=u(!1),t=ge("tagsView",jl.tagsView),i=ge("sidebarLogo",jl.sidebarLogo),r=ge("layout",jl.layout),a=ge("themeColor",jl.themeColor),n=ge("theme",jl.theme);o(n,(e,t)=>{if(e!==t){od(e)===Fl.DARK?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}},{immediate:!0});const s={tagsView:t,sidebarLogo:i,layout:r};return{settingsVisible:e,tagsView:t,sidebarLogo:i,layout:r,themeColor:a,theme:n,changeSetting:function({key:e,value:t}){const i=s[e];i&&(i.value=t)},changeTheme:function(e){n.value=e},changeThemeColor:function(e){a.value=e},changeLayout:function(e){r.value=e}}}),cd={"/favicon.ico":"/images/icons/favicon.ico","/images/giftbox-confetti-blue.png":"/images/giftbox-confetti-blue.png","/images/giftbox-confetti-brown.png":"/images/giftbox-confetti-brown.png","/images/giftbox-confetti-green.png":"/images/giftbox-confetti-green.png","/images/giftbox-confetti-orange.png":"/images/giftbox-confetti-orange.png","/images/giftbox-confetti-red.png":"/images/giftbox-confetti-red.png","/images/giftbox-confetti-yellow.png":"/images/giftbox-confetti-yellow.png","/images/giftbox-gift.png":"/images/giftbox-gift.png","/images/giftbox-ray.png":"/images/giftbox-ray.png","/images/giftbox_timereward_success_topbg.png":"/images/giftbox_timereward_success_topbg.png","/images/icon_close.png":"/images/icons/icon_close.png","/images/icon_time_reward.png":"/images/icons/icon_time_reward.png","/images/icon_timereward_popup.png":"/images/icons/icon_timereward_popup.png","/images/icon_timereward_popup_btn.png":"/images/icons/icon_timereward_popup_btn.png","/images/live-loading-bg.jpg":"/images/live-loading-bg.jpg","/images/loading.png":"/images/icons/loading.png","/images/membership/premium-diamond.png":"/images/icons/premium-diamond.png","/img/icon_zb_coin@2x.png":"/images/icons/icon_zb_coin@2x.png","/pk/back-circle.png":"/images/icons/back-circle.png","/pk/chat-send.png":"/images/icons/chat-send.png","/pk/coin.png":"/images/icons/pk-coin.png","/pk/cover-placeholder.jpg":"/images/pk/cover-placeholder.jpg","/pk/photo-sets-entry.png":"/images/pk/photo-sets-entry.png","/pk/reward-slot/album.png":"/images/pk/reward-slot/album.webp","/pk/reward-slot/coin-checkin.png":"/images/pk/reward-slot/coin-checkin.webp","/pk/reward-slot/gift.png":"/images/pk/reward-slot/gift.webp","/pk/reward-slot/machine.png":"/images/pk/reward-slot/machine.webp","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-01_01.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-01_01.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-01_02.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-01_02.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-01_03.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-01_03.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-01_04.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-01_04.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-01_05.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-01_05.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-01_06.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-01_06.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-01_07.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-01_07.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-01_08.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-01_08.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-01_09.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-01_09.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-01_10.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-01_10.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-02_01.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-02_01.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-02_02.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-02_02.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-02_03.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-02_03.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-02_04.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-02_04.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-02_05.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-02_05.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-02_06.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-02_06.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-02_07.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-02_07.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-02_08.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-02_08.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-02_09.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-02_09.jpg","/pk/rewards/sets-f08844d2ee6f/Bianca/Bianca_set-02_10.jpg":"/cloud-images/character/Bianca/img/pk/Bianca_set-02_10.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-01_01.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-01_01.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-01_02.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-01_02.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-01_03.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-01_03.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-01_04.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-01_04.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-01_05.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-01_05.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-01_06.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-01_06.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-01_07.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-01_07.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-01_08.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-01_08.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-01_09.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-01_09.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-01_10.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-01_10.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-02_01.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-02_01.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-02_02.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-02_02.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-02_03.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-02_03.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-02_04.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-02_04.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-02_05.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-02_05.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-02_06.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-02_06.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-02_07.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-02_07.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-02_08.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-02_08.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-02_09.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-02_09.jpg","/pk/rewards/sets-f08844d2ee6f/Hailey/Hailey_set-02_10.jpg":"/cloud-images/character/Hailey/img/pk/Hailey_set-02_10.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-01_01.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-01_01.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-01_02.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-01_02.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-01_03.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-01_03.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-01_04.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-01_04.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-01_05.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-01_05.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-01_06.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-01_06.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-01_07.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-01_07.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-01_08.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-01_08.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-01_09.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-01_09.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-01_10.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-01_10.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-02_01.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-02_01.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-02_02.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-02_02.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-02_03.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-02_03.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-02_04.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-02_04.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-02_05.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-02_05.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-02_06.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-02_06.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-02_07.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-02_07.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-02_08.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-02_08.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-02_09.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-02_09.jpg","/pk/rewards/sets-f08844d2ee6f/Julianna/Julianna_set-02_10.jpg":"/cloud-images/character/Julianna/img/pk/Julianna_set-02_10.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-01_01.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-01_01.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-01_02.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-01_02.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-01_03.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-01_03.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-01_04.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-01_04.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-01_05.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-01_05.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-01_06.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-01_06.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-01_07.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-01_07.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-01_08.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-01_08.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-01_09.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-01_09.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-01_10.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-01_10.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-02_01.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-02_01.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-02_02.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-02_02.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-02_03.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-02_03.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-02_04.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-02_04.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-02_05.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-02_05.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-02_06.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-02_06.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-02_07.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-02_07.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-02_08.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-02_08.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-02_09.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-02_09.jpg","/pk/rewards/sets-f08844d2ee6f/Piper/Piper_set-02_10.jpg":"/cloud-images/character/Piper/img/pk/Piper_set-02_10.jpg","/pk/round-membership.png":"/images/icons/round-membership.png","/pk/score-heart-white.png":"/images/icons/score-heart-white.png","/pk/sound-off.png":"/images/icons/sound-off.png","/pk/sound-on.png":"/images/icons/sound-on.png","/pk/supporter-trophy.png":"/images/icons/supporter-trophy.png","/pk/ui/credits-coin.png":"/images/icons/credits-coin.png","/pk/ui/gallery-close.png":"/images/icons/gallery-close.png","/pk/ui/gallery-lock.png":"/images/icons/gallery-lock.png","/pk/ui/gallery-photo.png":"/images/icons/gallery-photo.png","/pk/ui/gallery-video.png":"/images/icons/gallery-video.png","/pk/ui/gift-more.png":"/images/icons/gift-more.png","/seo/social-card.png":"/images/seo/social-card.png","/studio/assets/call-props/bear-59.png":"/images/studio/call-props/bear-59.webp","/assets/call-props/bear-59.png":"/images/studio/call-props/bear-59.webp","/studio/assets/call-props/camera.svg":"/images/icons/camera.svg","/assets/call-props/camera.svg":"/images/icons/camera.svg","/studio/assets/call-props/chicken.svg":"/images/icons/chicken.svg","/assets/call-props/chicken.svg":"/images/icons/chicken.svg","/studio/assets/call-props/dance-59.png":"/images/studio/call-props/dance-59.webp","/assets/call-props/dance-59.png":"/images/studio/call-props/dance-59.webp","/studio/assets/call-props/flowers-59.png":"/images/studio/call-props/flowers-59.webp","/assets/call-props/flowers-59.png":"/images/studio/call-props/flowers-59.webp","/studio/assets/call-props/gift-atlas-56.png":"/images/studio/call-props/gift-atlas-56.webp","/assets/call-props/gift-atlas-56.png":"/images/studio/call-props/gift-atlas-56.webp","/studio/assets/call-props/necklace-59.png":"/images/studio/call-props/necklace-59.webp","/assets/call-props/necklace-59.png":"/images/studio/call-props/necklace-59.webp","/studio/assets/call-props/perfume.svg":"/images/icons/perfume.svg","/assets/call-props/perfume.svg":"/images/icons/perfume.svg","/studio/assets/call-props/rabbit.svg":"/images/icons/rabbit.svg","/assets/call-props/rabbit.svg":"/images/icons/rabbit.svg","/studio/assets/call-props/ring-59.png":"/images/studio/call-props/ring-59.webp","/assets/call-props/ring-59.png":"/images/studio/call-props/ring-59.webp","/studio/assets/call-scenes/bianca/coffeedatewithme.jpg":"/cloud-images/character/Bianca/img/phone/coffeedatewithme.jpg","/assets/call-scenes/bianca/coffeedatewithme.jpg":"/cloud-images/character/Bianca/img/phone/coffeedatewithme.jpg","/studio/assets/call-scenes/bianca/pillowtalk.jpg":"/cloud-images/character/Bianca/img/phone/pillowtalk.jpg","/assets/call-scenes/bianca/pillowtalk.jpg":"/cloud-images/character/Bianca/img/phone/pillowtalk.jpg","/studio/assets/call-scenes/bianca/seabreezeyou.jpg":"/cloud-images/character/Bianca/img/phone/seabreezeyou.jpg","/assets/call-scenes/bianca/seabreezeyou.jpg":"/cloud-images/character/Bianca/img/phone/seabreezeyou.jpg","/studio/assets/call-scenes/bianca/talktometonight.jpg":"/cloud-images/character/Bianca/img/phone/talktometonight.jpg","/assets/call-scenes/bianca/talktometonight.jpg":"/cloud-images/character/Bianca/img/phone/talktometonight.jpg","/studio/assets/call-scenes/bianca/tellmeyoursecrets.jpg":"/cloud-images/character/Bianca/img/phone/tellmeyoursecrets.jpg","/assets/call-scenes/bianca/tellmeyoursecrets.jpg":"/cloud-images/character/Bianca/img/phone/tellmeyoursecrets.jpg","/studio/assets/call-scenes/hailey/arcadedatewithme.jpg":"/cloud-images/character/Hailey/img/phone/arcadedatewithme.jpg","/assets/call-scenes/hailey/arcadedatewithme.jpg":"/cloud-images/character/Hailey/img/phone/arcadedatewithme.jpg","/studio/assets/call-scenes/hailey/cabininthewoods.jpg":"/cloud-images/character/Hailey/img/phone/cabininthewoods.jpg","/assets/call-scenes/hailey/cabininthewoods.jpg":"/cloud-images/character/Hailey/img/phone/cabininthewoods.jpg","/studio/assets/call-scenes/hailey/holdmyleash.jpg":"/cloud-images/character/Hailey/img/phone/holdmyleash.jpg","/assets/call-scenes/hailey/holdmyleash.jpg":"/cloud-images/character/Hailey/img/phone/holdmyleash.jpg","/studio/assets/call-scenes/hailey/laundrydayboredom.jpg":"/cloud-images/character/Hailey/img/phone/laundrydayboredom.jpg","/assets/call-scenes/hailey/laundrydayboredom.jpg":"/cloud-images/character/Hailey/img/phone/laundrydayboredom.jpg","/studio/assets/call-scenes/hailey/untiemyribbon.jpg":"/cloud-images/character/Hailey/img/phone/untiemyribbon.jpg","/assets/call-scenes/hailey/untiemyribbon.jpg":"/cloud-images/character/Hailey/img/phone/untiemyribbon.jpg","/studio/assets/call-scenes/julianna/dimthelights.jpg":"/cloud-images/character/Julianna/img/phone/dimthelights.jpg","/assets/call-scenes/julianna/dimthelights.jpg":"/cloud-images/character/Julianna/img/phone/dimthelights.jpg","/studio/assets/call-scenes/julianna/gettingreadyforyou.jpg":"/cloud-images/character/Julianna/img/phone/gettingreadyforyou.jpg","/assets/call-scenes/julianna/gettingreadyforyou.jpg":"/cloud-images/character/Julianna/img/phone/gettingreadyforyou.jpg","/studio/assets/call-scenes/julianna/morningsunme.jpg":"/cloud-images/character/Julianna/img/phone/morningsunme.jpg","/assets/call-scenes/julianna/morningsunme.jpg":"/cloud-images/character/Julianna/img/phone/morningsunme.jpg","/studio/assets/call-scenes/julianna/softesttouch.jpg":"/cloud-images/character/Julianna/img/phone/softesttouch.jpg","/assets/call-scenes/julianna/softesttouch.jpg":"/cloud-images/character/Julianna/img/phone/softesttouch.jpg","/studio/assets/call-scenes/julianna/waitupforme.jpg":"/cloud-images/character/Julianna/img/phone/waitupforme.jpg","/assets/call-scenes/julianna/waitupforme.jpg":"/cloud-images/character/Julianna/img/phone/waitupforme.jpg","/studio/assets/character-builder/appearance-atlas.png":"/images/studio/character-builder/appearance-atlas.webp","/assets/character-builder/appearance-atlas.png":"/images/studio/character-builder/appearance-atlas.webp","/studio/assets/character-builder/hair-eyes-atlas.png":"/images/studio/character-builder/hair-eyes-atlas.webp","/assets/character-builder/hair-eyes-atlas.png":"/images/studio/character-builder/hair-eyes-atlas.webp","/studio/assets/character-builder/locations-atlas.png":"/images/studio/character-builder/locations-atlas.webp","/assets/character-builder/locations-atlas.png":"/images/studio/character-builder/locations-atlas.webp","/studio/assets/character-builder/personality-work-atlas.png":"/images/studio/character-builder/personality-work-atlas.webp","/assets/character-builder/personality-work-atlas.png":"/images/studio/character-builder/personality-work-atlas.webp","/studio/assets/character-builder/reference-body-1.webp":"/images/studio/character-builder/reference-body-1.webp","/assets/character-builder/reference-body-1.webp":"/images/studio/character-builder/reference-body-1.webp","/studio/assets/character-builder/reference-body-2.webp":"/images/studio/character-builder/reference-body-2.webp","/assets/character-builder/reference-body-2.webp":"/images/studio/character-builder/reference-body-2.webp","/studio/assets/character-builder/reference-body-3.webp":"/images/studio/character-builder/reference-body-3.webp","/assets/character-builder/reference-body-3.webp":"/images/studio/character-builder/reference-body-3.webp","/studio/assets/character-builder/reference-body-4.webp":"/images/studio/character-builder/reference-body-4.webp","/assets/character-builder/reference-body-4.webp":"/images/studio/character-builder/reference-body-4.webp","/studio/assets/character-builder/reference-body-5.webp":"/images/studio/character-builder/reference-body-5.webp","/assets/character-builder/reference-body-5.webp":"/images/studio/character-builder/reference-body-5.webp","/studio/assets/character-builder/reference-bust-1.webp":"/images/studio/character-builder/reference-bust-1.webp","/assets/character-builder/reference-bust-1.webp":"/images/studio/character-builder/reference-bust-1.webp","/studio/assets/character-builder/reference-bust-2.webp":"/images/studio/character-builder/reference-bust-2.webp","/assets/character-builder/reference-bust-2.webp":"/images/studio/character-builder/reference-bust-2.webp","/studio/assets/character-builder/reference-bust-3.webp":"/images/studio/character-builder/reference-bust-3.webp","/assets/character-builder/reference-bust-3.webp":"/images/studio/character-builder/reference-bust-3.webp","/studio/assets/character-builder/reference-bust-4.webp":"/images/studio/character-builder/reference-bust-4.webp","/assets/character-builder/reference-bust-4.webp":"/images/studio/character-builder/reference-bust-4.webp","/studio/assets/character-builder/scenarios/after-workout.webp":"/images/studio/character-builder/scenarios/after-workout.webp","/assets/character-builder/scenarios/after-workout.webp":"/images/studio/character-builder/scenarios/after-workout.webp","/studio/assets/character-builder/scenarios/birthday-surprise.webp":"/images/studio/character-builder/scenarios/birthday-surprise.webp","/assets/character-builder/scenarios/birthday-surprise.webp":"/images/studio/character-builder/scenarios/birthday-surprise.webp","/studio/assets/character-builder/scenarios/candlelit-dinner.webp":"/images/studio/character-builder/scenarios/candlelit-dinner.webp","/assets/character-builder/scenarios/candlelit-dinner.webp":"/images/studio/character-builder/scenarios/candlelit-dinner.webp","/studio/assets/character-builder/scenarios/cooking-together.webp":"/images/studio/character-builder/scenarios/cooking-together.webp","/assets/character-builder/scenarios/cooking-together.webp":"/images/studio/character-builder/scenarios/cooking-together.webp","/studio/assets/character-builder/scenarios/first-meeting.webp":"/images/studio/character-builder/scenarios/first-meeting.webp","/assets/character-builder/scenarios/first-meeting.webp":"/images/studio/character-builder/scenarios/first-meeting.webp","/studio/assets/character-builder/scenarios/holiday-date.webp":"/images/studio/character-builder/scenarios/holiday-date.webp","/assets/character-builder/scenarios/holiday-date.webp":"/images/studio/character-builder/scenarios/holiday-date.webp","/studio/assets/character-builder/scenarios/late-night-chat.webp":"/images/studio/character-builder/scenarios/late-night-chat.webp","/assets/character-builder/scenarios/late-night-chat.webp":"/images/studio/character-builder/scenarios/late-night-chat.webp","/studio/assets/character-builder/scenarios/movie-night.webp":"/images/studio/character-builder/scenarios/movie-night.webp","/assets/character-builder/scenarios/movie-night.webp":"/images/studio/character-builder/scenarios/movie-night.webp","/studio/assets/character-builder/scenarios/rainy-day.webp":"/images/studio/character-builder/scenarios/rainy-day.webp","/assets/character-builder/scenarios/rainy-day.webp":"/images/studio/character-builder/scenarios/rainy-day.webp","/studio/assets/character-builder/scenarios/reunion.webp":"/images/studio/character-builder/scenarios/reunion.webp","/assets/character-builder/scenarios/reunion.webp":"/images/studio/character-builder/scenarios/reunion.webp","/studio/assets/character-builder/scenarios/sharing-music.webp":"/images/studio/character-builder/scenarios/sharing-music.webp","/assets/character-builder/scenarios/sharing-music.webp":"/images/studio/character-builder/scenarios/sharing-music.webp","/studio/assets/character-builder/scenarios/weekend-getaway.webp":"/images/studio/character-builder/scenarios/weekend-getaway.webp","/assets/character-builder/scenarios/weekend-getaway.webp":"/images/studio/character-builder/scenarios/weekend-getaway.webp","/studio/assets/character-voices/wave-cover.svg":"/images/studio/character-voices/wave-cover.svg","/assets/character-voices/wave-cover.svg":"/images/studio/character-voices/wave-cover.svg","/studio/assets/chat-detail/call-2b84bdc818e3.png":"/images/icons/call.png","/assets/chat-detail/call-2b84bdc818e3.png":"/images/icons/call.png","/studio/assets/chat-detail/call.png":"/images/icons/call.png","/assets/chat-detail/call.png":"/images/icons/call.png","/studio/assets/chat-detail/icon-chat-reset.png":"/images/icons/icon-chat-reset.png","/assets/chat-detail/icon-chat-reset.png":"/images/icons/icon-chat-reset.png","/studio/assets/chat-detail/more-cbdcc8b2b547.png":"/images/icons/more.png","/assets/chat-detail/more-cbdcc8b2b547.png":"/images/icons/more.png","/studio/assets/chat-detail/more.png":"/images/icons/more.png","/assets/chat-detail/more.png":"/images/icons/more.png","/studio/assets/chat-detail/profile-336f50a3d3a3.png":"/images/icons/profile.png","/assets/chat-detail/profile-336f50a3d3a3.png":"/images/icons/profile.png","/studio/assets/chat-detail/profile.png":"/images/icons/profile.png","/assets/chat-detail/profile.png":"/images/icons/profile.png","/studio/assets/chat-detail/video-aa206975fc33.png":"/images/icons/video.png","/assets/chat-detail/video-aa206975fc33.png":"/images/icons/video.png","/studio/assets/chat-detail/video.png":"/images/icons/video.png","/assets/chat-detail/video.png":"/images/icons/video.png","/studio/assets/chat-generation/image-background.png":"/images/studio/chat-generation/image-background.png","/assets/chat-generation/image-background.png":"/images/studio/chat-generation/image-background.png","/studio/assets/chat-generation/image-icon.png":"/images/icons/image-icon.png","/assets/chat-generation/image-icon.png":"/images/icons/image-icon.png","/studio/assets/chat-generation/video-background.png":"/images/studio/chat-generation/video-background.png","/assets/chat-generation/video-background.png":"/images/studio/chat-generation/video-background.png","/studio/assets/chat-generation/video-icon.png":"/images/icons/video-icon.png","/assets/chat-generation/video-icon.png":"/images/icons/video-icon.png","/studio/assets/my-ai/chat.svg":"/images/icons/chat.svg","/assets/my-ai/chat.svg":"/images/icons/chat.svg","/studio/assets/my-ai/cover-placeholder.jpg":"/images/pk/cover-placeholder.jpg","/assets/my-ai/cover-placeholder.jpg":"/images/pk/cover-placeholder.jpg","/studio/assets/my-ai/edit.svg":"/images/icons/edit.svg","/assets/my-ai/edit.svg":"/images/icons/edit.svg","/studio/assets/my-ai/plus.svg":"/images/icons/plus.svg","/assets/my-ai/plus.svg":"/images/icons/plus.svg","/studio/assets/templates-pink/dressed-up-for-you-156-avatar.webp":"/cloud-images/character/Piper/img/phone/dressed-up-for-you-156-avatar.webp","/assets/templates-pink/dressed-up-for-you-156-avatar.webp":"/cloud-images/character/Piper/img/phone/dressed-up-for-you-156-avatar.webp","/studio/assets/templates-pink/dressed-up-for-you-156-cover.webp":"/cloud-images/character/Piper/img/phone/dressed-up-for-you-156-cover.webp","/assets/templates-pink/dressed-up-for-you-156-cover.webp":"/cloud-images/character/Piper/img/phone/dressed-up-for-you-156-cover.webp","/studio/assets/templates-pink/dressed-up-for-you-156.webp":"/cloud-images/character/Piper/img/phone/dressed-up-for-you-156.webp","/assets/templates-pink/dressed-up-for-you-156.webp":"/cloud-images/character/Piper/img/phone/dressed-up-for-you-156.webp","/studio/assets/templates-pink/fresh-outta-bath-156-avatar.webp":"/cloud-images/character/Piper/img/phone/fresh-outta-bath-156-avatar.webp","/assets/templates-pink/fresh-outta-bath-156-avatar.webp":"/cloud-images/character/Piper/img/phone/fresh-outta-bath-156-avatar.webp","/studio/assets/templates-pink/fresh-outta-bath-156-cover.webp":"/cloud-images/character/Piper/img/phone/fresh-outta-bath-156-cover.webp","/assets/templates-pink/fresh-outta-bath-156-cover.webp":"/cloud-images/character/Piper/img/phone/fresh-outta-bath-156-cover.webp","/studio/assets/templates-pink/fresh-outta-bath-156.webp":"/cloud-images/character/Piper/img/phone/fresh-outta-bath-156.webp","/assets/templates-pink/fresh-outta-bath-156.webp":"/cloud-images/character/Piper/img/phone/fresh-outta-bath-156.webp","/studio/assets/templates-pink/pet-my-kitty-156-avatar.webp":"/cloud-images/character/Piper/img/phone/pet-my-kitty-156-avatar.webp","/assets/templates-pink/pet-my-kitty-156-avatar.webp":"/cloud-images/character/Piper/img/phone/pet-my-kitty-156-avatar.webp","/studio/assets/templates-pink/pet-my-kitty-156-cover.webp":"/cloud-images/character/Piper/img/phone/pet-my-kitty-156-cover.webp","/assets/templates-pink/pet-my-kitty-156-cover.webp":"/cloud-images/character/Piper/img/phone/pet-my-kitty-156-cover.webp","/studio/assets/templates-pink/pet-my-kitty-156.webp":"/cloud-images/character/Piper/img/phone/pet-my-kitty-156.webp","/assets/templates-pink/pet-my-kitty-156.webp":"/cloud-images/character/Piper/img/phone/pet-my-kitty-156.webp","/studio/assets/templates-pink/private-ryokan-176-avatar.webp":"/cloud-images/character/Piper/img/phone/private-ryokan-176-avatar.webp","/assets/templates-pink/private-ryokan-176-avatar.webp":"/cloud-images/character/Piper/img/phone/private-ryokan-176-avatar.webp","/studio/assets/templates-pink/private-ryokan-176-cover.webp":"/cloud-images/character/Piper/img/phone/private-ryokan-176-cover.webp","/assets/templates-pink/private-ryokan-176-cover.webp":"/cloud-images/character/Piper/img/phone/private-ryokan-176-cover.webp","/studio/assets/templates-pink/private-ryokan-176.jpg":"/cloud-images/character/Piper/img/phone/private-ryokan-176.jpg","/assets/templates-pink/private-ryokan-176.jpg":"/cloud-images/character/Piper/img/phone/private-ryokan-176.jpg","/studio/assets/templates-pink/ready-to-misbehave-156-avatar.webp":"/cloud-images/character/Piper/img/phone/ready-to-misbehave-156-avatar.webp","/assets/templates-pink/ready-to-misbehave-156-avatar.webp":"/cloud-images/character/Piper/img/phone/ready-to-misbehave-156-avatar.webp","/studio/assets/templates-pink/ready-to-misbehave-156-cover.webp":"/cloud-images/character/Piper/img/phone/ready-to-misbehave-156-cover.webp","/assets/templates-pink/ready-to-misbehave-156-cover.webp":"/cloud-images/character/Piper/img/phone/ready-to-misbehave-156-cover.webp","/studio/assets/templates-pink/ready-to-misbehave-156.webp":"/cloud-images/character/Piper/img/phone/ready-to-misbehave-156.webp","/assets/templates-pink/ready-to-misbehave-156.webp":"/cloud-images/character/Piper/img/phone/ready-to-misbehave-156.webp","/studio/assets/templates-pink/sofia-static-157.webp":"/cloud-images/character/Piper/img/phone/sofia-static-157.webp","/assets/templates-pink/sofia-static-157.webp":"/cloud-images/character/Piper/img/phone/sofia-static-157.webp","/studio/assets/templates-pink/sofia-static-avatar-157.webp":"/cloud-images/character/Piper/img/phone/sofia-static-avatar-157.webp","/assets/templates-pink/sofia-static-avatar-157.webp":"/cloud-images/character/Piper/img/phone/sofia-static-avatar-157.webp","/studio/assets/templates-pink/sofia-static-cover-157.webp":"/cloud-images/character/Piper/img/phone/sofia-static-cover-157.webp","/assets/templates-pink/sofia-static-cover-157.webp":"/cloud-images/character/Piper/img/phone/sofia-static-cover-157.webp","/studio/assets/templates-pink/sofia-static-original-157.png":"/cloud-images/character/Piper/img/phone/sofia-static-original-157.png","/assets/templates-pink/sofia-static-original-157.png":"/cloud-images/character/Piper/img/phone/sofia-static-original-157.png","/studio/assets/templates-pink/wake-up-next-to-me-156-avatar.webp":"/cloud-images/character/Piper/img/phone/wake-up-next-to-me-156-avatar.webp","/assets/templates-pink/wake-up-next-to-me-156-avatar.webp":"/cloud-images/character/Piper/img/phone/wake-up-next-to-me-156-avatar.webp","/studio/assets/templates-pink/wake-up-next-to-me-156-cover.webp":"/cloud-images/character/Piper/img/phone/wake-up-next-to-me-156-cover.webp","/assets/templates-pink/wake-up-next-to-me-156-cover.webp":"/cloud-images/character/Piper/img/phone/wake-up-next-to-me-156-cover.webp","/studio/assets/templates-pink/wake-up-next-to-me-156.webp":"/cloud-images/character/Piper/img/phone/wake-up-next-to-me-156.webp","/assets/templates-pink/wake-up-next-to-me-156.webp":"/cloud-images/character/Piper/img/phone/wake-up-next-to-me-156.webp","/studio/assets/voice-icons/call.png":"/images/icons/voice-icons-call.png","/assets/voice-icons/call.png":"/images/icons/voice-icons-call.png","/studio/assets/voice-icons/chat.png":"/images/icons/chat.png","/assets/voice-icons/chat.png":"/images/icons/chat.png","/studio/assets/voice-icons/close-circle-145.png":"/images/icons/gallery-close.png","/assets/voice-icons/close-circle-145.png":"/images/icons/gallery-close.png","/studio/assets/voice-icons/coin.png":"/images/icons/coin.png","/assets/voice-icons/coin.png":"/images/icons/coin.png","/studio/assets/voice-icons/duel-lock-131.svg":"/images/icons/duel-lock-131.svg","/assets/voice-icons/duel-lock-131.svg":"/images/icons/duel-lock-131.svg","/studio/assets/voice-icons/duel-trophy-131.svg":"/images/icons/duel-trophy-131.svg","/assets/voice-icons/duel-trophy-131.svg":"/images/icons/duel-trophy-131.svg","/studio/assets/voice-icons/edit.png":"/images/icons/edit.png","/assets/voice-icons/edit.png":"/images/icons/edit.png","/studio/assets/voice-icons/end-148.png":"/images/icons/end-148.png","/assets/voice-icons/end-148.png":"/images/icons/end-148.png","/studio/assets/voice-icons/end.png":"/images/icons/end-148.png","/assets/voice-icons/end.png":"/images/icons/end-148.png","/studio/assets/voice-icons/inspiration-normal.png":"/images/icons/inspiration-normal.png","/assets/voice-icons/inspiration-normal.png":"/images/icons/inspiration-normal.png","/studio/assets/voice-icons/inspiration.png":"/images/icons/inspiration.png","/assets/voice-icons/inspiration.png":"/images/icons/inspiration.png","/studio/assets/voice-icons/intro-hangup-130.svg":"/images/icons/intro-hangup-130.svg","/assets/voice-icons/intro-hangup-130.svg":"/images/icons/intro-hangup-130.svg","/studio/assets/voice-icons/intro-mic-130.svg":"/images/icons/intro-mic-130.svg","/assets/voice-icons/intro-mic-130.svg":"/images/icons/intro-mic-130.svg","/studio/assets/voice-icons/intro-phone-130.svg":"/images/icons/intro-phone-130.svg","/assets/voice-icons/intro-phone-130.svg":"/images/icons/intro-phone-130.svg","/studio/assets/voice-icons/intro-sparkle-130.svg":"/images/icons/intro-sparkle-130.svg","/assets/voice-icons/intro-sparkle-130.svg":"/images/icons/intro-sparkle-130.svg","/studio/assets/voice-icons/microphone.png":"/images/icons/microphone.png","/assets/voice-icons/microphone.png":"/images/icons/microphone.png","/studio/assets/voice-icons/selected-check-162.png":"/images/icons/selected-check-162.png","/assets/voice-icons/selected-check-162.png":"/images/icons/selected-check-162.png","/studio/assets/voice-icons/send.png":"/images/icons/send.png","/assets/voice-icons/send.png":"/images/icons/send.png","/studio/assets/voice-icons/sparkle.png":"/images/icons/sparkle.png","/assets/voice-icons/sparkle.png":"/images/icons/sparkle.png","/studio/assets/voice-icons/unlock.png":"/images/icons/unlock.png","/assets/voice-icons/unlock.png":"/images/icons/unlock.png","/studio/assets/voice-icons/video-call-134.png":"/images/icons/video-call-134.png","/assets/voice-icons/video-call-134.png":"/images/icons/video-call-134.png","/studio/assets/voice-icons/vip.png":"/images/icons/round-membership.png","/assets/voice-icons/vip.png":"/images/icons/round-membership.png","/studio/favicon.svg":"/images/icons/favicon.svg","/favicon.svg":"/images/icons/favicon.svg","/pk/reward-slot/coins-v2.png":"/images/pk/reward-slot/coin-checkin.webp"};function dd(e){return"string"==typeof e?function(e){let t=e,i="";if(/^https?:\/\//.test(e)){const r=new URL(e);if(("undefined"==typeof location||r.origin!==location.origin)&&!["127.0.0.1","localhost"].includes(r.hostname))return e;t=r.pathname,i=r.search+r.hash}else{const e=t.search(/[?#]/);e>=0&&(i=t.slice(e),t=t.slice(0,e)),t.startsWith("assets/")&&(t="/studio/"+t)}const r=cd[t];return r?r+i:e}(e):Array.isArray(e)?e.map(dd):e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,dd(t)])):e}function ud(e){return!1!==(null==e?void 0:e.vipFeatureEnabled)}const hd=le("dialog",()=>{const e=u(!1),t=u(!1),i=u(!1),r=u(!1),a=u(""),n=u(""),s=u(!1),o=u(!1),l=u({}),c=u(!1),d=u({}),h=u(!1),p=u(!1),m=u(!1),f=u(!1),g=u(!1),y=u(!1),v=u({}),b=u(!1),w=u(null),S=u(!1),k=u(null),T=u(!1),E=u(null),A=u(!1),C=u("");return{showLoginDialog:e,loginRequiredByDuel:t,showCoinDialog:i,showDownloadDialog:r,reportUserId:a,reportChat:n,showReportDialog:s,showVipDialog:o,vipDialogOptions:l,showVipGuideDialog:c,vipGuideDialogOptions:d,showVipPaymentPendingDialog:h,showShareDialog:p,showLanguageDialog:m,showCheckinDialog:f,showProfileCompleteDialog:g,showCoinCloseGuide:y,coinCloseGuideData:v,openCoinCloseGuide:(e={})=>{v.value={...e},y.value=!0},closeCoinCloseGuide:()=>{y.value=!1,v.value={}},showWebViewGuide:b,webViewAppName:w,openWebViewGuide:(e=null)=>{w.value=e,b.value=!0},closeWebViewGuide:()=>{b.value=!1,w.value=null},showPhotoUnlockDialog:S,photoUnlockData:k,setPhotoUnlockData:e=>{k.value=e,S.value=!0},closePhotoUnlockDialog:()=>{S.value=!1,k.value=null},showVideoUnlockDialog:T,videoUnlockData:E,setVideoUnlockData:e=>{E.value=e,T.value=!0},closeVideoUnlockDialog:()=>{T.value=!1,E.value=null},showVideoPlayer:A,currentVideoUrl:C,openVideoPlayer:e=>{C.value=e,A.value=!0},closeVideoPlayer:()=>{A.value=!1,C.value=""},openVipDialog:(e={})=>{l.value={...e},o.value=!0},closeVipDialog:()=>{o.value=!1,l.value={}},openVipGuideDialog:(e={})=>{ud(window.__APP_CONFIG__)&&(d.value={...e},c.value=!0)},closeVipGuideDialog:()=>{c.value=!1,d.value={}},openVipPaymentPendingDialog:()=>{h.value=!0},closeVipPaymentPendingDialog:()=>{h.value=!1}}});function pd(){return hd(Og)}const md=Object.freeze(Object.defineProperty({__proto__:null,useDialogStore:hd,useDialogStoreHook:pd},Symbol.toStringTag,{value:"Module"}));var fd=(e=>(e[e.SUCCESS=200]="SUCCESS",e[e.ERROR=500]="ERROR",e[e.TOKEN_EXPIRED=888]="TOKEN_EXPIRED",e[e.REFRESH_TOKEN_EXPIRED=887]="REFRESH_TOKEN_EXPIRED",e[e.NOT_VIP=10043]="NOT_VIP",e[e.COIN_INSUFFICIENT=10065]="COIN_INSUFFICIENT",e[e.ACCESS_DENIED=403]="ACCESS_DENIED",e[e.EMAIL_LINK_EXPIRED=10105]="EMAIL_LINK_EXPIRED",e[e.EMAIL_LINK_INVALID=10106]="EMAIL_LINK_INVALID",e[e.EMAIL_LINK_USED=10107]="EMAIL_LINK_USED",e[e.EMAIL_LINK_USER_NOT_FOUND=10108]="EMAIL_LINK_USER_NOT_FOUND",e))(fd||{});function gd(e){if(/Windows NT/i.test(e)){const t={"10.0":"10",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.1:"XP"},i=e.match(/Windows NT ([\d.]+)/i),r=i?i[1]:"";return{name:"Windows",version:t[r]||r}}if(/Android/i.test(e)){const t=e.match(/Android\s([\d.]+)/i);return{name:"Android",version:t?t[1]:""}}if(/CrOS/i.test(e)){const t=e.match(/CrOS\s+\S+\s+([\d.]+)/i);return{name:"ChromeOS",version:t?t[1]:""}}if(/iPhone|iPad|iPod/i.test(e)){const t=e.match(/OS\s([\d_]+)/i);return{name:"IOS",version:t?t[1].replace(/_/g,"."):""}}if(/Mac OS X/i.test(e)){const t=e.match(/Mac OS X ([\d_]+)/i);return{name:"macOS",version:t?t[1].replace(/_/g,"."):""}}return/Linux/i.test(e)?{name:"Linux",version:""}:{name:"Unknown",version:""}}function yd(){if("undefined"==typeof navigator||"undefined"==typeof window)return{category:1,model:"Unknown"};const e=navigator.userAgent||"",t=function(e){if(/iPhone|iPad|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini|Mobile|Tablet/i.test(e))return!0;if(/Macintosh/i.test(e)&&"undefined"!=typeof navigator&&("ontouchstart"in window||navigator.maxTouchPoints>0||(navigator.msMaxTouchPoints??0)>0))return!0;return!1}(e);let i;if(t)i=/iPhone/i.test(e)?"iPhone":/iPad/i.test(e)?"iPad":/iPod/i.test(e)?"iPod":/Macintosh/i.test(e)&&t?"iPad Pro":/Android/i.test(e)?function(e){const t=e.match(/\(Linux;[^)]*Android[^;]*;\s*([^;)]+)/i);if(t&&t[1]){let e=t[1].trim();return e=e.replace(/\s*Build\/.*$/i,"").trim(),e=e.replace(/\s*MIUI\/.*$/i,"").trim(),e||"Android Device"}return"Android Device"}(e):"Mobile Device";else{const t=gd(e),r=function(e){if(/Edg\//i.test(e)){const t=e.match(/Edg\/([\d.]+)/i);return{name:"Edge",version:t?t[1].split(".")[0]:""}}if(/Chrome/i.test(e)&&!/Chromium/i.test(e)){const t=e.match(/Chrome\/([\d.]+)/i);return{name:"Chrome",version:t?t[1].split(".")[0]:""}}if(/Firefox/i.test(e)){const t=e.match(/Firefox\/([\d.]+)/i);return{name:"Firefox",version:t?t[1].split(".")[0]:""}}if(/Safari/i.test(e)&&!/Chrome/i.test(e)){const t=e.match(/Version\/([\d.]+)/i);return{name:"Safari",version:t?t[1].split(".")[0]:""}}if(/Trident/i.test(e)||/MSIE/i.test(e)){const t=e.match(/(?:MSIE |rv:)([\d.]+)/i);return{name:"IE",version:t?t[1]:""}}return{name:"Unknown",version:""}}(e);i=`${t.version?`${t.name} ${t.version}`:t.name} / ${r.version?`${r.name} ${r.version}`:r.name}`}return{category:t?2:1,model:i}}const vd={channelPrefix:"001",statisticsType:"0",promoter:"00",channelSubName:"000"},bd=(e,t,i)=>{const r=String(i),a=String(e??r).trim()||r;return a.length>=t?a.slice(0,t):a.padStart(t,"0")},wd=(e,t,i)=>{const{browserName:r,browserVersion:a,osName:n,osVersion:s,deviceModel:o}=(()=>{const e="undefined"!=typeof navigator&&navigator.userAgent||"";let t="",i="",r="",a="",n="",s="";const o=(e,t,i="1.0.0")=>{const r=e.match(t);return r&&r[1]?r[1]:i};/Edg\//i.test(e)?(t="Edge",i=o(e,/Edg\/([\d.]+)/i)):/Chrome/i.test(e)?(t="Chrome",i=o(e,/Chrome\/([\d.]+)/i)):/Safari/i.test(e)&&!/Chrome/i.test(e)?(t="Safari",i=o(e,/Version\/([\d.]+)/i)):/Firefox/i.test(e)?(t="Firefox",i=o(e,/Firefox\/([\d.]+)/i)):/Trident/i.test(e)?(t="IE",i=o(e,/rv:([\d.]+)/i)):(t="Chrome",i="1.0.0");const l=gd(e);if(r=l.name,a=l.version,/Android/i.test(e))try{const t=e.match(/\((.*?)\)/);if(t&&t[1]){const e=t[1].split(";");s=e[1]?e[1].trim():"Unknown",n=e[2]?e[2].trim():"Unknown"}else s="Unknown",n="Unknown"}catch{s="Unknown",n="Unknown"}else/iPhone/i.test(e)?(n="iPhone",s="Apple"):/iPad/i.test(e)?(n="iPad",s="Apple"):"Unknown"===r?(n="Unknown",s="1.0.0"):(n=a?`${r} ${a}`:r,s="1.0.0");return{browserName:t,browserVersion:i,osName:r,osVersion:a,deviceModel:n,brand:s}})(),l=(e=>"Android"===e||"IOS"===e?e:"WEB")(n),c=((e,t)=>{const i={...vd,...t};return`${bd(e,2,"01")}${bd(i.channelPrefix,3,vd.channelPrefix)}${bd(i.statisticsType,1,vd.statisticsType)}@${bd(i.promoter,2,vd.promoter)}${bd(i.channelSubName,3,vd.channelSubName)}`})(t,i);return`${r}/${a} (${l}; OS/${s}; B/${t||1}; V/1.0.0/1.0.0; C/${c}; 0/${e}; BD ${o})`},Sd=new Set(["*","unknown","undefined","null"]);function kd(e){return"string"==typeof e?e.trim().toUpperCase():""}function Td(e){return"number"==typeof e&&Number.isInteger(e)&&e>=1&&e<=1e4}function Ed(e,t){const i=e.indexOf("("),r=e.lastIndexOf(")");if(i<0||r<=i)return e;const a=e.slice(i+1,r).split(";");if(a.length<7||a.slice(7).some(e=>/^(P|T|M|S|DPR)\s*\//i.test(e.trim())))return e;const n=[];let s=kd(t.platform);"HARMONY"!==s&&"HARMONYOS"!==s||(s="ANDROID"),["ANDROID","IOS","WINDOWS"].includes(s)&&n.push(`P/${s}`);const o=kd(t.terminal);"APP"!==o&&"WEB"!==o||n.push(`T/${o}`);const l=function(e){if("string"!=typeof e||new RegExp("\\p{Cc}","u").test(e))return;const t=e.trim().replace(/\s+/gu," "),i=t.toLowerCase();if(!(!t||i.length>128||Sd.has(i)))try{return encodeURIComponent(t).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())}catch{return}}(t.model);if(l&&n.push(`M/${l}`),Td(t.width)&&Td(t.height)&&n.push(`S/${t.width}x${t.height}`),"number"==typeof t.dpr&&Number.isFinite(t.dpr)&&t.dpr>=.5&&t.dpr<=8&&n.push(`DPR/${t.dpr}`),!n.length)return e;const c=e.slice(0,r)+"; "+n.join("; ")+e.slice(r);return c.length<=8192?c:e}let Ad,Cd=!1;function Id(e){var t,i;const r={terminal:"WEB"};try{"undefined"!=typeof navigator&&(r.platform=(a=navigator.userAgent||"",/\b(Android|Harmony|HarmonyOS)\b/i.test(a)?"ANDROID":/\b(iPhone|iPad|iPod)\b/i.test(a)?"IOS":/\bWindows\b/i.test(a)?"WINDOWS":void 0),"ANDROID"!==r.platform&&"WINDOWS"!==r.platform||(Cd||(Cd=!0,async function(e){try{const t=e.userAgentData;if("function"!=typeof(null==t?void 0:t.getHighEntropyValues))return;const i=await t.getHighEntropyValues(["model"]);Ad=null==i?void 0:i.model}catch{}}(navigator)),r.model=Ad))}catch{}var a;try{"undefined"!=typeof window&&(r.width=null==(t=window.screen)?void 0:t.width,r.height=null==(i=window.screen)?void 0:i.height)}catch{}try{"undefined"!=typeof window&&(r.dpr=window.devicePixelRatio)}catch{}return Ed(e,r)}var Pd={exports:{}};var _d={exports:{}};const Rd=ye(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var xd;function Ld(){return xd||(xd=1,_d.exports=(e=e||function(e,t){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==ve&&ve.crypto&&(i=ve.crypto),!i)try{i=Rd}catch(f){}var r=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(f){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(f){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var i;return e.prototype=t,i=new e,e.prototype=null,i}}(),n={},s=n.lib={},o=s.Base=function(){return{extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=s.WordArray=o.extend({init:function(e,i){e=this.words=e||[],this.sigBytes=i!=t?i:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,i=e.words,r=this.sigBytes,a=e.sigBytes;if(this.clamp(),r%4)for(var n=0;n<a;n++){var s=i[n>>>2]>>>24-n%4*8&255;t[r+n>>>2]|=s<<24-(r+n)%4*8}else for(var o=0;o<a;o+=4)t[r+o>>>2]=i[o>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,i=this.sigBytes;t[i>>>2]&=4294967295<<32-i%4*8,t.length=e.ceil(i/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],i=0;i<e;i+=4)t.push(r());return new l.init(t,e)}}),c=n.enc={},d=c.Hex={stringify:function(e){for(var t=e.words,i=e.sigBytes,r=[],a=0;a<i;a++){var n=t[a>>>2]>>>24-a%4*8&255;r.push((n>>>4).toString(16)),r.push((15&n).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,i=[],r=0;r<t;r+=2)i[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(i,t/2)}},u=c.Latin1={stringify:function(e){for(var t=e.words,i=e.sigBytes,r=[],a=0;a<i;a++){var n=t[a>>>2]>>>24-a%4*8&255;r.push(String.fromCharCode(n))}return r.join("")},parse:function(e){for(var t=e.length,i=[],r=0;r<t;r++)i[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new l.init(i,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var i,r=this._data,a=r.words,n=r.sigBytes,s=this.blockSize,o=n/(4*s),c=(o=t?e.ceil(o):e.max((0|o)-this._minBufferSize,0))*s,d=e.min(4*c,n);if(c){for(var u=0;u<c;u+=s)this._doProcessBlock(a,u);i=a.splice(0,c),r.sigBytes-=d}return new l.init(i,d)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,i){return new e.init(i).finalize(t)}},_createHmacHelper:function(e){return function(t,i){return new m.HMAC.init(e,i).finalize(t)}}});var m=n.algo={};return n}(Math),e)),_d.exports;var e}var Dd,Md={exports:{}};function Od(){return Dd?Md.exports:(Dd=1,Md.exports=(s=Ld(),i=(t=s).lib,r=i.Base,a=i.WordArray,(n=t.x64={}).Word=r.extend({init:function(e,t){this.high=e,this.low=t}}),n.WordArray=r.extend({init:function(t,i){t=this.words=t||[],this.sigBytes=i!=e?i:8*t.length},toX32:function(){for(var e=this.words,t=e.length,i=[],r=0;r<t;r++){var n=e[r];i.push(n.high),i.push(n.low)}return a.create(i,this.sigBytes)},clone:function(){for(var e=r.clone.call(this),t=e.words=this.words.slice(0),i=t.length,a=0;a<i;a++)t[a]=t[a].clone();return e}}),s));var e,t,i,r,a,n,s}var Nd,Fd={exports:{}};function Ud(){return Nd||(Nd=1,Fd.exports=(e=Ld(),function(){if("function"==typeof ArrayBuffer){var t=e.lib.WordArray,i=t.init,r=t.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,r=[],a=0;a<t;a++)r[a>>>2]|=e[a]<<24-a%4*8;i.call(this,r,t)}else i.apply(this,arguments)};r.prototype=t}}(),e.lib.WordArray)),Fd.exports;var e}var Bd,zd={exports:{}};function jd(){return Bd?zd.exports:(Bd=1,zd.exports=(e=Ld(),function(){var t=e,i=t.lib.WordArray,r=t.enc;function a(e){return e<<8&4278255360|e>>>8&16711935}r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,i=e.sigBytes,r=[],a=0;a<i;a+=2){var n=t[a>>>2]>>>16-a%4*8&65535;r.push(String.fromCharCode(n))}return r.join("")},parse:function(e){for(var t=e.length,r=[],a=0;a<t;a++)r[a>>>1]|=e.charCodeAt(a)<<16-a%2*16;return i.create(r,2*t)}},r.Utf16LE={stringify:function(e){for(var t=e.words,i=e.sigBytes,r=[],n=0;n<i;n+=2){var s=a(t[n>>>2]>>>16-n%4*8&65535);r.push(String.fromCharCode(s))}return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>1]|=a(e.charCodeAt(n)<<16-n%2*16);return i.create(r,2*t)}}}(),e.enc.Utf16));var e}var $d,Gd={exports:{}};function qd(){return $d?Gd.exports:($d=1,Gd.exports=(e=Ld(),function(){var t=e,i=t.lib.WordArray;function r(e,t,r){for(var a=[],n=0,s=0;s<t;s++)if(s%4){var o=r[e.charCodeAt(s-1)]<<s%4*2|r[e.charCodeAt(s)]>>>6-s%4*2;a[n>>>2]|=o<<24-n%4*8,n++}return i.create(a,n)}t.enc.Base64={stringify:function(e){var t=e.words,i=e.sigBytes,r=this._map;e.clamp();for(var a=[],n=0;n<i;n+=3)for(var s=(t[n>>>2]>>>24-n%4*8&255)<<16|(t[n+1>>>2]>>>24-(n+1)%4*8&255)<<8|t[n+2>>>2]>>>24-(n+2)%4*8&255,o=0;o<4&&n+.75*o<i;o++)a.push(r.charAt(s>>>6*(3-o)&63));var l=r.charAt(64);if(l)for(;a.length%4;)a.push(l);return a.join("")},parse:function(e){var t=e.length,i=this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var n=0;n<i.length;n++)a[i.charCodeAt(n)]=n}var s=i.charAt(64);if(s){var o=e.indexOf(s);-1!==o&&(t=o)}return r(e,t,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64));var e}var Hd,Vd={exports:{}};function Wd(){return Hd?Vd.exports:(Hd=1,Vd.exports=(e=Ld(),function(){var t=e,i=t.lib.WordArray;function r(e,t,r){for(var a=[],n=0,s=0;s<t;s++)if(s%4){var o=r[e.charCodeAt(s-1)]<<s%4*2|r[e.charCodeAt(s)]>>>6-s%4*2;a[n>>>2]|=o<<24-n%4*8,n++}return i.create(a,n)}t.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var i=e.words,r=e.sigBytes,a=t?this._safe_map:this._map;e.clamp();for(var n=[],s=0;s<r;s+=3)for(var o=(i[s>>>2]>>>24-s%4*8&255)<<16|(i[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|i[s+2>>>2]>>>24-(s+2)%4*8&255,l=0;l<4&&s+.75*l<r;l++)n.push(a.charAt(o>>>6*(3-l)&63));var c=a.charAt(64);if(c)for(;n.length%4;)n.push(c);return n.join("")},parse:function(e,t){void 0===t&&(t=!0);var i=e.length,a=t?this._safe_map:this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var s=0;s<a.length;s++)n[a.charCodeAt(s)]=s}var o=a.charAt(64);if(o){var l=e.indexOf(o);-1!==l&&(i=l)}return r(e,i,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),e.enc.Base64url));var e}var Kd,Yd={exports:{}};function Jd(){return Kd?Yd.exports:(Kd=1,Yd.exports=(e=Ld(),function(t){var i=e,r=i.lib,a=r.WordArray,n=r.Hasher,s=i.algo,o=[];!function(){for(var e=0;e<64;e++)o[e]=4294967296*t.abs(t.sin(e+1))|0}();var l=s.MD5=n.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var r=t+i,a=e[r];e[r]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var n=this._hash.words,s=e[t+0],l=e[t+1],p=e[t+2],m=e[t+3],f=e[t+4],g=e[t+5],y=e[t+6],v=e[t+7],b=e[t+8],w=e[t+9],S=e[t+10],k=e[t+11],T=e[t+12],E=e[t+13],A=e[t+14],C=e[t+15],I=n[0],P=n[1],_=n[2],R=n[3];I=c(I,P,_,R,s,7,o[0]),R=c(R,I,P,_,l,12,o[1]),_=c(_,R,I,P,p,17,o[2]),P=c(P,_,R,I,m,22,o[3]),I=c(I,P,_,R,f,7,o[4]),R=c(R,I,P,_,g,12,o[5]),_=c(_,R,I,P,y,17,o[6]),P=c(P,_,R,I,v,22,o[7]),I=c(I,P,_,R,b,7,o[8]),R=c(R,I,P,_,w,12,o[9]),_=c(_,R,I,P,S,17,o[10]),P=c(P,_,R,I,k,22,o[11]),I=c(I,P,_,R,T,7,o[12]),R=c(R,I,P,_,E,12,o[13]),_=c(_,R,I,P,A,17,o[14]),I=d(I,P=c(P,_,R,I,C,22,o[15]),_,R,l,5,o[16]),R=d(R,I,P,_,y,9,o[17]),_=d(_,R,I,P,k,14,o[18]),P=d(P,_,R,I,s,20,o[19]),I=d(I,P,_,R,g,5,o[20]),R=d(R,I,P,_,S,9,o[21]),_=d(_,R,I,P,C,14,o[22]),P=d(P,_,R,I,f,20,o[23]),I=d(I,P,_,R,w,5,o[24]),R=d(R,I,P,_,A,9,o[25]),_=d(_,R,I,P,m,14,o[26]),P=d(P,_,R,I,b,20,o[27]),I=d(I,P,_,R,E,5,o[28]),R=d(R,I,P,_,p,9,o[29]),_=d(_,R,I,P,v,14,o[30]),I=u(I,P=d(P,_,R,I,T,20,o[31]),_,R,g,4,o[32]),R=u(R,I,P,_,b,11,o[33]),_=u(_,R,I,P,k,16,o[34]),P=u(P,_,R,I,A,23,o[35]),I=u(I,P,_,R,l,4,o[36]),R=u(R,I,P,_,f,11,o[37]),_=u(_,R,I,P,v,16,o[38]),P=u(P,_,R,I,S,23,o[39]),I=u(I,P,_,R,E,4,o[40]),R=u(R,I,P,_,s,11,o[41]),_=u(_,R,I,P,m,16,o[42]),P=u(P,_,R,I,y,23,o[43]),I=u(I,P,_,R,w,4,o[44]),R=u(R,I,P,_,T,11,o[45]),_=u(_,R,I,P,C,16,o[46]),I=h(I,P=u(P,_,R,I,p,23,o[47]),_,R,s,6,o[48]),R=h(R,I,P,_,v,10,o[49]),_=h(_,R,I,P,A,15,o[50]),P=h(P,_,R,I,g,21,o[51]),I=h(I,P,_,R,T,6,o[52]),R=h(R,I,P,_,m,10,o[53]),_=h(_,R,I,P,S,15,o[54]),P=h(P,_,R,I,l,21,o[55]),I=h(I,P,_,R,b,6,o[56]),R=h(R,I,P,_,C,10,o[57]),_=h(_,R,I,P,y,15,o[58]),P=h(P,_,R,I,E,21,o[59]),I=h(I,P,_,R,f,6,o[60]),R=h(R,I,P,_,k,10,o[61]),_=h(_,R,I,P,p,15,o[62]),P=h(P,_,R,I,w,21,o[63]),n[0]=n[0]+I|0,n[1]=n[1]+P|0,n[2]=n[2]+_|0,n[3]=n[3]+R|0},_doFinalize:function(){var e=this._data,i=e.words,r=8*this._nDataBytes,a=8*e.sigBytes;i[a>>>5]|=128<<24-a%32;var n=t.floor(r/4294967296),s=r;i[15+(a+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),i[14+(a+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(i.length+1),this._process();for(var o=this._hash,l=o.words,c=0;c<4;c++){var d=l[c];l[c]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)}return o},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,i,r,a,n,s){var o=e+(t&i|~t&r)+a+s;return(o<<n|o>>>32-n)+t}function d(e,t,i,r,a,n,s){var o=e+(t&r|i&~r)+a+s;return(o<<n|o>>>32-n)+t}function u(e,t,i,r,a,n,s){var o=e+(t^i^r)+a+s;return(o<<n|o>>>32-n)+t}function h(e,t,i,r,a,n,s){var o=e+(i^(t|~r))+a+s;return(o<<n|o>>>32-n)+t}i.MD5=n._createHelper(l),i.HmacMD5=n._createHmacHelper(l)}(Math),e.MD5));var e}var Xd,Qd={exports:{}};function Zd(){return Xd?Qd.exports:(Xd=1,Qd.exports=(o=Ld(),t=(e=o).lib,i=t.WordArray,r=t.Hasher,a=e.algo,n=[],s=a.SHA1=r.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var i=this._hash.words,r=i[0],a=i[1],s=i[2],o=i[3],l=i[4],c=0;c<80;c++){if(c<16)n[c]=0|e[t+c];else{var d=n[c-3]^n[c-8]^n[c-14]^n[c-16];n[c]=d<<1|d>>>31}var u=(r<<5|r>>>27)+l+n[c];u+=c<20?1518500249+(a&s|~a&o):c<40?1859775393+(a^s^o):c<60?(a&s|a&o|s&o)-1894007588:(a^s^o)-899497514,l=o,o=s,s=a<<30|a>>>2,a=r,r=u}i[0]=i[0]+r|0,i[1]=i[1]+a|0,i[2]=i[2]+s|0,i[3]=i[3]+o|0,i[4]=i[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(i/4294967296),t[15+(r+64>>>9<<4)]=i,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),e.SHA1=r._createHelper(s),e.HmacSHA1=r._createHmacHelper(s),o.SHA1));var e,t,i,r,a,n,s,o}var eu,tu={exports:{}};function iu(){return eu?tu.exports:(eu=1,tu.exports=(e=Ld(),function(t){var i=e,r=i.lib,a=r.WordArray,n=r.Hasher,s=i.algo,o=[],l=[];!function(){function e(e){for(var i=t.sqrt(e),r=2;r<=i;r++)if(!(e%r))return!1;return!0}function i(e){return 4294967296*(e-(0|e))|0}for(var r=2,a=0;a<64;)e(r)&&(a<8&&(o[a]=i(t.pow(r,.5))),l[a]=i(t.pow(r,1/3)),a++),r++}();var c=[],d=s.SHA256=n.extend({_doReset:function(){this._hash=new a.init(o.slice(0))},_doProcessBlock:function(e,t){for(var i=this._hash.words,r=i[0],a=i[1],n=i[2],s=i[3],o=i[4],d=i[5],u=i[6],h=i[7],p=0;p<64;p++){if(p<16)c[p]=0|e[t+p];else{var m=c[p-15],f=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,g=c[p-2],y=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[p]=f+c[p-7]+y+c[p-16]}var v=r&a^r&n^a&n,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=h+((o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25))+(o&d^~o&u)+l[p]+c[p];h=u,u=d,d=o,o=s+w|0,s=n,n=a,a=r,r=w+(b+v)|0}i[0]=i[0]+r|0,i[1]=i[1]+a|0,i[2]=i[2]+n|0,i[3]=i[3]+s|0,i[4]=i[4]+o|0,i[5]=i[5]+d|0,i[6]=i[6]+u|0,i[7]=i[7]+h|0},_doFinalize:function(){var e=this._data,i=e.words,r=8*this._nDataBytes,a=8*e.sigBytes;return i[a>>>5]|=128<<24-a%32,i[14+(a+64>>>9<<4)]=t.floor(r/4294967296),i[15+(a+64>>>9<<4)]=r,e.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});i.SHA256=n._createHelper(d),i.HmacSHA256=n._createHmacHelper(d)}(Math),e.SHA256));var e}var ru,au={exports:{}};var nu,su={exports:{}};function ou(){return nu||(nu=1,su.exports=(e=Ld(),Od(),function(){var t=e,i=t.lib.Hasher,r=t.x64,a=r.Word,n=r.WordArray,s=t.algo;function o(){return a.create.apply(a,arguments)}var l=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=o()}();var d=s.SHA512=i.extend({_doReset:function(){this._hash=new n.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var i=this._hash.words,r=i[0],a=i[1],n=i[2],s=i[3],o=i[4],d=i[5],u=i[6],h=i[7],p=r.high,m=r.low,f=a.high,g=a.low,y=n.high,v=n.low,b=s.high,w=s.low,S=o.high,k=o.low,T=d.high,E=d.low,A=u.high,C=u.low,I=h.high,P=h.low,_=p,R=m,x=f,L=g,D=y,M=v,O=b,N=w,F=S,U=k,B=T,z=E,j=A,$=C,G=I,q=P,H=0;H<80;H++){var V,W,K=c[H];if(H<16)W=K.high=0|e[t+2*H],V=K.low=0|e[t+2*H+1];else{var Y=c[H-15],J=Y.high,X=Y.low,Q=(J>>>1|X<<31)^(J>>>8|X<<24)^J>>>7,Z=(X>>>1|J<<31)^(X>>>8|J<<24)^(X>>>7|J<<25),ee=c[H-2],te=ee.high,ie=ee.low,re=(te>>>19|ie<<13)^(te<<3|ie>>>29)^te>>>6,ae=(ie>>>19|te<<13)^(ie<<3|te>>>29)^(ie>>>6|te<<26),ne=c[H-7],se=ne.high,oe=ne.low,le=c[H-16],ce=le.high,de=le.low;W=(W=(W=Q+se+((V=Z+oe)>>>0<Z>>>0?1:0))+re+((V+=ae)>>>0<ae>>>0?1:0))+ce+((V+=de)>>>0<de>>>0?1:0),K.high=W,K.low=V}var ue,he=F&B^~F&j,pe=U&z^~U&$,me=_&x^_&D^x&D,fe=R&L^R&M^L&M,ge=(_>>>28|R<<4)^(_<<30|R>>>2)^(_<<25|R>>>7),ye=(R>>>28|_<<4)^(R<<30|_>>>2)^(R<<25|_>>>7),ve=(F>>>14|U<<18)^(F>>>18|U<<14)^(F<<23|U>>>9),be=(U>>>14|F<<18)^(U>>>18|F<<14)^(U<<23|F>>>9),we=l[H],Se=we.high,ke=we.low,Te=G+ve+((ue=q+be)>>>0<q>>>0?1:0),Ee=ye+fe;G=j,q=$,j=B,$=z,B=F,z=U,F=O+(Te=(Te=(Te=Te+he+((ue+=pe)>>>0<pe>>>0?1:0))+Se+((ue+=ke)>>>0<ke>>>0?1:0))+W+((ue+=V)>>>0<V>>>0?1:0))+((U=N+ue|0)>>>0<N>>>0?1:0)|0,O=D,N=M,D=x,M=L,x=_,L=R,_=Te+(ge+me+(Ee>>>0<ye>>>0?1:0))+((R=ue+Ee|0)>>>0<ue>>>0?1:0)|0}m=r.low=m+R,r.high=p+_+(m>>>0<R>>>0?1:0),g=a.low=g+L,a.high=f+x+(g>>>0<L>>>0?1:0),v=n.low=v+M,n.high=y+D+(v>>>0<M>>>0?1:0),w=s.low=w+N,s.high=b+O+(w>>>0<N>>>0?1:0),k=o.low=k+U,o.high=S+F+(k>>>0<U>>>0?1:0),E=d.low=E+z,d.high=T+B+(E>>>0<z>>>0?1:0),C=u.low=C+$,u.high=A+j+(C>>>0<$>>>0?1:0),P=h.low=P+q,h.high=I+G+(P>>>0<q>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(i/4294967296),t[31+(r+128>>>10<<5)]=i,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});t.SHA512=i._createHelper(d),t.HmacSHA512=i._createHmacHelper(d)}(),e.SHA512)),su.exports;var e}var lu,cu={exports:{}};var du,uu={exports:{}};function hu(){return du?uu.exports:(du=1,uu.exports=(e=Ld(),Od(),function(t){var i=e,r=i.lib,a=r.WordArray,n=r.Hasher,s=i.x64.Word,o=i.algo,l=[],c=[],d=[];!function(){for(var e=1,t=0,i=0;i<24;i++){l[e+5*t]=(i+1)*(i+2)/2%64;var r=(2*e+3*t)%5;e=t%5,t=r}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var a=1,n=0;n<24;n++){for(var o=0,u=0,h=0;h<7;h++){if(1&a){var p=(1<<h)-1;p<32?u^=1<<p:o^=1<<p-32}128&a?a=a<<1^113:a<<=1}d[n]=s.create(o,u)}}();var u=[];!function(){for(var e=0;e<25;e++)u[e]=s.create()}();var h=o.SHA3=n.extend({cfg:n.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var i=this._state,r=this.blockSize/2,a=0;a<r;a++){var n=e[t+2*a],s=e[t+2*a+1];n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(P=i[a]).high^=s,P.low^=n}for(var o=0;o<24;o++){for(var h=0;h<5;h++){for(var p=0,m=0,f=0;f<5;f++)p^=(P=i[h+5*f]).high,m^=P.low;var g=u[h];g.high=p,g.low=m}for(h=0;h<5;h++){var y=u[(h+4)%5],v=u[(h+1)%5],b=v.high,w=v.low;for(p=y.high^(b<<1|w>>>31),m=y.low^(w<<1|b>>>31),f=0;f<5;f++)(P=i[h+5*f]).high^=p,P.low^=m}for(var S=1;S<25;S++){var k=(P=i[S]).high,T=P.low,E=l[S];E<32?(p=k<<E|T>>>32-E,m=T<<E|k>>>32-E):(p=T<<E-32|k>>>64-E,m=k<<E-32|T>>>64-E);var A=u[c[S]];A.high=p,A.low=m}var C=u[0],I=i[0];for(C.high=I.high,C.low=I.low,h=0;h<5;h++)for(f=0;f<5;f++){var P=i[S=h+5*f],_=u[S],R=u[(h+1)%5+5*f],x=u[(h+2)%5+5*f];P.high=_.high^~R.high&x.high,P.low=_.low^~R.low&x.low}P=i[0];var L=d[o];P.high^=L.high,P.low^=L.low}},_doFinalize:function(){var e=this._data,i=e.words;this._nDataBytes;var r=8*e.sigBytes,n=32*this.blockSize;i[r>>>5]|=1<<24-r%32,i[(t.ceil((r+1)/n)*n>>>5)-1]|=128,e.sigBytes=4*i.length,this._process();for(var s=this._state,o=this.cfg.outputLength/8,l=o/8,c=[],d=0;d<l;d++){var u=s[d],h=u.high,p=u.low;h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(h)}return new a.init(c,o)},clone:function(){for(var e=n.clone.call(this),t=e._state=this._state.slice(0),i=0;i<25;i++)t[i]=t[i].clone();return e}});i.SHA3=n._createHelper(h),i.HmacSHA3=n._createHmacHelper(h)}(Math),e.SHA3));var e}var pu,mu={exports:{}};var fu,gu={exports:{}};function yu(){return fu?gu.exports:(fu=1,gu.exports=(e=Ld(),i=(t=e).lib.Base,r=t.enc.Utf8,void(t.algo.HMAC=i.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var i=e.blockSize,a=4*i;t.sigBytes>a&&(t=e.finalize(t)),t.clamp();for(var n=this._oKey=t.clone(),s=this._iKey=t.clone(),o=n.words,l=s.words,c=0;c<i;c++)o[c]^=1549556828,l[c]^=909522486;n.sigBytes=s.sigBytes=a,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,i=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(i))}}))));var e,t,i,r}var vu,bu={exports:{}};var wu,Su={exports:{}};function ku(){return wu?Su.exports:(wu=1,Su.exports=(o=Ld(),Zd(),yu(),t=(e=o).lib,i=t.Base,r=t.WordArray,a=e.algo,n=a.MD5,s=a.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:n,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var i,a=this.cfg,n=a.hasher.create(),s=r.create(),o=s.words,l=a.keySize,c=a.iterations;o.length<l;){i&&n.update(i),i=n.update(e).finalize(t),n.reset();for(var d=1;d<c;d++)i=n.finalize(i),n.reset();s.concat(i)}return s.sigBytes=4*l,s}}),e.EvpKDF=function(e,t,i){return s.create(i).compute(e,t)},o.EvpKDF));var e,t,i,r,a,n,s,o}var Tu,Eu={exports:{}};function Au(){return Tu?Eu.exports:(Tu=1,Eu.exports=(e=Ld(),ku(),void(e.lib.Cipher||function(t){var i=e,r=i.lib,a=r.Base,n=r.WordArray,s=r.BufferedBlockAlgorithm,o=i.enc;o.Utf8;var l=o.Base64,c=i.algo.EvpKDF,d=r.Cipher=s.extend({cfg:a.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,i){this.cfg=this.cfg.extend(i),this._xformMode=e,this._key=t,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:y}return function(t){return{encrypt:function(i,r,a){return e(r).encrypt(t,i,r,a)},decrypt:function(i,r,a){return e(r).decrypt(t,i,r,a)}}}}()});r.StreamCipher=d.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var u=i.mode={},h=r.BlockCipherMode=a.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=u.CBC=function(){var e=h.extend();function i(e,i,r){var a,n=this._iv;n?(a=n,this._iv=t):a=this._prevBlock;for(var s=0;s<r;s++)e[i+s]^=a[s]}return e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,a=r.blockSize;i.call(this,e,t,a),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+a)}}),e.Decryptor=e.extend({processBlock:function(e,t){var r=this._cipher,a=r.blockSize,n=e.slice(t,t+a);r.decryptBlock(e,t),i.call(this,e,t,a),this._prevBlock=n}}),e}(),m=(i.pad={}).Pkcs7={pad:function(e,t){for(var i=4*t,r=i-e.sigBytes%i,a=r<<24|r<<16|r<<8|r,s=[],o=0;o<r;o+=4)s.push(a);var l=n.create(s,r);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};r.BlockCipher=d.extend({cfg:d.cfg.extend({mode:p,padding:m}),reset:function(){var e;d.reset.call(this);var t=this.cfg,i=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,i&&i.words):(this._mode=e.call(r,this,i&&i.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var f=r.CipherParams=a.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(i.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,i=e.salt;return(i?n.create([1398893684,1701076831]).concat(i).concat(t):t).toString(l)},parse:function(e){var t,i=l.parse(e),r=i.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=n.create(r.slice(2,4)),r.splice(0,4),i.sigBytes-=16),f.create({ciphertext:i,salt:t})}},y=r.SerializableCipher=a.extend({cfg:a.extend({format:g}),encrypt:function(e,t,i,r){r=this.cfg.extend(r);var a=e.createEncryptor(i,r),n=a.finalize(t),s=a.cfg;return f.create({ciphertext:n,key:i,iv:s.iv,algorithm:e,mode:s.mode,padding:s.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,i,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(i,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),v=(i.kdf={}).OpenSSL={execute:function(e,t,i,r,a){if(r||(r=n.random(8)),a)s=c.create({keySize:t+i,hasher:a}).compute(e,r);else var s=c.create({keySize:t+i}).compute(e,r);var o=n.create(s.words.slice(t),4*i);return s.sigBytes=4*t,f.create({key:s,iv:o,salt:r})}},b=r.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:v}),encrypt:function(e,t,i,r){var a=(r=this.cfg.extend(r)).kdf.execute(i,e.keySize,e.ivSize,r.salt,r.hasher);r.iv=a.iv;var n=y.encrypt.call(this,e,t,a.key,r);return n.mixIn(a),n},decrypt:function(e,t,i,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var a=r.kdf.execute(i,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=a.iv,y.decrypt.call(this,e,t,a.key,r)}})}())));var e}var Cu,Iu={exports:{}};var Pu,_u={exports:{}};var Ru,xu={exports:{}};function Lu(){return Ru?xu.exports:(Ru=1,xu.exports=(e=Ld(),Au(),e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function i(e){if(255&~(e>>24))e+=1<<24;else{var t=e>>16&255,i=e>>8&255,r=255&e;255===t?(t=0,255===i?(i=0,255===r?r=0:++r):++i):++t,e=0,e+=t<<16,e+=i<<8,e+=r}return e}function r(e){return 0===(e[0]=i(e[0]))&&(e[1]=i(e[1])),e}var a=t.Encryptor=t.extend({processBlock:function(e,t){var i=this._cipher,a=i.blockSize,n=this._iv,s=this._counter;n&&(s=this._counter=n.slice(0),this._iv=void 0),r(s);var o=s.slice(0);i.encryptBlock(o,0);for(var l=0;l<a;l++)e[t+l]^=o[l]}});return t.Decryptor=a,t}(),e.mode.CTRGladman));var e}var Du,Mu={exports:{}};var Ou,Nu={exports:{}};var Fu,Uu={exports:{}};var Bu,zu={exports:{}};var ju,$u={exports:{}};var Gu,qu={exports:{}};var Hu,Vu={exports:{}};var Wu,Ku={exports:{}};var Yu,Ju={exports:{}};var Xu,Qu={exports:{}};function Zu(){return Xu?Qu.exports:(Xu=1,Qu.exports=(e=Ld(),qd(),Jd(),ku(),Au(),function(){var t=e,i=t.lib,r=i.WordArray,a=i.BlockCipher,n=t.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=n.DES=a.extend({_doReset:function(){for(var e=this._key.words,t=[],i=0;i<56;i++){var r=s[i]-1;t[i]=e[r>>>5]>>>31-r%32&1}for(var a=this._subKeys=[],n=0;n<16;n++){var c=a[n]=[],d=l[n];for(i=0;i<24;i++)c[i/6|0]|=t[(o[i]-1+d)%28]<<31-i%6,c[4+(i/6|0)]|=t[28+(o[i+24]-1+d)%28]<<31-i%6;for(c[0]=c[0]<<1|c[0]>>>31,i=1;i<7;i++)c[i]=c[i]>>>4*(i-1)+3;c[7]=c[7]<<5|c[7]>>>27}var u=this._invSubKeys=[];for(i=0;i<16;i++)u[i]=a[15-i]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,i){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var a=i[r],n=this._lBlock,s=this._rBlock,o=0,l=0;l<8;l++)o|=c[l][((s^a[l])&d[l])>>>0];this._lBlock=s,this._rBlock=n^o}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,h.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var i=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=i,this._lBlock^=i<<e}function p(e,t){var i=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=i,this._rBlock^=i<<e}t.DES=a._createHelper(u);var m=n.TripleDES=a.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),i=e.length<4?e.slice(0,2):e.slice(2,4),a=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=u.createEncryptor(r.create(t)),this._des2=u.createEncryptor(r.create(i)),this._des3=u.createEncryptor(r.create(a))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=a._createHelper(m)}(),e.TripleDES));var e}var eh,th={exports:{}};var ih,rh={exports:{}};var ah,nh={exports:{}};var sh,oh,lh,ch,dh,uh,hh,ph={exports:{}};function mh(){return sh?ph.exports:(sh=1,ph.exports=(e=Ld(),qd(),Jd(),ku(),Au(),function(){var t=e,i=t.lib.BlockCipher,r=t.algo;const a=16,n=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var o={pbox:[],sbox:[]};function l(e,t){let i=t>>24&255,r=t>>16&255,a=t>>8&255,n=255&t,s=e.sbox[0][i]+e.sbox[1][r];return s^=e.sbox[2][a],s+=e.sbox[3][n],s}function c(e,t,i){let r,n=t,s=i;for(let o=0;o<a;++o)n^=e.pbox[o],s=l(e,n)^s,r=n,n=s,s=r;return r=n,n=s,s=r,s^=e.pbox[a],n^=e.pbox[a+1],{left:n,right:s}}function d(e,t,i){let r,n=t,s=i;for(let o=a+1;o>1;--o)n^=e.pbox[o],s=l(e,n)^s,r=n,n=s,s=r;return r=n,n=s,s=r,s^=e.pbox[1],n^=e.pbox[0],{left:n,right:s}}function u(e,t,i){for(let a=0;a<4;a++){e.sbox[a]=[];for(let t=0;t<256;t++)e.sbox[a][t]=s[a][t]}let r=0;for(let s=0;s<a+2;s++)e.pbox[s]=n[s]^t[r],r++,r>=i&&(r=0);let o=0,l=0,d=0;for(let n=0;n<a+2;n+=2)d=c(e,o,l),o=d.left,l=d.right,e.pbox[n]=o,e.pbox[n+1]=l;for(let a=0;a<4;a++)for(let t=0;t<256;t+=2)d=c(e,o,l),o=d.left,l=d.right,e.sbox[a][t]=o,e.sbox[a][t+1]=l;return!0}var h=r.Blowfish=i.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,i=e.sigBytes/4;u(o,t,i)}},encryptBlock:function(e,t){var i=c(o,e[t],e[t+1]);e[t]=i.left,e[t+1]=i.right},decryptBlock:function(e,t){var i=d(o,e[t],e[t+1]);e[t]=i.left,e[t+1]=i.right},blockSize:2,keySize:4,ivSize:2});t.Blowfish=i._createHelper(h)}(),e.Blowfish));var e}const fh=be(Pd.exports=function(e){return e}(Ld(),Od(),Ud(),jd(),qd(),Wd(),Jd(),Zd(),iu(),ru||(ru=1,au.exports=(hh=Ld(),iu(),lh=(oh=hh).lib.WordArray,ch=oh.algo,dh=ch.SHA256,uh=ch.SHA224=dh.extend({_doReset:function(){this._hash=new lh.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=dh._doFinalize.call(this);return e.sigBytes-=4,e}}),oh.SHA224=dh._createHelper(uh),oh.HmacSHA224=dh._createHmacHelper(uh),hh.SHA224)),ou(),function(){return lu?cu.exports:(lu=1,cu.exports=(o=Ld(),Od(),ou(),t=(e=o).x64,i=t.Word,r=t.WordArray,a=e.algo,n=a.SHA512,s=a.SHA384=n.extend({_doReset:function(){this._hash=new r.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var e=n._doFinalize.call(this);return e.sigBytes-=16,e}}),e.SHA384=n._createHelper(s),e.HmacSHA384=n._createHmacHelper(s),o.SHA384));var e,t,i,r,a,n,s,o}(),hu(),function(){return pu?mu.exports:(pu=1,mu.exports=(e=Ld(),function(){var t=e,i=t.lib,r=i.WordArray,a=i.Hasher,n=t.algo,s=r.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=r.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=r.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=r.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=r.create([0,1518500249,1859775393,2400959708,2840853838]),u=r.create([1352829926,1548603684,1836072691,2053994217,0]),h=n.RIPEMD160=a.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var r=t+i,a=e[r];e[r]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var n,h,b,w,S,k,T,E,A,C,I,P=this._hash.words,_=d.words,R=u.words,x=s.words,L=o.words,D=l.words,M=c.words;for(k=n=P[0],T=h=P[1],E=b=P[2],A=w=P[3],C=S=P[4],i=0;i<80;i+=1)I=n+e[t+x[i]]|0,I+=i<16?p(h,b,w)+_[0]:i<32?m(h,b,w)+_[1]:i<48?f(h,b,w)+_[2]:i<64?g(h,b,w)+_[3]:y(h,b,w)+_[4],I=(I=v(I|=0,D[i]))+S|0,n=S,S=w,w=v(b,10),b=h,h=I,I=k+e[t+L[i]]|0,I+=i<16?y(T,E,A)+R[0]:i<32?g(T,E,A)+R[1]:i<48?f(T,E,A)+R[2]:i<64?m(T,E,A)+R[3]:p(T,E,A)+R[4],I=(I=v(I|=0,M[i]))+C|0,k=C,C=A,A=v(E,10),E=T,T=I;I=P[1]+b+A|0,P[1]=P[2]+w+C|0,P[2]=P[3]+S+k|0,P[3]=P[4]+n+T|0,P[4]=P[0]+h+E|0,P[0]=I},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(t.length+1),this._process();for(var a=this._hash,n=a.words,s=0;s<5;s++){var o=n[s];n[s]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}return a},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,i){return e^t^i}function m(e,t,i){return e&t|~e&i}function f(e,t,i){return(e|~t)^i}function g(e,t,i){return e&i|t&~i}function y(e,t,i){return e^(t|~i)}function v(e,t){return e<<t|e>>>32-t}t.RIPEMD160=a._createHelper(h),t.HmacRIPEMD160=a._createHmacHelper(h)}(),e.RIPEMD160));var e}(),yu(),function(){return vu?bu.exports:(vu=1,bu.exports=(l=Ld(),iu(),yu(),t=(e=l).lib,i=t.Base,r=t.WordArray,a=e.algo,n=a.SHA256,s=a.HMAC,o=a.PBKDF2=i.extend({cfg:i.extend({keySize:4,hasher:n,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var i=this.cfg,a=s.create(i.hasher,e),n=r.create(),o=r.create([1]),l=n.words,c=o.words,d=i.keySize,u=i.iterations;l.length<d;){var h=a.update(t).finalize(o);a.reset();for(var p=h.words,m=p.length,f=h,g=1;g<u;g++){f=a.finalize(f),a.reset();for(var y=f.words,v=0;v<m;v++)p[v]^=y[v]}n.concat(h),c[0]++}return n.sigBytes=4*d,n}}),e.PBKDF2=function(e,t,i){return o.create(i).compute(e,t)},l.PBKDF2));var e,t,i,r,a,n,s,o,l}(),ku(),Au(),function(){return Cu?Iu.exports:(Cu=1,Iu.exports=(e=Ld(),Au(),e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();function i(e,t,i,r){var a,n=this._iv;n?(a=n.slice(0),this._iv=void 0):a=this._prevBlock,r.encryptBlock(a,0);for(var s=0;s<i;s++)e[t+s]^=a[s]}return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,a=r.blockSize;i.call(this,e,t,a,r),this._prevBlock=e.slice(t,t+a)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,a=r.blockSize,n=e.slice(t,t+a);i.call(this,e,t,a,r),this._prevBlock=n}}),t}(),e.mode.CFB));var e}(),function(){return Pu?_u.exports:(Pu=1,_u.exports=(i=Ld(),Au(),i.mode.CTR=(e=i.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var i=this._cipher,r=i.blockSize,a=this._iv,n=this._counter;a&&(n=this._counter=a.slice(0),this._iv=void 0);var s=n.slice(0);i.encryptBlock(s,0),n[r-1]=n[r-1]+1|0;for(var o=0;o<r;o++)e[t+o]^=s[o]}}),e.Decryptor=t,e),i.mode.CTR));var e,t,i}(),Lu(),function(){return Du?Mu.exports:(Du=1,Mu.exports=(i=Ld(),Au(),i.mode.OFB=(e=i.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var i=this._cipher,r=i.blockSize,a=this._iv,n=this._keystream;a&&(n=this._keystream=a.slice(0),this._iv=void 0),i.encryptBlock(n,0);for(var s=0;s<r;s++)e[t+s]^=n[s]}}),e.Decryptor=t,e),i.mode.OFB));var e,t,i}(),function(){return Ou?Nu.exports:(Ou=1,Nu.exports=(t=Ld(),Au(),t.mode.ECB=((e=t.lib.BlockCipherMode.extend()).Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e),t.mode.ECB));var e,t}(),function(){return Fu?Uu.exports:(Fu=1,Uu.exports=(e=Ld(),Au(),e.pad.AnsiX923={pad:function(e,t){var i=e.sigBytes,r=4*t,a=r-i%r,n=i+a-1;e.clamp(),e.words[n>>>2]|=a<<24-n%4*8,e.sigBytes+=a},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923));var e}(),function(){return Bu?zu.exports:(Bu=1,zu.exports=(e=Ld(),Au(),e.pad.Iso10126={pad:function(t,i){var r=4*i,a=r-t.sigBytes%r;t.concat(e.lib.WordArray.random(a-1)).concat(e.lib.WordArray.create([a<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126));var e}(),function(){return ju?$u.exports:(ju=1,$u.exports=(e=Ld(),Au(),e.pad.Iso97971={pad:function(t,i){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,i)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971));var e}(),function(){return Gu?qu.exports:(Gu=1,qu.exports=(e=Ld(),Au(),e.pad.ZeroPadding={pad:function(e,t){var i=4*t;e.clamp(),e.sigBytes+=i-(e.sigBytes%i||i)},unpad:function(e){var t=e.words,i=e.sigBytes-1;for(i=e.sigBytes-1;i>=0;i--)if(t[i>>>2]>>>24-i%4*8&255){e.sigBytes=i+1;break}}},e.pad.ZeroPadding));var e}(),function(){return Hu?Vu.exports:(Hu=1,Vu.exports=(e=Ld(),Au(),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding));var e}(),function(){return Wu?Ku.exports:(Wu=1,Ku.exports=(r=Ld(),Au(),t=(e=r).lib.CipherParams,i=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var r=i.parse(e);return t.create({ciphertext:r})}},r.format.Hex));var e,t,i,r}(),function(){return Yu?Ju.exports:(Yu=1,Ju.exports=(e=Ld(),qd(),Jd(),ku(),Au(),function(){var t=e,i=t.lib.BlockCipher,r=t.algo,a=[],n=[],s=[],o=[],l=[],c=[],d=[],u=[],h=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var i=0,r=0;for(t=0;t<256;t++){var m=r^r<<1^r<<2^r<<3^r<<4;m=m>>>8^255&m^99,a[i]=m,n[m]=i;var f=e[i],g=e[f],y=e[g],v=257*e[m]^16843008*m;s[i]=v<<24|v>>>8,o[i]=v<<16|v>>>16,l[i]=v<<8|v>>>24,c[i]=v,v=16843009*y^65537*g^257*f^16843008*i,d[m]=v<<24|v>>>8,u[m]=v<<16|v>>>16,h[m]=v<<8|v>>>24,p[m]=v,i?(i=f^e[e[e[y^f]]],r^=e[e[r]]):i=r=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],f=r.AES=i.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,i=e.sigBytes/4,r=4*((this._nRounds=i+6)+1),n=this._keySchedule=[],s=0;s<r;s++)s<i?n[s]=t[s]:(c=n[s-1],s%i?i>6&&s%i==4&&(c=a[c>>>24]<<24|a[c>>>16&255]<<16|a[c>>>8&255]<<8|a[255&c]):(c=a[(c=c<<8|c>>>24)>>>24]<<24|a[c>>>16&255]<<16|a[c>>>8&255]<<8|a[255&c],c^=m[s/i|0]<<24),n[s]=n[s-i]^c);for(var o=this._invKeySchedule=[],l=0;l<r;l++){if(s=r-l,l%4)var c=n[s];else c=n[s-4];o[l]=l<4||s<=4?c:d[a[c>>>24]]^u[a[c>>>16&255]]^h[a[c>>>8&255]]^p[a[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,s,o,l,c,a)},decryptBlock:function(e,t){var i=e[t+1];e[t+1]=e[t+3],e[t+3]=i,this._doCryptBlock(e,t,this._invKeySchedule,d,u,h,p,n),i=e[t+1],e[t+1]=e[t+3],e[t+3]=i},_doCryptBlock:function(e,t,i,r,a,n,s,o){for(var l=this._nRounds,c=e[t]^i[0],d=e[t+1]^i[1],u=e[t+2]^i[2],h=e[t+3]^i[3],p=4,m=1;m<l;m++){var f=r[c>>>24]^a[d>>>16&255]^n[u>>>8&255]^s[255&h]^i[p++],g=r[d>>>24]^a[u>>>16&255]^n[h>>>8&255]^s[255&c]^i[p++],y=r[u>>>24]^a[h>>>16&255]^n[c>>>8&255]^s[255&d]^i[p++],v=r[h>>>24]^a[c>>>16&255]^n[d>>>8&255]^s[255&u]^i[p++];c=f,d=g,u=y,h=v}f=(o[c>>>24]<<24|o[d>>>16&255]<<16|o[u>>>8&255]<<8|o[255&h])^i[p++],g=(o[d>>>24]<<24|o[u>>>16&255]<<16|o[h>>>8&255]<<8|o[255&c])^i[p++],y=(o[u>>>24]<<24|o[h>>>16&255]<<16|o[c>>>8&255]<<8|o[255&d])^i[p++],v=(o[h>>>24]<<24|o[c>>>16&255]<<16|o[d>>>8&255]<<8|o[255&u])^i[p++],e[t]=f,e[t+1]=g,e[t+2]=y,e[t+3]=v},keySize:8});t.AES=i._createHelper(f)}(),e.AES));var e}(),Zu(),function(){return eh?th.exports:(eh=1,th.exports=(e=Ld(),qd(),Jd(),ku(),Au(),function(){var t=e,i=t.lib.StreamCipher,r=t.algo,a=r.RC4=i.extend({_doReset:function(){for(var e=this._key,t=e.words,i=e.sigBytes,r=this._S=[],a=0;a<256;a++)r[a]=a;a=0;for(var n=0;a<256;a++){var s=a%i,o=t[s>>>2]>>>24-s%4*8&255;n=(n+r[a]+o)%256;var l=r[a];r[a]=r[n],r[n]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=n.call(this)},keySize:8,ivSize:0});function n(){for(var e=this._S,t=this._i,i=this._j,r=0,a=0;a<4;a++){i=(i+e[t=(t+1)%256])%256;var n=e[t];e[t]=e[i],e[i]=n,r|=e[(e[t]+e[i])%256]<<24-8*a}return this._i=t,this._j=i,r}t.RC4=i._createHelper(a);var s=r.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)n.call(this)}});t.RC4Drop=i._createHelper(s)}(),e.RC4));var e}(),function(){return ih?rh.exports:(ih=1,rh.exports=(e=Ld(),qd(),Jd(),ku(),Au(),function(){var t=e,i=t.lib.StreamCipher,r=t.algo,a=[],n=[],s=[],o=r.Rabbit=i.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,i=0;i<4;i++)e[i]=16711935&(e[i]<<8|e[i]>>>24)|4278255360&(e[i]<<24|e[i]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],a=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)a[i]^=r[i+4&7];if(t){var n=t.words,s=n[0],o=n[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=c>>>16|4294901760&d,h=d<<16|65535&c;for(a[0]^=c,a[1]^=u,a[2]^=d,a[3]^=h,a[4]^=c,a[5]^=u,a[6]^=d,a[7]^=h,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var i=this._X;l.call(this),a[0]=i[0]^i[5]>>>16^i[3]<<16,a[1]=i[2]^i[7]>>>16^i[5]<<16,a[2]=i[4]^i[1]>>>16^i[7]<<16,a[3]=i[6]^i[3]>>>16^i[1]<<16;for(var r=0;r<4;r++)a[r]=16711935&(a[r]<<8|a[r]>>>24)|4278255360&(a[r]<<24|a[r]>>>8),e[t+r]^=a[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,i=0;i<8;i++)n[i]=t[i];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<n[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<n[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<n[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<n[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<n[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<n[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<n[6]>>>0?1:0)|0,this._b=t[7]>>>0<n[7]>>>0?1:0,i=0;i<8;i++){var r=e[i]+t[i],a=65535&r,o=r>>>16,l=((a*a>>>17)+a*o>>>15)+o*o,c=((4294901760&r)*r|0)+((65535&r)*r|0);s[i]=l^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=i._createHelper(o)}(),e.Rabbit));var e}(),function(){return ah?nh.exports:(ah=1,nh.exports=(e=Ld(),qd(),Jd(),ku(),Au(),function(){var t=e,i=t.lib.StreamCipher,r=t.algo,a=[],n=[],s=[],o=r.RabbitLegacy=i.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var a=0;a<4;a++)l.call(this);for(a=0;a<8;a++)r[a]^=i[a+4&7];if(t){var n=t.words,s=n[0],o=n[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=c>>>16|4294901760&d,h=d<<16|65535&c;for(r[0]^=c,r[1]^=u,r[2]^=d,r[3]^=h,r[4]^=c,r[5]^=u,r[6]^=d,r[7]^=h,a=0;a<4;a++)l.call(this)}},_doProcessBlock:function(e,t){var i=this._X;l.call(this),a[0]=i[0]^i[5]>>>16^i[3]<<16,a[1]=i[2]^i[7]>>>16^i[5]<<16,a[2]=i[4]^i[1]>>>16^i[7]<<16,a[3]=i[6]^i[3]>>>16^i[1]<<16;for(var r=0;r<4;r++)a[r]=16711935&(a[r]<<8|a[r]>>>24)|4278255360&(a[r]<<24|a[r]>>>8),e[t+r]^=a[r]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,i=0;i<8;i++)n[i]=t[i];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<n[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<n[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<n[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<n[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<n[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<n[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<n[6]>>>0?1:0)|0,this._b=t[7]>>>0<n[7]>>>0?1:0,i=0;i<8;i++){var r=e[i]+t[i],a=65535&r,o=r>>>16,l=((a*a>>>17)+a*o>>>15)+o*o,c=((4294901760&r)*r|0)+((65535&r)*r|0);s[i]=l^c}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=i._createHelper(o)}(),e.RabbitLegacy));var e}(),mh()));function gh(e,t){try{const i=fh.enc.Utf8.parse(t),r=fh.AES.decrypt(e,i,{mode:fh.mode.ECB,padding:fh.pad.Pkcs7}).toString(fh.enc.Utf8);if(!r)throw new Error("null");return r}catch(i){throw new Error("error")}}const yh=new class{constructor(){t(this,"sdkLoaded",!1),t(this,"loadPromise",null),t(this,"deferredInitBound",!1),t(this,"deferredInitTimer",null)}async loadSDK(){if(!this.sdkLoaded)return this.loadPromise||(this.loadPromise=new Promise(e=>{try{this.loadSDKByScript().then(async()=>{try{const t=window.YYSStatistics;if(t&&"function"==typeof t.init){return localStorage.getItem("YYS_DEVICE_ID")?(this.sdkLoaded=!0,void e()):(this.generateFallbackDeviceId(),this.sdkLoaded=!0,this.scheduleDeferredSDKInit(),void e())}this.generateFallbackDeviceId(),e()}catch(t){this.generateFallbackDeviceId(),e()}}).catch(t=>{this.generateFallbackDeviceId(),e()})}catch(t){this.generateFallbackDeviceId(),e()}})),this.loadPromise}scheduleDeferredSDKInit(){if(this.deferredInitBound)return;this.deferredInitBound=!0;const e=["pointerdown","touchstart","mousedown","keydown"],t=()=>{e.forEach(e=>{window.removeEventListener(e,r,!0)}),null!==this.deferredInitTimer&&(window.clearTimeout(this.deferredInitTimer),this.deferredInitTimer=null),this.deferredInitBound=!1},i=async()=>{try{const e=window.YYSStatistics;if(!e||"function"!=typeof e.init)return;const t=localStorage.getItem("YYS_DEVICE_ID")||"";await e.init({appId:"web-fingerprint"}),await this.waitForDeviceId(t),this.sdkLoaded=!0}catch(e){}},r=()=>{t(),this.deferredInitTimer=window.setTimeout(()=>{this.deferredInitTimer=null,i()},0)};e.forEach(e=>{window.addEventListener(e,r,!0)})}loadSDKByScript(){return new Promise((e,t)=>{try{if(window.YYSStatistics)return void e();const i=document.createElement("script");i.src=new URL("/js/yys-statistics-sdk.min.B7DrhTz1.js",import.meta.url).href,i.async=!0,i.onload=()=>{e()},i.onerror=e=>{t(new Error("Failed to load YYS SDK script"))},document.head.appendChild(i)}catch(i){t(i)}})}generateFallbackDeviceId(){try{if(localStorage.getItem("YYS_DEVICE_ID"))return;const e=Date.now().toString(36),t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",i=e+Array.from({length:32-e.length},()=>t.charAt(Math.floor(Math.random()*t.length))).join("");localStorage.setItem("YYS_DEVICE_ID",i),this.sdkLoaded=!0}catch{}}waitForDeviceId(e=""){return new Promise((t,i)=>{let r=0;const a=()=>{const n=localStorage.getItem("YYS_DEVICE_ID")||"";n&&n!==e?t():(r++,r>=30?i(new Error("Timeout waiting for device ID")):setTimeout(a,100))};a()})}getDeviceId(){try{return localStorage.getItem("YYS_DEVICE_ID")||""}catch{return""}}},vh=()=>yh.getDeviceId();var bh={};const wh=function(e){const t=[];let i=0;for(let r=0;r<e.length;r++){let a=e.charCodeAt(r);a<128?t[i++]=a:a<2048?(t[i++]=a>>6|192,t[i++]=63&a|128):55296==(64512&a)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++r)),t[i++]=a>>18|240,t[i++]=a>>12&63|128,t[i++]=a>>6&63|128,t[i++]=63&a|128):(t[i++]=a>>12|224,t[i++]=a>>6&63|128,t[i++]=63&a|128)}return t},Sh={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const i=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let a=0;a<e.length;a+=3){const t=e[a],n=a+1<e.length,s=n?e[a+1]:0,o=a+2<e.length,l=o?e[a+2]:0,c=t>>2,d=(3&t)<<4|s>>4;let u=(15&s)<<2|l>>6,h=63&l;o||(h=64,n||(u=64)),r.push(i[c],i[d],i[u],i[h])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(wh(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let i=0,r=0;for(;i<e.length;){const a=e[i++];if(a<128)t[r++]=String.fromCharCode(a);else if(a>191&&a<224){const n=e[i++];t[r++]=String.fromCharCode((31&a)<<6|63&n)}else if(a>239&&a<365){const n=((7&a)<<18|(63&e[i++])<<12|(63&e[i++])<<6|63&e[i++])-65536;t[r++]=String.fromCharCode(55296+(n>>10)),t[r++]=String.fromCharCode(56320+(1023&n))}else{const n=e[i++],s=e[i++];t[r++]=String.fromCharCode((15&a)<<12|(63&n)<<6|63&s)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const i=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let a=0;a<e.length;){const t=i[e.charAt(a++)],n=a<e.length?i[e.charAt(a)]:0;++a;const s=a<e.length?i[e.charAt(a)]:64;++a;const o=a<e.length?i[e.charAt(a)]:64;if(++a,null==t||null==n||null==s||null==o)throw new kh;const l=t<<2|n>>4;if(r.push(l),64!==s){const e=n<<4&240|s>>2;if(r.push(e),64!==o){const e=s<<6&192|o;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class kh extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Th=function(e){return function(e){const t=wh(e);return Sh.encodeByteArray(t,!0)}(e).replace(/\./g,"")};const Eh=()=>function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,Ah=()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(i){return}const t=e&&function(e){try{return Sh.decodeString(e,!0)}catch(i){}return null}(e[1]);return t&&JSON.parse(t)},Ch=()=>{try{return Eh()||(()=>{if("undefined"==typeof process)return;const e=bh.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||Ah()}catch(e){return}},Ih=()=>{var e;return null==(e=Ch())?void 0:e.config};class Ph{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,i)=>{t?this.reject(t):this.resolve(i),"function"==typeof e&&(this.promise.catch(()=>{}),1===e.length?e(t):e(t,i))}}}function _h(){try{return"object"==typeof indexedDB}catch(e){return!1}}function Rh(){return new Promise((e,t)=>{try{let i=!0;const r="validate-browser-context-for-indexeddb-analytics-module",a=self.indexedDB.open(r);a.onsuccess=()=>{a.result.close(),i||self.indexedDB.deleteDatabase(r),e(!0)},a.onupgradeneeded=()=>{i=!1},a.onerror=()=>{var e;t((null==(e=a.error)?void 0:e.message)||"")}}catch(i){t(i)}})}class xh extends Error{constructor(e,t,i){super(t),this.code=e,this.customData=i,this.name="FirebaseError",Object.setPrototypeOf(this,xh.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Lh.prototype.create)}}class Lh{constructor(e,t,i){this.service=e,this.serviceName=t,this.errors=i}create(e,...t){const i=t[0]||{},r=`${this.service}/${e}`,a=this.errors[e],n=a?function(e,t){return e.replace(Dh,(e,i)=>{const r=t[i];return null!=r?String(r):`<${i}?>`})}(a,i):"Error",s=`${this.serviceName}: ${n} (${r}).`;return new xh(r,s,i)}}const Dh=/\{\$([^}]+)}/g;function Mh(e,t){if(e===t)return!0;const i=Object.keys(e),r=Object.keys(t);for(const a of i){if(!r.includes(a))return!1;const i=e[a],n=t[a];if(Oh(i)&&Oh(n)){if(!Mh(i,n))return!1}else if(i!==n)return!1}for(const a of r)if(!i.includes(a))return!1;return!0}function Oh(e){return null!==e&&"object"==typeof e}function Nh(e,t=1e3,i=2){const r=t*Math.pow(i,e),a=Math.round(.5*r*(Math.random()-.5)*2);return Math.min(144e5,r+a)}function Fh(e){return e&&e._delegate?e._delegate:e}class Uh{constructor(e,t,i){this.name=e,this.instanceFactory=t,this.type=i,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}const Bh="[DEFAULT]";class zh{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new Ph;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:t});i&&e.resolve(i)}catch(i){}}return this.instancesDeferred.get(t).promise}getImmediate(e){const t=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),i=(null==e?void 0:e.optional)??!1;if(!this.isInitialized(t)&&!this.shouldAutoInitialize()){if(i)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:t})}catch(r){if(i)return null;throw r}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:Bh})}catch(t){}for(const[e,i]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:r});i.resolve(e)}catch(t){}}}}clearInstance(e=Bh){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=Bh){return this.instances.has(e)}getOptions(e=Bh){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,i=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(i))throw Error(`${this.name}(${i}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:i,options:t});for(const[a,n]of this.instancesDeferred.entries()){i===this.normalizeInstanceIdentifier(a)&&n.resolve(r)}return r}onInit(e,t){const i=this.normalizeInstanceIdentifier(t),r=this.onInitCallbacks.get(i)??new Set;r.add(e),this.onInitCallbacks.set(i,r);const a=this.instances.get(i);return a&&e(a,i),()=>{r.delete(e)}}invokeOnInitCallbacks(e,t){const i=this.onInitCallbacks.get(t);if(i)for(const r of i)try{r(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let i=this.instances.get(e);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:(r=e,r===Bh?void 0:r),options:t}),this.instances.set(e,i),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(i,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,i)}catch{}var r;return i||null}normalizeInstanceIdentifier(e=Bh){return this.component?this.component.multipleInstances?e:Bh:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class jh{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new zh(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}var $h,Gh;(Gh=$h||($h={}))[Gh.DEBUG=0]="DEBUG",Gh[Gh.VERBOSE=1]="VERBOSE",Gh[Gh.INFO=2]="INFO",Gh[Gh.WARN=3]="WARN",Gh[Gh.ERROR=4]="ERROR",Gh[Gh.SILENT=5]="SILENT";const qh={debug:$h.DEBUG,verbose:$h.VERBOSE,info:$h.INFO,warn:$h.WARN,error:$h.ERROR,silent:$h.SILENT},Hh=$h.INFO,Vh={[$h.DEBUG]:"log",[$h.VERBOSE]:"log",[$h.INFO]:"info",[$h.WARN]:"warn",[$h.ERROR]:"error"},Wh=(e,t,...i)=>{if(t<e.logLevel)return;(new Date).toISOString();if(!Vh[t])throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};let Kh=class{constructor(e){this.name=e,this._logLevel=Hh,this._logHandler=Wh,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in $h))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?qh[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,$h.DEBUG,...e),this._logHandler(this,$h.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,$h.VERBOSE,...e),this._logHandler(this,$h.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,$h.INFO,...e),this._logHandler(this,$h.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,$h.WARN,...e),this._logHandler(this,$h.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,$h.ERROR,...e),this._logHandler(this,$h.ERROR,...e)}};let Yh,Jh;const Xh=new WeakMap,Qh=new WeakMap,Zh=new WeakMap,ep=new WeakMap,tp=new WeakMap;let ip={get(e,t,i){if(e instanceof IDBTransaction){if("done"===t)return Qh.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Zh.get(e);if("store"===t)return i.objectStoreNames[1]?void 0:i.objectStore(i.objectStoreNames[0])}return np(e[t])},set:(e,t,i)=>(e[t]=i,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function rp(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Jh||(Jh=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(sp(this),t),np(Xh.get(this))}:function(...t){return np(e.apply(sp(this),t))}:function(t,...i){const r=e.call(sp(this),t,...i);return Zh.set(r,t.sort?t.sort():[t]),np(r)}}function ap(e){return"function"==typeof e?rp(e):(e instanceof IDBTransaction&&function(e){if(Qh.has(e))return;const t=new Promise((t,i)=>{const r=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",n),e.removeEventListener("abort",n)},a=()=>{t(),r()},n=()=>{i(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",a),e.addEventListener("error",n),e.addEventListener("abort",n)});Qh.set(e,t)}(e),t=e,(Yh||(Yh=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>t instanceof e)?new Proxy(e,ip):e);var t}function np(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,i)=>{const r=()=>{e.removeEventListener("success",a),e.removeEventListener("error",n)},a=()=>{t(np(e.result)),r()},n=()=>{i(e.error),r()};e.addEventListener("success",a),e.addEventListener("error",n)});return t.then(t=>{t instanceof IDBCursor&&Xh.set(t,e)}).catch(()=>{}),tp.set(t,e),t}(e);if(ep.has(e))return ep.get(e);const t=ap(e);return t!==e&&(ep.set(e,t),tp.set(t,e)),t}const sp=e=>tp.get(e);function op(e,t,{blocked:i,upgrade:r,blocking:a,terminated:n}={}){const s=indexedDB.open(e,t),o=np(s);return r&&s.addEventListener("upgradeneeded",e=>{r(np(s.result),e.oldVersion,e.newVersion,np(s.transaction),e)}),i&&s.addEventListener("blocked",e=>i(e.oldVersion,e.newVersion,e)),o.then(e=>{n&&e.addEventListener("close",()=>n()),a&&e.addEventListener("versionchange",e=>a(e.oldVersion,e.newVersion,e))}).catch(()=>{}),o}const lp=["get","getKey","getAll","getAllKeys","count"],cp=["put","add","delete","clear"],dp=new Map;function up(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(dp.get(t))return dp.get(t);const i=t.replace(/FromIndex$/,""),r=t!==i,a=cp.includes(i);if(!(i in(r?IDBIndex:IDBObjectStore).prototype)||!a&&!lp.includes(i))return;const n=async function(e,...t){const n=this.transaction(e,a?"readwrite":"readonly");let s=n.store;return r&&(s=s.index(t.shift())),(await Promise.all([s[i](...t),a&&n.done]))[0]};return dp.set(t,n),n}ip=(e=>({...e,get:(t,i,r)=>up(t,i)||e.get(t,i,r),has:(t,i)=>!!up(t,i)||e.has(t,i)}))(ip);class hp{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null}).filter(e=>e).join(" ")}}const pp="@firebase/app",mp="0.14.13",fp=new Kh("@firebase/app"),gp="@firebase/app-compat",yp="@firebase/analytics-compat",vp="@firebase/analytics",bp="@firebase/app-check-compat",wp="@firebase/app-check",Sp="@firebase/auth",kp="@firebase/auth-compat",Tp="@firebase/database",Ep="@firebase/data-connect",Ap="@firebase/database-compat",Cp="@firebase/functions",Ip="@firebase/functions-compat",Pp="@firebase/installations",_p="@firebase/installations-compat",Rp="@firebase/messaging",xp="@firebase/messaging-compat",Lp="@firebase/performance",Dp="@firebase/performance-compat",Mp="@firebase/remote-config",Op="@firebase/remote-config-compat",Np="@firebase/storage",Fp="@firebase/storage-compat",Up="@firebase/firestore",Bp="@firebase/ai",zp="@firebase/firestore-compat",jp="firebase",$p="[DEFAULT]",Gp={[pp]:"fire-core",[gp]:"fire-core-compat",[vp]:"fire-analytics",[yp]:"fire-analytics-compat",[wp]:"fire-app-check",[bp]:"fire-app-check-compat",[Sp]:"fire-auth",[kp]:"fire-auth-compat",[Tp]:"fire-rtdb",[Ep]:"fire-data-connect",[Ap]:"fire-rtdb-compat",[Cp]:"fire-fn",[Ip]:"fire-fn-compat",[Pp]:"fire-iid",[_p]:"fire-iid-compat",[Rp]:"fire-fcm",[xp]:"fire-fcm-compat",[Lp]:"fire-perf",[Dp]:"fire-perf-compat",[Mp]:"fire-rc",[Op]:"fire-rc-compat",[Np]:"fire-gcs",[Fp]:"fire-gcs-compat",[Up]:"fire-fst",[zp]:"fire-fst-compat",[Bp]:"fire-vertex","fire-js":"fire-js",[jp]:"fire-js-all"},qp=new Map,Hp=new Map,Vp=new Map;function Wp(e,t){try{e.container.addComponent(t)}catch(i){fp.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,i)}}function Kp(e){const t=e.name;if(Vp.has(t))return fp.debug(`There were multiple attempts to register component ${t}.`),!1;Vp.set(t,e);for(const i of qp.values())Wp(i,e);for(const i of Hp.values())Wp(i,e);return!0}function Yp(e,t){const i=e.container.getProvider("heartbeat").getImmediate({optional:!0});return i&&i.triggerHeartbeat(),e.container.getProvider(t)}const Jp=new Lh("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class Xp{constructor(e,t,i){this._isDeleted=!1,this._options={...e},this._config={...t},this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new Uh("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Jp.create("app-deleted",{appName:this._name})}}function Qp(e,t={}){let i=e;if("object"!=typeof t){t={name:t}}const r={name:$p,automaticDataCollectionEnabled:!0,...t},a=r.name;if("string"!=typeof a||!a)throw Jp.create("bad-app-name",{appName:String(a)});if(i||(i=Ih()),!i)throw Jp.create("no-options");const n=qp.get(a);if(n){if(Mh(i,n.options)&&Mh(r,n.config))return n;throw Jp.create("duplicate-app",{appName:a})}const s=new jh(a);for(const l of Vp.values())s.addComponent(l);const o=new Xp(i,r,s);return qp.set(a,o),o}function Zp(e,t,i){let r=Gp[e]??e;i&&(r+=`-${i}`);const a=r.match(/\s|\//),n=t.match(/\s|\//);if(a||n){const e=[`Unable to register library "${r}" with version "${t}":`];return a&&e.push(`library name "${r}" contains illegal characters (whitespace or "/")`),a&&n&&e.push("and"),n&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void fp.warn(e.join(" "))}Kp(new Uh(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}const em="firebase-heartbeat-store";let tm=null;function im(){return tm||(tm=op("firebase-heartbeat-database",1,{upgrade:(e,t)=>{if(0===t)try{e.createObjectStore(em)}catch(i){}}}).catch(e=>{throw Jp.create("idb-open",{originalErrorMessage:e.message})})),tm}async function rm(e,t){try{const i=(await im()).transaction(em,"readwrite"),r=i.objectStore(em);await r.put(t,am(e)),await i.done}catch(i){if(i instanceof xh)fp.warn(i.message);else{const e=Jp.create("idb-set",{originalErrorMessage:null==i?void 0:i.message});fp.warn(e.message)}}}function am(e){return`${e.name}!${e.options.appId}`}class nm{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new om(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){var e,t;try{const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=sm();if(null==(null==(e=this._heartbeatsCache)?void 0:e.heartbeats)&&(this._heartbeatsCache=await this._heartbeatsCachePromise,null==(null==(t=this._heartbeatsCache)?void 0:t.heartbeats)))return;if(this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(e=>e.date===r))return;if(this._heartbeatsCache.heartbeats.push({date:r,agent:i}),this._heartbeatsCache.heartbeats.length>30){const e=function(e){if(0===e.length)return-1;let t=0,i=e[0].date;for(let r=1;r<e.length;r++)e[r].date<i&&(i=e[r].date,t=r);return t}(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(e,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(i){fp.warn(i)}}async getHeartbeatsHeader(){var e;try{if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null==(null==(e=this._heartbeatsCache)?void 0:e.heartbeats)||0===this._heartbeatsCache.heartbeats.length)return"";const t=sm(),{heartbeatsToSend:i,unsentEntries:r}=function(e,t=1024){const i=[];let r=e.slice();for(const a of e){const e=i.find(e=>e.agent===a.agent);if(e){if(e.dates.push(a.date),lm(i)>t){e.dates.pop();break}}else if(i.push({agent:a.agent,dates:[a.date]}),lm(i)>t){i.pop();break}r=r.slice(1)}return{heartbeatsToSend:i,unsentEntries:r}}(this._heartbeatsCache.heartbeats),a=Th(JSON.stringify({version:2,heartbeats:i}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),a}catch(t){return fp.warn(t),""}}}function sm(){return(new Date).toISOString().substring(0,10)}class om{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!_h()&&Rh().then(()=>!0).catch(()=>!1)}async read(){if(await this._canUseIndexedDBPromise){const e=await async function(e){try{const t=(await im()).transaction(em),i=await t.objectStore(em).get(am(e));return await t.done,i}catch(t){if(t instanceof xh)fp.warn(t.message);else{const e=Jp.create("idb-get",{originalErrorMessage:null==t?void 0:t.message});fp.warn(e.message)}}}(this.app);return(null==e?void 0:e.heartbeats)?e:{heartbeats:[]}}return{heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){const t=await this.read();return rm(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){if(await this._canUseIndexedDBPromise){const t=await this.read();return rm(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??t.lastSentHeartbeatDate,heartbeats:[...t.heartbeats,...e.heartbeats]})}}}function lm(e){return Th(JSON.stringify({version:2,heartbeats:e})).length}var cm;cm="",Kp(new Uh("platform-logger",e=>new hp(e),"PRIVATE")),Kp(new Uh("heartbeat",e=>new nm(e),"PRIVATE")),Zp(pp,mp,cm),Zp(pp,mp,"esm2020"),Zp("fire-js","");Zp("firebase","12.14.0","app");const dm="@firebase/installations",um="0.6.22",hm=1e4,pm=`w:${um}`,mm="FIS_v2",fm=36e5,gm=new Lh("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function ym(e){return e instanceof xh&&e.code.includes("request-failed")}function vm({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function bm(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function wm(e,t){const i=(await t.json()).error;return gm.create("request-failed",{requestName:e,serverCode:i.code,serverMessage:i.message,serverStatus:i.status})}function Sm({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function km(e,{refreshToken:t}){const i=Sm(e);return i.append("Authorization",function(e){return`${mm} ${e}`}(t)),i}async function Tm(e){const t=await e();return t.status>=500&&t.status<600?e():t}function Em(e){return new Promise(t=>{setTimeout(t,e)})}const Am=/^[cdef][\w-]{21}$/;function Cm(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){const t=(i=e,btoa(String.fromCharCode(...i)).replace(/\+/g,"-").replace(/\//g,"_"));var i;return t.substr(0,22)}(e);return Am.test(t)?t:""}catch{return""}}function Im(e){return`${e.appName}!${e.appId}`}const Pm=new Map;function _m(e,t){const i=Im(e);Rm(i,t),function(e,t){const i=function(){!xm&&"BroadcastChannel"in self&&(xm=new BroadcastChannel("[Firebase] FID Change"),xm.onmessage=e=>{Rm(e.data.key,e.data.fid)});return xm}();i&&i.postMessage({key:e,fid:t});0===Pm.size&&xm&&(xm.close(),xm=null)}(i,t)}function Rm(e,t){const i=Pm.get(e);if(i)for(const r of i)r(t)}let xm=null;const Lm="firebase-installations-store";let Dm=null;function Mm(){return Dm||(Dm=op("firebase-installations-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(Lm)}})),Dm}async function Om(e,t){const i=Im(e),r=(await Mm()).transaction(Lm,"readwrite"),a=r.objectStore(Lm),n=await a.get(i);return await a.put(t,i),await r.done,n&&n.fid===t.fid||_m(e,t.fid),t}async function Nm(e){const t=Im(e),i=(await Mm()).transaction(Lm,"readwrite");await i.objectStore(Lm).delete(t),await i.done}async function Fm(e,t){const i=Im(e),r=(await Mm()).transaction(Lm,"readwrite"),a=r.objectStore(Lm),n=await a.get(i),s=t(n);return void 0===s?await a.delete(i):await a.put(s,i),await r.done,!s||n&&n.fid===s.fid||_m(e,s.fid),s}async function Um(e){let t;const i=await Fm(e.appConfig,i=>{const r=function(e){const t=e||{fid:Cm(),registrationStatus:0};return jm(t)}(i),a=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(gm.create("app-offline"))}}const i={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=async function(e,t){try{const i=await async function({appConfig:e,heartbeatServiceProvider:t},{fid:i}){const r=vm(e),a=Sm(e),n=t.getImmediate({optional:!0});if(n){const e=await n.getHeartbeatsHeader();e&&a.append("x-firebase-client",e)}const s={fid:i,authVersion:mm,appId:e.appId,sdkVersion:pm},o={method:"POST",headers:a,body:JSON.stringify(s)},l=await Tm(()=>fetch(r,o));if(l.ok){const e=await l.json();return{fid:e.fid||i,registrationStatus:2,refreshToken:e.refreshToken,authToken:bm(e.authToken)}}throw await wm("Create Installation",l)}(e,t);return Om(e.appConfig,i)}catch(i){throw ym(i)&&409===i.customData.serverCode?await Nm(e.appConfig):await Om(e.appConfig,{fid:t.fid,registrationStatus:0}),i}}(e,i);return{installationEntry:i,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:Bm(e)}:{installationEntry:t}}(e,r);return t=a.registrationPromise,a.installationEntry});return""===i.fid?{installationEntry:await t}:{installationEntry:i,registrationPromise:t}}async function Bm(e){let t=await zm(e.appConfig);for(;1===t.registrationStatus;)await Em(100),t=await zm(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:i}=await Um(e);return i||t}return t}function zm(e){return Fm(e,e=>{if(!e)throw gm.create("installation-not-found");return jm(e)})}function jm(e){return 1===(t=e).registrationStatus&&t.registrationTime+hm<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function $m({appConfig:e,heartbeatServiceProvider:t},i){const r=function(e,{fid:t}){return`${vm(e)}/${t}/authTokens:generate`}(e,i),a=km(e,i),n=t.getImmediate({optional:!0});if(n){const e=await n.getHeartbeatsHeader();e&&a.append("x-firebase-client",e)}const s={installation:{sdkVersion:pm,appId:e.appId}},o={method:"POST",headers:a,body:JSON.stringify(s)},l=await Tm(()=>fetch(r,o));if(l.ok){return bm(await l.json())}throw await wm("Generate Auth Token",l)}async function Gm(e,t=!1){let i;const r=await Fm(e.appConfig,r=>{if(!Hm(r))throw gm.create("not-registered");const a=r.authToken;if(!t&&function(e){return 2===e.requestStatus&&!function(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+fm}(e)}(a))return r;if(1===a.requestStatus)return i=async function(e,t){let i=await qm(e.appConfig);for(;1===i.authToken.requestStatus;)await Em(100),i=await qm(e.appConfig);const r=i.authToken;return 0===r.requestStatus?Gm(e,t):r}(e,t),r;{if(!navigator.onLine)throw gm.create("app-offline");const t=function(e){const t={requestStatus:1,requestTime:Date.now()};return{...e,authToken:t}}(r);return i=async function(e,t){try{const i=await $m(e,t),r={...t,authToken:i};return await Om(e.appConfig,r),i}catch(i){if(!ym(i)||401!==i.customData.serverCode&&404!==i.customData.serverCode){const i={...t,authToken:{requestStatus:0}};await Om(e.appConfig,i)}else await Nm(e.appConfig);throw i}}(e,t),t}});return i?await i:r.authToken}function qm(e){return Fm(e,e=>{if(!Hm(e))throw gm.create("not-registered");const t=e.authToken;return 1===(i=t).requestStatus&&i.requestTime+hm<Date.now()?{...e,authToken:{requestStatus:0}}:e;var i})}function Hm(e){return void 0!==e&&2===e.registrationStatus}async function Vm(e,t=!1){const i=e;await async function(e){const{registrationPromise:t}=await Um(e);t&&await t}(i);return(await Gm(i,t)).token}function Wm(e){return gm.create("missing-app-config-values",{valueName:e})}const Km="installations",Ym=e=>{const t=Yp(e.getProvider("app").getImmediate(),Km).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:i,registrationPromise:r}=await Um(t);return r?r.catch(console.error):Gm(t).catch(console.error),i.fid}(t),getToken:e=>Vm(t,e)}};Kp(new Uh(Km,e=>{const t=e.getProvider("app").getImmediate(),i=function(e){if(!e||!e.options)throw Wm("App Configuration");if(!e.name)throw Wm("App Name");const t=["projectId","apiKey","appId"];for(const i of t)if(!e.options[i])throw Wm(i);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:i,heartbeatServiceProvider:Yp(t,"heartbeat"),_delete:()=>Promise.resolve()}},"PUBLIC")),Kp(new Uh("installations-internal",Ym,"PRIVATE")),Zp(dm,um),Zp(dm,um,"esm2020");const Jm="analytics",Xm="https://www.googletagmanager.com/gtag/js",Qm=new Kh("@firebase/analytics"),Zm=new Lh("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."});function ef(e){if(!e.startsWith(Xm)){const t=Zm.create("invalid-gtag-resource",{gtagURL:e});return Qm.warn(t.message),""}return e}function tf(e){return Promise.all(e.map(e=>e.catch(e=>e)))}function rf(e,t){const i=function(e,t){let i;return window.trustedTypes&&(i=window.trustedTypes.createPolicy(e,t)),i}("firebase-js-sdk-policy",{createScriptURL:ef}),r=document.createElement("script"),a=`${Xm}?l=${e}&id=${t}`;r.src=i?null==i?void 0:i.createScriptURL(a):a,r.async=!0,document.head.appendChild(r)}function af(e,t,i,r){return async function(a,...n){try{if("event"===a){const[r,a]=n;await async function(e,t,i,r,a){try{let n=[];if(a&&a.send_to){let e=a.send_to;Array.isArray(e)||(e=[e]);const r=await tf(i);for(const i of e){const e=r.find(e=>e.measurementId===i),a=e&&t[e.appId];if(!a){n=[];break}n.push(a)}}0===n.length&&(n=Object.values(t)),await Promise.all(n),e("event",r,a||{})}catch(n){Qm.error(n)}}(e,t,i,r,a)}else if("config"===a){const[a,s]=n;await async function(e,t,i,r,a,n){const s=r[a];try{if(s)await t[s];else{const e=(await tf(i)).find(e=>e.measurementId===a);e&&await t[e.appId]}}catch(o){Qm.error(o)}e("config",a,n)}(e,t,i,r,a,s)}else if("consent"===a){const[t,i]=n;e("consent",t,i)}else if("get"===a){const[t,i,r]=n;e("get",t,i,r)}else if("set"===a){const[t]=n;e("set",t)}else e(a,...n)}catch(s){Qm.error(s)}}}const nf=new class{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};function sf(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function of(e,t=nf,i){const{appId:r,apiKey:a,measurementId:n}=e.options;if(!r)throw Zm.create("no-app-id");if(!a){if(n)return{measurementId:n,appId:r};throw Zm.create("no-api-key")}const s=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},o=new cf;return setTimeout(async()=>{o.abort()},6e4),lf({appId:r,apiKey:a,measurementId:n},s,o,t)}async function lf(e,{throttleEndTimeMillis:t,backoffCount:i},r,a=nf){var n;const{appId:s,measurementId:o}=e;try{await function(e,t){return new Promise((i,r)=>{const a=Math.max(t-Date.now(),0),n=setTimeout(i,a);e.addEventListener(()=>{clearTimeout(n),r(Zm.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}(r,t)}catch(l){if(o)return Qm.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${o} provided in the "measurementId" field in the local Firebase config. [${null==l?void 0:l.message}]`),{appId:s,measurementId:o};throw l}try{const t=await async function(e){var t;const{appId:i,apiKey:r}=e,a={method:"GET",headers:sf(r)},n="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",i),s=await fetch(n,a);if(200!==s.status&&304!==s.status){let e="";try{const i=await s.json();(null==(t=i.error)?void 0:t.message)&&(e=i.error.message)}catch(o){}throw Zm.create("config-fetch-failed",{httpStatus:s.status,responseMessage:e})}return s.json()}(e);return a.deleteThrottleMetadata(s),t}catch(l){const t=l;if(!function(e){if(!(e instanceof xh&&e.customData))return!1;const t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(t)){if(a.deleteThrottleMetadata(s),o)return Qm.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${o} provided in the "measurementId" field in the local Firebase config. [${null==t?void 0:t.message}]`),{appId:s,measurementId:o};throw l}const c=503===Number(null==(n=null==t?void 0:t.customData)?void 0:n.httpStatus)?Nh(i,a.intervalMillis,30):Nh(i,a.intervalMillis),d={throttleEndTimeMillis:Date.now()+c,backoffCount:i+1};return a.setThrottleMetadata(s,d),Qm.debug(`Calling attemptFetch again in ${c} millis`),lf(e,d,r,a)}}class cf{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function df(e,t,i,r,a,n,s){const o=of(e);o.then(t=>{i[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&Qm.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${t.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(e=>Qm.error(e)),t.push(o);const l=async function(){if(!_h())return Qm.warn(Zm.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await Rh()}catch(e){return Qm.warn(Zm.create("indexeddb-unavailable",{errorInfo:null==e?void 0:e.toString()}).message),!1}return!0}().then(e=>e?r.getId():void 0),[c,d]=await Promise.all([o,l]);(function(e){const t=window.document.getElementsByTagName("script");for(const i of Object.values(t))if(i.src&&i.src.includes(Xm)&&i.src.includes(e))return i;return null})(n)||rf(n,c.measurementId),a("js",new Date);const u=(null==s?void 0:s.config)??{};return u.origin="firebase",u.update=!0,null!=d&&(u.firebase_id=d),a("config",c.measurementId,u),c.measurementId}class uf{constructor(e){this.app=e}_delete(){return delete hf[this.app.options.appId],Promise.resolve()}}let hf={},pf=[];const mf={};let ff,gf,yf="dataLayer",vf=!1;function bf(){const e=[];if(function(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}()&&e.push("This is a browser extension environment."),"undefined"!=typeof navigator&&navigator.cookieEnabled||e.push("Cookies are not available."),e.length>0){const t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),i=Zm.create("invalid-analytics-context",{errorInfo:t});Qm.warn(i.message)}}function wf(e,t,i){bf();const r=e.options.appId;if(!r)throw Zm.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw Zm.create("no-api-key");Qm.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=hf[r])throw Zm.create("already-exists",{id:r});if(!vf){!function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(yf);const{wrappedGtag:e,gtagCore:t}=function(e,t,i,r,a){let n=function(...e){window[r].push(arguments)};return window[a]&&"function"==typeof window[a]&&(n=window[a]),window[a]=af(n,e,t,i),{gtagCore:n,wrappedGtag:window[a]}}(hf,pf,mf,yf,"gtag");gf=e,ff=t,vf=!0}hf[r]=df(e,pf,mf,t,ff,yf,i);return new uf(e)}function Sf(e=function(e=$p){const t=qp.get(e);if(!t&&e===$p&&Ih())return Qp();if(!t)throw Jp.create("no-app",{appName:e});return t}()){const t=Yp(e=Fh(e),Jm);return t.isInitialized()?t.getImmediate():function(e,t={}){const i=Yp(e,Jm);if(i.isInitialized()){const e=i.getImmediate();if(Mh(t,i.getOptions()))return e;throw Zm.create("already-initialized")}const r=i.initialize({options:t});return r}(e)}function kf(e,t,i){e=Fh(e),async function(e,t,i,r){if(r&&r.global){const t={};for(const e of Object.keys(i))t[`user_properties.${e}`]=i[e];return e("set",t),Promise.resolve()}e("config",await t,{update:!0,user_properties:i})}(gf,hf[e.app.options.appId],t,i).catch(e=>Qm.error(e))}function Tf(e,t,i,r){e=Fh(e),async function(e,t,i,r,a){if(a&&a.global)e("event",i,r);else{const a=await t;e("event",i,{...r,send_to:a})}}(gf,hf[e.app.options.appId],t,i,r).catch(e=>Qm.error(e))}const Ef="@firebase/analytics",Af="0.10.22";Kp(new Uh(Jm,(e,{options:t})=>wf(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),Kp(new Uh("analytics-internal",function(e){try{const t=e.getProvider(Jm).getImmediate();return{logEvent:(e,i,r)=>Tf(t,e,i,r),setUserProperties:(e,i)=>kf(t,e,i)}}catch(t){throw Zm.create("interop-component-reg-failed",{reason:t})}},"PRIVATE")),Zp(Ef,Af),Zp(Ef,Af,"esm2020");class Cf{constructor(e,i=!0){t(this,"name"),t(this,"enabled"),t(this,"initialized",!1),this.name=e,this.enabled=i}safeExecute(e,t){try{e()}catch(i){}}async safeExecuteAsync(e,t){try{await e()}catch(i){}}checkInitialized(){return!!this.initialized}}class If extends Cf{constructor(e,i=!0){super("Firebase",i),t(this,"config"),t(this,"app",null),t(this,"analytics",null),this.config=e}async initialize(){this.enabled&&await this.safeExecuteAsync(async()=>{try{this.app=Qp(this.config),this.analytics=Sf(this.app),this.initialized=!0}catch(e){throw this.initialized=!1,this.enabled=!1,e}},"Failed to initialize Firebase Analytics")}logEvent(e,t){this.enabled&&this.checkInitialized()&&this.analytics&&this.safeExecute(()=>{Tf(this.analytics,e,t)},`Failed to log event: ${e}`)}setUserId(e){this.enabled&&this.checkInitialized()&&this.analytics&&this.safeExecute(()=>{var t,i;t=this.analytics,i=e,t=Fh(t),async function(e,t,i){e("config",await t,{update:!0,user_id:i})}(gf,hf[t.app.options.appId],i).catch(e=>Qm.error(e))},"Failed to set user ID")}setUserProperties(e){this.enabled&&this.checkInitialized()&&this.analytics&&this.safeExecute(()=>{kf(this.analytics,e)},"Failed to set user properties")}}class Pf extends Cf{constructor(e,i=!0){super("Facebook Pixel",i),t(this,"config"),this.config=e}async initialize(){this.enabled&&await this.safeExecuteAsync(async()=>{if(!this.config.pixelId)throw new Error("Facebook Pixel ID is required");if(await this.loadFacebookPixelSDK(),!window.fbq)throw new Error("Facebook Pixel SDK failed to load");window.fbq("init",this.config.pixelId),window.fbq("track","PageView"),this.initialized=!0},"Failed to initialize Facebook Pixel")}loadFacebookPixelSDK(){return new Promise((e,t)=>{if(window.fbq)return void e();const i=function(...e){i.callMethod?i.callMethod.apply(i,e):i.queue.push(e)};i.queue=[],window.fbq||(window.fbq=i),window.fbq.push=i,window.fbq.loaded=!0,window.fbq.version="2.0",window.fbq.queue=[];const r=document.createElement("script");r.async=!0,r.src="https://connect.facebook.net/en_US/fbevents.js",r.onload=()=>{e()},r.onerror=()=>{t(new Error("Failed to load Facebook Pixel SDK"))};const a=document.getElementsByTagName("script")[0];a&&a.parentNode?a.parentNode.insertBefore(r,a):document.head.appendChild(r)})}logEvent(e,t){this.enabled&&this.checkInitialized()&&window.fbq&&this.safeExecute(()=>{["InitiatedCheckout","CompletedRegistration","Rated","AddedToWishlist","UnlockedAchievement","AddedPaymentInfo","Searched","AddedToCart","Purchased"].includes(e)?window.fbq("track",e,t):window.fbq("trackCustom",e,t)},`Failed to log event: ${e}`)}setUserId(e){this.enabled&&this.checkInitialized()&&window.fbq&&this.safeExecute(()=>{window.fbq("init",this.config.pixelId,{external_id:e})},"Failed to set user ID")}setUserProperties(e){this.enabled&&this.checkInitialized()&&this.safeExecute(()=>{},"Failed to set user properties")}}class _f extends Cf{constructor(e,i=!0){super("Adjust",i),t(this,"config"),t(this,"eventTokens",new Map),this.config=e}async initialize(){this.enabled&&await this.safeExecuteAsync(async()=>{if(!this.config.appToken)throw new Error("Adjust App Token is required");if(await this.loadAdjustSDK(),!window.Adjust)throw new Error("Adjust SDK failed to load");{const e={appToken:this.config.appToken,environment:"sandbox"===this.config.environment?"sandbox":"production",logLevel:"none"};this.config.externalDeviceId&&(e.externalDeviceId=this.config.externalDeviceId),window.Adjust.initSdk(e),this.initialized=!0}},"Failed to initialize Adjust")}loadAdjustSDK(){return new Promise((e,t)=>{if(window.Adjust)return void e();const i=document.createElement("script");i.async=!0,i.src="https://cdn.adjust.com/adjust-latest.min.js",i.onload=()=>{e()},i.onerror=()=>{t(new Error("Failed to load Adjust SDK"))};const r=document.getElementsByTagName("script")[0];r&&r.parentNode?r.parentNode.insertBefore(i,r):document.head.appendChild(i)})}setEventToken(e,t){this.eventTokens.set(e,t)}setEventTokens(e){Object.entries(e).forEach(([e,t])=>{this.eventTokens.set(e,t)})}logEvent(e,t){this.enabled&&this.checkInitialized()&&window.Adjust&&this.safeExecute(()=>{let i=this.eventTokens.get(e);i||(i=e);const r={eventToken:i};t&&(r.callbackParams=Object.entries(t).map(([e,t])=>({key:e,value:String(t)}))),window.Adjust.trackEvent(r)},`Failed to log event: ${e}`)}setUserId(e){this.enabled&&this.checkInitialized()&&window.Adjust&&this.safeExecute(()=>{window.Adjust.addGlobalCallbackParameters([{key:"user_id",value:e}])},"Failed to set user ID")}setUserProperties(e){this.enabled&&this.checkInitialized()&&window.Adjust&&this.safeExecute(()=>{const t=Object.entries(e).map(([e,t])=>({key:e,value:String(t)}));window.Adjust.addGlobalCallbackParameters(t)},"Failed to set user properties")}removeUserProperty(e){this.enabled&&this.checkInitialized()&&window.Adjust&&this.safeExecute(()=>{window.Adjust.removeGlobalCallbackParameter(e)},`Failed to remove user property: ${e}`)}}const Rf={registration:"xYzKwMR5",install:"qWeRtYuI",login:"R5T8V18n",recharge:"hIjKlMM4",custom:"k5m8n2B9"},xf={ic:{urlParam:"ic",storageKey:"hmserver_ic"},ac:{urlParam:"ac",storageKey:"hmserver_ac"},a:{urlParam:"a",storageKey:"hmserver_a"},fbp:{urlParam:"fbp",cookieName:"_fbp",storageKey:"hmserver_fbp"},fbc:{urlParam:"fbclid",cookieName:"_fbc",storageKey:"hmserver_fbc"},fbclid:{urlParam:"fbclid",storageKey:"hmserver_fbclid"},gclid:{urlParam:"gclid",storageKey:"hmserver_gclid"},ttclid:{urlParam:"ttclid",storageKey:"hmserver_ttclid"},twclid:{urlParam:"twclid",storageKey:"hmserver_twclid"},utm_source:{urlParam:"utm_source",storageKey:"hmserver_utm_source"},utm_medium:{urlParam:"utm_medium",storageKey:"hmserver_utm_medium"},utm_campaign:{urlParam:"utm_campaign",storageKey:"hmserver_utm_campaign"},utm_term:{urlParam:"utm_term",storageKey:"hmserver_utm_term"},utm_content:{urlParam:"utm_content",storageKey:"hmserver_utm_content"},ref:{urlParam:"ref",storageKey:"hmserver_ref"},src:{urlParam:"src",storageKey:"hmserver_src"},channel:{urlParam:"channel",storageKey:"hmserver_channel"},aff_id:{urlParam:"aff_id",storageKey:"hmserver_aff_id"},aff_sub:{urlParam:"aff_sub",storageKey:"hmserver_aff_sub"},click_id:{urlParam:"click_id",storageKey:"hmserver_click_id"}};class Lf extends Cf{constructor(e,i=!0){super("HMServer",i),t(this,"config"),t(this,"eventCodes"),t(this,"deviceId",""),t(this,"currentUserId",""),t(this,"eventQueue",[]),t(this,"batchTimer",null),t(this,"BATCH_SIZE",10),t(this,"BATCH_INTERVAL",5e3),t(this,"appVersion","1.0.0"),t(this,"sourceParams",{}),t(this,"useV2EventFormat"),t(this,"batchApiPath"),this.config=e,this.eventCodes={...Rf,...e.eventCodes},this.useV2EventFormat=e.useV2EventFormat??!0,this.batchApiPath=e.batchApiPath||"/batchCustominfo",this.getAppVersion(),this.initSourceParams(),this.initDeviceIdSync(),this.setupUnloadListener()}setupUnloadListener(){const e=()=>{this.eventQueue.length>0&&this.sendBeaconReport()};document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&e()}),window.addEventListener("pagehide",e)}getAppVersion(){const e=document.querySelector('meta[name="version"]');e&&(this.appVersion=e.getAttribute("content")||"1.0.0")}initSourceParams(){const e=new URLSearchParams(window.location.search);Object.entries(xf).forEach(([t,i])=>{const r=this.getParamValue(i,e);r&&(this.sourceParams[t]=r,localStorage.setItem(i.storageKey,r))})}getParamValue(e,t){const i=t.get(e.urlParam);if(i)return i;if(e.cookieName){const t=this.getCookie(e.cookieName);if(t)return t}return localStorage.getItem(e.storageKey)}getCookie(e){var t;const i=`; ${document.cookie}`.split(`; ${e}=`);return 2===i.length&&(null==(t=i.pop())?void 0:t.split(";").shift())||null}generateNonce(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}initDeviceIdSync(){try{const e="hmserver_device_id";if(localStorage.getItem(e)&&localStorage.removeItem(e),this.deviceId=vh(),!this.deviceId){const e=`web_${Date.now()}_${Math.random().toString(36).substring(2,11)}`;this.deviceId=e}}catch(e){const t=`web_${Date.now()}_${Math.random().toString(36).substring(2,11)}`;this.deviceId=t}}xorEncrypt(e,t){if(!e)return"";if(!t)throw new Error("key must not be null or empty");const i=e.split("").map(e=>e.charCodeAt(0)),r=t.split("").map(e=>e.charCodeAt(0)),a=[];for(let s=0;s<i.length;s++)a.push(i[s]^r[s%r.length]);const n=String.fromCharCode(...a);return fh.enc.Base64.stringify(fh.enc.Utf8.parse(n))}generateEncryptedPayload(e){const t=Date.now(),i=this.generateNonce(),r={appId:this.config.appId,eventInfos:e,di:this.getDeviceInfo(),sourceParams:Object.keys(this.sourceParams).length>0?this.sourceParams:void 0,thirdParams:{},appVersion:this.appVersion,language:navigator.language,platform:"Web",channel:"web",nonce:i,timestamp:t},a={d:JSON.stringify(r),i:this.config.appId,t:t},n=this.generateSignature(a);a.s=n;const s=JSON.stringify(a);return{base64:this.xorEncrypt(s,"xai-secret-key-2025")}}generateSignature(e){const t=Object.keys(e).filter(e=>"s"!==e).sort().map(t=>`${t}=${e[t]}`).join("&")+"&key="+this.config.appKey;return fh.HmacSHA256(t,this.config.appSecure).toString()}async batchReport(){if(0===this.eventQueue.length)return;const e=[...this.eventQueue];this.eventQueue=[];try{const t=this.generateEncryptedPayload(e),i={"Content-Type":"application/json; charset=UTF-8",AppId:this.config.appId,Timestamp:Math.floor(Date.now()/1e3).toString()},r=this.config.apiUrl.replace(/\/$/,"")+this.batchApiPath,a=await fetch(r,{method:"POST",headers:i,body:JSON.stringify(t),keepalive:!0});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);await a.json();e.map(e=>{var t;return(null==(t=e.ext)?void 0:t.eventName)||"unknown"}).join(", ")}catch(t){}}sendBeaconReport(){if(0===this.eventQueue.length)return;const e=[...this.eventQueue];this.eventQueue=[];try{const t=this.generateEncryptedPayload(e),i=new Blob([JSON.stringify(t)],{type:"application/json"}),r=this.config.apiUrl.replace(/\/$/,"")+this.batchApiPath,a=new URL(r);a.searchParams.set("AppId",this.config.appId),a.searchParams.set("Timestamp",Math.floor(Date.now()/1e3).toString());if(navigator.sendBeacon(a.toString(),i)){e.map(e=>{var t;return(null==(t=e.ext)?void 0:t.eventName)||"unknown"}).join(", ")}}catch(t){}}queueEvent(e){this.eventQueue.push(e),this.eventQueue.length>=this.BATCH_SIZE?this.flushQueue():this.startBatchTimer()}startBatchTimer(){this.batchTimer||(this.batchTimer=setTimeout(()=>{this.flushQueue()},this.BATCH_INTERVAL))}flushQueue(){return this.batchTimer&&(clearTimeout(this.batchTimer),this.batchTimer=null),this.batchReport()}async flush(){await this.flushQueue()}getCanvasFingerprint(){try{const e=document.createElement("canvas"),t=e.getContext("2d");if(!t)return"";e.width=200,e.height=50,t.textBaseline="top",t.font="14px Arial",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.fillText("Browser Fingerprint",2,15);const i=e.toDataURL();let r=0;for(let a=0;a<i.length;a++){r=(r<<5)-r+i.charCodeAt(a),r&=r}return Math.abs(r).toString(16).substring(0,16)}catch(e){return""}}getAudioContextFingerprint(){try{const e=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(!e)return"";const t=new e(1,44100,44100),i=t.createAnalyser();return`${t.sampleRate}-${i.frequencyBinCount}`}catch(e){return""}}ensureDeviceId(){const e=vh();e&&e!==this.deviceId&&(this.deviceId=e)}getDeviceInfo(){this.ensureDeviceId();const e=window.screen,t=navigator,i=t.userAgent;let r="Unknown",a="Unknown";if(-1!==i.indexOf("Win")){r="Windows";const e=i.match(/Windows NT ([\d.]+)/);a=e?`Windows ${e[1]}`:"Windows"}else if(-1!==i.indexOf("Mac")){r="macOS";const e=i.match(/Mac OS X ([\d_]+)/);a=e?`macOS ${e[1].replace(/_/g,".")}`:"macOS"}else if(-1!==i.indexOf("Linux"))r="Linux",a="Linux";else if(-1!==i.indexOf("Android")){r="Android";const e=i.match(/Android ([\d.]+)/);a=e?`Android ${e[1]}`:"Android"}else if(-1!==i.indexOf("iOS")||-1!==i.indexOf("iPhone")||-1!==i.indexOf("iPad")){r="iOS";const e=i.match(/OS ([\d_]+)/);a=e?`iOS ${e[1].replace(/_/g,".")}`:"iOS"}let n="Unknown";if(-1!==i.indexOf("iPhone"))n="iPhone";else if(-1!==i.indexOf("iPad"))n="iPad";else if(-1!==i.indexOf("Android")){const e=i.match(/\(([^)]+)\)/);n=e?e[1]:"Android Device"}else n="Web Browser";let s,o,l="",c="";try{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(t){const e=t.getExtension("WEBGL_debug_renderer_info");e&&(l=t.getParameter(e.UNMASKED_VENDOR_WEBGL),c=t.getParameter(e.UNMASKED_RENDERER_WEBGL))}}catch(u){}try{"storage"in navigator&&"estimate"in navigator.storage&&navigator.storage.estimate().then(e=>{e.quota&&(s=Math.floor(e.quota/1048576))})}catch(u){}try{const e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;e&&e.effectiveType&&(o=e.effectiveType.toUpperCase())}catch(u){}const d={deviceId:this.deviceId,screenResolution:`${e.width}x${e.height}`,colorDepth:e.colorDepth,devicePixelRatio:window.devicePixelRatio.toString(),machine:n,canvas:this.getCanvasFingerprint(),audioContext:this.getAudioContextFingerprint(),osName:r,osVersion:a,deviceModel:n,timeZone:`${Intl.DateTimeFormat().resolvedOptions().timeZone}, GMT${(new Date).getTimezoneOffset()/-60>=0?"+":""}${(new Date).getTimezoneOffset()/-60}`,language:`${t.language}, ${t.languages.join(", ")}`};return t.hardwareConcurrency&&(d.processorCount=t.hardwareConcurrency),t.deviceMemory&&(d.memorySize=Math.floor(1024*t.deviceMemory)),l&&(d.vendoor=l),c&&(d.renderer=c),o&&(d.networkType=o),s&&(d.storageSize=s),d}async initialize(){this.initialized||this.enabled&&await this.safeExecuteAsync(async()=>{if(!this.config.appId||!this.config.appKey||!this.config.appSecure)throw new Error("Missing required configuration: appId, appKey, or appSecure");const e=vh();e?(this.deviceId.startsWith("web_"),this.deviceId=e):this.deviceId||this.initDeviceIdSync(),this.initialized=!0},"Failed to initialize")}setUserId(e){this.currentUserId=e}getEventCode(e){return{register_success:this.eventCodes.registration,install:this.eventCodes.install,login_success:this.eventCodes.login,coin_order_success:this.eventCodes.recharge}[e]||this.eventCodes.custom}getRechargeUserId(e){if((null==e?void 0:e.userId)||this.currentUserId)return(null==e?void 0:e.userId)||this.currentUserId;try{const e=localStorage.getItem("pendingOrder");if(e){const t=JSON.parse(e),i=Object.keys(t);if(i.length>0)return this.currentUserId=i[0],i[0]}}catch(t){}}buildEventInfo(e,t){var i;const r={eventCode:this.getEventCode(e),eventAt:Math.floor(Date.now()/1e3),deviceId:this.deviceId};switch(this.currentUserId&&(r.userId=this.currentUserId),e){case"coin_order_success":r.userId=this.getRechargeUserId(t),r.amount=String((null==t?void 0:t.amount)||(null==t?void 0:t.value)||"0"),r.currencyUnit=(null==t?void 0:t.currency)||(null==t?void 0:t.currencyUnit)||"USD",r.orderId=(null==t?void 0:t.orderId)||(null==t?void 0:t.transaction_id);break;case"install":r.clickId=(null==t?void 0:t.clickId)||""}return r.ext={eventName:e,...t},null==(i=r.ext)||delete i.thirdParams,r}logEvent(e,t){this.checkInitialized()&&this.safeExecute(()=>{const i=this.buildEventInfo(e,t);this.queueEvent(i)},`Failed to log event: ${e}`)}destroy(){this.flushQueue()}}const Df=new class{constructor(){t(this,"providers",new Map),t(this,"eventMappings",{}),t(this,"initialized",!1),t(this,"pendingEvents",[]),t(this,"pendingUserId"),t(this,"pendingUserProperties",{})}async initialize(e){var t,i,r,a;if(this.initialized)return;const n=e.analytics;if(!n)return;this.eventMappings=n.events||{};const s=[];if(null==(t=n.platforms.firebase)?void 0:t.enabled){const e=new If(n.platforms.firebase.config,!0);this.providers.set("firebase",e),s.push(e.initialize())}if(null==(i=n.platforms.facebook)?void 0:i.enabled){const e=new Pf(n.platforms.facebook.config,!0);this.providers.set("facebook",e),s.push(e.initialize())}if(null==(r=n.platforms.adjust)?void 0:r.enabled){const e=new _f(n.platforms.adjust.config,!0);if(n.events){const t={};Object.entries(n.events).forEach(([,e])=>{e.adjust&&(t[e.adjust]=e.adjust)}),e.setEventTokens(t)}this.providers.set("adjust",e),s.push(e.initialize())}if(null==(a=n.platforms.hmserver)?void 0:a.enabled){const e=new Lf(n.platforms.hmserver.config,!0);this.providers.set("hmserver",e),s.push(e.initialize())}try{await Promise.all(s),this.initialized=!0}catch(o){this.initialized=!0}void 0!==this.pendingUserId&&this.setUserId(this.pendingUserId),Object.keys(this.pendingUserProperties).length&&this.setUserProperties(this.pendingUserProperties);this.pendingEvents.splice(0).forEach(e=>this.logEvent(e.key,e.params))}logEvent(e,t){if(!this.initialized)return 100===this.pendingEvents.length&&this.pendingEvents.shift(),void this.pendingEvents.push({key:e,params:t});const i=this.eventMappings[e];i&&this.providers.forEach((e,r)=>{const a=i[r];a&&e.logEvent(a,t)})}setUserId(e){this.pendingUserId=e,this.initialized&&this.providers.forEach(t=>{t.setUserId&&t.setUserId(e)})}setUserProperties(e){Object.assign(this.pendingUserProperties,e),this.initialized&&this.providers.forEach(t=>{t.setUserProperties&&t.setUserProperties(e)})}getActiveProviders(){return Array.from(this.providers.keys())}isInitialized(){return this.initialized}async flush(){if(!this.initialized)return;const e=[];this.providers.forEach(t=>{"function"==typeof t.flush&&e.push(t.flush())}),await Promise.all(e)}disableProviders(e=["firebase","facebook","adjust"]){e.forEach(e=>{this.providers.get(e)&&this.providers.delete(e)})}isProviderEnabled(e){return this.providers.has(e)}},Mf=async e=>{try{await yh.loadSDK()}catch(i){}const t=ac(ic);try{await Df.initialize(e),"denied"===t&&Df.disableProviders(["firebase","facebook","adjust"])}catch(i){}Of();try{Nf()}catch(i){}},Of=()=>{window.addEventListener("cookie-consent",e=>{const{accepted:t}=e.detail;t||Df.disableProviders(["firebase","facebook","adjust"])})},Nf=()=>{const e=new URLSearchParams(window.location.search).get("ic");e&&!localStorage.getItem("analytics_install_reported")&&setTimeout(()=>{Ff("install",{clickId:e}),localStorage.setItem("analytics_install_reported","1")},200)},Ff=(e,t)=>{Df.logEvent(e,t)},Uf=e=>{Df.setUserId(e)},Bf=async()=>{await Df.flush()},zf=Object.freeze(Object.defineProperty({__proto__:null,flushAnalytics:Bf,getActiveProviders:()=>Df.getActiveProviders(),initAnalytics:Mf,isAnalyticsInitialized:()=>Df.isInitialized(),logEvent:Ff,setUserId:Uf,setUserProperties:e=>{Df.setUserProperties(e)}},Symbol.toStringTag,{value:"Module"})),jf=["/auth/login","/auth/refreshToken","/auth/email/sendCode","/auth/email-link","/auth/temp-guest","/version/query","/config/init","/user/v2/chat/page","/user/v2/detail","/chat/sessionList","/goods/v2/list","/pk/preview","/pk/room/watch","/pk/gallery/catalog","/chatrooms/list","/chatrooms/detail"],$f=e=>!!e&&(jf.some(t=>e.includes(t))||/\/intimacy\/\d+\/(info|random-videos)(?=$|\/|\?)/.test(e)),Gf=e=>!!e&&e.includes("/auth/refreshToken"),qf=e=>$f(e)&&!ac(Hl),Hf=e=>{e&&(e.headers&&delete e.headers.isEncrypt,Object.prototype.hasOwnProperty.call(e,"_rawData")&&(e.data=e._rawData))},Vf=e=>(e=>String(e||"").trim().toLowerCase().includes("already subscribed"))(e)?String(wc.global.t("rechargeCenter.premium.errors.alreadySubscribed")):String(e||"Error"),Wf=we.create({baseURL:"/api",timeout:5e4,headers:{"Content-Type":"application/json;charset=utf-8",Sign:"no_sign"}});let Kf=null;async function Yf(e=!1){await sg().resetToken(e),setTimeout(()=>{pd().showLoginDialog=!0},0)}async function Jf(e=!1){return Kf||(Kf=(async()=>{try{const e=await tg.refreshToken({refreshToken:ac(Vl)});if(!e||!e.token)throw new Error("refreshToken response missing token");rc(Hl,e.token),e.refreshToken&&rc(Vl,e.refreshToken),Ff("login"),Ff("login_success"),Ff("refresh_token_login")}catch(e){throw(null==e?void 0:e.code)===fd.REFRESH_TOKEN_EXPIRED&&await Yf(!1),e}finally{Kf=null}})(),Kf)}Wf.interceptors.request.use(async e=>{var t,i,r,a;!Kf||Gf(e.url)||$f(e.url)||await Kf.catch(()=>{});const n=ac(Hl);n&&!Gf(e.url)&&(e.headers.token=n),e.hiddenToast&&(e.hiddenToast=!0);const s=sd(),o=ac("language")||"en",l=null==(t=s.appConfig)?void 0:t.appBrand,c=null==(i=s.appConfig)?void 0:i.uaChannel;e.headers.ua=Id(wd(o,l,c)),e.headers.language=o,e.headers.timestamp=(new Date).toISOString();const d=vh();d&&(e.headers.fp=d);const u=yd();e.headers["X-Device-Category"]=u.category,e.headers["X-Device-Model"]=u.model;const h=null==(r=s.appConfig)?void 0:r.encryption;if(h){if(h.isEncrypt){const t=$f(e.url)?h.secretKey:n||h.secretKey;if(!t||t.length<16);else if(e.headers.isEncrypt="true",e.data&&["post","put","patch"].includes(null==(a=e.method)?void 0:a.toLowerCase())){const i=Object.prototype.hasOwnProperty.call(e,"_rawData")?e._rawData:e.data;e._rawData=i;try{const r=function(e,t){try{const i=fh.enc.Utf8.parse(t);return fh.AES.encrypt(e,i,{mode:fh.mode.ECB,padding:fh.pad.Pkcs7}).toString()}catch(i){throw new Error("data error")}}(JSON.stringify(i),t);e.data=JSON.stringify(r),e.headers["Content-Type"]="application/json;charset=utf-8"}catch(p){e.data=i,delete e.headers.isEncrypt}}}}else;return e},e=>Promise.reject(e));let Xf=!1,Qf=[];Wf.interceptors.response.use(e=>{var t;const i=e.config;if("blob"===i.responseType||"arraybuffer"===i.responseType)return e;if("true"===i.headers.isEncrypt&&e.data)try{const r=ac(Hl),a=null==(t=sd().appConfig)?void 0:t.encryption,n=$f(i.url)?null==a?void 0:a.secretKey:r||(null==a?void 0:a.secretKey),s=n,o=n===r?null==a?void 0:a.secretKey:r;if("string"==typeof e.data){const t=e.data;try{const i=gh(t,s);e.data=JSON.parse(i)}catch(l){if(o&&o!==s&&o.length>=16)try{const i=gh(t,o);e.data=JSON.parse(i)}catch(c){}}}else if(e.data.result&&"string"==typeof e.data.result){const t=e.data.result;try{const i=gh(t,s);e.data.result=JSON.parse(i)}catch(l){if(o&&o!==s&&o.length>=16)try{const i=gh(t,o);e.data.result=JSON.parse(i)}catch(c){}}}}catch(d){}const{code:r,result:a,msg:n,data:s}=e.data,o="result"in e.data?a:s;if(String(n||"").toLowerCase().includes("need to purchase for vip")&&ud(sd().appConfig))return pd().openVipGuideDialog(),Promise.reject({code:fd.NOT_VIP,message:String(n||"Need to purchase for VIP")});switch(r){case fd.SUCCESS:return dd(o);case fd.REFRESH_TOKEN_EXPIRED:if(Gf(i.url))return Promise.reject({code:fd.REFRESH_TOKEN_EXPIRED,message:"RefreshToken expired"});if(qf(i.url))return Promise.resolve(null);return"true"===ac(ec)?(nc(Hl),nc(Vl),nc(tc),nc(ec),setTimeout(()=>{pd().showLoginDialog=!0},0),Promise.reject({code:887,message:"Temp guest login expired"})):i._retryCount&&i._retryCount>0?Promise.resolve(null):(Yf(!0),Promise.reject({code:887,message:"RefreshToken expired"}));case fd.ACCESS_DENIED:return sd().isIpAccess=!0,o;case fd.NOT_VIP:return ud(sd().appConfig)&&pd().openVipGuideDialog(),Promise.reject({code:fd.NOT_VIP,message:String(n||"Need to purchase for VIP")});case fd.COIN_INSUFFICIENT:return pd().showVipDialog=!0,Promise.reject();case fd.TOKEN_EXPIRED:return Gf(i.url)?Promise.reject({code:fd.TOKEN_EXPIRED,message:"Refresh request itself returned 888"}):qf(i.url)||i._retryCount&&i._retryCount>0?Promise.resolve(null):(i._retryCount=(i._retryCount||0)+1,Xf?new Promise(e=>{Qf.push({config:i,resolve:e})}):(Xf=!0,Jf(i.silentAuth).then(()=>(Qf.forEach(e=>{const{config:t,resolve:i}=e;Hf(t),i(Wf(t))}),Qf=[],Hf(i),Wf(i))).catch(e=>{const t=(null==e?void 0:e.code)===fd.REFRESH_TOKEN_EXPIRED?{code:887,message:"RefreshToken expired"}:{code:888,message:"Token refresh failed"};return Qf.forEach(e=>{e.resolve(Promise.reject(t))}),Qf=[],Promise.reject(t)}).finally(()=>{Xf=!1})));default:if(n&&n.toLowerCase().includes("param"))return Promise.reject(new Error(n));const e=Vf(n);return i.hiddenToast||Nl.error(e),Promise.reject(new Error(e))}},async e=>Promise.reject(e));const Zf=Object.freeze(Object.defineProperty({__proto__:null,default:Wf,handleRefreshTokenExpired:Yf,refreshToken:Jf},Symbol.toStringTag,{value:"Module"})),eg="/auth";class tg{static sendEmailCode(e){return Wf({url:`${eg}/email/sendCode`,method:"post",data:e})}static userDestroyed(e){return Wf({url:`${eg}/destroyed`,method:"post",data:e})}static userLogin(e){return Wf({url:`${eg}/login`,method:"post",data:e})}static refreshToken(e){return Wf({url:`${eg}/refreshToken`,method:"post",data:e,hiddenToast:!0})}static oauthLogin(e){return`http://localhost:3000/api${eg}/oauth/${e}`}static createTempGuest(e){return Wf({url:`${eg}/temp-guest`,method:"post",data:e||{}})}static upgradeAccount(e){return Wf({url:`${eg}/upgrade`,method:"post",data:e})}static bindAccount(e){return Wf({url:`${eg}/bindAccount`,method:"post",data:e})}static logout(){return Wf({url:`${eg}/logout`,method:"post"})}static getLinkedGuest(){return Wf({url:`${eg}/linkedGuest`,method:"get"})}static verifyEmailLink(e){return Wf({url:`${eg}/email-link`,method:"post",data:{code:e}})}}const ig="/user";class rg{static getUserInfo(){return Wf({url:`${ig}/info`,method:"post"})}static reportBot(e){return Wf({url:`${ig}/reportBot`,method:"post",data:e})}static updateUserInfo(e){return Wf({url:`${ig}/update`,method:"post",data:e})}static userCollected(e){return Wf({url:`${ig}/v2/collected`,method:"post",data:e})}static userLiked(e){return Wf({url:`${ig}/v2/liked`,method:"post",data:e})}static unlockPhoto(e,t,i){const r={photoId:e,botId:t};return void 0!==i&&(r.isVip=i),Wf({url:`${ig}/unlockPhoto`,method:"post",data:r})}static unlockVideo(e,t){return Wf({url:`${ig}/v2/unlockVideo`,method:"post",data:{videoId:e,botId:t}})}static upgradePhotoToVideo(e,t){return Wf({url:`${ig}/v2/upgradePhotoToVideo`,method:"post",data:{photoId:e,botId:t}})}}class ag{static configInit(){return Wf({url:"/config/init",method:"post"})}}const ng=le("user",()=>{const e=u({}),t=u(!1),i=u({}),r=u(!1);function a(e){if(null==e||""===e)return 0;const t=Number(e);if(!Number.isFinite(t)||t<=0)return 0;const i=t-Math.floor(Date.now()/1e3);return i>0?Math.ceil(i/86400):0}const n=P(()=>{var t;return"temp_guest"===(null==(t=e.value)?void 0:t.loginChannel)}),s={guest:"guest",oagp:"gp",oafb:"fb",oaline:"line"};function o(e){if(!(null==e?void 0:e.userUniqId))return;const t={version:1,cachedAt:Date.now(),userUniqId:e.userUniqId,data:e};rc(Wl,t)}function l(){nc(Wl)}function c(e){const t=String((null==e?void 0:e.message)||"");return function(e){var t,i;const r=(null==e?void 0:e.code)??(null==(i=null==(t=null==e?void 0:e.response)?void 0:t.data)?void 0:i.code);return Number(r)}(e)===fd.REFRESH_TOKEN_EXPIRED||"Token refresh failed"===t}function d(){var t;const i=ac(Wl);return i&&"string"!=typeof i&&1===i.version&&(null==(t=i.data)?void 0:t.userUniqId)?Date.now()-Number(i.cachedAt||0)>864e5?(l(),!1):(e.value=i.data,!0):(l(),!1)}function h(t){var i;e.value={...e.value||{},...t},(null==(i=e.value)?void 0:i.userUniqId)&&o(e.value)}const p=()=>new Promise(async(e,t)=>{try{Ff("get_main_cfg");const t=await ag.configInit();i.value=t,r.value=!0,Ff("get_main_cfg_success");const a=null==t?void 0:t.ipLanguage;if(a){sd().autoSwitchLanguageByIp(a)}e()}catch(a){i.value={},r.value=!1,Ff("get_main_cfg_fail"),t(a)}});function m(){return new Promise(async(i,r)=>{try{const n=await rg.getUserInfo();if(!n||!n.userUniqId)return e.value={},t.value=!1,l(),void r(new Error("Invalid user data"));const c=(s=n)?{...s,vipRemainDays:a(s.subscribeExpireAt)}:s;if(e.value=c,t.value=!0,o(c),null==c?void 0:c.userLang){sd().applyUserLanguage(c.userLang)}!1===(null==c?void 0:c.isProfileCompleted)&&!0!==(null==c?void 0:c.isTempGuest)&&setTimeout(async()=>{const{useDialogStoreHook:e}=await oc(async()=>{const{useDialogStoreHook:e}=await Promise.resolve().then(()=>md);return{useDialogStoreHook:e}},void 0);e().showProfileCompleteDialog=!0,Ff("profile_complete_popup_show")},500);const{useChatStore:d}=await oc(async()=>{const{useChatStore:e}=await Promise.resolve().then(()=>Cg);return{useChatStore:e}},void 0);d().loadCurrentUserUnreadList(),i()}catch(u){c(u)?(e.value={},t.value=!1,l()):(null==(n=e.value)?void 0:n.userUniqId)?t.value=!0:t.value=d(),r(u)}var n,s})}async function f(e){try{const t=await tg.bindAccount(e),{token:i,refreshToken:r}=t;rc(Hl,i),rc(Vl,r),nc(ec),nc(tc),await m();const a=s[e.loginChannel]||e.loginChannel||"unknown";return Ff("guest_bind_account_success"),Ff(`${a}_guest_bind`),t}catch(t){throw t}}async function g(){rc(Hl,""),rc(Vl,""),l();try{nc(Zl)}catch(a){}try{nc(ec),nc(tc)}catch(a){}try{const e="intimacy-scene-selection:";for(let t=localStorage.length-1;t>=0;t--){const i=localStorage.key(t);i&&i.startsWith(e)&&nc(i)}}catch(a){}e.value={},t.value=!1,i.value={},r.value=!1;try{const{useOrderStoreHook:e}=await oc(async()=>{const{useOrderStoreHook:e}=await Promise.resolve().then(()=>Mg);return{useOrderStoreHook:e}},void 0),t=e();t.clearCurrentUserOrder(),t.stopPolling()}catch(n){}}return{userInfo:e,isHasUserInfo:t,isHasConfig:r,userConfig:i,isTempGuest:n,getConfigDownloadOptions:e=>{var t;const r=(null==(t=i.value)?void 0:t.downLoadAddress)||{},{android_apk:a,apple_store:n,google_play:s,web_app:o}=r,l=window.__APP_CONFIG__,c=(null==l?void 0:l.downloadIcons)||{};return[{platform:"google-play",name:e("download.googlePlay.name"),description:e("download.googlePlay.description"),subtitle:e("download.googlePlay.subtitle"),icon:c.googlePlay,url:s,open:!!s,deviceType:"android",classes:"bg-white text-gray-800",textColor:"text-white"},{platform:"app-store",name:e("download.appStore.name"),description:e("download.appStore.description"),subtitle:e("download.appStore.subtitle"),icon:c.appStore,url:n,open:!!n,deviceType:"ios",classes:"bg-[rgba(255,255,255,0.1)] text-white border border-[rgba(255,255,255,0.1)]",textColor:"text-white"},{platform:"android-apk",name:e("download.androidApk.name"),description:e("download.androidApk.description"),subtitle:e("download.androidApk.subtitle"),icon:c.androidApk,url:a,open:!!a,deviceType:"android",classes:"bg-[rgba(255,255,255,0.1)] text-white border border-[rgba(255,255,255,0.1)]",textColor:"text-white"},{platform:"web-app",name:e("download.webApp.name"),description:e("download.webApp.description"),subtitle:e("download.webApp.subtitle"),icon:c.webApp,url:o,open:!0,classes:"bg-[rgba(255,255,255,0.1)] text-white border border-[rgba(255,255,255,0.1)]",textColor:"text-white"}]},getConfigSidebarFooterOptions:e=>{var t,r,a,n,s,o,l,c;const d=[];return(null==(r=null==(t=i.value)?void 0:t.interfaceConfig)?void 0:r.AffiliateUrl)&&d.push({name:e("sidebar.footer.affiliate"),icon:"trophy-line",path:null==(n=null==(a=i.value)?void 0:a.interfaceConfig)?void 0:n.AffiliateUrl}),(null==(o=null==(s=i.value)?void 0:s.supportConfigVo)?void 0:o.freshchat_script_url)&&d.push({name:e("sidebar.footer.support"),icon:"customer-service-line",path:null==(c=null==(l=i.value)?void 0:l.supportConfigVo)?void 0:c.freshchat_script_url}),d},getConfigContactUsOptions:e=>{var t,r,a,n,s,o,l,c,d,u,h,p,m,f,g,y,v,b,w,S,k,T,E,A,C,I,P,_,R,x,L,D,M,O,N,F,U,B,z,j,$,G,q,H,V,W,K,Y,J,X,Q,Z,ee,te;const ie=window.__APP_CONFIG__,re=(null==ie?void 0:ie.contactUsIcons)||{},ae=[];return(null==(r=null==(t=i.value)?void 0:t.contactUsVo)?void 0:r.service_email)&&ae.push({name:e("contactUs.email"),subtitle:null==(n=null==(a=i.value)?void 0:a.contactUsVo)?void 0:n.service_email,icon:re.email,url:`mailto:${null==(o=null==(s=i.value)?void 0:s.contactUsVo)?void 0:o.service_email}`}),(null==(c=null==(l=i.value)?void 0:l.contactUsVo)?void 0:c.youtube_code)&&(null==(u=null==(d=i.value)?void 0:d.contactUsVo)?void 0:u.youtube_url)&&ae.push({name:e("contactUs.youtube"),subtitle:null==(p=null==(h=i.value)?void 0:h.contactUsVo)?void 0:p.youtube_code,icon:re.youtube,url:null==(f=null==(m=i.value)?void 0:m.contactUsVo)?void 0:f.youtube_url}),(null==(y=null==(g=i.value)?void 0:g.contactUsVo)?void 0:y.facebook)&&(null==(b=null==(v=i.value)?void 0:v.contactUsVo)?void 0:b.facebook_url)&&ae.push({name:e("contactUs.facebook"),subtitle:null==(S=null==(w=i.value)?void 0:w.contactUsVo)?void 0:S.facebook,icon:re.facebook,url:null==(T=null==(k=i.value)?void 0:k.contactUsVo)?void 0:T.facebook_url}),(null==(A=null==(E=i.value)?void 0:E.contactUsVo)?void 0:A.whatapp_help)&&(null==(I=null==(C=i.value)?void 0:C.contactUsVo)?void 0:I.whatapp_url)&&ae.push({name:e("contactUs.whatsapp"),subtitle:null==(_=null==(P=i.value)?void 0:P.contactUsVo)?void 0:_.whatapp_help,icon:re.whatsapp,url:null==(x=null==(R=i.value)?void 0:R.contactUsVo)?void 0:x.whatapp_url}),(null==(D=null==(L=i.value)?void 0:L.contactUsVo)?void 0:D.telegram)&&(null==(O=null==(M=i.value)?void 0:M.contactUsVo)?void 0:O.telegram_url)&&ae.push({name:e("contactUs.telegram"),subtitle:null==(F=null==(N=i.value)?void 0:N.contactUsVo)?void 0:F.telegram,icon:re.telegram,url:null==(B=null==(U=i.value)?void 0:U.contactUsVo)?void 0:B.telegram_url}),(null==(j=null==(z=i.value)?void 0:z.contactUsVo)?void 0:j.instagram)&&(null==(G=null==($=i.value)?void 0:$.contactUsVo)?void 0:G.instagram_url)&&ae.push({name:e("contactUs.instagram"),subtitle:null==(H=null==(q=i.value)?void 0:q.contactUsVo)?void 0:H.instagram,icon:re.instagram,url:null==(W=null==(V=i.value)?void 0:V.contactUsVo)?void 0:W.instagram_url}),(null==(Y=null==(K=i.value)?void 0:K.contactUsVo)?void 0:Y.discord)&&(null==(X=null==(J=i.value)?void 0:J.contactUsVo)?void 0:X.discord_url)&&ae.push({name:e("contactUs.discord"),subtitle:null==(Z=null==(Q=i.value)?void 0:Q.contactUsVo)?void 0:Z.discord,icon:re.discord,url:null==(te=null==(ee=i.value)?void 0:ee.contactUsVo)?void 0:te.discord_url}),ae},getSupportEmailMailto:()=>{var e,t,r;const a=null==(r=null==(t=null==(e=i.value)?void 0:e.contactUsVo)?void 0:t.service_email)?void 0:r.trim();return a?`mailto:${a}`:""},login:function(t){return new Promise(async(i,a)=>{var n,o;const{userName:l,loginChannel:c,deviceToken:d,userEmail:u,valCode:h,valAppId:f,valState:g}=t;try{const t=await tg.userLogin({userName:l,loginChannel:c,deviceToken:d,userEmail:u,valCode:h,valAppId:f,valState:g}),{token:a,refreshToken:y,isRegister:v,isProfileCompleted:b,isTempGuest:w}=t;rc(Hl,a),rc(Vl,y);const S=s[c]||c||"guest";v||(Ff("login"),Ff(`${S}_login`)),await m(),r.value||await p();const k=(null==(n=e.value)?void 0:n.userId)||(null==(o=e.value)?void 0:o.userUniqId);if(k&&Uf(String(k)),v){Ff("register_success"),Ff(`${S}_register_success`);const e=Wc();e&&function(e){if(Jc()&&e)try{const t=Kc();window.gtag("event","conversion",{send_to:`${t.accountId}/${t.conversionLabels.signUp}`,gclid:e})}catch(t){}}(e)}else Ff("login_success"),Ff(`${S}_login_success`);!1===b&&!0!==w&&setTimeout(async()=>{const{useDialogStoreHook:e}=await oc(async()=>{const{useDialogStoreHook:e}=await Promise.resolve().then(()=>md);return{useDialogStoreHook:e}},void 0);e().showProfileCompleteDialog=!0,Ff("profile_complete_popup_show")},500),i()}catch(y){const e=s[c]||c||"guest";Ff("login_fail"),Ff(`${e}_login_fail`),a(y)}})},updateDiamondCount:function(e){h({diamondCount:e})},hydrateUserInfoFromCache:d,patchUserInfo:h,getUserInfo:m,logout:function(){return new Promise(async(e,t)=>{try{await tg.logout();await g(),window.location.href="/",e()}catch(i){await g(),window.location.href="/",e()}})},resetToken:function(e=!0){return(async()=>{try{await g(),e&&id.replace({path:"/"})}catch(t){}})()},getUserConfig:()=>r.value?i.value:p(),getUserConfigData:p,redirectToLoginAfterRedirect:function(){Bf().catch(()=>{});const e=ac(Xl);e?(nc(Xl),window.location.href=e):window.location.reload()},createTempGuest:async function(e){try{const t=await tg.createTempGuest({deviceToken:e}),{token:i,refreshToken:r}=t;return rc(Hl,i),rc(Vl,r),rc(ec,"true"),rc(tc,i),await m(),Ff("temp_guest_create"),t}catch(t){throw t}},bindAccount:f,upgradeTempGuest:async function(e){return f(e)},clearTempGuestFlag:function(){nc(ec),nc(tc)}}});function sg(){return ng(Og)}const og=le("route",()=>{const e=u(null);return{currentRoute:e,setRoute:function(t){e.value=t}}}),lg="/chat";class cg{static chat(e){return Wf({url:`${lg}/aggregate`,method:"post",data:e,hiddenToast:!0})}static chatMessageList(e,t){return Wf({url:`${lg}/messageList/${e}`,method:"get",params:t})}static chatReset(e){return Wf({url:`${lg}/resetChat`,method:"post",data:e})}static chatRemoveHistory(e){return Wf({url:`${lg}/removeHistory`,method:"post",data:e})}static chatRemoveOneHistory(e){return Wf({url:`${lg}/removeOneHistory`,method:"post",data:e})}static chatHide(e){return Wf({url:`${lg}/hide`,method:"post",data:e})}static chatSessionList(e){return Wf({url:`${lg}/sessionList`,method:"post",data:e})}static chatSessionRemove(e){return Wf({url:`${lg}/sessionRemove`,method:"post",data:e})}static chatSuggest(e){return Wf({url:`${lg}/suggest`,method:"post",data:e,hiddenToast:!0})}}const dg=Object.freeze(Object.defineProperty({__proto__:null,default:cg},Symbol.toStringTag,{value:"Module"}));!function(e){function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e),r={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,t){return"W"===t?e+"周":e+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,t){var i=100*e+t;return i<600?"凌晨":i<900?"早上":i<1100?"上午":i<1300?"中午":i<1800?"下午":"晚上"}};i.default.locale(r,null,!0)}(Se);"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),"January_February_March_April_May_June_July_August_September_October_November_December".split("_");const ug=(e,t)=>{let i="YYYY-MM-DD";if(t===Ul.ZH)i="YYYY年M月D日";else i="MMM D, YYYY";return ke(e).locale(t).format(i)},hg=()=>Math.floor(Date.now()/1e3),pg=e=>ke(e).isSame(ke(),"day"),mg=e=>ke(e).isSame(ke().subtract(1,"day"),"day"),fg=(e,t)=>{const i=ke(1e3*e);return pg(i)?i.locale(t).format("HH:mm"):ug(i,t)},gg=(e,t)=>{const i=ke(1e3*e);return ug(i,t)},yg=e=>e>=1e6?`${(e/1e6).toFixed(1)}m`:e>=1e3?`${(e/1e3).toFixed(1)}k`:`${e}`,vg=e=>/^[\u4e00-\u9fa5]+$/.test(e),bg=()=>/iPhone|iPad|iPod/i.test(navigator.userAgent),wg=()=>/Android/i.test(navigator.userAgent)?"android":bg()?"ios":"pc",Sg=()=>`${window.location.protocol}//${window.location.hostname}:${window.location.port}`,kg=e=>{const{host:t,path:i}=e;return t&&i?`${t}/${i}`:""};var Tg=(e=>(e.AVATAR="avatar",e.ALBUM="album",e.COVER="cover",e))(Tg||{});const Eg=(e,t="avatar",i,r=!1)=>{var a,n,s;if(!e)return"";if(!e.startsWith("http://")&&!e.startsWith("https://"))return e;if(r)return e;const o=`x-process=fit_in,w_${{avatar:(null==(a=window.__APP_CONFIG__)?void 0:a.avatarImageWidth)||80,cover:(null==(n=window.__APP_CONFIG__)?void 0:n.coverImageWidth)||300,album:(null==(s=window.__APP_CONFIG__)?void 0:s.albumImageWidth)||480}[t]||300}`,l=e.includes("?")?"&":"?";return`${e}${l}${o}`},Ag=le("chat",()=>{const e=u({}),t=u([]),i=u(12),r=u([]),a=u({});let n=null;function s(){var e;return(null==(e=sg().userInfo)?void 0:e.userUniqId)||""}function l(){const e=ac(Yl);return Array.isArray(e)?{}:e||{}}function c(){const e=s();if(!e)return;const t=l();t[e]=r.value,rc(Yl,t)}function d(){const e=s();if(!e)return;const i=ac(Jl)||{};i[e]=t.value,rc(Jl,i)}function h(e){const t=r.value.find(t=>t.userId==e);return t?t.unreadCount:0}function p(e){const t=r.value.find(t=>t.userId===e);t?t.unreadCount+=1:r.value.push({userId:e,unreadCount:1}),c()}function m(e){const t=r.value.findIndex(t=>t.userId===e);t>-1&&(r.value.splice(t,1),c())}function f(){return new Promise(async(e,r)=>{try{const r={page:1,size:i.value},{list:a}=await cg.chatSessionList(r);t.value=(null==a?void 0:a.map(e=>{const t=h(e.userId);return{userAvatar:e.userAvatar||e.headerUrl,nickName:e.nickName||e.personName,userId:Number(e.userId),lastUpdateAt:e.lastUpdateAt,chatStatus:e.chatStatus,unreadCount:t,isLive:e.isLive}}))||[],t.value.length>0&&d(),e()}catch(a){t.value=[],r(a)}})}function g(e){const r=t.value.findIndex(t=>t.userId==e.userId);if(-1===r)t.value=[{...e,lastUpdateAt:hg()},...t.value].slice(0,i.value);else{const i={...t.value[r],...e,lastUpdateAt:hg()},a=t.value.filter(t=>t.userId!=e.userId);t.value=[i,...a]}d()}async function y(){try{if(sd().isIpAccess)return;if(!sg().isHasUserInfo)return;try{const t={chatType:7};e.value&&e.value.userId&&(t.userId=e.value.userId),Ff("greet_init");const i=await cg.chat(t);i.personInfo&&i.personInfo.userId&&(g(i.personInfo),p(i.personInfo.userId),Ff("greet_success"))}catch(t){Ff("greet_fail")}}catch(t){}}function v(){n&&(clearTimeout(n),n=null)}return o(()=>r.value,()=>{t.value=t.value.map(e=>({...e,unreadCount:h(e.userId)}))},{deep:!0}),{chats:t,getChats:f,delChat:function(e){return new Promise(async(i,r)=>{try{const r=cg.chatRemoveHistory;await r({userId:e});const a=function(e){return t.value.find(t=>t.userId==e)}(e);a&&await f(),m(e),i()}catch(a){r(a)}})},editChat:g,currentChat:e,setCurrentChat:t=>{e.value=t},unreadList:r,getUnreadCount:h,getTotalUnreadCount:function(){return r.value.reduce((e,t)=>e+t.unreadCount,0)},increaseUnreadCount:p,clearUnreadCount:m,loadCurrentUserUnreadList:function(){const e=s();if(!e)return void(r.value=[]);const t=l();r.value=t[e]||[]},loadChatsFromCache:function(){const e=s();if(!e)return;const i=(ac(Jl)||{})[e];Array.isArray(i)&&i.length>0&&(t.value=i)},startAutoGreet:function(){v();const e=()=>{const t=function(){const e=3e6;return Math.floor(600001*Math.random())+e}();n=setTimeout(async()=>{await y(),e()},t)};e()},stopAutoGreet:v,executeAutoGreet:y,consumePendingMessages:function(e){const t=a.value[e]||[];return delete a.value[e],t},hasPendingMessages:function(e){var t;return((null==(t=a.value[e])?void 0:t.length)||0)>0},addPendingMessage:function(e,t){a.value[e]||(a.value[e]=[]),a.value[e].push(t),p(e)}}}),Cg=Object.freeze(Object.defineProperty({__proto__:null,useChatStore:Ag},Symbol.toStringTag,{value:"Module"}));class Ig{static goodsList(){return Wf({url:"/goods/v2/list",method:"post"})}static payCreateOrder(e){return Wf({url:"/pay/createOrder",method:"post",data:e})}static rechargeHistoryList(e){return Wf({url:"/pay/rechargeHistory",method:"post",data:e})}static expenseHistoryList(e){return Wf({url:"/pay/expenseHistory",method:"post",data:e})}}const Pg=wc.global.t;var _g=(e=>(e.COMPLETED="1",e.PENDING="0",e.FAILED="2",e))(_g||{});const Rg="order.status",xg={1:{icon:"checkbox-circle-line",color:"rgba(var(--order-status-completed-rgb), 1)",type:Pg(`${Rg}.completed.type`),title:Pg(`${Rg}.completed.title`),description:Pg(`${Rg}.completed.description`)},0:{icon:"time-line",color:"rgba(var(--order-status-pending-rgb), 1)",type:Pg(`${Rg}.pending.type`),title:Pg(`${Rg}.pending.title`),description:Pg(`${Rg}.pending.description`)},2:{icon:"error-warning-line",color:"rgba(var(--order-status-failed-rgb), 1)",type:Pg(`${Rg}.failed.type`),title:Pg(`${Rg}.failed.title`),description:Pg(`${Rg}.failed.description`)}},Lg=le("order",()=>{const e=u(null),t=u(!1),i=u(!1),r=u(""),a=u(null),n=u(null);let s=null,l=0;function c(){var e;return(null==(e=sg().userInfo)?void 0:e.userUniqId)||""}function d(){return ac(Ql)||{}}function h(){const t=c();if(!t)return;const i=d();delete i[t],rc(Ql,i),e.value=null}const p=P(()=>!!e.value&&(!(Date.now()>e.value.expiresAt)||(h(),!1)));function m(){return!!sg().isHasUserInfo&&(!!e.value&&(!(Date.now()>e.value.expiresAt)||(h(),!1)))}async function f(){if(!e.value)return null;try{const{list:t}=await Ig.rechargeHistoryList({page:1,orderSn:e.value.orderSn});if(t&&Array.isArray(t)&&t.length>0){const e=t[0];return n.value=e,String(e.status)}return null}catch(t){return null}}async function g(){if(!m())return void v();const e=await f();if(e){if(e===_g.COMPLETED||e===_g.FAILED)return void(await b(e));e===_g.PENDING&&(i.value||(t.value=!1,a.value=e,i.value=!0))}l++;let r=3e3;l>20?r=1e4:l>10&&(r=5e3),s=setTimeout(()=>{g()},r)}function y(){m()&&(v(),l=0,g())}function v(){s&&(clearTimeout(s),s=null),l=0}async function b(r){var s;v(),h();const o=sg();if(await o.getUserInfo(),r===_g.COMPLETED){const t={},i=c();i&&(t.userId=String(i)),n.value&&(n.value.userMoney&&(t.amount=String(n.value.userMoney),t.value=n.value.userMoney),n.value.currencyType&&(t.currency=n.value.currencyType,t.currencyUnit=n.value.currencyType),n.value.orderSn&&(t.orderId=n.value.orderSn,t.transaction_id=n.value.orderSn)),Ff("coin_order_success",t);const r=null==(s=e.value)?void 0:s.orderSn;if(r&&!Zc(r)){const e=Wc();e&&n.value&&(function(e){if(Jc()&&e.gclid)try{const t=Kc();window.gtag("event","conversion",{send_to:`${t.accountId}/${t.conversionLabels.purchase}`,value:e.value,currency:e.currency,transaction_id:e.transaction_id,gclid:e.gclid})}catch(t){}}({value:Number(n.value.userMoney||0),currency:"USD",transaction_id:r,gclid:e}),function(e){if(!e)return;const t=Xc();t[e]=Date.now(),Qc(t)}(r))}n.value=null}else r===_g.FAILED&&(Ff("coin_order_fail"),n.value=null);t.value=!1,a.value=r,i.value=!0}function w(){v(),h(),t.value=!1,i.value=!1,n.value=null,a.value=null,r.value="",Ff("coin_order_cancel")}return o(()=>e.value,e=>{e&&p.value?y():v()},{immediate:!0}),{currentOrder:e,hasPendingOrder:p,showPayDialog:t,showStatusDialog:i,payUrl:r,orderStatus:a,loadCurrentUserOrder:function(){const t=c();if(!t)return void(e.value=null);const i=d()[t];i&&Date.now()>i.expiresAt?h():e.value=i||null},saveOrder:function(t){const i=c();if(!i)return;const r=d(),a=Date.now()+6e5;r[i]={orderSn:t,expiresAt:a},rc(Ql,r),e.value={orderSn:t,expiresAt:a}},clearCurrentUserOrder:h,openPayDialog:function(e){r.value=e,a.value=_g.PENDING,i.value=!0,t.value=!0},handlePayDialogClose:function(){t.value=!1,w()},handleStatusDialogClose:function(){i.value=!1,a.value===_g.PENDING&&w()},cancelOrder:w,stopPolling:v,triggerImmediateCheck:async function(){if(!m())return;const e=await f();e&&(e===_g.COMPLETED||e===_g.FAILED?await b(e):e===_g.PENDING&&(t.value=!1,a.value=e,i.value=!0))}}});function Dg(){return Lg(Og)}const Mg=Object.freeze(Object.defineProperty({__proto__:null,useOrderStore:Lg,useOrderStoreHook:Dg},Symbol.toStringTag,{value:"Module"})),Og=ce();const Ng={DocumentCopy:Ve,ArrowDown:He,ArrowUp:qe,Close:_e,Check:Ge,Upload:$e,Delete:je,Edit:ze,Search:Be,Plus:Ue,Minus:Fe,Loading:Pe,Star:Ne,Warning:Oe,InfoFilled:Re,SuccessFilled:De,CircleClose:Ce,CircleCheck:Ie,QuestionFilled:Me};const Fg={"arrow-right-up-line":ni,"arrow-left-s-line":ai,"compass-3-line":ri,"vip-crown-line":ii,"vip-diamond-fill":ti,"coins-line":ei,"image-2-line":Zt,"message-3-line":Qt,"download-2-line":Xt,"chat-3-line":Jt,"heart-line":Yt,"shield-check-line":Kt,"lock-line":Wt,"check-line":Vt,"sparkling-2-line":Ht,"logout-box-line":qt,"more-2-line":Gt,"send-plane-fill":$t,"pencil-fill":jt,"global-line":zt,"menu-line":Bt,"download-line":Ut,"edit-line":Ft,"safari-line":Nt,"share-line":Ot,"share-2-line":Mt,"add-box-line":Dt,"more-fill":Lt,"mobile-download-fill":xt,"file-shield-2-line":Rt,"file-list-2-line":_t,"hand-heart-line":Pt,"add-line":It,"arrow-right-s-line":Ct,"arrow-left-line":At,"delete-bin-line":Et,"close-fill":Tt,"bard-fill":kt,"chat-smile-ai-line":St,"information-line":wt,"heart-fill":bt,"chat-3-fill":vt,link:yt,"search-line":gt,"user-line":ft,"facebook-line":mt,"twitter-fill":pt,"instagram-fill":ht,"arrow-right-line":ut,"flag-line":dt,"lightbulb-line":ct,"lightbulb-fill":lt,"subtract-line":ot,"coin-line":st,"send-plane-line":nt,"delete-bin-2-line":at,"chat-1-line":rt,"trophy-line":it,"customer-service-line":tt,"mail-line":et,"arrow-up-s-line":Ze,"arrow-down-s-line":Qe,"checkbox-circle-line":Xe,"error-warning-line":Je,"time-line":Ye,"file-copy-line":Ke,"eye-off-line":We};const Ug=L({__name:"index",props:{name:{},size:{default:16},color:{default:"var(--font-color)"}},setup(e){const t=e,i=P(()=>function(e){const t=e.startsWith("ri-")?e.slice(3):e;return Fg[t]}(t.name)),r=P(()=>`${parseInt(t.size)}px`);return(t,a)=>(D(),K(Y(i.value),{size:r.value,color:e.color},null,8,["size","color"]))}}),Bg={key:1,class:"dialog-common-container-title"},zg={key:2,class:"dialog-common-container-description"},jg=L({__name:"index",props:{closable:{type:Boolean,default:!0},visible:{type:Boolean,default:!1},width:{type:Number,default:635},mobileWidth:{type:String,default:"65%"},title:{type:String,default:""},description:{type:String,default:""},noOverflow:{type:Boolean,default:!1}},emits:["closed"],setup(e,{emit:t}){const i=e,a=t,n=()=>{i.closable&&a("closed")},s=nd(),o=P(()=>s.device===Gl.MOBILE);return(t,i)=>{const a=Ug,s=kl;return D(),K(s,N({"model-value":e.visible,width:r(o)?e.mobileWidth:e.width,"show-close":!1,"close-on-click-modal":e.closable,"close-on-press-escape":e.closable,onClosed:n},t.$attrs,{class:"dialog-common"}),{footer:B(()=>[O(t.$slots,"footer")]),default:B(()=>[W("div",{class:j(["dialog-common-container",{"no-overflow":e.noOverflow}])},[e.closable?(D(),K(a,{key:0,class:"dialog-common-container-close",name:"close-fill",size:"20",color:"#9CA3AF",onClick:re(n,["stop","prevent"])})):q("",!0),e.title?(D(),M("div",Bg,G(e.title),1)):q("",!0),e.description?(D(),M("div",zg,G(e.description),1)):q("",!0),O(t.$slots,"default")],2)]),_:3},16,["model-value","width","close-on-click-modal","close-on-press-escape"])}}}),$g={class:"dialogPay"},Gg=["src"],qg=L({__name:"index",props:{visible:{type:Boolean},url:{}},emits:["closed"],setup(e,{emit:t}){const i=t,r=Dg(),a=u(null),n=()=>{try{if(a.value&&a.value.contentWindow){const e=a.value.contentWindow.location.href;(e=>{try{return new URL(e).searchParams.get("mchOrderNo")}catch(t){return null}})(e)&&r.triggerImmediateCheck()}}catch(e){}},s=e=>{if(e.data&&"paymentCallback"===e.data.type){e.data.orderSn&&r.triggerImmediateCheck()}};E(()=>{window.addEventListener("message",s)}),de(()=>{window.removeEventListener("message",s)});const o=()=>{i("closed")};return(t,i)=>{const r=jg;return D(),K(r,{visible:e.visible,onClosed:o,width:375,"close-on-click-modal":!1,"z-index":"9999",class:"dialogPay"},{default:B(()=>[W("div",$g,[W("iframe",{ref_key:"payIframeRef",ref:a,src:e.url,frameborder:"0",width:"100%",height:"100%",class:"pay-iframe",onLoad:n},null,40,Gg)])]),_:1},8,["visible"])}}}),Hg={class:"order-status-view"},Vg={class:"order-status-view-icon"},Wg={class:"order-status-view-title"},Kg={class:"order-status-view-description"},Yg=(e,t)=>{const i=e.__vccOpts||e;for(const[r,a]of t)i[r]=a;return i},Jg=Yg(L({__name:"OrderStatusView",props:{status:{}},setup(e){const t=e,i=P(()=>xg[t.status]);return(e,t)=>{const a=Ug;return D(),M("div",Hg,[W("div",Vg,[U(a,{name:r(i).icon,size:"60",color:r(i).color},null,8,["name","color"])]),W("div",Wg,G(r(i).title),1),W("div",Kg,G(r(i).description),1)])}}}),[["__scopeId","data-v-72e84d24"]]),Xg={class:"dialogPayCallback"},Qg=L({__name:"index",props:{visible:{type:Boolean},status:{}},emits:["closed"],setup(e,{emit:t}){const i=e,a=t,n=P(()=>i.status),s=()=>{a("closed")};return(t,i)=>{const a=Jg,o=jg;return D(),K(o,{visible:e.visible,onClosed:s,width:375,"z-index":"9998","close-on-click-modal":!1,class:"dialogPayCallback"},{default:B(()=>[W("div",Xg,[U(a,{status:r(n)},null,8,["status"])])]),_:1},8,["visible"])}}}),Zg={class:"webview-guide-content"},ey={class:"webview-guide-title"},ty={class:"webview-guide-desc"},iy={class:"webview-guide-url-section"},ry={class:"webview-guide-url-label"},ay={class:"webview-guide-url-box"},ny={class:"webview-guide-url-text"},sy={class:"webview-guide-steps"},oy={class:"webview-guide-step"},ly={class:"webview-guide-step-text"},cy={class:"webview-guide-step"},dy={class:"webview-guide-step-text"},uy={class:"webview-guide-step"},hy={class:"webview-guide-step-text"},py=Yg(L({name:"DialogWebViewGuide",__name:"index",props:{visible:{type:Boolean}},emits:["closed"],setup(e,{emit:t}){const{t:i}=Ae(),r=hd(),a=t,n=u(!1),s=P(()=>window.location.href),o=()=>{r.closeWebViewGuide(),a("closed")},l=async()=>{try{await navigator.clipboard.writeText(s.value),n.value=!0,Nl.success(i("dialogWebViewGuide.copied")),setTimeout(()=>{n.value=!1},2e3)}catch(e){try{const e=document.createElement("textarea");e.value=s.value,e.style.position="fixed",e.style.left="-9999px",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),n.value=!0,Nl.success(i("dialogWebViewGuide.copied")),setTimeout(()=>{n.value=!1},2e3)}catch(t){Nl.error(i("dialogWebViewGuide.copyFailed"))}}};return(t,i)=>{const r=jg;return D(),K(r,{visible:e.visible,onClosed:o,width:400,class:"webview-guide-dialog-wrapper"},{default:B(()=>[W("div",Zg,[i[3]||(i[3]=W("div",{class:"webview-guide-icon"},[W("i",{class:"ri-error-warning-line"})],-1)),W("div",ey,G(t.$t("dialogWebViewGuide.title")),1),W("div",ty,G(t.$t("dialogWebViewGuide.desc")),1),W("div",iy,[W("div",ry,G(t.$t("dialogWebViewGuide.currentUrl")),1),W("div",ay,[W("span",ny,G(s.value),1)])]),W("button",{class:j(["webview-guide-copy-btn",{copied:n.value}]),onClick:l},[W("i",{class:j(n.value?"ri-check-line":"ri-file-copy-line")},null,2),W("span",null,G(n.value?t.$t("dialogWebViewGuide.copied"):t.$t("dialogWebViewGuide.copyLink")),1)],2),W("div",sy,[W("div",oy,[i[0]||(i[0]=W("span",{class:"webview-guide-step-number"},"1",-1)),W("span",ly,G(t.$t("dialogWebViewGuide.steps.step1")),1)]),W("div",cy,[i[1]||(i[1]=W("span",{class:"webview-guide-step-number"},"2",-1)),W("span",dy,G(t.$t("dialogWebViewGuide.steps.step2")),1)]),W("div",uy,[i[2]||(i[2]=W("span",{class:"webview-guide-step-number"},"3",-1)),W("span",hy,G(t.$t("dialogWebViewGuide.steps.step3")),1)])])])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-7a46408c"]]),my={class:"gender-selector"},fy=["onClick"],gy=["src","alt"],yy={class:"gender-label"},vy=Yg(L({__name:"index",props:{modelValue:{default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},initialValue:{default:null}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,r=t,{t:a}=Ae(),n=P(()=>[{value:1,label:a("profileComplete.genderOptions.male"),icon:"/images/icons/gender-male.png"},{value:2,label:a("profileComplete.genderOptions.female"),icon:"/images/icons/gender-female.png"},{value:3,label:a("profileComplete.genderOptions.other"),icon:"/images/icons/gender-other.png"}]),s=P(()=>i.readonly&&i.modelValue&&0!==i.modelValue?n.value.filter(e=>e.value===i.modelValue):n.value);return(t,a)=>(D(),M("div",my,[(D(!0),M(ie,null,ue(s.value,t=>(D(),M("div",{key:t.value,class:j(["gender-card",{active:e.modelValue===t.value,disabled:e.disabled||e.readonly}]),onClick:e=>{return a=t.value,void(i.disabled||i.readonly||r("update:modelValue",a));var a}},[W("img",{src:t.icon,alt:t.label,class:"gender-icon"},null,8,gy),W("span",yy,G(t.label),1)],10,fy))),128))]))}}),[["__scopeId","data-v-022f6a01"]]),by=["value","placeholder","disabled"],wy={class:"calendar-header"},Sy={class:"header-selectors"},ky=["value"],Ty=["value"],Ey={class:"calendar-weekdays"},Ay={class:"calendar-days"},Cy=["onClick"],Iy={class:"day-number"},Py=Yg(L({__name:"index",props:{modelValue:{default:null},placeholder:{default:"MM/DD/YYYY"},disabled:{type:Boolean,default:!1},minAge:{default:0}},emits:["update:modelValue"],setup(e,{emit:t}){var i,r;const a=e,n=t,{t:s}=Ae(),l=u(null),c=u(null),d=u(!1),h=u(a.modelValue?ke.unix(a.modelValue):null),p=u((null==(i=h.value)?void 0:i.month())??ke().month()),m=u((null==(r=h.value)?void 0:r.year())??ke().year()),f=P(()=>h.value?h.value.format("MM/DD/YYYY"):""),g=P(()=>{if(!l.value)return{};const e=l.value.getBoundingClientRect();return{position:"fixed",top:e.top-450-8+"px",left:`${e.left+e.width/2}px`,transform:"translateX(-50%)"}}),y=P(()=>[{value:0,label:s("common.months.january")||"January"},{value:1,label:s("common.months.february")||"February"},{value:2,label:s("common.months.march")||"March"},{value:3,label:s("common.months.april")||"April"},{value:4,label:s("common.months.may")||"May"},{value:5,label:s("common.months.june")||"June"},{value:6,label:s("common.months.july")||"July"},{value:7,label:s("common.months.august")||"August"},{value:8,label:s("common.months.september")||"September"},{value:9,label:s("common.months.october")||"October"},{value:10,label:s("common.months.november")||"November"},{value:11,label:s("common.months.december")||"December"}]),v=P(()=>{const e=ke().year(),t=[];for(let i=e-100;i<=e+10;i++)t.push(i);return t}),b=P(()=>["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),w=P(()=>{const e=[],t=ke().year(m.value).month(p.value).date(1),i=t.endOf("month"),r=t.day(),n=i.date(),s=t.subtract(1,"day");for(let a=r-1;a>=0;a--){const t=s.subtract(a,"day");e.push({key:t.format("YYYY-MM-DD"),day:t.date(),date:t,isCurrentMonth:!1,isSelected:!1,isToday:!1,isDisabled:!1})}const o=ke().startOf("day"),l=a.minAge>0?o.subtract(a.minAge,"year"):null;for(let a=1;a<=n;a++){const i=t.date(a);e.push({key:i.format("YYYY-MM-DD"),day:a,date:i,isCurrentMonth:!0,isSelected:!!h.value&&i.isSame(h.value,"day"),isToday:i.isSame(o,"day"),isDisabled:i.isAfter(o)||!!l&&i.isAfter(l)})}const c=42-e.length;for(let a=1;a<=c;a++){const t=i.add(a,"day");e.push({key:t.format("YYYY-MM-DD"),day:t.date(),date:t,isCurrentMonth:!1,isSelected:!1,isToday:!1,isDisabled:!1})}return e}),S=()=>{a.disabled||(d.value=!d.value)},k=e=>{const t=e.target,i=c.value;!l.value||l.value===t||l.value.contains(t)||i&&(i===t||i.contains(t))||(d.value=!1)},T=()=>{const e=ke().year(m.value).month(p.value).subtract(1,"month");p.value=e.month(),m.value=e.year()},A=()=>{const e=ke().year(m.value).month(p.value).add(1,"month");p.value=e.month(),m.value=e.year()};o(()=>a.modelValue,e=>{e?(h.value=ke.unix(e),p.value=h.value.month(),m.value=h.value.year()):h.value=null}),E(()=>{window.addEventListener("scroll",C,!0),window.addEventListener("resize",C)}),de(()=>{window.removeEventListener("scroll",C,!0),window.removeEventListener("resize",C)});const C=()=>{d.value&&(d.value=!1)},I={mounted(e,t){e._clickOutside=e=>{t.value(e)},document.addEventListener("click",e._clickOutside)},unmounted(e){e._clickOutside&&(document.removeEventListener("click",e._clickOutside),delete e._clickOutside)}};return(t,i)=>X((D(),M("div",{class:"date-picker",ref_key:"datePickerRef",ref:l},[W("div",{class:"date-input",onClick:S},[W("input",{type:"text",value:f.value,placeholder:e.placeholder,readonly:"",disabled:e.disabled,class:"input-field"},null,8,by),i[2]||(i[2]=W("i",{class:"ri-calendar-line input-icon"},null,-1))]),(D(),K(ee,{to:"body"},[U(H,{name:"calendar-fade"},{default:B(()=>[d.value?(D(),M("div",{key:0,class:"calendar-popup",style:z(g.value),ref_key:"calendarRef",ref:c},[W("div",wy,[W("div",Sy,[X(W("select",{"onUpdate:modelValue":i[0]||(i[0]=e=>p.value=e),class:"month-selector"},[(D(!0),M(ie,null,ue(y.value,e=>(D(),M("option",{key:e.value,value:e.value},G(e.label),9,ky))),128))],512),[[he,p.value]]),X(W("select",{"onUpdate:modelValue":i[1]||(i[1]=e=>m.value=e),class:"year-selector"},[(D(!0),M(ie,null,ue(v.value,e=>(D(),M("option",{key:e,value:e},G(e),9,Ty))),128))],512),[[he,m.value]])]),W("div",{class:"header-arrows"},[W("img",{src:"/images/icons/arrow-left.png",class:"arrow-btn",alt:"prev",onClick:T}),W("img",{src:"/images/icons/arrow-right.png",class:"arrow-btn",alt:"next",onClick:A})])]),W("div",Ey,[(D(!0),M(ie,null,ue(b.value,e=>(D(),M("div",{key:e,class:"weekday"},G(e),1))),128))]),W("div",Ay,[(D(!0),M(ie,null,ue(w.value,e=>(D(),M("div",{key:e.key,class:j(["day-cell",{"other-month":!e.isCurrentMonth,selected:e.isSelected,today:e.isToday,disabled:e.isDisabled}]),onClick:t=>(e=>{if(!e.isDisabled){if(!e.isCurrentMonth)return p.value=e.date.month(),void(m.value=e.date.year());h.value=e.date,n("update:modelValue",e.date.unix()),d.value=!1}})(e)},[W("span",Iy,G(e.day),1)],10,Cy))),128))])],4)):q("",!0)]),_:1})]))])),[[I,k]])}}),[["__scopeId","data-v-7d914a8d"]]),_y={class:"profile-complete-container"},Ry={class:"header"},xy={class:"title"},Ly={class:"subtitle"},Dy={class:"form-item"},My={class:"form-label"},Oy=["placeholder"],Ny={class:"form-item"},Fy={class:"form-label-row"},Uy={class:"form-label"},By={class:"form-hint"},zy={class:"form-item"},jy={class:"form-label"},$y=["disabled"],Gy={key:0},qy={key:1},Hy=Yg(L({__name:"index",props:{visible:{type:Boolean}},emits:["closed"],setup(e,{emit:t}){const i=e,a=t,{t:n}=Ae(),s=sg(),l=P(()=>window.APP_NAME||"OnlyGF"),c=I({nickName:"",sex:null,birthday:null}),d=u(null),h=u(!1),p=P(()=>null!==d.value&&0!==d.value&&null!==c.sex&&0!==c.sex);o(()=>i.visible,e=>{e&&(()=>{const e=s.userInfo;e&&(e.nickName&&(c.nickName=e.nickName),e.sex&&0!==e.sex?(c.sex=e.sex,d.value=e.sex):(c.sex=e.sex||null,d.value=0),e.birthday&&0!==e.birthday&&(c.birthday=e.birthday))})()},{immediate:!0});const m=async()=>{if(!c.nickName||!c.nickName.trim())return void Nl.warning(n("profileComplete.nicknameRequired"));if(!c.sex)return void Nl.warning(n("profileComplete.genderRequired"));if(!c.birthday)return void Nl.warning(n("profileComplete.birthdayRequired"));const e=ke.unix(c.birthday);if(ke().startOf("day").diff(e,"year")<18)Nl.warning(n("profileComplete.birthdayUnderAge"));else{h.value=!0;try{await rg.updateUserInfo({nickName:c.nickName.trim(),sex:c.sex,birthday:c.birthday}),await s.getUserInfo(),Nl.success(n("profileComplete.submitSuccess")),Ff("profile_complete_success",{nickName:c.nickName.trim(),sex:c.sex,birthday:c.birthday}),a("closed")}catch(t){Nl.error((null==t?void 0:t.message)||n("profileComplete.submitFailed")),Ff("profile_complete_fail",{error:(null==t?void 0:t.message)||"Unknown error"})}finally{h.value=!1}}},f=()=>{a("closed")};return(t,i)=>{const a=jg;return D(),K(a,{visible:e.visible,width:592,"no-overflow":!0,onClosed:f},{default:B(()=>[W("div",_y,[W("div",Ry,[W("h1",xy,G(r(n)("profileComplete.title",{appName:l.value})),1),W("p",Ly,G(r(n)("profileComplete.subtitle")),1)]),W("div",Dy,[W("label",My,G(r(n)("profileComplete.nicknameLabel")),1),X(W("input",{"onUpdate:modelValue":i[0]||(i[0]=e=>c.nickName=e),type:"text",class:"nickname-input",placeholder:r(n)("profileComplete.nicknamePlaceholder"),maxlength:"50"},null,8,Oy),[[pe,c.nickName]])]),W("div",Ny,[W("div",Fy,[W("label",Uy,G(r(n)("profileComplete.genderLabel")),1),W("span",By,G(r(n)("profileComplete.genderHint")),1)]),U(vy,{modelValue:c.sex,"onUpdate:modelValue":i[1]||(i[1]=e=>c.sex=e),readonly:p.value,"initial-value":d.value},null,8,["modelValue","readonly","initial-value"])]),W("div",zy,[W("label",jy,G(r(n)("profileComplete.birthdayLabel")),1),U(Py,{modelValue:c.birthday,"onUpdate:modelValue":i[2]||(i[2]=e=>c.birthday=e),placeholder:r(n)("profileComplete.birthdayPlaceholder"),"min-age":18},null,8,["modelValue","placeholder"])]),W("button",{class:"submit-button",disabled:h.value,onClick:m},[h.value?(D(),M("span",qy,[i[3]||(i[3]=W("i",{class:"ri-loader-4-line rotating"},null,-1)),$(" "+G(r(n)("common.submitting")||"Submitting..."),1)])):(D(),M("span",Gy,G(r(n)("profileComplete.submitButton")),1))],8,$y)])]),_:1},8,["visible"])}}}),[["__scopeId","data-v-117d9853"]]),Vy={class:"loading-container",role:"status","aria-live":"polite","aria-busy":"true"};const Wy=Yg({},[["render",function(e,t){return D(),M("div",Vy,[t[0]||(t[0]=W("span",{class:"loading-icon","aria-hidden":"true"},null,-1)),W("span",null,G(e.$t("loading.title")),1)])}],["__scopeId","data-v-8d8287d3"]]),Ky={key:0,class:"duel-loading-background","aria-hidden":"true"},Yy=["src"],Jy={class:"route-loading-content"},Xy={class:"duel-loading-avatars"},Qy=["src","alt"],Zy={class:"route-loading-title"},ev={class:"route-loading-subtitle"},tv=Yg(L({__name:"index",setup(e){nd();const t=Nc(),{t:i}=Ae(),a=new Set,n=P(()=>t.skipInitialTransition?"":"route-loading-fade"),s=u(""),l=u(""),c=P(()=>t.avatarUrl||""),d=P(()=>t.backgroundUrl||Ec()),h=P(()=>l.value?{backgroundImage:`url("${l.value}")`}:{}),p=P(()=>{if(t.isDuel)return i("pk.pleaseWait");return String(t.title||"Please wait...").trim().replace(/\.+$/g,"")||"Please wait"}),m=P(()=>t.isDuel?2===t.duelHosts.length?i("pk.hostsReady",{a:t.duelHosts[0].name,b:t.duelHosts[1].name}):i("pk.gettingReady"):t.subtitle||i("loading.title"));return o([()=>t.visible,c],([e,i])=>{if(!e)return void(s.value="");if(!i)return void(s.value="");if(a.has(i))return void(s.value=i);s.value="";const r=new Image;r.decoding="async",r.onload=()=>{a.add(i),t.visible&&c.value===i&&(s.value=i)},r.onerror=()=>{},r.src=i},{immediate:!0}),o([()=>t.visible,d],([e,i])=>{if(!e)return;const r=Ec();if(!i)return void(l.value=r);const a=Cc(i);!0!==a?!1!==a?(l.value="",Ac(i).then(e=>{t.visible&&d.value===i&&(l.value=e?i:i===r?"":r)})):l.value=i===r?"":r:l.value=i},{immediate:!0}),E(()=>{t.skipInitialTransition&&requestAnimationFrame(()=>{t.skipInitialTransition=!1})}),(e,i)=>(D(),K(H,{name:r(n)},{default:B(()=>[r(t).visible?(D(),M("div",{key:0,class:j(["route-loading-overlay",{"is-duel":r(t).isDuel}])},[r(t).isDuel?(D(),M("div",Ky,[(D(!0),M(ie,null,ue(r(t).duelHosts.slice(0,2),(e,t)=>(D(),M("img",{key:t,src:e.portrait,alt:""},null,8,Yy))),128))])):(D(),M("div",{key:1,class:"route-loading-backdrop",style:z({...r(h),opacity:r(l)?1:0})},null,4)),W("div",Jy,[r(t).isDuel&&2===r(t).duelHosts.length?(D(),M(ie,{key:0},[W("div",Xy,[(D(!0),M(ie,null,ue(r(t).duelHosts,e=>(D(),M("img",{key:e.name,src:e.portrait,alt:e.name},null,8,Qy))),128)),i[0]||(i[0]=W("span",null,"LIVE",-1))]),W("p",Zy,G(r(p))+" …",1),W("h2",ev,G(r(m)),1)],64)):(D(),K(Wy,{key:1}))])],2)):q("",!0)]),_:1},8,["name"]))}}),[["__scopeId","data-v-9cf3718a"]]),iv={key:0,"data-cookie-consent":"",class:"cookie-consent fixed bottom-5 left-2 right-2 md:left-auto md:right-12 z-999 mx-auto md:mx-0 max-w-[400px] md:max-w-[820px]"},rv={class:"rounded-xl bg-gradient-to-br from-white/10 to-white/5 backdrop-blur-md shadow-2xl border border-white/20 overflow-hidden"},av={class:"flex flex-row items-stretch pl-2.5"},nv={key:1,class:"w-16 md:w-24 shrink-0 flex items-center justify-center text-4xl md:text-6xl"},sv={class:"flex-1 flex flex-col md:flex-row gap-3 md:gap-4 p-4 md:p-5"},ov={class:"flex-1 flex flex-col gap-1"},lv={class:"text-sm md:text-base text-white font-medium leading-tight"},cv={class:"text-xs md:text-sm text-white/60 leading-relaxed"},dv={class:"flex items-center gap-2 md:gap-3 w-full md:w-auto"},uv=Yg(L({__name:"index",setup(e){const{t:t}=Ae(),i=u(!1),a=u(!0),n=()=>{a.value=!1},s=()=>{rc(ic,"accepted"),i.value=!1,window.dispatchEvent(new CustomEvent("cookie-consent",{detail:{accepted:!0}}))},o=()=>{rc(ic,"denied"),i.value=!1,window.dispatchEvent(new CustomEvent("cookie-consent",{detail:{accepted:!1}}))};return E(()=>{ac(ic)||(i.value=!0)}),(e,l)=>{const c=me("router-link");return D(),K(H,{name:"slide-up"},{default:B(()=>[i.value?(D(),M("div",iv,[W("div",rv,[W("div",av,[a.value?(D(),M("img",{key:0,src:"/images/icons/cookie-icon.png",alt:"Cookies",class:"w-16 md:w-24 shrink-0 object-cover",onError:n},null,32)):(D(),M("div",nv," 🍪 ")),W("div",sv,[W("div",ov,[W("span",lv,G(r(t)("cookieConsent.title")),1),W("span",cv,[$(G(r(t)("cookieConsent.description"))+" ",1),U(c,{to:"/about/privacyPolicy",class:"text-purple-400 hover:underline ml-1"},{default:B(()=>[$(G(r(t)("cookieConsent.learnMore")),1)]),_:1})])]),W("div",dv,[W("button",{class:"cursor-pointer flex-1 md:flex-none md:min-w-[120px] h-10 md:h-12 px-6 rounded-xl text-sm font-medium bg-transparent border border-white/30 text-white hover:border-white/50 hover:bg-white/5 transition-all",onClick:o},G(r(t)("cookieConsent.deny")),1),W("button",{class:"cursor-pointer flex-1 md:flex-none md:min-w-[140px] h-10 md:h-12 px-6 rounded-xl text-sm font-medium bg-gradient-to-r from-purple-500 to-pink-500 text-white shadow-lg shadow-purple-500/50 hover:brightness-110 transition-all",onClick:s},G(r(t)("cookieConsent.accept")),1)])])])])])):q("",!0)]),_:1})}}}),[["__scopeId","data-v-87c330f4"]]),hv=L({__name:"App",setup(e){const t=nd();ld(),Ag();const i=ng(),a=Lg(),n=hd(),s=P(()=>t.locale);return o(()=>i.isHasUserInfo,e=>{e&&a.loadCurrentUserOrder()},{immediate:!0}),(e,t)=>{const i=me("router-view"),o=cl;return D(),K(o,{locale:r(s)},{default:B(()=>[U(i),U(tv),r(a).showPayDialog?(D(),K(qg,{key:0,visible:r(a).showPayDialog,url:r(a).payUrl,onClosed:r(a).handlePayDialogClose},null,8,["visible","url","onClosed"])):q("",!0),r(a).showStatusDialog?(D(),K(Qg,{key:1,visible:r(a).showStatusDialog,status:r(a).orderStatus||void 0,onClosed:r(a).handleStatusDialogClose},null,8,["visible","status","onClosed"])):q("",!0),r(n).showWebViewGuide?(D(),K(py,{key:2,visible:r(n).showWebViewGuide,onClosed:r(n).closeWebViewGuide},null,8,["visible","onClosed"])):q("",!0),r(n).showProfileCompleteDialog?(D(),K(Hy,{key:3,visible:r(n).showProfileCompleteDialog,onClosed:t[0]||(t[0]=e=>r(n).showProfileCompleteDialog=!1)},null,8,["visible"])):q("",!0),U(uv)]),_:1},8,["locale"])}}}),pv="noenc";const mv=["input","textarea","[contenteditable='true']","[contenteditable='']","[data-allow-contextmenu]"],fv=["img","video","[data-restrict-contextmenu]",".message-item",".message-content",".message-list",".message-wrapper",".right-messages",".chat-history-content",".character-chat-content-box-content-container",".photo-gallery-message",".other-image-message",".other-video-message",".upgradable-photo-message",".register-guide-message"],gv="__restrictContextMenuHandler__",yv="__restrictContextMenuBinding__";let vv=!1;const bv=e=>{if("function"==typeof e.composedPath){const t=e.composedPath().filter(e=>e instanceof Element);if(t.length>0)return t}return e.target instanceof Element?[e.target]:[]},wv=(e,t)=>e.some(e=>t.some(t=>e.matches(t))),Sv=(e,t)=>{const i=bv(e);return 0!==i.length&&wv(i,t)},kv={mounted(e,t){e[yv]=t.value;const i=t=>{const i=e[yv],{enabled:r,allowSelectors:a}="boolean"==typeof(n=i)?{enabled:n,allowSelectors:mv}:{enabled:(null==n?void 0:n.enabled)??!0,allowSelectors:(null==n?void 0:n.allowSelectors)??mv};var n;r&&(Sv(t,a)||t.preventDefault())};e[gv]=i,e.addEventListener("contextmenu",i,!0)},updated(e,t){e[yv]=t.value},unmounted(e){const t=e[gv];t&&(e.removeEventListener("contextmenu",t,!0),delete e[gv],delete e[yv])}};function Tv(e){e.directive("restrict-contextmenu",kv),vv||"undefined"==typeof document||(document.addEventListener("contextmenu",e=>{Sv(e,mv)||((e,t)=>{const i=bv(e);return 0!==i.length&&wv(i,t)})(e,fv)&&e.preventDefault()},!0),vv=!0)}si.configure({easing:"ease",speed:500,showSpinner:!1,trickleSpeed:200,minimum:.3});const Ev="dynamic-hreflang-tags";function Av(e){var t,i;const r=(null==(i=null==(t=window.__APP_CONFIG__)?void 0:t.seo)?void 0:i.siteUrl)||window.location.origin,a=window.location.pathname,n=window.location.search,s=new URL(a+n,r);for(const o of[...s.searchParams.keys()])["id","type"].includes(o)||s.searchParams.delete(o);return"en"===e?s.searchParams.delete("lang"):s.searchParams.set("lang",e),s.href}function Cv(){function e(){const e=document.getElementById(Ev);e&&e.remove(),document.querySelectorAll(`link[data-seo="${Ev}"]`).forEach(e=>e.remove())}return{updateHreflangTags:function(t){if(e(),!function(e){var t,i,r,a,n,s,o;if(!0!==(null==(i=null==(t=window.__APP_CONFIG__)?void 0:t.seo)?void 0:i.indexable)||e.path.startsWith("/about/"))return!1;if(null==(r=e.meta)?void 0:r.hidden)return!1;if((null==(a=e.meta)?void 0:a.auth)||(null==(n=e.meta)?void 0:n.requiresAuth))return!1;if(["/auth/google-callback","/auth/email","/redirect","/401","/404","/about/ipAccess","/vipGuidePreview","/m3u8Player"].some(t=>e.path===t||e.path.startsWith(t+"/")))return!1;const l=null==(s=e.meta)?void 0:s.seo;return!(null==(o=null==l?void 0:l.robots)?void 0:o.includes("noindex"))}(t))return;(t.path.startsWith("/guides")?["en","zh_TW"]:zl).forEach(e=>{const t=document.createElement("link");t.rel="alternate",t.hreflang=e.replace("_","-"),t.dataset.seo=Ev,t.href=Av(e),document.head.appendChild(t)});const i=document.createElement("link");i.rel="alternate",i.hreflang="x-default",i.dataset.seo=Ev,i.href=Av("en"),document.head.appendChild(i)},removeHreflangTags:e}}const Iv="app-canonical-link",Pv="app-seo-jsonld",_v=["id","type"],Rv={home:"Home",characterList:"AI Characters",characterSearch:"Search",characterDetail:"Character",characterChat:"AI Chat",characterInteract:"Live Interaction",chatHistory:"Chat History",userCenter:"User Center",rechargeCenter:"Recharge Center",rechargeHistory:"Recharge History",webTutorial:"Web Tutorial",contactUs:"Contact Us",privacyPolicy:"Privacy Policy",termsService:"Terms of Service"};let xv=null;const Lv=()=>{var e,t,i;const r=null==(t=null==(e=window.__APP_CONFIG__)?void 0:e.seo)?void 0:t.title;return(null==(i=null==r?void 0:r.split(/\s+-\s*/)[0])?void 0:i.trim())||"OnlyGF"},Dv=e=>e?e.replace(/\{appName\}/g,Lv()):e,Mv=e=>{if(!e)return"/";if("/"===e.path)return"/";const t=new URLSearchParams;for(const r of _v){const i=e.query[r];"string"==typeof i&&i&&t.set(r,i)}const i=t.toString();return i?`${e.path}?${i}`:e.path},Ov=e=>{var t,i,r;return`${(null==(i=null==(t=window.__APP_CONFIG__)?void 0:t.seo)?void 0:i.siteUrl)||(null==(r=window.location)?void 0:r.origin)||""}${e.startsWith("/")?e:`/${e}`}`},Nv=(e,t)=>{if(!t)return;let i=document.querySelector(`meta[name="${e}"]`);i?i.setAttribute("content",t):(i=document.createElement("meta"),i.setAttribute("name",e),i.setAttribute("content",t),document.head.appendChild(i))},Fv=(e,t)=>{if(!t)return;let i=document.querySelector(`meta[property="${e}"]`);i?i.setAttribute("content",t):(i=document.createElement("meta"),i.setAttribute("property",e),i.setAttribute("content",t),document.head.appendChild(i))},Uv=(e,t)=>{e&&(Fv("og:title",e),Nv("twitter:title",e)),t&&(Fv("og:description",t),Nv("twitter:description",t))},Bv=e=>{if(!e)return;let t=document.querySelector(`link[data-seo="${Iv}"]`);t||(t=document.createElement("link"),t.setAttribute("rel","canonical"),t.setAttribute("data-seo",Iv),document.head.appendChild(t));const i=new URL(e),r=new URLSearchParams(window.location.search).get("lang");!i.searchParams.has("lang")&&r&&["en","zh_TW","ja","es","fr","it","ru","pl","ro","hi"].includes(r)&&i.searchParams.set("lang",r),(null==xv?void 0:xv.path.startsWith("/about/"))&&i.searchParams.delete("lang"),"en"===i.searchParams.get("lang")&&i.searchParams.delete("lang"),t.setAttribute("href",i.href),Fv("og:url",i.href)},zv=e=>{var t;const i=(()=>{var e,t;const i=null==(e=window.__APP_CONFIG__)?void 0:e.seo;if((null==i?void 0:i.title)||(null==i?void 0:i.description)||(null==i?void 0:i.keywords))return{title:i.title,description:i.description,keywords:i.keywords};const r=null==(t=sg().userConfig)?void 0:t.interfaceConfig;return r?{title:r.title,description:r.description,keywords:r.keywords}:{}})(),r=(null==(t=null==e?void 0:e.meta)?void 0:t.seo)||{};return{title:r.title||i.title,description:r.description||i.description,keywords:r.keywords||i.keywords,canonical:r.canonical,jsonLdType:r.jsonLdType,robots:r.robots}},jv=e=>{if(!e)return e;if(e.startsWith("seo.")){const{global:t}=wc,i=t.t(e);if(i===e){const i=t.messages.en;if(i){const t=e.split(".");let r=i;for(const e of t)r=null==r?void 0:r[e];if("string"==typeof r)return Dv(r)}}return Dv(i)}return Dv(e)},$v=(e,t)=>{if((()=>{const e=document.getElementById(Pv);e&&e.remove()})(),!e||0===e.length)return;const i=(null==t?void 0:t.skipBreadcrumb)?null:(e=>{var t,i,r;if(!xv)return null;const a=(null==(i=null==(t=window.__APP_CONFIG__)?void 0:t.seo)?void 0:i.siteUrl)||(null==(r=window.location)?void 0:r.origin)||"",n=xv.path.split("/").filter(Boolean),s=n[n.length-1]||"home";return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:`${a}/`},{"@type":"ListItem",position:2,name:e||Rv[s]||s,item:Ov(Mv(xv))}]}})(null==t?void 0:t.breadcrumbLeaf),r=i?[...e,i]:e,a=document.createElement("script");a.type="application/ld+json",a.id=Pv,a.textContent=JSON.stringify(r),document.head.appendChild(a)},Gv=e=>{const t=Dv(e.title);t&&(document.title=t);const i=jv(e.description);Nv("description",i),Nv("keywords",Dv(e.keywords)),Uv(t,i),e.canonical&&Bv(Ov(e.canonical))},qv=e=>{var t,i;xv=e??null,document.documentElement.lang=String(wc.global.locale.value).replace("_","-");const r=zv(e),a=Dv(r.title);a&&(document.title=a);const n=jv(r.description);Nv("description",n),Nv("keywords",Dv(r.keywords)),Uv(a,n);const s=!0===(null==(i=null==(t=window.__APP_CONFIG__)?void 0:t.seo)?void 0:i.indexable)?r.robots||"index,follow":"noindex,nofollow";Nv("robots",s),Bv(Ov(r.canonical||Mv(e)));const o=((e,t)=>{if(!e||!t.jsonLdType)return null;if("Article"!==t.jsonLdType&&"ContactPage"!==t.jsonLdType)return null;const i=Dv(t.title),r={"@context":"https://schema.org","@type":t.jsonLdType,name:i,description:Dv(t.description),url:Ov(Mv(e))};return"Article"===t.jsonLdType&&(r.headline=i),r})(e,r);$v(o?[o]:null);const{updateHreflangTags:l}=Cv();e&&l(e)};let Hv=null,Vv=null;function Wv(){if(Hv&&Date.now()-Hv.at<3e5)return Promise.resolve(Hv);if(!Vv){const e=Ig.goodsList().then(({list:e,models:t})=>{const i={list:e||[],models:t||[],at:Date.now()};return Hv=i,i}).finally(()=>{Vv=null});Vv=e}return Vv}const Kv=e=>{if(!e||"object"!=typeof e)return[];const t=e;return Array.isArray(t.records)?t.records:Array.isArray(t.list)?t.list:[]};class Yv{static getInfo(e,t=!0,i){const r=null==i?void 0:String(i).trim();return Wf({url:`/intimacy/${e}/info`,method:"get",params:{openword:t,...r?{sceneCode:r}:{}},hiddenToast:!0})}static getRecords(e,t={}){return Wf({url:`/intimacy/${e}/records`,method:"get",params:{page:1,size:20,...t},hiddenToast:!0})}static giftOperate(e,t){const i=null==t?"":String(t).trim();return Wf({url:`/intimacy/${e}/giftoperate`,method:"post",data:{action:"inorder",botId:e,...i?{sceneCode:i}:{}},hiddenToast:!0})}static getInventory(e){return Wf({url:`/intimacy/${e}/inventory`,method:"get",hiddenToast:!0})}static getRandomVideos(e,t=1){return Wf({url:`/intimacy/${e}/random-videos`,method:"get",params:{size:t},hiddenToast:!0})}}const Jv="/user",Xv="/v2";class Qv{static botList(e,t){return Wf({url:`${Jv}${Xv}/chat/page`,method:"post",data:e,...t})}static botDetail(e){return Wf({url:`${Jv}${Xv}/detail`,method:"post",data:e,hiddenToast:!0})}static botInteract(e){return Wf({url:`${Jv}${Xv}/interact`,method:"post",data:e})}static botAlbums(e){return Wf({url:`${Jv}/userAlbums`,method:"post",data:e})}static requestPhoto(e,t){return Wf({url:`${Jv}${Xv}/requestPhoto`,method:"post",data:{userId:e,poseType:t}})}static saveProloguePhotoRecord(e,t){return Wf({url:`${Jv}${Xv}/saveProloguePhotoRecord`,method:"post",data:{botId:e,photoIds:t}})}}const Zv=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},eb=Number.isSafeInteger||function(e){return"number"==typeof e&&Math.abs(e)<=tb},tb=Number.MAX_SAFE_INTEGER||9007199254740991;let ib=function(e){return e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError",e}({}),rb=function(e){return e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",e.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",e.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",e.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",e.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",e.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",e.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_PARSING_ERROR="levelParsingError",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.FRAG_GAP="fragGap",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.ASSET_LIST_LOAD_ERROR="assetListLoadError",e.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",e.ASSET_LIST_PARSING_ERROR="assetListParsingError",e.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.ATTACH_MEDIA_ERROR="attachMediaError",e.UNKNOWN="unknown",e}({}),ab=function(e){return e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.MEDIA_ENDED="hlsMediaEnded",e.STALL_RESOLVED="hlsStallResolved",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFERED_TO_END="hlsBufferedToEnd",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached",e.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",e.ASSET_LIST_LOADING="hlsAssetListLoading",e.ASSET_LIST_LOADED="hlsAssetListLoaded",e.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",e.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",e.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",e.INTERSTITIAL_STARTED="hlsInterstitialStarted",e.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",e.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",e.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",e.INTERSTITIAL_ENDED="hlsInterstitialEnded",e.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",e.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",e.EVENT_CUE_ENTER="hlsEventCueEnter",e}({});var nb="manifest",sb="level",ob="audioTrack",lb="subtitleTrack",cb="main",db="audio",ub="subtitle";class hb{constructor(e,t=0,i=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=i}sample(e,t){const i=Math.pow(this.alpha_,e);this.estimate_=t*(1-i)+i*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class pb{constructor(e,t,i,r=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new hb(e),this.fast_=new hb(t),this.defaultTTFB_=r,this.ttfb_=new hb(e)}update(e,t){const{slow_:i,fast_:r,ttfb_:a}=this;i.halfLife!==e&&(this.slow_=new hb(e,i.getEstimate(),i.getTotalWeight())),r.halfLife!==t&&(this.fast_=new hb(t,r.getEstimate(),r.getTotalWeight())),a.halfLife!==e&&(this.ttfb_=new hb(e,a.getEstimate(),a.getTotalWeight()))}sample(e,t){const i=(e=Math.max(e,this.minDelayMs_))/1e3,r=8*t/i;this.fast_.sample(i,r),this.slow_.sample(i,r)}sampleTTFB(e){const t=e/1e3,i=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(i,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function mb(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function fb(){return fb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},fb.apply(null,arguments)}function gb(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,r)}return i}function yb(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?gb(Object(i),!0).forEach(function(t){mb(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):gb(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}class vb{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const i=`[${e}]:`;this.trace=bb,this.debug=t.debug.bind(null,i),this.log=t.log.bind(null,i),this.warn=t.warn.bind(null,i),this.info=t.info.bind(null,i),this.error=t.error.bind(null,i)}}const bb=function(){},wb={trace:bb,debug:bb,log:bb,warn:bb,info:bb,error:bb};function Sb(){return fb({},wb)}function kb(e,t,i){return t[e]?t[e].bind(t):function(e,t){const i=self.console[e];return i?i.bind(self.console,`${t?"["+t+"] ":""}[${e}] >`):bb}(e,i)}const Tb=Sb();const Eb=Tb;function Ab(e=!0){if("undefined"==typeof self)return;return(e||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Cb(e,t){const i=Object.keys(e),r=Object.keys(t),a=i.length,n=r.length;return!a||!n||a===n&&!i.some(e=>-1===r.indexOf(e))}function Ib(e,t=!1){if("undefined"!=typeof TextDecoder){const i=new TextDecoder("utf-8").decode(e);if(t){const e=i.indexOf("\0");return-1!==e?i.substring(0,e):i}return i.replace(/\0/g,"")}const i=e.length;let r,a,n,s="",o=0;for(;o<i;){if(r=e[o++],0===r&&t)return s;if(0!==r&&3!==r)switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(r);break;case 12:case 13:a=e[o++],s+=String.fromCharCode((31&r)<<6|63&a);break;case 14:a=e[o++],n=e[o++],s+=String.fromCharCode((15&r)<<12|(63&a)<<6|63&n)}}return s}function Pb(e){let t="";for(let i=0;i<e.length;i++){let r=e[i].toString(16);r.length<2&&(r="0"+r),t+=r}return t}function _b(e){return Uint8Array.from(e.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function Rb(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xb,Lb={exports:{}};var Db,Mb,Ob,Nb,Fb,Ub=xb?Lb.exports:(xb=1,Db=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,Mb=/^(?=([^\/?#]*))\1([^]*)$/,Ob=/(?:\/|^)\.(?=\/)/g,Nb=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,Lb.exports=Fb={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var r=Fb.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=Fb.normalizePath(r.path),Fb.buildURLFromParts(r)}var a=Fb.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return i.alwaysNormalize?(a.path=Fb.normalizePath(a.path),Fb.buildURLFromParts(a)):t;var n=Fb.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");if(!n.netLoc&&n.path&&"/"!==n.path[0]){var s=Mb.exec(n.path);n.netLoc=s[1],n.path=s[2]}n.netLoc&&!n.path&&(n.path="/");var o={scheme:n.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(o.netLoc=n.netLoc,"/"!==a.path[0]))if(a.path){var l=n.path,c=l.substring(0,l.lastIndexOf("/")+1)+a.path;o.path=Fb.normalizePath(c)}else o.path=n.path,a.params||(o.params=n.params,a.query||(o.query=n.query));return null===o.path&&(o.path=i.alwaysNormalize?Fb.normalizePath(a.path):a.path),Fb.buildURLFromParts(o)},parseURL:function(e){var t=Db.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(Ob,"");e.length!==(e=e.replace(Nb,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}});class Bb{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var zb="audio",jb="video",$b="audiovideo";class Gb{constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,"string"==typeof e&&(e={url:e}),this.base=e,function(e,t){const i=Wb(e,t);i&&(i.enumerable=!0,Object.defineProperty(e,t,i))}(this,"stats")}setByteRange(e,t){const i=e.split("@",2);let r;r=1===i.length?(null==t?void 0:t.byteRangeEndOffset)||0:parseInt(i[1]),this._byteRange=[r,parseInt(i[0])+r]}get baseurl(){return this.base.url}get byteRange(){return null===this._byteRange?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return null===this._streams&&(this._streams={[zb]:null,[jb]:null,[$b]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return null!==this._stats}get hasStreams(){return null!==this._streams}get stats(){return null===this._stats&&(this._stats=new Bb),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Ub.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[zb]=null,e[jb]=null,e[$b]=null}}function qb(e){return"initSegment"!==e.sn}class Hb extends Gb{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange.length){const e=this.byteRange[0],t=this.byteRange[1];if(Zv(e)&&Zv(t))return t-e}return null}get bitrate(){return this.byteLength?8*this.byteLength/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){var e;const{levelkeys:t}=this;if(!t||t.NONE)return null;if(t.identity)this._decryptdata||(this._decryptdata=t.identity.getDecryptData(this.sn));else if(null==(e=this._decryptdata)||!e.keyId){const e=Object.keys(t);if(1===e.length){const i=this._decryptdata=t[e[0]]||null;i&&(this._decryptdata=i.getDecryptData(this.sn,t))}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(null===this.programDateTime)return null;const e=Zv(this.duration)?this.duration:0;return this.programDateTime+1e3*e}get encrypted(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){var t;const e=Object.keys(this.levelkeys),i=e.length;if(i>1||1===i&&null!=(t=this.levelkeys[e[0]])&&t.encrypted)return!0}return!1}get programDateTime(){return null===this._programDateTime&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){Zv(e)?this._programDateTime=e:this._programDateTime=this.rawProgramDateTime=null}get ref(){return qb(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){const t=this.levelkeys;if(t){var i;const r=t[e];!r||null!=(i=this._decryptdata)&&i.keyId||(this._decryptdata=r.getDecryptData(this.sn,t))}}abortRequests(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()}setElementaryStreamInfo(e,t,i,r,a,n=!1){const{elementaryStreams:s}=this,o=s[e];o?(o.startPTS=Math.min(o.startPTS,t),o.endPTS=Math.max(o.endPTS,i),o.startDTS=Math.min(o.startDTS,r),o.endDTS=Math.max(o.endDTS,a)):s[e]={startPTS:t,endPTS:i,startDTS:r,endDTS:a,partial:n}}}class Vb extends Gb{constructor(e,t,i,r,a){super(i),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=r;const n=e.enumeratedString("BYTERANGE");n&&this.setByteRange(n,a),a&&(this.fragOffset=a.fragOffset+a.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function Wb(e,t){const i=Object.getPrototypeOf(e);if(i){const e=Object.getOwnPropertyDescriptor(i,t);return e||Wb(i,t)}}const Kb=Math.pow(2,32)-1,Yb=[].push,Jb={video:1,audio:2,id3:3,text:4};function Xb(e){return String.fromCharCode.apply(null,e)}function Qb(e,t){const i=e[t]<<8|e[t+1];return i<0?65536+i:i}function Zb(e,t){const i=tw(e,t);return i<0?4294967296+i:i}function ew(e,t){let i=Zb(e,t);return i*=Math.pow(2,32),i+=Zb(e,t+4),i}function tw(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function iw(e,t){const i=[];if(!t.length)return i;const r=e.byteLength;for(let a=0;a<r;){const n=Zb(e,a),s=n>1?a+n:r;if(Xb(e.subarray(a+4,a+8))===t[0])if(1===t.length)i.push(e.subarray(a+8,s));else{const r=iw(e.subarray(a+8,s),t.slice(1));r.length&&Yb.apply(i,r)}a=s}return i}function rw(e){const t=[],i=e[0];let r=8;const a=Zb(e,r);r+=4;let n=0,s=0;0===i?(n=Zb(e,r),s=Zb(e,r+4),r+=8):(n=ew(e,r),s=ew(e,r+8),r+=16),r+=2;let o=e.length+s;const l=Qb(e,r);r+=2;for(let c=0;c<l;c++){let i=r;const n=Zb(e,i);i+=4;const s=2147483647&n;if(1===(2147483648&n)>>>31)return Eb.warn("SIDX has hierarchical references (not supported)"),null;const l=Zb(e,i);i+=4,t.push({referenceSize:s,subsegmentDuration:l,info:{duration:l/a,start:o,end:o+s-1}}),o+=s,i+=4,r=i}return{earliestPresentationTime:n,timescale:a,version:i,referencesCount:l,references:t}}function aw(e){const t=[],i=iw(e,["moov","trak"]);for(let r=0;r<i.length;r++){const e=i[r],a=iw(e,["tkhd"])[0];if(a){let i=a[0];const r=Zb(a,0===i?12:20),n=iw(e,["mdia","mdhd"])[0];if(n){i=n[0];const a=Zb(n,0===i?12:20),s=iw(e,["mdia","hdlr"])[0];if(s){const i=Xb(s.subarray(8,12)),n={soun:zb,vide:jb}[i],o=nw(iw(e,["mdia","minf","stbl","stsd"])[0]);n?(t[r]={timescale:a,type:n,stsd:o},t[n]=yb({timescale:a,id:r},o)):t[r]={timescale:a,type:i,stsd:o}}}}}return iw(e,["moov","mvex","trex"]).forEach(e=>{const i=Zb(e,4),r=t[i];r&&(r.default={duration:Zb(e,12),flags:Zb(e,20)})}),t}function nw(e){const t=e.subarray(8),i=t.subarray(86),r=Xb(t.subarray(4,8));let a,n=r;const s="enca"===r||"encv"===r;if(s){const e=iw(t,[r])[0];iw(e.subarray("enca"===r?28:78),["sinf"]).forEach(e=>{const t=iw(e,["schm"])[0];if(t){const i=Xb(t.subarray(4,8));if("cbcs"===i||"cenc"===i){const t=iw(e,["frma"])[0];t&&(n=Xb(t))}}})}const o=n;switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const e=iw(i,["avcC"])[0];e&&e.length>3&&(n+="."+lw(e[1])+lw(e[2])+lw(e[3]),a=sw("avc1"===o?"dva1":"dvav",i));break}case"mp4a":{const e=iw(t,[r])[0],i=iw(e.subarray(28),["esds"])[0];if(i&&i.length>7){let e=4;if(3!==i[e++])break;e=ow(i,e),e+=2;const t=i[e++];if(128&t&&(e+=2),64&t&&(e+=i[e++]),4!==i[e++])break;e=ow(i,e);const r=i[e++];if(64!==r)break;if(n+="."+lw(r),e+=12,5!==i[e++])break;e=ow(i,e);const a=i[e++];let s=(248&a)>>3;31===s&&(s+=1+((7&a)<<3)+((224&i[e])>>5)),n+="."+s}break}case"hvc1":case"hev1":{const e=iw(i,["hvcC"])[0];if(e&&e.length>12){const t=e[1],i=["","A","B","C"][t>>6],r=31&t,a=Zb(e,2),s=(32&t)>>5?"H":"L",o=e[12],l=e.subarray(6,12);n+="."+i+r,n+="."+function(e){let t=0;for(let i=0;i<32;i++)t|=(e>>i&1)<<31-i;return t>>>0}(a).toString(16).toUpperCase(),n+="."+s+o;let c="";for(let e=l.length;e--;){const t=l[e];if(t||c){c="."+t.toString(16).toUpperCase()+c}}n+=c}a=sw("hev1"==o?"dvhe":"dvh1",i);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":n=sw(n,i)||n;break;case"vp09":{const e=iw(i,["vpcC"])[0];if(e&&e.length>6){const t=e[4],i=e[5],r=e[6]>>4&15;n+="."+cw(t)+"."+cw(i)+"."+cw(r)}break}case"av01":{const e=iw(i,["av1C"])[0];if(e&&e.length>2){const t=e[1]>>>5,r=31&e[1],s=e[2]>>>7?"H":"M",o=(64&e[2])>>6,l=(32&e[2])>>5,c=2===t&&o?l?12:10:o?10:8,d=(16&e[2])>>4,u=(8&e[2])>>3,h=(4&e[2])>>2,p=3&e[2],m=1,f=1,g=1,y=0;n+="."+t+"."+cw(r)+s+"."+cw(c)+"."+d+"."+u+h+p+"."+cw(m)+"."+cw(f)+"."+cw(g)+"."+y,a=sw("dav1",i)}break}}return{codec:n,encrypted:s,supplemental:a}}function sw(e,t){const i=iw(t,["dvvC"]),r=i.length?i[0]:iw(t,["dvcC"])[0];if(r){const t=r[2]>>1&127,i=r[2]<<5&32|r[3]>>3&31;return e+"."+cw(t)+"."+cw(i)}}function ow(e,t){const i=t+5;for(;128&e[t++]&&t<i;);return t}function lw(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}function cw(e){return(e<10?"0":"")+e}function dw(e,t){iw(e,["moov","trak"]).forEach(e=>{const i=iw(e,["mdia","minf","stbl","stsd"])[0];if(!i)return;const r=i.subarray(8);let a=iw(r,["enca"]);const n=a.length>0;n||(a=iw(r,["encv"])),a.forEach(e=>{iw(n?e.subarray(28):e.subarray(78),["sinf"]).forEach(e=>{const i=uw(e);i&&t(i,n)})})})}function uw(e){const t=iw(e,["schm"])[0];if(t){const i=Xb(t.subarray(4,8));if("cbcs"===i||"cenc"===i){const t=iw(e,["schi","tenc"])[0];if(t)return t}}}function hw(e,t){const i=new Uint8Array(e.length+t.length);return i.set(e),i.set(t,e.length),i}function pw(e,t){const i=[],r=t.samples,a=t.timescale,n=t.id;let s=!1;return iw(r,["moof"]).map(o=>{const l=o.byteOffset-8;iw(o,["traf"]).map(o=>{const c=iw(o,["tfdt"]).map(e=>{const t=e[0];let i=Zb(e,4);return 1===t&&(i*=Math.pow(2,32),i+=Zb(e,8)),i/a})[0];return void 0!==c&&(e=c),iw(o,["tfhd"]).map(c=>{const d=Zb(c,4),u=16777215&Zb(c,0);let h=0;const p=!!(16&u);let m=0;const f=!!(32&u);let g=8;d===n&&(!!(1&u)&&(g+=8),!!(2&u)&&(g+=4),!!(8&u)&&(h=Zb(c,g),g+=4),p&&(m=Zb(c,g),g+=4),f&&(g+=4),"video"===t.type&&(s=mw(t.codec)),iw(o,["trun"]).map(n=>{const o=n[0],c=16777215&Zb(n,0),d=!!(1&c);let u=0;const p=!!(4&c),f=!!(256&c);let g=0;const y=!!(512&c);let v=0;const b=!!(1024&c),w=!!(2048&c);let S=0;const k=Zb(n,4);let T=8;d&&(u=Zb(n,T),T+=4),p&&(T+=4);let E=u+l;for(let l=0;l<k;l++){if(f?(g=Zb(n,T),T+=4):g=h,y?(v=Zb(n,T),T+=4):v=m,b&&(T+=4),w&&(S=0===o?Zb(n,T):tw(n,T),T+=4),t.type===jb){let t=0;for(;t<v;){const n=Zb(r,E);if(E+=4,fw(s,r[E])){gw(r.subarray(E,E+n),s?2:1,e+S/a,i)}E+=n,t+=n+4}}e+=g/a}}))})})}),i}function mw(e){if(!e)return!1;const t=e.substring(0,4);return"hvc1"===t||"hev1"===t||"dvh1"===t||"dvhe"===t}function fw(e,t){if(e){const e=t>>1&63;return 39===e||40===e}return 6===(31&t)}function gw(e,t,i,r){const a=yw(e);let n=0;n+=t;let s=0,o=0,l=0;for(;n<a.length;){s=0;do{if(n>=a.length)break;l=a[n++],s+=l}while(255===l);o=0;do{if(n>=a.length)break;l=a[n++],o+=l}while(255===l);const e=a.length-n;let t=n;if(o<e)n+=o;else if(o>e){Eb.error(`Malformed SEI payload. ${o} is too small, only ${e} bytes left to parse.`);break}if(4===s){if(181===a[t++]){const e=Qb(a,t);if(t+=2,49===e){const e=Zb(a,t);if(t+=4,1195456820===e){const e=a[t++];if(3===e){const n=a[t++],o=64&n,l=o?2+3*(31&n):0,c=new Uint8Array(l);if(o){c[0]=n;for(let e=1;e<l;e++)c[e]=a[t++]}r.push({type:e,payloadType:s,pts:i,bytes:c})}}}}}else if(5===s&&o>16){const e=[];for(let i=0;i<16;i++){const r=a[t++].toString(16);e.push(1==r.length?"0"+r:r),3!==i&&5!==i&&7!==i&&9!==i||e.push("-")}const n=o-16,l=new Uint8Array(n);for(let i=0;i<n;i++)l[i]=a[t++];r.push({payloadType:s,pts:i,uuid:e.join(""),userData:Ib(l),userDataBytes:l})}}}function yw(e){const t=e.byteLength,i=[];let r=1;for(;r<t-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(i.push(r+2),r+=2):r++;if(0===i.length)return e;const a=t-i.length,n=new Uint8Array(a);let s=0;for(r=0;r<a;s++,r++)s===i[0]&&(s++,i.shift()),n[r]=e[s];return n}function vw(e,t,i){if(16!==e.byteLength)throw new RangeError("Invalid system id");let r,a,n;r=0,a=new Uint8Array,n=new Uint8Array;const s=new Uint8Array(4);return i.byteLength>0&&new DataView(s.buffer).setUint32(0,i.byteLength,!1),function(e,...t){const i=t.length;let r=8,a=i;for(;a--;)r+=t[a].byteLength;const n=new Uint8Array(r);for(n[0]=r>>24&255,n[1]=r>>16&255,n[2]=r>>8&255,n[3]=255&r,n.set(e,4),a=0,r=8;a<i;a++)n.set(t[a],r),r+=t[a].byteLength;return n}([112,115,115,104],new Uint8Array([0,0,0,0]),e,n,a,s,i)}function bw(e){const t=e.getUint32(0),i=e.byteOffset,r=e.byteLength;if(r<t)return{offset:i,size:r};if(1886614376!==e.getUint32(4))return{offset:i,size:t};const a=e.getUint32(8)>>>24;if(0!==a&&1!==a)return{offset:i,size:t};const n=e.buffer,s=Pb(new Uint8Array(n,i+12,16));let o=null,l=null,c=0;if(0===a)c=28;else{const a=e.getUint32(28);if(!a||r<32+16*a)return{offset:i,size:t};o=[];for(let e=0;e<a;e++)o.push(new Uint8Array(n,i+32+16*e,16));c=32+16*a}if(!c)return{offset:i,size:t};const d=e.getUint32(c);return t-32<d?{offset:i,size:t}:(l=new Uint8Array(n,i+c+4,d),{version:a,systemId:s,kids:o,data:l,offset:i,size:t})}const ww=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),Sw={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function kw(e,t){const i=Sw[t];return!!i&&!!i[e.slice(0,4)]}function Tw(e,t,i=!0){return!e.split(",").some(e=>!Ew(e,t,i))}function Ew(e,t,i=!0){var r;const a=Ab(i);return null!=(r=null==a?void 0:a.isTypeSupported(Aw(e,t)))&&r}function Aw(e,t){return`${t}/mp4;codecs=${e}`}function Cw(e){if(e){const t=e.substring(0,4);return Sw.video[t]}return 2}function Iw(e){const t=ww();return e.split(",").reduce((e,i)=>{const r=t&&mw(i)?9:Sw.video[i];return r?(2*r+e)/(e?3:2):(Sw.audio[i]+e)/(e?2:1)},0)}const Pw={};const _w=/flac|opus|mp4a\.40\.34/i;function Rw(e,t=!0){return e.replace(_w,e=>function(e,t=!0){if(Pw[e])return Pw[e];const i={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[e];for(let a=0;a<i.length;a++){var r;if(Ew(i[a],"audio",t))return Pw[e]=i[a],i[a];if("mp3"===i[a]&&null!=(r=Ab(t))&&r.isTypeSupported("audio/mpeg"))return""}return e}(e.toLowerCase(),t))}function xw(e,t){if(e&&(e.length>4||-1!==["ac-3","ec-3","alac","fLaC","Opus"].indexOf(e))&&(Lw(e,"audio")||Lw(e,"video")))return e;if(t){const i=t.split(",");if(i.length>1){if(e)for(let t=i.length;t--;)if(i[t].substring(0,4)===e.substring(0,4))return i[t];return i[0]}}return t||e}function Lw(e,t){return kw(e,t)&&Ew(e,t)}function Dw(e){if(e.startsWith("av01.")){const t=e.split("."),i=["0","111","01","01","01","0"];for(let e=t.length;e>4&&e<10;e++)t[e]=i[e-4];return t.join(".")}return e}function Mw(e){const t=Ab(e)||{isTypeSupported:()=>!1};return{mpeg:t.isTypeSupported("audio/mpeg"),mp3:t.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:t.isTypeSupported('audio/mp4; codecs="ac-3"')}}function Ow(e){return e.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const Nw={supported:!1,smooth:!1,powerEfficient:!1},Fw={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function Uw(e,t){return{supported:!1,configurations:t,decodingInfoResults:[Nw],error:e}}function Bw(e,t,i,r,a,n){const s=e.videoCodec,o=e.audioCodec?e.audioGroups:null,l=null==n?void 0:n.audioCodec,c=null==n?void 0:n.channels,d=c?parseInt(c):l?Infinity:2;let u=null;if(null!=o&&o.length)try{u=1===o.length&&o[0]?t.groups[o[0]].channels:o.reduce((e,i)=>{if(i){const r=t.groups[i];if(!r)throw new Error(`Audio track group ${i} not found`);Object.keys(r.channels).forEach(t=>{e[t]=(e[t]||0)+r.channels[t]})}return e},{2:0})}catch(h){return!0}return void 0!==s&&(s.split(",").some(e=>mw(e))||e.width>1920&&e.height>1088||e.height>1920&&e.width>1088||e.frameRate>Math.max(r,30)||"SDR"!==e.videoRange&&e.videoRange!==i||e.bitrate>Math.max(a,8e6))||!!u&&Zv(d)&&Object.keys(u).some(e=>parseInt(e)>d)}function zw(e,t,i,r={}){const a=e.videoCodec;if(!a&&!e.audioCodec||!i)return Promise.resolve(Fw);const n=[],s=function(e){var t;const i=null==(t=e.videoCodec)?void 0:t.split(","),r=$w(e),a=e.width||640,n=e.height||480,s=e.frameRate||30,o=e.videoRange.toLowerCase();return i?i.map(e=>{const t={contentType:Aw(Dw(e),"video"),width:a,height:n,bitrate:r,framerate:s};return"sdr"!==o&&(t.transferFunction=o),t}):[]}(e),o=s.length,l=function(e,t,i){var r;const a=null==(r=e.audioCodec)?void 0:r.split(","),n=$w(e);if(a&&e.audioGroups)return e.audioGroups.reduce((e,r)=>{var s;const o=r?null==(s=t.groups[r])?void 0:s.tracks:null;return o?o.reduce((e,t)=>{if(t.groupId===r){const r=parseFloat(t.channels||"");a.forEach(t=>{const a={contentType:Aw(t,"audio"),bitrate:i?jw(t,n):n};r&&(a.channels=""+r),e.push(a)})}return e},e):e},[]);return[]}(e,t,o>0),c=l.length;for(let d=o||1*c||1;d--;){const e={type:"media-source"};if(o&&(e.video=s[d%o]),c){e.audio=l[d%c];const t=e.audio.bitrate;e.video&&t&&(e.video.bitrate-=t)}n.push(e)}if(a){const e=navigator.userAgent;if(a.split(",").some(e=>mw(e))&&ww())return Promise.resolve(Uw(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${e})`),n))}return Promise.all(n.map(e=>{const t=function(e){let t="";const{audio:i,video:r}=e;if(r){t+=`${Ow(r.contentType)}_r${r.height}x${r.width}f${Math.ceil(r.framerate)}${r.transferFunction||"sd"}_${Math.ceil(r.bitrate/1e5)}`}if(i){t+=`${r?"_":""}${Ow(i.contentType)}_c${i.channels}`}return t}(e);return r[t]||(r[t]=i.decodingInfo(e))})).then(e=>({supported:!e.some(e=>!e.supported),configurations:n,decodingInfoResults:e})).catch(e=>({supported:!1,configurations:n,decodingInfoResults:[],error:e}))}function jw(e,t){if(t<=1)return 1;let i=128e3;return"ec-3"===e?i=768e3:"ac-3"===e&&(i=64e4),Math.min(t/2,i)}function $w(e){return 1e3*Math.ceil(Math.max(.9*e.bitrate,e.averageBitrate)/1e3)||1}const Gw=["NONE","TYPE-0","TYPE-1",null];const qw=["SDR","PQ","HLG"];var Hw="",Vw="YES",Ww="v2";function Kw(e){const{canSkipUntil:t,canSkipDateRanges:i,age:r}=e;return t&&r<t/2?i?Ww:Vw:Hw}class Yw{constructor(e,t,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=i}addDirectives(e){const t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Jw{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(e=>!!e).map(e=>e.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const i=null==(t=e.supplemental)?void 0:t.videoCodec;i&&i!==e.videoCodec&&(this.codecSet+=`,${i.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return Xw(this._audioGroups,e)}hasSubtitleGroup(e){return Xw(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t)if("audio"===e){let e=this._audioGroups;e||(e=this._audioGroups=[]),-1===e.indexOf(t)&&e.push(t)}else if("text"===e){let e=this._subtitleGroups;e||(e=this._subtitleGroups=[]),-1===e.indexOf(t)&&e.push(t)}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return null==(e=this.audioGroups)?void 0:e[0]}get textGroupId(){var e;return null==(e=this.subtitleGroups)?void 0:e[0]}addFallback(){}}function Xw(e,t){return!(!t||!e)&&-1!==e.indexOf(t)}function Qw(e,t){let i=!1,r=[];if(e&&(i="SDR"!==e,r=[e]),t){r=t.allowedVideoRanges||qw.slice(0);const e="SDR"!==r.join("")&&!t.videoCodec;i=void 0!==t.preferHDR?t.preferHDR:e&&function(){if("function"==typeof matchMedia){const e=matchMedia("(dynamic-range: high)"),t=matchMedia("bad query");if(e.media!==t.media)return!0===e.matches}return!1}(),i||(r=["SDR"])}return{preferHDR:i,allowedVideoRanges:r}}const Zw=(e,t)=>JSON.stringify(e,(e=>{const t=new WeakSet;return(i,r)=>{if(e&&(r=e(i,r)),"object"==typeof r&&null!==r){if(t.has(r))return;t.add(r)}return r}})(t));function eS(e,t){Eb.log(`[abr] start candidates with "${e}" ignored because ${t}`)}function tS(e){return e.reduce((e,t)=>{let i=e.groups[t.groupId];i||(i=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),i.tracks.push(t);const r=t.channels||"2";return i.channels[r]=(i.channels[r]||0)+1,i.hasDefault=i.hasDefault||t.default,i.hasAutoSelect=i.hasAutoSelect||t.autoselect,i.hasDefault&&(e.hasDefaultAudio=!0),i.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function iS(e){if(!e)return e;const{lang:t,assocLang:i,characteristics:r,channels:a,audioCodec:n}=e;return{lang:t,assocLang:i,characteristics:r,channels:a,audioCodec:n}}function rS(e,t,i){if("attrs"in e){const i=t.indexOf(e);if(-1!==i)return i}for(let r=0;r<t.length;r++){if(aS(e,t[r],i))return r}return-1}function aS(e,t,i){const{groupId:r,name:a,lang:n,assocLang:s,default:o}=e,l=e.forced;return(void 0===r||t.groupId===r)&&(void 0===a||t.name===a)&&(void 0===n||function(e,t="--"){if(e.length===t.length)return e===t;return e.startsWith(t)||t.startsWith(e)}(n,t.lang))&&(void 0===n||t.assocLang===s)&&(void 0===o||t.default===o)&&(void 0===l||t.forced===l)&&(!("characteristics"in e)||function(e,t=""){const i=e.split(","),r=t.split(",");return i.length===r.length&&!i.some(e=>-1===r.indexOf(e))}(e.characteristics||"",t.characteristics))&&(void 0===i||i(e,t))}function nS(e,t){const{audioCodec:i,channels:r}=e;return!(void 0!==i&&(t.audioCodec||"").substring(0,4)!==i.substring(0,4)||void 0!==r&&r!==(t.channels||"2"))}function sS(e,t,i){for(let r=t;r>-1;r--)if(i(e[r]))return r;for(let r=t+1;r<e.length;r++)if(i(e[r]))return r;return-1}function oS(e,t){var i;return!!e&&e!==(null==(i=t.loadLevelObj)?void 0:i.uri)}const lS=function(e,t){let i=0,r=e.length-1,a=null,n=null;for(;i<=r;){a=(i+r)/2|0,n=e[a];const s=t(n);if(s>0)i=a+1;else{if(!(s<0))return n;r=a-1}}return null};function cS(e,t,i=0,r=0,a=.005){let n=null;if(e){n=t[1+e.sn-t[0].sn]||null;const r=e.endDTS-i;r>0&&r<15e-7&&(i+=15e-7),n&&e.level!==n.level&&n.end<=e.end&&(n=t[2+e.sn-t[0].sn]||null)}else 0===i&&0===t[0].start&&(n=t[0]);if(n&&((!e||e.level===n.level)&&0===dS(i,r,n)||function(e,t,i){if(t&&0===t.start&&t.level<e.level&&(t.endPTS||0)>0){const r=t.tagList.reduce((e,t)=>("INF"===t[0]&&(e+=parseFloat(t[1])),e),i);return e.start<=r}return!1}(n,e,Math.min(a,r))))return n;const s=lS(t,dS.bind(null,i,r));return!s||s===e&&n?n:s}function dS(e=0,t=0,i){if(i.start<=e&&i.start+i.duration>e)return 0;const r=Math.min(t,i.duration+(i.deltaPTS?i.deltaPTS:0));return i.start+i.duration-r<=e?1:i.start-r>e&&i.start?-1:0}function uS(e,t,i){const r=1e3*Math.min(t,i.duration+(i.deltaPTS?i.deltaPTS:0));return(i.endProgramDateTime||0)-r>e}function hS(e,t,i){if(e&&e.startCC<=t&&e.endCC>=t){let r=e.fragments;const{fragmentHint:a}=e;let n;return a&&(r=r.concat(a)),lS(r,e=>e.cc<t?1:e.cc>t?-1:(n=e,e.end<=i?1:e.start>i?-1:0)),n||null}return null}function pS(e){switch(e.details){case rb.FRAG_LOAD_TIMEOUT:case rb.KEY_LOAD_TIMEOUT:case rb.LEVEL_LOAD_TIMEOUT:case rb.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function mS(e){return e.details.startsWith("key")}function fS(e){return mS(e)&&!!e.frag&&!e.frag.decryptdata}function gS(e,t){const i=pS(t);return e.default[(i?"timeout":"error")+"Retry"]}function yS(e,t){const i="linear"===e.backoff?1:Math.pow(2,t);return Math.min(i*e.retryDelayMs,e.maxRetryDelayMs)}function vS(e){return yb(yb({},e),{errorRetry:null,timeoutRetry:null})}function bS(e,t,i,r){if(!e)return!1;const a=null==r?void 0:r.code,n=t<e.maxNumRetry&&(function(e){return wS(e)||!!e&&(e<400||e>499)}(a)||!!i);return e.shouldRetry?e.shouldRetry(e,t,i,r,n):n}function wS(e){return 0===e&&!1===navigator.onLine}var SS=0,kS=2,TS=3,ES=5,AS=0,CS=1,IS=2,PS=4;function _S(e){const t={action:SS,flags:AS};return e&&(t.resolved=!0),t}var RS="NOT_LOADED",xS="APPENDING",LS="PARTIAL",DS="OK";class MS{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e&&(e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.BUFFER_APPENDED,this.onBufferAppended,this),e.on(ab.FRAG_BUFFERED,this.onFragBuffered,this),e.on(ab.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.BUFFER_APPENDED,this.onBufferAppended,this),e.off(ab.FRAG_BUFFERED,this.onFragBuffered,this),e.off(ab.FRAG_LOADED,this.onFragLoaded,this))}destroy(){this._unregisterListeners(),this.hls=this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const i=this.activePartLists[t];if(i)for(let r=i.length;r--;){const t=i[r];if(!t)break;if(t.start<=e&&e<=t.end&&t.loaded)return t}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,i){const{fragments:r}=this,a=Object.keys(r);for(let n=a.length;n--;){const s=r[a[n]];if((null==s?void 0:s.body.type)===t&&(!i||s.buffered)){const t=s.body;if(t.start<=e&&e<=t.end)return t}}return null}detectEvictedFragments(e,t,i,r,a){this.timeRanges&&(this.timeRanges[e]=t);const n=(null==r?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach(r=>{const s=this.fragments[r];if(!s)return;if(n>=s.body.sn)return;if(!s.buffered&&(!s.loaded||a))return void(s.body.type===i&&this.removeFragment(s.body));const o=s.range[e];o&&(0!==o.time.length?o.time.some(e=>{const i=!this.isTimeBuffered(e.startPTS,e.endPTS,t);return i&&this.removeFragment(s.body),i}):this.removeFragment(s.body))})}detectPartialFragments(e){const t=this.timeRanges;if(!t||"initSegment"===e.frag.sn)return;const i=e.frag,r=NS(i),a=this.fragments[r];if(!a||a.buffered&&i.gap)return;const n=!i.relurl;Object.keys(t).forEach(r=>{const s=i.elementaryStreams[r];if(!s)return;const o=t[r],l=n||!0===s.partial;a.range[r]=this.getBufferedTimes(i,e.part,l,o)}),a.loaded=null,Object.keys(a.range).length?(this.bufferedEnd(a,i),OS(a)||this.removeParts(i.sn-1,i.type)):this.removeFragment(a.body)}bufferedEnd(e,t){e.buffered=!0;(e.body.endList=t.endList||e.body.endList)&&(this.endListFragments[e.body.type]=e)}removeParts(e,t){const i=this.activePartLists[t];i&&(this.activePartLists[t]=FS(i,t=>t.fragment.sn>=e))}fragBuffered(e,t){const i=NS(e);let r=this.fragments[i];!r&&t&&(r=this.fragments[i]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,this.bufferedEnd(r,e))}getBufferedTimes(e,t,i,r){const a={time:[],partial:i},n=e.start,s=e.end,o=e.minEndPTS||s,l=e.maxStartPTS||n;for(let c=0;c<r.length;c++){const e=r.start(c)-this.bufferPadding,t=r.end(c)+this.bufferPadding;if(l>=e&&o<=t){a.time.push({startPTS:Math.max(n,r.start(c)),endPTS:Math.min(s,r.end(c))});break}if(n<t&&s>e){const e=Math.max(n,r.start(c)),t=Math.min(s,r.end(c));t>e&&(a.partial=!0,a.time.push({startPTS:e,endPTS:t}))}else if(s<=e)break}return a}getPartialFragment(e){let t,i,r,a=null,n=0;const{bufferPadding:s,fragments:o}=this;return Object.keys(o).forEach(l=>{const c=o[l];c&&OS(c)&&(i=c.body.start-s,r=c.body.end+s,e>=i&&e<=r&&(t=Math.min(e-i,r-e),n<=t&&(a=c.body,n=t)))}),a}isEndListAppended(e){const t=this.endListFragments[e];return void 0!==t&&(t.buffered||OS(t))}getState(e){const t=NS(e),i=this.fragments[t];return i?i.buffered?OS(i)?LS:DS:xS:RS}isTimeBuffered(e,t,i){let r,a;for(let n=0;n<i.length;n++){if(r=i.start(n)-this.bufferPadding,a=i.end(n)+this.bufferPadding,e>=r&&t<=a)return!0;if(t<=r)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if("initSegment"===t.frag.sn||t.frag.bitrateTest)return;const i=t.frag,r=t.part?null:t,a=NS(i);this.fragments[a]={body:i,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:i,part:r,timeRanges:a,type:n}=t;if("initSegment"===i.sn)return;const s=i.type;if(r){let e=this.activePartLists[s];e||(this.activePartLists[s]=e=[]),e.push(r)}this.timeRanges=a;const o=a[n];this.detectEvictedFragments(n,o,s,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=NS(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,i=Object.keys(t);if(!e)return i.length>0;for(let r=i.length;r--;){const a=t[i[r]];if((null==a?void 0:a.body.type)===e)return!0}return!1}hasParts(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)}removeFragmentsInRange(e,t,i,r,a){r&&!this.hasGaps||Object.keys(this.fragments).forEach(n=>{const s=this.fragments[n];if(!s)return;const o=s.body;o.type!==i||r&&!o.gap||o.start<t&&o.end>e&&(s.buffered||a)&&this.removeFragment(o)})}removeFragment(e){const t=NS(e);e.clearElementaryStreamInfo();const i=this.activePartLists[e.type];if(i){const t=e.sn;this.activePartLists[e.type]=FS(i,e=>e.fragment.sn!==t)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const t=null==(e=this.hls)||null==(e=e.latestLevelDetails)?void 0:e.partList;t&&t.forEach(e=>e.clearElementaryStreamInfo())}}function OS(e){var t,i,r;return e.buffered&&!!(e.body.gap||null!=(t=e.range.video)&&t.partial||null!=(i=e.range.audio)&&i.partial||null!=(r=e.range.audiovideo)&&r.partial)}function NS(e){return`${e.type}_${e.level}_${e.sn}`}function FS(e,t){return e.filter(e=>{const i=t(e);return i||e.clearElementaryStreamInfo(),i})}var US=0,BS=1;class zS{constructor(e,t,i){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=i}decrypt(e,t){switch(this.aesMode){case US:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case BS:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},t,e);default:throw new Error(`[AESCrypto] invalid aes mode ${this.aesMode}`)}}}class jS{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),i=new Uint32Array(4);for(let r=0;r<4;r++)i[r]=t.getUint32(4*r);return i}initTable(){const e=this.sBox,t=this.invSBox,i=this.subMix,r=i[0],a=i[1],n=i[2],s=i[3],o=this.invSubMix,l=o[0],c=o[1],d=o[2],u=o[3],h=new Uint32Array(256);let p=0,m=0,f=0;for(f=0;f<256;f++)h[f]=f<128?f<<1:f<<1^283;for(f=0;f<256;f++){let i=m^m<<1^m<<2^m<<3^m<<4;i=i>>>8^255&i^99,e[p]=i,t[i]=p;const o=h[p],f=h[o],g=h[f];let y=257*h[i]^16843008*i;r[p]=y<<24|y>>>8,a[p]=y<<16|y>>>16,n[p]=y<<8|y>>>24,s[p]=y,y=16843009*g^65537*f^257*o^16843008*p,l[i]=y<<24|y>>>8,c[i]=y<<16|y>>>16,d[i]=y<<8|y>>>24,u[i]=y,p?(p=o^h[h[h[g^o]]],m^=h[h[m]]):p=m=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let i=!0,r=0;for(;r<t.length&&i;)i=t[r]===this.key[r],r++;if(i)return;this.key=t;const a=this.keySize=t.length;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size="+a);const n=this.ksRows=4*(a+6+1);let s,o;const l=this.keySchedule=new Uint32Array(n),c=this.invKeySchedule=new Uint32Array(n),d=this.sBox,u=this.rcon,h=this.invSubMix,p=h[0],m=h[1],f=h[2],g=h[3];let y,v;for(s=0;s<n;s++)s<a?y=l[s]=t[s]:(v=y,s%a===0?(v=v<<8|v>>>24,v=d[v>>>24]<<24|d[v>>>16&255]<<16|d[v>>>8&255]<<8|d[255&v],v^=u[s/a|0]<<24):a>6&&s%a===4&&(v=d[v>>>24]<<24|d[v>>>16&255]<<16|d[v>>>8&255]<<8|d[255&v]),l[s]=y=(l[s-a]^v)>>>0);for(o=0;o<n;o++)s=n-o,v=3&o?l[s]:l[s-4],c[o]=o<4||s<=4?v:p[d[v>>>24]]^m[d[v>>>16&255]]^f[d[v>>>8&255]]^g[d[255&v]],c[o]=c[o]>>>0}networkToHostOrderSwap(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}decrypt(e,t,i){const r=this.keySize+6,a=this.invKeySchedule,n=this.invSBox,s=this.invSubMix,o=s[0],l=s[1],c=s[2],d=s[3],u=this.uint8ArrayToUint32Array_(i);let h=u[0],p=u[1],m=u[2],f=u[3];const g=new Int32Array(e),y=new Int32Array(g.length);let v,b,w,S,k,T,E,A,C,I,P,_,R,x;const L=this.networkToHostOrderSwap;for(;t<g.length;){for(C=L(g[t]),I=L(g[t+1]),P=L(g[t+2]),_=L(g[t+3]),k=C^a[0],T=_^a[1],E=P^a[2],A=I^a[3],R=4,x=1;x<r;x++)v=o[k>>>24]^l[T>>16&255]^c[E>>8&255]^d[255&A]^a[R],b=o[T>>>24]^l[E>>16&255]^c[A>>8&255]^d[255&k]^a[R+1],w=o[E>>>24]^l[A>>16&255]^c[k>>8&255]^d[255&T]^a[R+2],S=o[A>>>24]^l[k>>16&255]^c[T>>8&255]^d[255&E]^a[R+3],k=v,T=b,E=w,A=S,R+=4;v=n[k>>>24]<<24^n[T>>16&255]<<16^n[E>>8&255]<<8^n[255&A]^a[R],b=n[T>>>24]<<24^n[E>>16&255]<<16^n[A>>8&255]<<8^n[255&k]^a[R+1],w=n[E>>>24]<<24^n[A>>16&255]<<16^n[k>>8&255]<<8^n[255&T]^a[R+2],S=n[A>>>24]<<24^n[k>>16&255]<<16^n[T>>8&255]<<8^n[255&E]^a[R+3],y[t]=L(v^h),y[t+1]=L(S^p),y[t+2]=L(w^m),y[t+3]=L(b^f),h=C,p=I,m=P,f=_,t+=4}return y.buffer}}class $S{constructor(e,t,i){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=i}expandKey(){const e=function(e){switch(e){case US:return"AES-CBC";case BS:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${e}`)}}(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}class GS{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const e=self.crypto;e&&(this.subtle=e.subtle||e.webkitSubtle)}catch(i){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const i=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?function(e){const t=e.byteLength,i=t&&new DataView(e.buffer).getUint8(t-1);return i?e.slice(0,t-i):e}(i):i}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,i,r){return this.useSoftware?new Promise((a,n)=>{const s=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(s,t,i,r);const o=this.flush();o?a(o.buffer):n(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,i,r)}softwareDecrypt(e,t,i,r){const{currentIV:a,currentResult:n,remainderData:s}=this;if(r!==US||16!==t.byteLength)return Eb.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),s&&(e=hw(s,e),this.remainderData=null);const o=this.getValidChunk(e);if(!o.length)return null;a&&(i=a);let l=this.softwareDecrypter;l||(l=this.softwareDecrypter=new jS),l.expandKey(t);const c=n;return this.currentResult=l.decrypt(o.buffer,0,i),this.currentIV=o.slice(-16).buffer,c||null}webCryptoDecrypt(e,t,i,r){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,i,r));this.key=t,this.fastAesKey=new $S(this.subtle,t,r)}return this.fastAesKey.expandKey().then(t=>{if(!this.subtle)return Promise.reject(new Error("web crypto not initialized"));this.logOnce("WebCrypto AES decrypt");return new zS(this.subtle,new Uint8Array(i),r).decrypt(e.buffer,t)}).catch(a=>(Eb.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${a.name}: ${a.message}`),this.onWebCryptoError(e,t,i,r)))}onWebCryptoError(e,t,i,r){const a=this.enableSoftwareAES;if(a){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,i,r);const a=this.flush();if(a)return a.buffer}throw new Error("WebCrypto"+(a?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const i=e.length-e.length%16;return i!==e.length&&(t=e.slice(0,i),this.remainderData=e.slice(i)),t}logOnce(e){this.logEnabled&&(Eb.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const qS=Math.pow(2,17);class HS{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const i=e.url;if(!i)return Promise.reject(new KS({type:ib.NETWORK_ERROR,details:rb.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(i?"part list":"url")),networkDetails:null}));this.abort();const r=this.config,a=r.fLoader,n=r.loader;return new Promise((s,o)=>{if(this.loader&&this.loader.destroy(),e.gap){if(e.tagList.some(e=>"GAP"===e[0]))return void o(WS(e));e.gap=!1}const l=this.loader=a?new a(r):new n(r),c=VS(e);e.loader=l;const d=vS(r.fragLoadPolicy.default),u={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?Infinity:qS};e.stats=l.stats;const h={onSuccess:(t,i,r,a)=>{this.resetLoader(e,l);let n=t.data;r.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(n.slice(0,16)),n=n.slice(16)),s({frag:e,part:null,payload:n,networkDetails:a})},onError:(t,r,a,n)=>{this.resetLoader(e,l),o(new KS({type:ib.NETWORK_ERROR,details:rb.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:yb({url:i,data:void 0},t),error:new Error(`HTTP Error ${t.code} ${t.text}`),networkDetails:a,stats:n}))},onAbort:(t,i,r)=>{this.resetLoader(e,l),o(new KS({type:ib.NETWORK_ERROR,details:rb.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:r,stats:t}))},onTimeout:(t,i,r)=>{this.resetLoader(e,l),o(new KS({type:ib.NETWORK_ERROR,details:rb.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${u.timeout}ms`),networkDetails:r,stats:t}))}};t&&(h.onProgress=(i,r,a,n)=>t({frag:e,part:null,payload:a,networkDetails:n})),l.load(c,u,h)})}loadPart(e,t,i){this.abort();const r=this.config,a=r.fLoader,n=r.loader;return new Promise((s,o)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap)return void o(WS(e,t));const l=this.loader=a?new a(r):new n(r),c=VS(e,t);e.loader=l;const d=vS(r.fragLoadPolicy.default),u={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:qS};t.stats=l.stats,l.load(c,u,{onSuccess:(r,a,n,o)=>{this.resetLoader(e,l),this.updateStatsFromPart(e,t);const c={frag:e,part:t,payload:r.data,networkDetails:o};i(c),s(c)},onError:(i,r,a,n)=>{this.resetLoader(e,l),o(new KS({type:ib.NETWORK_ERROR,details:rb.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:yb({url:c.url,data:void 0},i),error:new Error(`HTTP Error ${i.code} ${i.text}`),networkDetails:a,stats:n}))},onAbort:(i,r,a)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,l),o(new KS({type:ib.NETWORK_ERROR,details:rb.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:a,stats:i}))},onTimeout:(i,r,a)=>{this.resetLoader(e,l),o(new KS({type:ib.NETWORK_ERROR,details:rb.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${u.timeout}ms`),networkDetails:a,stats:i}))}})})}updateStatsFromPart(e,t){const i=e.stats,r=t.stats,a=r.total;if(i.loaded+=r.loaded,a){const r=Math.round(e.duration/t.duration),n=Math.min(Math.round(i.loaded/a),r),s=(r-n)*Math.round(i.loaded/n);i.total=i.loaded+s}else i.total=Math.max(i.loaded,i.total);const n=i.loading,s=r.loading;n.start?n.first+=s.first-s.start:(n.start=s.start,n.first=s.first),n.end=s.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function VS(e,t=null){const i=t||e,r={frag:e,part:t,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},a=i.byteRangeStartOffset,n=i.byteRangeEndOffset;if(Zv(a)&&Zv(n)){var s;let t=a,i=n;if("initSegment"===e.sn&&("AES-128"===(o=null==(s=e.decryptdata)?void 0:s.method)||"AES-256"===o)){const e=n-a;e%16&&(i=n+(16-e%16)),0!==a&&(r.resetIV=!0,t=a-16)}r.rangeStart=t,r.rangeEnd=i}var o;return r}function WS(e,t){const i=new Error(`GAP ${e.gap?"tag":"attribute"} found`),r={type:ib.MEDIA_ERROR,details:rb.FRAG_GAP,fatal:!1,frag:e,error:i,networkDetails:null};return t&&(r.part=t),(t||e).stats.aborted=!0,new KS(r)}class KS extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class YS extends vb{constructor(e,t){super(e,t),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)}clearNextTick(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)}tick(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}class JS{constructor(e,t,i,r=0,a=-1,n=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=i,this.size=r,this.part=a,this.partial=n}}const XS={length:0,start:()=>0,end:()=>0};class QS{static isBuffered(e,t){if(e){const i=QS.getBuffered(e);for(let e=i.length;e--;)if(t>=i.start(e)&&t<=i.end(e))return!0}return!1}static bufferedRanges(e){if(e){const t=QS.getBuffered(e);return QS.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t}static bufferInfo(e,t,i){if(e){const r=QS.bufferedRanges(e);if(r.length)return QS.bufferedInfo(r,t,i)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,i){t=Math.max(0,t),e.length>1&&e.sort((e,t)=>e.start-t.start||t.end-e.end);let r=-1,a=[];if(i)for(let c=0;c<e.length;c++){t>=e[c].start&&t<=e[c].end&&(r=c);const n=a.length;if(n){const t=a[n-1].end;e[c].start-t<i?e[c].end>t&&(a[n-1].end=e[c].end):a.push(e[c])}else a.push(e[c])}else a=e;let n,s=0,o=t,l=t;for(let c=0;c<a.length;c++){const e=a[c].start,d=a[c].end;if(-1===r&&t>=e&&t<=d&&(r=c),t+i>=e&&t<d)o=e,l=d,s=l-t;else if(t+i<e){n=e;break}}return{len:s,start:o||0,end:l||0,nextStart:n,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||XS}catch(t){return Eb.log("failed to get media.buffered",t),XS}}}const ZS=/\{\$([a-zA-Z0-9-_]+)\}/g;function ek(e){return ZS.test(e)}function tk(e,t){if(null!==e.variableList||e.hasVariableRefs){const i=e.variableList;return t.replace(ZS,t=>{const r=t.substring(2,t.length-1),a=null==i?void 0:i[r];return void 0===a?(e.playlistParsingError||(e.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${r}"`)),t):a})}return t}function ik(e,t,i){let r,a,n=e.variableList;if(n||(e.variableList=n={}),"QUERYPARAM"in t){r=t.QUERYPARAM;try{const e=new self.URL(i).searchParams;if(!e.has(r))throw new Error(`"${r}" does not match any query parameter in URI: "${i}"`);a=e.get(r)}catch(s){e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${s.message}`))}}else r=t.NAME,a=t.VALUE;r in n?e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${r}"`)):n[r]=a||""}function rk(e,t,i){const r=t.IMPORT;if(i&&r in i){let t=e.variableList;t||(e.variableList=t={}),t[r]=i[r]}else e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${r}"`))}const ak=/^(\d+)x(\d+)$/,nk=/(.+?)=(".*?"|.*?)(?:,|$)/g;class sk{constructor(e,t){"string"==typeof e&&(e=sk.parseAttrList(e,t)),fb(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>"X-"===e.substring(0,2))}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?Infinity:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;const i=new Uint8Array(t.length/2);for(let e=0;e<t.length/2;e++)i[e]=parseInt(t.slice(2*e,2*e+2),16);return i}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?Infinity:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const i=this[e];return i?parseFloat(i):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const i=this[e];return(i?i.split(/[ ,]+/):[]).reduce((e,t)=>(e[t.toLowerCase()]=!0,e),t)}bool(e){return"YES"===this[e]}decimalResolution(e){const t=ak.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let i;const r={};for(nk.lastIndex=0;null!==(i=nk.exec(e));){const a=i[1].trim();let n=i[2];const s=0===n.indexOf('"')&&n.lastIndexOf('"')===n.length-1;let o=!1;if(s)n=n.slice(1,-1);else switch(a){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":o=!0}if(t&&(s||o))n=tk(t,n);else if(!o&&!s)switch(a){case"CLOSED-CAPTIONS":if("NONE"===n)break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":Eb.warn(`${e}: attribute ${a} is missing quotes`)}r[a]=n}return r}}function ok(e){return"ID"!==e&&"CLASS"!==e&&"CUE"!==e&&"START-DATE"!==e&&"DURATION"!==e&&"END-DATE"!==e&&"END-ON-NEXT"!==e}function lk(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e||"SCTE35-CMD"===e}class ck{constructor(e,t,i=0){var r;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(null==t?void 0:t.tagAnchor)||null,this.tagOrder=null!=(r=null==t?void 0:t.tagOrder)?r:i,t){const i=t.attr;for(const t in i)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==i[t]){Eb.warn(`DATERANGE tag attribute: "${t}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=t;break}e=fb(new sk({}),i,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const e=(null==t?void 0:t.endDate)||new Date(this.attr["END-DATE"]);Zv(e.getTime())&&(this._endDate=e)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return void 0===e?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return null===e||null===e.programDateTime?(Eb.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return null!==t?this._dateAtEnd=new Date(this._startDate.getTime()+1e3*t):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(Zv(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return"com.apple.hls.interstitial"===this.class}get isValid(){return!!this.id&&!this._badValueForSameId&&Zv(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}class dk{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e)return this.advanced=!0,void(this.updated=!0);const t=this.lastPartSn-e.lastPartSn,i=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!i||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||0===t&&i>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1}hasKey(e){return this.encryptedFragments.some(t=>{let i=t.decryptdata;return i||(t.setKeyFormat(e.keyFormat),i=t.decryptdata),!!i&&e.matches(i)})}get hasProgramDateTime(){return!!this.fragments.length&&Zv(this.fragments[this.fragments.length-1].programDateTime)}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||10}get drift(){const e=this.driftEndTime-this.driftStartTime;if(e>0){return 1e3*(this.driftEnd-this.driftStart)/e}return 1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){return this.fragments.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){return this.fragments.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(-1!==t){for(let i=e.length;i--;)if(e[i].index>t)return e[i].index;return t}}return 0}get lastPartSn(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function uk(e,t){return e.length===t.length&&!e.some((e,i)=>e!==t[i])}function hk(e,t){return!e&&!t||!(!e||!t)&&uk(e,t)}function pk(e){return"AES-128"===e||"AES-256"===e||"AES-256-CTR"===e}function mk(e){switch(e){case"AES-128":case"AES-256":return US;case"AES-256-CTR":return BS;default:throw new Error(`invalid full segment method ${e}`)}}function fk(e){return Uint8Array.from(atob(e),e=>e.charCodeAt(0))}function gk(e){return Uint8Array.from(unescape(encodeURIComponent(e)),e=>e.charCodeAt(0))}function yk(e){const t=function(e,t,i){const r=e[t];e[t]=e[i],e[i]=r};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}function vk(e){const t=e.split(":");let i=null;if("data"===t[0]&&2===t.length){const e=t[1].split(";"),r=e[e.length-1].split(",");if(2===r.length){const t="base64"===r[0],a=r[1];t?(e.splice(-1,1),i=fk(a)):i=function(e){const t=gk(e).subarray(0,16),i=new Uint8Array(16);return i.set(t,16-t.length),i}(a)}}return i}const bk="undefined"!=typeof self?self:void 0;var wk={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Sk="org.w3.clearkey",kk="com.apple.streamingkeydelivery",Tk="com.microsoft.playready",Ek="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function Ak(e){switch(e){case kk:return wk.FAIRPLAY;case Tk:return wk.PLAYREADY;case Ek:return wk.WIDEVINE;case Sk:return wk.CLEARKEY}}function Ck(e){switch(e){case wk.FAIRPLAY:return kk;case wk.PLAYREADY:return Tk;case wk.WIDEVINE:return Ek;case wk.CLEARKEY:return Sk}}function Ik(e){const{drmSystems:t,widevineLicenseUrl:i}=e,r=t?[wk.FAIRPLAY,wk.WIDEVINE,wk.PLAYREADY,wk.CLEARKEY].filter(e=>!!t[e]):[];return!r[wk.WIDEVINE]&&i&&r.push(wk.WIDEVINE),r}const Pk=null!=bk&&null!=(_k=bk.navigator)&&_k.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;var _k;function Rk(e){const t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),i=String.fromCharCode.apply(null,Array.from(t)),r=i.substring(i.indexOf("<"),i.length),a=(new DOMParser).parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(a){const e=a.childNodes[0]?a.childNodes[0].nodeValue:a.getAttribute("VALUE");if(e){const t=fk(e).subarray(0,16);return yk(t),t}}return null}let xk={};class Lk{static clearKeyUriToKeyIdMap(){xk={}}static setKeyIdForUri(e,t){xk[e]=t}static addKeyIdForUri(e){const t=Object.keys(xk).length%Number.MAX_SAFE_INTEGER,i=new Uint8Array(16);return new DataView(i.buffer,12,4).setUint32(0,t),xk[e]=i,i}constructor(e,t,i,r=[1],a=null,n){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=i,this.keyFormatVersions=r,this.iv=a,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&!pk(e),null!=n&&n.startsWith("0x")&&(this.keyId=new Uint8Array(_b(n)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&uk(e.keyFormatVersions,this.keyFormatVersions)&&hk(e.iv,this.iv)&&hk(e.keyId,this.keyId)}isSupported(){if(this.method){if(pk(this.method)||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case kk:case Ek:case Tk:case Sk:return-1!==["SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1}getDecryptData(e,t){if(!this.encrypted||!this.uri)return null;if(pk(this.method)){let t=this.iv;t||("number"!=typeof e&&(Eb.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0),t=function(e){const t=new Uint8Array(16);for(let i=12;i<16;i++)t[i]=e>>8*(15-i)&255;return t}(e));return new Lk(this.method,this.uri,"identity",this.keyFormatVersions,t)}if(this.keyId){const e=xk[this.uri];if(e&&!uk(this.keyId,e)&&Lk.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}const i=vk(this.uri);if(i)switch(this.keyFormat){case Ek:if(this.pssh=i,!this.keyId){const e=function(e){const t=[];if(e instanceof ArrayBuffer){const i=e.byteLength;let r=0;for(;r+32<i;){const i=bw(new DataView(e,r));t.push(i),r+=i.size}}return t}(i.buffer);if(e.length){var r;const t=e[0];this.keyId=null!=(r=t.kids)&&r.length?t.kids[0]:null}}this.keyId||(this.keyId=Dk(t));break;case Tk:{const e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=vw(e,0,i),this.keyId=Rk(i);break}default:{let e=i.subarray(0,16);if(16!==e.length){const t=new Uint8Array(16);t.set(e,16-e.length),e=t}this.keyId=e;break}}if(!this.keyId||16!==this.keyId.byteLength){let e;e=function(e){const t=null==e?void 0:e[Ek];if(t)return t.keyId;return null}(t),e||(e=Dk(t),e||(e=xk[this.uri])),e&&(this.keyId=e,Lk.setKeyIdForUri(this.uri,e))}return this}}function Dk(e){const t=null==e?void 0:e[Tk];if(t){const e=vk(t.uri);if(e)return Rk(e)}return null}const Mk=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,Ok=/#EXT-X-MEDIA:(.*)/g,Nk=/^#EXT(?:INF|-X-TARGETDURATION):/m,Fk=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),Uk=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class Bk{static findGroup(e,t){for(let i=0;i<e.length;i++){const r=e[i];if(r.id===t)return r}}static resolve(e,t){return Ub.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Nk.test(e)}static parseMasterPlaylist(e,t){const i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:ek(e)},r=[];if(Mk.lastIndex=0,!e.startsWith("#EXTM3U"))return i.playlistParsingError=new Error("no EXTM3U delimiter"),i;let a;for(;null!=(a=Mk.exec(e));)if(a[1]){var n;const e=new sk(a[1],i),s=tk(i,a[2]),o={attrs:e,bitrate:e.decimalInteger("BANDWIDTH")||e.decimalInteger("AVERAGE-BANDWIDTH"),name:e.NAME,url:Bk.resolve(s,t)},l=e.decimalResolution("RESOLUTION");l&&(o.width=l.width,o.height=l.height),qk(e.CODECS,o);const c=e["SUPPLEMENTAL-CODECS"];c&&(o.supplemental={},qk(c,o.supplemental)),null!=(n=o.unknownCodecs)&&n.length||r.push(o),i.levels.push(o)}else if(a[3]){const e=a[3],r=a[4];switch(e){case"SESSION-DATA":{const e=new sk(r,i),t=e["DATA-ID"];t&&(null===i.sessionData&&(i.sessionData={}),i.sessionData[t]=e);break}case"SESSION-KEY":{const e=$k(r,t,i);e.encrypted&&e.isSupported()?(null===i.sessionKeys&&(i.sessionKeys=[]),i.sessionKeys.push(e)):Eb.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${r}"`);break}case"DEFINE":ik(i,new sk(r,i),t);break;case"CONTENT-STEERING":{const e=new sk(r,i);i.contentSteering={uri:Bk.resolve(e["SERVER-URI"],t),pathwayId:e["PATHWAY-ID"]||"."};break}case"START":i.startTimeOffset=Gk(r)}}const s=r.length>0&&r.length<i.levels.length;return i.levels=s?r:i.levels,0===i.levels.length&&(i.playlistParsingError=new Error("no levels found in manifest")),i}static parseMasterPlaylistMedia(e,t,i){let r;const a={},n=i.levels,s={AUDIO:n.map(e=>({id:e.attrs.AUDIO,audioCodec:e.audioCodec})),SUBTITLES:n.map(e=>({id:e.attrs.SUBTITLES,textCodec:e.textCodec})),"CLOSED-CAPTIONS":[]};let o=0;for(Ok.lastIndex=0;null!==(r=Ok.exec(e));){const e=new sk(r[1],i),n=e.TYPE;if(n){const i=s[n],r=a[n]||[];a[n]=r;const l=e.LANGUAGE,c=e["ASSOC-LANGUAGE"],d=e.CHANNELS,u=e.CHARACTERISTICS,h=e["INSTREAM-ID"],p={attrs:e,bitrate:0,id:o++,groupId:e["GROUP-ID"]||"",name:e.NAME||l||"",type:n,default:e.bool("DEFAULT"),autoselect:e.bool("AUTOSELECT"),forced:e.bool("FORCED"),lang:l,url:e.URI?Bk.resolve(e.URI,t):""};if(c&&(p.assocLang=c),d&&(p.channels=d),u&&(p.characteristics=u),h&&(p.instreamId=h),null!=i&&i.length){const e=Bk.findGroup(i,p.groupId)||i[0];Hk(p,e,"audioCodec"),Hk(p,e,"textCodec")}r.push(p)}}return a}static parseLevelPlaylist(e,t,i,r,a,n){var s;const o={url:t},l=new dk(t),c=l.fragments,d=[];let u,h,p,m,f=null,g=0,y=0,v=0,b=0,w=0,S=null,k=new Hb(r,o),T=-1,E=!1,A=null;if(Fk.lastIndex=0,l.m3u8=e,l.hasVariableRefs=ek(e),"#EXTM3U"!==(null==(s=Fk.exec(e))?void 0:s[0]))return l.playlistParsingError=new Error("Missing format identifier #EXTM3U"),l;for(;null!==(u=Fk.exec(e));){E&&(E=!1,k=new Hb(r,o),k.playlistOffset=v,k.setStart(v),k.sn=g,k.cc=b,w&&(k.bitrate=w),k.level=i,f&&(k.initSegment=f,f.rawProgramDateTime&&(k.rawProgramDateTime=f.rawProgramDateTime,f.rawProgramDateTime=null),A&&(k.setByteRange(A),A=null)));const e=u[1];if(e){k.duration=parseFloat(e);const t=(" "+u[2]).slice(1);k.title=t||null,k.tagList.push(t?["INF",e,t]:["INF",e])}else if(u[3]){if(Zv(k.duration)){k.playlistOffset=v,k.setStart(v),p&&Kk(k,p,l),k.sn=g,k.level=i,k.cc=b,c.push(k);const e=(" "+u[3]).slice(1);k.relurl=tk(l,e),Vk(k,S,d),S=k,v+=k.duration,g++,y=0,E=!0}}else{if(u=u[0].match(Uk),!u){Eb.warn("No matches on slow regex match for level playlist!");continue}for(h=1;h<u.length&&void 0===u[h];h++);const e=(" "+u[h]).slice(1),a=(" "+u[h+1]).slice(1),s=u[h+2]?(" "+u[h+2]).slice(1):null;switch(e){case"BYTERANGE":S?k.setByteRange(a,S):k.setByteRange(a);break;case"PROGRAM-DATE-TIME":k.rawProgramDateTime=a,k.tagList.push(["PROGRAM-DATE-TIME",a]),-1===T&&(T=c.length);break;case"PLAYLIST-TYPE":l.type&&Yk(l,e,u),l.type=a.toUpperCase();break;case"MEDIA-SEQUENCE":0!==l.startSN?Yk(l,e,u):c.length>0&&Jk(l,e,u),g=l.startSN=parseInt(a);break;case"SKIP":{l.skippedSegments&&Yk(l,e,u);const t=new sk(a,l),i=t.decimalInteger("SKIPPED-SEGMENTS");if(Zv(i)){l.skippedSegments+=i;for(let e=i;e--;)c.push(null);g+=i}const r=t.enumeratedString("RECENTLY-REMOVED-DATERANGES");r&&(l.recentlyRemovedDateranges=(l.recentlyRemovedDateranges||[]).concat(r.split("\t")));break}case"TARGETDURATION":0!==l.targetduration&&Yk(l,e,u),l.targetduration=Math.max(parseInt(a),1);break;case"VERSION":null!==l.version&&Yk(l,e,u),l.version=parseInt(a);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":l.live||Yk(l,e,u),l.live=!1;break;case"#":(a||s)&&k.tagList.push(s?[a,s]:[a]);break;case"DISCONTINUITY":b++,k.tagList.push(["DIS"]);break;case"GAP":k.gap=!0,k.tagList.push([e]);break;case"BITRATE":k.tagList.push([e,a]),w=1e3*parseInt(a),Zv(w)?k.bitrate=w:w=0;break;case"DATERANGE":{const e=new sk(a,l),t=new ck(e,l.dateRanges[e.ID],l.dateRangeTagCount);l.dateRangeTagCount++,t.isValid||l.skippedSegments?l.dateRanges[t.id]=t:Eb.warn(`Ignoring invalid DATERANGE tag: "${a}"`),k.tagList.push(["EXT-X-DATERANGE",a]);break}case"DEFINE":{const e=new sk(a,l);"IMPORT"in e?rk(l,e,n):ik(l,e,t)}break;case"DISCONTINUITY-SEQUENCE":0!==l.startCC?Yk(l,e,u):c.length>0&&Jk(l,e,u),l.startCC=b=parseInt(a);break;case"KEY":{const e=$k(a,t,l);if(e.isSupported()){if("NONE"===e.method){p=void 0;break}p||(p={});const t=p[e.keyFormat];null!=t&&t.matches(e)||(t&&(p=fb({},p)),p[e.keyFormat]=e)}else Eb.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${a}"`);break}case"START":l.startTimeOffset=Gk(a);break;case"MAP":{const e=new sk(a,l);if(k.duration){const t=new Hb(r,o);Wk(t,e,i,p),f=t,k.initSegment=f,f.rawProgramDateTime&&!k.rawProgramDateTime&&(k.rawProgramDateTime=f.rawProgramDateTime)}else{const t=k.byteRangeEndOffset;if(t){const e=k.byteRangeStartOffset;A=`${t-e}@${e}`}else A=null;Wk(k,e,i,p),f=k,E=!0}f.cc=b;break}case"SERVER-CONTROL":m&&Yk(l,e,u),m=new sk(a),l.canBlockReload=m.bool("CAN-BLOCK-RELOAD"),l.canSkipUntil=m.optionalFloat("CAN-SKIP-UNTIL",0),l.canSkipDateRanges=l.canSkipUntil>0&&m.bool("CAN-SKIP-DATERANGES"),l.partHoldBack=m.optionalFloat("PART-HOLD-BACK",0),l.holdBack=m.optionalFloat("HOLD-BACK",0);break;case"PART-INF":{l.partTarget&&Yk(l,e,u);const t=new sk(a);l.partTarget=t.decimalFloatingPoint("PART-TARGET");break}case"PART":{let e=l.partList;e||(e=l.partList=[]);const t=y>0?e[e.length-1]:void 0,i=y++,r=new sk(a,l),n=new Vb(r,k,o,i,t);e.push(n),k.duration+=n.duration;break}case"PRELOAD-HINT":{const e=new sk(a,l);l.preloadHint=e;break}case"RENDITION-REPORT":{const e=new sk(a,l);l.renditionReports=l.renditionReports||[],l.renditionReports.push(e);break}default:Eb.warn(`line parsed but not handled: ${u}`)}}}S&&!S.relurl?(c.pop(),v-=S.duration,l.partList&&(l.fragmentHint=S)):l.partList&&(Vk(k,S,d),k.cc=b,l.fragmentHint=k,p&&Kk(k,p,l)),l.targetduration||(l.playlistParsingError=new Error("Missing Target Duration"));const C=c.length,I=c[0],P=c[C-1];if(v+=l.skippedSegments*l.targetduration,v>0&&C&&P){l.averagetargetduration=v/C;const e=P.sn;l.endSN="initSegment"!==e?e:0,l.live||(P.endList=!0),T>0&&(!function(e,t){let i=e[t];for(let r=t;r--;){const t=e[r];if(!t)return;t.programDateTime=i.programDateTime-1e3*t.duration,i=t}}(c,T),I&&d.unshift(I))}return l.fragmentHint&&(v+=l.fragmentHint.duration),l.totalduration=v,d.length&&l.dateRangeTagCount&&I&&zk(d,l),l.endCC=b,l}}function zk(e,t){let i=e.length;if(!i){if(!t.hasProgramDateTime)return;{const r=t.fragments[t.fragments.length-1];e.push(r),i++}}const r=e[i-1],a=t.live?Infinity:t.totalduration,n=Object.keys(t.dateRanges);for(let o=n.length;o--;){const l=t.dateRanges[n[o]],c=l.startDate.getTime();l.tagAnchor=r.ref;for(let r=i;r--;){var s;if((null==(s=e[r])?void 0:s.sn)<t.startSN)break;const i=jk(t,c,e,r,a);if(-1!==i){l.tagAnchor=t.fragments[i].ref;break}}}}function jk(e,t,i,r,a){const n=i[r];if(n){const o=n.programDateTime;if(t>=o||0===r){var s;if(t<=o+1e3*(((null==(s=i[r+1])?void 0:s.start)||a)-n.start)){const a=i[r].sn-e.startSN;if(a<0)return-1;const n=e.fragments;if(n.length>i.length){for(let s=(i[r+1]||n[n.length-1]).sn-e.startSN;s>a;s--){const e=n[s].programDateTime;if(t>=e&&t<e+1e3*n[s].duration)return s}}return a}}}return-1}function $k(e,t,i){var r,a;const n=new sk(e,i),s=null!=(r=n.METHOD)?r:"",o=n.URI,l=n.hexadecimalInteger("IV"),c=n.KEYFORMATVERSIONS,d=null!=(a=n.KEYFORMAT)?a:"identity";o&&n.IV&&!l&&Eb.error(`Invalid IV: ${n.IV}`);const u=o?Bk.resolve(o,t):"",h=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Lk(s,u,d,h,l,n.KEYID)}function Gk(e){const t=new sk(e).decimalFloatingPoint("TIME-OFFSET");return Zv(t)?t:null}function qk(e,t){let i=(e||"").split(/[ ,]+/).filter(e=>e);["video","audio","text"].forEach(e=>{const r=i.filter(t=>kw(t,e));r.length&&(t[`${e}Codec`]=r.map(e=>e.split("/")[0]).join(","),i=i.filter(e=>-1===r.indexOf(e)))}),t.unknownCodecs=i}function Hk(e,t,i){const r=t[i];r&&(e[i]=r)}function Vk(e,t,i){e.rawProgramDateTime?i.push(e):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime)}function Wk(e,t,i,r){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=i,e.sn="initSegment",r&&(e.levelkeys=r),e.initSegment=null}function Kk(e,t,i){e.levelkeys=t;const{encryptedFragments:r}=i;r.length&&r[r.length-1].levelkeys===t||!Object.keys(t).some(e=>t[e].isCommonEncryption)||r.push(e)}function Yk(e,t,i){e.playlistParsingError=new Error(`#EXT-X-${t} must not appear more than once (${i[0]})`)}function Jk(e,t,i){e.playlistParsingError=new Error(`#EXT-X-${t} must appear before the first Media Segment (${i[0]})`)}function Xk(e,t){const i=t.startPTS;if(Zv(i)){let r,a=0;t.sn>e.sn?(a=i-e.start,r=e):(a=e.start-i,r=t),r.duration!==a&&r.setDuration(a)}else if(t.sn>e.sn){e.cc===t.cc&&e.minEndPTS?t.setStart(e.start+(e.minEndPTS-e.start)):t.setStart(e.start+e.duration)}else t.setStart(Math.max(e.start-t.duration,0))}function Qk(e,t,i,r,a,n,s){r-i<=0&&(s.warn("Fragment should have a positive duration",t),r=i+t.duration,n=a+t.duration);let o=i,l=r;const c=t.startPTS,d=t.endPTS;if(Zv(c)){const u=Math.abs(c-i);e&&u>e.totalduration?s.warn(`media timestamps and playlist times differ by ${u}s for level ${t.level} ${e.url}`):Zv(t.deltaPTS)?t.deltaPTS=Math.max(u,t.deltaPTS):t.deltaPTS=u,o=Math.max(i,c),i=Math.min(i,c),a=void 0!==t.startDTS?Math.min(a,t.startDTS):a,l=Math.min(r,d),r=Math.max(r,d),n=void 0!==t.endDTS?Math.max(n,t.endDTS):n}const u=i-t.start;0!==t.start&&t.setStart(i),t.setDuration(r-t.start),t.startPTS=i,t.maxStartPTS=o,t.startDTS=a,t.endPTS=r,t.minEndPTS=l,t.endDTS=n;const h=t.sn;if(!e||h<e.startSN||h>e.endSN)return 0;let p;const m=h-e.startSN,f=e.fragments;for(f[m]=t,p=m;p>0;p--)Xk(f[p],f[p-1]);for(p=m;p<f.length-1;p++)Xk(f[p],f[p+1]);return e.fragmentHint&&Xk(f[f.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,u}function Zk(e,t,i){if(e===t)return;let r=null;const a=e.fragments;for(let d=a.length-1;d>=0;d--){const e=a[d].initSegment;if(e){r=e;break}}let n;e.fragmentHint&&delete e.fragmentHint.endPTS,function(e,t,i){const r=t.skippedSegments,a=Math.max(e.startSN,t.startSN)-t.startSN,n=(e.fragmentHint?1:0)+(r?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,s=t.startSN-e.startSN,o=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments;for(let c=a;c<=n;c++){const a=l[s+c];let n=o[c];if(r&&!n&&a&&(n=t.fragments[c]=a),a&&n){i(a,n,c,o);const r=a.relurl,s=n.relurl;if(r&&lT(r,s))return void(t.playlistParsingError=eT(`media sequence mismatch ${n.sn}:`,e,t,a,n));if(a.cc!==n.cc)return void(t.playlistParsingError=eT(`discontinuity sequence mismatch (${a.cc}!=${n.cc})`,e,t,a,n))}}}(e,t,(e,i,a,s)=>{if((!t.startCC||t.skippedSegments)&&i.cc!==e.cc){const r=e.cc-i.cc;for(let e=a;e<s.length;e++)s[e].cc+=r;t.endCC=s[s.length-1].cc}Zv(e.startPTS)&&Zv(e.endPTS)&&(i.setStart(i.startPTS=e.startPTS),i.startDTS=e.startDTS,i.maxStartPTS=e.maxStartPTS,i.endPTS=e.endPTS,i.endDTS=e.endDTS,i.minEndPTS=e.minEndPTS,i.setDuration(e.endPTS-e.startPTS),i.duration&&(n=i),t.PTSKnown=t.alignedSliding=!0),e.hasStreams&&(i.elementaryStreams=e.elementaryStreams),i.loader=e.loader,e.hasStats&&(i.stats=e.stats),e.initSegment&&(i.initSegment=e.initSegment,r=e.initSegment)});const s=t.fragments,o=t.fragmentHint?s.concat(t.fragmentHint):s;if(r&&o.forEach(e=>{var t;!e||e.initSegment&&e.initSegment.relurl!==(null==(t=r)?void 0:t.relurl)||(e.initSegment=r)}),t.skippedSegments){if(t.deltaUpdateFailed=s.some(e=>!e),t.deltaUpdateFailed){i.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let e=t.skippedSegments;e--;)s.shift();t.startSN=s[0].sn}else{t.canSkipDateRanges&&(t.dateRanges=function(e,t,i){const{dateRanges:r,recentlyRemovedDateranges:a}=t,n=fb({},e);a&&a.forEach(e=>{delete n[e]});const s=Object.keys(n).length;if(!s)return r;return Object.keys(r).forEach(e=>{const t=n[e],a=new ck(r[e].attr,t);a.isValid?(n[e]=a,t||(a.tagOrder+=s)):i.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${Zw(r[e].attr)}"`)}),n}(e.dateRanges,t,i));const r=e.fragments.filter(e=>e.rawProgramDateTime);if(e.hasProgramDateTime&&!t.hasProgramDateTime)for(let e=1;e<o.length;e++)null===o[e].programDateTime&&Vk(o[e],o[e-1],r);zk(r,t)}t.endCC=s[s.length-1].cc}if(!t.startCC){var l;const i=aT(e,t.startSN-1);t.startCC=null!=(l=null==i?void 0:i.cc)?l:s[0].cc}!function(e,t,i){if(e&&t){let r=0;for(let a=0,n=e.length;a<=n;a++){const n=e[a],s=t[a+r];n&&s&&n.index===s.index&&n.fragment.sn===s.fragment.sn?i(n,s):r--}}}(e.partList,t.partList,(e,t)=>{t.elementaryStreams=e.elementaryStreams,t.stats=e.stats}),n?Qk(t,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS,i):tT(e,t),s.length&&(t.totalduration=t.edge-s[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;const c=t.advancedDateTime;if(t.advanced&&c){const e=t.edge;t.driftStart||(t.driftStartTime=c,t.driftStart=e),t.driftEndTime=c,t.driftEnd=e}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime;-1===t.requestScheduled&&(t.requestScheduled=e.requestScheduled)}function eT(e,t,i,r,a){return new Error(`${e} ${a.url}\nPlaylist starting @${t.startSN}\n${t.m3u8}\n\nPlaylist starting @${i.startSN}\n${i.m3u8}`)}function tT(e,t,i=!0){const r=t.startSN+t.skippedSegments-e.startSN,a=e.fragments,n=r>=0;let s=0;if(n&&r<a.length)s=a[r].start;else if(n&&t.startSN===e.endSN+1)s=e.fragmentEnd;else if(n&&i)s=e.fragmentStart+r*t.levelTargetDuration;else{if(t.skippedSegments||0!==t.fragmentStart)return;s=e.fragmentStart}iT(t,s)}function iT(e,t){if(t){const i=e.fragments;for(let r=e.skippedSegments;r<i.length;r++)i[r].addStart(t);e.fragmentHint&&e.fragmentHint.addStart(t)}}function rT(e,t=Infinity){let i=1e3*e.targetduration;if(e.updated){const r=e.fragments,a=4;if(r.length&&i*a>t){const e=1e3*r[r.length-1].duration;e<i&&(i=e)}}else i/=2;return Math.round(i)}function aT(e,t,i){if(!e)return null;let r=e.fragments[t-e.startSN];return r||(r=e.fragmentHint,r&&r.sn===t?r:t<e.startSN&&i&&i.sn===t?i:null)}function nT(e,t,i){return e?sT(e.partList,t,i):null}function sT(e,t,i){if(e)for(let r=e.length;r--;){const a=e[r];if(a.index===i&&a.fragment.sn===t)return a}return null}function oT(e){e.forEach((e,t)=>{var i;null==(i=e.details)||i.fragments.forEach(e=>{e.level=t,e.initSegment&&(e.initSegment.level=t)})})}function lT(e,t){return!(e===t||!t)&&cT(e)!==cT(t)}function cT(e){return e.replace(/\?[^?]*$/,"")}function dT(e,t){for(let r=0,a=e.length;r<a;r++){var i;if((null==(i=e[r])?void 0:i.cc)===t)return e[r]}return null}function uT(e,t){const i=e.start+t;e.startPTS=i,e.setStart(i),e.endPTS=i+e.duration}function hT(e,t){const i=t.fragments;for(let r=0,a=i.length;r<a;r++)uT(i[r],e);t.fragmentHint&&uT(t.fragmentHint,e),t.alignedSliding=!0}function pT(e,t){if(!function(e,t){return!!(e&&t.startCC<e.endCC&&t.endCC>e.startCC)}(t,e))return;const i=Math.min(t.endCC,e.endCC),r=dT(t.fragments,i),a=dT(e.fragments,i);if(!r||!a)return;Eb.log(`Aligning playlist at start of dicontinuity sequence ${i}`);hT(r.start-a.start,e)}function mT(e,t){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;const i=e.fragments,r=t.fragments;if(!i.length||!r.length)return;let a,n;const s=Math.min(t.endCC,e.endCC);t.startCC<s&&e.startCC<s&&(a=dT(r,s),n=dT(i,s)),a&&n||(a=r[Math.floor(r.length/2)],n=dT(i,a.cc)||i[Math.floor(i.length/2)]);const o=a.programDateTime,l=n.programDateTime;if(!o||!l)return;hT((l-o)/1e3-(n.start-a.start),e)}function fT(e,t,i){gT(e,t,i),e.addEventListener(t,i)}function gT(e,t,i){e.removeEventListener(t,i)}const yT=function(e){let t="";const i=e.length;for(let r=0;r<i;r++)t+=`[${e.start(r).toFixed(3)}-${e.end(r).toFixed(3)}]`;return t},vT="STOPPED",bT="IDLE",wT="KEY_LOADING",ST="FRAG_LOADING",kT="FRAG_LOADING_WAITING_RETRY",TT="WAITING_TRACK",ET="PARSING",AT="PARSED",CT="ENDED",IT="ERROR",PT="WAITING_INIT_PTS",_T="WAITING_LEVEL";class RT extends YS{constructor(e,t,i,r,a){super(r,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=vT,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:e,fragCurrent:t,media:i,mediaBuffer:r,state:a}=this,n=i?i.currentTime:0,s=QS.bufferInfo(r||i,n,e.maxBufferHole),o=!s.len;if(this.log(`Media seeking to ${Zv(n)?n.toFixed(3):n}, state: ${a}, ${o?"out of":"in"} buffer`),this.state===CT)this.resetLoadingState();else if(t){const i=e.maxFragLookUpTolerance,r=t.start-i,a=t.start+t.duration+i;if(o||a<s.start||r>s.end){const e=n>a;(n<r||e)&&(e&&t.loader&&(this.log(`Cancelling fragment load for seek (sn: ${t.sn})`),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(i){this.fragmentTracker.removeFragmentsInRange(n,Infinity,this.playlistType,!0);if(n>this.lastCurrentTime&&(this.lastCurrentTime=n),!this.loadingParts){const e=Math.max(s.end,n),t=this.shouldLoadParts(this.getLevelDetails(),e);t&&(this.log(`LL-Part loading ON after seeking to ${n.toFixed(2)} with buffer @${e.toFixed(2)}`),this.loadingParts=t)}}this.hls.hasEnoughToStart||(this.log(`Setting ${o?"startPosition":"nextLoadPosition"} to ${n} for seek without enough to start`),this.nextLoadPosition=n,o&&(this.startPosition=n)),o&&this.state===bT&&this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=a,this.hls=e,this.fragmentLoader=new HS(e.config),this.keyLoader=i,this.fragmentTracker=t,this.config=e.config,this.decrypter=new GS(e.config)}registerListeners(){const{hls:e}=this;e.on(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(ab.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(ab.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===vT)return;this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=vT}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return-1===t&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const i=e.end||0,r=this.config.timelineOffset||0;if(i<=r)return!1;const a=e.buffered;this.config.maxBufferHole&&a&&a.length>1&&(e=QS.bufferedInfo(a,e.start,0));const n=e.nextStart;if(n&&n>r&&n<t.edge)return!1;if(this.media.currentTime<e.start)return!1;const s=t.partList;if(null!=s&&s.length){const e=s[s.length-1];return QS.isBuffered(this.media,e.start+e.duration/2)}const o=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(o)}getLevelDetails(){if(this.levels&&null!==this.levelLastLoaded)return this.levelLastLoaded.details}get timelineOffset(){const e=this.config.timelineOffset;var t;return e?(null==(t=this.getLevelDetails())?void 0:t.appliedTimelineOffset)||e:0}onMediaAttached(e,t){const i=this.media=this.mediaBuffer=t.media;fT(i,"seeking",this.onMediaSeeking),fT(i,"ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===vT&&this.startLoad(r.startPosition)}onMediaDetaching(e,t){const i=!!t.transferMedia,r=this.media;if(null!==r){if(r.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),gT(r,"seeking",this.onMediaSeeking),gT(r,"ended",this.onMediaEnded),this.keyLoader&&!i&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,i)return this.resetLoadingState(),void this.resetTransmuxer();this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=vT,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,i){this.startFragRequested=!0,this._loadFragForPlayback(e,t,i)}_loadFragForPlayback(e,t,i){this._doFragLoad(e,t,i,e=>{const t=e.frag;if(this.fragContextChanged(t))return this.warn(`${t.type} sn: ${t.sn}${e.part?" part: "+e.part.index:""} of ${this.fragInfo(t,!1,e.part)}) was dropped during download.`),void this.fragmentTracker.removeFragment(t);t.stats.chunkCount++,this._handleFragmentLoadProgress(e)}).then(e=>{if(!e)return;const t=this.state,i=e.frag;this.fragContextChanged(i)?(t===ST||!this.fragCurrent&&t===ET)&&(this.fragmentTracker.removeFragment(i),this.state=bT):("payload"in e&&(this.log(`Loaded ${i.type} sn: ${i.sn} of ${this.playlistLabel()} ${i.level}`),this.hls.trigger(ab.FRAG_LOADED,e)),this._handleFragmentLoadComplete(e))}).catch(t=>{this.state!==vT&&this.state!==IT&&(this.warn(`Frag error: ${(null==t?void 0:t.message)||t}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:i}=this;if(i.getState(e)===xS){const t=e.type,r=this.getFwdBufferInfo(this.mediaBuffer,t),a=Math.max(e.duration,r?r.len:this.config.maxBufferLength),n=this.backtrackFragment;(1===(n?e.sn-n.sn:0)||this.reduceMaxBufferLength(a,e.duration))&&i.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?i.removeAllFragments():i.hasParts(e.type)&&(i.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),i.getState(e)===LS&&i.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(null==t?void 0:t.live)&&"EVENT"!==t.type&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,i=null){if(!(e-t))return;const r={startOffset:e,endOffset:t,type:i};this.hls.trigger(ab.BUFFER_FLUSHING,r)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(e=>{const t=null==e?void 0:e.frag;if(!t||this.fragContextChanged(t)||!this.levels)throw new Error("init load aborted");return e}).then(e=>{const{hls:t}=this,{frag:i,payload:r}=e,a=i.decryptdata;if(r&&r.byteLength>0&&null!=a&&a.key&&a.iv&&pk(a.method)){const n=self.performance.now();return this.decrypter.decrypt(new Uint8Array(r),a.key.buffer,a.iv.buffer,mk(a.method)).catch(e=>{throw t.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:i}),e}).then(r=>{const a=self.performance.now();return t.trigger(ab.FRAG_DECRYPTED,{frag:i,payload:r,stats:{tstart:n,tdecrypt:a}}),e.payload=r,this.completeInitSegmentLoad(e)})}return this.completeInitSegmentLoad(e)}).catch(t=>{this.state!==vT&&this.state!==IT&&(this.warn(t),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const i=e.frag.stats;this.state!==vT&&(this.state=bT),e.frag.data=new Uint8Array(e.payload),i.parsing.start=i.buffering.start=self.performance.now(),i.parsing.end=i.buffering.end=self.performance.now(),this.tick()}unhandledEncryptionError(e,t){var i,r;const a=e.tracks;if(a&&!t.encrypted&&(null!=(i=a.audio)&&i.encrypted||null!=(r=a.video)&&r.encrypted)&&(!this.config.emeEnabled||!this.keyLoader.emeController)){const e=this.media,i=new Error(`Encrypted track with no key in ${this.fragInfo(t)} (media ${e?"attached mediaKeys: "+e.mediaKeys:"detached"})`);return this.warn(i.message),!e||e.mediaKeys?!1:(this.hls.trigger(ab.ERROR,{type:ib.KEY_SYSTEM_ERROR,details:rb.KEY_SYSTEM_NO_KEYS,fatal:!1,error:i,frag:t}),this.resetTransmuxer(),!0)}return!1}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const i=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${i?yT(QS.getBuffered(i)):"(detached)"})`),qb(e)){var r;if(e.type!==ub){const t=e.elementaryStreams;if(!Object.keys(t).some(e=>!!t[e]))return void(this.state=bT)}const t=null==(r=this.levels)?void 0:r[e.level];null!=t&&t.fragmentError&&(this.log(`Resetting level fragment error count of ${t.fragmentError} on frag buffered`),t.fragmentError=0)}this.state=bT}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:i,part:r,partsLoaded:a}=e,n=!a||0===a.length||a.some(e=>!e),s=new JS(i.level,i.sn,i.stats.chunkCount+1,0,r?r.index:-1,!n);t.flush(s)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,i=null,r){var a;this.fragCurrent=e;const n=t.details;if(!this.levels||!n)throw new Error(`frag load aborted, missing level${n?"":" detail"}s`);let s=null;if(!e.encrypted||null!=(a=e.decryptdata)&&a.key)e.encrypted||(s=this.keyLoader.loadClear(e,n.encryptedFragments,this.startFragRequested),s&&this.log("[eme] blocking frag load until media-keys acquired"));else if(this.log(`Loading key for ${e.sn} of [${n.startSN}-${n.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=wT,this.fragCurrent=e,s=this.keyLoader.load(e).then(e=>{if(!this.fragContextChanged(e.frag))return this.hls.trigger(ab.KEY_LOADED,e),this.state===wT&&(this.state=bT),e}),this.hls.trigger(ab.KEY_LOADING,{frag:e}),null===this.fragCurrent)return this.log("context changed in KEY_LOADING"),Promise.resolve(null);const o=this.fragPrevious;if(qb(e)&&(!o||e.sn!==o.sn)){const i=this.shouldLoadParts(t.details,e.end);i!==this.loadingParts&&(this.log(`LL-Part loading ${i?"ON":"OFF"} loading sn ${null==o?void 0:o.sn}->${e.sn}`),this.loadingParts=i)}if(i=Math.max(e.start,i||0),this.loadingParts&&qb(e)){const a=n.partList;if(a&&r){i>n.fragmentEnd&&n.fragmentHint&&(e=n.fragmentHint);const o=this.getNextPart(a,e,i);if(o>-1){const l=a[o];let c;return e=this.fragCurrent=l.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${l.index} (${o}/${a.length-1}) of ${this.fragInfo(e,!1,l)}) cc: ${e.cc} [${n.startSN}-${n.endSN}], target: ${parseFloat(i.toFixed(3))}`),this.nextLoadPosition=l.start+l.duration,this.state=ST,c=s?s.then(i=>!i||this.fragContextChanged(i.frag)?null:this.doFragPartsLoad(e,l,t,r)).catch(e=>this.handleFragLoadError(e)):this.doFragPartsLoad(e,l,t,r).catch(e=>this.handleFragLoadError(e)),this.hls.trigger(ab.FRAG_LOADING,{frag:e,part:l,targetBufferTime:i}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):c}if(!e.url||this.loadedEndOfParts(a,i))return Promise.resolve(null)}}var l;if(qb(e)&&this.loadingParts)this.log(`LL-Part loading OFF after next part miss @${i.toFixed(2)} Check buffer at sn: ${e.sn} loaded parts: ${null==(l=n.partList)?void 0:l.filter(e=>e.loaded).map(e=>`[${e.start}-${e.end}]`)}`),this.loadingParts=!1;else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${"["+n.startSN+"-"+n.endSN+"]"}, target: ${parseFloat(i.toFixed(3))}`),Zv(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=ST;const c=this.config.progressive&&e.type!==ub;let d;return d=c&&s?s.then(t=>!t||this.fragContextChanged(t.frag)?null:this.fragmentLoader.load(e,r)).catch(e=>this.handleFragLoadError(e)):Promise.all([this.fragmentLoader.load(e,c?r:void 0),s]).then(([e])=>(!c&&r&&r(e),e)).catch(e=>this.handleFragLoadError(e)),this.hls.trigger(ab.FRAG_LOADING,{frag:e,targetBufferTime:i}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):d}doFragPartsLoad(e,t,i,r){return new Promise((a,n)=>{var s;const o=[],l=null==(s=i.details)?void 0:s.partList,c=t=>{this.fragmentLoader.loadPart(e,t,r).then(r=>{o[t.index]=r;const n=r.part;this.hls.trigger(ab.FRAG_LOADED,r);const s=nT(i.details,e.sn,t.index+1)||sT(l,e.sn,t.index+1);if(!s)return a({frag:e,part:n,partsLoaded:o});c(s)}).catch(n)};c(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===rb.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===ib.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(t.frag)):this.hls.trigger(ab.ERROR,t)}else this.hls.trigger(ab.ERROR,{type:ib.OTHER_ERROR,details:rb.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==ET)return void(this.fragCurrent||this.state===vT||this.state===IT||(this.state=bT));const{frag:i,part:r,level:a}=t,n=self.performance.now();i.stats.parsing.end=n,r&&(r.stats.parsing.end=n);const s=this.getLevelDetails(),o=s&&i.sn>s.endSN||this.shouldLoadParts(s,i.end);o!==this.loadingParts&&(this.log(`LL-Part loading ${o?"ON":"OFF"} after parsing segment ending @${i.end.toFixed(2)}`),this.loadingParts=o),this.updateLevelTiming(i,r,a,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e.partList){var i;const a=e.partList[0];if(a.fragment.type===ub)return!1;if(t>=a.end+((null==(i=e.fragmentHint)?void 0:i.duration)||0)){var r;if((this.hls.hasEnoughToStart?(null==(r=this.media)?void 0:r.currentTime)||this.lastCurrentTime:this.getLoadPosition())>a.start-a.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:i}=this,{level:r,sn:a,part:n}=e;if(null==t||!t[r])return this.warn(`Levels object was unset while buffering fragment ${a} of ${this.playlistLabel()} ${r}. The current chunk will not be buffered.`),null;const s=t[r],o=s.details,l=n>-1?nT(o,a,n):null,c=l?l.fragment:aT(o,a,i);return c?(i&&i!==c&&(c.stats=i.stats),{frag:c,part:l,level:s}):null}bufferFragmentData(e,t,i,r,a){if(this.state!==ET)return;const{data1:n,data2:s}=e;let o=n;if(s&&(o=hw(n,s)),!o.length)return;const l=this.initPTS[t.cc],c=l?-l.baseTime/l.timescale:void 0,d={type:e.type,frag:t,part:i,chunkMeta:r,offset:c,parent:t.type,data:o};if(this.hls.trigger(ab.BUFFER_APPENDING,d),e.dropped&&e.independent&&!i){if(a)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!QS.isBuffered(t,t.currentTime))return void this.flushMainBuffer(0,e.start);const i=t.currentTime,r=QS.bufferInfo(t,i,0),a=e.duration,n=Math.min(2*this.config.maxFragLookUpTolerance,.25*a),s=Math.max(Math.min(e.start-n,r.end-n),i+n);e.start-s>n&&this.flushMainBuffer(s,e.start)}getFwdBufferInfo(e,t){var i;const r=this.getLoadPosition();if(!Zv(r))return null;const a=this.lastCurrentTime>r||null!=(i=this.media)&&i.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,r,t,a)}getFwdBufferInfoAtPos(e,t,i,r){const a=QS.bufferInfo(e,t,r);if(0===a.len&&void 0!==a.nextStart){const n=this.fragmentTracker.getBufferedFrag(t,i);if(n&&(a.nextStart<=n.end||n.gap)){const i=Math.max(Math.min(a.nextStart,n.end)-t,r);return QS.bufferInfo(e,t,i)}}return a}getMaxBufferLength(e){const{config:t}=this;let i;return i=e?Math.max(8*t.maxBufferSize/e,t.maxBufferLength):t.maxBufferLength,Math.min(i,t.maxMaxBufferLength)}exceedsMaxBuffer(e,t,i){const r=e.nextStart;if(r&&i.start>r){const r=e.buffered;if(r){let a=e.len;const n=e.bufferedIndex;for(let e=r.length-1;e>n;e--)r[e].start<i.start&&(a+=r[e].end-r[e].start);return a>=t}}return!1}reduceMaxBufferLength(e,t){const i=this.config,r=Math.max(Math.min(e-t,i.maxBufferLength),t),a=Math.max(e-3*t,i.maxMaxBufferLength/2,r);return a>=r&&(i.maxMaxBufferLength=a,this.warn(`Reduce max buffer length to ${a}s`),!0)}getAppendedFrag(e,t=cb){const i=this.fragmentTracker?this.fragmentTracker.getAppendedFrag(e,t):null;return i&&"fragment"in i?i.fragment:i}getNextFragment(e,t){const i=t.fragments,r=i.length;if(!r)return null;const{config:a}=this,n=t.fragmentStart,s=a.lowLatencyMode&&!!t.partList;let o=null;if(t.live){const i=a.initialLiveManifestSize;if(r<i)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${i})`),null;if(!t.PTSKnown&&!this.startFragRequested&&-1===this.startPosition||e<n){var l;s&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),o=this.getInitialLiveFragment(t);const i=this.config.startPosition,r=this.hls.startPosition,a=this.hls.liveSyncPosition,c=(null==(l=o)?void 0:l.start)||0;let d,u;-1!==r&&r>=n?(d=r,u=r===i?"config":"next load start"):null!==a?(d=a,u="live edge"):(d=e,u="buffer pos"),d<c&&(d=c,u="live frag start"),d<n&&(d=n,u="playlist start"),this.startPosition==d&&this.nextLoadPosition==d||(this.log(`Setting startPosition to ${d.toFixed(3)} ${-1===r?"":`(from ${i}) `}based on ${u}. live edge: ${a} live frag start: ${c.toFixed(3)} playlist start: ${n.toFixed(3)} buffer pos: ${e}`),this.startPosition=this.nextLoadPosition=d)}}else e<=n&&(o=i[0]);if(!o){const i=this.loadingParts?t.partEnd:t.fragmentEnd;o=this.getFragmentAtPosition(e,i,t)}let c=this.filterReplacedPrimary(o,t);if(!c&&o){const e=o.sn-t.startSN;c=this.filterReplacedPrimary(i[e+1]||null,t)}return this.mapToInitFragWhenRequired(c)}isLoopLoading(e,t){if(this.nextLoadPosition<=t)return!1;const i=this.fragmentTracker.getState(e);return i===DS||i===LS&&!!e.gap}getNextFragmentLoopLoading(e,t,i,r,a){let n=null;if(e.gap&&(n=this.getNextFragment(this.nextLoadPosition,t),n&&!n.gap&&i.nextStart)){const e=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,i.nextStart,r,0);if(null!==e&&i.len+e.len>=a){const e=n.sn;return this.loopSn!==e&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${e}`),this.loopSn=e),null}}return this.loopSn=void 0,n}get primaryPrefetch(){if(xT(this.config)){var e;if(null==(e=this.hls.interstitialsManager)||null==(e=e.playingItem)?void 0:e.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(xT(this.config)&&e.type!==ub){const i=this.hls.interstitialsManager,r=null==i?void 0:i.bufferingItem;if(r){const i=r.event;if(i){if(i.appendInPlace||Math.abs(e.start-r.start)>1||0===r.start)return null}else{if(e.end<=r.start&&!1===(null==t?void 0:t.live))return null;if(e.start>r.end&&r.nextEvent&&(r.nextEvent.appendInPlace||e.start-r.end>1))return null}}const a=null==i?void 0:i.playerQueue;if(a)for(let t=a.length;t--;){const i=a[t].interstitial;if(i.appendInPlace&&e.start>=i.startTime&&e.end<=i.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return null==e||!e.initSegment||e.initSegment.data||this.bitrateTest?e:e.initSegment}getNextPart(e,t,i){let r=-1,a=!1,n=!0;for(let s=0,o=e.length;s<o;s++){const o=e[s];if(n=n&&!o.independent,r>-1&&i<o.start)break;const l=o.loaded;l?r=-1:(a||(o.independent||n)&&o.fragment===t)&&(o.fragment!==t&&this.warn(`Need buffer at ${i} but next unloaded part starts at ${o.start}`),r=s),a=l}return r}loadedEndOfParts(e,t){let i;for(let r=e.length;r--;){if(i=e[r],!i.loaded)return!1;if(t>i.start)return!0}return!1}getInitialLiveFragment(e){const t=e.fragments,i=this.fragPrevious;let r=null;if(i){if(e.hasProgramDateTime&&(r=function(e,t,i){if(null===t||!Array.isArray(e)||!e.length||!Zv(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;for(let r=0;r<e.length;++r){const a=e[r];if(uS(t,i,a))return a}return null}(t,i.endProgramDateTime,this.config.maxFragLookUpTolerance),r&&this.log(`Live playlist, switching playlist, load frag with same PDT: ${i.programDateTime}`)),!r){const a=i.sn+1;if(a>=e.startSN&&a<=e.endSN){const n=t[a-e.startSN];i.cc===n.cc&&(r=n,this.log(`Live playlist, switching playlist, load frag with next SN: ${r.sn}`))}r||(r=hS(e,i.cc,i.end),r&&this.log(`Live playlist, switching playlist, load frag with same CC: ${r.sn}`))}}else{const t=this.hls.liveSyncPosition;null!==t&&(r=this.getFragmentAtPosition(t,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r}getFragmentAtPosition(e,t,i){const{config:r}=this;let{fragPrevious:a}=this,{fragments:n,endSN:s}=i;const{fragmentHint:o}=i,{maxFragLookUpTolerance:l}=r,c=i.partList,d=!!(this.loadingParts&&null!=c&&c.length&&o);let u;if(d&&!this.bitrateTest&&c[c.length-1].fragment.sn===o.sn&&(n=n.concat(o),s=o.sn),e<t){var h;u=cS(a,n,e,e<this.lastCurrentTime||e>t-l||null!=(h=this.media)&&h.paused||!this.startFragRequested?0:l)}else u=n[n.length-1];if(u){const e=u.sn-i.startSN,t=this.fragmentTracker.getState(u);if((t===DS||t===LS&&u.gap)&&(a=u),a&&u.sn===a.sn&&(!d||c[0].fragment.sn>u.sn||!i.live)){if(u.level===a.level){const t=n[e+1];u=u.sn<s&&this.fragmentTracker.getState(t)!==DS?t:null}}}return u}alignPlaylists(e,t,i){const r=e.fragments.length;if(!r)return this.warn("No fragments in live playlist"),0;const a=e.fragmentStart,n=!t,s=e.alignedSliding&&Zv(a);if(n||!s&&!a){!function(e,t){e&&(pT(t,e),t.alignedSliding||mT(t,e),t.alignedSliding||t.skippedSegments||tT(e,t,!1))}(i,e);const a=e.fragmentStart;return this.log(`Live playlist sliding: ${a.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${r}`),a}return a}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)}setStartPosition(e,t){let i=this.startPosition;i<t&&(i=-1);const r=this.timelineOffset;if(-1===i){const a=null!==this.startTimeOffset,n=a?this.startTimeOffset:e.startTimeOffset;null!==n&&Zv(n)?(i=t+n,n<0&&(i+=e.edge),i=Math.min(Math.max(t,i),t+e.totalduration),this.log(`Setting startPosition to ${i} for start time offset ${n} found in ${a?"multivariant":"media"} playlist`),this.startPosition=i):e.live?(i=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${i}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=i=0),this.lastCurrentTime=i+r}this.nextLoadPosition=i+r}getLoadPosition(){var e;const{media:t}=this;let i=0;return null!=(e=this.hls)&&e.hasEnoughToStart&&t?i=t.currentTime:this.nextLoadPosition>=0&&(i=this.nextLoadPosition),i}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&qb(e)&&e.stats.aborted&&(this.log(`Fragment ${e.sn}${t?" part "+t.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===kT)||(this.state=bT)}onFragmentOrKeyLoadError(e,t){var i;if(t.chunkMeta&&!t.frag){const e=this.getCurrentContext(t.chunkMeta);e&&(t.frag=e.frag)}const r=t.frag;if(!r||r.type!==e||!this.levels)return;var a;if(this.fragContextChanged(r))return void this.warn(`Frag load error must match current frag to retry ${r.url} > ${null==(a=this.fragCurrent)?void 0:a.url}`);const n=t.details===rb.FRAG_GAP;n&&this.fragmentTracker.fragBuffered(r,!0);const s=t.errorAction;if(!s)return void(this.state=IT);const{action:o,flags:l,retryCount:c=0,retryConfig:d}=s,u=!!d,h=u&&o===ES,p=u&&!s.resolved&&l===CS,m=null==(i=this.hls.latestLevelDetails)?void 0:i.live;if(!h&&p&&qb(r)&&!r.endList&&m&&!fS(t))this.resetFragmentErrors(e),this.treatAsGap(r),s.resolved=!0;else if((h||p)&&c<d.maxNumRetry){var f;const i=wS(null==(f=t.response)?void 0:f.code),a=yS(d,c);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+a,this.state=kT,s.resolved=!0,i)return this.log("Waiting for connection (offline)"),this.retryDate=Infinity,void(t.reason="offline");this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${c+1}/${d.maxNumRetry} in ${a}ms`)}else if(d){if(this.resetFragmentErrors(e),!(c<d.maxNumRetry))return void this.warn(`${t.details} reached or exceeded max retry (${c})`);n||o===TS||(s.resolved=!0)}else this.state=o===kS?_T:IT;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,i=Infinity===t;(!t||e>=t||i&&!wS(0))&&(i&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=bT)}reduceLengthAndFlushBuffer(e){if(this.state===ET||this.state===AT){const t=e.frag,i=e.parent,r=this.getFwdBufferInfo(this.mediaBuffer,i),a=r&&r.len>.5;a&&this.reduceMaxBufferLength(r.len,(null==t?void 0:t.duration)||10);const n=!a;return n&&this.warn(`Buffer full error while media.currentTime (${this.getLoadPosition()}) is not buffered, flush ${i} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),n}return!1}resetFragmentErrors(e){e===db&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==vT&&(this.state=bT)}afterBufferFlushed(e,t,i){if(!e)return;const r=QS.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,i),this.state===CT&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==vT&&(this.state=bT)}resetStartWhenNotLoaded(){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const e=this.levelLastLoaded,t=e?e.details:null;null!=t&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.log(`Loading context changed while buffering sn ${e.sn} of ${this.playlistLabel()} ${-1===e.level?"<removed>":e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,Infinity,this.playlistType,!1,!0)}updateLevelTiming(e,t,i,r){const a=i.details;if(!a)return void this.warn("level.details undefined");const n=Object.keys(e.elementaryStreams).reduce((t,n)=>{const s=e.elementaryStreams[n];if(s){const o=s.endPTS-s.startPTS;if(o<=0)return this.warn(`Could not parse fragment ${e.sn} ${n} duration reliably (${o})`),t||!1;const l=r?0:Qk(a,e,s.startPTS,s.endPTS,s.startDTS,s.endDTS,this);return this.hls.trigger(ab.LEVEL_PTS_UPDATED,{details:a,level:i,drift:l,type:n,frag:e,start:s.startPTS,end:s.endPTS}),!0}return t},!1);if(!n){var s;const t=null===(null==(s=this.transmuxer)?void 0:s.error);if((0===i.fragmentError||t&&(i.fragmentError<2||e.endList))&&this.treatAsGap(e,i),t){const t=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(t.message),this.hls.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.FRAG_PARSING_ERROR,fatal:!1,error:t,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${i.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=AT,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(ab.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===cb?"level":"track"}fragInfo(e,t=!0,i){var r,a;return`${this.playlistLabel()} ${e.level} (${i?"part":"frag"}:[${(null!=(r=t&&!i?e.startPTS:(i||e).start)?r:NaN).toFixed(3)}-${(null!=(a=t&&!i?e.endPTS:(i||e).end)?a:NaN).toFixed(3)}]${i&&"main"===e.type?"INDEPENDENT="+(i.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;null==(e=this.transmuxer)||e.reset()}recoverWorkerError(e){"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function xT(e){return!!e.interstitialsController&&!1!==e.enableInterstitialPlayback}class LT{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let i;return e.length?(i=1===e.length?e[0]:function(e,t){const i=new Uint8Array(t);let r=0;for(let a=0;a<e.length;a++){const t=e[a];i.set(t,r),r+=t.length}return i}(e,t),this.reset(),i):new Uint8Array(0)}reset(){this.chunks.length=0,this.dataLength=0}}var DT,MT={exports:{}};var OT=Rb((DT||(DT=1,function(e){var t=Object.prototype.hasOwnProperty,i="~";function r(){}function a(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function n(e,t,r,n,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new a(r,n||e,s),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(i=!1)),o.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(i?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},o.prototype.listeners=function(e){var t=i?i+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,n=r.length,s=new Array(n);a<n;a++)s[a]=r[a].fn;return s},o.prototype.listenerCount=function(e){var t=i?i+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,a,n,s){var o=i?i+e:e;if(!this._events[o])return!1;var l,c,d=this._events[o],u=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),u){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,a),!0;case 5:return d.fn.call(d.context,t,r,a,n),!0;case 6:return d.fn.call(d.context,t,r,a,n,s),!0}for(c=1,l=new Array(u-1);c<u;c++)l[c-1]=arguments[c];d.fn.apply(d.context,l)}else{var h,p=d.length;for(c=0;c<p;c++)switch(d[c].once&&this.removeListener(e,d[c].fn,void 0,!0),u){case 1:d[c].fn.call(d[c].context);break;case 2:d[c].fn.call(d[c].context,t);break;case 3:d[c].fn.call(d[c].context,t,r);break;case 4:d[c].fn.call(d[c].context,t,r,a);break;default:if(!l)for(h=1,l=new Array(u-1);h<u;h++)l[h-1]=arguments[h];d[c].fn.apply(d[c].context,l)}}return!0},o.prototype.on=function(e,t,i){return n(this,e,t,i,!1)},o.prototype.once=function(e,t,i){return n(this,e,t,i,!0)},o.prototype.removeListener=function(e,t,r,a){var n=i?i+e:e;if(!this._events[n])return this;if(!t)return s(this,n),this;var o=this._events[n];if(o.fn)o.fn!==t||a&&!o.once||r&&o.context!==r||s(this,n);else{for(var l=0,c=[],d=o.length;l<d;l++)(o[l].fn!==t||a&&!o[l].once||r&&o[l].context!==r)&&c.push(o[l]);c.length?this._events[n]=1===c.length?c[0]:c:s(this,n)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=i,o.EventEmitter=o,e.exports=o}(MT)),MT.exports));const NT="1.6.16",FT={};function UT(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function BT(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function zT(e,t){let i=0;return i=(127&e[t])<<21,i|=(127&e[t+1])<<14,i|=(127&e[t+2])<<7,i|=127&e[t+3],i}function jT(e,t){const i=t;let r=0;for(;BT(e,t);){r+=10;r+=zT(e,t+6),UT(e,t+10)&&(r+=10),t+=r}if(r>0)return e.subarray(i,i+r)}function $T(e,t){return 255===e[t]&&240==(246&e[t+1])}function GT(e,t){return 1&e[t+1]?7:9}function qT(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function HT(e,t){return t+1<e.length&&$T(e,t)}function VT(e,t){if(HT(e,t)){const i=GT(e,t);if(t+i>=e.length)return!1;const r=qT(e,t);if(r<=i)return!1;const a=t+r;return a===e.length||HT(e,a)}return!1}function WT(e,t,i,r,a){if(!e.samplerate){const n=function(e,t,i,r){const a=t[i+2],n=a>>2&15;if(n>12){const t=new Error(`invalid ADTS sampling index:${n}`);return void e.emit(ab.ERROR,ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.FRAG_PARSING_ERROR,fatal:!0,error:t,reason:t.message})}const s=1+(a>>6&3),o=t[i+3]>>6&3|(1&a)<<2,l="mp4a.40."+s,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][n];let d=n;5!==s&&29!==s||(d-=3);const u=[s<<3|(14&d)>>1,(1&d)<<7|o<<3];return Eb.log(`manifest codec:${r}, parsed codec:${l}, channels:${o}, rate:${c} (ADTS object type:${s} sampling index:${n})`),{config:u,samplerate:c,channelCount:o,codec:l,parsedCodec:l,manifestCodec:r}}(t,i,r,a);if(!n)return;fb(e,n)}}function KT(e){return 9216e4/e}function YT(e,t,i,r,a){const n=r+a*KT(e.samplerate),s=function(e,t){const i=GT(e,t);if(t+i<=e.length){const r=qT(e,t)-i;if(r>0)return{headerLength:i,frameLength:r}}}(t,i);let o;if(s){const{frameLength:r,headerLength:a}=s,l=a+r,c=Math.max(0,i+l-t.length);c?(o=new Uint8Array(l-a),o.set(t.subarray(i+a,t.length),0)):o=t.subarray(i+a,i+l);const d={unit:o,pts:n};return c||e.samples.push(d),{sample:d,length:l,missing:c}}const l=t.length-i;o=new Uint8Array(l),o.set(t.subarray(i,t.length),0);return{sample:{unit:o,pts:n},length:l,missing:-1}}function JT(e,t){return BT(e,t)&&zT(e,t+6)+10<=e.length-t}function XT(e,t=0,i=Infinity){return function(e,t,i,r){const a=(n=e,n instanceof ArrayBuffer?n:n.buffer);var n;let s=1;"BYTES_PER_ELEMENT"in r&&(s=r.BYTES_PER_ELEMENT);const o=(h=e,h&&h.buffer instanceof ArrayBuffer&&void 0!==h.byteLength&&void 0!==h.byteOffset?e.byteOffset:0),l=(o+e.byteLength)/s,c=(o+t)/s,d=Math.floor(Math.max(0,Math.min(c,l))),u=Math.floor(Math.min(d+Math.max(i,0),l));var h;return new r(a,d,u-d)}(e,t,i,Uint8Array)}function QT(e){const t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.size<2)return;if(3!==e.data[0])return;const i=e.data.subarray(1).indexOf(0);if(-1===i)return;const r=Ib(XT(e.data,1,i)),a=e.data[2+i],n=e.data.subarray(3+i).indexOf(0);if(-1===n)return;const s=Ib(XT(e.data,3+i,n));let o;var l;return o="--\x3e"===r?Ib(XT(e.data,4+i+n)):(l=e.data.subarray(4+i+n))instanceof ArrayBuffer?l:0==l.byteOffset&&l.byteLength==l.buffer.byteLength?l.buffer:new Uint8Array(l).buffer,t.mimeType=r,t.pictureType=a,t.description=s,t.data=o,t}function ZT(e){return"PRIV"===e.type?function(e){if(e.size<2)return;const t=Ib(e.data,!0),i=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:i.buffer}}(e):"W"===e.type[0]?function(e){if("WXXX"===e.type){if(e.size<2)return;let t=1;const i=Ib(e.data.subarray(t),!0);t+=i.length+1;const r=Ib(e.data.subarray(t));return{key:e.type,info:i,data:r}}const t=Ib(e.data);return{key:e.type,info:"",data:t}}(e):"APIC"===e.type?QT(e):function(e){if(e.size<2)return;if("TXXX"===e.type){let t=1;const i=Ib(e.data.subarray(t),!0);t+=i.length+1;const r=Ib(e.data.subarray(t));return{key:e.type,info:i,data:r}}const t=Ib(e.data.subarray(1));return{key:e.type,info:"",data:t}}(e)}function eE(e){const t=String.fromCharCode(e[0],e[1],e[2],e[3]),i=zT(e,4);return{type:t,size:i,data:e.subarray(10,10+i)}}function tE(e){let t=0;const i=[];for(;BT(e,t);){const r=zT(e,t+6);e[t+5]>>6&1&&(t+=10),t+=10;const a=t+r;for(;t+10<a;){const r=eE(e.subarray(t)),a=ZT(r);a&&i.push(a),t+=r.size+10}UT(e,t)&&(t+=10)}return i}function iE(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info}function rE(e){if(8===e.data.byteLength){const t=new Uint8Array(e.data),i=1&t[3];let r=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return r/=45,i&&(r+=47721858.84),Math.round(r)}}function aE(e){const t=tE(e);for(let i=0;i<t.length;i++){const e=t[i];if(iE(e))return rE(e)}}let nE=function(e){return e.audioId3="org.id3",e.dateRange="com.apple.quicktime.HLS",e.emsg="https://aomedia.org/emsg/ID3",e.misbklv="urn:misb:KLV:bin:1910.1",e}({});function sE(e="",t=9e4){return{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}class oE{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,i,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,i){}demux(e,t){this.cachedData&&(e=hw(this.cachedData,e),this.cachedData=null);let i,r=jT(e,0),a=r?r.length:0;const n=this._audioTrack,s=this._id3Track,o=r?aE(r):void 0,l=e.length;for((null===this.basePTS||0===this.frameIndex&&Zv(o))&&(this.basePTS=lE(o,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),r&&r.length>0&&s.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:nE.audioId3,duration:Number.POSITIVE_INFINITY});a<l;){if(this.canParse(e,a)){const t=this.appendFrame(n,e,a);t?(this.frameIndex++,this.lastPTS=t.sample.pts,a+=t.length,i=a):a=l}else JT(e,a)?(r=jT(e,a),s.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:nE.audioId3,duration:Number.POSITIVE_INFINITY}),a+=r.length,i=a):a++;if(a===l&&i!==l){const t=e.slice(i);this.cachedData?this.cachedData=hw(this.cachedData,t):this.cachedData=t}}return{audioTrack:n,videoTrack:sE(),id3Track:s,textTrack:sE()}}demuxSampleAes(e,t,i){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:sE(),id3Track:this._id3Track,textTrack:sE()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const lE=(e,t,i)=>{if(Zv(e))return 90*e;return 9e4*t+(i?9e4*i.baseTime/i.timescale:0)};let cE=null;const dE=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],uE=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],hE=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],pE=[0,1,1,4];function mE(e,t,i,r,a){if(i+24>t.length)return;const n=fE(t,i);if(n&&i+n.frameLength<=t.length){const s=r+a*(9e4*n.samplesPerFrame/n.sampleRate),o={unit:t.subarray(i,i+n.frameLength),pts:s,dts:s};return e.config=[],e.channelCount=n.channelCount,e.samplerate=n.sampleRate,e.samples.push(o),{sample:o,length:n.frameLength,missing:0}}}function fE(e,t){const i=e[t+1]>>3&3,r=e[t+1]>>1&3,a=e[t+2]>>4&15,n=e[t+2]>>2&3;if(1!==i&&0!==a&&15!==a&&3!==n){const s=e[t+2]>>1&1,o=e[t+3]>>6,l=1e3*dE[14*(3===i?3-r:3===r?3:4)+a-1],c=uE[3*(3===i?0:2===i?1:2)+n],d=3===o?1:2,u=hE[i][r],h=pE[r],p=8*u*h,m=Math.floor(u*l/c+s)*h;if(null===cE){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);cE=e?parseInt(e[1]):0}return!!cE&&cE<=87&&2===r&&l>=224e3&&0===o&&(e[t+3]=128|e[t+3]),{sampleRate:c,channelCount:d,frameLength:m,samplesPerFrame:p}}}function gE(e,t){return!(255!==e[t]||224&~e[t+1]||!(6&e[t+1]))}function yE(e,t){return t+1<e.length&&gE(e,t)}function vE(e,t){if(t+1<e.length&&gE(e,t)){const i=4,r=fE(e,t);let a=i;null!=r&&r.frameLength&&(a=r.frameLength);const n=t+a;return n===e.length||yE(e,n)}return!1}const bE=(e,t)=>{let i=0,r=5;t+=r;const a=new Uint32Array(1),n=new Uint32Array(1),s=new Uint8Array(1);for(;r>0;){s[0]=e[t];const o=Math.min(r,8),l=8-o;n[0]=4278190080>>>24+l<<l,a[0]=(s[0]&n[0])>>l,i=i?i<<o|a[0]:a[0],t+=1,r-=o}return i};class wE extends oE{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,i,r){super.resetInitSegment(e,t,i,r),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,i){const r=SE(e,t,i,this.basePTS,this.frameIndex);if(-1!==r){return{sample:e.samples[e.samples.length-1],length:r,missing:0}}}static probe(e){if(!e)return!1;const t=jT(e,0);if(!t)return!1;const i=t.length;return 11===e[i]&&119===e[i+1]&&void 0!==aE(t)&&bE(e,i)<16}}function SE(e,t,i,r,a){if(i+8>t.length)return-1;if(11!==t[i]||119!==t[i+1])return-1;const n=t[i+4]>>6;if(n>=3)return-1;const s=[48e3,44100,32e3][n],o=63&t[i+4],l=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*o+n];if(i+l>t.length)return-1;const c=t[i+6]>>5;let d=0;2===c?d+=2:(1&c&&1!==c&&(d+=2),4&c&&(d+=2));const u=(t[i+6]<<8|t[i+7])>>12-d&1,h=[2,1,2,3,3,4,4,5][c]+u,p=t[i+5]>>3,m=7&t[i+5],f=new Uint8Array([n<<6|p<<1|m>>2,(3&m)<<6|c<<3|u<<2|o>>4,o<<4&224]),g=r+a*(1536/s*9e4),y=t.subarray(i,i+l);return e.config=f,e.channelCount=h,e.samplerate=s,e.samples.push({unit:y,pts:g}),l}const kE=/\/emsg[-/]ID3/i;function TE(e,t){return Zv(e.presentationTime)?e.presentationTime/e.timeScale:t+e.presentationTimeDelta/e.timeScale}class EE{constructor(e,t,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new GS(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,US)}decryptAacSample(e,t,i){const r=e[t].unit;if(r.length<=16)return;const a=r.subarray(16,r.length-r.length%16),n=a.buffer.slice(a.byteOffset,a.byteOffset+a.length);this.decryptBuffer(n).then(a=>{const n=new Uint8Array(a);r.set(n,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,i)}).catch(i)}decryptAacSamples(e,t,i){for(;;t++){if(t>=e.length)return void i();if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,i),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=16*Math.floor((e.length-48)/160)+16,i=new Int8Array(t);let r=0;for(let a=32;a<e.length-16;a+=160,r+=16)i.set(e.subarray(a,a+16),r);return i}getAvcDecryptedUnit(e,t){const i=new Uint8Array(t);let r=0;for(let a=32;a<e.length-16;a+=160,r+=16)e.set(i.subarray(r,r+16),a);return e}decryptAvcSample(e,t,i,r,a){const n=yw(a.data),s=this.getAvcEncryptedData(n);this.decryptBuffer(s.buffer).then(s=>{a.data=this.getAvcDecryptedUnit(n,s),this.decrypter.isSync()||this.decryptAvcSamples(e,t,i+1,r)}).catch(r)}decryptAvcSamples(e,t,i,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,i=0){if(t>=e.length)return void r();const a=e[t].units;for(;!(i>=a.length);i++){const n=a[i];if(!(n.data.length<=48||1!==n.type&&5!==n.type||(this.decryptAvcSample(e,t,i,r,n),this.decrypter.isSync())))return}}}}class AE{constructor(){this.VideoSample=null}createVideoSample(e,t,i){return{key:e,frame:!1,pts:t,dts:i,units:[],length:0}}getLastNalUnit(e){var t;let i,r=this.VideoSample;if(r&&0!==r.units.length||(r=e[e.length-1]),null!=(t=r)&&t.units){const e=r.units;i=e[e.length-1]}return i}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){const i=t.samples,r=i.length;if(!r)return void t.dropped++;{const t=i[r-1];e.pts=t.pts,e.dts=t.dts}}t.samples.push(e)}}parseNALu(e,t,i){const r=t.byteLength;let a=e.naluState||0;const n=a,s=[];let o,l,c,d=0,u=-1,h=0;for(-1===a&&(u=0,h=this.getNALuType(t,0),a=0,d=1);d<r;)if(o=t[d++],a)if(1!==a)if(o)if(1===o){if(l=d-a-1,u>=0){const e={data:t.subarray(u,l),type:h};s.push(e)}else{const i=this.getLastNalUnit(e.samples);i&&(n&&d<=4-n&&i.state&&(i.data=i.data.subarray(0,i.data.byteLength-n)),l>0&&(i.data=hw(i.data,t.subarray(0,l)),i.state=0))}d<r?(c=this.getNALuType(t,d),u=d,h=c,a=0):a=-1}else a=0;else a=3;else a=o?0:2;else a=o?0:1;if(u>=0&&a>=0){const e={data:t.subarray(u,r),type:h,state:a};s.push(e)}if(0===s.length){const i=this.getLastNalUnit(e.samples);i&&(i.data=hw(i.data,t))}return e.naluState=a,s}}class CE{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,i=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");r.set(e.subarray(i,i+a)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*a,this.bytesAvailable-=a}skipBits(e){let t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(t=(e-=this.bitsAvailable)>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const i=this.word>>>32-t;if(e>32&&Eb.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return t=e-t,t>0&&this.bitsAvailable?i<<t|this.readBits(t):i}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return 1===this.readBits(1)}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class IE extends AE{parsePES(e,t,i,r){const a=this.parseNALu(e,i.data,r);let n,s=this.VideoSample,o=!1;i.data=null,s&&a.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,i.pts,i.dts)),a.forEach(r=>{var a,l;switch(r.type){case 1:{let t=!1;n=!0;const a=r.data;if(o&&a.length>4){const e=this.readSliceType(a);2!==e&&4!==e&&7!==e&&9!==e||(t=!0)}var c;if(t)null!=(c=s)&&c.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null);s||(s=this.VideoSample=this.createVideoSample(!0,i.pts,i.dts)),s.frame=!0,s.key=t;break}case 5:n=!0,null!=(a=s)&&a.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,i.pts,i.dts)),s.key=!0,s.frame=!0;break;case 6:n=!0,gw(r.data,1,i.pts,t.samples);break;case 7:{var d,u;n=!0,o=!0;const t=r.data,i=this.readSPS(t);if(!e.sps||e.width!==i.width||e.height!==i.height||(null==(d=e.pixelRatio)?void 0:d[0])!==i.pixelRatio[0]||(null==(u=e.pixelRatio)?void 0:u[1])!==i.pixelRatio[1]){e.width=i.width,e.height=i.height,e.pixelRatio=i.pixelRatio,e.sps=[t];const r=t.subarray(1,4);let a="avc1.";for(let e=0;e<3;e++){let t=r[e].toString(16);t.length<2&&(t="0"+t),a+=t}e.codec=a}break}case 8:n=!0,e.pps=[r.data];break;case 9:n=!0,e.audFound=!0,null!=(l=s)&&l.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,i.pts,i.dts));break;case 12:n=!0;break;default:n=!1}if(s&&n){s.units.push(r)}}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}getNALuType(e,t){return 31&e[t]}readSliceType(e){const t=new CE(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let i,r=8,a=8;for(let n=0;n<e;n++)0!==a&&(i=t.readEG(),a=(r+i+256)%256),r=0===a?r:a}readSPS(e){const t=new CE(e);let i,r,a,n=0,s=0,o=0,l=0;const c=t.readUByte.bind(t),d=t.readBits.bind(t),u=t.readUEG.bind(t),h=t.readBoolean.bind(t),p=t.skipBits.bind(t),m=t.skipEG.bind(t),f=t.skipUEG.bind(t),g=this.skipScalingList.bind(this);c();const y=c();if(d(5),p(3),c(),f(),100===y||110===y||122===y||244===y||44===y||83===y||86===y||118===y||128===y){const e=u();if(3===e&&p(1),f(),f(),p(1),h())for(r=3!==e?8:12,a=0;a<r;a++)h()&&g(a<6?16:64,t)}f();const v=u();if(0===v)u();else if(1===v)for(p(1),m(),m(),i=u(),a=0;a<i;a++)m();f(),p(1);const b=u(),w=u(),S=d(1);0===S&&p(1),p(1),h()&&(n=u(),s=u(),o=u(),l=u());let k=[1,1];if(h()&&h()){switch(c()){case 1:k=[1,1];break;case 2:k=[12,11];break;case 3:k=[10,11];break;case 4:k=[16,11];break;case 5:k=[40,33];break;case 6:k=[24,11];break;case 7:k=[20,11];break;case 8:k=[32,11];break;case 9:k=[80,33];break;case 10:k=[18,11];break;case 11:k=[15,11];break;case 12:k=[64,33];break;case 13:k=[160,99];break;case 14:k=[4,3];break;case 15:k=[3,2];break;case 16:k=[2,1];break;case 255:k=[c()<<8|c(),c()<<8|c()]}}return{width:Math.ceil(16*(b+1)-2*n-2*s),height:(2-S)*(w+1)*16-(S?2:4)*(o+l),pixelRatio:k}}}class PE extends AE{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,i,r){const a=this.parseNALu(e,i.data,r);let n,s=this.VideoSample,o=!1;i.data=null,s&&a.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,i.pts,i.dts)),a.forEach(r=>{var a,l;switch(r.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:s||(s=this.VideoSample=this.createVideoSample(!1,i.pts,i.dts)),s.frame=!0,n=!0;break;case 16:case 17:case 18:case 21:var c;if(n=!0,o)null!=(c=s)&&c.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null);s||(s=this.VideoSample=this.createVideoSample(!0,i.pts,i.dts)),s.key=!0,s.frame=!0;break;case 19:case 20:n=!0,null!=(a=s)&&a.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,i.pts,i.dts)),s.key=!0,s.frame=!0;break;case 39:n=!0,gw(r.data,2,i.pts,t.samples);break;case 32:n=!0,e.vps||("object"!=typeof e.params&&(e.params={}),e.params=fb(e.params,this.readVPS(r.data)),this.initVPS=r.data),e.vps=[r.data];break;case 33:if(n=!0,o=!0,void 0===e.vps||e.vps[0]===this.initVPS||void 0===e.sps||this.matchSPS(e.sps[0],r.data)||(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const t=this.readSPS(r.data);e.width=t.width,e.height=t.height,e.pixelRatio=t.pixelRatio,e.codec=t.codecString,e.sps=[],"object"!=typeof e.params&&(e.params={});for(const i in t.params)e.params[i]=t.params[i]}this.pushParameterSet(e.sps,r.data,e.vps),s||(s=this.VideoSample=this.createVideoSample(!0,i.pts,i.dts)),s.key=!0;break;case 34:if(n=!0,"object"==typeof e.params){if(!e.pps){e.pps=[];const t=this.readPPS(r.data);for(const i in t)e.params[i]=t[i]}this.pushParameterSet(e.pps,r.data,e.vps)}break;case 35:n=!0,e.audFound=!0,null!=(l=s)&&l.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,i.pts,i.dts));break;default:n=!1}if(s&&n){s.units.push(r)}}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}pushParameterSet(e,t,i){(i&&i[0]===this.initVPS||!i&&!e.length)&&e.push(t)}getNALuType(e,t){return(126&e[t])>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let i=0;for(let r=0;r<e.byteLength;r++)r>=2&&3===e[r]&&0===e[r-1]&&0===e[r-2]||(t[i]=e[r],i++);return new Uint8Array(t.buffer,0,i)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new CE(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);return{numTemporalLayers:t.readBits(3)+1,temporalIdNested:t.readBoolean()}}readSPS(e){const t=new CE(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const i=t.readBits(3);t.readBoolean();const r=t.readBits(2),a=t.readBoolean(),n=t.readBits(5),s=t.readUByte(),o=t.readUByte(),l=t.readUByte(),c=t.readUByte(),d=t.readUByte(),u=t.readUByte(),h=t.readUByte(),p=t.readUByte(),m=t.readUByte(),f=t.readUByte(),g=t.readUByte(),y=[],v=[];for(let H=0;H<i;H++)y.push(t.readBoolean()),v.push(t.readBoolean());if(i>0)for(let H=i;H<8;H++)t.readBits(2);for(let H=0;H<i;H++)y[H]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),v[H]&&t.readUByte();t.readUEG();const b=t.readUEG();3==b&&t.skipBits(1);const w=t.readUEG(),S=t.readUEG(),k=t.readBoolean();let T=0,E=0,A=0,C=0;k&&(T+=t.readUEG(),E+=t.readUEG(),A+=t.readUEG(),C+=t.readUEG());const I=t.readUEG(),P=t.readUEG(),_=t.readUEG();for(let H=t.readBoolean()?0:i;H<=i;H++)t.skipUEG(),t.skipUEG(),t.skipUEG();t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG();if(t.readBoolean()){if(t.readBoolean())for(let e=0;e<4;e++)for(let i=0;i<(3===e?2:6);i++){if(t.readBoolean()){const i=Math.min(64,1<<4+(e<<1));e>1&&t.readEG();for(let e=0;e<i;e++)t.readEG()}else t.readUEG()}}t.readBoolean(),t.readBoolean();t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const R=t.readUEG();let x=0;for(let H=0;H<R;H++){let e=!1;if(0!==H&&(e=t.readBoolean()),e){H===R&&t.readUEG(),t.readBoolean(),t.readUEG();let e=0;for(let i=0;i<=x;i++){const i=t.readBoolean();let r=!1;i||(r=t.readBoolean()),(i||r)&&e++}x=e}else{const e=t.readUEG(),i=t.readUEG();x=e+i;for(let r=0;r<e;r++)t.readUEG(),t.readBoolean();for(let r=0;r<i;r++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const e=t.readUEG();for(let i=0;i<e;i++){for(let e=0;e<_+4;e++)t.readBits(1);t.readBits(1)}}let L=0,D=1,M=1,O=!0,N=1,F=0;t.readBoolean(),t.readBoolean();let U=!1;if(t.readBoolean()){if(t.readBoolean()){const e=t.readUByte();e>0&&e<16?(D=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][e-1],M=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][e-1]):255===e&&(D=t.readBits(16),M=t.readBits(16))}t.readBoolean()&&t.readBoolean();if(t.readBoolean()){t.readBits(3),t.readBoolean();t.readBoolean()&&(t.readUByte(),t.readUByte(),t.readUByte())}t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),U=t.readBoolean(),U&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG());if(t.readBoolean()){N=t.readBits(32),F=t.readBits(32);t.readBoolean()&&t.readUEG();if(t.readBoolean()){const e=t.readBoolean(),r=t.readBoolean();let a=!1;(e||r)&&(a=t.readBoolean(),a&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),a&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let n=0;n<=i;n++){O=t.readBoolean();let i=!1;O||t.readBoolean()?t.readEG():i=t.readBoolean();const n=i?1:t.readUEG()+1;if(e)for(let e=0;e<n;e++)t.readUEG(),t.readUEG(),a&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(r)for(let e=0;e<n;e++)t.readUEG(),t.readUEG(),a&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),L=t.readUEG())}let B=w,z=S;if(k){let e=1,t=1;1===b?e=t=2:2==b&&(e=2),B=w-e*E-e*T,z=S-t*C-t*A}const j=r?["A","B","C"][r]:"",$=s<<24|o<<16|l<<8|c;let G=0;for(let H=0;H<32;H++)G=(G|($>>H&1)<<31-H)>>>0;let q=G.toString(16);1===n&&"2"===q&&(q="6");return{codecString:`hvc1.${j}${n}.${q}.${a?"H":"L"}${g}.B0`,params:{general_tier_flag:a,general_profile_idc:n,general_profile_space:r,general_profile_compatibility_flags:[s,o,l,c],general_constraint_indicator_flags:[d,u,h,p,m,f],general_level_idc:g,bit_depth:I+8,bit_depth_luma_minus8:I,bit_depth_chroma_minus8:P,min_spatial_segmentation_idc:L,chroma_format_idc:b,frame_rate:{fixed:O,fps:F/N}},width:B,height:z,pixelRatio:[D,M]}}readPPS(e){const t=new CE(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2);t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const i=t.readBoolean(),r=t.readBoolean();let a=1;return r&&i?a=0:r?a=3:i&&(a=2),{parallelismType:a}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const _E=188;class RE{constructor(e,t,i,r){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=i,this.logger=r,this.videoParser=null}static probe(e,t){const i=RE.syncOffset(e);return i>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${i}`),-1!==i}static syncOffset(e){const t=e.length;let i=Math.min(940,t-_E)+1,r=0;for(;r<i;){let a=!1,n=-1,s=0;for(let o=r;o<t;o+=_E){if(71!==e[o]||t-o!==_E&&71!==e[o+_E]){if(s)return-1;break}if(s++,-1===n&&(n=o,0!==n&&(i=Math.min(n+18612,e.length-_E)+1)),a||(a=0===xE(e,o)),a&&s>1&&(0===n&&s>2||o+_E>i))return n}r++}return-1}static createTrack(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:Jb[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}}resetInitSegment(e,t,i,r){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=RE.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=RE.createTrack("audio",r),this._id3Track=RE.createTrack("id3"),this._txtTrack=RE.createTrack("text"),this._audioTrack.segmentCodec="aac",this.videoParser=null,this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=i}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:i}=this;e&&(e.pesData=null),t&&(t.pesData=null),i&&(i.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,i=!1,r=!1){let a;i||(this.sampleAes=null);const n=this._videoTrack,s=this._audioTrack,o=this._id3Track,l=this._txtTrack;let c=n.pid,d=n.pesData,u=s.pid,h=o.pid,p=s.pesData,m=o.pesData,f=null,g=this.pmtParsed,y=this._pmtId,v=e.length;if(this.remainderData&&(v=(e=hw(this.remainderData,e)).length,this.remainderData=null),v<_E&&!r)return this.remainderData=e,{audioTrack:s,videoTrack:n,id3Track:o,textTrack:l};const b=Math.max(0,RE.syncOffset(e));v-=(v-b)%_E,v<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,v,e.buffer.byteLength-v));let w=0;for(let k=b;k<v;k+=_E)if(71===e[k]){const t=!!(64&e[k+1]),r=xE(e,k);let v;if((48&e[k+3])>>4>1){if(v=k+5+e[k+4],v===k+_E)continue}else v=k+4;switch(r){case c:t&&(d&&(a=NE(d,this.logger))&&(this.readyVideoParser(n.segmentCodec),null!==this.videoParser&&this.videoParser.parsePES(n,l,a,!1)),d={data:[],size:0}),d&&(d.data.push(e.subarray(v,k+_E)),d.size+=k+_E-v);break;case u:if(t){if(p&&(a=NE(p,this.logger)))switch(s.segmentCodec){case"aac":this.parseAACPES(s,a);break;case"mp3":this.parseMPEGPES(s,a);break;case"ac3":this.parseAC3PES(s,a)}p={data:[],size:0}}p&&(p.data.push(e.subarray(v,k+_E)),p.size+=k+_E-v);break;case h:t&&(m&&(a=NE(m,this.logger))&&this.parseID3PES(o,a),m={data:[],size:0}),m&&(m.data.push(e.subarray(v,k+_E)),m.size+=k+_E-v);break;case 0:t&&(v+=e[v]+1),y=this._pmtId=LE(e,v);break;case y:{t&&(v+=e[v]+1);const r=DE(e,v,this.typeSupported,i,this.observer,this.logger);c=r.videoPid,c>0&&(n.pid=c,n.segmentCodec=r.segmentVideoCodec),u=r.audioPid,u>0&&(s.pid=u,s.segmentCodec=r.segmentAudioCodec),h=r.id3Pid,h>0&&(o.pid=h),null===f||g||(this.logger.warn(`MPEG-TS PMT found at ${k} after unknown PID '${f}'. Backtracking to sync byte @${b} to parse all TS packets.`),f=null,k=b-188),g=this.pmtParsed=!0;break}case 17:case 8191:break;default:f=r}}else w++;w>0&&ME(this.observer,new Error(`Found ${w} TS packet/s that do not start with 0x47`),void 0,this.logger),n.pesData=d,s.pesData=p,o.pesData=m;const S={audioTrack:s,videoTrack:n,id3Track:o,textTrack:l};return r&&this.extractRemainingSamples(S),S}flush(){const{remainderData:e}=this;let t;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:i,id3Track:r,textTrack:a}=e,n=i.pesData,s=t.pesData,o=r.pesData;let l;if(n&&(l=NE(n,this.logger))?(this.readyVideoParser(i.segmentCodec),null!==this.videoParser&&(this.videoParser.parsePES(i,a,l,!0),i.pesData=null)):i.pesData=n,s&&(l=NE(s,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,l);break;case"mp3":this.parseMPEGPES(t,l);break;case"ac3":this.parseAC3PES(t,l)}t.pesData=null}else null!=s&&s.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=s;o&&(l=NE(o,this.logger))?(this.parseID3PES(r,l),r.pesData=null):r.pesData=o}demuxSampleAes(e,t,i){const r=this.demux(e,i,!0,!this.config.progressive),a=this.sampleAes=new EE(this.observer,this.config,t);return this.decrypt(r,a)}readyVideoParser(e){null===this.videoParser&&("avc"===e?this.videoParser=new IE:"hevc"===e&&(this.videoParser=new PE))}decrypt(e,t){return new Promise(i=>{const{audioTrack:r,videoTrack:a}=e;r.samples&&"aac"===r.segmentCodec?t.decryptAacSamples(r.samples,0,()=>{a.samples?t.decryptAvcSamples(a.samples,0,0,()=>{i(e)}):i(e)}):a.samples&&t.decryptAvcSamples(a.samples,0,0,()=>{i(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let i=0;const r=this.aacOverFlow;let a,n,s,o=t.data;if(r){this.aacOverFlow=null;const t=r.missing,a=r.sample.unit.byteLength;if(-1===t)o=hw(r.sample.unit,o);else{const n=a-t;r.sample.unit.set(o.subarray(0,t),n),e.samples.push(r.sample),i=r.missing}}for(a=i,n=o.length;a<n-1&&!HT(o,a);a++);if(a!==i){let e;const t=a<n-1;if(e=t?`AAC PES did not start with ADTS header,offset:${a}`:"No ADTS header found in AAC PES",ME(this.observer,new Error(e),t,this.logger),!t)return}if(WT(e,this.observer,o,a,this.audioCodec),void 0!==t.pts)s=t.pts;else{if(!r)return void this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");{const t=KT(e.samplerate);s=r.sample.pts+t}}let l,c=0;for(;a<n;){if(l=YT(e,o,a,s,c),a+=l.length,l.missing){this.aacOverFlow=l;break}for(c++;a<n-1&&!HT(o,a);a++);}}parseMPEGPES(e,t){const i=t.data,r=i.length;let a=0,n=0;const s=t.pts;if(void 0!==s)for(;n<r;)if(yE(i,n)){const t=mE(e,i,n,s,a);if(!t)break;n+=t.length,a++}else n++;else this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")}parseAC3PES(e,t){{const i=t.data,r=t.pts;if(void 0===r)return void this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");const a=i.length;let n,s=0,o=0;for(;o<a&&(n=SE(e,i,o,r,s++))>0;)o+=n}}parseID3PES(e,t){if(void 0===t.pts)return void this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");const i=fb({},t,{type:this._videoTrack?nE.emsg:nE.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(i)}}function xE(e,t){return((31&e[t+1])<<8)+e[t+2]}function LE(e,t){return(31&e[t+10])<<8|e[t+11]}function DE(e,t,i,r,a,n){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<o;){const o=xE(e,t),l=(15&e[t+3])<<8|e[t+4];switch(e[t]){case 207:if(!r){OE("ADTS AAC",n);break}case 15:-1===s.audioPid&&(s.audioPid=o);break;case 21:-1===s.id3Pid&&(s.id3Pid=o);break;case 219:if(!r){OE("H.264",n);break}case 27:-1===s.videoPid&&(s.videoPid=o);break;case 3:case 4:i.mpeg||i.mp3?-1===s.audioPid&&(s.audioPid=o,s.segmentAudioCodec="mp3"):n.log("MPEG audio found, not supported in this browser");break;case 193:if(!r){OE("AC-3",n);break}case 129:i.ac3?-1===s.audioPid&&(s.audioPid=o,s.segmentAudioCodec="ac3"):n.log("AC-3 audio found, not supported in this browser");break;case 6:if(-1===s.audioPid&&l>0){let r=t+5,a=l;for(;a>2;){if(106===e[r])!0!==i.ac3?n.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=o,s.segmentAudioCodec="ac3");const t=e[r+1]+2;r+=t,a-=t}}break;case 194:case 135:return ME(a,new Error("Unsupported EC-3 in M2TS found"),void 0,n),s;case 36:-1===s.videoPid&&(s.videoPid=o,s.segmentVideoCodec="hevc",n.log("HEVC in M2TS found"))}t+=l+5}return s}function ME(e,t,i,r){r.warn(`parsing error: ${t.message}`),e.emit(ab.ERROR,ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.FRAG_PARSING_ERROR,fatal:!1,levelRetry:i,error:t,reason:t.message})}function OE(e,t){t.log(`${e} with AES-128-CBC encryption found in unencrypted stream`)}function NE(e,t){let i,r,a,n,s,o=0;const l=e.data;if(!e||0===e.size)return null;for(;l[0].length<19&&l.length>1;)l[0]=hw(l[0],l[1]),l.splice(1,1);i=l[0];if(1===(i[0]<<16)+(i[1]<<8)+i[2]){if(r=(i[4]<<8)+i[5],r&&r>e.size-6)return null;const c=i[7];192&c&&(n=536870912*(14&i[9])+4194304*(255&i[10])+16384*(254&i[11])+128*(255&i[12])+(254&i[13])/2,64&c?(s=536870912*(14&i[14])+4194304*(255&i[15])+16384*(254&i[16])+128*(255&i[17])+(254&i[18])/2,n-s>54e5&&(t.warn(`${Math.round((n-s)/9e4)}s delta between PTS and DTS, align them`),n=s)):s=n),a=i[8];let d=a+9;if(e.size<=d)return null;e.size-=d;const u=new Uint8Array(e.size);for(let e=0,t=l.length;e<t;e++){i=l[e];let t=i.byteLength;if(d){if(d>t){d-=t;continue}i=i.subarray(d),t-=d,d=0}u.set(i,o),o+=t}return r&&(r-=a+3),{data:u,pts:n,dts:s,len:r}}return null}class FE{static getSilentFrame(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}const UE=Math.pow(2,32)-1;class BE{static init(){let e;for(e in BE.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},BE.types)BE.types.hasOwnProperty(e)&&(BE.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);BE.HDLR_TYPES={video:t,audio:i};const r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);BE.STTS=BE.STSC=BE.STCO=a,BE.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),BE.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),BE.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),BE.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const n=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),o=new Uint8Array([0,0,0,1]);BE.FTYP=BE.box(BE.types.ftyp,n,o,n,s),BE.DINF=BE.box(BE.types.dinf,BE.box(BE.types.dref,r))}static box(e,...t){let i=8,r=t.length;const a=r;for(;r--;)i+=t[r].byteLength;const n=new Uint8Array(i);for(n[0]=i>>24&255,n[1]=i>>16&255,n[2]=i>>8&255,n[3]=255&i,n.set(e,4),r=0,i=8;r<a;r++)n.set(t[r],i),i+=t[r].byteLength;return n}static hdlr(e){return BE.box(BE.types.hdlr,BE.HDLR_TYPES[e])}static mdat(e){return BE.box(BE.types.mdat,e)}static mdhd(e,t){t*=e;const i=Math.floor(t/(UE+1)),r=Math.floor(t%(UE+1));return BE.box(BE.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,r>>24,r>>16&255,r>>8&255,255&r,85,196,0,0]))}static mdia(e){return BE.box(BE.types.mdia,BE.mdhd(e.timescale||0,e.duration||0),BE.hdlr(e.type),BE.minf(e))}static mfhd(e){return BE.box(BE.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))}static minf(e){return"audio"===e.type?BE.box(BE.types.minf,BE.box(BE.types.smhd,BE.SMHD),BE.DINF,BE.stbl(e)):BE.box(BE.types.minf,BE.box(BE.types.vmhd,BE.VMHD),BE.DINF,BE.stbl(e))}static moof(e,t,i){return BE.box(BE.types.moof,BE.mfhd(e),BE.traf(i,t))}static moov(e){let t=e.length;const i=[];for(;t--;)i[t]=BE.trak(e[t]);return BE.box.apply(null,[BE.types.moov,BE.mvhd(e[0].timescale||0,e[0].duration||0)].concat(i).concat(BE.mvex(e)))}static mvex(e){let t=e.length;const i=[];for(;t--;)i[t]=BE.trex(e[t]);return BE.box.apply(null,[BE.types.mvex,...i])}static mvhd(e,t){t*=e;const i=Math.floor(t/(UE+1)),r=Math.floor(t%(UE+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,r>>24,r>>16&255,r>>8&255,255&r,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return BE.box(BE.types.mvhd,a)}static sdtp(e){const t=e.samples||[],i=new Uint8Array(4+t.length);let r,a;for(r=0;r<t.length;r++)a=t[r].flags,i[r+4]=a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy;return BE.box(BE.types.sdtp,i)}static stbl(e){return BE.box(BE.types.stbl,BE.stsd(e),BE.box(BE.types.stts,BE.STTS),BE.box(BE.types.stsc,BE.STSC),BE.box(BE.types.stsz,BE.STSZ),BE.box(BE.types.stco,BE.STCO))}static avc1(e){let t,i,r,a=[],n=[];for(t=0;t<e.sps.length;t++)i=e.sps[t],r=i.byteLength,a.push(r>>>8&255),a.push(255&r),a=a.concat(Array.prototype.slice.call(i));for(t=0;t<e.pps.length;t++)i=e.pps[t],r=i.byteLength,n.push(r>>>8&255),n.push(255&r),n=n.concat(Array.prototype.slice.call(i));const s=BE.box(BE.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|e.sps.length].concat(a).concat([e.pps.length]).concat(n))),o=e.width,l=e.height,c=e.pixelRatio[0],d=e.pixelRatio[1];return BE.box(BE.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,o>>8&255,255&o,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,BE.box(BE.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),BE.box(BE.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d])))}static esds(e){const t=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,...t,6,1,2])}static audioStsd(e){const t=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,t>>8&255,255&t,0,0])}static mp4a(e){return BE.box(BE.types.mp4a,BE.audioStsd(e),BE.box(BE.types.esds,BE.esds(e)))}static mp3(e){return BE.box(BE.types[".mp3"],BE.audioStsd(e))}static ac3(e){return BE.box(BE.types["ac-3"],BE.audioStsd(e),BE.box(BE.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if("audio"===e.type){if("aac"===t)return BE.box(BE.types.stsd,BE.STSD,BE.mp4a(e));if("ac3"===t&&e.config)return BE.box(BE.types.stsd,BE.STSD,BE.ac3(e));if("mp3"===t&&"mp3"===e.codec)return BE.box(BE.types.stsd,BE.STSD,BE.mp3(e))}else{if(!e.pps||!e.sps)throw new Error("video track missing pps or sps");if("avc"===t)return BE.box(BE.types.stsd,BE.STSD,BE.avc1(e));if("hevc"===t&&e.vps)return BE.box(BE.types.stsd,BE.STSD,BE.hvc1(e))}throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,i=(e.duration||0)*(e.timescale||0),r=e.width||0,a=e.height||0,n=Math.floor(i/(UE+1)),s=Math.floor(i%(UE+1));return BE.box(BE.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,s>>24,s>>16&255,s>>8&255,255&s,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,255&r,0,0,a>>8&255,255&a,0,0]))}static traf(e,t){const i=BE.sdtp(e),r=e.id,a=Math.floor(t/(UE+1)),n=Math.floor(t%(UE+1));return BE.box(BE.types.traf,BE.box(BE.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r])),BE.box(BE.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,n>>24,n>>16&255,n>>8&255,255&n])),BE.trun(e,i.length+16+20+8+16+8+8),i)}static trak(e){return e.duration=e.duration||4294967295,BE.box(BE.types.trak,BE.tkhd(e),BE.mdia(e))}static trex(e){const t=e.id;return BE.box(BE.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const i=e.samples||[],r=i.length,a=12+16*r,n=new Uint8Array(a);let s,o,l,c,d,u;for(t+=8+a,n.set(["video"===e.type?1:0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0),s=0;s<r;s++)o=i[s],l=o.duration,c=o.size,d=o.flags,u=o.cts,n.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,c>>>24&255,c>>>16&255,c>>>8&255,255&c,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,61440&d.degradPrio,15&d.degradPrio,u>>>24&255,u>>>16&255,u>>>8&255,255&u],12+16*s);return BE.box(BE.types.trun,n)}static initSegment(e){BE.types||BE.init();const t=BE.moov(e);return hw(BE.FTYP,t)}static hvc1(e){const t=e.params,i=[e.vps,e.sps,e.pps],r=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),3|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),i.length]);let a=r.length;for(let h=0;h<i.length;h+=1){a+=3;for(let e=0;e<i[h].length;e+=1)a+=2+i[h][e].length}const n=new Uint8Array(a);n.set(r,0),a=r.length;const s=i.length-1;for(let h=0;h<i.length;h+=1){n.set(new Uint8Array([32+h|(h===s?128:0),0,i[h].length]),a),a+=3;for(let e=0;e<i[h].length;e+=1)n.set(new Uint8Array([i[h][e].length>>8,255&i[h][e].length]),a),a+=2,n.set(i[h][e],a),a+=i[h][e].length}const o=BE.box(BE.types.hvcC,n),l=e.width,c=e.height,d=e.pixelRatio[0],u=e.pixelRatio[1];return BE.box(BE.types.hvc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,c>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,BE.box(BE.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),BE.box(BE.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,u>>24,u>>16&255,u>>8&255,255&u])))}}BE.types=void 0,BE.HDLR_TYPES=void 0,BE.STTS=void 0,BE.STSC=void 0,BE.STCO=void 0,BE.STSZ=void 0,BE.VMHD=void 0,BE.SMHD=void 0,BE.STSD=void 0,BE.FTYP=void 0,BE.DINF=void 0;function zE(e,t,i=1,r=!1){const a=e*t*i;return r?Math.round(a):a}function jE(e,t=!1){return zE(e,1e3,1/9e4,t)}function $E(e){const{baseTime:t,timescale:i,trackId:r}=e;return`${t/i} (${t}/${i}) trackId: ${r}`}let GE,qE=null,HE=null;function VE(e,t,i,r){return{duration:t,size:i,cts:r,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}class WE extends vb{constructor(e,t,i,r){if(super("mp4-remuxer",r),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextVideoTs=null,this.nextAudioTs=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=i,this.ISGenerated=!1,null===qE){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);qE=e?parseInt(e[1]):0}if(null===HE){const e=navigator.userAgent.match(/Safari\/(\d+)/i);HE=e?parseInt(e[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){const t=this._initPTS;t&&e&&e.trackId===t.trackId&&e.baseTime===t.baseTime&&e.timescale===t.timescale||this.log(`Reset initPTS: ${t?$E(t):t} > ${e?$E(e):e}`),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.log("reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.log("ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const i=e[0].pts,r=e.reduce((e,r)=>{let a=r.pts,n=a-e;return n<-4294967296&&(t=!0,a=KE(a,i),n=a-e),n>0?e:a},i);return t&&this.debug("PTS rollover detected"),r}remux(e,t,i,r,a,n,s,o){let l,c,d,u,h,p,m=a,f=a;const g=e.pid>-1,y=t.pid>-1,v=t.samples.length,b=e.samples.length>0,w=s&&v>0||v>1;if((!g||b)&&(!y||w)||this.ISGenerated||s){if(this.ISGenerated){var S,k,T,E;const e=this.videoTrackConfig;(e&&(t.width!==e.width||t.height!==e.height||(null==(S=t.pixelRatio)?void 0:S[0])!==(null==(k=e.pixelRatio)?void 0:k[0])||(null==(T=t.pixelRatio)?void 0:T[1])!==(null==(E=e.pixelRatio)?void 0:E[1]))||!e&&w||null===this.nextAudioTs&&b)&&this.resetInitSegment()}this.ISGenerated||(d=this.generateIS(e,t,a,n));const i=this.isVideoContiguous;let r,s=-1;if(w&&(s=function(e){for(let t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!i&&this.config.forceKeyFrameOnDiscontinuity))if(p=!0,s>0){this.warn(`Dropped ${s} out of ${v} video samples due to a missing keyframe`);const e=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(s),t.dropped+=s,f+=(t.samples[0].pts-e)/t.inputTimeScale,r=f}else-1===s&&(this.warn(`No keyframe found out of ${v} video samples`),p=!1);if(this.ISGenerated){if(b&&w){const i=this.getVideoStartPts(t.samples),r=(KE(e.samples[0].pts,i)-i)/t.inputTimeScale;m+=Math.max(0,r),f+=Math.max(0,-r)}if(b){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),d=this.generateIS(e,t,a,n)),c=this.remuxAudio(e,m,this.isAudioContiguous,n,y||w||o===db?f:void 0),w){const r=c?c.endPTS-c.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),d=this.generateIS(e,t,a,n)),l=this.remuxVideo(t,f,i,r)}}else w&&(l=this.remuxVideo(t,f,i,0));l&&(l.firstKeyFrame=s,l.independent=-1!==s,l.firstKeyFramePTS=r)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(i.samples.length&&(h=YE(i,a,this._initPTS,this._initDTS)),r.samples.length&&(u=JE(r,a,this._initPTS))),{audio:c,video:l,initSegment:d,independent:p,text:u,id3:h}}computeInitPts(e,t,i,r){const a=Math.round(i*t);let n=KE(e,a);if(n<a+t)for(this.log(`Adjusting PTS for rollover in timeline near ${(a-n)/t} ${r}`);n<a+t;)n+=8589934592;return n-a}generateIS(e,t,i,r){const a=e.samples,n=t.samples,s=this.typeSupported,o={},l=this._initPTS;let c,d,u,h=!l||r,p="audio/mp4",m=-1;if(h&&(c=d=Infinity),e.config&&a.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":s.mpeg?(p="audio/mpeg",e.codec=""):s.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3"}o.audio={id:"audio",container:p,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&s.mpeg?new Uint8Array(0):BE.initSegment([e]),metadata:{channelCount:e.channelCount}},h&&(m=e.id,u=e.inputTimeScale,l&&u===l.timescale?h=!1:c=d=this.computeInitPts(a[0].pts,u,i,"audio"))}if(t.sps&&t.pps&&n.length){if(t.timescale=t.inputTimeScale,o.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:BE.initSegment([t]),metadata:{width:t.width,height:t.height}},h)if(m=t.id,u=t.inputTimeScale,l&&u===l.timescale)h=!1;else{const e=this.getVideoStartPts(n),t=KE(n[0].dts,e),r=this.computeInitPts(t,u,i,"video"),a=this.computeInitPts(e,u,i,"video");d=Math.min(d,r),c=Math.min(c,a)}this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(o).length)return this.ISGenerated=!0,h?(l&&this.warn(`Timestamps at playlist time: ${r?"":"~"}${i} ${c/u} != initPTS: ${l.baseTime/l.timescale} (${l.baseTime}/${l.timescale}) trackId: ${l.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${c/u} (${c}/${u}) trackId: ${m}`),this._initPTS={baseTime:c,timescale:u,trackId:m},this._initDTS={baseTime:d,timescale:u,trackId:m}):c=u=void 0,{tracks:o,initPTS:c,timescale:u,trackId:m}}remuxVideo(e,t,i,r){const a=e.inputTimeScale,n=e.samples,s=[],o=n.length,l=this._initPTS,c=l.baseTime*a/l.timescale;let d,u,h=this.nextVideoTs,p=8,m=this.videoSampleDuration,f=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,y=!1;if(!i||null===h){const e=c+t*a,r=n[0].pts-KE(n[0].dts,n[0].pts);qE&&null!==h&&Math.abs(e-r-(h+c))<15e3?i=!0:h=e-r-c}const v=h+c;for(let O=0;O<o;O++){const e=n[O];e.pts=KE(e.pts,v),e.dts=KE(e.dts,v),e.dts<n[O>0?O-1:O].dts&&(y=!0)}y&&n.sort(function(e,t){const i=e.dts-t.dts,r=e.pts-t.pts;return i||r}),d=n[0].dts,u=n[n.length-1].dts;const b=u-d,w=b?Math.round(b/(o-1)):m||e.inputTimeScale/30;if(i){const i=d-v,r=i>w,a=i<-1;if((r||a)&&(r?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${jE(i,!0)} ms (${i}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${jE(-i,!0)} ms (${i}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!a||v>=n[0].pts||qE)){d=v;const e=n[0].pts-i;if(r)n[0].dts=d,n[0].pts=e;else{let t=!0;for(let r=0;r<n.length&&!(n[r].dts>e&&t);r++){const e=n[r].pts;if(n[r].dts-=i,n[r].pts-=i,r<n.length-1){const i=n[r+1].pts;t=i<=n[r].pts==i<=e}}}this.log(`Video: Initial PTS/DTS adjusted: ${jE(e,!0)}/${jE(d,!0)}, delta: ${jE(i,!0)} ms`)}}d=Math.max(0,d);let S=0,k=0,T=d;for(let O=0;O<o;O++){const e=n[O],t=e.units,i=t.length;let r=0;for(let a=0;a<i;a++)r+=t[a].data.length;k+=r,S+=i,e.length=r,e.dts<T?(e.dts=T,T+=w/4|0||1):T=e.dts,f=Math.min(e.pts,f),g=Math.max(e.pts,g)}u=n[o-1].dts;const E=k+4*S+8;let A;try{A=new Uint8Array(E)}catch(M){return void this.observer.emit(ab.ERROR,ab.ERROR,{type:ib.MUX_ERROR,details:rb.REMUX_ALLOC_ERROR,fatal:!1,error:M,bytes:E,reason:`fail allocating video mdat ${E}`})}const C=new DataView(A.buffer);C.setUint32(0,E),A.set(BE.types.mdat,4);let I=!1,P=Number.POSITIVE_INFINITY,_=Number.POSITIVE_INFINITY,R=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(let O=0;O<o;O++){const e=n[O],t=e.units;let i,l=0;for(let r=0,a=t.length;r<a;r++){const e=t[r],i=e.data,a=e.data.byteLength;C.setUint32(p,a),p+=4,A.set(i,p),p+=a,l+=4+a}if(O<o-1)m=n[O+1].dts-e.dts,i=n[O+1].pts-e.pts;else{const t=this.config,s=O>0?e.dts-n[O-1].dts:w;if(i=O>0?e.pts-n[O-1].pts:w,t.stretchShortVideoTrack&&null!==this.nextAudioTs){const i=Math.floor(t.maxBufferHole*a),n=(r?f+r*a:this.nextAudioTs+c)-e.pts;n>i?(m=n-s,m<0?m=s:I=!0,this.log(`It is approximately ${n/90} ms to the next segment; using duration ${m/90} ms for the last video frame.`)):m=s}else m=s}const d=Math.round(e.pts-e.dts);P=Math.min(P,m),R=Math.max(R,m),_=Math.min(_,i),x=Math.max(x,i),s.push(VE(e.key,m,l,d))}if(s.length)if(qE){if(qE<70){const e=s[0].flags;e.dependsOn=2,e.isNonSync=0}}else if(HE&&x-_<R-P&&w/R<.025&&0===s[0].cts){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let e=d;for(let t=0,i=s.length;t<i;t++){const r=e+s[t].duration,a=e+s[t].cts;if(t<i-1){const e=r+s[t+1].cts;s[t].duration=e-a}else s[t].duration=t?s[t-1].duration:w;s[t].cts=0,e=r}}m=I||!m?w:m;const L=u+m;this.nextVideoTs=h=L-c,this.videoSampleDuration=m,this.isVideoContiguous=!0;const D={data1:BE.moof(e.sequenceNumber++,d,fb(e,{samples:s})),data2:A,startPTS:(f-c)/a,endPTS:(g+m-c)/a,startDTS:(d-c)/a,endDTS:h/a,type:"video",hasAudio:!1,hasVideo:!0,nb:s.length,dropped:e.dropped};return e.samples=[],e.dropped=0,D}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return 1152;case"ac3":return 1536;default:return 1024}}remuxAudio(e,t,i,r,a){const n=e.inputTimeScale,s=n/(e.samplerate?e.samplerate:n),o=this.getSamplesPerFrame(e),l=o*s,c=this._initPTS,d="mp3"===e.segmentCodec&&this.typeSupported.mpeg,u=[],h=void 0!==a;let p=e.samples,m=d?0:8,f=this.nextAudioTs||-1;const g=c.baseTime*n/c.timescale,y=g+t*n;if(this.isAudioContiguous=i=i||p.length&&f>0&&(r&&Math.abs(y-(f+g))<9e3||Math.abs(KE(p[0].pts,y)-(f+g))<20*l),p.forEach(function(e){e.pts=KE(e.pts,y)}),!i||f<0){const e=p.length;if(p=p.filter(e=>e.pts>=0),e!==p.length&&this.warn(`Removed ${p.length-e} of ${e} samples (initPTS ${g} / ${n})`),!p.length)return;f=0===a?0:r&&!h?Math.max(0,y-g):p[0].pts-g}if("aac"===e.segmentCodec){const t=this.config.maxAudioFramesDrift;for(let i=0,r=f+g;i<p.length;i++){const a=p[i],s=a.pts,o=s-r,c=Math.abs(1e3*o/n);if(o<=-t*l&&h)0===i&&(this.warn(`Audio frame @ ${(s/n).toFixed(3)}s overlaps marker by ${Math.round(1e3*o/n)} ms.`),this.nextAudioTs=f=s-g,r=s);else if(o>=t*l&&c<1e4&&h){let t=Math.round(o/l);for(r=s-t*l;r<0&&t&&l;)t--,r+=l;0===i&&(this.nextAudioTs=f=r-g),this.warn(`Injecting ${t} audio frames @ ${((r-g)/n).toFixed(3)}s due to ${Math.round(1e3*o/n)} ms gap.`);for(let n=0;n<t;n++){let t=FE.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);t||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),t=a.unit.subarray()),p.splice(i,0,{unit:t,pts:r}),r+=l,i++}}a.pts=r,r+=l}}let v,b=null,w=null,S=0,k=p.length;for(;k--;)S+=p[k].unit.byteLength;for(let R=0,x=p.length;R<x;R++){const t=p[R],r=t.unit;let a=t.pts;if(null!==w){u[R-1].duration=Math.round((a-w)/s)}else{if(i&&"aac"===e.segmentCodec&&(a=f+g),b=a,!(S>0))return;S+=m;try{v=new Uint8Array(S)}catch(_){return void this.observer.emit(ab.ERROR,ab.ERROR,{type:ib.MUX_ERROR,details:rb.REMUX_ALLOC_ERROR,fatal:!1,error:_,bytes:S,reason:`fail allocating audio mdat ${S}`})}if(!d){new DataView(v.buffer).setUint32(0,S),v.set(BE.types.mdat,4)}}v.set(r,m);const n=r.byteLength;m+=n,u.push(VE(!0,o,n,0)),w=a}const T=u.length;if(!T)return;const E=u[u.length-1];f=w-g,this.nextAudioTs=f+s*E.duration;const A=d?new Uint8Array(0):BE.moof(e.sequenceNumber++,b/s,fb({},e,{samples:u}));e.samples=[];const C=(b-g)/n,I=this.nextAudioTs/n,P={data1:A,data2:v,startPTS:C,endPTS:I,startDTS:C,endDTS:I,type:"audio",hasAudio:!0,hasVideo:!1,nb:T};return this.isAudioContiguous=!0,P}}function KE(e,t){let i;if(null===t)return e;for(i=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=i;return e}function YE(e,t,i,r){const a=e.samples.length;if(!a)return;const n=e.inputTimeScale;for(let o=0;o<a;o++){const a=e.samples[o];a.pts=KE(a.pts-i.baseTime*n/i.timescale,t*n)/n,a.dts=KE(a.dts-r.baseTime*n/r.timescale,t*n)/n}const s=e.samples;return e.samples=[],{samples:s}}function JE(e,t,i){const r=e.samples.length;if(!r)return;const a=e.inputTimeScale;for(let s=0;s<r;s++){const r=e.samples[s];r.pts=KE(r.pts-i.baseTime*a/i.timescale,t*a)/a}e.samples.sort((e,t)=>e.pts-t.pts);const n=e.samples;return e.samples=[],{samples:n}}function XE(e,t,i=!1){return void 0!==(null==e?void 0:e.start)?(e.start+(i?e.duration:0))/e.timescale:t}function QE(e,t,i){const r=e.codec;if(r&&r.length>4)return r;if(t===zb){if("ec-3"===r||"ac-3"===r||"alac"===r)return r;if("fLaC"===r||"Opus"===r){return Rw(r,!1)}return i.warn(`Unhandled audio codec "${r}" in mp4 MAP`),r||"mp4a"}return i.warn(`Unhandled video codec "${r}" in mp4 MAP`),r||"avc1"}try{GE=self.performance.now.bind(self.performance)}catch(DP){GE=Date.now}const ZE=[{demux:class{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,i,r){const a=this.videoTrack=sE("video",1),n=this.audioTrack=sE("audio",1),s=this.txtTrack=sE("text",1);if(this.id3Track=sE("id3",1),this.timeOffset=0,null==e||!e.byteLength)return;const o=aw(e);if(o.video){const{id:e,timescale:t,codec:i,supplemental:r}=o.video;a.id=e,a.timescale=s.timescale=t,a.codec=i,a.supplemental=r}if(o.audio){const{id:e,timescale:t,codec:i}=o.audio;n.id=e,n.timescale=t,n.codec=i}s.id=Jb.text,a.sampleDuration=0,a.duration=n.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return function(e){const t=e.byteLength;for(let i=0;i<t;){const r=Zb(e,i);if(r>8&&109===e[i+4]&&111===e[i+5]&&111===e[i+6]&&102===e[i+7])return!0;i=r>1?i+r:t}return!1}(e)}demux(e,t){this.timeOffset=t;let i=e;const r=this.videoTrack,a=this.txtTrack;if(this.config.progressive){this.remainderData&&(i=hw(this.remainderData,e));const t=function(e){const t={valid:null,remainder:null},i=iw(e,["moof"]);if(i.length<2)return t.remainder=e,t;const r=i[i.length-1];return t.valid=e.slice(0,r.byteOffset-8),t.remainder=e.slice(r.byteOffset-8),t}(i);this.remainderData=t.remainder,r.samples=t.valid||new Uint8Array}else r.samples=i;const n=this.extractID3Track(r,t);return a.samples=pw(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:n,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,i=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const r=this.extractID3Track(t,this.timeOffset);return i.samples=pw(e,t),{videoTrack:t,audioTrack:sE(),id3Track:r,textTrack:sE()}}extractID3Track(e,t){const i=this.id3Track;if(e.samples.length){const r=iw(e.samples,["emsg"]);r&&r.forEach(e=>{const r=function(e){const t=e[0];let i="",r="",a=0,n=0,s=0,o=0,l=0,c=0;if(0===t){for(;"\0"!==Xb(e.subarray(c,c+1));)i+=Xb(e.subarray(c,c+1)),c+=1;for(i+=Xb(e.subarray(c,c+1)),c+=1;"\0"!==Xb(e.subarray(c,c+1));)r+=Xb(e.subarray(c,c+1)),c+=1;r+=Xb(e.subarray(c,c+1)),c+=1,a=Zb(e,12),n=Zb(e,16),o=Zb(e,20),l=Zb(e,24),c=28}else if(1===t){c+=4,a=Zb(e,c),c+=4;const t=Zb(e,c);c+=4;const n=Zb(e,c);for(c+=4,s=2**32*t+n,eb(s)||(s=Number.MAX_SAFE_INTEGER,Eb.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=Zb(e,c),c+=4,l=Zb(e,c),c+=4;"\0"!==Xb(e.subarray(c,c+1));)i+=Xb(e.subarray(c,c+1)),c+=1;for(i+=Xb(e.subarray(c,c+1)),c+=1;"\0"!==Xb(e.subarray(c,c+1));)r+=Xb(e.subarray(c,c+1)),c+=1;r+=Xb(e.subarray(c,c+1)),c+=1}return{schemeIdUri:i,value:r,timeScale:a,presentationTime:s,presentationTimeDelta:n,eventDuration:o,id:l,payload:e.subarray(c,e.byteLength)}}(e);if(kE.test(r.schemeIdUri)){const e=TE(r,t);let a=4294967295===r.eventDuration?Number.POSITIVE_INFINITY:r.eventDuration/r.timeScale;a<=.001&&(a=Number.POSITIVE_INFINITY);const n=r.payload;i.samples.push({data:n,len:n.byteLength,dts:e,pts:e,type:nE.emsg,duration:a})}else if(this.config.enableEmsgKLVMetadata&&r.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const e=TE(r,t);i.samples.push({data:r.payload,len:r.payload.byteLength,dts:e,pts:e,type:nE.misbklv,duration:Number.POSITIVE_INFINITY})}})}return i}demuxSampleAes(e,t,i){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}},remux:class extends vb{constructor(e,t,i,r){super("passthrough-remuxer",r),this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.isVideoContiguous=!1}destroy(){}resetTimeStamp(e){this.lastEndTime=null;const t=this.initPTS;t&&e&&t.baseTime===e.baseTime&&t.timescale===e.timescale||(this.initPTS=e)}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,t,i,r){this.audioCodec=t,this.videoCodec=i,this.generateInitSegment(e,r),this.emitInitSegment=!0}generateInitSegment(e,t){let{audioCodec:i,videoCodec:r}=this;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);const{audio:a,video:n}=this.initData=aw(e);if(t)!function(e,t){if(!e||!t)return;const i=t.keyId;i&&t.isCommonEncryption&&dw(e,(e,t)=>{const r=e.subarray(8,24);r.some(e=>0!==e)||(Eb.log(`[eme] Patching keyId in 'enc${t?"a":"v"}>sinf>>tenc' box: ${Pb(r)} -> ${Pb(i)}`),e.set(i,8))})}(e,t);else{const e=a||n;null!=e&&e.encrypted&&this.warn(`Init segment with encrypted track with has no key ("${e.codec}")!`)}a&&(i=QE(a,zb,this)),n&&(r=QE(n,jb,this));const s={};a&&n?s.audiovideo={container:"video/mp4",codec:i+","+r,supplemental:n.supplemental,encrypted:n.encrypted,initSegment:e,id:"main"}:a?s.audio={container:"audio/mp4",codec:i,encrypted:a.encrypted,initSegment:e,id:"audio"}:n?s.video={container:"video/mp4",codec:r,supplemental:n.supplemental,encrypted:n.encrypted,initSegment:e,id:"main"}:this.warn("initSegment does not contain moov or trak boxes."),this.initTracks=s}remux(e,t,i,r,a,n){var s,o;let{initPTS:l,lastEndTime:c}=this;const d={audio:void 0,video:void 0,text:r,id3:i,initSegment:void 0};Zv(c)||(c=this.lastEndTime=a||0);const u=t.samples;if(!u.length)return d;const h={initPTS:void 0,timescale:void 0,trackId:void 0};let p=this.initData;if(null!=(s=p)&&s.length||(this.generateInitSegment(u),p=this.initData),null==(o=p)||!o.length)return this.warn("Failed to generate initSegment."),d;this.emitInitSegment&&(h.tracks=this.initTracks,this.emitInitSegment=!1);const m=function(e,t,i){const r={},a=iw(e,["moof","traf"]);for(let n=0;n<a.length;n++){const e=a[n],s=iw(e,["tfhd"])[0],o=Zb(s,4),l=t[o];if(!l)continue;r[o]||(r[o]={start:NaN,duration:0,sampleCount:0,timescale:l.timescale,type:l.type});const c=r[o],d=iw(e,["tfdt"])[0];if(d){const e=d[0];let t=Zb(d,4);1===e&&(t===Kb?i.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(t*=Kb+1,t+=Zb(d,8))),Zv(t)&&(!Zv(c.start)||t<c.start)&&(c.start=t)}const u=l.default,h=Zb(s,0)|(null==u?void 0:u.flags);let p=(null==u?void 0:u.duration)||0;8&h&&(p=Zb(s,2&h?12:8));const m=iw(e,["trun"]);let f=c.start||0,g=0,y=p;for(let t=0;t<m.length;t++){const e=m[t],i=Zb(e,4),r=c.sampleCount;c.sampleCount+=i;const a=1&e[3],n=4&e[3],s=1&e[2],o=2&e[2],l=4&e[2],d=8&e[2];let u=8,h=i;for(a&&(u+=4),n&&i&&(1&e[u+1]||void 0!==c.keyFrameIndex||(c.keyFrameIndex=r),u+=4,s?(y=Zb(e,u),u+=4):y=p,o&&(u+=4),d&&(u+=4),f+=y,g+=y,h--);h--;)s?(y=Zb(e,u),u+=4):y=p,o&&(u+=4),l&&(1&e[u+1]||void 0===c.keyFrameIndex&&(c.keyFrameIndex=c.sampleCount-(h+1),c.keyFrameStart=f),u+=4),d&&(u+=4),f+=y,g+=y;!g&&p&&(g+=p*i)}c.duration+=g}if(!Object.keys(r).some(e=>r[e].duration)){let t=Infinity,i=0;const a=iw(e,["sidx"]);for(let e=0;e<a.length;e++){const r=rw(a[e]);if(null!=r&&r.references){t=Math.min(t,r.earliestPresentationTime/r.timescale);const e=r.references.reduce((e,t)=>e+t.info.duration||0,0);i=Math.max(i,e+r.earliestPresentationTime/r.timescale)}}i&&Zv(i)&&Object.keys(r).forEach(e=>{r[e].duration||(r[e].duration=i*r[e].timescale-r[e].start)})}return r}(u,p,this),f=p.audio?m[p.audio.id]:null,g=p.video?m[p.video.id]:null,y=XE(g,Infinity),v=XE(f,Infinity),b=XE(g,0,!0),w=XE(f,0,!0);let S=a,k=0;const T=f&&(!g||!l&&v<y||l&&l.trackId===p.audio.id),E=T?f:g;if(E){const e=E.timescale,t=E.start-a*e,i=T?p.audio.id:p.video.id;S=E.start/e,k=T?w-v:b-y,!n&&l||!function(e,t,i,r){if(null===e)return!0;const a=Math.max(r,1),n=t-e.baseTime/e.timescale;return Math.abs(n-i)>a}(l,S,a,k)&&e===l.timescale||(l&&this.warn(`Timestamps at playlist time: ${n?"":"~"}${a} ${t/e} != initPTS: ${l.baseTime/l.timescale} (${l.baseTime}/${l.timescale}) trackId: ${l.trackId}`),this.log(`Found initPTS at playlist time: ${a} offset: ${S-a} (${t}/${e}) trackId: ${i}`),l=null,h.initPTS=t,h.timescale=e,h.trackId=i)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${a}`);l?(h.initPTS=l.baseTime,h.timescale=l.timescale,h.trackId=l.trackId):(h.timescale&&void 0!==h.trackId&&void 0!==h.initPTS||(this.warn("Could not set initPTS"),h.initPTS=S,h.timescale=1,h.trackId=-1),this.initPTS=l={baseTime:h.initPTS,timescale:h.timescale,trackId:h.trackId});const A=S-l.baseTime/l.timescale,C=A+k;k>0?this.lastEndTime=C:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const I=!!p.audio,P=!!p.video;let _="";I&&(_+="audio"),P&&(_+="video");const R={data1:u,startPTS:A,startDTS:A,endPTS:C,endDTS:C,type:_,hasAudio:I,hasVideo:P,nb:1,dropped:0,encrypted:!!p.audio&&p.audio.encrypted||!!p.video&&p.video.encrypted};d.audio=I&&!P?R:void 0,d.video=P?R:void 0;const x=null==g?void 0:g.sampleCount;if(x){const e=g.keyFrameIndex,t=-1!==e;R.nb=x,R.dropped=0===e||this.isVideoContiguous?0:t?e:x,R.independent=t,R.firstKeyFrame=e,t&&g.keyFrameStart&&(R.firstKeyFramePTS=(g.keyFrameStart-l.baseTime)/l.timescale),this.isVideoContiguous||(d.independent=t),this.isVideoContiguous||(this.isVideoContiguous=t),R.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${e}/${x} dropped: ${R.dropped} start: ${R.firstKeyFramePTS||"NA"}`)}return d.initSegment=h,d.id3=YE(i,a,l,l),r.samples.length&&(d.text=JE(r,a,l)),d}}},{demux:RE,remux:WE},{demux:class extends oE{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,i,r){super.resetInitSegment(e,t,i,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const i=jT(e,0);let r=(null==i?void 0:i.length)||0;if(vE(e,r))return!1;for(let a=e.length;r<a;r++)if(VT(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return function(e,t){return t+5<e.length}(e,t)&&$T(e,t)&&qT(e,t)<=e.length-t}(e,t)}appendFrame(e,t,i){WT(e,this.observer,t,i,e.manifestCodec);const r=YT(e,t,i,this.basePTS,this.frameIndex);if(r&&0===r.missing)return r}},remux:WE},{demux:class extends oE{resetInitSegment(e,t,i,r){super.resetInitSegment(e,t,i,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=jT(e,0);let i=(null==t?void 0:t.length)||0;if(t&&11===e[i]&&119===e[i+1]&&void 0!==aE(t)&&bE(e,i)<=16)return!1;for(let r=e.length;i<r;i++)if(vE(e,i))return Eb.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return gE(e,t)&&4<=e.length-t}(e,t)}appendFrame(e,t,i){if(null!==this.basePTS)return mE(e,t,i,this.basePTS,this.frameIndex)}},remux:WE}];ZE.splice(2,0,{demux:wE,remux:WE});class eA{constructor(e,t,i,r,a,n){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=i,this.id=a,this.logger=n}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,i,r){const a=i.transmuxing;a.executeStart=GE();let n=new Uint8Array(e);const{currentTransmuxState:s,transmuxConfig:o}=this;r&&(this.currentTransmuxState=r);const{contiguous:l,discontinuity:c,trackSwitch:d,accurateTimeOffset:u,timeOffset:h,initSegmentChange:p}=r||s,{audioCodec:m,videoCodec:f,defaultInitPts:g,duration:y,initSegmentData:v}=o,b=function(e,t){let i=null;e.byteLength>0&&null!=(null==t?void 0:t.key)&&null!==t.iv&&null!=t.method&&(i=t);return i}(n,t);if(b&&pk(b.method)){const e=this.getDecrypter(),t=mk(b.method);if(!e.isSync())return this.asyncResult=!0,this.decryptionPromise=e.webCryptoDecrypt(n,b.key.buffer,b.iv.buffer,t).then(e=>{const t=this.push(e,null,i);return this.decryptionPromise=null,t}),this.decryptionPromise;{let r=e.softwareDecrypt(n,b.key.buffer,b.iv.buffer,t);if(i.part>-1){const t=e.flush();r=t?t.buffer:t}if(!r)return a.executeEnd=GE(),tA(i);n=new Uint8Array(r)}}const w=this.needsProbing(c,d);if(w){const e=this.configureTransmuxer(n);if(e)return this.logger.warn(`[transmuxer] ${e.message}`),this.observer.emit(ab.ERROR,ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message}),a.executeEnd=GE(),tA(i)}(c||d||p||w)&&this.resetInitSegment(v,m,f,y,t),(c||p||w)&&this.resetInitialTimestamp(g),l||this.resetContiguity();const S=this.transmux(n,b,h,u,i);this.asyncResult=iA(S);const k=this.currentTransmuxState;return k.contiguous=!0,k.discontinuity=!1,k.trackSwitch=!1,a.executeEnd=GE(),S}flush(e){const t=e.transmuxing;t.executeStart=GE();const{decrypter:i,currentTransmuxState:r,decryptionPromise:a}=this;if(a)return this.asyncResult=!0,a.then(()=>this.flush(e));const n=[],{timeOffset:s}=r;if(i){const t=i.flush();t&&n.push(this.push(t.buffer,null,e))}const{demuxer:o,remuxer:l}=this;if(!o||!l){t.executeEnd=GE();const i=[tA(e)];return this.asyncResult?Promise.resolve(i):i}const c=o.flush(s);return iA(c)?(this.asyncResult=!0,c.then(t=>(this.flushRemux(n,t,e),n))):(this.flushRemux(n,c,e),this.asyncResult?Promise.resolve(n):n)}flushRemux(e,t,i){const{audioTrack:r,videoTrack:a,id3Track:n,textTrack:s}=t,{accurateTimeOffset:o,timeOffset:l}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${i.sn}${i.part>-1?" part: "+i.part:""} of ${this.id===cb?"level":"track"} ${i.level}`);const c=this.remuxer.remux(r,a,n,s,l,o,!0,this.id);e.push({remuxResult:c,chunkMeta:i}),i.transmuxing.executeEnd=GE()}resetInitialTimestamp(e){const{demuxer:t,remuxer:i}=this;t&&i&&(t.resetTimeStamp(e),i.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,i,r,a){const{demuxer:n,remuxer:s}=this;n&&s&&(n.resetInitSegment(e,t,i,r),s.resetInitSegment(e,t,i,a))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,i,r,a){let n;return n=t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,i,r,a):this.transmuxUnencrypted(e,i,r,a),n}transmuxUnencrypted(e,t,i,r){const{audioTrack:a,videoTrack:n,id3Track:s,textTrack:o}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(a,n,s,o,t,i,!1,this.id),chunkMeta:r}}transmuxSampleAes(e,t,i,r,a){return this.demuxer.demuxSampleAes(e,t,i).then(e=>({remuxResult:this.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,i,r,!1,this.id),chunkMeta:a}))}configureTransmuxer(e){const{config:t,observer:i,typeSupported:r}=this;let a;for(let d=0,u=ZE.length;d<u;d++){var n;if(null!=(n=ZE[d].demux)&&n.probe(e,this.logger)){a=ZE[d];break}}if(!a)return new Error("Failed to find demuxer by probing fragment data");const s=this.demuxer,o=this.remuxer,l=a.remux,c=a.demux;o&&o instanceof l||(this.remuxer=new l(i,t,r,this.logger)),s&&s instanceof c||(this.demuxer=new c(i,t,r,this.logger),this.probe=c.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new GS(this.config)),e}}const tA=e=>({remuxResult:{},chunkMeta:e});function iA(e){return"then"in e&&e.then instanceof Function}class rA{constructor(e,t,i,r,a){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=i,this.duration=r,this.defaultInitPts=a||null}}class aA{constructor(e,t,i,r,a,n){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=i,this.trackSwitch=r,this.timeOffset=a,this.initSegmentChange=n}}let nA=0;class sA{constructor(e,t,i,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=nA++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=e=>{const t=e.data,i=this.hls;if(i&&null!=t&&t.event&&t.instanceNo===this.instanceNo)switch(t.event){case"init":{var r;const e=null==(r=this.workerContext)?void 0:r.objectURL;e&&self.URL.revokeObjectURL(e);break}case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":i.logger[t.data.logType]&&i.logger[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.part=this.part,t.data.id=this.id,i.trigger(t.event,t.data)}},this.onWorkerError=e=>{if(!this.hls)return;const t=new Error(`${e.message}  (${e.filename}:${e.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(ab.ERROR,{type:ib.OTHER_ERROR,details:rb.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:t})};const a=e.config;this.hls=e,this.id=t,this.useWorker=!!a.enableWorker,this.onTransmuxComplete=i,this.onFlush=r;const n=(e,t)=>{(t=t||{}).frag=this.frag||void 0,e===ab.ERROR&&(t.parent=this.id,t.part=this.part,this.error=t.error),this.hls.trigger(e,t)};this.observer=new OT,this.observer.on(ab.FRAG_DECRYPTED,n),this.observer.on(ab.ERROR,n);const s=Mw(a.preferManagedMediaSource);if(this.useWorker&&"undefined"!=typeof Worker){const i=this.hls.logger;if(a.workerPath||"function"==typeof __HLS_WORKER_BUNDLE__){try{a.workerPath?(i.log(`loading Web Worker ${a.workerPath} for "${t}"`),this.workerContext=function(e){const t=FT[e];if(t)return t.clientCount++,t;const i=new self.URL(e,self.location.href).href,r={worker:new self.Worker(i),scriptURL:i,clientCount:1};return FT[e]=r,r}(a.workerPath)):(i.log(`injecting Web Worker for "${t}"`),this.workerContext=function(){const e=FT[NT];if(e)return e.clientCount++,e;const t=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),i=self.URL.createObjectURL(t),r={worker:new self.Worker(i),objectURL:i,clientCount:1};return FT[NT]=r,r}());const{worker:e}=this.workerContext;e.addEventListener("message",this.onWorkerMessage),e.addEventListener("error",this.onWorkerError),e.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:s,id:t,config:Zw(a)})}catch(DP){i.warn(`Error setting up "${t}" Web Worker, fallback to inline`,DP),this.terminateWorker(),this.error=null,this.transmuxer=new eA(this.observer,s,a,"",t,e.logger)}return}}this.transmuxer=new eA(this.observer,s,a,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=nA++;const t=this.hls.config,i=Mw(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:i,id:this.id,config:Zw(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),function(e){const t=FT[e||NT];if(t&&1===t.clientCount--){const{worker:i,objectURL:r}=t;delete FT[e||NT],r&&self.URL.revokeObjectURL(r),i.terminate()}}(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,i,r,a,n,s,o,l,c){var d,u;l.transmuxing.start=self.performance.now();const{instanceNo:h,transmuxer:p}=this,m=n?n.start:a.start,f=a.decryptdata,g=this.frag,y=!(g&&a.cc===g.cc),v=!(g&&l.level===g.level),b=g?l.sn-g.sn:-1,w=this.part?l.part-this.part.index:-1,S=0===b&&l.id>1&&l.id===(null==g?void 0:g.stats.chunkCount),k=!v&&(1===b||0===b&&(1===w||S&&w<=0)),T=self.performance.now();(v||b||0===a.stats.parsing.start)&&(a.stats.parsing.start=T),!n||!w&&k||(n.stats.parsing.start=T);const E=!(g&&(null==(d=a.initSegment)?void 0:d.url)===(null==(u=g.initSegment)?void 0:u.url)),A=new aA(y,k,o,v,m,E);if(!k||y||E){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${a.type} sn: ${l.sn}${l.part>-1?" part: "+l.part:""} ${this.id===cb?"level":"track"}: ${l.level} id: ${l.id}\n        discontinuity: ${y}\n        trackSwitch: ${v}\n        contiguous: ${k}\n        accurateTimeOffset: ${o}\n        timeOffset: ${m}\n        initSegmentChange: ${E}`);const e=new rA(i,r,t,s,c);this.configureTransmuxer(e)}if(this.frag=a,this.part=n,this.workerContext)this.workerContext.worker.postMessage({instanceNo:h,cmd:"demux",data:e,decryptdata:f,chunkMeta:l,state:A},e instanceof ArrayBuffer?[e]:[]);else if(p){const t=p.push(e,f,l,A);iA(t)?t.then(e=>{this.handleTransmuxComplete(e)}).catch(e=>{this.transmuxerError(e,l,"transmuxer-interface push error")}):this.handleTransmuxComplete(t)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:i}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(i){const t=i.flush(e);iA(t)?t.then(t=>{this.handleFlushResult(t,e)}).catch(t=>{this.transmuxerError(t,e,"transmuxer-interface flush error")}):this.handleFlushResult(t,e)}}transmuxerError(e,t,i){this.hls&&(this.error=e,this.hls.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:i}))}handleFlushResult(e,t){e.forEach(e=>{this.handleTransmuxComplete(e)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:i}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):i&&i.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}class oA extends vb{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,i){const r=null==t?void 0:t.renditionReports;if(r){let n=-1;for(let i=0;i<r.length;i++){const s=r[i];let o;try{o=new self.URL(s.URI,t.url).href}catch(a){this.warn(`Could not construct new URL for Rendition Report: ${a}`),o=s.URI||""}if(o===e){n=i;break}o===e.substring(0,o.length)&&(n=i)}if(-1!==n){const e=r[n],a=parseInt(e["LAST-MSN"])||t.lastPartSn;let s=parseInt(e["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){const e=Math.min(t.age-t.partTarget,t.targetduration);s>=0&&e>t.partTarget&&(s+=1)}const o=i&&Kw(i);return new Yw(a,s>=0?s:void 0,o)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(i){this.warn(`Could not construct new URL with HLS Delivery Directives: ${i}`)}return e}playlistLoaded(e,t,i){const{details:r,stats:a}=t,n=self.performance.now(),s=a.loading.first?Math.max(0,n-a.loading.first):0;r.advancedDateTime=Date.now()-s;const o=this.hls.config.timelineOffset;if(o!==r.appliedTimelineOffset){const e=Math.max(o||0,0);r.appliedTimelineOffset=e,r.fragments.forEach(t=>{t.setStart(t.playlistOffset+e)})}if(r.live||null!=i&&i.live){const o="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(i),i&&r.fragments.length>0){Zk(i,r,this);const e=r.playlistParsingError;if(e){this.warn(e);const i=this.hls;if(!i.config.ignorePlaylistParsingErrors){var l;const{networkDetails:n}=t;return void i.trigger(ab.ERROR,{type:ib.NETWORK_ERROR,details:rb.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:e,reason:e.message,level:t.level||void 0,parent:null==(l=r.fragments[0])?void 0:l.type,networkDetails:n,stats:a})}r.playlistParsingError=null}}-1===r.requestScheduled&&(r.requestScheduled=a.loading.start);const c=this.hls.mainForwardBufferInfo,d=c?c.end-c.len:0,u=rT(r,1e3*(r.edge-d));if(r.requestScheduled+u<n?r.requestScheduled=n:r.requestScheduled+=u,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let h,p,m;if(r.canBlockReload&&r.endSN&&r.advanced){const e=this.hls.config.lowLatencyMode,a=r.lastPartSn,s=r.endSN,l=r.lastPartIndex,c=a===s;-1!==l?c?(p=s+1,m=e?0:l):(p=a,m=e?l+1:r.maxPartIndex):p=s+1;const d=r.age,u=d+r.ageHeader;let f=Math.min(u-r.partTarget,1.5*r.targetduration);if(f>0){if(u>3*r.targetduration)this.log(`Playlist last advanced ${d.toFixed(2)}s ago. Omitting segment and part directives.`),p=void 0,m=void 0;else if(null!=i&&i.tuneInGoal&&u-r.partTarget>i.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${i.tuneInGoal} to: ${f} with playlist age: ${r.age}`),f=0;else{const e=Math.floor(f/r.targetduration);if(p+=e,void 0!==m){m+=Math.round(f%r.targetduration/r.partTarget)}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${d.toFixed(2)}s goal: ${f} skip sn ${e} to part ${m}`)}r.tuneInGoal=f}if(h=this.getDeliveryDirectives(r,t.deliveryDirectives,p,m),e||!c)return r.requestScheduled=n,void this.loadingPlaylist(o,h)}else(r.canBlockReload||r.canSkipUntil)&&(h=this.getDeliveryDirectives(r,t.deliveryDirectives,p,m));h&&void 0!==p&&r.canBlockReload&&(r.requestScheduled=a.loading.first+Math.max(u-2*s,u/2)),this.scheduleLoading(o,h,r)}else this.clearTimer()}scheduleLoading(e,t,i){const r=i||e.details;if(!r)return void this.loadingPlaylist(e,t);const a=self.performance.now(),n=r.requestScheduled;if(a>=n)return void this.loadingPlaylist(e,t);const s=n-a;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(s)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),s)}getDeliveryDirectives(e,t,i,r){let a=Kw(e);return null!=t&&t.skip&&e.deltaUpdateFailed&&(i=t.msn,r=t.part,a=Hw),new Yw(i,r,a)}checkRetry(e){const t=e.details,i=pS(e),r=e.errorAction,{action:a,retryCount:n=0,retryConfig:s}=r||{},o=!!r&&!!s&&(a===ES||!r.resolved&&a===kS);if(o){var l;if(n>=s.maxNumRetry)return!1;if(i&&null!=(l=e.context)&&l.deliveryDirectives)this.warn(`Retrying playlist loading ${n+1}/${s.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const e=yS(s,n);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),e),this.warn(`Retrying playlist loading ${n+1}/${s.maxNumRetry} after "${t}" in ${e}ms`)}e.levelRetry=!0,r.resolved=!0}return o}}function lA(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!cA(e[i].attrs,t[i].attrs))return!1;return!0}function cA(e,t,i){const r=e["STABLE-RENDITION-ID"];return r&&!i?r===t["STABLE-RENDITION-ID"]:!(i||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(i=>e[i]!==t[i])}function dA(e,t){return t.label.toLowerCase()===e.name.toLowerCase()&&(!t.language||t.language.toLowerCase()===(e.lang||"").toLowerCase())}class uA{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,i){if(null===this.queues||null===this.tracks)return;const r=this.queues[t];r.push(e),1!==r.length||i||this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const i={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(i,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const i={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(i)}})}removeBlockers(){null!==this.queues&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const i=null==(t=e[0])?void 0:t.label;"async-blocker"!==i&&"async-blocker-prepend"!==i||(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(null===this.queues)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(null===this.queues||null===this.tracks)return;const t=this.queues[e];if(t.length){const a=t[0];try{a.execute()}catch(r){var i;if(a.onError(r),null===this.queues||null===this.tracks)return;const t=null==(i=this.tracks[e])?void 0:i.buffer;null!=t&&t.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){null!==this.queues&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return(null==(t=this.queues)?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return null===e||null===t?"<destroyed>":`\n${this.list("video")}\n${this.list("audio")}\n${this.list("audiovideo")}}`}list(e){var t,i;return null!=(t=this.queues)&&t[e]||null!=(i=this.tracks)&&i[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const i=null==(t=this.tracks)?void 0:t[e],r=null==i?void 0:i.buffer;return r?`SourceBuffer${r.updating?" updating":""}${i.ended?" ended":""}${i.ending?" ending":""}`:"none"}listOps(e){var t;return(null==(t=this.queues)?void 0:t[e].map(e=>e.label).join(", "))||""}}const hA=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,pA="HlsJsTrackRemovedError";class mA extends Error{constructor(e){super(e),this.name=pA}}function fA(e){const t=e.querySelectorAll("source");[].slice.call(t).forEach(t=>{e.removeChild(t)})}function gA(e){return"audio"===e?1:0}class yA{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(ab.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(ab.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(ab.MANIFEST_PARSED,this.onManifestParsed,this),e.on(ab.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(ab.BUFFER_CODECS,this.onBufferCodecs,this),e.on(ab.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(ab.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(ab.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(ab.MANIFEST_PARSED,this.onManifestParsed,this),e.off(ab.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(ab.BUFFER_CODECS,this.onBufferCodecs,this),e.off(ab.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const i=this.hls.levels[t.droppedLevel];this.isLevelAllowed(i)&&this.restrictedLevels.push({bitrate:i.bitrate,height:i.height,width:i.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const i=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,i.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&Zv(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0)return void(this.clientRect=null);const e=this.hls.levels;if(e.length){const t=this.hls,i=this.getMaxLevel(e.length-1);i!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${i}: ${e[i].height}p@${e[i].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=i,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const i=t.filter((t,i)=>this.isLevelAllowed(t)&&i<=e);return this.clientRect=null,yA.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const i=e.getBoundingClientRect();t.width=i.width,t.height=i.height,t.width||t.height||(t.width=i.right-i.left||e.width||0,t.height=i.bottom-i.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}isLevelAllowed(e){return!this.restrictedLevels.some(t=>e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height)}static getMaxLevelByMediaSize(e,t,i){if(null==e||!e.length)return-1;const r=(e,t)=>!t||(e.width!==t.width||e.height!==t.height);let a=e.length-1;const n=Math.max(t,i);for(let s=0;s<e.length;s+=1){const t=e[s];if((t.width>=n||t.height>=n)&&r(t,e[s+1])){a=s;break}}return a}}const vA={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},bA={HLS:"h"};class wA{constructor(e,t){Array.isArray(e)&&(e=e.map(e=>e instanceof wA?e:new wA(e))),this.value=e,this.params=t}}function SA(e,t,i,r){return new Error(`failed to ${e} "${a=t,Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":"object"==typeof a?JSON.stringify(a):String(a)}" as ${i}`,{cause:r});var a}function kA(e,t,i){return SA("serialize",e,t,i)}class TA{constructor(e){this.description=e}}const EA="Bare Item";function AA(e){if(!1===ArrayBuffer.isView(e))throw kA(e,"Byte Sequence");return`:${t=e,btoa(String.fromCharCode(...t))}:`;var t}function CA(e){if(function(e){return e<-999999999999999||999999999999999<e}(e))throw kA(e,"Integer");return e.toString()}function IA(e,t){if(e<0)return-IA(-e,t);const i=Math.pow(10,t);if(Math.abs(e*i%1-.5)<Number.EPSILON){const t=Math.floor(e*i);return(t%2==0?t:t+1)/i}return Math.round(e*i)/i}function PA(e){const t=IA(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw kA(e,"Decimal");const i=t.toString();return i.includes(".")?i:`${i}.0`}const _A=/[\x00-\x1f\x7f]+/;function RA(e){const t=(i=e).description||i.toString().slice(7,-1);var i;if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(t))throw kA(t,"Token");return t}function xA(e){switch(typeof e){case"number":if(!Zv(e))throw kA(e,EA);return Number.isInteger(e)?CA(e):PA(e);case"string":return function(e){if(_A.test(e))throw kA(e,"String");return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}(e);case"symbol":return RA(e);case"boolean":return function(e){if("boolean"!=typeof e)throw kA(e,"Boolean");return e?"?1":"?0"}(e);case"object":if(e instanceof Date)return function(e){return`@${CA(e.getTime()/1e3)}`}(e);if(e instanceof Uint8Array)return AA(e);if(e instanceof TA)return RA(e);default:throw kA(e,EA)}}function LA(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw kA(e,"Key");return e}function DA(e){return null==e?"":Object.entries(e).map(([e,t])=>!0===t?`;${LA(e)}`:`;${LA(e)}=${xA(t)}`).join("")}function MA(e){return e instanceof wA?`${xA(e.value)}${DA(e.params)}`:xA(e)}function OA(e,t={whitespace:!0}){if("object"!=typeof e||null==e)throw kA(e,"Dict");const i=e instanceof Map?e.entries():Object.entries(e),r=(null==t?void 0:t.whitespace)?" ":"";return Array.from(i).map(([e,t])=>{t instanceof wA==!1&&(t=new wA(t));let i=LA(e);var r;return!0===t.value?i+=DA(t.params):(i+="=",Array.isArray(t.value)?i+=`(${(r=t).value.map(MA).join(" ")})${DA(r.params)}`:i+=MA(t)),i}).join(`,${r}`)}function NA(e,t){return OA(e,t)}const FA="CMCD-Object",UA="CMCD-Request",BA="CMCD-Session",zA="CMCD-Status",jA={br:FA,ab:FA,d:FA,ot:FA,tb:FA,tpb:FA,lb:FA,tab:FA,lab:FA,url:FA,pb:UA,bl:UA,tbl:UA,dl:UA,ltc:UA,mtp:UA,nor:UA,nrr:UA,rc:UA,sn:UA,sta:UA,su:UA,ttfb:UA,ttfbb:UA,ttlb:UA,cmsdd:UA,cmsds:UA,smrt:UA,df:UA,cs:UA,ts:UA,cid:BA,pr:BA,sf:BA,sid:BA,st:BA,v:BA,msd:BA,bs:zA,bsd:zA,cdn:zA,rtp:zA,bg:zA,pt:zA,ec:zA,e:zA},$A=UA;function GA(e,t){const i={};if(!e)return i;const r=Object.keys(e),a=t?(n=t,Object.keys(n).reduce((e,t)=>{var i;return null===(i=n[t])||void 0===i||i.forEach(i=>e[i]=t),e},{})):{};var n;return r.reduce((t,i)=>{var r;const n=jA[i]||a[i]||$A;return(null!==(r=t[n])&&void 0!==r?r:t[n]={})[i]=e[i],t},i)}const qA="event";const HA=e=>Math.round(e),VA=(e,t)=>Array.isArray(e)?e.map(e=>VA(e,t)):e instanceof wA&&"string"==typeof e.value?new wA(VA(e.value,t),e.params):(t.baseUrl&&(e=function(e,t){const i=new URL(e),r=new URL(t);if(i.origin!==r.origin)return e;const a=i.pathname.split("/").slice(1),n=r.pathname.split("/").slice(1,-1);for(;a[0]===n[0];)a.shift(),n.shift();for(;n.length;)n.shift(),a.unshift("..");return a.join("/")+i.search+i.hash}(e,t.baseUrl)),1===t.version?encodeURIComponent(e):e),WA=e=>100*HA(e/100),KA={br:HA,d:HA,bl:WA,dl:WA,mtp:WA,nor:(e,t)=>{let i=e;return t.version>=2&&(e instanceof wA&&"string"==typeof e.value?i=new wA([e]):"string"==typeof e&&(i=[e])),VA(i,t)},rtp:WA,tb:HA},YA="request",JA="response",XA=["ab","bg","bl","br","bs","bsd","cdn","cid","cs","df","ec","lab","lb","ltc","msd","mtp","pb","pr","pt","sf","sid","sn","st","sta","tab","tb","tbl","tpb","ts","v"],QA=["e"],ZA=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function eC(e){return ZA.test(e)}const tC=["d","dl","nor","ot","rtp","su"];const iC=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];const rC=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function aC(e){return rC.includes(e)||eC(e)}const nC={[JA]:function(e){return XA.includes(e)||tC.includes(e)||iC.includes(e)||eC(e)},[qA]:function(e){return XA.includes(e)||QA.includes(e)||eC(e)},[YA]:function(e){return XA.includes(e)||tC.includes(e)||eC(e)}};function sC(e,t={}){const i={};if(null==e||"object"!=typeof e)return i;const r=t.version||e.v||1,a=t.reportingMode||YA,n=1===r?aC:nC[a];let s=Object.keys(e).filter(n);const o=t.filter;"function"==typeof o&&(s=s.filter(o));const l=a===JA||a===qA;l&&!s.includes("ts")&&s.push("ts"),r>1&&!s.includes("v")&&s.push("v");const c=fb({},KA,t.formatters),d={version:r,reportingMode:a,baseUrl:t.baseUrl};return s.sort().forEach(t=>{let a=e[t];const n=c[t];if("function"==typeof n&&(a=n(a,d)),"v"===t){if(1===r)return;a=r}"pr"==t&&1===a||(l&&"ts"===t&&!Zv(a)&&(a=Date.now()),function(e){return"number"==typeof e?Zv(e):null!=e&&""!==e&&!1!==e}(a)&&(function(e){return["ot","sf","st","e","sta"].includes(e)}(t)&&"string"==typeof a&&(a=new TA(a)),i[t]=a))}),i}function oC(e,t,i){return fb(e,function(e,t={}){const i={};if(!e)return i;const r=GA(sC(e,t),null==t?void 0:t.customHeaderMap);return Object.entries(r).reduce((e,[t,i])=>{const r=NA(i,{whitespace:!1});return r&&(e[t]=r),e},i)}(t,i))}function lC(e,t={}){if(!e)return"";const i=function(e,t={}){return e?NA(sC(e,t),{whitespace:!1}):""}(e,t);return encodeURIComponent(i)}const cC=/CMCD=[^&#]+/;function dC(e,t,i){const r=function(e,t={}){return e?`CMCD=${lC(e,t)}`:""}(t,i);if(!r)return e;if(cC.test(e))return e.replace(cC,r);const a=e.includes("?")?"&":"?";return`${e}${a}${r}`}function uC(e,t,i,r){e&&Object.keys(t).forEach(a=>{const n=e.filter(e=>e.groupId===a).map(e=>{const n=fb({},e);return n.details=void 0,n.attrs=new sk(n.attrs),n.url=n.attrs.URI=hC(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",i),n.groupId=n.attrs["GROUP-ID"]=t[a],n.attrs["PATHWAY-ID"]=r,n});e.push(...n)})}function hC(e,t,i,r){const{HOST:a,PARAMS:n,[i]:s}=r;let o;t&&(o=null==s?void 0:s[t],o&&(e=o));const l=new self.URL(e);return a&&!o&&(l.host=a),n&&Object.keys(n).sort().forEach(e=>{e&&l.searchParams.set(e,n[e])}),l.href}class pC extends vb{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.mediaResolved=void 0,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.mediaKeys=null,this.setMediaKeysQueue=pC.CDMCleanupPromise?[pC.CDMCleanupPromise]:[],this.bannedKeyIds={},this.onMediaEncrypted=e=>{const{initDataType:t,initData:i}=e,r=`"${e.type}" event: init data type: "${t}"`;if(this.debug(r),null!==i){if(!this.keyFormatPromise){let e=Object.keys(this.keySystemAccessPromises);e.length||(e=Ik(this.config));const t=e.map(Ck).filter(e=>!!e);this.keyFormatPromise=this.getKeyFormatPromise(t)}this.keyFormatPromise.then(a=>{const n=Ak(a);if("sinf"!==t||n!==wk.FAIRPLAY)return void this.log(`Ignoring "${e.type}" event with init data type: "${t}" for selected key-system ${n}`);let s;try{const e=Xb(new Uint8Array(i)),t=uw(fk(JSON.parse(e).sinf));if(!t)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");s=new Uint8Array(t.subarray(8,24))}catch(u){return void this.warn(`${r} Failed to parse sinf: ${u}`)}const o=Pb(s),{keyIdToKeySessionPromise:l,mediaKeySessions:c}=this;let d=l[o];for(let e=0;e<c.length;e++){const r=c[e],a=r.decryptdata;if(!a.keyId)continue;const n=Pb(a.keyId);if(uk(s,a.keyId)||-1!==a.uri.replace(/-/g,"").indexOf(o)){if(d=l[n],!d)continue;if(a.pssh)break;delete l[n],a.pssh=new Uint8Array(i),a.keyId=s,d=l[o]=d.then(()=>this.generateRequestWithPreferredKeySession(r,t,i,"encrypted-event-key-match")),d.catch(e=>this.handleError(e));break}}d||this.handleError(new Error(`Key ID ${o} not encountered in playlist. Key-system sessions ${c.length}.`))}).catch(e=>this.handleError(e))}},this.onWaitingForKey=e=>{this.log(`"${e.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.onDestroying(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(ab.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(ab.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(ab.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(ab.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(ab.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(ab.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(ab.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(ab.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:i}=this.config,r=null==t?void 0:t[e];return r?r.licenseUrl:e===wk.WIDEVINE&&i?i:void 0}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(void 0===t)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,i=null==t?void 0:t[e];if(i)return i.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,i=(e,t,i)=>!!e&&i.indexOf(e)===t,r=t.map(e=>e.audioCodec).filter(i),a=t.map(e=>e.videoCodec).filter(i);return r.length+a.length===0&&a.push("avc1.42e01e"),new Promise((t,i)=>{const n=e=>{const s=e.shift();this.getMediaKeysPromise(s,r,a).then(e=>t({keySystem:s,mediaKeys:e})).catch(t=>{e.length?n(e):i(t instanceof gC?t:new gC({type:ib.KEY_SYSTEM_ERROR,details:rb.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))})};n(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:i}=this.config;if("function"!=typeof i){let e=`Configured requestMediaKeySystemAccess is not a function ${i}`;return null===Pk&&"http:"===self.location.protocol&&(e=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(e))}return i(e,t)}getMediaKeysPromise(e,t,i){var r;const a=function(e,t,i,r){let a;switch(e){case wk.FAIRPLAY:a=["cenc","sinf"];break;case wk.WIDEVINE:case wk.PLAYREADY:a=["cenc"];break;case wk.CLEARKEY:a=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${e}`)}return function(e,t,i,r){return[{initDataTypes:e,persistentState:r.persistentState||"optional",distinctiveIdentifier:r.distinctiveIdentifier||"optional",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:t.map(e=>({contentType:`audio/mp4; codecs=${e}`,robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null})),videoCapabilities:i.map(e=>({contentType:`video/mp4; codecs=${e}`,robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}))}]}(a,t,i,r)}(e,t,i,this.config.drmSystemOptions||{});let n=this.keySystemAccessPromises[e],s=null==(r=n)?void 0:r.keySystemAccess;if(!s){this.log(`Requesting encrypted media "${e}" key-system access with config: ${Zw(a)}`),s=this.requestMediaKeySystemAccess(e,a);const t=n=this.keySystemAccessPromises[e]={keySystemAccess:s};return s.catch(t=>{this.log(`Failed to obtain access to key-system "${e}": ${t}`)}),s.then(i=>{this.log(`Access for key-system "${i.keySystem}" obtained`);const r=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const a=t.mediaKeys=i.createMediaKeys().then(i=>(this.log(`Media-keys created for "${e}"`),t.hasMediaKeys=!0,r.then(t=>t?this.setMediaKeysServerCertificate(i,e,t):i)));return a.catch(t=>{this.error(`Failed to create media-keys for "${e}"}: ${t}`)}),a})}return s.then(()=>n.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:i}){this.log(`Creating key-system session "${t}" keyId: ${Pb(e.keyId||[])} keyUri: ${e.uri}`);const r=i.createSession(),a={decryptdata:e,keySystem:t,mediaKeys:i,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(a),a}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const i=this.createMediaKeySessionContext(e),r=mC(t),a="cenc";this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(i,a,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}updateKeySession(e,t){const i=e.mediaKeysSession;return this.log(`Updating key-session "${i.sessionId}" for keyId ${Pb(e.decryptdata.keyId||[])}\n      } (data length: ${t.byteLength})`),i.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>Ck(e)).filter(e=>!!e)}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then(({keySystem:e,mediaKeys:t})=>this.attemptSetMediaKeys(e,t))}selectKeySystem(e){return new Promise((t,i)=>{this.getKeySystemSelectionPromise(e).then(({keySystem:e})=>{const r=Ck(e);r?t(r):i(new Error(`Unable to find format for key-system "${e}"`))}).catch(i)})}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){const t=Ik(this.config),i=e.map(Ak).filter(e=>!!e&&-1!==t.indexOf(e));return this.selectKeySystem(i)}getKeyStatus(e){const{mediaKeySessions:t}=this;for(let i=0;i<t.length;i++){const r=fC(e,t[i]);if(r)return r}}loadKey(e){const t=e.keyInfo.decryptdata,i=mC(t),r=this.bannedKeyIds[i];if(r||"internal-error"===this.getKeyStatus(t)){const i=yC(r||"internal-error",t);return this.handleError(i,e.frag),Promise.reject(i)}const a=`(keyId: ${i} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${a}`);const n=this.keyIdToKeySessionPromise[i];if(!n){const r=this.getKeySystemForKeyPromise(t).then(({keySystem:i,mediaKeys:r})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${a}`),this.attemptSetMediaKeys(i,r).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:i,mediaKeys:r,decryptdata:t}))))).then(e=>{const i=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(e,"cenc",i,"playlist-key")});return r.catch(t=>this.handleError(t,e.frag)),this.keyIdToKeySessionPromise[i]=r,r}return n.catch(i=>{if(i instanceof gC){const r=yb({},i.data);"internal-error"===this.getKeyStatus(t)&&(r.decryptdata=t);const a=new gC(r,i.message);this.handleError(a,e.frag)}}),n}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e,t){if(this.hls)if(e instanceof gC){t&&(e.data.frag=t);const i=e.data.decryptdata;this.error(`${e.message}${i?` (${Pb(i.keyId||[])})`:""}`),this.hls.trigger(ab.ERROR,e.data)}else this.error(e.message),this.hls.trigger(ab.ERROR,{type:ib.KEY_SYSTEM_ERROR,details:rb.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}getKeySystemForKeyPromise(e){const t=mC(e),i=this.keyIdToKeySessionPromise[t];if(!i){const t=Ak(e.keyFormat),i=t?[t]:Ik(this.config);return this.attemptKeySystemAccess(i)}return i}getKeySystemSelectionPromise(e){if(e.length||(e=Ik(this.config)),0===e.length)throw new gC({type:ib.KEY_SYSTEM_ERROR,details:rb.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${Zw({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){if(this.mediaResolved=void 0,this.mediaKeys===t)return Promise.resolve();const i=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const r=Promise.all(i).then(()=>this.media?this.media.setMediaKeys(t):new Promise((e,i)=>{this.mediaResolved=()=>{if(this.mediaResolved=void 0,!this.media)return i(new Error("Attempted to set mediaKeys without media element attached"));this.mediaKeys=t,this.media.setMediaKeys(t).then(e).catch(i)}}));return this.mediaKeys=t,this.setMediaKeysQueue.push(r),r.then(()=>{this.log(`Media-keys set for "${e}"`),i.push(r),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(e=>-1===i.indexOf(e))})}generateRequestWithPreferredKeySession(e,t,i,r){var a;const n=null==(a=this.config.drmSystems)||null==(a=a[e.keySystem])?void 0:a.generateRequest;if(n)try{const r=n.call(this.hls,t,i,e);if(!r)throw new Error("Invalid response from configured generateRequest filter");t=r.initDataType,i=r.initData?r.initData:null,e.decryptdata.pssh=i?new Uint8Array(i):null}catch(p){if(this.warn(p.message),this.hls&&this.hls.config.debug)throw p}if(null===i)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const s=mC(e.decryptdata),o=e.decryptdata.uri;this.log(`Generating key-session request for "${r}" keyId: ${s} URI: ${o} (init data type: ${t} length: ${i.byteLength})`);const l=new OT,c=e._onmessage=t=>{const i=e.mediaKeysSession;if(!i)return void l.emit("error",new Error("invalid state"));const{messageType:r,message:a}=t;this.log(`"${r}" message event for session "${i.sessionId}" message size: ${a.byteLength}`),"license-request"===r||"license-renewal"===r?this.renewLicense(e,a).catch(e=>{l.eventNames().length?l.emit("error",e):this.handleError(e)}):"license-release"===r?e.keySystem===wk.FAIRPLAY&&this.updateKeySession(e,gk("acknowledged")).then(()=>this.removeSession(e)).catch(e=>this.handleError(e)):this.warn(`unhandled media key message type "${r}"`)},d=(e,t)=>{let i;t.keyStatus=e,e.startsWith("usable")?l.emit("resolved"):"internal-error"===e||"output-restricted"===e||"output-downscaled"===e?i=yC(e,t.decryptdata):"expired"===e?i=new Error(`key expired (keyId: ${s})`):"released"===e?i=new Error("key released"):"status-pending"===e||this.warn(`unhandled key status change "${e}" (keyId: ${s})`),i&&(l.eventNames().length?l.emit("error",i):this.handleError(i))},u=e._onkeystatuseschange=t=>{if(!e.mediaKeysSession)return void l.emit("error",new Error("invalid state"));const i=this.getKeyStatuses(e);if(!Object.keys(i).some(e=>"status-pending"!==i[e]))return;if("expired"===i[s])return this.log(`Expired key ${Zw(i)} in key-session "${e.mediaKeysSession.sessionId}"`),void this.renewKeySession(e);let r=i[s];if(r)d(r,e);else{var a;const t=1e3;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(a=e.keyStatusTimeouts)[s]||(a[s]=self.setTimeout(()=>{if(!e.mediaKeysSession||!this.mediaKeys)return;const i=this.getKeyStatus(e.decryptdata);if(i&&"status-pending"!==i)return this.log(`No status for keyId ${s} in key-session "${e.mediaKeysSession.sessionId}". Using session key-status ${i} from other session.`),d(i,e);this.log(`key status for ${s} in key-session "${e.mediaKeysSession.sessionId}" timed out after ${t}ms`),r="internal-error",d(r,e)},t)),this.log(`No status for keyId ${s} (${Zw(i)}).`)}};fT(e.mediaKeysSession,"message",c),fT(e.mediaKeysSession,"keystatuseschange",u);const h=new Promise((e,t)=>{l.on("error",t),l.on("resolved",e)});return e.mediaKeysSession.generateRequest(t,i).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${s} URI: ${o}`)}).catch(t=>{throw new gC({type:ib.KEY_SYSTEM_ERROR,details:rb.KEY_SYSTEM_NO_SESSION,error:t,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${t}`)}).then(()=>h).catch(t=>(l.removeAllListeners(),this.removeSession(e).then(()=>{throw t}))).then(()=>(l.removeAllListeners(),e))}getKeyStatuses(e){const t={};return e.mediaKeysSession.keyStatuses.forEach((i,r)=>{if("string"==typeof r&&"object"==typeof i){const e=r;r=i,i=e}const a="buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r);if(e.keySystem===wk.PLAYREADY&&16===a.length){const e=Pb(a);t[e]=i,yk(a)}const n=Pb(a);"internal-error"===i&&(this.bannedKeyIds[n]=i),this.log(`key status change "${i}" for keyStatuses keyId: ${n} key-session "${e.mediaKeysSession.sessionId}"`),t[n]=i}),t}fetchServerCertificate(e){const t=this.config,i=new(0,t.loader)(t),r=this.getServerCertificateUrl(e);return r?(this.log(`Fetching server certificate for "${e}"`),new Promise((a,n)=>{const s={responseType:"arraybuffer",url:r},o=t.certLoadPolicy.default,l={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},c={onSuccess:(e,t,i,r)=>{a(e.data)},onError:(t,i,a,o)=>{n(new gC({type:ib.KEY_SYSTEM_ERROR,details:rb.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:yb({url:s.url,data:void 0},t)},`"${e}" certificate request failed (${r}). Status: ${t.code} (${t.text})`))},onTimeout:(t,i,a)=>{n(new gC({type:ib.KEY_SYSTEM_ERROR,details:rb.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:{url:s.url,data:void 0}},`"${e}" certificate request timed out (${r})`))},onAbort:(e,t,i)=>{n(new Error("aborted"))}};i.load(s,l,c)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,i){return new Promise((r,a)=>{e.setServerCertificate(i).then(a=>{this.log(`setServerCertificate ${a?"success":"not supported by CDM"} (${i.byteLength}) on "${t}"`),r(e)}).catch(e=>{a(new gC({type:ib.KEY_SYSTEM_ERROR,details:rb.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(t=>this.updateKeySession(e,new Uint8Array(t)).catch(t=>{throw new gC({type:ib.KEY_SYSTEM_ERROR,details:rb.KEY_SYSTEM_SESSION_UPDATE_FAILED,decryptdata:e.decryptdata,error:t,fatal:!1},t.message)}))}unpackPlayReadyKeyMessage(e,t){const i=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!i.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const r=(new DOMParser).parseFromString(i,"application/xml"),a=r.querySelectorAll("HttpHeader");if(a.length>0){let t;for(let i=0,r=a.length;i<r;i++){var n,s;t=a[i];const r=null==(n=t.querySelector("name"))?void 0:n.textContent,o=null==(s=t.querySelector("value"))?void 0:s.textContent;r&&o&&e.setRequestHeader(r,o)}}const o=r.querySelector("Challenge"),l=null==o?void 0:o.textContent;if(!l)throw new Error("Cannot find <Challenge> in key message");return gk(atob(l))}setupLicenseXHR(e,t,i,r){const a=this.config.licenseXhrSetup;return a?Promise.resolve().then(()=>{if(!i.decryptdata)throw new Error("Key removed");return a.call(this.hls,e,t,i,r)}).catch(n=>{if(!i.decryptdata)throw n;return e.open("POST",t,!0),a.call(this.hls,e,t,i,r)}).then(i=>{e.readyState||e.open("POST",t,!0);return{xhr:e,licenseChallenge:i||r}}):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))}requestLicense(e,t){const i=this.config.keyLoadPolicy.default;return new Promise((r,a)=>{const n=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${n}`);const s=new XMLHttpRequest;s.responseType="arraybuffer",s.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return a(new Error("invalid state"));if(4===s.readyState)if(200===s.status){this._requestLicenseFailureCount=0;let t=s.response;this.log(`License received ${t instanceof ArrayBuffer?t.byteLength:t}`);const i=this.config.licenseResponseCallback;if(i)try{t=i.call(this.hls,s,n,e)}catch(o){this.error(o)}r(t)}else{const o=i.errorRetry,l=o?o.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l||s.status>=400&&s.status<500)a(new gC({type:ib.KEY_SYSTEM_ERROR,details:rb.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:s,response:{url:n,data:void 0,code:s.status,text:s.statusText}},`License Request XHR failed (${n}). Status: ${s.status} (${s.statusText})`));else{const i=l-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${i} attempts left`),this.requestLicense(e,t).then(r,a)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=s,this.setupLicenseXHR(s,n,e,t).then(({xhr:t,licenseChallenge:i})=>{e.keySystem==wk.PLAYREADY&&(i=this.unpackPlayReadyKeyMessage(t,i)),t.send(i)}).catch(a)})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const i=t.media;this.media=i,fT(i,"encrypted",this.onMediaEncrypted),fT(i,"waitingforkey",this.onWaitingForKey);const r=this.mediaResolved;r?r():this.mediaKeys=i.mediaKeys}onMediaDetached(){const e=this.media;e&&(gT(e,"encrypted",this.onMediaEncrypted),gT(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},this.bannedKeyIds={};const t=this.mediaResolved;if(t&&t(),!this.mediaKeys&&!this.mediaKeySessions.length)return;const i=this.media,r=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,Lk.clearKeyUriToKeyIdMap();const a=r.length;pC.CDMCleanupPromise=Promise.all(r.map(e=>this.removeSession(e)).concat((null==i||null==(e=i.setMediaKeys(null))?void 0:e.catch(e=>{this.log(`Could not clear media keys: ${e}`),this.hls&&this.hls.trigger(ab.ERROR,{type:ib.OTHER_ERROR,details:rb.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${e}`)})}))||Promise.resolve())).catch(e=>{this.log(`Could not close sessions and clear media keys: ${e}`),this.hls&&this.hls.trigger(ab.ERROR,{type:ib.OTHER_ERROR,details:rb.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${e}`)})}).then(()=>{a&&this.log("finished closing key sessions and clearing media keys")})}onManifestLoading(){this._clear()}onManifestLoaded(e,{sessionKeys:t}){if(t&&this.config.emeEnabled&&!this.keyFormatPromise){const e=t.reduce((e,t)=>(-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e),[]);this.log(`Selecting key-system from session-keys ${e.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(e)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:i,decryptdata:r}=e;if(t){this.log(`Remove licenses and keys and close session "${t.sessionId}" keyId: ${Pb((null==r?void 0:r.keyId)||[])}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),i&&i.readyState!==XMLHttpRequest.DONE&&i.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const a=this.mediaKeySessions.indexOf(e);a>-1&&this.mediaKeySessions.splice(a,1);const{keyStatusTimeouts:n}=e;n&&Object.keys(n).forEach(e=>self.clearTimeout(n[e]));const{drmSystemOptions:s}=this.config,o=function(e){var t;return!(!e||"persistent-license"!==e.sessionType&&(null==(t=e.sessionTypes)||!t.some(e=>"persistent-license"===e)))}(s)?new Promise((e,i)=>{self.setTimeout(()=>i(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(e).catch(i)}):Promise.resolve();return o.catch(e=>{this.log(`Could not remove session: ${e}`),this.hls&&this.hls.trigger(ab.ERROR,{type:ib.OTHER_ERROR,details:rb.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${e}`)})}).then(()=>t.close()).catch(e=>{this.log(`Could not close session: ${e}`),this.hls&&this.hls.trigger(ab.ERROR,{type:ib.OTHER_ERROR,details:rb.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${e}`)})})}return Promise.resolve()}}function mC(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return Pb(e.keyId)}function fC(e,t){return e.keyId&&t.mediaKeysSession.keyStatuses.has(e.keyId)?t.mediaKeysSession.keyStatuses.get(e.keyId):e.matches(t.decryptdata)?t.keyStatus:void 0}pC.CDMCleanupPromise=void 0;class gC extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}function yC(e,t){const i="output-restricted"===e,r=i?rb.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:rb.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new gC({type:ib.KEY_SYSTEM_ERROR,details:r,fatal:!1,decryptdata:t},i?"HDCP level output restricted":`key status changed to "${e}"`)}function vC(e,t){let i;try{i=new Event("addtrack")}catch(DP){i=document.createEvent("Event"),i.initEvent("addtrack",!1,!1)}i.track=e,t.dispatchEvent(i)}function bC(e,t){const i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error(`addCue is failed for: ${t}`)}catch(DP){Eb.debug(`[texttrack-utils]: ${DP}`);try{const i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}catch(r){Eb.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}"disabled"===i&&(e.mode=i)}function wC(e,t){const i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues)for(let r=e.cues.length;r--;)t&&e.cues[r].removeEventListener("enter",t),e.removeCue(e.cues[r]);"disabled"===i&&(e.mode=i)}function SC(e,t,i,r){const a=e.mode;if("disabled"===a&&(e.mode="hidden"),e.cues&&e.cues.length>0){const a=function(e,t,i){const r=[],a=function(e,t){if(t<=e[0].startTime)return 0;const i=e.length-1;if(t>e[i].endTime)return-1;let r,a=0,n=i;for(;a<=n;)if(r=Math.floor((n+a)/2),t<e[r].startTime)n=r-1;else{if(!(t>e[r].startTime&&a<i))return r;a=r+1}return e[a].startTime-t<t-e[n].startTime?a:n}(e,t);if(a>-1)for(let n=a,s=e.length;n<s;n++){const a=e[n];if(a.startTime>=t&&a.endTime<=i)r.push(a);else if(a.startTime>i)return r}return r}(e.cues,t,i);for(let t=0;t<a.length;t++)r&&!r(a[t])||e.removeCue(a[t])}"disabled"===a&&(e.mode=a)}function kC(e){const t=[];for(let i=0;i<e.length;i++){const r=e[i];"subtitles"!==r.kind&&"captions"!==r.kind||!r.label||t.push(e[i])}return t}function TC(e){let t=5381,i=e.length;for(;i;)t=33*t^e.charCodeAt(--i);return(t>>>0).toString()}const EC=.025;let AC=function(e){return e[e.Point=0]="Point",e[e.Range=1]="Range",e}({});function CC(e,t,i){return`${e.identifier}-${i+1}-${TC(t)}`}class IC{constructor(e,t){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=t,this.dateRange=e,this.setDateRange(e)}setDateRange(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}reset(){var e;this.appendInPlaceStarted=!1,null==(e=this.assetListLoader)||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}isAssetPastPlayoutLimit(e){var t;if(e>0&&e>=this.assetList.length)return!0;const i=this.playoutLimit;if(e<=0||isNaN(i))return!1;if(0===i)return!0;return((null==(t=this.assetList[e])?void 0:t.startOffset)||0)>i}findAssetIndex(e){return this.assetList.indexOf(e)}get identifier(){return this.dateRange.id}get startDate(){return this.dateRange.startDate}get startTime(){const e=this.dateRange.startTime;if(this.snapOptions.out){const t=this.dateRange.tagAnchor;if(t)return PC(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(0===this.startTime||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime;return t-PC(t,e)<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=Zv(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return PC(e,t)}return e}get appendInPlace(){return!!this.appendInPlaceStarted||!this.appendInPlaceDisabled&&!(this.cue.once||this.cue.pre||!this.startIsAligned||!(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<EC))}set appendInPlace(e){this.appendInPlaceStarted?this.resetOnResume=!e:this.appendInPlaceDisabled=!e}get timelineStart(){return null!==this._timelineStart?this._timelineStart:this.startTime}set timelineStart(e){this._timelineStart=e}get duration(){const e=this.playoutLimit;let t;return t=null!==this._duration?this._duration:this.dateRange.duration?this.dateRange.duration:this.dateRange.plannedDuration||0,!isNaN(e)&&e<t&&(t=e),t}set duration(e){this._duration=e}get cue(){return this.dateRange.cue}get timelineOccupancy(){return"RANGE"===this.dateRange.attr["X-TIMELINE-OCCUPIES"]?AC.Range:AC.Point}get supplementsPrimary(){return"PRIMARY"===this.dateRange.attr["X-TIMELINE-STYLE"]}get contentMayVary(){return"NO"!==this.dateRange.attr["X-CONTENT-MAY-VARY"]}get assetUrl(){return this.dateRange.attr["X-ASSET-URI"]}get assetListUrl(){return this.dateRange.attr["X-ASSET-LIST"]}get baseUrl(){return this.base.url}get assetListLoaded(){return this.assetList.length>0||null!==this.assetListResponse}toString(){return`["${(e=this).identifier}" ${e.cue.pre?"<pre>":e.cue.post?"<post>":""}${e.timelineStart.toFixed(2)}-${e.resumeTime.toFixed(2)}]`;var e}}function PC(e,t){return e-t.start<t.duration/2&&!(Math.abs(e-(t.start+t.duration))<EC)?t.start:t.start+t.duration}function _C(e,t,i){const r=new self.URL(e,i);return"data:"!==r.protocol&&r.searchParams.set("_HLS_primary_id",t),r}function RC(e,t){for(;null!=(i=e.assetList[++t])&&i.error;)var i;return t}function xC(e){const t=e.timelineStart,i=e.duration||0;return`["${e.identifier}" ${t.toFixed(2)}-${(t+i).toFixed(2)}]`}class LC{constructor(e,t,i,r){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{this.reachedPlayout(this.currentTime)&&this.hls&&this.hls.trigger(ab.PLAYOUT_LIMIT_REACHED,{})};const a=this.hls=new e(t);this.interstitial=i,this.assetItem=r;const n=()=>{this.hasDetails=!0};a.once(ab.LEVEL_LOADED,n),a.once(ab.AUDIO_TRACK_LOADED,n),a.once(ab.SUBTITLE_TRACK_LOADED,n),a.on(ab.MEDIA_ATTACHING,(e,{media:t})=>{this.removeMediaListeners(),this.mediaAttached=t;this.interstitial.playoutLimit&&(t.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&a.on(ab.BUFFER_APPENDED,()=>{const e=this.bufferedEnd;this.reachedPlayout(e)&&(this._bufferedEosTime=e,a.trigger(ab.BUFFERED_TO_END,void 0))}))})}get appendInPlace(){return this.interstitial.appendInPlace}loadSource(){const e=this.hls;if(e)if(e.url)e.levels.length&&!e.started&&e.startLoad(-1,!0);else{let i=this.assetItem.uri;try{i=_C(i,e.config.primarySessionId||"").href}catch(t){}e.loadSource(i)}}bufferedInPlaceToEnd(e){var t;if(!this.appendInPlace)return!1;if(null!=(t=this.hls)&&t.bufferedToEnd)return!0;if(!e)return!1;const i=Math.min(this._bufferedEosTime||Infinity,this.duration),r=this.timelineOffset,a=QS.bufferInfo(e,r,0);return this.getAssetTime(a.end)>=i-.02}reachedPlayout(e){const t=this.interstitial.playoutLimit;return this.startOffset+e>=t}get destroyed(){var e;return!(null!=(e=this.hls)&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return(null==(e=this.hls)?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const t=QS.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;if(!e)return 0;const t=this.interstitial.playoutLimit;if(t){const i=t-this.startOffset;if(i>0&&i<e)return i}return e}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return(null==(e=this.hls)?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const i=e-t;if(Math.abs(i)>1/9e4&&this.hls){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,i=this.duration;return Math.min(Math.max(0,e-t),i)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){var e;this.mediaAttached&&(null!=(e=this.hls)&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd))}destroy(){this.removeMediaListeners(),this.hls&&this.hls.destroy(),this.hls=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){var t;this.loadSource(),null==(t=this.hls)||t.attachMedia(e)}detachMedia(){var e;this.removeMediaListeners(),this.mediaAttached=null,null==(e=this.hls)||e.detachMedia()}resumeBuffering(){var e;null==(e=this.hls)||e.resumeBuffering()}pauseBuffering(){var e;null==(e=this.hls)||e.pauseBuffering()}transferMedia(){var e;return this.bufferSnapShot(),(null==(e=this.hls)?void 0:e.transferMedia())||null}resetDetails(){const e=this.hls;if(e&&this.hasDetails){e.stopLoad();const t=e=>delete e.details;e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}on(e,t,i){var r;null==(r=this.hls)||r.on(e,t)}once(e,t,i){var r;null==(r=this.hls)||r.once(e,t)}off(e,t,i){var r;null==(r=this.hls)||r.off(e,t)}toString(){var e;return`HlsAssetPlayer: ${xC(this.assetItem)} ${null==(e=this.hls)?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}class DC extends vb{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((i,r)=>e<=r.startOffset&&t>r.startOffset?(delete r.error,i+1):i,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let i=-1;e.nextEvent?i=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(i=this.findEventIndex(e.previousEvent.identifier)+1);const r=this.items;if(r)for(r[i]||(void 0===t&&(t=e.start),i=this.findItemIndexAtTime(t));i>=0&&null!=(a=r[i])&&a.event;){var a;i--}return i}findItemIndexAtTime(e,t){const i=this.items;if(i)for(let r=0;r<i.length;r++){let a=i[r];if(t&&"primary"!==t&&(a=a[t]),e===a.start||e>a.start&&e<a.end)return r}return-1}findJumpRestrictedIndex(e,t){const i=this.items;if(i)for(let r=e;r<=t&&i[r];r++){const e=i[r].event;if(null!=e&&e.restrictions.jump&&!e.appendInPlace)return r}return-1}findEventIndex(e){const t=this.items;if(t)for(let r=t.length;r--;){var i;if((null==(i=t[r].event)?void 0:i.identifier)===e)return r}return-1}findAssetIndex(e,t){const i=e.assetList,r=i.length;if(r>1)for(let a=0;a<r;a++){const e=i[a];if(!e.error){const i=e.timelineStart;if(t===i||t>i&&(t<i+(e.duration||0)||a===r-1))return a}}return 0}get assetIdAtEnd(){var e;const t=null==(e=this.items)||null==(e=e[this.length-1])?void 0:e.event;if(t){const e=t.assetList,i=e[e.length-1];if(i)return i.identifier}return null}parseInterstitialDateRanges(e,t){const i=e.main.details,{dateRanges:r}=i,a=this.events,n=this.parseDateRanges(r,{url:i.url},t),s=Object.keys(r),o=a?a.filter(e=>!s.includes(e.identifier)):[];n.length&&n.sort((e,t)=>{const i=e.cue.pre,r=e.cue.post,a=t.cue.pre,n=t.cue.post;if(i&&!a)return-1;if(a&&!i)return 1;if(r&&!n)return 1;if(n&&!r)return-1;if(!(i||a||r||n)){const i=e.startTime,r=t.startTime;if(i!==r)return i-r}return e.dateRange.tagOrder-t.dateRange.tagOrder}),this.events=n,o.forEach(e=>{this.removeEvent(e)}),this.updateSchedule(e,o)}updateSchedule(e,t=[],i=!1){const r=this.events||[];if(r.length||t.length||this.length<2){const a=this.items,n=this.parseSchedule(r,e);(i||t.length||(null==a?void 0:a.length)!==n.length||n.some((e,t)=>Math.abs(e.playout.start-a[t].playout.start)>.005||Math.abs(e.playout.end-a[t].playout.end)>.005))&&(this.items=n,this.onScheduleUpdate(t,a))}}parseDateRanges(e,t,i){const r=[],a=Object.keys(e);for(let n=0;n<a.length;n++){const s=a[n],o=e[s];if(o.isInterstitial){let e=this.eventMap[s];e?e.setDateRange(o):(e=new IC(o,t),this.eventMap[s]=e,!1===i&&(e.appendInPlace=i)),r.push(e)}}return r}parseSchedule(e,t){const i=[],r=t.main.details,a=r.live?Infinity:r.edge;let n=0;if((e=e.filter(e=>!(e.error||e.cue.once&&e.hasPlayed))).length){this.resolveOffsets(e,t);let r=0,o=0;if(e.forEach((t,s)=>{const l=t.cue.pre,c=t.cue.post,d=e[s-1]||null,u=t.appendInPlace,h=c?a:t.startOffset,p=t.duration,m=t.timelineOccupancy===AC.Range?p:0,f=t.resumptionOffset,g=(null==d?void 0:d.startTime)===h,y=h+t.cumulativeDuration;let v=u?y+p:h+f;if(l||!c&&h<=0){const e=o;o+=m,t.timelineStart=y;const r=n;n+=p,i.push({event:t,start:y,end:v,playout:{start:r,end:n},integrated:{start:e,end:o}})}else{if(!(h<=a))return;{if(!g){const a=h-r;if(a>.033){const l=r,c=o;o+=a;const d=n;n+=a;const u={previousEvent:e[s-1]||null,nextEvent:t,start:l,end:l+a,playout:{start:d,end:n},integrated:{start:c,end:o}};i.push(u)}else a>0&&d&&(d.cumulativeDuration+=a,i[i.length-1].end=h)}c&&(v=y),t.timelineStart=y;const a=o;o+=m;const l=n;n+=p,i.push({event:t,start:y,end:v,playout:{start:l,end:n},integrated:{start:a,end:o}})}}const b=t.resumeTime;r=c||b>a?a:b}),r<a){var s;const e=r,t=o,l=a-r;o+=l;const c=n;n+=l,i.push({previousEvent:(null==(s=i[i.length-1])?void 0:s.event)||null,nextEvent:null,start:r,end:e+l,playout:{start:c,end:n},integrated:{start:t,end:o}})}this.setDurations(a,n,o)}else{const e=0;i.push({previousEvent:null,nextEvent:null,start:e,end:a,playout:{start:e,end:a},integrated:{start:e,end:a}}),this.setDurations(a,a,a)}return i}setDurations(e,t,i){this.durations={primary:e,playout:t,integrated:i}}resolveOffsets(e,t){const i=t.main.details,r=i.live?Infinity:i.edge;let a=0,n=-1;e.forEach((s,o)=>{const l=s.cue.pre,c=s.cue.post,d=l?0:c?r:s.startTime;this.updateAssetDurations(s);if(n===d?s.cumulativeDuration=a:(a=0,n=d),!c&&s.snapOptions.in&&(s.resumeAnchor=cS(null,i.fragments,s.startOffset+s.resumptionOffset,0,0)||void 0),s.appendInPlace&&!s.appendInPlaceStarted){this.primaryCanResumeInPlaceAt(s,t)||(s.appendInPlace=!1)}if(!s.appendInPlace&&o+1<e.length){e[o+1].startTime-e[o].resumeTime<.033&&(e[o+1].appendInPlace=!1,e[o+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${s}`))}const u=Zv(s.resumeOffset)?s.resumeOffset:s.duration;a+=u})}primaryCanResumeInPlaceAt(e,t){const i=e.resumeTime,r=e.startTime+e.resumptionOffset;if(Math.abs(i-r)>EC)return this.log(`"${e.identifier}" resumption ${i} not aligned with estimated timeline end ${r}`),!1;return!Object.keys(t).some(r=>{const a=t[r].details,n=a.edge;if(i>=n)return this.log(`"${e.identifier}" resumption ${i} past ${r} playlist end ${n}`),!1;const s=cS(null,a.fragments,i);if(!s)return this.log(`"${e.identifier}" resumption ${i} does not align with any fragments in ${r} playlist (${a.fragStart}-${a.fragmentEnd})`),!0;const o="audio"===r?.175:0;return!(Math.abs(s.start-i)<EC+o||Math.abs(s.end-i)<EC+o)&&(this.log(`"${e.identifier}" resumption ${i} not aligned with ${r} fragment bounds (${s.start}-${s.end} sn: ${s.sn} cc: ${s.cc})`),!0)})}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let i=0,r=!1,a=!1;for(let n=0;n<e.assetList.length;n++){const s=e.assetList[n],o=t+i;s.startOffset=i,s.timelineStart=o,r||(r=null===s.duration),a||(a=!!s.error);i+=s.error?0:s.duration||0}e.duration=r&&!a?Math.max(i,e.duration):i}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function MC(e){return`[${e.event?'"'+e.event.identifier+'"':"primary"}: ${e.start.toFixed(2)}-${e.end.toFixed(2)}]`}class OC{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const i=e.assetListUrl;let r;try{r=_C(i,this.hls.sessionId,e.baseUrl)}catch(d){const t=this.assignAssetListError(e,rb.ASSET_LIST_LOAD_ERROR,d,i);return void this.hls.trigger(ab.ERROR,t)}t&&"data:"!==r.protocol&&r.searchParams.set("_HLS_start_offset",""+t);const a=this.hls.config,n=new(0,a.loader)(a),s={responseType:"json",url:r.href},o=a.interstitialAssetListLoadPolicy.default,l={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},c={onSuccess:(t,i,r,a)=>{const n=t.data,s=null==n?void 0:n.ASSETS;if(!Array.isArray(s)){const t=this.assignAssetListError(e,rb.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),r.url,i,a);return void this.hls.trigger(ab.ERROR,t)}e.assetListResponse=n,this.hls.trigger(ab.ASSET_LIST_LOADED,{event:e,assetListResponse:n,networkDetails:a})},onError:(t,i,r,a)=>{const n=this.assignAssetListError(e,rb.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${t.code} ${t.text} (${i.url})`),i.url,a,r);this.hls.trigger(ab.ERROR,n)},onTimeout:(t,i,r)=>{const a=this.assignAssetListError(e,rb.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${i.url})`),i.url,t,r);this.hls.trigger(ab.ERROR,a)}};return n.load(s,l,c),this.hls.trigger(ab.ASSET_LIST_LOADING,{event:e}),n}assignAssetListError(e,t,i,r,a,n){return e.error=i,{type:ib.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:i,networkDetails:n,stats:a}}}function NC(e){var t;null==e||null==(t=e.play())||t.catch(()=>{})}function FC(e,t){return`[${e}] Advancing timeline position to ${t}`}class UC{constructor(e){this.buffered=void 0;const t=(t,i,r)=>{if((i>>>=0)>r-1)throw new DOMException(`Failed to execute '${t}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${r})`);return e[i][t]};this.buffered={get length(){return e.length},end:i=>t("end",i,e.length),start:i=>t("start",i,e.length)}}}const BC={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},zC=e=>String.fromCharCode(BC[e]||e),jC=15,$C=100,GC={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},qC={17:2,18:4,21:6,22:8,23:10,19:13,20:15},HC={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},VC={25:2,26:4,29:6,30:8,31:10,27:13,28:15},WC=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class KC{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const i="function"==typeof t?t():t;Eb.log(`${this.time} [${e}] ${i}`)}}}const YC=function(e){const t=[];for(let i=0;i<e.length;i++)t.push(e[i].toString(16));return t};class JC{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let i=0;i<t.length;i++){const r=t[i];e.hasOwnProperty(r)&&(this[r]=e[r])}}isDefault(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class XC{constructor(){this.uchar=" ",this.penState=new JC}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return" "===this.uchar&&this.penState.isDefault()}}class QC{constructor(e){this.chars=[],this.pos=0,this.currPenState=new JC,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<$C;t++)this.chars.push(new XC);this.logger=e}equals(e){for(let t=0;t<$C;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<$C;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<$C;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>$C&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=$C)}moveCursor(e){const t=this.pos+e;if(e>1)for(let i=this.pos+1;i<t+1;i++)this.chars[i].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=zC(e);this.pos>=$C?this.logger.log(0,()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))}clearFromPos(e){let t;for(t=e;t<$C;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let i=0;i<$C;i++){const r=this.chars[i].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e);this.chars[this.pos].setPenState(this.currPenState)}}class ZC{constructor(e){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<jC;t++)this.rows.push(new QC(e));this.logger=e}reset(){for(let e=0;e<jC;e++)this.rows[e].clear();this.currRow=14}equals(e){let t=!0;for(let i=0;i<jC;i++)if(!this.rows[i].equals(e.rows[i])){t=!1;break}return t}copy(e){for(let t=0;t<jC;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<jC;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e);this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+Zw(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let t=0;t<jC;t++)this.rows[t].clear();const e=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){const r=i.rows[e].cueStartTime,a=this.logger.time;if(null!==r&&null!==a&&r<a)for(let n=0;n<this.nrRollUpRows;n++)this.rows[t-this.nrRollUpRows+n+1].copy(i.rows[e+n])}}this.currRow=t;const i=this.rows[this.currRow];if(null!==e.indent){const t=e.indent,r=Math.max(t-1,0);i.setCursor(e.indent),e.color=i.chars[r].penState.foreground}const r={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(r)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+Zw(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(null===this.nrRollUpRows)return void this.logger.log(3,"roll_up but nrRollUpRows not set yet");this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let i="",r=-1;for(let a=0;a<jC;a++){const i=this.rows[a].getTextString();i&&(r=a+1,e?t.push("Row "+r+": '"+i+"'"):t.push(i.trim()))}return t.length>0&&(i=e?"["+t.join(" | ")+"]":t.join("\n")),i}getTextAndFormat(){return this.rows}}class eI{constructor(e,t,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new ZC(i),this.nonDisplayedMemory=new ZC(i),this.lastOutputScreen=new ZC(i),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let i=0;i<e.length;i++)this.writeScreen.insertChar(e[i]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{const i=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[i]}this.logger.log(2,"MIDROW: "+Zw(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class tI{constructor(e,t,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory={a:null,b:null},this.logger=void 0;const r=this.logger=new KC;this.channels=[null,new eI(e,t,r),new eI(e+1,i,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let i=0;i<t.length;i+=2){const e=127&t[i],r=127&t[i+1];let a=!1,n=null;if(0===e&&0===r)continue;this.logger.log(3,()=>"["+YC([t[i],t[i+1]])+"] -> ("+YC([e,r])+")");const s=this.cmdHistory;if(e>=16&&e<=31){if(rI(e,r,s)){iI(null,null,s),this.logger.log(3,()=>"Repeated command ("+YC([e,r])+") is dropped");continue}iI(e,r,this.cmdHistory),a=this.parseCmd(e,r),a||(a=this.parseMidrow(e,r)),a||(a=this.parsePAC(e,r)),a||(a=this.parseBackgroundAttributes(e,r))}else iI(null,null,s);if(!a&&(n=this.parseChars(e,r),n)){const e=this.currentChannel;if(e&&e>0){this.channels[e].insertChars(n)}else this.logger.log(2,"No channel found yet. TEXT-MODE?")}a||n||this.logger.log(2,()=>"Couldn't parse cleaned data "+YC([e,r])+" orig: "+YC([t[i],t[i+1]]))}}parseCmd(e,t){if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=33&&t<=35))return!1;const i=20===e||21===e||23===e?1:2,r=this.channels[i];return 20===e||21===e||28===e||29===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),this.currentChannel=i,!0}parseMidrow(e,t){let i=0;if((17===e||25===e)&&t>=32&&t<=47){if(i=17===e?1:2,i!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const r=this.channels[i];return!!r&&(r.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+YC([e,t])+")"),!0)}return!1}parsePAC(e,t){let i;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127)&&!((16===e||24===e)&&t>=64&&t<=95))return!1;const r=e<=23?1:2;i=t>=64&&t<=95?1===r?GC[e]:HC[e]:1===r?qC[e]:VC[e];const a=this.channels[r];return!!a&&(a.setPAC(this.interpretPAC(i,t)),this.currentChannel=r,!0)}interpretPAC(e,t){let i;const r={color:null,italics:!1,indent:null,underline:!1,row:e};return i=t>95?t-96:t-64,r.underline=!(1&~i),i<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((i-16)/2),r}parseChars(e,t){let i,r=null,a=null;if(e>=25?(i=2,a=e-8):(i=1,a=e),a>=17&&a<=19){let e;e=17===a?t+80:18===a?t+112:t+144,this.logger.log(2,()=>"Special char '"+zC(e)+"' in channel "+i),r=[e]}else e>=32&&e<=127&&(r=0===t?[e]:[e,t]);return r&&this.logger.log(3,()=>"Char codes =  "+YC(r).join(",")),r}parseBackgroundAttributes(e,t){if(!((16===e||24===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=45&&t<=47))return!1;let i;const r={};16===e||24===e?(i=Math.floor((t-32)/2),r.background=WC[i],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));const a=e<=23?1:2;return this.channels[a].setBkgData(r),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}iI(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const i=this.channels[t];i&&i.cueSplitAtTime(e)}}}function iI(e,t,i){i.a=e,i.b=t}function rI(e,t,i){return i.a===e&&i.b===t}var aI=function(){if(null!=bk&&bk.VTTCue)return self.VTTCue;const e=["","lr","rl"],t=["start","middle","end","left","right"];function i(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;const i=t.toLowerCase();return!!~e.indexOf(i)&&i}function r(e){return i(t,e)}function a(e,...t){let i=1;for(;i<arguments.length;i++){const t=arguments[i];for(const i in t)e[i]=t[i]}return e}function n(t,n,s){const o=this,l={enumerable:!0};o.hasBeenReset=!1;let c="",d=!1,u=t,h=n,p=s,m=null,f="",g=!0,y="auto",v="start",b=50,w="middle",S=50,k="middle";Object.defineProperty(o,"id",a({},l,{get:function(){return c},set:function(e){c=""+e}})),Object.defineProperty(o,"pauseOnExit",a({},l,{get:function(){return d},set:function(e){d=!!e}})),Object.defineProperty(o,"startTime",a({},l,{get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");u=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",a({},l,{get:function(){return h},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",a({},l,{get:function(){return p},set:function(e){p=""+e,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",a({},l,{get:function(){return m},set:function(e){m=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",a({},l,{get:function(){return f},set:function(t){const r=function(t){return i(e,t)}(t);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");f=r,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",a({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",a({},l,{get:function(){return y},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",a({},l,{get:function(){return v},set:function(e){const t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");v=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",a({},l,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",a({},l,{get:function(){return w},set:function(e){const t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",a({},l,{get:function(){return S},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");S=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",a({},l,{get:function(){return k},set:function(e){const t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");k=t,this.hasBeenReset=!0}})),o.displayState=void 0}return n.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},n}();class nI{decode(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function sI(e){function t(e,t,i,r){return 3600*(0|e)+60*(0|t)+(0|i)+parseFloat(r||0)}const i=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return i?parseFloat(i[2])>59?t(i[2],i[3],0,i[4]):t(i[1],i[2],i[3],i[4]):null}class oI{constructor(){this.values=Object.create(null)}set(e,t){this.get(e)||""===t||(this.values[e]=t)}get(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,i){for(let r=0;r<i.length;++r)if(t===i[r]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const i=parseFloat(t);if(i>=0&&i<=100)return this.set(e,i),!0}return!1}}function lI(e,t,i,r){const a=r?e.split(r):[e];for(const n in a){if("string"!=typeof a[n])continue;const e=a[n].split(i);if(2!==e.length)continue;t(e[0],e[1])}}const cI=new aI(0,0,""),dI="middle"===cI.align?"middle":"center";function uI(e,t,i){const r=e;function a(){const t=sI(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function n(){e=e.replace(/^\s+/,"")}if(n(),t.startTime=a(),n(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.slice(3),n(),t.endTime=a(),n(),function(e,t){const r=new oI;lI(e,function(e,t){let a;switch(e){case"region":for(let a=i.length-1;a>=0;a--)if(i[a].id===t){r.set(e,i[a].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":a=t.split(","),r.integer(e,a[0]),r.percent(e,a[0])&&r.set("snapToLines",!1),r.alt(e,a[0],["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start",dI,"end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start",dI,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",dI,"end","left","right"])}},/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");let a=r.get("line","auto");"auto"===a&&-1===cI.line&&(a=-1),t.line=a,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",dI);let n=r.get("position","auto");"auto"===n&&50===cI.position&&(n="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=n}(e,t)}function hI(e){return e.replace(/<br(?: \/)?>/gi,"\n")}class pI{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new nI,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;function i(){let e=t.buffer,i=0;for(e=hI(e);i<e.length&&"\r"!==e[i]&&"\n"!==e[i];)++i;const r=e.slice(0,i);return"\r"===e[i]&&++i,"\n"===e[i]&&++i,t.buffer=e.slice(i),r}function r(e){lI(e,function(e,t){},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{let e="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;e=i();const r=e.match(/^()?WEBVTT([ \t].*)?$/);if(null==r||!r[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let n=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(n?n=!1:e=i(),t.state){case"HEADER":/:/.test(e)?r(e):e||(t.state="ID");continue;case"NOTE":e||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(e)){t.state="NOTE";break}if(!e)continue;if(t.cue=new aI(0,0,""),t.state="CUE",-1===e.indexOf("--\x3e")){t.cue.id=e;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{uI(e,t.cue,t.regionList)}catch(a){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const i=-1!==e.indexOf("--\x3e");if(!e||i&&(n=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=e}continue;case"BADCUE":e||(t.state="ID")}}}catch(a){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const mI=/\r\n|\n\r|\n|\r/g,fI=function(e,t,i=0){return e.slice(i,i+t.length)===t};function gI(e,t,i){return TC(e.toString())+TC(t.toString())+TC(i)}function yI(e,t,i,r,a,n,s){const o=new pI,l=Ib(new Uint8Array(e)).trim().replace(mI,"\n").split("\n"),c=[],d=t?function(e,t=1){return zE(e,9e4,1/t)}(t.baseTime,t.timescale):0;let u,h="00:00.000",p=0,m=0,f=!0;o.oncue=function(e){const n=i[r];let s=i.ccOffset;const o=(p-d)/9e4;if(null!=n&&n.new&&(void 0!==m?s=i.ccOffset=n.start:function(e,t,i){let r=e[t],a=e[r.prevCC];if(!a||!a.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;null!=(n=a)&&n.new;){var n;e.ccOffset+=r.start-a.start,r.new=!1,r=a,a=e[r.prevCC]}e.presentationOffset=i}(i,r,o)),o){if(!t)return void(u=new Error("Missing initPTS for VTT MPEGTS"));s=o-i.presentationOffset}const l=e.endTime-e.startTime,h=KE(9e4*(e.startTime+s-m),9e4*a)/9e4;e.startTime=Math.max(h,0),e.endTime=Math.max(h+l,0);const f=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(f)),e.id||(e.id=gI(e.startTime,e.endTime,f)),e.endTime>0&&c.push(e)},o.onparsingerror=function(e){u=e},o.onflush=function(){u?s(u):n(c)},l.forEach(e=>{if(f){if(fI(e,"X-TIMESTAMP-MAP=")){f=!1,e.slice(16).split(",").forEach(e=>{fI(e,"LOCAL:")?h=e.slice(6):fI(e,"MPEGTS:")&&(p=parseInt(e.slice(7)))});try{m=function(e){let t=parseInt(e.slice(-3));const i=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),a=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!(Zv(t)&&Zv(i)&&Zv(r)&&Zv(a)))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*i,t+=6e4*r,t+=36e5*a,t}(h)/1e3}catch(t){u=t}return}""===e&&(f=!1)}o.parse(e+"\n")}),o.flush()}const vI="stpp.ttml.im1t",bI=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,wI=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,SI={left:"start",center:"center",right:"end",start:"start",end:"end"};function kI(e,t,i,r){const a=iw(new Uint8Array(e),["mdat"]);if(0===a.length)return void r(new Error("Could not parse IMSC1 mdat"));const n=a.map(e=>Ib(e)),s=function(e,t,i=1,r=!1){return zE(e,t,1/i,r)}(t.baseTime,1,t.timescale);try{n.forEach(e=>i(function(e,t){const i=(new DOMParser).parseFromString(e,"text/xml"),r=i.getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");const a={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},n=Object.keys(a).reduce((e,t)=>(e[t]=r.getAttribute(`ttp:${t}`)||a[t],e),{}),s="preserve"!==r.getAttribute("xml:space"),o=EI(TI(r,"styling","style")),l=EI(TI(r,"layout","region")),c=TI(r,"body","[begin]");return[].map.call(c,e=>{const i=AI(e,s);if(!i||!e.hasAttribute("begin"))return null;const r=PI(e.getAttribute("begin"),n),a=PI(e.getAttribute("dur"),n);let c=PI(e.getAttribute("end"),n);if(null===r)throw II(e);if(null===c){if(null===a)throw II(e);c=r+a}const d=new aI(r-t,c-t,i);d.id=gI(d.startTime,d.endTime,d.text);const u=function(e,t,i){const r="http://www.w3.org/ns/ttml#styling";let a=null;const n=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;s&&i.hasOwnProperty(s)&&(a=i[s]);return n.reduce((i,n)=>{const s=CI(t,r,n)||CI(e,r,n)||CI(a,r,n);return s&&(i[n]=s),i},{})}(l[e.getAttribute("region")],o[e.getAttribute("style")],o),{textAlign:h}=u;if(h){const e=SI[h];e&&(d.lineAlign=e),d.align=h}return fb(d,u),d}).filter(e=>null!==e)}(e,s)))}catch(o){r(o)}}function TI(e,t,i){const r=e.getElementsByTagName(t)[0];return r?[].slice.call(r.querySelectorAll(i)):[]}function EI(e){return e.reduce((e,t)=>{const i=t.getAttribute("xml:id");return i&&(e[i]=t),e},{})}function AI(e,t){return[].slice.call(e.childNodes).reduce((e,i,r)=>{var a;return"br"===i.nodeName&&r?e+"\n":null!=(a=i.childNodes)&&a.length?AI(i,t):t?e+i.textContent.trim().replace(/\s+/g," "):e+i.textContent},"")}function CI(e,t,i){return e&&e.hasAttributeNS(t,i)?e.getAttributeNS(t,i):null}function II(e){return new Error(`Could not parse ttml timestamp ${e}`)}function PI(e,t){if(!e)return null;let i=sI(e);return null===i&&(bI.test(e)?i=function(e,t){const i=bI.exec(e),r=(0|i[4])+(0|i[5])/t.subFrameRate;return 3600*(0|i[1])+60*(0|i[2])+(0|i[3])+r/t.frameRate}(e,t):wI.test(e)&&(i=function(e,t){const i=wI.exec(e),r=Number(i[1]);switch(i[2]){case"h":return 3600*r;case"m":return 60*r;case"ms":return 1e3*r;case"f":return r/t.frameRate;case"t":return r/t.tickRate}return r}(e,t))),i}class _I{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,i){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}function RI(e){return e.characteristics&&/transcribes-spoken-dialog/gi.test(e.characteristics)&&/describes-music-and-sound/gi.test(e.characteristics)?"captions":"subtitles"}function xI(e,t){return!!e&&e.kind===RI(t)&&dA(t,e)}function LI(e,t,i,r){return Math.min(t,r)-Math.max(e,i)}const DI=/\s/,MI={newCue(e,t,i,r){const a=[];let n,s,o,l,c;const d=self.VTTCue||self.TextTrackCue;for(let h=0;h<r.rows.length;h++)if(n=r.rows[h],o=!0,l=0,c="",!n.isEmpty()){var u;for(let e=0;e<n.chars.length;e++)DI.test(n.chars[e].uchar)&&o?l++:(c+=n.chars[e].uchar,o=!1);n.cueStartTime=t,t===i&&(i+=1e-4),l>=16?l--:l++;const r=hI(c.trim()),p=gI(t,i,r);null!=e&&null!=(u=e.cues)&&u.getCueById(p)||(s=new d(t,i,r),s.id=p,s.line=h+1,s.align="left",s.position=10+Math.min(80,10*Math.floor(8*l/32)),a.push(s))}return e&&a.length&&(a.sort((e,t)=>"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line),a.forEach(t=>bC(e,t))),a}};const OI=/(\d+)-(\d+)\/(\d+)/;class NI{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||FI,this.controller=new self.AbortController,this.stats=new Bb}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,i){const r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();const a=function(e,t){const i={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(fb({},e.headers))};e.rangeEnd&&i.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1));return i}(e,this.controller.signal),n="arraybuffer"===e.responseType,s=n?"byteLength":"length",{maxTimeToFirstByteMs:o,maxLoadTimeMs:l}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=i,this.request=this.fetchSetup(e,a),self.clearTimeout(this.requestTimeout),t.timeout=o&&Zv(o)?o:l,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout);(iA(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(i=>{var a;this.response=this.loader=i;const s=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=l,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},l-(s-r.loading.start)),!i.ok){const{status:e,statusText:t}=i;throw new UI(t||"fetch, bad network response",e,i)}r.loading.first=s,r.total=function(e){const t=e.get("Content-Range");if(t){const e=function(e){const t=OI.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}(t);if(Zv(e))return e}const i=e.get("Content-Length");if(i)return parseInt(i)}(i.headers)||r.total;const o=null==(a=this.callbacks)?void 0:a.onProgress;return o&&Zv(t.highWaterMark)?this.loadProgressively(i,r,e,t.highWaterMark,o):n?i.arrayBuffer():"json"===e.responseType?i.json():i.text()}).then(i=>{var a,n;const o=this.response;if(!o)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const l=i[s];l&&(r.loaded=r.total=l);const c={url:o.url,data:i,code:o.status},d=null==(a=this.callbacks)?void 0:a.onProgress;d&&!Zv(t.highWaterMark)&&d(r,e,i,o),null==(n=this.callbacks)||n.onSuccess(c,r,e,o)}).catch(t=>{var i;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const a=t&&t.code||0,n=t?t.message:null;null==(i=this.callbacks)||i.onError({code:a,text:n},e,t?t.details:null,r)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,i,r=0,a){const n=new LT,s=e.body.getReader(),o=()=>s.read().then(s=>{if(s.done)return n.dataLength&&a(t,i,n.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const l=s.value,c=l.length;return t.loaded+=c,c<r||n.dataLength?(n.push(l),n.dataLength>=r&&a(t,i,n.flush().buffer,e)):a(t,i,l.buffer,e),o()}).catch(()=>Promise.reject());return o()}}function FI(e,t){return new self.Request(e.url,t)}class UI extends Error{constructor(e,t,i){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=i}}const BI=/^age:\s*[\d.]+\s*$/im;class zI{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new Bb,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,i){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=i,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const i=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0,r.aborted=!1;const a=this.xhrSetup;a?Promise.resolve().then(()=>{if(this.loader===i&&!this.stats.aborted)return a(i,t.url)}).catch(e=>{if(this.loader===i&&!this.stats.aborted)return i.open("GET",t.url,!0),a(i,t.url)}).then(()=>{this.loader!==i||this.stats.aborted||this.openAndSendXhr(i,t,e)}).catch(e=>{var a;null==(a=this.callbacks)||a.onError({code:i.status,text:e.message},t,i,r)}):this.openAndSendXhr(i,t,e)}openAndSendXhr(e,t,i){e.readyState||e.open("GET",t.url,!0);const r=t.headers,{maxTimeToFirstByteMs:a,maxLoadTimeMs:n}=i.loadPolicy;if(r)for(const s in r)e.setRequestHeader(s,r[s]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),i.timeout=a&&Zv(a)?a:n,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:i}=this;if(!e||!t)return;const r=t.readyState,a=this.config;if(!i.aborted&&r>=2&&(0===i.loading.first&&(i.loading.first=Math.max(self.performance.now(),i.loading.start),a.timeout!==a.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),a.timeout=a.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.loadPolicy.maxLoadTimeMs-(i.loading.first-i.loading.start)))),4===r)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const r=t.status,l="text"===t.responseType?t.responseText:null;if(r>=200&&r<300){const a=null!=l?l:t.response;if(null!=a){var n,s;i.loading.end=Math.max(self.performance.now(),i.loading.first);const o="arraybuffer"===t.responseType?a.byteLength:a.length;i.loaded=i.total=o,i.bwEstimate=8e3*i.total/(i.loading.end-i.loading.first);const l=null==(n=this.callbacks)?void 0:n.onProgress;l&&l(i,e,a,t);const c={url:t.responseURL,data:a,code:r};return void(null==(s=this.callbacks)||s.onSuccess(c,i,e,t))}}const c=a.loadPolicy.errorRetry;var o;if(bS(c,i.retry,!1,{url:e.url,data:void 0,code:r}))this.retry(c);else Eb.error(`${r} while loading ${e.url}`),null==(o=this.callbacks)||o.onError({code:r,text:t.statusText},e,t,i)}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry;if(bS(e,this.stats.retry,!0))this.retry(e);else{var t;Eb.warn(`timeout while loading ${null==(t=this.context)?void 0:t.url}`);const e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:i}=this;this.retryDelay=yS(e,i.retry),i.retry++,Eb.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${null==t?void 0:t.url}, retrying ${i.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&BI.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const jI=yb(yb({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,frontBufferFlushThreshold:Infinity,startOnSegmentBoundary:!1,maxBufferSize:6e7,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncMode:"edge",liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:zI,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:class extends vb{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.supportedCache={},this.bwEstimator=void 0,this._abandonRulesCheck=e=>{var t;const{fragCurrent:i,partCurrent:r,hls:a}=this,{autoLevelEnabled:n,media:s}=a;if(!i||!s)return;const o=performance.now(),l=r?r.stats:i.stats,c=r?r.duration:i.duration,d=o-l.loading.start,u=a.minAutoLevel,h=i.level,p=this._nextAutoLevel;if(l.aborted||l.loaded&&l.loaded===l.total||h<=u)return this.clearTimer(),void(this._nextAutoLevel=-1);if(!n)return;const m=p>-1&&p!==h,f=!!e||m;if(!f&&(s.paused||!s.playbackRate||!s.readyState))return;const g=a.mainForwardBufferInfo;if(!f&&null===g)return;const y=this.bwEstimator.getEstimateTTFB(),v=Math.abs(s.playbackRate);if(d<=Math.max(y,c/(2*v)*1e3))return;const b=g?g.len/v:0,w=l.loading.first?l.loading.first-l.loading.start:-1,S=l.loaded&&w>-1,k=this.getBwEstimate(),T=a.levels,E=T[h],A=Math.max(l.loaded,Math.round(c*(i.bitrate||E.averageBitrate)/8));let C=S?d-w:d;C<1&&S&&(C=Math.min(d,8*l.loaded/k));const I=S?1e3*l.loaded/C:0,P=y/1e3,_=I?(A-l.loaded)/I:8*A/k+P;if(_<=b)return;const R=I?8*I:k,x=!0===(null==(t=(null==e?void 0:e.details)||this.hls.latestLevelDetails)?void 0:t.live),L=this.hls.config.abrBandWidthUpFactor;let D,M=Number.POSITIVE_INFINITY;for(D=h-1;D>u;D--){const e=T[D].maxBitrate,t=!T[D].details||x;if(M=this.getTimeToLoadFrag(P,R,c*e,t),M<Math.min(b,c+P))break}if(M>=_)return;if(M>10*c)return;S?this.bwEstimator.sample(d-Math.min(y,w),l.loaded):this.bwEstimator.sampleTTFB(d);const O=T[D].maxBitrate;this.getBwEstimate()*L>O&&this.resetEstimator(O);const N=this.findBestLevel(O,u,D,0,b,1,1);N>-1&&(D=N),this.warn(`Fragment ${i.sn}${r?" part "+r.index:""} of level ${h} is loading too slowly;\n      Fragment duration: ${i.duration.toFixed(3)}\n      Time to underbuffer: ${b.toFixed(3)} s\n      Estimated load time for current fragment: ${_.toFixed(3)} s\n      Estimated load time for down switch fragment: ${M.toFixed(3)} s\n      TTFB estimate: ${0|w} ms\n      Current BW estimate: ${Zv(k)?0|k:"Unknown"} bps\n      New BW estimate: ${0|this.getBwEstimate()} bps\n      Switching to level ${D} @ ${0|O} bps`),a.nextLoadLevel=a.nextAutoLevel=D,this.clearTimer();const F=()=>{if(this.clearTimer(),this.fragCurrent===i&&this.hls.loadLevel===D&&D>0){const e=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${D>0?"and switching down":""}\n      Fragment duration: ${i.duration.toFixed(3)} s\n      Time to underbuffer: ${e.toFixed(3)} s`),i.abortRequests(),this.fragCurrent=this.partCurrent=null,D>u){let t=this.findBestLevel(this.hls.levels[u].bitrate,u,D,0,e,1,1);-1===t&&(t=u),this.hls.nextLoadLevel=this.hls.nextAutoLevel=t,this.resetEstimator(this.hls.levels[t].bitrate)}}};m||_>2*M?F():this.timer=self.setInterval(F,1e3*M),a.trigger(ab.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,part:r,stats:l})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new pb(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.FRAG_LOADING,this.onFragLoading,this),e.on(ab.FRAG_LOADED,this.onFragLoaded,this),e.on(ab.FRAG_BUFFERED,this.onFragBuffered,this),e.on(ab.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(ab.LEVEL_LOADED,this.onLevelLoaded,this),e.on(ab.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(ab.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(ab.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.FRAG_LOADING,this.onFragLoading,this),e.off(ab.FRAG_LOADED,this.onFragLoaded,this),e.off(ab.FRAG_BUFFERED,this.onFragBuffered,this),e.off(ab.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(ab.LEVEL_LOADED,this.onLevelLoaded,this),e.off(ab.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(ab.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(ab.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=this.supportedCache=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.supportedCache={},this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const i=t.frag;if(!this.ignoreFragment(i)){var r;if(!i.bitrateTest)this.fragCurrent=i,this.partCurrent=null!=(r=t.part)?r:null;this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case rb.BUFFER_ADD_CODEC_ERROR:case rb.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case rb.FRAG_LOAD_TIMEOUT:{const e=t.frag,{fragCurrent:i,partCurrent:r}=this;if(e&&i&&e.sn===i.sn&&e.level===i.level){const t=performance.now(),i=r?r.stats:e.stats,a=t-i.loading.start,n=i.loading.first?i.loading.first-i.loading.start:-1;if(i.loaded&&n>-1){const e=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(a-Math.min(e,n),i.loaded)}else this.bwEstimator.sampleTTFB(a)}break}}}getTimeToLoadFrag(e,t,i,r){return e+i/t+(r?e+this.lastLevelLoadSec:0)}onLevelLoaded(e,t){const i=this.hls.config,{loading:r}=t.stats,a=r.end-r.first;Zv(a)&&(this.lastLevelLoadSec=a/1e3),t.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:i}){const r=i?i.stats:t.stats;if(t.type===cb&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const e=i?i.duration:t.duration,a=this.hls.levels[t.level],n=(a.loaded?a.loaded.bytes:0)+r.loaded,s=(a.loaded?a.loaded.duration:0)+e;a.loaded={bytes:n,duration:s},a.realBitrate=Math.round(8*n/s)}if(t.bitrateTest){const e={stats:r,frag:t,part:i,id:t.type};this.onFragBuffered(ab.FRAG_BUFFERED,e),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:i,part:r}=t,a=null!=r&&r.stats.loaded?r.stats:i.stats;if(a.aborted)return;if(this.ignoreFragment(i))return;const n=a.parsing.end-a.loading.start-Math.min(a.loading.first-a.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(n,a.loaded),a.bwEstimate=this.getBwEstimate(),i.bitrateTest?this.bitrateTestDelay=n/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==cb||"initSegment"===e.sn}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,i=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,a=this.findBestLevel(i,t,e,0,r,1,1);if(a>-1)return a;const n=this.hls.firstLevel,s=Math.min(Math.max(n,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${n} clamped to ${s}`),s}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,t=this.bwEstimator.canEstimate(),i=this.lastLoadedFragLevel>-1;if(!(-1===e||t&&i&&this.nextAutoLevelKey!==this.getAutoLevelKey()))return e;const r=t&&i?this.getNextABRAutoLevel():this.firstAutoLevel;if(-1!==e){const t=this.hls.levels;if(t.length>Math.max(e,r)&&t[e].loadError<=t[r].loadError)return e}return this._nextAutoLevel=r,this.nextAutoLevelKey=this.getAutoLevelKey(),r}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:i}=this;if(i.levels.length<=1)return i.loadLevel;const{maxAutoLevel:r,config:a,minAutoLevel:n}=i,s=t?t.duration:e?e.duration:0,o=this.getBwEstimate(),l=this.getStarvationDelay();let c=a.abrBandWidthFactor,d=a.abrBandWidthUpFactor;if(l){const e=this.findBestLevel(o,n,r,l,0,c,d);if(e>=0)return this.rebufferNotice=-1,e}let u=s?Math.min(s,a.maxStarvationDelay):a.maxStarvationDelay;if(!l){const e=this.bitrateTestDelay;if(e){u=(s?Math.min(s,a.maxLoadingDelay):a.maxLoadingDelay)-e,this.info(`bitrate test took ${Math.round(1e3*e)}ms, set first fragment max fetchDuration to ${Math.round(1e3*u)} ms`),c=d=1}}const h=this.findBestLevel(o,n,r,l,u,c,d);if(this.rebufferNotice!==h&&(this.rebufferNotice=h,this.info(`${l?"rebuffering expected":"buffer is empty"}, optimal quality level ${h}`)),h>-1)return h;const p=i.levels[n],m=i.loadLevelObj;return m&&(null==p?void 0:p.bitrate)<m.bitrate?n:i.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return Infinity;const i=t&&0!==t.playbackRate?Math.abs(t.playbackRate):1,r=e.mainForwardBufferInfo;return(r?r.len:0)/i}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,i,r,a,n,s){var o;const l=r+a,c=this.lastLoadedFragLevel,d=-1===c?this.hls.firstLevel:c,{fragCurrent:u,partCurrent:h}=this,{levels:p,allAudioTracks:m,loadLevel:f,config:g}=this.hls;if(1===p.length)return 0;const y=p[d],v=!(null==(o=this.hls.latestLevelDetails)||!o.live),b=-1===f||-1===c;let w,S="SDR",k=(null==y?void 0:y.frameRate)||0;const{audioPreference:T,videoPreference:E}=g,A=this.audioTracksByGroup||(this.audioTracksByGroup=tS(m));let C=-1;if(b){if(-1!==this.firstSelection)return this.firstSelection;const r=this.codecTiers||(this.codecTiers=function(e,t,i,r){return e.slice(i,r+1).reduce((e,i,r)=>{if(!i.codecSet)return e;const a=i.audioGroups;let n=e[i.codecSet];n||(e[i.codecSet]=n={minBitrate:Infinity,minHeight:Infinity,minFramerate:Infinity,minIndex:r,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!a,fragmentError:0}),n.minBitrate=Math.min(n.minBitrate,i.bitrate);const s=Math.min(i.height,i.width);return n.minHeight=Math.min(n.minHeight,s),n.minFramerate=Math.min(n.minFramerate,i.frameRate),n.minIndex=Math.min(n.minIndex,r),n.maxScore=Math.max(n.maxScore,i.score),n.fragmentError+=i.fragmentError,n.videoRanges[i.videoRange]=(n.videoRanges[i.videoRange]||0)+1,a&&a.forEach(e=>{if(!e)return;const i=t.groups[e];i&&(n.hasDefaultAudio=n.hasDefaultAudio||t.hasDefaultAudio?i.hasDefault:i.hasAutoSelect||!t.hasDefaultAudio&&!t.hasAutoSelectAudio,Object.keys(i.channels).forEach(e=>{n.channels[e]=(n.channels[e]||0)+i.channels[e]}))}),e},{})}(p,A,t,i)),a=function(e,t,i,r,a){const n=Object.keys(e),s=null==r?void 0:r.channels,o=null==r?void 0:r.audioCodec,l=null==a?void 0:a.videoCodec,c=s&&2===parseInt(s);let d=!1,u=!1,h=Infinity,p=Infinity,m=Infinity,f=Infinity,g=0,y=[];const{preferHDR:v,allowedVideoRanges:b}=Qw(t,a);for(let T=n.length;T--;){const t=e[n[T]];d||(d=t.channels[2]>0),h=Math.min(h,t.minHeight),p=Math.min(p,t.minFramerate),m=Math.min(m,t.minBitrate),b.filter(e=>t.videoRanges[e]>0).length>0&&(u=!0)}h=Zv(h)?h:0,p=Zv(p)?p:0;const w=Math.max(1080,h),S=Math.max(30,p);m=Zv(m)?m:i,i=Math.max(m,i),u||(t=void 0);const k=n.length>1;return{codecSet:n.reduce((t,r)=>{const a=e[r];if(r===t)return t;if(y=u?b.filter(e=>a.videoRanges[e]>0):[],k){if(a.minBitrate>i)return eS(r,`min bitrate of ${a.minBitrate} > current estimate of ${i}`),t;if(!a.hasDefaultAudio)return eS(r,"no renditions with default or auto-select sound found"),t;if(o&&r.indexOf(o.substring(0,4))%5!=0)return eS(r,`audio codec preference "${o}" not found`),t;if(s&&!c){if(!a.channels[s])return eS(r,`no renditions with ${s} channel sound found (channels options: ${Object.keys(a.channels)})`),t}else if((!o||c)&&d&&0===a.channels[2])return eS(r,"no renditions with stereo sound found"),t;if(a.minHeight>w)return eS(r,`min resolution of ${a.minHeight} > maximum of ${w}`),t;if(a.minFramerate>S)return eS(r,`min framerate of ${a.minFramerate} > maximum of ${S}`),t;if(!y.some(e=>a.videoRanges[e]>0))return eS(r,`no variants with VIDEO-RANGE of ${Zw(y)} found`),t;if(l&&r.indexOf(l.substring(0,4))%5!=0)return eS(r,`video codec preference "${l}" not found`),t;if(a.maxScore<g)return eS(r,`max score of ${a.maxScore} < selected max of ${g}`),t}return t&&(Iw(r)>=Iw(t)||a.fragmentError>e[t].fragmentError)?t:(f=a.minIndex,g=a.maxScore,r)},void 0),videoRanges:y,preferHDR:v,minFramerate:p,minBitrate:m,minIndex:f}}(r,S,e,T,E),{codecSet:n,videoRanges:s,minFramerate:o,minBitrate:l,minIndex:c,preferHDR:d}=a;C=c,w=n,S=d?s[s.length-1]:s[0],k=o,e=Math.max(e,l),this.log(`picked start tier ${Zw(a)}`)}else w=null==y?void 0:y.codecSet,S=null==y?void 0:y.videoRange;const I=h?h.duration:u?u.duration:0,P=this.bwEstimator.getEstimateTTFB()/1e3,_=[];for(let x=i;x>=t;x--){var R;const t=p[x],o=x>d;if(!t)continue;if(g.useMediaCapabilities&&!t.supportedResult&&!t.supportedPromise){const i=navigator.mediaCapabilities;"function"==typeof(null==i?void 0:i.decodingInfo)&&Bw(t,A,S,k,e,T)?(t.supportedPromise=zw(t,A,i,this.supportedCache),t.supportedPromise.then(e=>{if(!this.hls)return;t.supportedResult=e;const i=this.hls.levels,r=i.indexOf(t);e.error?this.warn(`MediaCapabilities decodingInfo error: "${e.error}" for level ${r} ${Zw(e)}`):e.supported?e.decodingInfoResults.some(e=>!1===e.smooth||!1===e.powerEfficient)&&this.log(`MediaCapabilities decodingInfo for level ${r} not smooth or powerEfficient: ${Zw(e)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${r} ${Zw(e)}`),r>-1&&i.length>1&&(this.log(`Removing unsupported level ${r}`),this.hls.removeLevel(r),-1===this.hls.loadLevel&&(this.hls.nextLoadLevel=0)))}).catch(e=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${e}`)})):t.supportedResult=Fw}if((w&&t.codecSet!==w||S&&t.videoRange!==S||o&&k>t.frameRate||!o&&k>0&&k<t.frameRate||null!=(R=t.supportedResult)&&null!=(R=R.decodingInfoResults)&&R.some(e=>!1===e.smooth))&&(!b||x!==C)){_.push(x);continue}const u=t.details,m=(h?null==u?void 0:u.partTarget:null==u?void 0:u.averagetargetduration)||I;let y;y=o?s*e:n*e;const E=I&&r>=2*I&&0===a?t.averageBitrate:t.maxBitrate,L=this.getTimeToLoadFrag(P,y,E*m,void 0===u);if(y>=E&&(x===c||0===t.loadError&&0===t.fragmentError)&&(L<=P||!Zv(L)||v&&!this.bitrateTestDelay||L<l)){const e=this.forcedAutoLevel;return x===f||-1!==e&&e===f||(_.length&&this.trace(`Skipped level(s) ${_.join(",")} of ${i} max with CODECS and VIDEO-RANGE:"${p[_[0]].codecs}" ${p[_[0]].videoRange}; not compatible with "${w}" ${S}`),this.info(`switch candidate:${d}->${x} adjustedbw(${Math.round(y)})-bitrate=${Math.round(y-E)} ttfb:${P.toFixed(1)} avgDuration:${m.toFixed(1)} maxFetchDuration:${l.toFixed(1)} fetchDuration:${L.toFixed(1)} firstSelection:${b} codecSet:${t.codecSet} videoRange:${t.videoRange} hls.loadLevel:${f}`)),b&&(this.firstSelection=x),x}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:i}=this.hls;return Math.min(Math.max(e,i),t)}},bufferController:class extends vb{constructor(e,t){var i;super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=e=>{var t;this.hls&&"open"===(null==(t=this.mediaSource)?void 0:t.readyState)&&this.hls.pauseBuffering()},this._onStartStreaming=e=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=e=>{const{media:t,mediaSource:i}=this;e&&this.log("Media source opened"),t&&i&&(i.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(ab.MEDIA_ATTACHED,{media:t,mediaSource:i}),null!==this.mediaSource&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:e,_objectUrl:t}=this;e!==t&&this.error(`Media element src was set while attaching MediaSource (${t} > ${e})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=(i=Ab(e.config.preferManagedMediaSource),"undefined"!=typeof self&&i===self.ManagedMediaSource),this.initTracks(),this.registerListeners()}hasSourceTypes(){return Object.keys(this.tracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(ab.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.MANIFEST_PARSED,this.onManifestParsed,this),e.on(ab.BUFFER_RESET,this.onBufferReset,this),e.on(ab.BUFFER_APPENDING,this.onBufferAppending,this),e.on(ab.BUFFER_CODECS,this.onBufferCodecs,this),e.on(ab.BUFFER_EOS,this.onBufferEos,this),e.on(ab.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(ab.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(ab.FRAG_PARSED,this.onFragParsed,this),e.on(ab.FRAG_CHANGED,this.onFragChanged,this),e.on(ab.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(ab.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.MANIFEST_PARSED,this.onManifestParsed,this),e.off(ab.BUFFER_RESET,this.onBufferReset,this),e.off(ab.BUFFER_APPENDING,this.onBufferAppending,this),e.off(ab.BUFFER_CODECS,this.onBufferCodecs,this),e.off(ab.BUFFER_EOS,this.onBufferEos,this),e.off(ab.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(ab.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(ab.FRAG_PARSED,this.onFragParsed,this),e.off(ab.FRAG_CHANGED,this.onFragChanged,this),e.off(ab.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const i={};if(this.operationQueue){const e=this.isUpdating();e||this.operationQueue.removeBlockers();const t=this.isQueued();(e||t)&&this.warn(`Transfering MediaSource with${t?" operations in queue":""}${e?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const r=this.transferData;return!this.sourceBufferCount&&r&&r.mediaSource===t?fb(i,r.tracks):this.sourceBuffers.forEach(e=>{const[t]=e;t&&(i[t]=fb({},this.tracks[t]),this.removeBuffer(t)),e[0]=e[1]=null}),{media:e,mediaSource:t,tracks:i}}initTracks(){this.sourceBuffers=[[null,null],[null,null]],this.tracks={},this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var i;let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsTotal=r,this.log(`${r} bufferCodec event(s) expected.`),null!=(i=this.transferData)&&i.mediaSource&&this.sourceBufferCount&&r&&this.bufferCreated()}onMediaAttaching(e,t){const i=this.media=t.media;this.transferData=this.overrides=void 0;const r=Ab(this.appendSource);if(r){const e=!!t.mediaSource;(e||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const n=this.mediaSource=t.mediaSource||new r;if(this.assignMediaSource(n),e)this._objectUrl=i.src,this.attachTransferred();else{const e=this._objectUrl=self.URL.createObjectURL(n);if(this.appendSource)try{i.removeAttribute("src");const t=self.ManagedMediaSource;i.disableRemotePlayback=i.disableRemotePlayback||t&&n instanceof t,fA(i),function(e,t){const i=self.document.createElement("source");i.type="video/mp4",i.src=t,e.appendChild(i)}(i,e),i.load()}catch(a){i.src=e}else i.src=e}i.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,i;this.log(`${(null==(t=this.transferData)?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${null==(i=e.constructor)?void 0:i.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const i=this.tracks,r=t.tracks,a=r?Object.keys(r):null,n=a?a.length:0,s=()=>{Promise.resolve().then(()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()})};if(r&&a&&n){if(!this.tracksReady)return this.hls.config.startFragPrefetch=!0,void this.log("attachTransferred: waiting for SourceBuffer track info");if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})\nrequired tracks: ${Zw(i,(e,t)=>"initSegment"===e?void 0:t)};\ntransfer tracks: ${Zw(r,(e,t)=>"initSegment"===e?void 0:t)}}`),!Cb(r,i)){t.mediaSource=null,t.tracks=void 0;const a=e.currentTime,n=this.details,s=Math.max(a,(null==n?void 0:n.fragments[0].start)||0);return s-a>1?void this.log(`attachTransferred: waiting for playback to reach new tracks start time ${a} -> ${s}`):(this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(i)}") start time: ${s} currentTime: ${a}`),this.onMediaDetaching(ab.MEDIA_DETACHING,{}),this.onMediaAttaching(ab.MEDIA_ATTACHING,t),void(e.currentTime=s))}this.transferData=void 0,a.forEach(e=>{const t=e,i=r[t];if(i){const e=i.buffer;if(e){const r=this.fragmentTracker,a=i.id;if(r.hasFragments(a)||r.hasParts(a)){const i=QS.getBuffered(e);r.detectEvictedFragments(t,i,a,null,!0)}const n=gA(t),s=[t,e];this.sourceBuffers[n]=s,e.updating&&this.operationQueue&&this.operationQueue.prependBlocker(t),this.trackSourceBuffer(t,i)}}}),s(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),s()}get mediaSourceOpenOrEnded(){var e;const t=null==(e=this.mediaSource)?void 0:e.readyState;return"open"===t||"ended"===t}onMediaDetaching(e,t){const i=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:r,mediaSource:a,_objectUrl:n}=this;if(a){if(this.log("media source "+(i?"transferring":"detaching")),i)this.sourceBuffers.forEach(([e])=>{e&&this.removeBuffer(e)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const e="open"===a.readyState;try{const t=a.sourceBuffers;for(let i=t.length;i--;)e&&t[i].abort(),a.removeSourceBuffer(t[i]);e&&a.endOfStream()}catch(DP){this.warn(`onMediaDetaching: ${DP.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}a.removeEventListener("sourceopen",this._onMediaSourceOpen),a.removeEventListener("sourceended",this._onMediaSourceEnded),a.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(a.removeEventListener("startstreaming",this._onStartStreaming),a.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}r&&(r.removeEventListener("emptied",this._onMediaEmptied),i||(n&&self.URL.revokeObjectURL(n),this.mediaSrc===n?(r.removeAttribute("src"),this.appendSource&&fA(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(ab.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const i=null==(t=this.tracks[e])?void 0:t.buffer;if(this.removeBuffer(e),i)try{var r;null!=(r=this.mediaSource)&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(i)}catch(DP){this.warn(`onBufferReset ${e}`,DP)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[gA(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new uA(this.tracks)}onBufferCodecs(e,t){var i;const r=this.tracks,a=Object.keys(t);this.log(`BUFFER_CODECS: "${a}" (current SB count ${this.sourceBufferCount})`);const n="audiovideo"in t&&(r.audio||r.video)||r.audiovideo&&("audio"in t||"video"in t),s=!n&&this.sourceBufferCount&&this.media&&a.some(e=>!r[e]);n||s?this.warn(`Unsupported transition between "${Object.keys(r)}" and "${a}" SourceBuffers`):(a.forEach(e=>{var i,a;const n=t[e],{id:s,codec:o,levelCodec:l,container:c,metadata:d,supplemental:u}=n;let h=r[e];const p=null==(i=this.transferData)||null==(i=i.tracks)?void 0:i[e],m=null!=p&&p.buffer?p:h,f=(null==m?void 0:m.pendingCodec)||(null==m?void 0:m.codec),g=null==m?void 0:m.levelCodec;h||(h=r[e]={buffer:void 0,listeners:[],codec:o,supplemental:u,container:c,levelCodec:l,metadata:d,id:s});const y=xw(f,g),v=null==y?void 0:y.replace(hA,"$1");let b=xw(o,l);const w=null==(a=b)?void 0:a.replace(hA,"$1");b&&y&&v!==w&&("audio"===e.slice(0,5)&&(b=Rw(b,this.appendSource)),this.log(`switching codec ${f} to ${b}`),b!==(h.pendingCodec||h.codec)&&(h.pendingCodec=b),h.container=c,this.appendChangeType(e,c,b))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),this.sourceBufferCount||(this.bufferCodecEventsTotal>1&&!this.tracks.video&&!t.video&&"main"===(null==(i=t.audio)?void 0:i.id)&&(this.log("Main audio-only"),this.bufferCodecEventsTotal=1),this.mediaSourceOpenOrEnded&&this.checkPendingTracks()))}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const i=this.tracks[t];return e[t]={id:i.id,container:i.container,codec:i.codec,levelCodec:i.levelCodec},e},{})}appendChangeType(e,t,i){const r=`${t};codecs=${i}`,a={label:`change-type=${r}`,execute:()=>{const a=this.tracks[e];if(a){const n=a.buffer;null!=n&&n.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),n.changeType(r),a.codec=i,a.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:t=>{this.warn(`Failed to change ${e} SourceBuffer type`,t)}};this.append(a,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const i=e.start,r=i+.05*e.duration;if(!0===(null==(t=this.fragmentTracker.getAppendedFrag(i,cb))?void 0:t.gap))return;const a={label:"block-audio",execute:()=>{var e;const t=this.tracks.video;(this.lastVideoAppendEnd>r||null!=t&&t.buffer&&QS.isBuffered(t.buffer,r)||!0===(null==(e=this.fragmentTracker.getAppendedFrag(r,cb))?void 0:e.gap))&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:e=>{this.warn("Error executing block-audio operation",e)}};this.blockedAudioAppend={op:a,frag:e},this.append(a,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:i}=this,{data:r,type:a,parent:n,frag:s,part:o,chunkMeta:l,offset:c}=t,d=l.buffering[a],{sn:u,cc:h}=s,p=self.performance.now();d.start=p;const m=s.stats.buffering,f=o?o.stats.buffering:null;0===m.start&&(m.start=p),f&&0===f.start&&(f.start=p);const g=i.audio;let y=!1;"audio"===a&&"audio/mpeg"===(null==g?void 0:g.container)&&(y=!this.lastMpegAudioChunk||1===l.id||this.lastMpegAudioChunk.sn!==l.sn,this.lastMpegAudioChunk=l);const v=i.video,b=null==v?void 0:v.buffer;if(b&&"initSegment"!==u){const e=o||s,t=this.blockedAudioAppend;if("audio"!==a||"main"===n||this.blockedAudioAppend||v.ending||v.ended){if("video"===a){const i=e.end;if(t){const e=t.frag.start;(i>e||i<this.lastVideoAppendEnd||QS.isBuffered(b,e))&&this.unblockAudio()}this.lastVideoAppendEnd=i}}else{const t=e.start+.05*e.duration,i=b.buffered,r=this.currentOp("video");i.length||r?!r&&!QS.isBuffered(b,t)&&this.lastVideoAppendEnd<t&&this.blockAudio(e):this.blockAudio(e)}}const w=(o||s).start,S={label:`append-${a}`,execute:()=>{var e;d.executeStart=self.performance.now();const t=null==(e=this.tracks[a])?void 0:e.buffer;t&&(y?this.updateTimestampOffset(t,w,.1,a,u,h):void 0!==c&&Zv(c)&&this.updateTimestampOffset(t,c,1e-6,a,u,h)),this.appendExecutor(r,a)},onStart:()=>{},onComplete:()=>{const e=self.performance.now();d.executeEnd=d.end=e,0===m.first&&(m.first=e),f&&0===f.first&&(f.first=e);const t={};this.sourceBuffers.forEach(([e,i])=>{e&&(t[e]=QS.getBuffered(i))}),this.appendErrors[a]=0,"audio"===a||"video"===a?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(ab.BUFFER_APPENDED,{type:a,frag:s,part:o,chunkMeta:l,parent:s.type,timeRanges:t})},onError:e=>{var t;const i={type:ib.MEDIA_ERROR,parent:s.type,details:rb.BUFFER_APPEND_ERROR,sourceBufferName:a,frag:s,part:o,chunkMeta:l,error:e,err:e,fatal:!1},r=null==(t=this.media)?void 0:t.error;if(e.code===DOMException.QUOTA_EXCEEDED_ERR||"QuotaExceededError"==e.name||"quota"in e)i.details=rb.BUFFER_FULL_ERROR;else if(e.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!r)i.errorAction=_S(!0);else if(e.name===pA&&0===this.sourceBufferCount)i.errorAction=_S(!0);else{const e=++this.appendErrors[a];this.warn(`Failed ${e}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${a}" sourceBuffer (${r||"no media error"})`),(e>=this.hls.config.appendErrorMaxRetry||r)&&(i.fatal=!0)}this.hls.trigger(ab.ERROR,i)}};this.log(`queuing "${a}" append sn: ${u}${o?" p: "+o.index:""} of ${s.type===cb?"level":"track"} ${s.level} cc: ${h}`),this.append(S,a,this.isPending(this.tracks[a]))}getFlushOp(e,t,i){return this.log(`queuing "${e}" remove ${t}-${i}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,i)},onStart:()=>{},onComplete:()=>{this.hls.trigger(ab.BUFFER_FLUSHED,{type:e})},onError:r=>{this.warn(`Failed to remove ${t}-${i} from "${e}" SourceBuffer`,r)}}}onBufferFlushing(e,t){const{type:i,startOffset:r,endOffset:a}=t;i?this.append(this.getFlushOp(i,r,a),i):this.sourceBuffers.forEach(([e])=>{e&&this.append(this.getFlushOp(e,r,a),e)})}onFragParsed(e,t){const{frag:i,part:r}=t,a=[],n=r?r.elementaryStreams:i.elementaryStreams;n[$b]?a.push("audiovideo"):(n[zb]&&a.push("audio"),n[jb]&&a.push("video"));0===a.length&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${i.type} level: ${i.level} sn: ${i.sn}`),this.blockBuffers(()=>{const e=self.performance.now();i.stats.buffering.end=e,r&&(r.stats.buffering.end=e);const t=r?r.stats:i.stats;this.hls.trigger(ab.FRAG_BUFFERED,{frag:i,part:r,stats:t,id:i.type})},a).catch(e=>{this.warn(`Fragment buffered callback ${e}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{if(e){const t=this.tracks[e];if(t)return!t.ended||t.ending}return!1})}onBufferEos(e,t){var i;this.sourceBuffers.forEach(([e])=>{if(e){const i=this.tracks[e];t.type&&t.type!==e||(i.ending=!0,i.ended||(i.ended=!0,this.log(`${e} buffer reached EOS`)))}});const r=!1!==(null==(i=this.overrides)?void 0:i.endOfStream);this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{var t;return e&&!(null!=(t=this.tracks[e])&&t.ended)})?r?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:e}=this;e&&"open"===e.readyState?(this.log("Calling mediaSource.endOfStream()"),e.endOfStream(),this.hls.trigger(ab.BUFFERED_TO_END,void 0)):e&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${e.readyState}`)})):(this.tracksEnded(),this.hls.trigger(ab.BUFFERED_TO_END,void 0)):"video"===t.type&&this.unblockAudio()}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(null!==e){const t=this.tracks[e];t&&(t.ending=!1)}})}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){this.blockUntilOpen(()=>{const e=this.getDurationAndRange();e&&this.updateMediaSource(e)})}onError(e,t){if(t.details===rb.BUFFER_APPEND_ERROR&&t.frag){var i;const e=null==(i=t.errorAction)?void 0:i.nextAutoLevel;Zv(e)&&e!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:i}=this;if(!i||null===t)return;if(!this.sourceBufferCount)return;const r=e.config,a=i.currentTime,n=t.levelTargetDuration,s=t.live&&null!==r.liveBackBufferLength?r.liveBackBufferLength:r.backBufferLength;if(Zv(s)&&s>=0){const e=Math.max(s,n),t=Math.floor(a/n)*n-e;this.flushBackBuffer(a,n,t)}const o=r.frontBufferFlushThreshold;if(Zv(o)&&o>0){const e=Math.max(r.maxBufferLength,o),t=Math.max(e,n),i=Math.floor(a/n)*n+t;this.flushFrontBuffer(a,n,i)}}flushBackBuffer(e,t,i){this.sourceBuffers.forEach(([e,t])=>{if(t){const a=QS.getBuffered(t);if(a.length>0&&i>a.start(0)){var r;this.hls.trigger(ab.BACK_BUFFER_REACHED,{bufferEnd:i});const t=this.tracks[e];if(null!=(r=this.details)&&r.live)this.hls.trigger(ab.LIVE_BACK_BUFFER_REACHED,{bufferEnd:i});else if(null!=t&&t.ended)return void this.log(`Cannot flush ${e} back buffer while SourceBuffer is in ended state`);this.hls.trigger(ab.BUFFER_FLUSHING,{startOffset:0,endOffset:i,type:e})}}})}flushFrontBuffer(e,t,i){this.sourceBuffers.forEach(([t,r])=>{if(r){const a=QS.getBuffered(r),n=a.length;if(n<2)return;const s=a.start(n-1),o=a.end(n-1);if(i>s||e>=s&&e<=o)return;this.hls.trigger(ab.BUFFER_FLUSHING,{startOffset:s,endOffset:Infinity,type:t})}})}getDurationAndRange(){var e;const{details:t,mediaSource:i}=this;if(!t||!this.media||"open"!==(null==i?void 0:i.readyState))return null;const r=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&i.setLiveSeekableRange){const e=Math.max(0,t.fragmentStart);return{duration:Infinity,start:e,end:Math.max(e,r)}}return{duration:Infinity}}const a=null==(e=this.overrides)?void 0:e.duration;if(a)return Zv(a)?{duration:a}:null;const n=this.media.duration;return r>(Zv(i.duration)?i.duration:0)&&r>n||!Zv(n)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:i}){const r=this.mediaSource;this.media&&r&&"open"===r.readyState&&(r.duration!==e&&(Zv(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),r.duration=e),void 0!==t&&void 0!==i&&(this.log(`MediaSource duration is set to ${r.duration}. Setting seekable range to ${t}-${i}.`),r.setLiveSeekableRange(t,i)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:i}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${Zw(i)}`),this.tracksReady){var r;const e=null==(r=this.transferData)?void 0:r.tracks;e&&Object.keys(e).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,i])=>{if(t){const r=this.tracks[t];e[t]={buffer:i,container:r.container,codec:r.codec,supplemental:r.supplemental,levelCodec:r.levelCodec,id:r.id,metadata:r.metadata}}}),this.hls.trigger(ab.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach(([e])=>{this.executeNext(e)})}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:i}=this;if(!i)throw new Error("createSourceBuffers called when mediaSource was null");for(const n in e){const s=n,o=e[s];if(this.isPending(o)){const e=this.getTrackCodec(o,s),n=`${o.container};codecs=${e}`;o.codec=e,this.log(`creating sourceBuffer(${n})${this.currentOp(s)?" Queued":""} ${Zw(o)}`);try{const e=i.addSourceBuffer(n),r=gA(s),a=[s,e];t[r]=a,o.buffer=e}catch(a){var r;return this.error(`error while trying to add sourceBuffer: ${a.message}`),this.shiftAndExecuteNext(s),null==(r=this.operationQueue)||r.removeBlockers(),delete this.tracks[s],void this.hls.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:a,sourceBufferName:s,mimeType:n,parent:o.id})}this.trackSourceBuffer(s,o)}}this.bufferCreated()}getTrackCodec(e,t){const i=e.supplemental;let r=e.codec;i&&("video"===t||"audiovideo"===t)&&Tw(i,"video")&&(r=function(e,t){const i=[];if(e){const t=e.split(",");for(let e=0;e<t.length;e++)kw(t[e],"video")||i.push(t[e])}return t&&i.push(t),i.join(",")}(r,i));const a=xw(r,e.levelCodec);return a?"audio"===t.slice(0,5)?Rw(a,this.appendSource):a:""}trackSourceBuffer(e,t){const i=t.buffer;if(!i)return;const r=this.getTrackCodec(t,e);this.tracks[e]={buffer:i,codec:r,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(e,t)=>{const i=t.removedRanges;null!=i&&i.length&&this.hls.trigger(ab.BUFFER_FLUSHED,{type:e})})}get mediaSrc(){var e,t;const i=(null==(e=this.media)||null==(t=e.querySelector)?void 0:t.call(e,"source"))||this.media;return null==i?void 0:i.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if("closed"===(null==(t=this.mediaSource)?void 0:t.readyState))return void this.resetBuffer(e);const i=this.currentOp(e);i&&(i.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var i;const r=new Error(`${e} SourceBuffer error. MediaSource readyState: ${null==(i=this.mediaSource)?void 0:i.readyState}`);this.error(`${r}`,t),this.hls.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const a=this.currentOp(e);a&&a.onError(r)}updateTimestampOffset(e,t,i,r,a,n){const s=t-e.timestampOffset;Math.abs(s)>=i&&(this.log(`Updating ${r} SourceBuffer timestampOffset to ${t} (sn: ${a} cc: ${n})`),e.timestampOffset=t)}removeExecutor(e,t,i){const{media:r,mediaSource:a}=this,n=this.tracks[e],s=null==n?void 0:n.buffer;if(!r||!a||!s)return this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),void this.shiftAndExecuteNext(e);const o=Zv(r.duration)?r.duration:Infinity,l=Zv(a.duration)?a.duration:Infinity,c=Math.max(0,t),d=Math.min(i,o,l);d>c&&(!n.ending||n.ended)?(n.ended=!1,this.log(`Removing [${c},${d}] from the ${e} SourceBuffer`),s.remove(c,d)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const i=this.tracks[t],r=null==i?void 0:i.buffer;if(!r)throw new mA(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);i.ending=!1,i.ended=!1,r.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(e=>{this.warn(`SourceBuffer blocked callback ${e}`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(t){this.warn(`Callback run without blocking ${this.operationQueue} ${t}`)}}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:i}=this,r=t.map(e=>this.appendBlocker(e));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(r).then(t=>{i===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(e=>{var t;const i=null==(t=this.tracks[e])?void 0:t.buffer;i&&!i.updating&&this.shiftAndExecuteNext(e)})}append(e,t,i){this.operationQueue&&this.operationQueue.append(e,t,i)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,i){const r=this.tracks[e];if(!r)return;const a=r.buffer;if(!a)return;const n=i.bind(this,e);r.listeners.push({event:t,listener:n}),a.addEventListener(t,n)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const i=t.buffer;i&&(t.listeners.forEach(e=>{i.removeEventListener(e.event,e.listener)}),t.listeners.length=0)}},capLevelController:yA,errorController:class extends vb{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(ab.ERROR,this.onError,this),e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(ab.ERROR,this.onError,this),e.off(ab.ERROR,this.onErrorOut,this),e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(null==e?void 0:e.type)===cb?e.level:this.getVariantIndex()}getVariantIndex(){var e;const t=this.hls,i=t.currentLevel;return null!=(e=t.loadLevelObj)&&e.details||-1===i?t.loadLevel:i}variantHasKey(e,t){if(e){var i;if(null!=(i=e.details)&&i.hasKey(t))return!0;const r=e.audioGroups;if(r){return this.hls.allAudioTracks.filter(e=>r.indexOf(e.groupId)>=0).some(e=>{var i;return null==(i=e.details)?void 0:i.hasKey(t)})}}return!1}onManifestLoading(){this.playlistError=0}onLevelUpdated(){this.playlistError=0}onError(e,t){var i;if(t.fatal)return;const r=this.hls,a=t.context;switch(t.details){case rb.FRAG_LOAD_ERROR:case rb.FRAG_LOAD_TIMEOUT:case rb.KEY_LOAD_ERROR:case rb.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case rb.FRAG_PARSING_ERROR:if(null!=(i=t.frag)&&i.gap)return void(t.errorAction=_S());case rb.FRAG_GAP:case rb.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=kS);case rb.LEVEL_EMPTY_ERROR:case rb.LEVEL_PARSING_ERROR:{var n;const e=t.parent===cb?t.level:r.loadLevel;t.details===rb.LEVEL_EMPTY_ERROR&&null!=(n=t.context)&&null!=(n=n.levelDetails)&&n.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,e):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,e))}return;case rb.LEVEL_LOAD_ERROR:case rb.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==a?void 0:a.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a.level)));case rb.AUDIO_TRACK_LOAD_ERROR:case rb.AUDIO_TRACK_LOAD_TIMEOUT:case rb.SUBTITLE_LOAD_ERROR:case rb.SUBTITLE_TRACK_LOAD_TIMEOUT:if(a){const e=r.loadLevelObj;if(e&&(a.type===ob&&e.hasAudioGroup(a.groupId)||a.type===lb&&e.hasSubtitleGroup(a.groupId)))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=kS,void(t.errorAction.flags=CS)}return;case rb.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:return void(t.errorAction={action:kS,flags:IS});case rb.KEY_SYSTEM_SESSION_UPDATE_FAILED:case rb.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case rb.KEY_SYSTEM_NO_SESSION:return void(t.errorAction={action:kS,flags:PS});case rb.BUFFER_ADD_CODEC_ERROR:case rb.REMUX_ALLOC_ERROR:case rb.BUFFER_APPEND_ERROR:var s;if(!t.errorAction)t.errorAction=this.getLevelSwitchAction(t,null!=(s=t.level)?s:r.loadLevel);return;case rb.INTERNAL_EXCEPTION:case rb.BUFFER_APPENDING_ERROR:case rb.BUFFER_FULL_ERROR:case rb.LEVEL_SWITCH_ERROR:case rb.BUFFER_STALLED_ERROR:case rb.BUFFER_SEEK_OVER_HOLE:case rb.BUFFER_NUDGE_ON_STALL:return void(t.errorAction=_S())}t.type===ib.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=_S())}getPlaylistRetryOrSwitchAction(e,t){const i=gS(this.hls.config.playlistLoadPolicy,e),r=this.playlistError++;if(bS(i,r,pS(e),e.response))return{action:ES,flags:AS,retryConfig:i,retryCount:r};const a=this.getLevelSwitchAction(e,t);return i&&(a.retryConfig=i,a.retryCount=r),a}getFragRetryOrSwitchAction(e){const t=this.hls,i=this.getVariantLevelIndex(e.frag),r=t.levels[i],{fragLoadPolicy:a,keyLoadPolicy:n}=t.config,s=gS(mS(e)?n:a,e),o=t.levels.reduce((e,t)=>e+t.fragmentError,0);if(r&&(e.details!==rb.FRAG_GAP&&r.fragmentError++,!fS(e))){if(bS(s,o,pS(e),e.response))return{action:ES,flags:AS,retryConfig:s,retryCount:o}}const l=this.getLevelSwitchAction(e,i);return s&&(l.retryConfig=s,l.retryCount=o),l}getLevelSwitchAction(e,t){const i=this.hls;null==t&&(t=i.loadLevel);const r=this.hls.levels[t];if(r){var a,n;const t=e.details;r.loadError++,t===rb.BUFFER_APPEND_ERROR&&r.fragmentError++;let l=-1;const{levels:c,loadLevel:d,minAutoLevel:u,maxAutoLevel:h}=i;i.autoLevelEnabled||i.config.preserveManualLevelOnError||(i.loadLevel=-1);const p=null==(a=e.frag)?void 0:a.type,m=(p===db&&t===rb.FRAG_PARSING_ERROR||"audio"===e.sourceBufferName&&(t===rb.BUFFER_ADD_CODEC_ERROR||t===rb.BUFFER_APPEND_ERROR))&&c.some(({audioCodec:e})=>r.audioCodec!==e),f="video"===e.sourceBufferName&&(t===rb.BUFFER_ADD_CODEC_ERROR||t===rb.BUFFER_APPEND_ERROR)&&c.some(({codecSet:e,audioCodec:t})=>r.codecSet!==e&&r.audioCodec===t),{type:g,groupId:y}=null!=(n=e.context)?n:{};for(let i=c.length;i--;){const a=(i+d)%c.length;if(a!==d&&a>=u&&a<=h&&0===c[a].loadError){var s,o;const i=c[a];if(t===rb.FRAG_GAP&&p===cb&&e.frag){const t=c[a].details;if(t){const i=cS(e.frag,t.fragments,e.frag.start);if(null!=i&&i.gap)continue}}else{if(g===ob&&i.hasAudioGroup(y)||g===lb&&i.hasSubtitleGroup(y))continue;if(p===db&&null!=(s=r.audioGroups)&&s.some(e=>i.hasAudioGroup(e))||p===ub&&null!=(o=r.subtitleGroups)&&o.some(e=>i.hasSubtitleGroup(e))||m&&r.audioCodec===i.audioCodec||f&&r.codecSet===i.codecSet||!m&&r.codecSet!==i.codecSet)continue}l=a;break}}if(l>-1&&i.loadLevel!==l)return e.levelRetry=!0,this.playlistError=0,{action:kS,flags:AS,nextAutoLevel:l}}return{action:kS,flags:CS}}onErrorOut(e,t){var i;switch(null==(i=t.errorAction)?void 0:i.action){case SS:break;case kS:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===rb.FRAG_GAP?/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError()):t.fatal=!0}t.fatal&&this.hls.stopLoad()}sendAlternateToPenaltyBox(e){const t=this.hls,i=e.errorAction;if(!i)return;const{flags:r}=i,a=i.nextAutoLevel;switch(r){case AS:this.switchLevel(e,a);break;case IS:{const r=this.getVariantLevelIndex(e.frag),a=t.levels[r],n=null==a?void 0:a.attrs["HDCP-LEVEL"];if(i.hdcpLevel=n,"NONE"===n)this.warn("HDCP policy resticted output with HDCP-LEVEL=NONE");else if(n){t.maxHdcpLevel=Gw[Gw.indexOf(n)-1],i.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case PS:{const t=e.decryptdata;if(t){const r=this.hls.levels,a=r.length;for(let i=a;i--;){var n,s;if(this.variantHasKey(r[i],t))this.log(`Banned key found in level ${i} (${r[i].bitrate}bps) or audio group "${null==(n=r[i].audioGroups)?void 0:n.join(",")}" (${null==(s=e.frag)?void 0:s.type} fragment) ${Pb(t.keyId||[])}`),r[i].fragmentError++,r[i].loadError++,this.log(`Removing level ${i} with key error (${e.error})`),this.hls.removeLevel(i)}const o=e.frag;if(this.hls.levels.length<a)i.resolved=!0;else if(o&&o.type!==cb){const e=o.decryptdata;e&&!t.matches(e)&&(i.resolved=!0)}}break}}i.resolved||this.switchLevel(e,a)}switchLevel(e,t){if(void 0!==t&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===rb.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&"audiovideo"!==e.sourceBufferName)){const t=Ow(e.mimeType),i=this.hls.levels;for(let r=i.length;r--;)i[r][`${e.sourceBufferName}Codec`]===t&&(this.log(`Removing level ${r} for ${e.details} ("${t}" not supported)`),this.hls.removeLevel(r))}}},fpsController:class{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(ab.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(ab.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(ab.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(ab.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const i=this.hls.config;if(i.capLevelOnFPSDrop){const e=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=e,e&&"function"==typeof e.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,i){const r=performance.now();if(t){if(this.lastTime){const e=r-this.lastTime,a=i-this.lastDroppedFrames,n=t-this.lastDecodedFrames,s=1e3*a/e,o=this.hls;if(o.trigger(ab.FPS_DROP,{currentDropped:a,currentDecoded:n,totalDroppedFrames:i}),s>0&&a>o.config.fpsDroppedMonitoringThreshold*n){let e=o.currentLevel;o.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+e),e>0&&(-1===o.autoLevelCapping||o.autoLevelCapping>=e)&&(e-=1,o.trigger(ab.FPS_DROP_LEVEL_CAPPING,{level:e,droppedLevel:o.currentLevel}),o.autoLevelCapping=e,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=i,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}},stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Pk,requireKeySystemAccessOnStart:!1,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,preserveManualLevelOnError:!1,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:Infinity,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:MI,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:class extends RT{constructor(e,t,i){super(e,t,i,"subtitle-stream-controller",ub),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(ab.LEVEL_LOADED,this.onLevelLoaded,this),e.on(ab.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(ab.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(ab.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(ab.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(ab.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(ab.LEVEL_LOADED,this.onLevelLoaded,this),e.off(ab.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(ab.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(ab.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(ab.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(ab.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=bT,this.setInterval(500),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:i,success:r}=t;if(this.fragContextChanged(i)||(qb(i)&&(this.fragPrevious=i),this.state=bT),!r)return;const a=this.tracksBuffered[this.currentTrackId];if(!a)return;let n;const s=i.start;for(let l=0;l<a.length;l++)if(s>=a[l].start&&s<=a[l].end){n=a[l];break}const o=i.start+i.duration;n?n.end=o:(n={start:s,end:o},a.push(n)),this.fragmentTracker.fragBuffered(i),this.fragBufferedComplete(i,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:i,endOffset:r}=t;if(0===i&&r!==Number.POSITIVE_INFINITY){const e=r-1;if(e<=0)return;t.endOffsetSubtitles=Math.max(0,e),this.tracksBuffered.forEach(t=>{for(let i=0;i<t.length;)if(t[i].end<=e)t.shift();else{if(!(t[i].start<e))break;t[i].start=e,i++}}),this.fragmentTracker.removeFragmentsInRange(i,e,ub)}}onError(e,t){const i=t.frag;(null==i?void 0:i.type)===ub&&(t.details===rb.FRAG_GAP&&this.fragmentTracker.fragBuffered(i,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==vT&&(this.state=bT))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){this.levels&&lA(this.levels,t)?this.levels=t.map(e=>new Jw(e)):(this.tracksBuffered=[],this.levels=t.map(e=>{const t=new Jw(e);return this.tracksBuffered[t.id]=[],t}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,ub),this.fragPrevious=null,this.mediaBuffer=null)}onSubtitleTrackSwitch(e,t){var i;if(this.currentTrackId=t.id,null==(i=this.levels)||!i.length||-1===this.currentTrackId)return void this.clearInterval();const r=this.levels[this.currentTrackId];null!=r&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.state!==vT&&this.setInterval(500)}onSubtitleTrackLoaded(e,t){var i;const{currentTrackId:r,levels:a}=this,{details:n,id:s}=t;if(!a)return void this.warn(`Subtitle tracks were reset while loading level ${s}`);const o=a[s];if(s>=a.length||!o)return;this.log(`Subtitle track ${s} loaded [${n.startSN},${n.endSN}]${n.lastPartSn?`[part-${n.lastPartSn}-${n.lastPartIndex}]`:""},duration:${n.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let l=0;if(n.live||null!=(i=o.details)&&i.live){if(n.deltaUpdateFailed)return;const e=this.mainDetails;if(!e)return void(this.startFragRequested=!1);const t=e.fragments[0];var c;if(o.details)l=this.alignPlaylists(n,o.details,null==(c=this.levelLastLoaded)?void 0:c.details),0===l&&t&&(l=t.start,iT(n,l));else n.hasProgramDateTime&&e.hasProgramDateTime?(mT(n,e),l=n.fragmentStart):t&&(l=t.start,iT(n,l));e&&!this.startFragRequested&&this.setStartPosition(e,l)}if(o.details=n,this.levelLastLoaded=o,s===r&&(this.hls.trigger(ab.SUBTITLE_TRACK_UPDATED,{details:n,id:s,groupId:t.groupId}),this.tick(),n.live&&!this.fragCurrent&&this.media&&this.state===bT)){cS(null,n.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),o.details=void 0)}}_handleFragmentLoadComplete(e){const{frag:t,payload:i}=e,r=t.decryptdata,a=this.hls;if(!this.fragContextChanged(t)&&i&&i.byteLength>0&&null!=r&&r.key&&r.iv&&pk(r.method)){const e=performance.now();this.decrypter.decrypt(new Uint8Array(i),r.key.buffer,r.iv.buffer,mk(r.method)).catch(e=>{throw a.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:t}),e}).then(i=>{const r=performance.now();a.trigger(ab.FRAG_DECRYPTED,{frag:t,payload:i,stats:{tstart:e,tdecrypt:r}})}).catch(e=>{this.warn(`${e.name}: ${e.message}`),this.state=bT})}}doTick(){if(this.media){if(this.state===bT){const{currentTrackId:e,levels:t}=this,i=null==t?void 0:t[e];if(!i||!t.length||!i.details)return;if(this.waitForLive(i))return;const{config:r}=this,a=this.getLoadPosition(),n=QS.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],a,r.maxBufferHole),{end:s,len:o}=n,l=i.details;if(o>this.hls.maxBufferLength+l.levelTargetDuration)return;const c=l.fragments,d=c.length,u=l.edge;let h=null;const p=this.fragPrevious;if(s<u){const e=r.maxFragLookUpTolerance,t=s>u-e?0:e;h=cS(p,c,Math.max(c[0].start,s),t),!h&&p&&p.start<c[0].start&&(h=c[0])}else h=c[d-1];if(h=this.filterReplacedPrimary(h,i.details),!h)return;const m=c[h.sn-l.startSN-1];if(m&&m.cc===h.cc&&this.fragmentTracker.getState(m)===RS&&(h=m),this.fragmentTracker.getState(h)===RS){const e=this.mapToInitFragWhenRequired(h);e&&this.loadFragment(e,i,s)}}}else this.state=bT}loadFragment(e,t,i){qb(e)?super.loadFragment(e,t,i):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new UC(this.tracksBuffered[this.currentTrackId]||[])}},subtitleTrackController:class extends oA{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let e=null;const t=kC(this.media.textTracks);for(let r=0;r<t.length;r++)if("hidden"===t[r].mode)e=t[r];else if("showing"===t[r].mode){e=t[r];break}const i=this.findTrackForTextTrack(e);this.subtitleTrack!==i&&this.setSubtitleTrack(i)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.MANIFEST_PARSED,this.onManifestParsed,this),e.on(ab.LEVEL_LOADING,this.onLevelLoading,this),e.on(ab.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(ab.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(ab.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.MANIFEST_PARSED,this.onManifestParsed,this),e.off(ab.LEVEL_LOADING,this.onLevelLoading,this),e.off(ab.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(ab.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(ab.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const i=this.media;if(!i)return;const r=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||i.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,r)return;kC(i.textTracks).forEach(e=>{wC(e)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:i,groupId:r,details:a}=t,n=this.tracksInGroup[i];if(!n||n.groupId!==r)return void this.warn(`Subtitle track with id:${i} and group:${r} not found in active group ${null==n?void 0:n.groupId}`);const s=n.details;n.details=t.details,this.log(`Subtitle track ${i} "${n.name}" lang:${n.lang} group:${r} loaded [${a.startSN}-${a.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,s)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const i=t.subtitleGroups||null,r=this.groupIds;let a=this.currentTrack;if(!i||(null==r?void 0:r.length)!==(null==i?void 0:i.length)||null!=i&&i.some(e=>-1===(null==r?void 0:r.indexOf(e)))){this.groupIds=i,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter(e=>!i||-1!==i.indexOf(e.groupId));if(e.length)this.selectDefaultTrack&&!e.some(e=>e.default)&&(this.selectDefaultTrack=!1),e.forEach((e,t)=>{e.id=t});else if(!a&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.subtitlePreference;if(!a&&t){this.selectDefaultTrack=!1;const i=rS(t,e);if(i>-1)a=e[i];else{const e=rS(t,this.tracks);a=this.tracks[e]}}let r=this.findTrackId(a);-1===r&&a&&(r=this.findTrackId(null));const n={subtitleTracks:e};this.log(`Updating subtitle tracks, ${e.length} track(s) found in "${null==i?void 0:i.join(",")}" group-id`),this.hls.trigger(ab.SUBTITLE_TRACKS_UPDATED,n),-1!==r&&-1===this.trackId&&this.setSubtitleTrack(r)}}findTrackId(e){const t=this.tracksInGroup,i=this.selectDefaultTrack;for(let r=0;r<t.length;r++){const a=t[r];if((!i||a.default)&&(i||e)&&(!e||aS(a,e)))return r}if(e){for(let i=0;i<t.length;i++){const r=t[i];if(cA(e.attrs,r.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return i}for(let i=0;i<t.length;i++){const r=t[i];if(cA(e.attrs,r.attrs,["LANGUAGE"]))return i}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let i=0;i<t.length;i++){if(dA(t[i],e))return i}}return-1}onError(e,t){!t.fatal&&t.context&&(t.context.type!==lb||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||this.checkRetry(t))}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(-1===e.id)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const i=this.currentTrack;if(i&&aS(e,i))return i;const r=rS(e,this.tracksInGroup);if(r>-1){const e=this.tracksInGroup[r];return this.setSubtitleTrack(r),e}if(i)return null;{const i=rS(e,t);if(i>-1)return t[i]}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const i=e.id,r=e.groupId,a=this.getUrlWithDirectives(e.url,t),n=e.details,s=null==n?void 0:n.age;this.log(`Loading subtitle ${i} "${e.name}" lang:${e.lang} group:${r}${void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:""}${s&&n.live?" age "+s.toFixed(1)+(n.type&&" "+n.type||""):""} ${a}`),this.hls.trigger(ab.SUBTITLE_TRACK_LOADING,{url:a,id:i,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=kC(e.textTracks),i=this.currentTrack;let r;if(i&&(r=t.filter(e=>dA(i,e))[0],r||this.warn(`Unable to find subtitle TextTrack with name "${i.name}" and language "${i.lang}"`)),[].slice.call(t).forEach(e=>{"disabled"!==e.mode&&e!==r&&(e.mode="disabled")}),r){const e=this.subtitleDisplay?"showing":"hidden";r.mode!==e&&(r.mode=e)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media)return void(this.queuedDefaultTrack=e);if(e<-1||e>=t.length||!Zv(e))return void this.warn(`Invalid subtitle track id: ${e}`);this.selectDefaultTrack=!1;const i=this.currentTrack,r=t[e]||null;if(this.trackId=e,this.currentTrack=r,this.toggleTrackModes(),!r)return void this.hls.trigger(ab.SUBTITLE_TRACK_SWITCH,{id:e});const a=!!r.details&&!r.details.live;if(e===this.trackId&&r===i&&a)return;this.log(`Switching to subtitle-track ${e}`+(r?` "${r.name}" lang:${r.lang} group:${r.groupId}`:""));const{id:n,groupId:s="",name:o,type:l,url:c}=r;this.hls.trigger(ab.SUBTITLE_TRACK_SWITCH,{id:n,groupId:s,name:o,type:l,url:c});const d=this.switchParams(r.url,null==i?void 0:i.details,r.details);this.loadPlaylist(d)}},timelineController:class{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(ab.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(ab.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(ab.FRAG_LOADING,this.onFragLoading,this),e.on(ab.FRAG_LOADED,this.onFragLoaded,this),e.on(ab.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(ab.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(ab.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(ab.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(ab.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(ab.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(ab.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(ab.FRAG_LOADING,this.onFragLoading,this),e.off(ab.FRAG_LOADED,this.onFragLoaded,this),e.off(ab.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(ab.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(ab.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(ab.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(ab.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new _I(this,"textTrack1"),t=new _I(this,"textTrack2"),i=new _I(this,"textTrack3"),r=new _I(this,"textTrack4");this.cea608Parser1=new tI(1,e,t),this.cea608Parser2=new tI(3,i,r)}addCues(e,t,i,r,a){let n=!1;for(let s=a.length;s--;){const e=a[s],r=LI(e[0],e[1],t,i);if(r>=0&&(e[0]=Math.min(e[0],t),e[1]=Math.max(e[1],i),n=!0,r/(i-t)>.5))return}if(n||a.push([t,i]),this.config.renderTextTracksNatively){const a=this.captionsTracks[e];this.Cues.newCue(a,t,i,r)}else{const a=this.Cues.newCue(null,t,i,r);this.hls.trigger(ab.CUES_PARSED,{type:"captions",cues:a,track:e})}}onInitPtsFound(e,{frag:t,id:i,initPTS:r,timescale:a,trackId:n}){const{unparsedVttFrags:s}=this;i===cb&&(this.initPTS[t.cc]={baseTime:r,timescale:a,trackId:n}),s.length&&(this.unparsedVttFrags=[],s.forEach(e=>{this.initPTS[e.frag.cc]?this.onFragLoaded(ab.FRAG_LOADED,e):this.hls.trigger(ab.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e.frag,error:new Error("Subtitle discontinuity domain does not match main")})}))}getExistingTrack(e,t){const{media:i}=this;if(i)for(let r=0;r<i.textTracks.length;r++){const a=i.textTracks[r];if(xI(a,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return a}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:i,media:r}=this,{label:a,languageCode:n}=t[e],s=this.getExistingTrack(a,n);if(s)i[e]=s,wC(i[e]),vC(i[e],r);else{const t=this.createTextTrack("captions",a,n);t&&(t[e]=!0,i[e]=t)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const i={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=i,this.hls.trigger(ab.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})}createTextTrack(e,t,i){const r=this.media;if(r)return r.addTextTrack(e,t,i)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const i=!!t.transferMedia;if(this.media=null,i)return;const{captionsTracks:r}=this;Object.keys(r).forEach(e=>{wC(r[e]),delete r[e]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let i=0;i<t.length;i++)wC(t[i])}onSubtitleTracksUpdated(e,t){const i=t.subtitleTracks||[],r=i.some(e=>e.textCodec===vI);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(lA(this.tracks,i))return void(this.tracks=i);if(this.textTracks=[],this.tracks=i,this.config.renderTextTracksNatively){const e=this.media,t=e?kC(e.textTracks):null;if(this.tracks.forEach((e,i)=>{let r;if(t){let i=null;for(let r=0;r<t.length;r++)if(t[r]&&xI(t[r],e)){i=t[r],t[r]=null;break}i&&(r=i)}if(r)wC(r);else{const t=RI(e);r=this.createTextTrack(t,e.name,e.lang),r&&(r.mode="disabled")}r&&this.textTracks.push(r)}),null!=t&&t.length){const e=t.filter(e=>null!==e).map(e=>e.label);e.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${e.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const e=this.tracks.map(e=>({label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}));this.hls.trigger(ab.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:e})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(e=>{const t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(!t)return;const i=`textTrack${t[1]}`,r=this.captionsProperties[i];r&&(r.label=e.name,e.lang&&(r.languageCode=e.lang),r.media=e)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===cb){var i,r;const{cea608Parser1:e,cea608Parser2:a,lastSn:n}=this,{cc:s,sn:o}=t.frag,l=null!=(i=null==(r=t.part)?void 0:r.index)?i:-1;e&&a&&(o!==n+1||o===n&&l!==this.lastPartIndex+1||s!==this.lastCc)&&(e.reset(),a.reset()),this.lastCc=s,this.lastSn=o,this.lastPartIndex=l}}onFragLoaded(e,t){const{frag:i,payload:r}=t;if(i.type===ub)if(r.byteLength){const e=i.decryptdata,a="stats"in t;if(null==e||!e.encrypted||a){const e=this.tracks[i.level],a=this.vttCCs;a[i.cc]||(a[i.cc]={start:i.start,prevCC:this.prevCC,new:!0},this.prevCC=i.cc),e&&e.textCodec===vI?this._parseIMSC1(i,r):this._parseVTTs(t)}}else this.hls.trigger(ab.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const i=this.hls;kI(t,this.initPTS[e.cc],t=>{this._appendCues(t,e.level),i.trigger(ab.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},t=>{i.logger.log(`Failed to parse IMSC1: ${t}`),i.trigger(ab.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})})}_parseVTTs(e){var t;const{frag:i,payload:r}=e,{initPTS:a,unparsedVttFrags:n}=this,s=a.length-1;if(!a[i.cc]&&-1===s)return void n.push(e);const o=this.hls;yI(null!=(t=i.initSegment)&&t.data?hw(i.initSegment.data,new Uint8Array(r)).buffer:r,this.initPTS[i.cc],this.vttCCs,i.cc,i.start,e=>{this._appendCues(e,i.level),o.trigger(ab.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},t=>{const a="Missing initPTS for VTT MPEGTS"===t.message;a?n.push(e):this._fallbackToIMSC1(i,r),o.logger.log(`Failed to parse VTT cue: ${t}`),a&&s>i.cc||o.trigger(ab.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:t})})}_fallbackToIMSC1(e,t){const i=this.tracks[e.level];i.textCodec||kI(t,this.initPTS[e.cc],()=>{i.textCodec=vI,this._parseIMSC1(e,t)},()=>{i.textCodec="wvtt"})}_appendCues(e,t){const i=this.hls;if(this.config.renderTextTracksNatively){const i=this.textTracks[t];if(!i||"disabled"===i.mode)return;e.forEach(e=>bC(i,e))}else{const r=this.tracks[t];if(!r)return;const a=r.default?"default":"subtitles"+t;i.trigger(ab.CUES_PARSED,{type:"subtitles",cues:e,track:a})}}onFragDecrypted(e,t){const{frag:i}=t;i.type===ub&&this.onFragLoaded(ab.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:i,samples:r}=t;if(i.type!==cb||"NONE"!==this.closedCaptionsForLevel(i))for(let a=0;a<r.length;a++){const e=r[a].bytes;if(e){this.cea608Parser1||this.initCea608Parsers();const t=this.extractCea608Data(e);this.cea608Parser1.addData(r[a].pts,t[0]),this.cea608Parser2.addData(r[a].pts,t[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:i,endOffsetSubtitles:r,type:a}){const{media:n}=this;if(n&&!(n.currentTime<i)){if(!a||"video"===a){const{captionsTracks:e}=this;Object.keys(e).forEach(r=>SC(e[r],t,i))}if(this.config.renderTextTracksNatively&&0===t&&void 0!==r){const{textTracks:e}=this;Object.keys(e).forEach(i=>SC(e[i],t,r))}}}extractCea608Data(e){const t=[[],[]],i=31&e[0];let r=2;for(let a=0;a<i;a++){const i=e[r++],a=127&e[r++],n=127&e[r++];if(0===a&&0===n)continue;if(!!(4&i)){const e=3&i;0!==e&&1!==e||(t[e].push(a),t[e].push(n))}}return t}},audioStreamController:class extends RT{constructor(e,t,i){super(e,t,i,"audio-stream-controller",db),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(ab.LEVEL_LOADED,this.onLevelLoaded,this),e.on(ab.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(ab.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(ab.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(ab.BUFFER_RESET,this.onBufferReset,this),e.on(ab.BUFFER_CREATED,this.onBufferCreated,this),e.on(ab.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(ab.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(ab.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(ab.FRAG_LOADING,this.onFragLoading,this),e.on(ab.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(ab.LEVEL_LOADED,this.onLevelLoaded,this),e.off(ab.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(ab.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(ab.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(ab.BUFFER_RESET,this.onBufferReset,this),e.off(ab.BUFFER_CREATED,this.onBufferCreated,this),e.off(ab.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(ab.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(ab.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(ab.FRAG_LOADING,this.onFragLoading,this),e.off(ab.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:i,initPTS:r,timescale:a,trackId:n}){if(i===cb){const e=t.cc,i=this.fragCurrent;if(this.initPTS[e]={baseTime:r,timescale:a,trackId:n},this.log(`InitPTS for cc: ${e} found from main: ${r/a} (${r}/${a}) trackId: ${n}`),this.mainAnchor=t,this.state===PT){const i=this.waitingData;(!i&&!this.loadingParts||i&&i.frag.cc!==e)&&this.syncWithAnchor(t,null==i?void 0:i.frag)}else!this.hls.hasEnoughToStart&&i&&i.cc!==e?(i.abortRequests(),this.syncWithAnchor(t,i)):this.state===bT&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,t){var i;const r=(null==(i=this.mainFragLoading)?void 0:i.frag)||null;if(t&&(null==r?void 0:r.cc)===t.cc)return;const a=(r||e).cc,n=hS(this.getLevelDetails(),a,this.getLoadPosition());n&&(this.log(`Syncing with main frag at ${n.start} cc ${n.cc}`),this.startFragRequested=!1,this.nextLoadPosition=n.start,this.resetLoadingState(),this.state===bT&&this.doTickIdle())}startLoad(e,t){if(!this.levels)return this.startPosition=e,void(this.state=vT);const i=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),i>0&&-1===e?(this.log(`Override startPosition with lastCurrentTime @${i.toFixed(3)}`),e=i,this.state=bT):this.state=TT,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case bT:this.doTickIdle();break;case TT:{const{levels:e,trackId:t}=this,i=null==e?void 0:e[t],r=null==i?void 0:i.details;if(r&&!this.waitForLive(i)){if(this.waitForCdnTuneIn(r))break;this.state=PT}break}case kT:this.checkRetryDate();break;case PT:{const e=this.waitingData;if(e){const{frag:t,part:i,cache:r,complete:a}=e,n=this.mainAnchor;if(void 0!==this.initPTS[t.cc]){this.waitingData=null,this.state=ST;const e={frag:t,part:i,payload:r.flush().buffer,networkDetails:null};this._handleFragmentLoadProgress(e),a&&super._handleFragmentLoadComplete(e)}else n&&n.cc!==e.frag.cc&&this.syncWithAnchor(n,e.frag)}else this.state=bT}}this.onTickEnd()}resetLoadingState(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),super.resetLoadingState()}onTickEnd(){const{media:e}=this;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:i,media:r,trackId:a}=this,n=t.config;if(!this.buffering||!r&&!this.primaryPrefetch&&(this.startFragRequested||!n.startFragPrefetch)||null==i||!i[a])return;const s=i[a],o=s.details;if(!o||this.waitForLive(s)||this.waitForCdnTuneIn(o))return this.state=TT,void(this.startFragRequested=!1);const l=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&l&&(this.bufferFlushed=!1,this.afterBufferFlushed(l,zb,db));const c=this.getFwdBufferInfo(l,db);if(null===c)return;if(!this.switchingTrack&&this._streamEnded(c,o))return t.trigger(ab.BUFFER_EOS,{type:"audio"}),void(this.state=CT);const d=c.len,u=t.maxBufferLength,h=o.fragments,p=h[0].start,m=this.getLoadPosition(),f=this.flushing?m:c.end;if(this.switchingTrack&&r){const e=m;o.PTSKnown&&e<p&&(c.end>p||c.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=p+.05)}if(d>=u&&!this.switchingTrack&&f<h[h.length-1].start)return;let g=this.getNextFragment(f,o);if(g&&this.isLoopLoading(g,f)&&(g=this.getNextFragmentLoopLoading(g,o,c,cb,u)),!g)return void(this.bufferFlushed=!0);if(this.exceedsMaxBuffer(c,u,g))return;let y=(null==(e=this.mainFragLoading)?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&y&&qb(g)&&!g.endList&&(!o.live||!this.loadingParts&&f<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(y)===DS&&(this.mainFragLoading=y=null),y&&qb(y))){if(g.start>y.end){const e=this.fragmentTracker.getFragAtPos(f,cb);e&&e.end>y.end&&(y=e,this.mainFragLoading={frag:e,targetBufferTime:null})}if(g.start>y.end)return}this.loadFragment(g,s,f)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(e=>new Jw(e))}onAudioTrackSwitching(e,t){const i=!!t.url;this.trackId=t.id;const{fragCurrent:r}=this;r&&(r.abortRequests(),this.removeUnbufferedFrags(r.start)),this.resetLoadingState(),i?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==vT&&(this.setInterval(100),this.state=bT,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const i=this.cachedTrackLoadedData;i&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(ab.AUDIO_TRACK_LOADED,i))}onAudioTrackLoaded(e,t){var i;const{levels:r}=this,{details:a,id:n,groupId:s,track:o}=t;if(!r)return void this.warn(`Audio tracks reset while loading track ${n} "${o.name}" of "${s}"`);const l=this.mainDetails;if(!l||a.endCC>l.endCC||l.expired)return this.cachedTrackLoadedData=t,void(this.state!==vT&&(this.state=TT));this.cachedTrackLoadedData=null,this.log(`Audio track ${n} "${o.name}" of "${s}" loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""},duration:${a.totalduration}`);const c=r[n];let d=0;if(a.live||null!=(i=c.details)&&i.live){if(this.checkLiveUpdate(a),a.deltaUpdateFailed)return;var u;if(c.details)d=this.alignPlaylists(a,c.details,null==(u=this.levelLastLoaded)?void 0:u.details);a.alignedSliding||(pT(a,l),a.alignedSliding||mT(a,l),d=a.fragmentStart)}c.details=a,this.levelLastLoaded=c,this.startFragRequested||this.setStartPosition(l,d),this.hls.trigger(ab.AUDIO_TRACK_UPDATED,{details:a,id:n,groupId:t.groupId}),this.state!==TT||this.waitForCdnTuneIn(a)||(this.state=bT),this.tick()}_handleFragmentLoadProgress(e){var t;const i=e.frag,{part:r,payload:a}=e,{config:n,trackId:s,levels:o}=this;if(!o)return void this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);const l=o[s];if(!l)return void this.warn("Audio track is undefined on fragment load progress");const c=l.details;if(!c)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(i.start);const d=n.defaultAudioCodec||l.audioCodec||"mp4a.40.2";let u=this.transmuxer;u||(u=this.transmuxer=new sA(this.hls,db,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const h=this.initPTS[i.cc],p=null==(t=i.initSegment)?void 0:t.data;if(void 0!==h){const e=!1,t=r?r.index:-1,n=-1!==t,s=new JS(i.level,i.sn,i.stats.chunkCount,a.byteLength,t,n);u.push(a,p,d,"",i,r,c.totalduration,e,s,h)}else{this.log(`Unknown video PTS for cc ${i.cc}, waiting for video PTS before demuxing audio frag ${i.sn} of [${c.startSN} ,${c.endSN}],track ${s}`);const{cache:e}=this.waitingData=this.waitingData||{frag:i,part:r,cache:new LT,complete:!1};e.push(new Uint8Array(a)),this.state!==vT&&(this.state=PT)}}_handleFragmentLoadComplete(e){this.waitingData?this.waitingData.complete=!0:super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,t){this.bufferFlushed=this.flushing=!1;const i=t.tracks.audio;i&&(this.mediaBuffer=i.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===cb&&qb(t.frag)&&(this.mainFragLoading=t,this.state===bT&&this.tick())}onFragBuffered(e,t){const{frag:i,part:r}=t;if(i.type===db)if(this.fragContextChanged(i))this.warn(`Fragment ${i.sn}${r?" p: "+r.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);else{if(qb(i)){this.fragPrevious=i;const e=this.switchingTrack;e&&(this.bufferedTrack=e,this.switchingTrack=null,this.hls.trigger(ab.AUDIO_TRACK_SWITCHED,yb({},e)))}this.fragBufferedComplete(i,r),this.media&&this.tick()}else this.audioOnly||i.type!==cb||i.elementaryStreams.video||i.elementaryStreams.audiovideo||(this.audioOnly=!0,this.mainFragLoading=null)}onError(e,t){var i;if(t.fatal)this.state=IT;else switch(t.details){case rb.FRAG_GAP:case rb.FRAG_PARSING_ERROR:case rb.FRAG_DECRYPT_ERROR:case rb.FRAG_LOAD_ERROR:case rb.FRAG_LOAD_TIMEOUT:case rb.KEY_LOAD_ERROR:case rb.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(db,t);break;case rb.AUDIO_TRACK_LOAD_ERROR:case rb.AUDIO_TRACK_LOAD_TIMEOUT:case rb.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==TT||(null==(i=t.context)?void 0:i.type)!==ob||(this.state=bT);break;case rb.BUFFER_ADD_CODEC_ERROR:case rb.BUFFER_APPEND_ERROR:if("audio"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case rb.BUFFER_FULL_ERROR:if("audio"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case rb.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}onBufferFlushing(e,{type:t}){t!==jb&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==jb){this.flushing=!1,this.bufferFlushed=!0,this.state===CT&&(this.state=bT);const e=this.mediaBuffer||this.media;e&&(this.afterBufferFlushed(e,t,db),this.tick())}}_handleTransmuxComplete(e){var t;const i="audio",{hls:r}=this,{remuxResult:a,chunkMeta:n}=e,s=this.getCurrentContext(n);if(!s)return void this.resetWhenMissingContext(n);const{frag:o,part:l,level:c}=s,{details:d}=c,{audio:u,text:h,id3:p,initSegment:m}=a;if(!this.fragContextChanged(o)&&d){if(this.state=ET,this.switchingTrack&&u&&this.completeAudioSwitch(this.switchingTrack),null!=m&&m.tracks){const e=o.initSegment||o;if(this.unhandledEncryptionError(m,o))return;this._bufferInitSegment(c,m.tracks,e,n),r.trigger(ab.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:i,tracks:m.tracks})}if(u){const{startPTS:e,endPTS:t,startDTS:i,endDTS:r}=u;l&&(l.elementaryStreams[zb]={startPTS:e,endPTS:t,startDTS:i,endDTS:r}),o.setElementaryStreamInfo(zb,e,t,i,r),this.bufferFragmentData(u,o,l,n)}if(null!=p&&null!=(t=p.samples)&&t.length){const e=fb({id:i,frag:o,details:d},p);r.trigger(ab.FRAG_PARSING_METADATA,e)}if(h){const e=fb({id:i,frag:o,details:d},h);r.trigger(ab.FRAG_PARSING_USERDATA,e)}}else this.fragmentTracker.removeFragment(o)}_bufferInitSegment(e,t,i,r){if(this.state!==ET)return;if(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio)return;const a=t.audio;a.id=db;const n=e.audioCodec;this.log(`Init audio buffer, container:${a.container}, codecs[level/parsed]=[${n}/${a.codec}]`),n&&1===n.split(",").length&&(a.levelCodec=n),this.hls.trigger(ab.BUFFER_CODECS,t);const s=a.initSegment;if(null!=s&&s.byteLength){const e={type:"audio",frag:i,part:null,chunkMeta:r,parent:i.type,data:s};this.hls.trigger(ab.BUFFER_APPENDING,e)}this.tickImmediate()}loadFragment(e,t,i){const r=this.fragmentTracker.getState(e);var a;if(this.switchingTrack||r===RS||r===LS)if(qb(e))if(null!=(a=t.details)&&a.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=PT;const i=this.mainDetails;i&&i.fragmentStart!==t.details.fragmentStart&&mT(t.details,i)}else super.loadFragment(e,t,i);else this._loadInitSegment(e,t);else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:i,assocLang:r,characteristics:a,audioCodec:n,channels:s}=this.bufferedTrack;aS({name:t,lang:i,assocLang:r,characteristics:a,audioCodec:n,channels:s},e,nS)||(oS(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(ab.AUDIO_TRACK_SWITCHED,yb({},e))}},audioTrackController:class extends oA{constructor(e){super(e,"audio-track-controller"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.MANIFEST_PARSED,this.onManifestParsed,this),e.on(ab.LEVEL_LOADING,this.onLevelLoading,this),e.on(ab.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(ab.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(ab.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.MANIFEST_PARSED,this.onManifestParsed,this),e.off(ab.LEVEL_LOADING,this.onLevelLoading,this),e.off(ab.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(ab.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(ab.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:i,groupId:r,details:a}=t,n=this.tracksInGroup[i];if(!n||n.groupId!==r)return void this.warn(`Audio track with id:${i} and group:${r} not found in active group ${null==n?void 0:n.groupId}`);const s=n.details;n.details=t.details,this.log(`Audio track ${i} "${n.name}" lang:${n.lang} group:${r} loaded [${a.startSN}-${a.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,s)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const i=t.audioGroups||null,r=this.groupIds;let a=this.currentTrack;if(!i||(null==r?void 0:r.length)!==(null==i?void 0:i.length)||null!=i&&i.some(e=>-1===(null==r?void 0:r.indexOf(e)))){this.groupIds=i,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter(e=>!i||-1!==i.indexOf(e.groupId));if(e.length)this.selectDefaultTrack&&!e.some(e=>e.default)&&(this.selectDefaultTrack=!1),e.forEach((e,t)=>{e.id=t});else if(!a&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.audioPreference;if(!a&&t){const i=rS(t,e,nS);if(i>-1)a=e[i];else{const e=rS(t,this.tracks);a=this.tracks[e]}}let r=this.findTrackId(a);-1===r&&a&&(r=this.findTrackId(null));const s={audioTracks:e};this.log(`Updating audio tracks, ${e.length} track(s) found in group(s): ${null==i?void 0:i.join(",")}`),this.hls.trigger(ab.AUDIO_TRACKS_UPDATED,s);const o=this.trackId;if(-1!==r&&-1===o)this.setAudioTrack(r);else if(e.length&&-1===o){var n;const t=new Error(`No audio track selected for current audio group-ID(s): ${null==(n=this.groupIds)?void 0:n.join(",")} track count: ${e.length}`);this.warn(t.message),this.hls.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:t})}}}onError(e,t){!t.fatal&&t.context&&(t.context.type!==ob||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||this.checkRetry(t))}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const i=this.allAudioTracks;if(this.selectDefaultTrack=!1,i.length){const r=this.currentTrack;if(r&&aS(e,r,nS))return r;const a=rS(e,this.tracksInGroup,nS);if(a>-1){const e=this.tracksInGroup[a];return this.setAudioTrack(a),e}if(r){let r=t.loadLevel;-1===r&&(r=t.firstAutoLevel);const a=function(e,t,i,r,a){const n=t[r],s=t.reduce((e,t,i)=>{const r=t.uri;return(e[r]||(e[r]=[])).push(i),e},{})[n.uri];s.length>1&&(r=Math.max.apply(Math,s));const o=n.videoRange,l=n.frameRate,c=n.codecSet.substring(0,4),d=sS(t,r,t=>{if(t.videoRange!==o||t.frameRate!==l||t.codecSet.substring(0,4)!==c)return!1;const r=t.audioGroups,n=i.filter(e=>!r||-1!==r.indexOf(e.groupId));return rS(e,n,a)>-1});return d>-1?d:sS(t,r,t=>{const r=t.audioGroups,n=i.filter(e=>!r||-1!==r.indexOf(e.groupId));return rS(e,n,a)>-1})}(e,t.levels,i,r,nS);if(-1===a)return null;t.nextLoadLevel=a}if(e.channels||e.audioCodec){const t=rS(e,i);if(t>-1)return i[t]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length)return void this.warn(`Invalid audio track id: ${e}`);this.selectDefaultTrack=!1;const i=this.currentTrack,r=t[e],a=r.details&&!r.details.live;if(e===this.trackId&&r===i&&a)return;if(this.log(`Switching to audio-track ${e} "${r.name}" lang:${r.lang} group:${r.groupId} channels:${r.channels}`),this.trackId=e,this.currentTrack=r,this.hls.trigger(ab.AUDIO_TRACK_SWITCHING,yb({},r)),a)return;const n=this.switchParams(r.url,null==i?void 0:i.details,r.details);this.loadPlaylist(n)}findTrackId(e){const t=this.tracksInGroup;for(let i=0;i<t.length;i++){const r=t[i];if((!this.selectDefaultTrack||r.default)&&(!e||aS(e,r,nS)))return i}if(e){const{name:i,lang:r,assocLang:a,characteristics:n,audioCodec:s,channels:o}=e;for(let e=0;e<t.length;e++){if(aS({name:i,lang:r,assocLang:a,characteristics:n,audioCodec:s,channels:o},t[e],nS))return e}for(let l=0;l<t.length;l++){const i=t[l];if(cA(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return l}for(let l=0;l<t.length;l++){const i=t[l];if(cA(e.attrs,i.attrs,["LANGUAGE"]))return l}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&oS(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const i=e.id,r=e.groupId,a=this.getUrlWithDirectives(e.url,t),n=e.details,s=null==n?void 0:n.age;this.log(`Loading audio-track ${i} "${e.name}" lang:${e.lang} group:${r}${void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:""}${s&&n.live?" age "+s.toFixed(1)+(n.type&&" "+n.type||""):""} ${a}`),this.hls.trigger(ab.AUDIO_TRACK_LOADING,{url:a,id:i,groupId:r,deliveryDirectives:t||null,track:e})}},emeController:pC,cmcdController:class{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=e=>{try{this.apply(e,{ot:vA.MANIFEST,su:!this.initialized})}catch(t){this.hls.logger.warn("Could not generate manifest CMCD data.",t)}},this.applyFragmentData=e=>{try{const{frag:t,part:i}=e,r=this.hls.levels[t.level],a=this.getObjectType(t),n={d:1e3*(i||t).duration,ot:a};a!==vA.VIDEO&&a!==vA.AUDIO&&a!=vA.MUXED||(n.br=r.bitrate/1e3,n.tb=this.getTopBandwidth(a)/1e3,n.bl=this.getBufferLength(a));const s=i?this.getNextPart(i):this.getNextFrag(t);null!=s&&s.url&&s.url!==t.url&&(n.nor=s.url),this.apply(e,n)}catch(t){this.hls.logger.warn("Could not generate segment CMCD data.",t)}},this.hls=e;const t=this.config=e.config,{cmcd:i}=t;null!=i&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||e.sessionId,this.cid=i.contentId,this.useHeaders=!0===i.useHeaders,this.includeKeys=i.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ab.MEDIA_DETACHED,this.onMediaDetached,this),e.on(ab.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ab.MEDIA_DETACHED,this.onMediaDetached,this),e.off(ab.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var i,r;this.audioBuffer=null==(i=t.tracks.audio)?void 0:i.buffer,this.videoBuffer=null==(r=t.tracks.video)?void 0:r.buffer}createData(){var e;return{v:1,sf:bA.HLS,sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){fb(t,this.createData());const i=t.ot===vA.INIT||t.ot===vA.VIDEO||t.ot===vA.MUXED;this.starved&&i&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering);const{includeKeys:r}=this;r&&(t=Object.keys(t).reduce((e,i)=>(r.includes(i)&&(e[i]=t[i]),e),{}));const a={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),oC(e.headers,t,a)):e.url=dC(e.url,t,a)}getNextFrag(e){var t;const i=null==(t=this.hls.levels[e.level])?void 0:t.details;if(i){const t=e.sn-i.startSN;return i.fragments[t+1]}}getNextPart(e){var t;const{index:i,fragment:r}=e,a=null==(t=this.hls.levels[r.level])||null==(t=t.details)?void 0:t.partList;if(a){const{sn:e}=r;for(let t=a.length-1;t>=0;t--){const r=a[t];if(r.index===i&&r.fragment.sn===e)return a[t+1]}}}getObjectType(e){const{type:t}=e;return"subtitle"===t?vA.TIMED_TEXT:"initSegment"===e.sn?vA.INIT:"audio"===t?vA.AUDIO:"main"===t?this.hls.audioTracks.length?vA.VIDEO:vA.MUXED:void 0}getTopBandwidth(e){let t,i=0;const r=this.hls;if(e===vA.AUDIO)t=r.audioTracks;else{const e=r.maxAutoLevel,i=e>-1?e+1:r.levels.length;t=r.levels.slice(0,i)}return t.forEach(e=>{e.bitrate>i&&(i=e.bitrate)}),i>0?i:NaN}getBufferLength(e){const t=this.media,i=e===vA.AUDIO?this.audioBuffer:this.videoBuffer;if(!i||!t)return NaN;return 1e3*QS.bufferInfo(i,t.currentTime,this.config.maxBufferHole).len}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,i=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new i(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,i,r){t(e),this.loader.load(e,i,r)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,i=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new i(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,i,r){t(e),this.loader.load(e,i,r)}}}},contentSteeringController:class extends vb{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(ab.MANIFEST_PARSED,this.onManifestParsed,this),e.on(ab.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(ab.MANIFEST_PARSED,this.onManifestParsed,this),e.off(ab.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=1e3*this.timeToLoad-(performance.now()-this.updated);if(e>0)return void this.scheduleRefresh(this.uri,e)}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(t=>t!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:i}=t;null!==i&&(this.pathwayId=i.pathwayId,this.uri=i.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:i}=t;if((null==i?void 0:i.action)===kS&&i.flags===CS){const e=this.levels;let r=this._pathwayPriority,a=this.pathwayId;if(t.context){const{groupId:i,pathwayId:r,type:n}=t.context;i&&e?a=this.getPathwayForGroupId(i,n,a):r&&(a=r)}a in this.penalizedPathways||(this.penalizedPathways[a]=performance.now()),!r&&e&&(r=this.pathways()),r&&r.length>1&&(this.updatePathwayPriority(r),i.resolved=this.pathwayId!==a),t.details!==rb.BUFFER_APPEND_ERROR||t.fatal?i.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${a} levels: ${e?e.length:e} priorities: ${Zw(r)} penalized: ${Zw(this.penalizedPathways)}`):i.resolved=!0}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){const i=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${i}"`),t=this.getLevelsForPathway(i),this.pathwayId=i}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return null===this.levels?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){let t;this._pathwayPriority=e;const i=this.penalizedPathways,r=performance.now();Object.keys(i).forEach(e=>{r-i[e]>3e5&&delete i[e]});for(let a=0;a<e.length;a++){const r=e[a];if(r in i)continue;if(r===this.pathwayId)return;const n=this.hls.nextLoadLevel,s=this.hls.levels[n];if(t=this.getLevelsForPathway(r),t.length>0){this.log(`Setting Pathway to "${r}"`),this.pathwayId=r,oT(t),this.hls.trigger(ab.LEVELS_UPDATED,{levels:t});const e=this.hls.levels[n];s&&e&&this.levels&&(e.attrs["STABLE-VARIANT-ID"]!==s.attrs["STABLE-VARIANT-ID"]&&e.bitrate!==s.bitrate&&this.log(`Unstable Pathways change from bitrate ${s.bitrate} to ${e.bitrate}`),this.hls.nextLoadLevel=n);break}}}getPathwayForGroupId(e,t,i){const r=this.getLevelsForPathway(i).concat(this.levels||[]);for(let a=0;a<r.length;a++)if(t===ob&&r[a].hasAudioGroup(e)||t===lb&&r[a].hasSubtitleGroup(e))return r[a].pathwayId;return i}clonePathways(e){const t=this.levels;if(!t)return;const i={},r={};e.forEach(e=>{const{ID:a,"BASE-ID":n,"URI-REPLACEMENT":s}=e;if(t.some(e=>e.pathwayId===a))return;const o=this.getLevelsForPathway(n).map(e=>{const t=new sk(e.attrs);t["PATHWAY-ID"]=a;const n=t.AUDIO&&`${t.AUDIO}_clone_${a}`,o=t.SUBTITLES&&`${t.SUBTITLES}_clone_${a}`;n&&(i[t.AUDIO]=n,t.AUDIO=n),o&&(r[t.SUBTITLES]=o,t.SUBTITLES=o);const l=hC(e.uri,t["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",s),c=new Jw({attrs:t,audioCodec:e.audioCodec,bitrate:e.bitrate,height:e.height,name:e.name,url:l,videoCodec:e.videoCodec,width:e.width});if(e.audioGroups)for(let i=1;i<e.audioGroups.length;i++)c.addGroupId("audio",`${e.audioGroups[i]}_clone_${a}`);if(e.subtitleGroups)for(let i=1;i<e.subtitleGroups.length;i++)c.addGroupId("text",`${e.subtitleGroups[i]}_clone_${a}`);return c});t.push(...o),uC(this.audioTracks,i,s,a),uC(this.subtitleTracks,r,s,a)})}loadSteeringManifest(e){const t=this.hls.config,i=t.loader;let r;this.loader&&this.loader.destroy(),this.loader=new i(t);try{r=new self.URL(e)}catch(c){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest URI: ${e}`)}if("data:"!==r.protocol){const e=0|(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate);r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+e)}const a={responseType:"json",url:r.href},n=t.steeringManifestLoadPolicy.default,s=n.errorRetry||n.timeoutRetry||{},o={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},l={onSuccess:(e,t,i,a)=>{this.log(`Loaded steering manifest: "${r}"`);const n=e.data;if(1!==(null==n?void 0:n.VERSION))return void this.log(`Steering VERSION ${n.VERSION} not supported!`);this.updated=performance.now(),this.timeToLoad=n.TTL;const{"RELOAD-URI":s,"PATHWAY-CLONES":o,"PATHWAY-PRIORITY":l}=n;if(s)try{this.uri=new self.URL(s,r).href}catch(c){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest RELOAD-URI: ${s}`)}this.scheduleRefresh(this.uri||i.url),o&&this.clonePathways(o);const d={steeringManifest:n,url:r.toString()};this.hls.trigger(ab.STEERING_MANIFEST_LOADED,d),l&&this.updatePathwayPriority(l)},onError:(e,t,i,r)=>{if(this.log(`Error loading steering manifest: ${e.code} ${e.text} (${t.url})`),this.stopLoad(),410===e.code)return this.enabled=!1,void this.log(`Steering manifest ${t.url} no longer available`);let a=1e3*this.timeToLoad;if(429===e.code){const e=this.loader;if("function"==typeof(null==e?void 0:e.getResponseHeader)){const t=e.getResponseHeader("Retry-After");t&&(a=1e3*parseFloat(t))}return void this.log(`Steering manifest ${t.url} rate limited`)}this.scheduleRefresh(this.uri||t.url,a)},onTimeout:(e,t,i)=>{this.log(`Timeout loading steering manifest (${t.url})`),this.scheduleRefresh(this.uri||t.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(a,o,l)}scheduleRefresh(e,t=1e3*this.timeToLoad){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var t;const i=null==(t=this.hls)?void 0:t.media;!i||i.ended?this.scheduleRefresh(e,1e3*this.timeToLoad):this.loadSteeringManifest(e)},t)}},interstitialsController:class extends vb{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const e=this.currentTime;if(void 0===e||this.playbackDisabled||!this.schedule)return;const t=e-this.timelinePos;if(Math.abs(t)<1/7056e5)return;const i=t<=-.01;-1!==this.timelinePos||this.effectivePlayingItem||this.checkStart(),this.timelinePos=e,this.bufferedPos=e;const r=this.playingItem;if(!r)return void this.checkBuffer();if(i){this.schedule.resetErrorsInRange(e,e-t)&&this.updateSchedule(!0)}if(this.checkBuffer(),i&&e<r.start||e>=r.end){var a;const t=this.findItemIndex(r);let n=this.schedule.findItemIndexAtTime(e);if(-1===n&&(n=t+(i?-1:1),this.log(`seeked ${i?"back ":""}to position not covered by schedule ${e} (resolving from ${t} to ${n})`)),!this.isInterstitial(r)&&null!=(a=this.media)&&a.paused&&(this.shouldPlay=!1),!i&&n>t){const e=this.schedule.findJumpRestrictedIndex(t+1,n);if(e>t)return void this.setSchedulePosition(e)}return void this.setSchedulePosition(n)}const n=this.playingAsset;if(!n){if(this.playingLastItem&&this.isInterstitial(r)){const t=r.event.assetList[0];t&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(e,t))}return}const s=n.timelineStart,o=n.duration||0;var l;(i&&e<s||e>=s+o)&&(null!=(l=r.event)&&l.appendInPlace&&(this.clearAssetPlayers(r.event,r),this.flushFrontBuffer(e)),this.setScheduleToAssetAtTime(e,n))},this.onTimeupdate=()=>{const e=this.currentTime;if(void 0===e||this.playbackDisabled)return;if(-1!==this.timelinePos||this.effectivePlayingItem||this.checkStart(),!(e>this.timelinePos))return;this.timelinePos=e,e>this.bufferedPos&&this.checkBuffer();const t=this.playingItem;if(!t||this.playingLastItem)return;if(e>=t.end){this.timelinePos=t.end;const e=this.findItemIndex(t);this.setSchedulePosition(e+1)}const i=this.playingAsset;if(!i)return;e>=i.timelineStart+(i.duration||0)&&this.setScheduleToAssetAtTime(e,i)},this.onScheduleUpdate=(e,t)=>{const i=this.schedule;if(!i)return;const r=this.playingItem,a=i.events||[],n=i.items||[],s=i.durations,o=e.map(e=>e.identifier),l=!(!a.length&&!o.length);(l||t)&&this.log(`INTERSTITIALS_UPDATED (${a.length}): ${a}\nSchedule: ${n.map(e=>MC(e))} pos: ${this.timelinePos}`),o.length&&this.log(`Removed events ${o}`);let c=null,d=null;r&&(c=this.updateItem(r,this.timelinePos),this.itemsMatch(r,c)?this.playingItem=c:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const u=this.bufferingItem;if(u&&(d=this.updateItem(u,this.bufferedPos),this.itemsMatch(u,d)?this.bufferingItem=d:u.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(u.event,null))),e.forEach(e=>{e.assetList.forEach(e=>{this.clearAssetPlayer(e.identifier,null)})}),this.playerQueue.forEach(e=>{if(e.interstitial.appendInPlace){const i=e.assetItem.timelineStart,r=e.timelineOffset-i;if(r)try{e.timelineOffset=i}catch(t){Math.abs(r)>EC&&this.warn(`${t} ("${e.assetId}" ${e.timelineOffset}->${i})`)}}}),l||t){if(this.hls.trigger(ab.INTERSTITIALS_UPDATED,{events:a.slice(0),schedule:n.slice(0),durations:s,removedIds:o}),this.isInterstitial(r)&&o.includes(r.event.identifier))return this.warn(`Interstitial "${r.event.identifier}" removed while playing`),void this.primaryFallback(r.event);r&&this.trimInPlace(c,r),u&&d!==c&&this.trimInPlace(d,u),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new OC(e),this.schedule=new DC(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(ab.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(ab.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(ab.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(ab.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(ab.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(ab.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(ab.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(ab.BUFFER_APPENDED,this.onBufferAppended,this),e.on(ab.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(ab.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(ab.MEDIA_ENDED,this.onMediaEnded,this),e.on(ab.ERROR,this.onError,this),e.on(ab.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(ab.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(ab.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(ab.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(ab.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(ab.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(ab.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(ab.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(ab.BUFFER_CODECS,this.onBufferCodecs,this),e.off(ab.BUFFER_APPENDED,this.onBufferAppended,this),e.off(ab.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(ab.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(ab.MEDIA_ENDED,this.onMediaEnded,this),e.off(ab.ERROR,this.onError,this),e.off(ab.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;null==(e=this.getBufferingPlayer())||e.resumeBuffering()}pauseBuffering(){var e;null==(e=this.getBufferingPlayer())||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.schedule=this.manager=null,this.hls=this.HlsPlayerClass=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){gT(e,"play",this.onPlay),gT(e,"pause",this.onPause),gT(e,"seeking",this.onSeeking),gT(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const i=this.media=t.media;fT(i,"seeking",this.onSeeking),fT(i,"timeupdate",this.onTimeupdate),fT(i,"play",this.onPlay),fT(i,"pause",this.onPause)}onMediaAttached(e,t){const i=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,null===i)this.checkStart();else if(!r){this.clearScheduleState();const e=this.findItemIndex(i);this.setSchedulePosition(e)}}clearScheduleState(){this.log("clear schedule state"),this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const i=!!t.transferMedia,r=this.media;if(this.media=null,!i&&(r&&this.removeMediaListeners(r),this.detachedData)){const e=this.getBufferingPlayer();e&&(this.log(`Removing schedule state for detachedData and ${e}`),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,e.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.hls)return null;if(this.manager)return this.manager;const e=this,t=()=>e.bufferingItem||e.waitingItem,i=t=>t?e.getAssetPlayer(t.identifier):t,r=(t,r,n,s,o)=>{if(t){let l=t[r].start;const c=t.event;if(c){if("playout"===r||c.timelineOccupancy!==AC.Point){const e=i(n);(null==e?void 0:e.interstitial)===c&&(l+=e.assetItem.startOffset+e[o])}}else{l+=("bufferedPos"===s?a():e[s])-t.start}return l}return 0},a=()=>{const t=e.bufferedPos;return t===Number.MAX_VALUE?n("primary"):Math.max(t,0)},n=t=>{var i,r;return null!=(i=e.primaryDetails)&&i.live?e.primaryDetails.edge:(null==(r=e.schedule)?void 0:r.durations[t])||0},s=(t,a)=>{var n,s;const o=e.effectivePlayingItem;if(null!=o&&null!=(n=o.event)&&n.restrictions.skip||!e.schedule)return;e.log(`seek to ${t} "${a}"`);const l=e.effectivePlayingItem,c=e.schedule.findItemIndexAtTime(t,a),d=null==(s=e.schedule.items)?void 0:s[c],u=e.getBufferingPlayer(),h=null==u?void 0:u.interstitial,p=null==h?void 0:h.appendInPlace,m=l&&e.itemsMatch(l,d);if(l&&(p||m)){const n=i(e.playingAsset),s=(null==n?void 0:n.media)||e.primaryMedia;if(s){const i="primary"===a?s.currentTime:r(l,a,e.playingAsset,"timelinePos","currentTime"),o=t-i,c=(p?i:s.currentTime)+o;if(c>=0&&(!n||p||c<=n.duration))return void(s.currentTime=c)}}if(d){let i=t;if("primary"!==a){const e=t-d[a].start;i=d.start+e}const r=!e.isInterstitial(d);if(e.isInterstitial(l)&&!l.event.appendInPlace||!r&&!d.event.appendInPlace){if(l){const n=e.findItemIndex(l);if(c>n){const t=e.schedule.findJumpRestrictedIndex(n+1,c);if(t>n)return void e.setSchedulePosition(t)}let s=0;if(r)e.timelinePos=i,e.checkBuffer();else{const e=d.event.assetList,i=t-(d[a]||d).start;for(let t=e.length;t--;){const r=e[t];if(r.duration&&i>=r.startOffset&&i<r.startOffset+r.duration){s=t;break}}}e.setSchedulePosition(c,s)}}else{const t=e.media||(p?null==u?void 0:u.media:null);t&&(t.currentTime=i)}}},o=()=>{const i=e.effectivePlayingItem;if(e.isInterstitial(i))return i;const r=t();return e.isInterstitial(r)?r:null},l={get bufferedEnd(){const i=t(),a=e.bufferingItem;var n;return a&&a===i&&(r(a,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-a.playout.start||(null==(n=e.bufferingAsset)?void 0:n.startOffset))||0},get currentTime(){const t=o(),i=e.effectivePlayingItem;return i&&i===t?r(i,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-i.playout.start:0},set currentTime(t){const i=o(),r=e.effectivePlayingItem;r&&r===i&&s(t+r.playout.start,"playout")},get duration(){const e=o();return e?e.playout.end-e.playout.start:0},get assetPlayers(){var t;const i=null==(t=o())?void 0:t.event.assetList;return i?i.map(t=>e.getAssetPlayer(t.identifier)):[]},get playingIndex(){var t;const i=null==(t=o())?void 0:t.event;return i&&e.effectivePlayingAsset?i.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return o()}};return this.manager={get events(){var t;return(null==(t=e.schedule)||null==(t=t.events)?void 0:t.slice(0))||[]},get schedule(){var t;return(null==(t=e.schedule)||null==(t=t.items)?void 0:t.slice(0))||[]},get interstitialPlayer(){return o()?l:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const i=t();return e.findItemIndex(i)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const t=e.effectivePlayingItem;return e.findItemIndex(t)},primary:{get bufferedEnd(){return a()},get currentTime(){const t=e.timelinePos;return t>0?t:0},set currentTime(e){s(e,"primary")},get duration(){return n("primary")},get seekableStart(){var t;return(null==(t=e.primaryDetails)?void 0:t.fragmentStart)||0}},integrated:{get bufferedEnd(){return r(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return r(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(e){s(e,"integrated")},get duration(){return n("integrated")},get seekableStart(){var t;return((t,i)=>{var r;if(0!==t&&"primary"!==i&&null!=(r=e.schedule)&&r.length){var a;const r=e.schedule.findItemIndexAtTime(t),n=null==(a=e.schedule.items)?void 0:a[r];if(n)return t+(n[i].start-n.start)}return t})((null==(t=e.primaryDetails)?void 0:t.fragmentStart)||0,"integrated")}},skip:()=>{const t=e.effectivePlayingItem,i=null==t?void 0:t.event;if(i&&!i.restrictions.skip){const r=e.findItemIndex(t);if(i.appendInPlace){const e=t.playout.start+t.event.duration;s(e+.001,"playout")}else e.advanceAfterAssetEnded(i,r,Infinity)}}}}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,i=null==(e=this.schedule)?void 0:e.items;return!!(this.playbackStarted&&t&&i)&&this.findItemIndex(t)===i.length-1}get playbackStarted(){return null!==this.effectivePlayingItem}get currentTime(){var e,t;if(null===this.mediaSelection)return;const i=this.waitingItem||this.playingItem;if(this.isInterstitial(i)&&!i.event.appendInPlace)return;let r=this.media;!r&&null!=(e=this.bufferingItem)&&null!=(e=e.event)&&e.appendInPlace&&(r=this.primaryMedia);const a=null==(t=r)?void 0:t.currentTime;return void 0!==a&&Zv(a)?a:void 0}get primaryMedia(){var e;return this.media||(null==(e=this.detachedData)?void 0:e.media)||null}isInterstitial(e){return!(null==e||!e.event)}retreiveMediaSource(e,t){const i=this.getAssetPlayer(e);i&&this.transferMediaFromPlayer(i,t)}transferMediaFromPlayer(e,t){const i=e.interstitial.appendInPlace,r=e.media;if(i&&r===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&r)return void(this.detachedData={media:r});const i=e.transferMedia();this.log(`transfer MediaSource from ${e} ${Zw(i)}`),this.detachedData=i}else t&&r&&(this.shouldPlay||(this.shouldPlay=!r.paused))}transferMediaTo(e,t){var i,r;if(e.media===t)return;let a=null;const n=this.hls,s=e!==n,o=s&&e.interstitial.appendInPlace,l=null==(i=this.detachedData)?void 0:i.mediaSource;let c;if(n.media)o&&(a=n.transferMedia(),this.detachedData=a),c="Primary";else if(l){const e=this.getBufferingPlayer();e?(a=e.transferMedia(),c=`${e}`):c="detached MediaSource"}else c="detached media";if(!a)if(l)a=this.detachedData,this.log(`using detachedData: MediaSource ${Zw(a)}`);else if(!this.detachedData||n.media===t){const e=this.playerQueue;e.length>1&&e.forEach(e=>{if(s&&e.interstitial.appendInPlace!==o){const t=e.interstitial;this.clearInterstitial(e.interstitial,null),t.appendInPlace=!1,t.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${t}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}const d=a&&"mediaSource"in a&&"closed"!==(null==(r=a.mediaSource)?void 0:r.readyState),u=d&&a?a:t;this.log(`${d?"transfering MediaSource":"attaching media"} to ${s?e:"Primary"} from ${c} (media.currentTime: ${t.currentTime})`);const h=this.schedule;if(u===a&&h){const t=s&&e.assetId===h.assetIdAtEnd;u.overrides={duration:h.duration,endOfStream:!s||t,cueRemoval:!s}}e.attachMedia(u)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=null==e?void 0:e.events;if(!t||this.playbackDisabled||!this.media)return;-1===this.bufferedPos&&(this.bufferedPos=0);const i=this.timelinePos,r=this.effectivePlayingItem;if(-1===i){const i=this.hls.startPosition;if(this.timelinePos=i,0===t.length)this.setSchedulePosition(0);else if(t[0].cue.pre){this.log(FC("checkStart (preroll)",i));const r=e.findEventIndex(t[0].identifier);this.setSchedulePosition(r)}else if(i>=0||!this.primaryLive){this.log(FC("checkStart",i));const t=this.timelinePos=i>0?i:0,r=e.findItemIndexAtTime(t);this.setSchedulePosition(r)}else 0===this.hls.liveSyncPosition?this.setSchedulePosition(0):this.log("[checkStart] waiting for live start")}else if(r&&!this.playingItem){this.log(FC("checkStart (playing item)",r.start));const t=e.findItemIndex(r);this.setSchedulePosition(t)}}advanceAssetBuffering(e,t){const i=e.event,r=i.findAssetIndex(t),a=RC(i,r);if(i.isAssetPastPlayoutLimit(a)){if(this.schedule){var n;const t=null==(n=this.schedule.items)?void 0:n[this.findItemIndex(e)+1];t&&this.bufferedToItem(t)}}else this.bufferedToEvent(e,a)}advanceAfterAssetEnded(e,t,i){const r=RC(e,i);if(e.isAssetPastPlayoutLimit(r)){if(this.schedule){const i=this.schedule.items;if(i){const r=t+1;if(r>=i.length)return void this.setSchedulePosition(-1);const a=e.resumeTime;this.timelinePos<a&&(this.log(FC("advanceAfterAssetEnded",a)),this.timelinePos=a,e.appendInPlace&&this.advanceInPlace(a),this.checkBuffer(this.bufferedPos<a)),this.setSchedulePosition(r)}}}else{if(e.appendInPlace){const t=e.assetList[r];t&&this.advanceInPlace(t.timelineStart)}this.setSchedulePosition(t,r)}}setScheduleToAssetAtTime(e,t){const i=this.schedule;if(!i)return;const r=t.parentIdentifier,a=i.getEvent(r);if(a){const t=i.findEventIndex(r),n=i.findAssetIndex(a,e);this.advanceAfterAssetEnded(a,t,n-1)}}setSchedulePosition(e,t){var i;const r=null==(i=this.schedule)?void 0:i.items;if(!r||this.playbackDisabled)return;const a=e>=0?r[e]:null;this.log(`setSchedulePosition ${e}, ${t} (${a?MC(a):a}) pos: ${this.timelinePos}`);const n=this.waitingItem||this.playingItem,s=this.playingLastItem;if(this.isInterstitial(n)){const i=n.event,c=this.playingAsset,d=null==c?void 0:c.identifier,u=d?this.getAssetPlayer(d):null;if(u&&d&&(!this.eventItemsMatch(n,a)||void 0!==t&&d!==i.assetList[t].identifier)){var o;const t=i.findAssetIndex(c);if(this.log(`INTERSTITIAL_ASSET_ENDED ${t+1}/${i.assetList.length} ${xC(c)}`),this.endedAsset=c,this.playingAsset=null,this.hls.trigger(ab.INTERSTITIAL_ASSET_ENDED,{asset:c,assetListIndex:t,event:i,schedule:r.slice(0),scheduleIndex:e,player:u}),n!==this.playingItem)return void(this.itemsMatch(n,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(i,this.findItemIndex(this.playingItem),t));this.retreiveMediaSource(d,a),!u.media||null!=(o=this.detachedData)&&o.mediaSource||u.detachMedia()}if(!this.eventItemsMatch(n,a)&&(this.endedItem=n,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${i} ${MC(n)}`),i.hasPlayed=!0,this.hls.trigger(ab.INTERSTITIAL_ENDED,{event:i,schedule:r.slice(0),scheduleIndex:e}),i.cue.once)){var l;this.updateSchedule();const e=null==(l=this.schedule)?void 0:l.items;if(a&&e){const i=this.findItemIndex(a);this.advanceSchedule(i,e,t,n,s)}return}}this.advanceSchedule(e,r,t,n,s)}advanceSchedule(e,t,i,r,a){const n=this.schedule;if(!n)return;const s=t[e]||null,o=this.primaryMedia,l=this.playerQueue;if(l.length&&l.forEach(t=>{const i=t.interstitial,r=n.findEventIndex(i.identifier);(r<e||r>e+1)&&this.clearInterstitial(i,s)}),this.isInterstitial(s)){this.timelinePos=Math.min(Math.max(this.timelinePos,s.start),s.end);const a=s.event;if(void 0===i){const t=RC(a,(i=n.findAssetIndex(a,this.timelinePos))-1);if(a.isAssetPastPlayoutLimit(t)||a.appendInPlace&&this.timelinePos===s.end)return void this.advanceAfterAssetEnded(a,e,i);i=t}const l=this.waitingItem;this.assetsBuffered(s,o)||this.setBufferingItem(s);let c=this.preloadAssets(a,i);if(this.eventItemsMatch(s,l||r)||(this.waitingItem=s,this.log(`INTERSTITIAL_STARTED ${MC(s)} ${a.appendInPlace?"append in place":""}`),this.hls.trigger(ab.INTERSTITIAL_STARTED,{event:a,schedule:t.slice(0),scheduleIndex:e})),!a.assetListLoaded)return void this.log(`Waiting for ASSET-LIST to complete loading ${a}`);if(a.assetListLoader&&(a.assetListLoader.destroy(),a.assetListLoader=void 0),!o)return void this.log(`Waiting for attachMedia to start Interstitial ${a}`);this.waitingItem=this.endedItem=null,this.playingItem=s;const d=a.assetList[i];if(!d)return void this.advanceAfterAssetEnded(a,e,i||0);if(c||(c=this.getAssetPlayer(d.identifier)),null===c||c.destroyed){const e=a.assetList.length;this.warn(`asset ${i+1}/${e} player destroyed ${a}`),c=this.createAssetPlayer(a,d,i),c.loadSource()}if(!this.eventItemsMatch(s,this.bufferingItem)&&a.appendInPlace&&this.isAssetBuffered(d))return;this.startAssetPlayer(c,i,t,e,o),this.shouldPlay&&NC(c.media)}else s?(this.resumePrimary(s,e,r),this.shouldPlay&&NC(this.hls.media)):a&&this.isInterstitial(r)&&(this.endedItem=null,this.playingItem=r,r.event.appendInPlace||this.attachPrimary(n.durations.primary,null))}get playbackDisabled(){return!1===this.hls.config.enableInterstitialPlayback}get primaryDetails(){var e;return null==(e=this.mediaSelection)?void 0:e.main.details}get primaryLive(){var e;return!(null==(e=this.primaryDetails)||!e.live)}resumePrimary(e,t,i){var r,a;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${MC(e)}`),null==(r=this.detachedData)||!r.mediaSource){let i=this.timelinePos;(i<e.start||i>=e.end)&&(i=this.getPrimaryResumption(e,t),this.log(FC("resumePrimary",i)),this.timelinePos=i),this.attachPrimary(i,e)}if(!i)return;const n=null==(a=this.schedule)?void 0:a.items;n&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${MC(e)}`),this.hls.trigger(ab.INTERSTITIALS_PRIMARY_RESUMED,{schedule:n.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const i=e.start;if(this.primaryLive){const e=this.primaryDetails;if(0===t)return this.hls.startPosition;if(e&&(i<e.fragmentStart||i>e.edge))return this.hls.liveSyncPosition||-1}return i}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);if(null!=t&&t.hls)return t.hls.bufferedToEnd;return QS.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,i){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const r=this.primaryMedia;if(!r)return;const a=this.hls;a.media?this.checkBuffer():(this.transferMediaTo(a,r),i&&this.startLoadingPrimaryAt(e,i)),i||(this.log(FC("attachPrimary",e)),this.timelinePos=e,this.startLoadingPrimaryAt(e,i))}startLoadingPrimaryAt(e,t){var i;const r=this.hls;!r.loadingEnabled||!r.media||Math.abs(((null==(i=r.mainForwardBufferInfo)?void 0:i.start)||r.media.currentTime)-e)>.5?r.startLoad(e,t):r.bufferingEnabled||r.resumeBuffering()}onManifestLoading(){var e;this.stopLoad(),null==(e=this.schedule)||e.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(ab.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(ab.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(-1===t.level||!this.schedule)return;const i=this.hls.levels[t.level];if(!i.details)return;const r=yb(yb({},this.mediaSelection||this.altSelection),{},{main:i});this.mediaSelection=r,this.schedule.parseInterstitialDateRanges(r,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const i=this.hls.audioTracks[t.id],r=this.mediaSelection;if(!r)return void(this.altSelection=yb(yb({},this.altSelection),{},{audio:i}));const a=yb(yb({},r),{},{audio:i});this.mediaSelection=a}onSubtitleTrackUpdated(e,t){const i=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r)return void(this.altSelection=yb(yb({},this.altSelection),{},{subtitles:i}));const a=yb(yb({},r),{},{subtitles:i});this.mediaSelection=a}onAudioTrackSwitching(e,t){const i=iS(t);this.playerQueue.forEach(({hls:e})=>e&&(e.setAudioOption(t)||e.setAudioOption(i)))}onSubtitleTrackSwitch(e,t){const i=iS(t);this.playerQueue.forEach(({hls:e})=>e&&(e.setSubtitleOption(t)||-1!==t.id&&e.setSubtitleOption(i)))}onBufferCodecs(e,t){const i=t.tracks;i&&(this.requiredTracks=i)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const i=this.playingItem;if(i&&!this.itemsMatch(i,this.bufferingItem)&&!this.isInterstitial(i)){const e=this.timelinePos;this.bufferedPos=e,this.checkBuffer()}}onBufferedToEnd(e){if(!this.schedule)return;const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let e=0;e<t.length;e++){const r=t[e];if(r.cue.post){var i;const e=this.schedule.findEventIndex(r.identifier),t=null==(i=this.schedule.items)?void 0:i[e];this.isInterstitial(t)&&this.eventItemsMatch(t,this.bufferingItem)&&this.bufferedToItem(t,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const e=this.findItemIndex(t);this.setSchedulePosition(e+1)}else this.shouldPlay=!1}updateItem(e,t){var i;const r=null==(i=this.schedule)?void 0:i.items;if(e&&r){return r[this.findItemIndex(e,t)]||null}return null}trimInPlace(e,t){if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach((t,i)=>{e.event.isAssetPastPlayoutLimit(i)&&this.clearAssetPlayer(t.identifier,null)});const i=e.end+.25,r=QS.bufferInfo(this.primaryMedia,i,0);if(r.end>i||(r.nextStart||0)>i){this.log(`trim buffered interstitial ${MC(e)} (was ${MC(t)})`);const r=!0;this.attachPrimary(i,null,r),this.flushFrontBuffer(i)}}}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var i;return!!t&&(e===t||e.event.identifier===(null==(i=t.event)?void 0:i.identifier))}findItemIndex(e,t){return e&&this.schedule?this.schedule.findItemIndex(e,t):-1}updateSchedule(e=!1){var t;const i=this.mediaSelection;i&&(null==(t=this.schedule)||t.updateSchedule(i,[],e))}checkBuffer(e){var t;const i=null==(t=this.schedule)?void 0:t.items;if(!i)return;const r=QS.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=r.len<1),this.updateBufferedPos(r.end,i,e)}updateBufferedPos(e,t,i){const r=this.schedule,a=this.bufferingItem;if(this.bufferedPos>e||!r)return;if(1===t.length&&this.itemsMatch(t[0],a))return void(this.bufferedPos=e);const n=this.playingItem,s=this.findItemIndex(n);let o=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var l;const i=this.findItemIndex(a),r=Math.min(i+1,t.length-1),n=t[r];if((-1===o&&a&&e>=a.end||null!=(l=n.event)&&l.appendInPlace&&e+.01>=n.start)&&(o=r),this.isInterstitial(a)){const e=a.event;if(r-s>1&&!1===e.appendInPlace)return;if(0===e.assetList.length&&e.assetListLoader)return}if(this.bufferedPos=e,o>i&&o>s)this.bufferedToItem(n);else{const t=this.primaryDetails;this.primaryLive&&t&&e>t.edge-t.targetduration&&n.start<t.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(n)&&this.preloadAssets(n.event,0)}}else i&&n&&!this.itemsMatch(n,a)&&(o===s?this.bufferedToItem(n):o===s+1&&this.bufferedToItem(t[o]))}assetsBuffered(e,t){return 0!==e.event.assetList.length&&!e.event.assetList.some(e=>{const i=this.getAssetPlayer(e.identifier);return!(null!=i&&i.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,i=this.schedule;if(!this.itemsMatch(e,t)&&i){const{items:r,events:a}=i;if(!r||!a)return t;const n=this.isInterstitial(e),s=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const o=s?s.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${MC(e)}`+(t?` (${o.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(n){const t=i.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((e,i)=>{const r=this.getAssetPlayer(e.identifier);r&&(i===t&&r.loadSource(),r.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(e=>e.pauseBuffering());this.hls.trigger(ab.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:a.slice(0),schedule:r.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}else this.bufferingItem!==e&&(this.bufferingItem=e);return t}bufferedToItem(e,t=0){const i=this.setBufferingItem(e);if(!this.playbackDisabled)if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(null!==i){this.bufferingAsset=null;const t=this.detachedData;if(t)if(t.mediaSource){const t=!0;this.attachPrimary(e.start,e,t)}else this.preloadPrimary(e);else this.preloadPrimary(e)}}preloadPrimary(e){const t=this.findItemIndex(e),i=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(i)}bufferedToEvent(e,t){const i=e.event,r=0===i.assetList.length&&!i.assetListLoader,a=i.cue.once;if(r||!a){const e=this.preloadAssets(i,t);if(null!=e&&e.interstitial.appendInPlace){const t=this.primaryMedia;t&&this.bufferAssetPlayer(e,t)}}}preloadAssets(e,t){const i=e.assetUrl,r=e.assetList.length,a=0===r&&!e.assetListLoader,n=e.cue.once;if(a){const a=e.timelineStart;if(e.appendInPlace){var s;const t=this.playingItem;this.isInterstitial(t)||(null==t||null==(s=t.nextEvent)?void 0:s.identifier)!==e.identifier||this.flushFrontBuffer(a+.25)}let n,o=0;if(!this.playingItem&&this.primaryLive&&(o=this.hls.startPosition,-1===o&&(o=this.hls.liveSyncPosition||0)),o&&!e.cue.pre&&!e.cue.post){const e=o-a;e>0&&(n=Math.round(1e3*e)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${i?1:r} ${e}${n?` live-start: ${o} start-offset: ${n}`:""}`),i)return this.createAsset(e,0,0,a,e.duration,i);const l=this.assetListLoader.loadAssetList(e,n);l&&(e.assetListLoader=l)}else if(!n&&r){for(let a=t;a<r;a++){const t=e.assetList[a],i=this.getAssetPlayerQueueIndex(t.identifier);-1!==i&&!this.playerQueue[i].destroyed||t.error||this.createAssetPlayer(e,t,a)}const i=e.assetList[t];if(i){const e=this.getAssetPlayer(i.identifier);return e&&e.loadSource(),e}}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`);Object.keys(t).forEach(t=>{this.hls.trigger(ab.BUFFER_FLUSHING,{startOffset:e,endOffset:Infinity,type:t})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let i=0;i<t.length;i++)if(e===t[i].assetId)return i;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t)for(let i=0;i<e.length;i++)if(e[i].media===t)return e[i];return null}createAsset(e,t,i,r,a,n){const s={parentIdentifier:e.identifier,identifier:CC(e,n,t),duration:a,startOffset:i,timelineStart:r,uri:n};return this.createAssetPlayer(e,s,t)}createAssetPlayer(e,t,i){const r=this.hls,a=r.userConfig;let n=a.videoPreference;const s=r.loadLevelObj||r.levels[r.currentLevel];(n||s)&&(n=fb({},n),s.videoCodec&&(n.videoCodec=s.videoCodec),s.videoRange&&(n.allowedVideoRanges=[s.videoRange]));const o=r.audioTracks[r.audioTrack],l=r.subtitleTracks[r.subtitleTrack];let c=0;if(this.primaryLive||e.appendInPlace){const e=this.timelinePos-t.timelineStart;if(e>1){const i=t.duration;i&&e<i&&(c=e)}}const d=t.identifier,u=yb(yb({},a),{},{maxMaxBufferLength:Math.min(180,r.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:d,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:c,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:n,audioPreference:o||a.audioPreference,subtitlePreference:l||a.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(u.timelineOffset=t.timelineStart));const h=u.cmcd;null!=h&&h.sessionId&&h.contentId&&(u.cmcd=fb({},h,{contentId:TC(t.uri)})),this.getAssetPlayer(d)&&this.warn(`Duplicate date range identifier ${e} and asset ${d}`);const p=new LC(this.HlsPlayerClass,u,e,t);this.playerQueue.push(p),e.assetList[i]=t;let m=!0;const f=r=>{if(r.live){var a;const t=new Error(`Interstitials MUST be VOD assets ${e}`),r={fatal:!0,type:ib.OTHER_ERROR,details:rb.INTERSTITIAL_ASSET_ITEM_ERROR,error:t},n=(null==(a=this.schedule)?void 0:a.findEventIndex(e.identifier))||-1;return void this.handleAssetItemError(r,e,n,i,t.message)}const n=r.edge-r.fragmentStart,s=t.duration;(m||null===s||n>s)&&(m=!1,this.log(`Interstitial asset "${d}" duration change ${s} > ${n}`),t.duration=n,this.updateSchedule())};p.on(ab.LEVEL_UPDATED,(e,{details:t})=>f(t)),p.on(ab.LEVEL_PTS_UPDATED,(e,{details:t})=>f(t)),p.on(ab.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const g=(e,t)=>{const i=this.getAssetPlayer(d);if(i&&t.tracks){i.off(ab.BUFFER_CODECS,g),i.tracks=t.tracks;const e=this.primaryMedia;this.bufferingAsset===i.assetItem&&e&&!i.media&&this.bufferAssetPlayer(i,e)}};p.on(ab.BUFFER_CODECS,g);p.on(ab.BUFFERED_TO_END,()=>{var i;const r=this.getAssetPlayer(d);if(this.log(`buffered to end of asset ${r}`),!r||!this.schedule)return;const a=this.schedule.findEventIndex(e.identifier),n=null==(i=this.schedule.items)?void 0:i[a];this.isInterstitial(n)&&this.advanceAssetBuffering(n,t)});const y=t=>()=>{if(!this.getAssetPlayer(d)||!this.schedule)return;this.shouldPlay=!0;const i=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,i,t)};return p.once(ab.MEDIA_ENDED,y(i)),p.once(ab.PLAYOUT_LIMIT_REACHED,y(Infinity)),p.on(ab.ERROR,(t,r)=>{if(!this.schedule)return;const a=this.getAssetPlayer(d);if(r.details===rb.BUFFER_STALLED_ERROR)return null!=a&&a.appendInPlace?void this.handleInPlaceStall(e):(this.onTimeupdate(),void this.checkBuffer(!0));this.handleAssetItemError(r,e,this.schedule.findEventIndex(e.identifier),i,`Asset player error ${r.error} ${e}`)}),p.on(ab.DESTROYING,()=>{if(!this.getAssetPlayer(d)||!this.schedule)return;const t=new Error(`Asset player destroyed unexpectedly ${d}`),r={fatal:!0,type:ib.OTHER_ERROR,details:rb.INTERSTITIAL_ASSET_ITEM_ERROR,error:t};this.handleAssetItemError(r,e,this.schedule.findEventIndex(e.identifier),i,t.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${xC(t)}`),this.hls.trigger(ab.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:i,event:e,player:p}),p}clearInterstitial(e,t){this.clearAssetPlayers(e,t),e.reset()}clearAssetPlayers(e,t){e.assetList.forEach(e=>{this.clearAssetPlayer(e.identifier,t)})}resetAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);if(-1!==t){this.log(`reset asset player "${e}" after error`);const i=this.playerQueue[t];this.transferMediaFromPlayer(i,null),i.resetDetails()}}clearAssetPlayer(e,t){const i=this.getAssetPlayerQueueIndex(e);if(-1!==i){const e=this.playerQueue[i];this.log(`clear ${e} toSegment: ${t?MC(t):t}`),this.transferMediaFromPlayer(e,t),this.playerQueue.splice(i,1),e.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,i,r,a){const{interstitial:n,assetItem:s,assetId:o}=e,l=n.assetList.length,c=this.playingAsset;this.endedAsset=null,this.playingAsset=s,c&&c.identifier===o||(c&&(this.clearAssetPlayer(c.identifier,i[r]),delete c.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${l} ${xC(s)}`),this.hls.trigger(ab.INTERSTITIAL_ASSET_STARTED,{asset:s,assetListIndex:t,event:n,schedule:i.slice(0),scheduleIndex:r,player:e})),this.bufferAssetPlayer(e,a)}bufferAssetPlayer(e,t){var i,r;if(!this.schedule)return;const{interstitial:a,assetItem:n}=e,s=this.schedule.findEventIndex(a.identifier),o=null==(i=this.schedule.items)?void 0:i[s];if(!o)return;e.loadSource(),this.setBufferingItem(o),this.bufferingAsset=n;const l=this.getBufferingPlayer();if(l===e)return;const c=a.appendInPlace;if(c&&!1===(null==l?void 0:l.interstitial.appendInPlace))return;const d=(null==l?void 0:l.tracks)||(null==(r=this.detachedData)?void 0:r.tracks)||this.requiredTracks;if(c&&n!==this.playingAsset){if(!e.tracks)return void this.log(`Waiting for track info before buffering ${e}`);if(d&&!Cb(d,e.tracks)){const t=new Error(`Asset ${xC(n)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(d)}')`),i={fatal:!0,type:ib.OTHER_ERROR,details:rb.INTERSTITIAL_ASSET_ITEM_ERROR,error:t},r=a.findAssetIndex(n);return void this.handleAssetItemError(i,a,s,r,t.message)}}this.transferMediaTo(e,t)}handleInPlaceStall(e){const t=this.schedule,i=this.primaryMedia;if(!t||!i)return;const r=i.currentTime,a=t.findAssetIndex(e,r),n=e.assetList[a];if(n){const s=this.getAssetPlayer(n.identifier);if(s){const o=s.currentTime||r-n.timelineStart,l=s.duration-o;if(this.warn(`Stalled at ${o} of ${o+l} in ${s} ${e} (media.currentTime: ${r})`),o&&(l/i.playbackRate<.5||s.bufferedInPlaceToEnd(i))&&s.hls){const i=t.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,i,a)}}}}advanceInPlace(e){const t=this.primaryMedia;t&&t.currentTime<e&&(t.currentTime=e)}handleAssetItemError(e,t,i,r,a){if(e.details===rb.BUFFER_STALLED_ERROR)return;const n=t.assetList[r]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${n?xC(n):n} ${e.error}`),!this.schedule)return;const s=(null==n?void 0:n.identifier)||"",o=this.getAssetPlayerQueueIndex(s),l=this.playerQueue[o]||null,c=this.schedule.items,d=fb({},e,{fatal:!1,errorAction:_S(!0),asset:n,assetListIndex:r,event:t,schedule:c,scheduleIndex:i,player:l});if(this.hls.trigger(ab.INTERSTITIAL_ASSET_ERROR,d),!e.fatal)return;const u=this.playingAsset,h=this.bufferingAsset,p=new Error(a);if(n&&(this.clearAssetPlayer(s,null),n.error=p),t.assetList.some(e=>!e.error))for(let m=r;m<t.assetList.length;m++)this.resetAssetPlayer(t.assetList[m].identifier);else t.error=p;this.updateSchedule(!0),t.error?this.primaryFallback(t):u&&u.identifier===s?this.advanceAfterAssetEnded(t,i,r):h&&h.identifier===s&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,h)}primaryFallback(e){const t=e.timelineStart,i=this.effectivePlayingItem;let r=this.timelinePos;if(i){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${r} playing: ${MC(i)} error: ${e.error}`),-1===r&&(r=this.hls.startPosition);const a=this.updateItem(i,r);this.itemsMatch(i,a)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t))}else if(-1===r)return void this.checkStart();if(!this.schedule)return;const a=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(a)}onAssetListLoaded(e,t){var i,r;const a=t.event,n=a.identifier,s=t.assetListResponse.ASSETS;if(null==(i=this.schedule)||!i.hasEvent(n))return;const o=a.timelineStart,l=a.duration;let c=0;s.forEach((e,t)=>{const i=parseFloat(e.DURATION);this.createAsset(a,t,c,o+c,i,e.URI),c+=i}),a.duration=c,this.log(`Loaded asset-list with duration: ${c} (was: ${l}) ${a}`);const d=this.waitingItem,u=(null==d?void 0:d.event.identifier)===n;this.updateSchedule();const h=null==(r=this.bufferingItem)?void 0:r.event;if(u){var p;const e=this.schedule.findEventIndex(n),t=null==(p=this.schedule.items)?void 0:p[e];if(t){if(!this.playingItem&&this.timelinePos>t.end){if(this.schedule.findItemIndexAtTime(this.timelinePos)!==e)return a.error=new Error(`Interstitial ${s.length?"no longer within playback range":"asset-list is empty"} ${this.timelinePos} ${a}`),this.log(a.error.message),this.updateSchedule(!0),void this.primaryFallback(a)}this.setBufferingItem(t)}this.setSchedulePosition(e)}else if((null==h?void 0:h.identifier)===n){const e=a.assetList[0];if(e){const t=this.getAssetPlayer(e.identifier);if(h.appendInPlace){const e=this.primaryMedia;t&&e&&this.bufferAssetPlayer(t,e)}else t&&t.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case rb.ASSET_LIST_PARSING_ERROR:case rb.ASSET_LIST_LOAD_ERROR:case rb.ASSET_LIST_LOAD_TIMEOUT:{const e=t.interstitial;e&&(this.updateSchedule(!0),this.primaryFallback(e));break}case rb.BUFFER_STALLED_ERROR:{const e=this.endedItem||this.waitingItem||this.playingItem;if(this.isInterstitial(e)&&e.event.appendInPlace)return void this.handleInPlaceStall(e.event);this.log(`Primary player stall @${this.timelinePos} bufferedPos: ${this.bufferedPos}`),this.onTimeupdate(),this.checkBuffer(!0);break}}}}});function $I(e){return e&&"object"==typeof e?Array.isArray(e)?e.map($I):Object.keys(e).reduce((t,i)=>(t[i]=$I(e[i]),t),{}):e}function GI(e,t){const i=e.loader;if(i!==NI&&i!==zI)t.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1;else{(function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1})()&&(e.loader=NI,e.progressive=!0,e.enableSoftwareAES=!0,t.log("[config]: Progressive streaming enabled, using FetchLoader"))}}class qI extends YS{constructor(e,t){super("gap-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var e;null!=(e=this.media)&&e.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{var e;this.hls&&(this.ended=(null==(e=this.media)?void 0:e.currentTime)||1,this.hls.trigger(ab.MEDIA_ENDED,{stalled:!1}))},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ab.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ab.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,t){this.setInterval(100),this.mediaSource=t.mediaSource;const i=this.media=t.media;fT(i,"playing",this.onMediaPlaying),fT(i,"waiting",this.onMediaWaiting),fT(i,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:i}=this;i&&(gT(i,"playing",this.onMediaPlaying),gT(i,"waiting",this.onMediaWaiting),gT(i,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(null==(e=this.media)||!e.readyState||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var i,r;const a=null==(i=this.hls)?void 0:i.config;if(!a)return;const n=this.media;if(!n)return;const{seeking:s}=n,o=this.seeking&&!s,l=!this.seeking&&s,c=n.paused&&!s||n.ended||0===n.playbackRate;if(this.seeking=s,e!==t)return t&&(this.ended=0),this.moved=!0,s||(this.nudgeRetry=0,a.nudgeOnVideoHole&&!c&&e>t&&this.nudgeOnVideoHole(e,t)),void(0===this.waiting&&this.stallResolved(e));if(l||o)return void(o&&this.stallResolved(e));if(c)return this.nudgeRetry=0,this.stallResolved(e),void(!this.ended&&n.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(ab.MEDIA_ENDED,{stalled:!1})));if(!QS.getBuffered(n).length)return void(this.nudgeRetry=0);const d=QS.bufferInfo(n,e,0),u=d.nextStart||0,h=this.fragmentTracker;if(s&&h&&this.hls){const t=HI(this.hls.inFlightFragments,e),i=d.len>2,r=!u||t||u-e>2&&!h.getPartialFragment(e);if(i||r)return;this.moved=!1}const p=null==(r=this.hls)?void 0:r.latestLevelDetails;if(!this.moved&&null!==this.stalled&&h){if(!(d.len>0)&&!u)return;const t=Math.max(u,d.start||0)-e,i=!(null==p||!p.live)?2*p.targetduration:2,r=WI(e,h);if(t>0&&(t<=i||r))return void(n.paused||this._trySkipBufferHole(r))}const m=a.detectStallWithCurrentTimeMs,f=self.performance.now(),g=this.waiting;let y=this.stalled;if(null===y){if(!(g>0&&f-g<m))return void(this.stalled=f);y=this.stalled=g}const v=f-y;if(!s&&(v>=m||g)&&this.hls){var b;if("ended"===(null==(b=this.mediaSource)?void 0:b.readyState)&&(null==p||!p.live)&&Math.abs(e-((null==p?void 0:p.edge)||0))<1){if(this.ended)return;return this.ended=e||1,void this.hls.trigger(ab.MEDIA_ENDED,{stalled:!0})}if(this._reportStall(d),!this.media||!this.hls)return}const w=QS.bufferInfo(n,e,a.maxBufferHole);this._tryFixBufferStall(w,v,e)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const i=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(i)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(ab.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var i;const r=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&null!=(i=this.buffered.audio)&&i.length&&r&&r.length>1&&e>r.end(0)){const i=QS.bufferedInfo(QS.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const i=QS.timeRangesToArray(r),a=QS.bufferedInfo(i,t,0).bufferedIndex;if(a>-1&&a<i.length-1){const t=QS.bufferedInfo(i,e,0).bufferedIndex,r=i[a].end,n=i[a+1].start;if((-1===t||t>a)&&n-r<1&&e-r<2){const i=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${r} -> ${n} buffered index: ${t}`);this.warn(i.message),this.media.currentTime+=1e-6;let a=WI(e,this.fragmentTracker);a&&"fragment"in a?a=a.fragment:a||(a=void 0);const s=QS.bufferInfo(this.media,e,0);this.hls.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:i,reason:i.message,frag:a,buffer:s.len,bufferInfo:s})}}}}}_tryFixBufferStall(e,t,i){var r,a;const{fragmentTracker:n,media:s}=this,o=null==(r=this.hls)?void 0:r.config;if(!s||!n||!o)return;const l=null==(a=this.hls)?void 0:a.latestLevelDetails,c=WI(i,n);if(c||null!=l&&l.live&&i<l.fragmentStart){if(this._trySkipBufferHole(c)||!this.media)return}const d=e.buffered,u=this.adjacentTraversal(e,i);(d&&d.length>1&&e.len>o.maxBufferHole||e.nextStart&&(e.nextStart-i<o.maxBufferHole||u))&&(t>1e3*o.highBufferWatchdogPeriod||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,t){const i=this.fragmentTracker,r=e.nextStart;if(i&&r){const e=i.getFragAtPos(t,cb),a=i.getFragAtPos(r,cb);if(e&&a)return a.sn-e.sn<2}return!1}_reportStall(e){const{hls:t,media:i,stallReported:r,stalled:a}=this;if(!r&&null!==a&&i&&t){this.stallReported=!0;const r=new Error(`Playback stalling at @${i.currentTime} due to low buffer (${Zw(e)})`);this.warn(r.message),t.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.BUFFER_STALLED_ERROR,fatal:!1,error:r,buffer:e.len,bufferInfo:e,stalled:{start:a}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:i,media:r}=this,a=null==(t=this.hls)?void 0:t.config;if(!r||!i||!a)return 0;const n=r.currentTime,s=QS.bufferInfo(r,n,0),o=n<s.start?s.start:s.nextStart;if(o&&this.hls){const t=s.len<=a.maxBufferHole,c=s.len>0&&s.len<1&&r.readyState<3,d=o-n;if(d>0&&(t||c)){if(d>a.maxBufferHole){let t=!1;if(0===n){const e=i.getAppendedFrag(0,cb);e&&o<e.end&&(t=!0)}if(!t&&e){var l;if(null==(l=this.hls.loadLevelObj)||!l.details)return 0;if(HI(this.hls.inFlightFragments,o))return 0;let t=!1,r=e.end;for(;r<o;){const e=WI(r,i);if(!e){t=!0;break}r+=e.duration}if(t)return 0}}const t=Math.max(o+.05,n+.1);if(this.warn(`skipping hole, adjusting currentTime from ${n} to ${t}`),this.moved=!0,r.currentTime=t,null==e||!e.gap){const i=new Error(`fragment loaded with buffer holes, seeking from ${n} to ${t}`),r={type:ib.MEDIA_ERROR,details:rb.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:i,reason:i.message,buffer:s.len,bufferInfo:s};e&&("fragment"in e?r.part=e:r.frag=e),this.hls.trigger(ab.ERROR,r)}return t}}return 0}_tryNudgeBuffer(e){const{hls:t,media:i,nudgeRetry:r}=this,a=null==t?void 0:t.config;if(!i||!a)return 0;const n=i.currentTime;if(this.nudgeRetry++,r<a.nudgeMaxRetry){const s=n+(r+1)*a.nudgeOffset,o=new Error(`Nudging 'currentTime' from ${n} to ${s}`);this.warn(o.message),i.currentTime=s,t.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.BUFFER_NUDGE_ON_STALL,error:o,fatal:!1,buffer:e.len,bufferInfo:e})}else{const i=new Error(`Playhead still not moving while enough data buffered @${n} after ${a.nudgeMaxRetry} nudges`);this.error(i.message),t.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.BUFFER_STALLED_ERROR,error:i,fatal:!0,buffer:e.len,bufferInfo:e})}}}function HI(e,t){const i=VI(e.main);if(i&&i.start<=t)return i;const r=VI(e.audio);return r&&r.start<=t?r:null}function VI(e){if(!e)return null;switch(e.state){case bT:case vT:case CT:case IT:return null}return e.frag}function WI(e,t){return t.getAppendedFrag(e,cb)||t.getPartialFragment(e)}function KI(){if("undefined"!=typeof self)return self.VTTCue||self.TextTrackCue}function YI(e,t,i,r,a){let n=new e(t,i,"");try{n.value=r,a&&(n.type=a)}catch(s){n=new e(t,i,Zw(a?yb({type:a},r):r))}return n}const JI=(()=>{const e=KI();try{e&&new e(0,Number.POSITIVE_INFINITY,"")}catch(t){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class XI{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.assetCue=void 0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(ab.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e&&(e.on(ab.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(ab.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(ab.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(ab.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(ab.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(ab.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(ab.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(ab.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}onMediaAttaching(e,t){var i;this.media=t.media,!1===(null==(i=t.overrides)?void 0:i.cueRemoval)&&(this.removeCues=!1)}onMediaAttached(){var e;const t=null==(e=this.hls)?void 0:e.latestLevelDetails;t&&this.updateDateRangeCues(t)}onMediaDetaching(e,t){this.media=null;!!t.transferMedia||(this.id3Track&&(this.removeCues&&wC(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const i=e[t];if("metadata"===i.kind&&"id3"===i.label)return vC(i,this.media),i}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media||!this.hls)return;const{enableEmsgMetadataCues:i,enableID3MetadataCues:r}=this.hls.config;if(!i&&!r)return;const{samples:a}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const n=KI();if(n)for(let s=0;s<a.length;s++){const e=a[s].type;if(e===nE.emsg&&!i||!r)continue;const t=tE(a[s].data),o=a[s].pts;let l=o+a[s].duration;l>JI&&(l=JI);l-o<=0&&(l=o+.25);for(let i=0;i<t.length;i++){const r=t[i];if(!iE(r)){this.updateId3CueEnds(o,e);const t=YI(n,o,l,r,e);t&&this.id3Track.addCue(t)}}}}updateId3CueEnds(e,t){var i;const r=null==(i=this.id3Track)?void 0:i.cues;if(r)for(let a=r.length;a--;){const i=r[a];i.type===t&&i.startTime<e&&i.endTime===JI&&(i.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:i,type:r}){const{id3Track:a,hls:n}=this;if(!n)return;const{config:{enableEmsgMetadataCues:s,enableID3MetadataCues:o}}=n;if(a&&(s||o)){let e;e="audio"===r?e=>e.type===nE.audioId3&&o:"video"===r?e=>e.type===nE.emsg&&s:e=>e.type===nE.audioId3&&o||e.type===nE.emsg&&s,SC(a,t,i,e)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.hls||!this.media)return;const{assetPlayerId:i,timelineOffset:r,enableDateRangeMetadataCues:a,interstitialsController:n}=this.hls.config;if(!a)return;const s=KI();if(i&&r&&!n){const{fragmentStart:t,fragmentEnd:r}=e;let a=this.assetCue;a?(a.startTime=t,a.endTime=r):s&&(a=this.assetCue=YI(s,t,r,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),a&&(a.id=i,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(a),a.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:o}=this,{dateRanges:l}=e,c=Object.keys(l);let d=this.dateRangeCuesAppended;var u;if(o&&t)if(null!=(u=o.cues)&&u.length){const e=Object.keys(d).filter(e=>!c.includes(e));for(let t=e.length;t--;){var h;const i=e[t],r=null==(h=d[i])?void 0:h.cues;delete d[i],r&&Object.keys(r).forEach(e=>{const t=r[e];if(t){t.removeEventListener("enter",this.onEventCueEnter);try{o.removeCue(t)}catch(i){}}})}}else d=this.dateRangeCuesAppended={};const p=e.fragments[e.fragments.length-1];if(0!==c.length&&Zv(null==p?void 0:p.programDateTime)){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let e=0;e<c.length;e++){const t=c[e],i=l[t],r=i.startTime,a=d[t],o=(null==a?void 0:a.cues)||{};let u=(null==a?void 0:a.durationKnown)||!1,h=JI;const{duration:p,endDate:m}=i;if(m&&null!==p)h=r+p,u=!0;else if(i.endOnNext&&!u){const e=c.reduce((e,t)=>{if(t!==i.id){const r=l[t];if(r.class===i.class&&r.startDate>i.startDate&&(!e||i.startDate<e.startDate))return r}return e},null);e&&(h=e.startTime,u=!0)}const f=Object.keys(i.attr);for(let e=0;e<f.length;e++){const l=f[e];if(!ok(l))continue;const c=o[l];if(c)!u||null!=a&&a.durationKnown?Math.abs(c.startTime-r)>.01&&(c.startTime=r,c.endTime=h):c.endTime=h;else if(s){let e=i.attr[l];lk(l)&&(e=_b(e));const a=YI(s,r,h,{key:l,data:e},nE.dateRange);a&&(a.id=t,this.id3Track.addCue(a),o[l]=a,n&&("X-ASSET-LIST"!==l&&"X-ASSET-URL"!==l||a.addEventListener("enter",this.onEventCueEnter)))}}d[t]={cues:o,dateRange:i,durationKnown:u}}}}}class QI{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:e}=this,t=this.levelDetails;if(!e||!t)return;this.currentTime=e.currentTime;const i=this.computeLatency();if(null===i)return;this._latency=i;const{lowLatencyMode:r,maxLiveSyncPlaybackRate:a}=this.config;if(!r||1===a||!t.live)return;const n=this.targetLatency;if(null===n)return;const s=i-n;if(s<Math.min(this.maxLatency,n+t.targetduration)&&s>.05&&this.forwardBufferLength>1){const t=Math.min(2,Math.max(1,a)),i=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20,r=Math.min(t,Math.max(1,i));this.changeMediaPlaybackRate(e,r)}else 1!==e.playbackRate&&0!==e.playbackRate&&this.changeMediaPlaybackRate(e,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return(null==(e=this.hls)?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(void 0!==e.liveMaxLatencyDuration)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(null===e||null===this.hls)return null;const{holdBack:t,partHoldBack:i,targetduration:r}=e,{liveSyncDuration:a,liveSyncDurationCount:n,lowLatencyMode:s}=this.config,o=this.hls.userConfig;let l=s&&i||t;(this._targetLatencyUpdated||o.liveSyncDuration||o.liveSyncDurationCount||0===l)&&(l=void 0!==a?a:n*r);const c=r;return l+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,c)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(null===e||null===t)return null;const i=this.levelDetails;if(null===i)return null;const r=i.edge,a=e-t-this.edgeStalled,n=r-i.totalduration,s=r-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(n,a),s)}get drift(){const e=this.levelDetails;return null===e?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(null===e)return 0;const t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const i=e.buffered.length;return(i?e.buffered.end(i-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(ab.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(ab.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(ab.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(ab.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var i;t.details===rb.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&null!=(i=this.levelDetails)&&i.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var i,r;e.playbackRate!==t&&(null==(i=this.hls)||i.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${null==(r=this.targetLatency)?void 0:r.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`),e.playbackRate=t)}estimateLiveEdge(){const e=this.levelDetails;return null===e?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return null===e?null:e-this.currentTime}}class ZI extends oA{constructor(e,t){super(e,"level-controller"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(ab.LEVEL_LOADED,this.onLevelLoaded,this),e.on(ab.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(ab.FRAG_BUFFERED,this.onFragBuffered,this),e.on(ab.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(ab.LEVEL_LOADED,this.onLevelLoaded,this),e.off(ab.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(ab.FRAG_BUFFERED,this.onFragBuffered,this),e.off(ab.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(e=>{e.loadError=0,e.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const i=this.hls.config.preferManagedMediaSource,r=[],a={},n={};let s=!1,o=!1,l=!1;t.levels.forEach(e=>{const t=e.attrs;let{audioCodec:c,videoCodec:d}=e;c&&(e.audioCodec=c=Rw(c,i)||void 0),d&&(d=e.videoCodec=function(e){const t=e.split(",");for(let i=0;i<t.length;i++){const e=t[i].split(".");e.length>2&&"avc1"===e[0]&&(t[i]=`avc1.${parseInt(e[1]).toString(16)}${("000"+parseInt(e[2]).toString(16)).slice(-4)}`)}return t.join(",")}(d));const{width:u,height:h,unknownCodecs:p}=e,m=(null==p?void 0:p.length)||0;if(s||(s=!(!u||!h)),o||(o=!!d),l||(l=!!c),m||c&&!this.isAudioSupported(c)||d&&!this.isVideoSupported(d))return void this.log(`Some or all CODECS not supported "${t.CODECS}"`);const{CODECS:f,"FRAME-RATE":g,"HDCP-LEVEL":y,"PATHWAY-ID":v,RESOLUTION:b,"VIDEO-RANGE":w}=t,S=`${`${v||"."}-`}${e.bitrate}-${b}-${g}-${f}-${w}-${y}`;if(a[S])if(a[S].uri===e.url||e.attrs["PATHWAY-ID"])a[S].addGroupId("audio",t.AUDIO),a[S].addGroupId("text",t.SUBTITLES);else{const t=n[S]+=1;e.attrs["PATHWAY-ID"]=new Array(t+1).join(".");const i=this.createLevel(e);a[S]=i,r.push(i)}else{const t=this.createLevel(e);a[S]=t,n[S]=1,r.push(t)}}),this.filterAndSortMediaOptions(r,t,s,o,l)}createLevel(e){const t=new Jw(e),i=e.supplemental;if(null!=i&&i.videoCodec&&!this.isVideoSupported(i.videoCodec)){const e=new Error(`SUPPLEMENTAL-CODECS not supported "${i.videoCodec}"`);this.log(e.message),t.supportedResult=Uw(e,[])}return t}isAudioSupported(e){return Tw(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Tw(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,i,r,a){var n;let s=[],o=[],l=e;const c=(null==(n=t.stats)?void 0:n.parsing)||{};if((i||r)&&a&&(l=l.filter(({videoCodec:e,videoRange:t,width:i,height:r})=>{return(!!e||!(!i||!r))&&(!!(a=t)&&qw.indexOf(a)>-1);var a})),0===l.length)return Promise.resolve().then(()=>{if(this.hls){let e="no level with compatible codecs found in manifest",i=e;t.levels.length&&(i=`one or more CODECS in variant not supported: ${Zw(t.levels.map(e=>e.attrs.CODECS).filter((e,t,i)=>i.indexOf(e)===t))}`,this.warn(i),e+=` (${i})`);const r=new Error(e);this.hls.trigger(ab.ERROR,{type:ib.MEDIA_ERROR,details:rb.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:r,reason:i})}}),void(c.end=performance.now());t.audioTracks&&(s=t.audioTracks.filter(e=>!e.audioCodec||this.isAudioSupported(e.audioCodec)),eP(s)),t.subtitles&&(o=t.subtitles,eP(o));const d=l.slice(0);l.sort((e,t)=>{if(e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"])return(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1;if(i&&e.height!==t.height)return e.height-t.height;if(e.frameRate!==t.frameRate)return e.frameRate-t.frameRate;if(e.videoRange!==t.videoRange)return qw.indexOf(e.videoRange)-qw.indexOf(t.videoRange);if(e.videoCodec!==t.videoCodec){const i=Cw(e.videoCodec),r=Cw(t.videoCodec);if(i!==r)return r-i}if(e.uri===t.uri&&e.codecSet!==t.codecSet){const i=Iw(e.codecSet),r=Iw(t.codecSet);if(i!==r)return r-i}return e.averageBitrate!==t.averageBitrate?e.averageBitrate-t.averageBitrate:0});let u=d[0];if(this.steering&&(l=this.steering.filterParsedLevels(l),l.length!==d.length))for(let y=0;y<d.length;y++)if(d[y].pathwayId===l[0].pathwayId){u=d[y];break}this._levels=l;for(let y=0;y<l.length;y++)if(l[y]===u){var h;this._firstLevel=y;const e=u.bitrate,t=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${l.length} level(s) found, first bitrate: ${e}`),void 0===(null==(h=this.hls.userConfig)?void 0:h.abrEwmaDefaultEstimate)){const i=Math.min(e,this.hls.config.abrEwmaDefaultEstimateMax);i>t&&t===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=i)}break}const p=a&&!r,m=this.hls.config,f=!(!m.audioStreamController||!m.audioTrackController),g={levels:l,audioTracks:s,subtitleTracks:o,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:a,video:r,altAudio:f&&!p&&s.some(e=>!!e.url)};c.end=performance.now(),this.hls.trigger(ab.MANIFEST_PARSED,g)}get levels(){return 0===this._levels.length?null:this._levels}get loadLevelObj(){return this.currentLevel}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(0===t.length)return;if(e<0||e>=t.length){const i=new Error("invalid level idx"),r=e<0;if(this.hls.trigger(ab.ERROR,{type:ib.OTHER_ERROR,details:rb.LEVEL_SWITCH_ERROR,level:e,fatal:r,error:i,reason:i.message}),r)return;e=Math.min(e,t.length-1)}const i=this.currentLevelIndex,r=this.currentLevel,a=r?r.attrs["PATHWAY-ID"]:void 0,n=t[e],s=n.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=n,i===e&&r&&a===s)return;this.log(`Switching to level ${e} (${n.height?n.height+"p ":""}${n.videoRange?n.videoRange+" ":""}${n.codecSet?n.codecSet+" ":""}@${n.bitrate})${s?" with Pathway "+s:""} from level ${i}${a?" with Pathway "+a:""}`);const o={level:e,attrs:n.attrs,details:n.details,bitrate:n.bitrate,averageBitrate:n.averageBitrate,maxBitrate:n.maxBitrate,realBitrate:n.realBitrate,width:n.width,height:n.height,codecSet:n.codecSet,audioCodec:n.audioCodec,videoCodec:n.videoCodec,audioGroups:n.audioGroups,subtitleGroups:n.subtitleGroups,loaded:n.loaded,loadError:n.loadError,fragmentError:n.fragmentError,name:n.name,id:n.id,uri:n.uri,url:n.url,urlId:0,audioGroupIds:n.audioGroupIds,textGroupIds:n.textGroupIds};this.hls.trigger(ab.LEVEL_SWITCHING,o);const l=n.details;if(!l||l.live){const e=this.switchParams(n.uri,null==r?void 0:r.details,l);this.loadPlaylist(e)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(void 0===this._startLevel){const e=this.hls.config.startLevel;return void 0!==e?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathways(){return this.steering?this.steering.pathways():[]}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const t=this.steering.pathways(),i=e.filter(e=>-1!==t.indexOf(e));if(e.length<1)return void this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);this.steering.pathwayPriority=i}}onError(e,t){!t.fatal&&t.context&&t.context.type===sb&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(void 0!==t&&t.type===cb){const e=t.elementaryStreams;if(!Object.keys(e).some(t=>!!e[t]))return;const i=this._levels[t.level];null!=i&&i.loadError&&(this.log(`Resetting level error count of ${i.loadError} on frag buffered`),i.loadError=0)}}onLevelLoaded(e,t){var i;const{level:r,details:a}=t,n=t.levelInfo;var s;if(!n)return this.warn(`Invalid level index ${r}`),void(null!=(s=t.deliveryDirectives)&&s.skip&&(a.deltaUpdateFailed=!0));if(n===this.currentLevel||t.withoutMultiVariant){0===n.fragmentError&&(n.loadError=0);let e=n.details;e===t.details&&e.advanced&&(e=void 0),this.playlistLoaded(r,t,e)}else null!=(i=t.deliveryDirectives)&&i.skip&&(a.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const i=this.getUrlWithDirectives(e.uri,t),r=this.currentLevelIndex,a=e.attrs["PATHWAY-ID"],n=e.details,s=null==n?void 0:n.age;this.log(`Loading level index ${r}${void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:""}${a?" Pathway "+a:""}${s&&n.live?" age "+s.toFixed(1)+(n.type&&" "+n.type||""):""} ${i}`),this.hls.trigger(ab.LEVEL_LOADING,{url:i,level:r,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(1===this._levels.length)return;const i=this._levels.filter((t,i)=>i!==e||(this.steering&&this.steering.removeLevel(t),t===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,t.details&&t.details.fragments.forEach(e=>e.level=-1)),!1));oT(i),this._levels=i,this.currentLevelIndex>-1&&null!=(t=this.currentLevel)&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const r=i.length-1;this._firstLevel=Math.min(this._firstLevel,r),this._startLevel&&(this._startLevel=Math.min(this._startLevel,r)),this.hls.trigger(ab.LEVELS_UPDATED,{levels:i})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:i}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(ab.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:i}))}}function eP(e){const t={};e.forEach(e=>{const i=e.groupId||"";e.id=t[i]=t[i]||0,t[i]++})}function tP(){return self.SourceBuffer||self.WebKitSourceBuffer}function iP(){if(!Ab())return!1;const e=tP();return!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove}class rP extends RT{constructor(e,t,i){super(e,t,i,"stream-controller",cb),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const e=this.media,t=e?e.currentTime:null;if(null===t||!Zv(t))return;if(this.log(`Media seeked to ${t.toFixed(3)}`),!this.getBufferedFrag(t))return;const i=this.getFwdBufferInfoAtPos(e,t,cb,0);null!==i&&0!==i.len?this.tick():this.warn(`Main forward buffer length at ${t} on "seeked" event ${i?i.len:"empty"})`)},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(ab.MANIFEST_PARSED,this.onManifestParsed,this),e.on(ab.LEVEL_LOADING,this.onLevelLoading,this),e.on(ab.LEVEL_LOADED,this.onLevelLoaded,this),e.on(ab.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(ab.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(ab.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(ab.BUFFER_CREATED,this.onBufferCreated,this),e.on(ab.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(ab.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(ab.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(ab.MANIFEST_PARSED,this.onManifestParsed,this),e.off(ab.LEVEL_LOADED,this.onLevelLoaded,this),e.off(ab.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(ab.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(ab.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(ab.BUFFER_CREATED,this.onBufferCreated,this),e.off(ab.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(ab.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(ab.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:i,hls:r}=this;if(this.stopLoad(),this.setInterval(100),this.level=-1,!this.startFragRequested){let e=r.startLevel;-1===e&&(r.config.testBandwidth&&this.levels.length>1?(e=0,this.bitrateTest=!0):e=r.firstAutoLevel),r.nextLoadLevel=e,this.level=r.loadLevel,this._hasEnoughToStart=!!t}i>0&&-1===e&&!t&&(this.log(`Override startPosition with lastCurrentTime @${i.toFixed(3)}`),e=i),this.state=bT,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=vT}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case _T:{const{levels:e,level:t}=this,i=null==e?void 0:e[t],r=null==i?void 0:i.details;if(r&&(!r.live||this.levelLastLoaded===i&&!this.waitForLive(i))){if(this.waitForCdnTuneIn(r))break;this.state=bT;break}if(this.hls.nextLoadLevel!==this.level){this.state=bT;break}break}case kT:this.checkRetryDate()}this.state===bT&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),null!=(e=this.media)&&e.readyState&&!1===this.media.seeking&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:i,media:r}=this;if(null===t||!r&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;const a=this.buffering?e.nextLoadLevel:e.loadLevel;if(null==i||!i[a])return;const n=i[a],s=this.getMainFwdBufferInfo();if(null===s)return;const o=this.getLevelDetails();if(o&&this._streamEnded(s,o)){const e={};return 2===this.altAudio&&(e.type="video"),this.hls.trigger(ab.BUFFER_EOS,e),void(this.state=CT)}if(!this.buffering)return;e.loadLevel!==a&&-1===e.manualLevel&&this.log(`Adapting to level ${a} from level ${this.level}`),this.level=e.nextLoadLevel=a;const l=n.details;if(!l||this.state===_T||this.waitForLive(n))return this.level=a,this.state=_T,void(this.startFragRequested=!1);const c=s.len,d=this.getMaxBufferLength(n.maxBitrate);if(c>=d)return;this.backtrackFragment&&this.backtrackFragment.start>s.end&&(this.backtrackFragment=null);const u=this.backtrackFragment?this.backtrackFragment.start:s.end;let h=this.getNextFragment(u,l);if(this.couldBacktrack&&!this.fragPrevious&&h&&qb(h)&&this.fragmentTracker.getState(h)!==DS){var p;const e=(null!=(p=this.backtrackFragment)?p:h).sn-l.startSN,t=l.fragments[e-1];t&&h.cc===t.cc&&(h=t,this.fragmentTracker.removeFragment(t))}else this.backtrackFragment&&s.len&&(this.backtrackFragment=null);if(h&&this.isLoopLoading(h,u)){if(!h.gap){const e=this.audioOnly&&!this.altAudio?zb:jb,t=(e===jb?this.videoBuffer:this.mediaBuffer)||this.media;t&&this.afterBufferFlushed(t,e,cb)}h=this.getNextFragmentLoopLoading(h,l,s,cb,d)}h&&(this.exceedsMaxBuffer(s,d,h)||(!h.initSegment||h.initSegment.data||this.bitrateTest||(h=h.initSegment),this.loadFragment(h,n,u)))}loadFragment(e,t,i){const r=this.fragmentTracker.getState(e);r===RS||r===LS?qb(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,i):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,cb)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){if(this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY),0!==this.altAudio){var e;((null==(e=this.getLevelDetails())?void 0:e.fragmentStart)||0)>this.lastCurrentTime&&super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio")}}nextLevelSwitch(){const{levels:e,media:t}=this;if(null!=t&&t.readyState){let i;const r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.start-1);const a=this.getLevelDetails();if(null!=a&&a.live){const e=this.getMainFwdBufferInfo();if(!e||e.len<2*a.targetduration)return}if(!t.paused&&e){const t=e[this.hls.nextLoadLevel],r=this.fragLastKbps;i=r&&this.fragCurrent?this.fragCurrent.duration*t.maxBitrate/(1e3*r)+1:0}else i=0;const n=this.getBufferedFrag(t.currentTime+i);if(n){const e=this.followingBufferedFrag(n);if(e){this.abortCurrentFrag();const t=e.maxStartPTS?e.maxStartPTS:e.start,i=e.duration,r=Math.max(n.end,t+Math.min(Math.max(i-this.config.maxFragLookUpTolerance,i*(this.couldBacktrack?.5:.125)),i*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(r,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case wT:case ST:case kT:case ET:case AT:this.state=bT}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,2===this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const i=t.media;fT(i,"playing",this.onMediaPlaying),fT(i,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:i}=this;i&&(gT(i,"playing",this.onMediaPlaying),gT(i,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t);!!t.transferMedia||(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(ab.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let i=!1,r=!1;for(let a=0;a<t.levels.length;a++){const e=t.levels[a].audioCodec;e&&(i=i||-1!==e.indexOf("mp4a.40.2"),r=r||-1!==e.indexOf("mp4a.40.5"))}this.audioCodecSwitch=i&&r&&!function(){var e;const t=tP();return"function"==typeof(null==t||null==(e=t.prototype)?void 0:e.changeType)}(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:i}=this;if(!i||this.state!==bT)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=_T)}onLevelLoaded(e,t){var i;const{levels:r,startFragRequested:a}=this,n=t.level,s=t.details,o=s.totalduration;if(!r)return void this.warn(`Levels were reset while loading level ${n}`);this.log(`Level ${n} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""}, cc [${s.startCC}, ${s.endCC}] duration:${o}`);const l=t.levelInfo,c=this.fragCurrent;!c||this.state!==ST&&this.state!==kT||c.level!==t.level&&c.loader&&this.abortCurrentFrag();let d=0;if(s.live||null!=(i=l.details)&&i.live){var u;if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;d=this.alignPlaylists(s,l.details,null==(u=this.levelLastLoaded)?void 0:u.details)}if(l.details=s,this.levelLastLoaded=l,a||this.setStartPosition(s,d),this.hls.trigger(ab.LEVEL_UPDATED,{details:s,level:n}),this.state===_T){if(this.waitForCdnTuneIn(s))return;this.state=bT}a&&s.live&&this.synchronizeToLiveEdge(s),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:i}=this;if(!i)return;const r=this.hls.liveSyncPosition,a=this.getLoadPosition(),n=e.fragmentStart,s=e.edge,o=a>=n-t.maxFragLookUpTolerance&&a<=s;if(null!==r&&i.duration>r&&(a<r||!o)){const n=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!o&&i.readyState<4||a<s-n)&&(this._hasEnoughToStart||(this.nextLoadPosition=r),i.readyState))if(this.warn(`Playback: ${a.toFixed(3)} is located too far from the end of live sliding playlist: ${s}, reset currentTime to : ${r.toFixed(3)}`),"buffered"===this.config.liveSyncMode){var l;const e=QS.bufferInfo(i,r,0);if(null==(l=e.buffered)||!l.length)return void(i.currentTime=r);if(e.start<=a)return void(i.currentTime=r);const{nextStart:t}=QS.bufferedInfo(e.buffered,a,0);t&&(i.currentTime=t)}else i.currentTime=r}}_handleFragmentLoadProgress(e){var t;const i=e.frag,{part:r,payload:a}=e,{levels:n}=this;if(!n)return void this.warn(`Levels were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);const s=n[i.level];if(!s)return void this.warn(`Level ${i.level} not found on progress`);const o=s.details;if(!o)return this.warn(`Dropping fragment ${i.sn} of level ${i.level} after level details were reset`),void this.fragmentTracker.removeFragment(i);const l=s.videoCodec,c=o.PTSKnown||!o.live,d=null==(t=i.initSegment)?void 0:t.data,u=this._getAudioCodec(s),h=this.transmuxer=this.transmuxer||new sA(this.hls,cb,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),p=r?r.index:-1,m=-1!==p,f=new JS(i.level,i.sn,i.stats.chunkCount,a.byteLength,p,m),g=this.initPTS[i.cc];h.push(a,d,u,l,i,r,o.totalduration,c,f,g)}onAudioTrackSwitching(e,t){const i=this.hls,r=0!==this.altAudio;if(oS(t.url,i))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const e=this.fragCurrent;e&&(this.log("Switching to main audio track, cancel main fragment load"),e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(r)return this.altAudio=0,this.fragmentTracker.removeAllFragments(),i.once(ab.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(ab.AUDIO_TRACK_SWITCHED,t)}),void i.trigger(ab.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});i.trigger(ab.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const i=oS(t.url,this.hls);if(i){const e=this.videoBuffer;e&&this.mediaBuffer!==e&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=e)}this.altAudio=i?2:0,this.tick()}onBufferCreated(e,t){const i=t.tracks;let r,a,n=!1;for(const s in i){const e=i[s];if("main"===e.id){if(a=s,r=e,"video"===s){const e=i[s];e&&(this.videoBuffer=e.buffer)}}else n=!0}n&&r?(this.log(`Alternate track found, use ${a}.buffered to schedule main fragment loading`),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:i,part:r}=t,a=i.type===cb;if(a){if(this.fragContextChanged(i))return this.warn(`Fragment ${i.sn}${r?" p: "+r.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}`),void(this.state===AT&&(this.state=bT));const e=r?r.stats:i.stats;this.fragLastKbps=Math.round(8*e.total/(e.buffering.end-e.loading.first)),qb(i)&&(this.fragPrevious=i),this.fragBufferedComplete(i,r)}const n=this.media;n&&(!this._hasEnoughToStart&&QS.getBuffered(n).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),a&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var i;if(t.fatal)this.state=IT;else switch(t.details){case rb.FRAG_GAP:case rb.FRAG_PARSING_ERROR:case rb.FRAG_DECRYPT_ERROR:case rb.FRAG_LOAD_ERROR:case rb.FRAG_LOAD_TIMEOUT:case rb.KEY_LOAD_ERROR:case rb.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(cb,t);break;case rb.LEVEL_LOAD_ERROR:case rb.LEVEL_LOAD_TIMEOUT:case rb.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==_T||(null==(i=t.context)?void 0:i.type)!==sb||(this.state=bT);break;case rb.BUFFER_ADD_CODEC_ERROR:case rb.BUFFER_APPEND_ERROR:if("main"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case rb.BUFFER_FULL_ERROR:if("main"!==t.parent)return;if(this.reduceLengthAndFlushBuffer(t)){!this.config.interstitialsController&&this.config.assetPlayerId?this._hasEnoughToStart=!0:this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}break;case rb.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}onFragLoadEmergencyAborted(){this.state=bT,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==zb||!this.altAudio){const e=(t===jb?this.videoBuffer:this.mediaBuffer)||this.media;e&&(this.afterBufferFlushed(e,t,cb),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,-1===this.level&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let i=this.startPosition;if(i>=0&&t<i){if(e.seeking)return void this.log(`could not seek to ${i}, already seeking at ${t}`);const r=this.timelineOffset;r&&i&&(i+=r);const a=this.getLevelDetails(),n=QS.getBuffered(e),s=n.length?n.start(0):0,o=s-i,l=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||o>0&&(o<l||this.loadingParts&&o<2*((null==a?void 0:a.partTarget)||0)))&&(this.log(`adjusting start position by ${o} to match buffer start`),i+=o,this.startPosition=i),t<i&&(this.log(`seek to target start position ${i} from current time ${t} buffer start ${s}`),e.currentTime=i)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(e=>{const{hls:i}=this,r=null==e?void 0:e.frag;if(!r||this.fragContextChanged(r))return;t.fragmentError=0,this.state=bT,this.startFragRequested=!1,this.bitrateTest=!1;const a=r.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),i.trigger(ab.FRAG_LOADED,e),r.bitrateTest=!1}).catch(t=>{this.state!==vT&&this.state!==IT&&(this.warn(t),this.resetFragmentLoading(e))})}_handleTransmuxComplete(e){const t=this.playlistType,{hls:i}=this,{remuxResult:r,chunkMeta:a}=e,n=this.getCurrentContext(a);if(!n)return void this.resetWhenMissingContext(a);const{frag:s,part:o,level:l}=n,{video:c,text:d,id3:u,initSegment:h}=r,{details:p}=l,m=this.altAudio?void 0:r.audio;if(this.fragContextChanged(s))this.fragmentTracker.removeFragment(s);else{if(this.state=ET,h){const e=h.tracks;if(e){const r=s.initSegment||s;if(this.unhandledEncryptionError(h,s))return;this._bufferInitSegment(l,e,r,a),i.trigger(ab.FRAG_PARSING_INIT_SEGMENT,{frag:r,id:t,tracks:e})}const r=h.initPTS,n=h.timescale,o=this.initPTS[s.cc];if(Zv(r)&&(!o||o.baseTime!==r||o.timescale!==n)){const e=h.trackId;this.initPTS[s.cc]={baseTime:r,timescale:n,trackId:e},i.trigger(ab.INIT_PTS_FOUND,{frag:s,id:t,initPTS:r,timescale:n,trackId:e})}}if(c&&p){m&&"audiovideo"===c.type&&this.logMuxedErr(s);const e=p.fragments[s.sn-1-p.startSN],t=s.sn===p.startSN,i=!e||s.cc>e.cc;if(!1!==r.independent){const{startPTS:e,endPTS:r,startDTS:n,endDTS:l}=c;if(o)o.elementaryStreams[c.type]={startPTS:e,endPTS:r,startDTS:n,endDTS:l};else if(c.firstKeyFrame&&c.independent&&1===a.id&&!i&&(this.couldBacktrack=!0),c.dropped&&c.independent){const a=this.getMainFwdBufferInfo(),n=(a?a.end:this.getLoadPosition())+this.config.maxBufferHole,o=c.firstKeyFramePTS?c.firstKeyFramePTS:e;if(!t&&n<o-this.config.maxBufferHole&&!i)return void this.backtrack(s);i&&(s.gap=!0),s.setElementaryStreamInfo(c.type,s.start,r,s.start,l,!0)}else t&&e-(p.appliedTimelineOffset||0)>2&&(s.gap=!0);s.setElementaryStreamInfo(c.type,e,r,n,l),this.backtrackFragment&&(this.backtrackFragment=s),this.bufferFragmentData(c,s,o,a,t||i)}else{if(!t&&!i)return void this.backtrack(s);s.gap=!0}}if(m){const{startPTS:e,endPTS:t,startDTS:i,endDTS:r}=m;o&&(o.elementaryStreams[zb]={startPTS:e,endPTS:t,startDTS:i,endDTS:r}),s.setElementaryStreamInfo(zb,e,t,i,r),this.bufferFragmentData(m,s,o,a)}if(p&&null!=u&&u.samples.length){const e={id:t,frag:s,details:p,samples:u.samples};i.trigger(ab.FRAG_PARSING_METADATA,e)}if(p&&d){const e={id:t,frag:s,details:p,samples:d.samples};i.trigger(ab.FRAG_PARSING_USERDATA,e)}}}logMuxedErr(e){this.warn(`${qb(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,i,r){if(this.state!==ET)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(i));const{audio:a,video:n,audiovideo:s}=t;if(a){const i=e.audioCodec;let r=xw(a.codec,i);"mp4a"===r&&(r="mp4a.40.5");const n=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){r&&(r=-1!==r.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5");const e=a.metadata;e&&"channelCount"in e&&1!==(e.channelCount||1)&&-1===n.indexOf("firefox")&&(r="mp4a.40.5")}r&&-1!==r.indexOf("mp4a.40.5")&&-1!==n.indexOf("android")&&"audio/mpeg"!==a.container&&(r="mp4a.40.2",this.log(`Android: force audio codec to ${r}`)),i&&i!==r&&this.log(`Swapping manifest audio codec "${i}" for "${r}"`),a.levelCodec=r,a.id=cb,this.log(`Init audio buffer, container:${a.container}, codecs[selected/level/parsed]=[${r||""}/${i||""}/${a.codec}]`),delete t.audiovideo}if(n){n.levelCodec=e.videoCodec,n.id=cb;const i=n.codec;if(4===(null==i?void 0:i.length))switch(i){case"hvc1":case"hev1":n.codec="hvc1.1.6.L120.90";break;case"av01":n.codec="av01.0.04M.08";break;case"avc1":n.codec="avc1.42e01e"}this.log(`Init video buffer, container:${n.container}, codecs[level/parsed]=[${e.videoCodec||""}/${i}]${n.codec!==i?" parsed-corrected="+n.codec:""}${n.supplemental?" supplemental="+n.supplemental:""}`),delete t.audiovideo}s&&(this.log(`Init audiovideo buffer, container:${s.container}, codecs[level/parsed]=[${e.codecs}/${s.codec}]`),delete t.video,delete t.audio);const o=Object.keys(t);if(o.length){if(this.hls.trigger(ab.BUFFER_CODECS,t),!this.hls)return;o.forEach(e=>{const a=t[e].initSegment;null!=a&&a.byteLength&&this.hls.trigger(ab.BUFFER_APPENDING,{type:e,data:a,frag:i,part:null,chunkMeta:r,parent:i.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&2===this.altAudio?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,cb)}get maxBufferLength(){const{levels:e,level:t}=this,i=null==e?void 0:e[t];return i?this.getMaxBufferLength(i.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=bT}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&!1===e.seeking){const i=e.currentTime;if(QS.isBuffered(e,i)?t=this.getAppendedFrag(i):QS.isBuffered(e,i+.1)&&(t=this.getAppendedFrag(i+.1)),t){this.backtrackFragment=null;const e=this.fragPlaying,i=t.level;e&&t.sn===e.sn&&e.level===i||(this.fragPlaying=t,this.hls.trigger(ab.FRAG_CHANGED,{frag:t}),e&&e.level===i||this.hls.trigger(ab.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=(null==(e=this.media)?void 0:e.currentTime)||this.lastCurrentTime;return Zv(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=(null==(e=this.media)?void 0:e.currentTime)||this.lastCurrentTime;if(Zv(t)){const e=this.getLevelDetails(),i=this.currentFrag||(e?cS(null,e.fragments,t):null);if(i){const e=i.programDateTime;if(null!==e){const r=e+1e3*(t-i.start);return new Date(r)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class aP extends vb{constructor(e,t){super("key-loader",t),this.config=void 0,this.keyIdToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const i in this.keyIdToKeyInfo){const r=this.keyIdToKeyInfo[i].loader;if(r){var t;if(e&&e!==(null==(t=r.context)?void 0:t.frag.type))return;r.abort()}}}detach(){for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyIdToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e].loader;t&&t.destroy()}this.keyIdToKeyInfo={}}createKeyLoadError(e,t=rb.KEY_LOAD_ERROR,i,r,a){return new KS({type:ib.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:a,error:i,networkDetails:r})}loadClear(e,t,i){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length)for(let r=0,a=t.length;r<a;r++){const n=t[r];if(e.cc<=n.cc&&(!qb(e)||!qb(n)||e.sn<n.sn)||!i&&r==a-1)return this.emeController.selectKeySystemFormat(n).then(e=>{if(!this.emeController)return;n.setKeyFormat(e);const t=Ak(e);return t?this.emeController.getKeySystemAccess([t]):void 0})}if(this.config.requireKeySystemAccessOnStart){const e=Ik(this.config);if(e.length)return this.emeController.getKeySystemAccess(e)}}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var i,r;t&&e.setKeyFormat(t);const a=e.decryptdata;if(!a){const i=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:`Missing decryption data on fragment in onKeyLoading (emeEnabled with controller: ${this.emeController&&this.config.emeEnabled})`);return Promise.reject(this.createKeyLoadError(e,rb.KEY_LOAD_ERROR,i))}const n=a.uri;if(!n)return Promise.reject(this.createKeyLoadError(e,rb.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${n}"`)));const s=nP(a);let o=this.keyIdToKeyInfo[s];if(null!=(i=o)&&i.decryptdata.key)return a.key=o.decryptdata.key,Promise.resolve({frag:e,keyInfo:o});if(this.emeController&&null!=(r=o)&&r.keyLoadPromise){switch(this.emeController.getKeyStatus(o.decryptdata)){case"usable":case"usable-in-future":return o.keyLoadPromise.then(t=>{const{keyInfo:i}=t;return a.key=i.decryptdata.key,{frag:e,keyInfo:i}})}}switch(this.log(`${this.keyIdToKeyInfo[s]?"Rel":"L"}oading${a.keyId?" keyId: "+Pb(a.keyId):""} URI: ${a.uri} from ${e.type} ${e.level}`),o=this.keyIdToKeyInfo[s]={decryptdata:a,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},a.method){case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===a.keyFormat?this.loadKeyHTTP(o,e):this.loadKeyEME(o,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(o,e);default:return Promise.reject(this.createKeyLoadError(e,rb.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${a.method}"`)))}}loadKeyEME(e,t){const i={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var r;if(!e.decryptdata.keyId&&null!=(r=t.initSegment)&&r.data){const i=function(e){const t=[];return dw(e,e=>t.push(e.subarray(8,24))),t}(t.initSegment.data);if(i.length){let t=i[0];t.some(e=>0!==e)?(this.log(`Using keyId found in init segment ${Pb(t)}`),Lk.setKeyIdForUri(e.decryptdata.uri,t)):(t=Lk.addKeyIdForUri(e.decryptdata.uri),this.log(`Generating keyId to patch media ${Pb(t)}`)),e.decryptdata.keyId=t}}if(!e.decryptdata.keyId&&!qb(t))return Promise.resolve(i);const a=this.emeController.loadKey(i);return(e.keyLoadPromise=a.then(t=>(e.mediaKeySessionContext=t,i))).catch(i=>{throw e.keyLoadPromise=null,"data"in i&&(i.data.frag=t),i})}return Promise.resolve(i)}loadKeyHTTP(e,t){const i=this.config,r=new(0,i.loader)(i);return t.keyLoader=e.loader=r,e.keyLoadPromise=new Promise((a,n)=>{const s={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},o=i.keyLoadPolicy.default,l={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},c={onSuccess:(e,t,i,r)=>{const{frag:s,keyInfo:o}=i,l=nP(o.decryptdata);if(!s.decryptdata||o!==this.keyIdToKeyInfo[l])return n(this.createKeyLoadError(s,rb.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),r));o.decryptdata.key=s.decryptdata.key=new Uint8Array(e.data),s.keyLoader=null,o.loader=null,a({frag:s,keyInfo:o})},onError:(e,i,r,a)=>{this.resetLoader(i),n(this.createKeyLoadError(t,rb.KEY_LOAD_ERROR,new Error(`HTTP Error ${e.code} loading key ${e.text}`),r,yb({url:s.url,data:void 0},e)))},onTimeout:(e,i,r)=>{this.resetLoader(i),n(this.createKeyLoadError(t,rb.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),r))},onAbort:(e,i,r)=>{this.resetLoader(i),n(this.createKeyLoadError(t,rb.INTERNAL_ABORTED,new Error("key loading aborted"),r))}};r.load(s,l,c)})}resetLoader(e){const{frag:t,keyInfo:i,url:r}=e,a=i.loader;t.keyLoader===a&&(t.keyLoader=null,i.loader=null);const n=nP(i.decryptdata)||r;delete this.keyIdToKeyInfo[n],a&&a.destroy()}}function nP(e){if(e.keyFormat!==kk){const t=e.keyId;if(t)return Pb(t)}return e.uri}function sP(e){const{type:t}=e;switch(t){case ob:return db;case lb:return ub;default:return cb}}function oP(e,t){let i=e.url;return void 0!==i&&0!==i.indexOf("data:")||(i=t.url),i}class lP{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.on(ab.LEVEL_LOADING,this.onLevelLoading,this),e.on(ab.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(ab.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(ab.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(ab.MANIFEST_LOADING,this.onManifestLoading,this),e.off(ab.LEVEL_LOADING,this.onLevelLoading,this),e.off(ab.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(ab.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(ab.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,i=t.pLoader,r=t.loader,a=new(i||r)(t);return this.loaders[e.type]=a,a}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:i}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:nb,url:i,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:i,level:r,pathwayId:a,url:n,deliveryDirectives:s,levelInfo:o}=t;this.load({id:i,level:r,pathwayId:a,responseType:"text",type:sb,url:n,deliveryDirectives:s,levelOrTrack:o})}onAudioTrackLoading(e,t){const{id:i,groupId:r,url:a,deliveryDirectives:n,track:s}=t;this.load({id:i,groupId:r,level:null,responseType:"text",type:ob,url:a,deliveryDirectives:n,levelOrTrack:s})}onSubtitleTrackLoading(e,t){const{id:i,groupId:r,url:a,deliveryDirectives:n,track:s}=t;this.load({id:i,groupId:r,level:null,responseType:"text",type:lb,url:a,deliveryDirectives:n,levelOrTrack:s})}onLevelsUpdated(e,t){const i=this.loaders[sb];if(i){const e=i.context;e&&!t.levels.some(t=>t===e.levelOrTrack)&&(i.abort(),delete this.loaders[sb])}}load(e){var t;const i=this.hls.config;let r,a=this.getInternalLoader(e);if(a){const t=this.hls.logger,i=a.context;if(i&&i.levelOrTrack===e.levelOrTrack&&(i.url===e.url||i.deliveryDirectives&&!e.deliveryDirectives))return void(i.url===e.url?t.log(`[playlist-loader]: ignore ${e.url} ongoing request`):t.log(`[playlist-loader]: ignore ${e.url} in favor of ${i.url}`));t.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),a.abort()}if(r=e.type===nb?i.manifestLoadPolicy.default:fb({},i.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),a=this.createInternalLoader(e),Zv(null==(t=e.deliveryDirectives)?void 0:t.part)){let t;if(e.type===sb&&null!==e.level?t=this.hls.levels[e.level].details:e.type===ob&&null!==e.id?t=this.hls.audioTracks[e.id].details:e.type===lb&&null!==e.id&&(t=this.hls.subtitleTracks[e.id].details),t){const e=t.partTarget,i=t.targetduration;if(e&&i){const t=1e3*Math.max(3*e,.8*i);r=fb({},r,{maxTimeToFirstByteMs:Math.min(t,r.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(t,r.maxTimeToFirstByteMs)})}}}const n=r.errorRetry||r.timeoutRetry||{},s={loadPolicy:r,timeout:r.maxLoadTimeMs,maxRetry:n.maxNumRetry||0,retryDelay:n.retryDelayMs||0,maxRetryDelay:n.maxRetryDelayMs||0},o={onSuccess:(e,t,i,r)=>{const a=this.getInternalLoader(i);this.resetInternalLoader(i.type);const n=e.data;t.parsing.start=performance.now(),Bk.isMediaPlaylist(n)||i.type!==nb?this.handleTrackOrLevelPlaylist(e,t,i,r||null,a):this.handleMasterPlaylist(e,t,i,r)},onError:(e,t,i,r)=>{this.handleNetworkError(t,i,!1,e,r)},onTimeout:(e,t,i)=>{this.handleNetworkError(t,i,!0,void 0,e)}};a.load(e,s,o)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:i}=this.hls;(e||i)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,i,r){const a=this.hls,n=e.data,s=oP(e,i),o=Bk.parseMasterPlaylist(n,s);if(o.playlistParsingError)return t.parsing.end=performance.now(),void this.handleManifestParsingError(e,i,o.playlistParsingError,r,t);const{contentSteering:l,levels:c,sessionData:d,sessionKeys:u,startTimeOffset:h,variableList:p}=o;this.variableList=p,c.forEach(e=>{const{unknownCodecs:t}=e;if(t){const{preferManagedMediaSource:i}=this.hls.config;let{audioCodec:r,videoCodec:a}=e;for(let n=t.length;n--;){const s=t[n];Tw(s,"audio",i)?(e.audioCodec=r=r?`${r},${s}`:s,Sw.audio[r.substring(0,4)]=2,t.splice(n,1)):Tw(s,"video",i)&&(e.videoCodec=a=a?`${a},${s}`:s,Sw.video[a.substring(0,4)]=2,t.splice(n,1))}}});const{AUDIO:m=[],SUBTITLES:f,"CLOSED-CAPTIONS":g}=Bk.parseMasterPlaylistMedia(n,s,o);if(m.length){m.some(e=>!e.url)||!c[0].audioCodec||c[0].attrs.AUDIO||(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),m.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new sk({}),bitrate:0,url:""}))}a.trigger(ab.MANIFEST_LOADED,{levels:c,audioTracks:m,subtitles:f,captions:g,contentSteering:l,url:s,stats:t,networkDetails:r,sessionData:d,sessionKeys:u,startTimeOffset:h,variableList:p})}handleTrackOrLevelPlaylist(e,t,i,r,a){const n=this.hls,{id:s,level:o,type:l}=i,c=oP(e,i),d=Zv(o)?o:Zv(s)?s:0,u=sP(i),h=Bk.parseLevelPlaylist(e.data,c,d,u,0,this.variableList);if(l===nb){const e={attrs:new sk({}),bitrate:0,details:h,name:"",url:c};h.requestScheduled=t.loading.start+rT(h,0),n.trigger(ab.MANIFEST_LOADED,{levels:[e],audioTracks:[],url:c,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),i.levelDetails=h,this.handlePlaylistLoaded(h,e,t,i,r,a)}handleManifestParsingError(e,t,i,r,a){this.hls.trigger(ab.ERROR,{type:ib.NETWORK_ERROR,details:rb.MANIFEST_PARSING_ERROR,fatal:t.type===nb,url:e.url,err:i,error:i,reason:i.message,response:e,context:t,networkDetails:r,stats:a})}handleNetworkError(e,t,i=!1,r,a){let n=`A network ${i?"timeout":"error"+(r?" (status "+r.code+")":"")} occurred while loading ${e.type}`;e.type===sb?n+=`: ${e.level} id: ${e.id}`:e.type!==ob&&e.type!==lb||(n+=` id: ${e.id} group-id: "${e.groupId}"`);const s=new Error(n);this.hls.logger.warn(`[playlist-loader]: ${n}`);let o=rb.UNKNOWN,l=!1;const c=this.getInternalLoader(e);switch(e.type){case nb:o=i?rb.MANIFEST_LOAD_TIMEOUT:rb.MANIFEST_LOAD_ERROR,l=!0;break;case sb:o=i?rb.LEVEL_LOAD_TIMEOUT:rb.LEVEL_LOAD_ERROR,l=!1;break;case ob:o=i?rb.AUDIO_TRACK_LOAD_TIMEOUT:rb.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case lb:o=i?rb.SUBTITLE_TRACK_LOAD_TIMEOUT:rb.SUBTITLE_LOAD_ERROR,l=!1}c&&this.resetInternalLoader(e.type);const d={type:ib.NETWORK_ERROR,details:o,fatal:l,url:e.url,loader:c,context:e,error:s,networkDetails:t,stats:a};if(r){const i=(null==t?void 0:t.url)||e.url;d.response=yb({url:i,data:void 0},r)}this.hls.trigger(ab.ERROR,d)}handlePlaylistLoaded(e,t,i,r,a,n){const s=this.hls,{type:o,level:l,levelOrTrack:c,id:d,groupId:u,deliveryDirectives:h}=r,p=oP(t,r),m=sP(r);let f="number"==typeof r.level&&m===cb?l:void 0;const g=e.playlistParsingError;if(g){if(this.hls.logger.warn(`${g} ${e.url}`),!s.config.ignorePlaylistParsingErrors)return void s.trigger(ab.ERROR,{type:ib.NETWORK_ERROR,details:rb.LEVEL_PARSING_ERROR,fatal:!1,url:p,error:g,reason:g.message,response:t,context:r,level:f,parent:m,networkDetails:a,stats:i});e.playlistParsingError=null}if(!e.fragments.length){const n=e.playlistParsingError=new Error("No Segments found in Playlist");return void s.trigger(ab.ERROR,{type:ib.NETWORK_ERROR,details:rb.LEVEL_EMPTY_ERROR,fatal:!1,url:p,error:n,reason:n.message,response:t,context:r,level:f,parent:m,networkDetails:a,stats:i})}switch(e.live&&n&&(n.getCacheAge&&(e.ageHeader=n.getCacheAge()||0),n.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),o){case nb:case sb:if(f)if(c){if(c!==s.levels[f]){const e=s.levels.indexOf(c);e>-1&&(f=e)}}else f=0;s.trigger(ab.LEVEL_LOADED,{details:e,levelInfo:c||s.levels[0],level:f||0,id:d||0,stats:i,networkDetails:a,deliveryDirectives:h,withoutMultiVariant:o===nb});break;case ob:s.trigger(ab.AUDIO_TRACK_LOADED,{details:e,track:c,id:d||0,groupId:u||"",stats:i,networkDetails:a,deliveryDirectives:h});break;case lb:s.trigger(ab.SUBTITLE_TRACK_LOADED,{details:e,track:c,id:d||0,groupId:u||"",stats:i,networkDetails:a,deliveryDirectives:h})}}}class cP{static get version(){return NT}static isMSESupported(){return iP()}static isSupported(){return function(){if(!iP())return!1;const e=Ab();return"function"==typeof(null==e?void 0:e.isTypeSupported)&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(t=>e.isTypeSupported(Aw(t,"video")))||["mp4a.40.2","fLaC"].some(t=>e.isTypeSupported(Aw(t,"audio"))))}()}static getMediaSource(){return Ab()}static get Events(){return ab}static get MetadataSchema(){return nE}static get ErrorTypes(){return ib}static get ErrorDetails(){return rb}static get DefaultConfig(){return cP.defaultConfig?cP.defaultConfig:jI}static set DefaultConfig(e){cP.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new OT,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;const t=this.logger=function(e,t,i){const r=Sb();if("object"==typeof console&&!0===e||"object"==typeof e){const n=["debug","log","info","warn","error"];n.forEach(t=>{r[t]=kb(t,e,i)});try{r.log(`Debug logs enabled for "${t}" in hls.js version 1.6.16`)}catch(a){return Sb()}n.forEach(t=>{Tb[t]=kb(t,e)})}else fb(Tb,r);return r}(e.debug||!1,"Hls instance",e.assetPlayerId),i=this.config=function(e,t,i){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const r=$I(e),a=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach(e=>{const n=`${"level"===e?"playlist":e}LoadPolicy`,s=void 0===t[n],o=[];a.forEach(i=>{const a=`${e}Loading${i}`,l=t[a];if(void 0!==l&&s){o.push(a);const e=r[n].default;switch(t[n]={default:e},i){case"TimeOut":e.maxLoadTimeMs=l,e.maxTimeToFirstByteMs=l;break;case"MaxRetry":e.errorRetry.maxNumRetry=l,e.timeoutRetry.maxNumRetry=l;break;case"RetryDelay":e.errorRetry.retryDelayMs=l,e.timeoutRetry.retryDelayMs=l;break;case"MaxRetryTimeout":e.errorRetry.maxRetryDelayMs=l,e.timeoutRetry.maxRetryDelayMs=l}}}),o.length&&i.warn(`hls.js config: "${o.join('", "')}" setting(s) are deprecated, use "${n}": ${Zw(t[n])}`)}),yb(yb({},r),t)}(cP.DefaultConfig,e,t);this.userConfig=e,i.progressive&&GI(i,t);const{abrController:r,bufferController:a,capLevelController:n,errorController:s,fpsController:o}=i,l=new s(this),c=this.abrController=new r(this),d=new MS(this),u=i.interstitialsController,h=u?this.interstitialsController=new u(this,cP):null,p=this.bufferController=new a(this,d),m=this.capLevelController=new n(this),f=new o(this),g=new lP(this),y=i.contentSteeringController,v=y?new y(this):null,b=this.levelController=new ZI(this,v),w=new XI(this),S=new aP(this.config,this.logger),k=this.streamController=new rP(this,d,S),T=this.gapController=new qI(this,d);m.setStreamController(k),f.setStreamController(k);const E=[g,b,k];h&&E.splice(1,0,h),v&&E.splice(1,0,v),this.networkControllers=E;const A=[c,p,T,m,f,w,d];this.audioTrackController=this.createController(i.audioTrackController,E);const C=i.audioStreamController;C&&E.push(this.audioStreamController=new C(this,d,S)),this.subtitleTrackController=this.createController(i.subtitleTrackController,E);const I=i.subtitleStreamController;I&&E.push(this.subtititleStreamController=new I(this,d,S)),this.createController(i.timelineController,A),S.emeController=this.emeController=this.createController(i.emeController,A),this.cmcdController=this.createController(i.cmcdController,A),this.latencyController=this.createController(QI,A),this.coreComponents=A,E.push(l);const P=l.onErrorOut;"function"==typeof P&&this.on(ab.ERROR,P,l),this.on(ab.MANIFEST_LOADED,g.onManifestLoaded,g)}createController(e,t){if(e){const i=new e(this);return t&&t.push(i),i}return null}on(e,t,i=this){this._emitter.on(e,t,i)}once(e,t,i=this){this._emitter.once(e,t,i)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,i=this,r){this._emitter.off(e,t,i,r)}listeners(e){return this._emitter.listeners(e)}emit(e,t,i){return this._emitter.emit(e,t,i)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(i){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+i.message+'". Here is a stacktrace:',i),!this.triggeringException){this.triggeringException=!0;const t=e===ab.ERROR;this.trigger(ab.ERROR,{type:ib.OTHER_ERROR,details:rb.INTERNAL_EXCEPTION,fatal:t,event:e,error:i}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(ab.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(e=>e.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(e=>e.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const t=new Error(`attachMedia failed: invalid argument (${e})`);return void this.trigger(ab.ERROR,{type:ib.OTHER_ERROR,details:rb.ATTACH_MEDIA_ERROR,fatal:!0,error:t})}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,i=t?e.media:e,r=t?e:{media:i};this._media=i,this.trigger(ab.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(ab.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(ab.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,i=this._url,r=this._url=Ub.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${r}`),t&&i&&(i!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(ab.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let i=0;i<this.networkControllers.length&&(this.networkControllers[i].startLoad(e,t),this.started&&this.networkControllers);i++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!this.started&&this.networkControllers);e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[cb]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[db]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[ub]=this.subtititleStreamController.inFlightFrag),e}swapAudioCodec(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){this.logger.log("recoverMediaError");const e=this._media,t=null==e?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),t&&this.startLoad(t))}removeLevel(e){this.levelController.removeLevel(e)}get sessionId(){let e=this._sessionId;return e||(e=this._sessionId=function(){try{return crypto.randomUUID()}catch(e){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(t){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)})}}}()),e}get levels(){const e=this.levelController.levels;return e||[]}get latestLevelDetails(){return this.streamController.getLevelDetails()||null}get loadLevelObj(){return this.levelController.loadLevelObj}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return-1===e&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get abrEwmaDefaultEstimate(){const{bwEstimator:e}=this.abrController;return e?e.defaultEstimate:NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){(function(e){return Gw.indexOf(e)>-1})(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return-1===this.levelController.manualLevel}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const i=e.length;for(let r=0;r<i;r++)if(e[r].maxBitrate>=t)return r;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:i}=this;let r;if(r=-1===t&&null!=e&&e.length?e.length-1:t,i)for(let a=r;a--;){const t=e[a].attrs["HDCP-LEVEL"];if(t&&t<=i)return a}return r}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return(null==(t=this.audioTrackController)?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return(null==(t=this.subtitleTrackController)?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return!!e&&e.subtitleDisplay}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!(null==(e=this.bufferController)||!e.bufferedToEnd)}get interstitialsManager(){var e;return(null==(e=this.interstitialsController)?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){return zw(e,tS(t),navigator.mediaCapabilities)}}function dP(e){var t,i;const r=(null==(i=null==(t=window.__APP_CONFIG__)?void 0:t.encryption)?void 0:i.hlsAesKey)||"";if(!r)return e;const a=fh.enc.Utf8.parse(r),n=function(e){const t=new Uint8Array(e),i=[];for(let r=0;r<t.length;r++)i[r>>>2]|=t[r]<<24-r%4*8;return fh.lib.WordArray.create(i,t.length)}(e);return function(e){const t=e.sigBytes,i=new Uint8Array(t);for(let r=0;r<t;r++)i[r]=e.words[r>>>2]>>>24-r%4*8&255;return i.buffer}(fh.AES.decrypt(fh.lib.CipherParams.create({ciphertext:n}),a,{mode:fh.mode.ECB,padding:fh.pad.Pkcs7}))}cP.defaultConfig=void 0;class uP{constructor(e){t(this,"xhr",null),t(this,"context",null),t(this,"stats",{aborted:!1,loaded:0,retry:0,total:0,chunkCount:0,bwEstimate:0,loading:{start:0,first:0,end:0},parsing:{start:0,end:0},buffering:{start:0,first:0,end:0}})}load(e,t,i){var r;this.context=e,this.stats.aborted=!1,this.stats.loaded=0,this.stats.total=0,this.stats.loading.start=self.performance.now(),this.stats.loading.first=0,this.stats.loading.end=0;const a=new XMLHttpRequest;this.xhr=a;const n=()=>this.xhr===a&&!this.stats.aborted,s=!!e.frag;a.open("GET",e.url,!0),a.responseType=s?"arraybuffer":"text",void 0!==e.rangeStart&&void 0!==e.rangeEnd&&e.rangeEnd>e.rangeStart&&a.setRequestHeader("Range",`bytes=${e.rangeStart}-${e.rangeEnd-1}`);const o=null==(r=t.loadPolicy)?void 0:r.default,l=(null==o?void 0:o.maxTimeToFirstByteMs)||(null==o?void 0:o.maxLoadTimeMs)||t.timeout||2e4;a.timeout=l,a.onprogress=t=>{const r=t.loaded,n=t.lengthComputable?t.total:-1;this.stats.loaded=r,this.stats.total=n,i.onProgress&&i.onProgress({loaded:r,total:n,lengthComputable:t.lengthComputable},this.stats,e,a)},a.onload=()=>{var t;if(n())if(this.stats.loading.end=self.performance.now(),a.status>=200&&a.status<300){let n=a.response;if(this.stats.loaded="string"==typeof n?n.length:n.byteLength,this.stats.total=this.stats.loaded,s&&n instanceof ArrayBuffer){e.url,null==(t=e.frag)||t.sn;try{n=dP(n)}catch(r){throw r}}i.onSuccess({data:n,url:e.url,code:a.status},this.stats,e,a)}else i.onError({code:a.status,text:a.statusText},e,a,this.stats)},a.onerror=()=>{n()&&(this.stats.loading.end=self.performance.now(),i.onError({code:a.status||0,text:"Network error"},e,a,this.stats))},a.onabort=()=>{var t;this.stats.aborted=!0,this.stats.loading.end=self.performance.now(),null==(t=i.onAbort)||t.call(i,this.stats,e,a)},a.ontimeout=()=>{n()&&(this.stats.loading.end=self.performance.now(),i.onTimeout(this.stats,e,a))},a.onloadstart=()=>{this.stats.loading.first=self.performance.now()},a.send()}abort(){this.xhr&&(this.stats.aborted=!0,this.xhr.abort(),this.xhr=null)}destroy(){this.abort(),this.xhr=null}}function hP(){var e;const t=null==(e=window.__APP_CONFIG__)?void 0:e.hls;return{enableWorker:(null==t?void 0:t.enableWorker)??!0,startPosition:(null==t?void 0:t.startPosition)??0,maxBufferLength:(null==t?void 0:t.maxBufferLength)??60,maxBufferHole:(null==t?void 0:t.maxBufferHole)??.5,startFragPrefetch:(null==t?void 0:t.startFragPrefetch)??!0,maxMaxBufferLength:(null==t?void 0:t.maxMaxBufferLength)??60,abrEwmaDefaultEstimate:(null==t?void 0:t.abrEwmaDefaultEstimate)??5e5,abrBandWidthFactor:(null==t?void 0:t.abrBandWidthFactor)??.8}}const pP=e=>!!e&&(e.endsWith(".m3u8")||e.includes(".m3u8"));function mP(e,t,i){if(pP(t)){if(!cP.isSupported())return null;const a=(r=null==i?void 0:i.hlsOverrides,new cP({loader:uP,fLoader:uP,...hP(),...r}));return(null==i?void 0:i.onError)&&a.on(cP.Events.ERROR,(e,t)=>{t.fatal&&i.onError(t)}),(null==i?void 0:i.onManifestLoaded)&&a.on(cP.Events.MANIFEST_LOADED,(e,t)=>{i.onManifestLoaded(t)}),(null==i?void 0:i.onKeyLoaded)&&a.on(cP.Events.KEY_LOADED,(e,t)=>{i.onKeyLoaded(t)}),a.attachMedia(e),a.loadSource(t),a}var r;return e.src=t,null}function fP(e){e&&(e.detachMedia(),e.destroy())}const gP={level:"avatar",currentUrl:"",isVideo:!1};function yP(e){const t=S(gP),i=u("avatar"),r=u("");let a=[],n=-1,s=null,o=!1;const c=P(()=>["intimacy","coverVideo","defaultVideo"].includes(i.value)),d=e=>{o||(t.value=e,i.value=e.level,r.value=e.currentUrl)},h=async()=>{const t=e.botId();if(!t)return void w();const{urls:i,poster:r}=await async function(e){const t=await AP(e),i=SP.get(e);if(i&&Date.now()-i.at<vP)return{urls:i.data,poster:t||i.poster};const r=await CP(e).catch(()=>({urls:[],poster:""}));return{urls:r.urls,poster:t||r.poster}}(t);o||(0!==i.length?(r&&(g.value={...g.value||{},imageUrl:r}),a=i.slice(),n=0,d({level:"intimacy",currentUrl:a[0],isVideo:!0})):w())},p=async()=>{var t,i;const r=e.botId();if(r)try{const e=await Qv.botDetail({userId:r});if(o)return;const a=null==e?void 0:e.coverMedia;if(null==(t=null==a?void 0:a.videoUrl)?void 0:t.trim())return g.value={videoUrl:a.videoUrl,imageUrl:a.imageUrl},void f();const n=(null==(i=null==a?void 0:a.imageUrl)?void 0:i.trim())||"";n&&(g.value={...g.value||{},imageUrl:n}),w()}catch{w()}else w()},m=()=>{0!==a.length&&(n=(n+1)%a.length,d({level:"intimacy",currentUrl:a[n],isVideo:!0}))},f=()=>{var t,i,r,a,n;const s=(null==(i=null==(t=g.value)?void 0:t.videoUrl)?void 0:i.trim())?g.value:null==(r=e.coverMedia)?void 0:r.call(e);(null==(a=null==s?void 0:s.videoUrl)?void 0:a.trim())?((null==(n=s.imageUrl)?void 0:n.trim())&&(g.value={...g.value||{},imageUrl:s.imageUrl}),d({level:"coverVideo",currentUrl:s.videoUrl.trim(),isVideo:!0})):w()},g=S(),y=()=>{var t,i,r,a,n;const s=(null==(i=null==(t=g.value)?void 0:t.imageUrl)?void 0:i.trim())||(null==(n=null==(a=null==(r=e.coverMedia)?void 0:r.call(e))?void 0:a.imageUrl)?void 0:n.trim())||"";s?d({level:"coverImage",currentUrl:s,isVideo:!1}):w()},v=()=>{var t;const i=null==(t=e.defaultVideo)?void 0:t.trim();if(!i)return w();d({level:"defaultVideo",currentUrl:i,isVideo:!0})},b=[],w=()=>{const e=b.shift();e?e():d(gP)},k=()=>{o||(fP(s),s=null,"intimacy"===i.value&&n<a.length-1?m():w())},T=()=>{o=!0,fP(s),s=null,a=[],n=-1,b.length=0,d(gP)};return l(T),{level:i,currentUrl:r,isVideo:c,state:t,posterUrl:P(()=>{var t,i,r,a;return(null==(t=g.value)?void 0:t.imageUrl)||(null==(a=null==(r=null==(i=e.coverMedia)?void 0:i.call(e))?void 0:r.imageUrl)?void 0:a.trim())||""}),start:()=>{o=!1,b.length=0,g.value=void 0,a=[],n=-1,b.push(f,p,v,y);const t=e.botId();if(t){const e=function(e){const t=TP.get(e);return t&&Date.now()-t.at<vP?t.url:""}(t);e&&(g.value={...g.value||{},imageUrl:e})}h()},cleanup:T,attachSource:e=>{fP(s),s=null,r.value&&(s=mP(e,r.value,{onError:()=>k()}),e.play().catch(()=>{}))},handleVideoError:k,handleVideoEnded:()=>{"intimacy"===i.value&&m()},isM3u8Url:pP}}const vP=3e5,bP=1,wP=5;const SP=new Map,kP=new Map,TP=new Map,EP=new Map;function AP(e){const t=TP.get(e);if(t&&Date.now()-t.at<vP)return Promise.resolve(t.url);if(!EP.has(e)){const t=Qv.botDetail({userId:e}).then(t=>{var i;const r=String((null==(i=null==t?void 0:t.coverMedia)?void 0:i.imageUrl)||"").trim();return TP.set(e,{url:r,at:Date.now()}),EP.delete(e),r}).catch(()=>(EP.delete(e),""));EP.set(e,t)}return EP.get(e)}function CP(e){const t=SP.get(e);if(t&&Date.now()-t.at<vP)return Promise.resolve({urls:t.data,poster:t.poster});if(!kP.has(e)){const t=Yv.getRandomVideos(e,function(){var e;const t=Number(null==(e=sd().appConfig)?void 0:e.coinDialogRandomVideoSize);return!Number.isInteger(t)||t<bP||t>wP?bP:t}()).then(t=>{var i;const r=Array.isArray(null==t?void 0:t.result)?t.result:[],a=function(e){return(Array.isArray(e)?e:Array.isArray(null==e?void 0:e.result)?e.result:[]).map(e=>String((null==e?void 0:e.videoUrl)||"").trim()).filter(e=>e&&!e.includes("{"))}(t),n=String((null==(i=r.find(e=>null==e?void 0:e.thumbnailUrl))?void 0:i.thumbnailUrl)||"").trim(),s={data:a,poster:n,at:Date.now()};return SP.set(e,s),kP.delete(e),{urls:a,poster:n}}).catch(t=>{throw kP.delete(e),t});kP.set(e,t)}return kP.get(e)}function IP(){const e=["UserCenter","UserCenterEdit","RechargeCenter"],t=["privacyPolicy","termsService","subscriptionPolicy","ipAccess"];id.beforeEach(async(i,r,a)=>{si.start();const n=hd();n.showVipDialog&&n.closeVipDialog(),n.showCoinCloseGuide&&n.closeCoinCloseGuide();const s=i.query.lang;if(s){const e=sd(),t=e.language;["en","es","pl","it","ro","fr","hi","ru","ja","zh_TW"].includes(s)&&s!==t&&(e.language=s,rc(Zl,"true"),rc("language",s),wc.global.locale.value=s)}const o=ng();try{o.isHasConfig||await o.getUserConfigData()}catch(d){}const l=sd().isIpAccess;if(l&&!t.includes(i.name))return si.done(),void a("/about/ipAccess");const c=ac(Hl);if((e.includes(i.name)||!0===i.meta.auth)&&!c&&!l)return si.done(),hd().showLoginDialog=!0,rc(Xl,i.fullPath),void(0===r.matched.length?a("/"):a(!1));try{const t=[];if(c&&!o.isHasUserInfo&&!l){o.hydrateUserInfoFromCache();const r=o.getUserInfo().catch(e=>{});(e.includes(i.name)||!0===i.meta.auth)&&t.push(r)}await Promise.all(t)}catch(d){}c&&o.isHasUserInfo&&!l&&(hd(),o.userInfo),a(),si.done()}),id.afterEach(e=>{const t=og();qv(e),t.setRoute(e),si.done(),Wv().catch(()=>{});!function(e){if(!e)return;const t=Number(e);CP(t).catch(()=>{}),AP(t).catch(()=>{})}(Number(e.query.id)||Number(e.params.id)||Number(e.params.userId)||0||void 0)})}const PP={async install(e){!function(e){e.use(Og)}(e);const t=window.__APP_CONFIG__;!function(e){var t;try{const i=null==(t=null==e?void 0:e.encryption)?void 0:t.noEncToken;if("string"!=typeof i||!i)return;const r=new URL(window.location.href);if(r.searchParams.get(pv)!==i)return;e.encryption.isEncrypt=!1,r.searchParams.delete(pv),window.history.replaceState(window.history.state,"",r.pathname+r.search+r.hash)}catch{}}(t);sd().appConfig=t,function(e){e.use(id)}(e),function(e){e.use(wc)}(e),function(e){Object.entries(Ng).forEach(([t,i])=>{e.component(t,i)})}(e),function(e){Object.entries(Fg).forEach(([t,i])=>{e.component(`ri-${t}`,i)})}(e),Tv(e),IP()}},_P=Nl.error,RP=["ERROR","Error","error","undefined","null","[object Object]"];function xP(e){if(!e)return!0;const t=String(e).trim();return!t||(!!RP.includes(t)||""===t.replace(/\s/g,""))}function LP(e){if("string"==typeof e){if(xP(e))return;return _P(e)}if("object"==typeof e&&null!==e){if(xP(e.message))return;return _P(e)}return _P(e)}!function(e){const t={cookieWhitelist:["_fbp","_fbc"],localStorageWhitelist:["hmserver_ic","hmserver_ac","hmserver_a","hmserver_fbp","hmserver_fbc","hmserver_fbclid","hmserver_gclid","hmserver_ttclid","hmserver_twclid","hmserver_utm_source","hmserver_utm_medium","hmserver_utm_campaign","hmserver_utm_term","hmserver_utm_content","hmserver_ref","hmserver_src","hmserver_channel","hmserver_aff_id","hmserver_aff_sub","hmserver_click_id"],queryWhitelist:["ic","ac","a","fbp","fbclid","gclid","ttclid","twclid","utm_source","utm_medium","utm_campaign","utm_term","utm_content","ref","src","channel","aff_id","aff_sub","click_id"],messageType:"CROSS_DOMAIN_SYNC_DATA"};function i(){const e={},t=document.cookie;return t?(t.split(";").forEach(t=>{const[i,r]=t.split("=").map(e=>e.trim());i&&(e[i]=decodeURIComponent(r||""))}),e):e}function r(e,t,i={}){let r=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(i.expires)if(i.expires instanceof Date)r+=`; expires=${i.expires.toUTCString()}`;else if("number"==typeof i.expires){const e=new Date;e.setTime(e.getTime()+24*i.expires*60*60*1e3),r+=`; expires=${e.toUTCString()}`}else"string"==typeof i.expires&&(r+=`; expires=${i.expires}`);i.path?r+=`; path=${i.path}`:r+="; path=/",i.domain&&(r+=`; domain=${i.domain}`),i.secure&&(r+="; secure"),i.sameSite&&(r+=`; samesite=${i.sameSite}`),document.cookie=r}function a(){const t={};return new URLSearchParams(e.location.search).forEach((e,i)=>{t[i]=e}),t}function n(){const r={cookies:{},localStorage:{},query:{}},n=i();t.cookieWhitelist.forEach(e=>{n.hasOwnProperty(e)&&(r.cookies[e]=n[e])}),t.localStorageWhitelist.forEach(t=>{try{const i=e.localStorage.getItem(t);null!==i&&(r.localStorage[t]=i)}catch(i){}});const s=a();return t.queryWhitelist.forEach(e=>{s.hasOwnProperty(e)&&(r.query[e]=s[e])}),r}function s(e,t){if(!t||0===Object.keys(t).length)return e;try{const i=new URL(e);return Object.keys(t).forEach(e=>{i.searchParams.set(e,t[e])}),i.toString()}catch(i){return e}}function o(i={}){const{callback:a,autoInit:n=!1,debounceTime:s=300,validateData:o=!0}="function"==typeof i?{callback:i}:i;let l=null;e.addEventListener("message",function(i){i.data&&i.data.type===t.messageType&&(l&&clearTimeout(l),l=setTimeout(()=>{try{const{cookies:n,localStorage:s}=i.data.data;if(o){if(n&&"object"!=typeof n)return;if(s&&"object"!=typeof s)return}n&&Object.keys(n).forEach(i=>{if(t.cookieWhitelist.includes(i)){r(i,n[i],{expires:365,path:"/",secure:"https:"===e.location.protocol,sameSite:"Lax"})}}),s&&Object.keys(s).forEach(i=>{if(t.localStorageWhitelist.includes(i))try{e.localStorage.setItem(i,s[i])}catch(r){}}),"function"==typeof a&&a(i.data.data)}catch(n){}},s))})}function l(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){o({autoInit:!0,debounceTime:300,validateData:!0,callback:function(e){}})}):o({autoInit:!0,debounceTime:300,validateData:!0,callback:function(e){}})}e.CrossDomainSync={config:t,syncToUrl:function(i,r={}){const{openInSelf:a=!0,windowName:o="_self",timeout:l=5e3}=r,c=n();let d=s(i,c.query);try{const i=new URL(d).origin,r=e.location.origin;if(i!==r&&"_self"===o){const t={c:c.cookies,l:c.localStorage},i=JSON.stringify(t),r=btoa(encodeURIComponent(i)),a=new URL(d);return a.searchParams.set("__sync_data__",r),d=a.toString(),void(e.location.href=d)}const a=e.open(d,o);if(!a)return;setTimeout(()=>{try{const e={type:t.messageType,data:{cookies:c.cookies,localStorage:c.localStorage},timestamp:Date.now()};a.postMessage(e,i)}catch(e){}},1e3),l>0&&setTimeout(()=>{},l)}catch(u){}},startReceiver:o,autoInitReceiver:l,utils:{parseCookies:i,setCookie:r,getQueryParams:a,collectSyncData:n,appendQueryParams:s}},function(){!function(){try{const i=new URLSearchParams(e.location.search),a=i.get("__sync_data__");if(a){const n=decodeURIComponent(atob(a)),s=JSON.parse(n);s.c&&"object"==typeof s.c&&Object.keys(s.c).forEach(i=>{t.cookieWhitelist.includes(i)&&r(i,s.c[i],{expires:365,path:"/",secure:"https:"===e.location.protocol,sameSite:"Lax"})}),s.l&&"object"==typeof s.l&&Object.keys(s.l).forEach(i=>{if(t.localStorageWhitelist.includes(i))try{e.localStorage.setItem(i,s.l[i])}catch(r){}}),i.delete("__sync_data__");const o=e.location.pathname+(i.toString()?"?"+i.toString():"")+e.location.hash;e.history.replaceState({},"",o)}}catch(i){}}();const i=document.currentScript;i&&"true"===i.getAttribute("data-auto-init")&&l()}()}(window);(async()=>{const e=fe(hv),t=hr();Nl.error=LP,Vc(),(()=>{var e;const t=Te.debounce(e=>{},500,{leading:!0,trailing:!1});(null==(e=window.CrossDomainSync)?void 0:e.startSyncReceiver)&&window.CrossDomainSync.startSyncReceiver(t,{allowedOrigins:["*"]})})(),(()=>{try{const e=new URLSearchParams(window.location.search);if("1"!==e.get("vconsole")&&"1"!==e.get("debug"))return;const t=document.createElement("script");t.src="/vendor/vconsole.min.js",t.onload=()=>{const e=window.VConsole;"function"==typeof e&&(window.__VCONSOLE__=new e)},t.onerror=()=>{},document.head.appendChild(t)}catch(e){}})(),function(){var e;try{const t=null==(e=window.__APP_CONFIG__)?void 0:e.pwa;if(!t||!t.name)return;const i=window.location.origin,r={id:`${i}/`,name:t.name,short_name:t.shortName||t.name,start_url:`${i}${t.startUrl||"/"}`,scope:`${i}/`,display:t.display||"standalone",background_color:t.backgroundColor||"#ffffff",theme_color:t.themeColor||"#ffffff",icons:t.icons||[]};r.icons.length;const a=new Blob([JSON.stringify(r)],{type:"application/manifest+json"}),n=document.createElement("link");n.rel="manifest",n.href=URL.createObjectURL(a),document.head.appendChild(n)}catch(t){}}(),await PP.install(e),e.use(t),await id.isReady(),e.mount("#app"),requestAnimationFrame(()=>{(()=>{if("undefined"==typeof document)return;const e=document.querySelector(".bootstrap-loading");e&&(e.remove(),document.documentElement.classList.add("bootstrap-live-hidden"),document.documentElement.classList.remove("bootstrap-live-route","bootstrap-live-has-avatar"))})();const e=()=>{Mf(window.__APP_CONFIG__||{}).catch(e=>{})};"requestIdleCallback"in window?window.requestIdleCallback(e,{timeout:1500}):setTimeout(e,0)})})();export{ls as $,Xl as A,Qv as B,fr as C,Py as D,pr as E,ha as F,Kl as G,cP as H,gr as I,ca as J,ln as K,Ul as L,En as M,Hn as N,xg as O,Ia as P,Zn as Q,Vl as R,bn as S,Hl as T,mr as U,Ro as V,es as W,Ys as X,sn as Y,dg as Z,Wy as _,tg as a,mP as a$,vn as a0,yr as a1,eo as a2,as as a3,rs as a4,Qn as a5,sa as a6,fP as a7,cc as a8,xs as a9,Lr as aA,ma as aB,Wn as aC,Aa as aD,vg as aE,ss as aF,Yn as aG,Ls as aH,Rs as aI,bg as aJ,la as aK,pa as aL,pP as aM,qn as aN,Kn as aO,Br as aP,_r as aQ,yn as aR,ga as aS,pg as aT,Vn as aU,ud as aV,mg as aW,Ba as aX,Jn as aY,qc as aZ,Gc as a_,Qo as aa,gg as ab,fg as ac,yg as ad,Gn as ae,An as af,kg as ag,Sg as ah,od as ai,hg as aj,wg as ak,to as al,Ec as am,un as an,Xs as ao,ac as ap,Ns as aq,Tn as ar,Bn as as,Eg as at,Yf as au,$c as av,wc as aw,Co as ax,zf as ay,Sa as az,cg as b,Eo as b$,Ff as b0,Zo as b1,jc as b2,xa as b3,Kv as b4,ws as b5,Wv as b6,Ic as b7,Ac as b8,Ks as b9,yP as bA,hd as bB,Ts as bC,As as bD,vs as bE,Vs as bF,al as bG,rl as bH,vo as bI,ur as bJ,oo as bK,so as bL,Gs as bM,Zs as bN,Ws as bO,Lg as bP,Es as bQ,Nc as bR,ld as bS,go as bT,ms as bU,qv as bV,ng as bW,sg as bX,Cs as bY,fo as bZ,ko as b_,Jf as ba,Os as bb,nc as bc,Zf as bd,Lv as be,lc as bf,wr as bg,id as bh,Wf as bi,$v as bj,Gv as bk,rc as bl,Uc as bm,Fc as bn,wn as bo,is as bp,on as bq,qr as br,ns as bs,ys as bt,zc as bu,Bc as bv,nd as bw,sd as bx,Ag as by,Is as bz,Gl as c,To as c0,Ao as c1,kl as d,xo as e,Nl as f,vy as g,Ig as h,Tg as i,Yv as j,Bl as k,fd as l,Sr as m,_o as n,Wl as o,zn as p,rg as q,oc as r,Yg as s,Ug as t,jg as u,Ms as v,Fs as w,Oa as x,xr as y,dn as z};