OwlCyberSecurity - MANAGER
Edit File: p-afee75a6.js
function t({current:t,duration:e,showAfter:n=null}){if(0===n)return!0;if(null===n||!e)return!1;if(t===n)return!0;let r=t/e*100;return 99.9<r&&(r=100),r>=n}function e(t){if(!t)return;let e,n,r,i;if(t.match(/^rgb/)){const i=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);e=i[1],n=i[2],r=i[3]}else{const i=+("0x"+t.slice(1).replace(t.length<5&&/./g,"$&$&"));e=i>>16,n=i>>8&255,r=255&i}return i=Math.sqrt(e*e*.299+n*n*.587+r*r*.114),i>127.5?"light":"dark"}function n(t){let e,n=t.split(":");return n.length>1&&(e=60*parseInt(n[0])),parseInt(n[1])+parseInt(e)}function i(){var t=navigator.userAgent||navigator.vendor;return/windows phone/i.test(t)?"Windows Phone":/android/i.test(t)?"Android":"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)?"iOS":"unknown"}function r(){return"iOS"===i()}function s(){return"unknown"!==i()}function o(){var t=window.navigator.standalone,e=window.navigator.userAgent.toLowerCase(),n=/safari/.test(e);return/iphone|ipod|ipad/.test(e)?!(!t&&n)&&(!t&&!n||void 0):!!e.includes("wv")}function c(){return!("Android"!==i()||!o())}function l(t){var e=t.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);return e?[e[1],e[2],e[3],"1"]:(e=t.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((0.)?\d+)\s*\)$/i))?[e[1],e[2],e[3],e[4]]:void 0}function u(t){var e,n,r,i,o;if(s()&&!(null===(n=null===(e=null==t?void 0:t.config)||void 0===e?void 0:e.blockAttributes)||void 0===n?void 0:n.playsInline)&&("function"==typeof(null===(r=null==t?void 0:t.media)||void 0===r?void 0:r.webkitExitFullScreen)&&(null==t||t.media.webkitExitFullScreen()),"function"==typeof(null===(i=null==t?void 0:t.embed)||void 0===i?void 0:i.exitFullscreen)&&(null===(o=null==t?void 0:t.embed)||void 0===o||o.exitFullscreen()),"youtube"===t.provider)){const e=t.currentTime;t.currentTime=t.duration,t.once("playing",(()=>{t.currentTime=e}))}}const a=t=>null!=t?t.constructor:null,h=(t,e)=>Boolean(t&&e&&t instanceof e),f=t=>null==t,d=t=>a(t)===Object,v=t=>a(t)===String,g=t=>Array.isArray(t),M=t=>h(t,NodeList),p=t=>null!==t&&"object"==typeof t&&1===t.nodeType&&"object"==typeof t.style&&"object"==typeof t.ownerDocument,m=t=>f(t)||(v(t)||g(t)||M(t))&&!t.length||d(t)&&!Object.keys(t).length,x={nullOrUndefined:f,object:d,string:v,nodeList:M,element:p,empty:m,array:g};function y(t){return Array.isArray?Array.isArray(t):"[object Array]"===O(t)}const w=1/0;function b(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-w?"-0":e}function L(t){return null==t?"":b(t)}function $(t){return"string"==typeof t}function S(t){return"number"==typeof t}function A(t){return!0===t||!1===t||I(t)&&"[object Boolean]"==O(t)}function k(t){return"object"==typeof t}function I(t){return k(t)&&null!==t}function j(t){return null!=t}function N(t){return!t.trim().length}function O(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const C="Extended search is not available",R="Incorrect 'index' type",F=t=>`Invalid value for key ${t}`,_=t=>`Pattern length exceeds max of ${t}.`,E=t=>`Missing ${t} property in key`,P=t=>`Property 'weight' in key '${t}' must be a positive integer`,W=Object.prototype.hasOwnProperty;class T{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach((t=>{let n=J(t);e+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight})),this._keys.forEach((t=>{t.weight/=e}))}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function J(t){let e=null,n=null,r=null,i=1,s=null;if($(t)||y(t))r=t,e=z(t),n=B(t);else{if(!W.call(t,"name"))throw new Error(E("name"));const o=t.name;if(r=o,W.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(P(o));e=z(o),n=B(o),s=t.getFn}return{path:e,id:n,weight:i,src:r,getFn:s}}function z(t){return y(t)?t:t.split(".")}function B(t){return y(t)?t.join("."):t}function D(t,e){let n=[],r=!1;const i=(t,e,s)=>{if(j(t))if(e[s]){const o=t[e[s]];if(!j(o))return;if(s===e.length-1&&($(o)||S(o)||A(o)))n.push(L(o));else if(y(o)){r=!0;for(let t=0,n=o.length;t<n;t+=1)i(o[t],e,s+1)}else e.length&&i(o,e,s+1)}else n.push(t)};return i(t,$(e)?e.split("."):e,0),r?n:n[0]}const K={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},U={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},H={location:0,threshold:.6,distance:100},V={useExtendedSearch:!1,getFn:D,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var q={...U,...K,...H,...V};const G=/[^ ]+/g;function Q(t=1,e=3){const n=new Map,r=Math.pow(10,e);return{get(e){const i=e.match(G).length;if(n.has(i))return n.get(i);const s=1/Math.pow(i,.5*t),o=parseFloat(Math.round(s*r)/r);return n.set(i,o),o},clear(){n.clear()}}}class X{constructor({getFn:t=q.getFn,fieldNormWeight:e=q.fieldNormWeight}={}){this.norm=Q(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach(((t,e)=>{this._keysMap[t.id]=e}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,$(this.docs[0])?this.docs.forEach(((t,e)=>{this._addString(t,e)})):this.docs.forEach(((t,e)=>{this._addObject(t,e)})),this.norm.clear())}add(t){const e=this.size();$(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,n=this.size();e<n;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!j(t)||N(t))return;let n={v:t,i:e,n:this.norm.get(t)};this.records.push(n)}_addObject(t,e){let n={i:e,$:{}};this.keys.forEach(((e,r)=>{let i=e.getFn?e.getFn(t):this.getFn(t,e.path);if(j(i))if(y(i)){let t=[];const e=[{nestedArrIndex:-1,value:i}];for(;e.length;){const{nestedArrIndex:n,value:r}=e.pop();if(j(r))if($(r)&&!N(r)){let e={v:r,i:n,n:this.norm.get(r)};t.push(e)}else y(r)&&r.forEach(((t,n)=>{e.push({nestedArrIndex:n,value:t})}))}n.$[r]=t}else if($(i)&&!N(i)){let t={v:i,n:this.norm.get(i)};n.$[r]=t}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function Y(t,e,{getFn:n=q.getFn,fieldNormWeight:r=q.fieldNormWeight}={}){const i=new X({getFn:n,fieldNormWeight:r});return i.setKeys(t.map(J)),i.setSources(e),i.create(),i}function Z(t,{getFn:e=q.getFn,fieldNormWeight:n=q.fieldNormWeight}={}){const{keys:r,records:i}=t,s=new X({getFn:e,fieldNormWeight:n});return s.setKeys(r),s.setIndexRecords(i),s}function tt(t,{errors:e=0,currentLocation:n=0,expectedLocation:r=0,distance:i=q.distance,ignoreLocation:s=q.ignoreLocation}={}){const o=e/t.length;if(s)return o;const c=Math.abs(r-n);return i?o+c/i:c?1:o}function et(t=[],e=q.minMatchCharLength){let n=[],r=-1,i=-1,s=0;for(let o=t.length;s<o;s+=1){let o=t[s];o&&-1===r?r=s:o||-1===r||(i=s-1,i-r+1>=e&&n.push([r,i]),r=-1)}return t[s-1]&&s-r>=e&&n.push([r,s-1]),n}const nt=32;function it(t,e,n,{location:r=q.location,distance:i=q.distance,threshold:s=q.threshold,findAllMatches:o=q.findAllMatches,minMatchCharLength:c=q.minMatchCharLength,includeMatches:a=q.includeMatches,ignoreLocation:l=q.ignoreLocation}={}){if(e.length>32)throw new Error(_(32));const h=e.length,u=t.length,d=Math.max(0,Math.min(r,u));let g=s,f=d;const p=c>1||a,m=p?Array(u):[];let v;for(;(v=t.indexOf(e,f))>-1;){let t=tt(e,{currentLocation:v,expectedLocation:d,distance:i,ignoreLocation:l});if(g=Math.min(t,g),f=v+h,p){let t=0;for(;t<h;)m[v+t]=1,t+=1}}f=-1;let y=[],x=1,M=h+u;const k=1<<h-1;for(let r=0;r<h;r+=1){let s=0,c=M;for(;s<c;)tt(e,{errors:r,currentLocation:d+c,expectedLocation:d,distance:i,ignoreLocation:l})<=g?s=c:M=c,c=Math.floor((M-s)/2+s);M=c;let a=Math.max(1,d-c+1),v=o?u:Math.min(d+c,u)+h,L=Array(v+2);L[v+1]=(1<<r)-1;for(let s=v;s>=a;s-=1){let o=s-1,c=n[t.charAt(o)];if(p&&(m[o]=+!!c),L[s]=(L[s+1]<<1|1)&c,r&&(L[s]|=(y[s+1]|y[s])<<1|1|y[s+1]),L[s]&k&&(x=tt(e,{errors:r,currentLocation:o,expectedLocation:d,distance:i,ignoreLocation:l}),x<=g)){if(g=x,f=o,f<=d)break;a=Math.max(1,2*d-f)}}if(tt(e,{errors:r+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:l})>g)break;y=L}const L={isMatch:f>=0,score:Math.max(.001,x)};if(p){const t=et(m,c);t.length?a&&(L.indices=t):L.isMatch=!1}return L}function rt(t){let e={};for(let n=0,r=t.length;n<r;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<r-n-1}return e}class st{constructor(t,{location:e=q.location,threshold:n=q.threshold,distance:r=q.distance,includeMatches:i=q.includeMatches,findAllMatches:s=q.findAllMatches,minMatchCharLength:o=q.minMatchCharLength,isCaseSensitive:c=q.isCaseSensitive,ignoreLocation:a=q.ignoreLocation}={}){if(this.options={location:e,threshold:n,distance:r,includeMatches:i,findAllMatches:s,minMatchCharLength:o,isCaseSensitive:c,ignoreLocation:a},this.pattern=c?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const l=(t,e)=>{this.chunks.push({pattern:t,alphabet:rt(t),startIndex:e})},h=this.pattern.length;if(h>32){let t=0;const e=h%32,n=h-e;for(;t<n;)l(this.pattern.substr(t,32),t),t+=32;if(e){const t=h-32;l(this.pattern.substr(t),t)}}else l(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,includeMatches:n}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return n&&(e.indices=[[0,t.length-1]]),e}const{location:r,distance:i,threshold:s,findAllMatches:o,minMatchCharLength:c,ignoreLocation:a}=this.options;let l=[],h=0,u=!1;this.chunks.forEach((({pattern:e,alphabet:d,startIndex:g})=>{const{isMatch:f,score:p,indices:m}=it(t,e,d,{location:r+g,distance:i,threshold:s,findAllMatches:o,minMatchCharLength:c,includeMatches:n,ignoreLocation:a});f&&(u=!0),h+=p,f&&m&&(l=[...l,...m])}));let d={isMatch:u,score:u?h/this.chunks.length:1};return u&&n&&(d.indices=l),d}}class ot{constructor(t){this.pattern=t}static isMultiMatch(t){return ct(t,this.multiRegex)}static isSingleMatch(t){return ct(t,this.singleRegex)}search(){}}function ct(t,e){const n=t.match(e);return n?n[1]:null}class lt extends ot{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class ut extends ot{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class at extends ot{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class ht extends ot{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class ft extends ot{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class dt extends ot{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class vt extends ot{constructor(t,{location:e=q.location,threshold:n=q.threshold,distance:r=q.distance,includeMatches:i=q.includeMatches,findAllMatches:s=q.findAllMatches,minMatchCharLength:o=q.minMatchCharLength,isCaseSensitive:c=q.isCaseSensitive,ignoreLocation:a=q.ignoreLocation}={}){super(t),this._bitapSearch=new st(t,{location:e,threshold:n,distance:r,includeMatches:i,findAllMatches:s,minMatchCharLength:o,isCaseSensitive:c,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class gt extends ot{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,n=0;const r=[],i=this.pattern.length;for(;(e=t.indexOf(this.pattern,n))>-1;)n=e+i,r.push([e,n-1]);const s=!!r.length;return{isMatch:s,score:s?0:1,indices:r}}}const Mt=[lt,gt,at,ht,dt,ft,ut,vt],pt=Mt.length,mt=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,xt="|";function yt(t,e={}){return t.split(xt).map((t=>{let n=t.trim().split(mt).filter((t=>t&&!!t.trim())),r=[];for(let t=0,i=n.length;t<i;t+=1){const i=n[t];let s=!1,o=-1;for(;!s&&++o<pt;){const t=Mt[o];let n=t.isMultiMatch(i);n&&(r.push(new t(n,e)),s=!0)}if(!s)for(o=-1;++o<pt;){const t=Mt[o];let n=t.isSingleMatch(i);if(n){r.push(new t(n,e));break}}}return r}))}const wt=new Set([vt.type,gt.type]);class bt{constructor(t,{isCaseSensitive:e=q.isCaseSensitive,includeMatches:n=q.includeMatches,minMatchCharLength:r=q.minMatchCharLength,ignoreLocation:i=q.ignoreLocation,findAllMatches:s=q.findAllMatches,location:o=q.location,threshold:c=q.threshold,distance:a=q.distance}={}){this.query=null,this.options={isCaseSensitive:e,includeMatches:n,minMatchCharLength:r,findAllMatches:s,ignoreLocation:i,location:o,threshold:c,distance:a},this.pattern=e?t:t.toLowerCase(),this.query=yt(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r}=this.options;t=r?t:t.toLowerCase();let i=0,s=[],o=0;for(let r=0,c=e.length;r<c;r+=1){const c=e[r];s.length=0,i=0;for(let e=0,r=c.length;e<r;e+=1){const r=c[e],{isMatch:a,indices:l,score:h}=r.search(t);if(!a){o=0,i=0,s.length=0;break}if(i+=1,o+=h,n){const t=r.constructor.type;wt.has(t)?s=[...s,...l]:s.push(l)}}if(i){let t={isMatch:!0,score:o/i};return n&&(t.indices=s),t}}return{isMatch:!1,score:1}}}const Lt=[];function $t(...t){Lt.push(...t)}function St(t,e){for(let n=0,r=Lt.length;n<r;n+=1){let r=Lt[n];if(r.condition(t,e))return new r(t,e)}return new st(t,e)}const At={AND:"$and",OR:"$or"},kt={PATH:"$path",PATTERN:"$val"},It=t=>!(!t[At.AND]&&!t[At.OR]),jt=t=>!!t[kt.PATH],Nt=t=>!y(t)&&k(t)&&!It(t),Ot=t=>({[At.AND]:Object.keys(t).map((e=>({[e]:t[e]})))});function Ct(t,e,{auto:n=!0}={}){const r=t=>{let i=Object.keys(t);const s=jt(t);if(!s&&i.length>1&&!It(t))return r(Ot(t));if(Nt(t)){const r=s?t[kt.PATH]:i[0],o=s?t[kt.PATTERN]:t[r];if(!$(o))throw new Error(F(r));const c={keyId:B(r),pattern:o};return n&&(c.searcher=St(o,e)),c}let o={children:[],operator:i[0]};return i.forEach((e=>{const n=t[e];y(n)&&n.forEach((t=>{o.children.push(r(t))}))})),o};return It(t)||(t=Ot(t)),r(t)}function Rt(t,{ignoreFieldNorm:e=q.ignoreFieldNorm}){t.forEach((t=>{let n=1;t.matches.forEach((({key:t,norm:r,score:i})=>{const s=t?t.weight:null;n*=Math.pow(0===i&&s?Number.EPSILON:i,(s||1)*(e?1:r))})),t.score=n}))}function Ft(t,e){const n=t.matches;e.matches=[],j(n)&&n.forEach((t=>{if(!j(t.indices)||!t.indices.length)return;const{indices:n,value:r}=t;let i={indices:n,value:r};t.key&&(i.key=t.key.src),t.idx>-1&&(i.refIndex=t.idx),e.matches.push(i)}))}function _t(t,e){e.score=t.score}function Et(t,e,{includeMatches:n=q.includeMatches,includeScore:r=q.includeScore}={}){const i=[];return n&&i.push(Ft),r&&i.push(_t),t.map((t=>{const{idx:n}=t,r={item:e[n],refIndex:n};return i.length&&i.forEach((e=>{e(t,r)})),r}))}class Pt{constructor(t,e={},n){this.options={...q,...e},this.options.useExtendedSearch,this._keyStore=new T(this.options.keys),this.setCollection(t,n)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof X))throw new Error(R);this._myIndex=e||Y(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){j(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=(()=>!1)){const e=[];for(let n=0,r=this._docs.length;n<r;n+=1){const i=this._docs[n];t(i,n)&&(this.removeAt(n),n-=1,r-=1,e.push(i))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:i,sortFn:s,ignoreFieldNorm:o}=this.options;let c=$(t)?$(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return Rt(c,{ignoreFieldNorm:o}),i&&c.sort(s),S(e)&&e>-1&&(c=c.slice(0,e)),Et(c,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(t){const e=St(t,this.options),{records:n}=this._myIndex,r=[];return n.forEach((({v:t,i:n,n:i})=>{if(!j(t))return;const{isMatch:s,score:o,indices:c}=e.searchIn(t);s&&r.push({item:t,idx:n,matches:[{score:o,value:t,norm:i,indices:c}]})})),r}_searchLogical(t){const e=Ct(t,this.options),n=(t,e,r)=>{if(!t.children){const{keyId:n,searcher:i}=t,s=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(e,n),searcher:i});return s&&s.length?[{idx:r,item:e,matches:s}]:[]}const i=[];for(let s=0,o=t.children.length;s<o;s+=1){const o=t.children[s],c=n(o,e,r);if(c.length)i.push(...c);else if(t.operator===At.AND)return[]}return i},r=this._myIndex.records,i={},s=[];return r.forEach((({$:t,i:r})=>{if(j(t)){let o=n(e,t,r);o.length&&(i[r]||(i[r]={idx:r,item:t,matches:[]},s.push(i[r])),o.forEach((({matches:t})=>{i[r].matches.push(...t)})))}})),s}_searchObjectList(t){const e=St(t,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach((({$:t,i:r})=>{if(!j(t))return;let s=[];n.forEach(((n,r)=>{s.push(...this._findMatches({key:n,value:t[r],searcher:e}))})),s.length&&i.push({idx:r,item:t,matches:s})})),i}_findMatches({key:t,value:e,searcher:n}){if(!j(e))return[];let r=[];if(y(e))e.forEach((({v:e,i:i,n:s})=>{if(!j(e))return;const{isMatch:o,score:c,indices:a}=n.searchIn(e);o&&r.push({score:c,key:t,value:e,idx:i,norm:s,indices:a})}));else{const{v:i,n:s}=e,{isMatch:o,score:c,indices:a}=n.searchIn(i);o&&r.push({score:c,key:t,value:i,norm:s,indices:a})}return r}}function Wt(t){return"string"==typeof t&&t.includes(".m3u8")}function Tt(t){for(var e=[];t.parentNode&&"body"!=t.parentNode.nodeName.toLowerCase();)t=t.parentNode,e.push(t);return e}function Jt(t,e){x.element(t)&&!x.empty(e)&&Object.entries(e).filter((([,t])=>!x.nullOrUndefined(t))).forEach((([e,n])=>t.setAttribute(e,n)))}function zt(t,e,n){const r=document.createElement(t);return x.object(e)&&Jt(r,e),x.string(n)&&(r.innerText=n),r}Pt.version="6.6.2",Pt.createIndex=Y,Pt.parseIndex=Z,Pt.config=q,Pt.parseQuery=Ct,$t(bt);const Bt=t=>{if(!t)return null;const e=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(((e,n)=>(t[n]&&(e[n]=t[n]),e)),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))});return e},Dt=(t,e,n)=>{if(x.empty(e))return[];if(x.empty(n))return[];if(!x.string(t))return[];const r=Object.assign(Object.assign(Object.assign({},null==n?void 0:n.minMatchCharLength),null==n?void 0:n.threshold),{shouldSort:!1,includeMatches:!0,threshold:.3,keys:["text"]});return null!==e&&e&&0!==e.length?new Pt(e,r).search(t):[]},Kt=(t,e,n)=>{if(!x.string(t))return[];if(x.empty(e))return[];if(x.empty(n))return[];const r=Dt(t,e,n);return r&&Array.prototype.map.call(r,(function(t){return{time:Math.ceil(t.item.startTime),label:""}}))};function Ut(t,e){var n,r,i,s;if(!t)return;if(!(null===(n=null==t?void 0:t.media)||void 0===n?void 0:n.textTracks)||0===(null===(i=null===(r=null==t?void 0:t.media)||void 0===r?void 0:r.textTracks)||void 0===i?void 0:i.length))return;const o=t.media.textTracks,c=(null===(s=t.config.preset)||void 0===s?void 0:s.search)||"";let a="";if(a=-1===t.captions.currentTrack?Gt(t):o[t.captions.currentTrack],x.empty(a))return[];const l=Bt(a);return x.empty(l)?[]:Kt(e,null==l?void 0:l.cues,c)}function Ht(t){var e;if(!t)return;if(!(null==t?void 0:t.elements)||!(null===(e=null==t?void 0:t.elements)||void 0===e?void 0:e.progress))return;let n=t.elements.progress.querySelectorAll(".plyr__progress__marker");if(!x.empty(n))for(var r=0;r<n.length;r++)n[r].remove()}function Vt(t,e){if(!t)return;if(Ht(t),!(null==e?void 0:e.length))return;const n=document.createDocumentFragment(),r=document.createDocumentFragment();e.forEach((e=>{const n=zt("span",{class:"plyr__progress__marker"},""),i=e.time/t.duration*100+"%";n.addEventListener("click",(()=>{t.currentTime=e.time})),n.style.left=i,r.appendChild(n)})),n.appendChild(r),t.elements.markers={points:r,tip:null},t.elements.progress.appendChild(n)}function qt(t){var e,n,r,i,s,o;if(!(null===(n=null===(e=null==t?void 0:t.config.preset)||void 0===e?void 0:e.search)||void 0===n?void 0:n.enabled))return;if(!(null===(i=null===(r=null==t?void 0:t.media)||void 0===r?void 0:r.textTracks)||void 0===i?void 0:i.length)||0===(null===(o=null===(s=null==t?void 0:t.media)||void 0===s?void 0:s.textTracks)||void 0===o?void 0:o.length))return;if(-1!==(null==t?void 0:t.currentTrack))return;t.toggleCaptions(!0);let c=setInterval((()=>{var e;const n=null===(e=t.media.textTracks[0])||void 0===e?void 0:e.cues;(null==n?void 0:n.length)>0&&(Qt(t),t.toggleCaptions(!1),clearInterval(c))}),200)}function Gt(t){if(!t)return;const e=localStorage.getItem("presto-player-"+t.id+"-cues");return x.empty(e)?"":JSON.parse(e)}function Qt(t){var e,n,r,i,s;if(!t||!(null===(e=null==t?void 0:t.media)||void 0===e?void 0:e.textTracks)||0===(null===(r=null===(n=null==t?void 0:t.media)||void 0===n?void 0:n.textTracks)||void 0===r?void 0:r.length))return;const o=(null===(s=null===(i=null==t?void 0:t.media)||void 0===i?void 0:i.textTracks)||void 0===s?void 0:s[0])?Bt(t.media.textTracks[0]):{};x.empty(o)||localStorage.setItem("presto-player-"+t.id+"-cues",JSON.stringify(o))}export{r as a,n as b,qt as c,Vt as d,u as e,c as f,Tt as g,Wt as i,e as l,l as p,Ht as r,Ut as s,t};