/*! For license information please see video.js.LICENSE.txt */ (()=>{var e={8608:(e,t,n)=>{"use strict";var r=n(4663),i=n(1413),s=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&s(e,".prototype.")>-1?i(n):n}},1413:(e,t,n)=>{"use strict";var r=n(4672),i=n(4663),s=n(7319),a=i("%TypeError%"),o=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||r.call(l,o),u=i("%Object.defineProperty%",!0),h=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(r,l,arguments);return s(t,1+h(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,o,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},8531:(e,t,n)=>{"use strict";var r=n(3219)(),i=n(4663),s=r&&i("%Object.defineProperty%",!0);if(s)try{s({},"a",{value:1})}catch(e){s=!1}var a=i("%SyntaxError%"),o=i("%TypeError%"),l=n(8337);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new o("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!l&&l(e,t);if(s)s(e,t,{configurable:null===c&&h?h.configurable:!c,enumerable:null===r&&h?h.enumerable:!r,value:n,writable:null===i&&h?h.writable:!i});else{if(!u&&(r||i||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},9309:(e,t,n)=>{"use strict";const r=n(5176),i=n(2085),s=n(4715);e.exports={XMLParser:i,XMLValidator:r,XMLBuilder:s}},7256:(e,t)=>{"use strict";const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+r+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let s=0;s{"use strict";const r=n(7256),i={allowBooleanAttributes:!1,unpairedTags:[]};function s(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function a(e,t){const n=t;for(;t5&&"xml"===r)return p("InvalidXml","XML declaration allowed only at the start of the document.",m(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function o(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},i,t);const n=[];let l=!1,c=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)b+=e[i];if(b=b.trim(),"/"===b[b.length-1]&&(b=b.substring(0,b.length-1),i--),h=b,!r.isName(h)){let t;return t=0===b.trim().length?"Invalid space after '<'.":"Tag '"+b+"' is an invalid name.",p("InvalidTag",t,m(e,i))}const v=u(e,i);if(!1===v)return p("InvalidAttr","Attributes for '"+b+"' have open quote.",m(e,i));let w=v.value;if(i=v.index,"/"===w[w.length-1]){const n=i-w.length;w=w.substring(0,w.length-1);const r=d(w,t);if(!0!==r)return p(r.err.code,r.err.msg,m(e,n+r.err.line));l=!0}else if(y){if(!v.tagClosed)return p("InvalidTag","Closing tag '"+b+"' doesn't have proper closing.",m(e,i));if(w.trim().length>0)return p("InvalidTag","Closing tag '"+b+"' can't have attributes or invalid starting.",m(e,g));{const t=n.pop();if(b!==t.tagName){let n=m(e,t.tagStartPos);return p("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+b+"'.",m(e,g))}0==n.length&&(c=!0)}}else{const r=d(w,t);if(!0!==r)return p(r.err.code,r.err.msg,m(e,i-w.length+r.err.line));if(!0===c)return p("InvalidXml","Multiple possible root nodes found.",m(e,i));-1!==t.unpairedTags.indexOf(b)||n.push({tagName:b,tagStartPos:g}),l=!0}for(i++;i0)||p("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):p("InvalidXml","Start tag expected.",1)};const l='"',c="'";function u(e,t){let n="",r="",i=!1;for(;t"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const h=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function d(e,t){const n=r.getAllMatches(e,h),i={};for(let e=0;e{"use strict";const r=n(7063),i={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[]};function s(e){this.options=Object.assign({},i,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=p),this.processTextOrObjNode=o,this.options.format?(this.indentate=f,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""),this.options.suppressEmptyNode?(this.buildTextNode=d,this.buildObjNode=c):(this.buildTextNode=u,this.buildObjNode=l),this.buildTextValNode=u,this.buildObjectNode=l,this.replaceEntitiesValue=h,this.buildAttrPairStr=a}function a(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'}function o(e,t,n){const r=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextNode(e[this.options.textNodeName],t,r.attrStr,n):this.buildObjNode(r.val,t,r.attrStr,n)}function l(e,t,n,r){let i=""+e+i:!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===s.length?this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(r)+"<"+t+n+s+this.tagEndChar+e+this.indentate(r)+i}function c(e,t,n,r){return""!==e?this.buildObjectNode(e,t,n,r):"?"===t[0]?this.indentate(r)+"<"+t+n+"?"+this.tagEndChar:this.indentate(r)+"<"+t+n+"/"+this.tagEndChar}function u(e,t,n,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+``+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i&&-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode?this.indentate(r)+"<"+t+this.tagEndChar:this.indentate(r)+"<"+t+"/"+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"0&&this.options.processEntities)for(let t=0;t1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},s.prototype.j2x=function(e,t){let n="",r="";for(let i in e)if(void 0===e[i]);else if(null===e[i])"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)r+=this.buildTextNode(e[i],i,"",t);else if("object"!=typeof e[i]){const s=this.isAttribute(i);if(s)n+=this.buildAttrPairStr(s,""+e[i]);else if(i===this.options.textNodeName){let t=this.options.tagValueProcessor(i,""+e[i]);r+=this.replaceEntitiesValue(t)}else r+=this.buildTextNode(e[i],i,"",t)}else if(Array.isArray(e[i])){const n=e[i].length;for(let s=0;s{function t(e,a,o,l){let c="",u="";a.format&&a.indentBy.length>0&&(u="\n"+a.indentBy.repeat(l));for(let h=0;h`;continue}if(f===a.commentPropName){c+=u+`\x3c!--${d[f][0][a.textNodeName]}--\x3e`;continue}if("?"===f[0]){const e=r(d[":@"],a),t="?xml"===f?"":u;let n=d[f][0][a.textNodeName];n=0!==n.length?" "+n:"",c+=t+`<${f}${n}${e}?>`;continue}let g=u+`<${f}${r(d[":@"],a)}`,m=t(d[f],a,p,l+1);-1!==a.unpairedTags.indexOf(f)?a.suppressUnpairedNode?c+=g+">":c+=g+"/>":m&&0!==m.length||!a.suppressEmptyNode?c+=g+`>${m}${u}`:c+=g+"/>"}return c}function n(e){const t=Object.keys(e);for(let e=0;e0&&t.processEntities)for(let n=0;n{const t=RegExp("^\\s([a-zA-z0-0]+)[ \t](['\"])([^&]+)\\2");function n(e,n){const r=t.exec(e);r&&(n[r[1]]={regx:RegExp(`&${r[1]};`,"g"),val:r[3]})}e.exports=function(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let i=1,s=!1,a=!1,o=!1,l="";for(;t"===e[t]){if(o){if("-"!==e[t-1]||"-"!==e[t-2])throw new Error("Invalid XML comment in DOCTYPE");o=!1}else a&&(n(l,r),a=!1);if(i--,0===i)break}else"["===e[t]?s=!0:l+=e[t];if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}},686:(e,t)=>{const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1};t.buildOptions=function(e){return Object.assign({},n,e)},t.defaultOptions=n},361:(e,t,n)=>{"use strict";const r=n(7256),i=n(5475),s=n(6436),a=n(5326);function o(e){const t=Object.keys(e);for(let n=0;n0)){a||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,s);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?v(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function c(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,r.nameRegexp);const u=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function h(e,t){if(!this.options.ignoreAttributes&&"string"==typeof e){const n=r.getAllMatches(e,u),i=n.length,s={};for(let e=0;e",o,"Closing Tag is not closed.");let i=e.substring(o+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}n&&(r=this.saveTextToParentTag(r,n,a)),a=a.substr(0,a.lastIndexOf(".")),n=this.tagsNodeStack.pop(),r="",o=t}else if("?"===e[o+1]){let t=y(e,o,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,a),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new i(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,a)),n.addChild(e)}o=t.closeIndex+1}else if("!--"===e.substr(o+1,3)){const t=m(e,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(o+4,t-2);r=this.saveTextToParentTag(r,n,a),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}o=t}else if("!D"===e.substr(o+1,2)){const t=s(e,o);this.docTypeEntities=t.entities,o=t.i}else if("!["===e.substr(o+1,2)){const t=m(e,"]]>",o,"CDATA is not closed.")-2,i=e.substring(o+9,t);if(r=this.saveTextToParentTag(r,n,a),this.options.cdataPropName)n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]);else{let e=this.parseTextData(i,n.tagname,a,!0,!1,!0);e||(e=""),n.add(this.options.textNodeName,e)}o=t+2}else{let s=y(e,o,this.options.removeNSPrefix),l=s.tagName,c=s.tagExp,u=s.attrExpPresent,h=s.closeIndex;n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,a,!1)),l!==t.tagname&&(a+=a?"."+l:l);const d=n;if(d&&-1!==this.options.unpairedTags.indexOf(d.tagname)&&(n=this.tagsNodeStack.pop()),this.isItStopNode(this.options.stopNodes,a,l)){let t="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)o=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))o=s.closeIndex;else{const n=this.readStopNodeData(e,l,h+1);if(!n)throw new Error(`Unexpected end of ${l}`);o=n.i,t=n.tagContent}const r=new i(l);l!==c&&u&&(r[":@"]=this.buildAttributesMap(c,a)),t&&(t=this.parseTextData(t,l,a,!0,u,!0,!0)),a=a.substr(0,a.lastIndexOf(".")),r.add(this.options.textNodeName,t),n.addChild(r)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),c=l):c=c.substr(0,c.length-1);const e=new i(l);l!==c&&u&&(e[":@"]=this.buildAttributesMap(c,a)),a=a.substr(0,a.lastIndexOf(".")),n.addChild(e)}else{const e=new i(l);this.tagsNodeStack.push(n),l!==c&&u&&(e[":@"]=this.buildAttributesMap(c,a)),n.addChild(e),n=e}r="",o=h}}else r+=e[o];return t.child},f=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}}return e};function p(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function g(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function m(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function y(e,t,n,r=">"){const i=function(e,t,n=">"){let r,i="";for(let s=t;s",n,`${t} is not closed`);if(e.substring(n+2,i).trim()===t)return{tagContent:e.substring(r,n),i};n=i}}function v(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&a(e,n)}return r.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={amp:{regex:/&(amp|#38|#x26);/g,val:"&"},apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=o,this.parseXml=d,this.parseTextData=l,this.resolveNameSpace=c,this.buildAttributesMap=h,this.isItStopNode=g,this.replaceEntitiesValue=f,this.readStopNodeData=b,this.saveTextToParentTag=p}}},2085:(e,t,n)=>{const{buildOptions:r}=n(686),i=n(361),{prettify:s}=n(9046),a=n(5176);e.exports=class{constructor(e){this.externalEntities={},this.options=r(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const n=a.validate(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new i(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(e);return this.options.preserveOrder||void 0===r?r:s(r,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");this.externalEntities[e]=t}}},9046:(e,t)=>{"use strict";function n(e,t,a){let o;const l={};for(let c=0;c0&&(l[t.textNodeName]=o):void 0!==o&&(l[t.textNodeName]=o),l}function r(e){const t=Object.keys(e);for(let e=0;e{"use strict";e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){this.child.push({[e]:t})}addChild(e){e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},3351:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(3351);e.exports=Function.prototype.bind||r},4663:(e,t,n)=>{"use strict";var r,i=SyntaxError,s=Function,a=TypeError,o=function(e){try{return s('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var c=function(){throw new a},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(e){return c}}}():c,h=n(4573)(),d=n(8912)(),f=Object.getPrototypeOf||(d?function(e){return e.__proto__}:null),p={},g="undefined"!=typeof Uint8Array&&f?f(Uint8Array):r,m={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":h&&f?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":s,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h&&f?f(f([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h&&f?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&h&&f?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h&&f?f(""[Symbol.iterator]()):r,"%Symbol%":h?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(f)try{null.error}catch(e){var y=f(f(e));m["%Error.prototype%"]=y}var b=function e(t){var n;if("%AsyncFunction%"===t)n=o("async function () {}");else if("%GeneratorFunction%"===t)n=o("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=o("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&f&&(n=f(i.prototype))}return m[t]=n,n},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=n(4672),S=n(2907),E=w.call(Function.call,Array.prototype.concat),x=w.call(Function.apply,Array.prototype.splice),k=w.call(Function.call,String.prototype.replace),O=w.call(Function.call,String.prototype.slice),_=w.call(Function.call,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,A=function(e,t){var n,r=e;if(S(v,r)&&(r="%"+(n=v[r])[0]+"%"),S(m,r)){var s=m[r];if(s===p&&(s=b(r)),void 0===s&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:s}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===_(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=O(e,0,1),n=O(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return k(e,C,(function(e,t,n,i){r[r.length]=n?k(i,T,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",s=A("%"+r+"%",t),o=s.name,c=s.value,u=!1,h=s.alias;h&&(r=h[0],x(n,E([0,1],h)));for(var d=1,f=!0;d=n.length){var b=l(c,p);c=(f=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else f=S(c,p),c=c[p];f&&!u&&(m[o]=c)}}return c}},3452:(e,t,n)=>{var r;r="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},e.exports=r},8337:(e,t,n)=>{"use strict";var r=n(4663)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},3219:(e,t,n)=>{"use strict";var r=n(4663)("%Object.defineProperty%",!0),i=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},8912:e=>{"use strict";var t={foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof n)}},4573:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(4283);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},4283:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},2907:(e,t,n)=>{"use strict";var r=Function.prototype.call,i=Object.prototype.hasOwnProperty,s=n(4672);e.exports=s.call(r,i)},9427:(e,t,n)=>{"use strict";var r=n(1020),i=r.ValidatorResult,s=r.SchemaError,a={ignoreProperties:{id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0}},o=a.validators={};function l(e,t,n,r,i){var s=t.throwError,a=t.throwAll;t.throwError=!1,t.throwAll=!1;var o=this.validateSchema(e,i,t,n);return t.throwError=s,t.throwAll=a,!o.valid&&r instanceof Function&&r(o),o.valid}function c(e,t){if(Object.hasOwnProperty.call(e,t))return e[t];if(t in e)for(;e=Object.getPrototypeOf(e);)if(Object.propertyIsEnumerable.call(e,t))return e[t]}function u(e,t,n,r,i,s){if(this.types.object(e)&&(!t.properties||void 0===t.properties[i]))if(!1===t.additionalProperties)s.addError({name:"additionalProperties",argument:i,message:"is not allowed to have the additional property "+JSON.stringify(i)});else{var a=t.additionalProperties||{};"function"==typeof n.preValidateProperty&&n.preValidateProperty(e,i,a,n,r);var o=this.validateSchema(e[i],a,n,r.makeChild(a,i));o.instance!==s.instance[i]&&(s.instance[i]=o.instance),s.importErrors(o)}}o.type=function(e,t,n,r){if(void 0===e)return null;var s=new i(e,t,n,r),a=Array.isArray(t.type)?t.type:[t.type];if(!a.some(this.testType.bind(this,e,t,n,r))){var o=a.map((function(e){if(e){var t=e.$id||e.id;return t?"<"+t+">":e+""}}));s.addError({name:"type",argument:o,message:"is not of a type(s) "+o})}return s},o.anyOf=function(e,t,n,r){if(void 0===e)return null;var a=new i(e,t,n,r),o=new i(e,t,n,r);if(!Array.isArray(t.anyOf))throw new s("anyOf must be an array");if(!t.anyOf.some(l.bind(this,e,n,r,(function(e){o.importErrors(e)})))){var c=t.anyOf.map((function(e,t){var n=e.$id||e.id;return n?"<"+n+">":e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"}));n.nestedErrors&&a.importErrors(o),a.addError({name:"anyOf",argument:c,message:"is not any of "+c.join(",")})}return a},o.allOf=function(e,t,n,r){if(void 0===e)return null;if(!Array.isArray(t.allOf))throw new s("allOf must be an array");var a=new i(e,t,n,r),o=this;return t.allOf.forEach((function(t,i){var s=o.validateSchema(e,t,n,r);if(!s.valid){var l=t.$id||t.id||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+i+"]";a.addError({name:"allOf",argument:{id:l,length:s.errors.length,valid:s},message:"does not match allOf schema "+l+" with "+s.errors.length+" error[s]:"}),a.importErrors(s)}})),a},o.oneOf=function(e,t,n,r){if(void 0===e)return null;if(!Array.isArray(t.oneOf))throw new s("oneOf must be an array");var a=new i(e,t,n,r),o=new i(e,t,n,r),c=t.oneOf.filter(l.bind(this,e,n,r,(function(e){o.importErrors(e)}))).length,u=t.oneOf.map((function(e,t){return e.$id||e.id||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"}));return 1!==c&&(n.nestedErrors&&a.importErrors(o),a.addError({name:"oneOf",argument:u,message:"is not exactly one from "+u.join(",")})),a},o.if=function(e,t,n,s){if(void 0===e)return null;if(!r.isSchema(t.if))throw new Error('Expected "if" keyword to be a schema');var a,o=l.call(this,e,n,s,null,t.if),c=new i(e,t,n,s);if(o){if(void 0===t.then)return;if(!r.isSchema(t.then))throw new Error('Expected "then" keyword to be a schema');a=this.validateSchema(e,t.then,n,s.makeChild(t.then)),c.importErrors(a)}else{if(void 0===t.else)return;if(!r.isSchema(t.else))throw new Error('Expected "else" keyword to be a schema');a=this.validateSchema(e,t.else,n,s.makeChild(t.else)),c.importErrors(a)}return c},o.propertyNames=function(e,t,n,a){if(this.types.object(e)){var o=new i(e,t,n,a),l=void 0!==t.propertyNames?t.propertyNames:{};if(!r.isSchema(l))throw new s('Expected "propertyNames" to be a schema (object or boolean)');for(var u in e)if(void 0!==c(e,u)){var h=this.validateSchema(u,l,n,a.makeChild(l));o.importErrors(h)}return o}},o.properties=function(e,t,n,r){if(this.types.object(e)){var a=new i(e,t,n,r),o=t.properties||{};for(var l in o){var u=o[l];if(void 0!==u){if(null===u)throw new s('Unexpected null, expected schema in "properties"');"function"==typeof n.preValidateProperty&&n.preValidateProperty(e,l,u,n,r);var h=c(e,l),d=this.validateSchema(h,u,n,r.makeChild(u,l));d.instance!==a.instance[l]&&(a.instance[l]=d.instance),a.importErrors(d)}}return a}},o.patternProperties=function(e,t,n,r){if(this.types.object(e)){var a=new i(e,t,n,r),o=t.patternProperties||{};for(var l in e){var c=!0;for(var h in o){var d=o[h];if(void 0!==d){if(null===d)throw new s('Unexpected null, expected schema in "patternProperties"');try{var f=new RegExp(h,"u")}catch(e){f=new RegExp(h)}if(f.test(l)){c=!1,"function"==typeof n.preValidateProperty&&n.preValidateProperty(e,l,d,n,r);var p=this.validateSchema(e[l],d,n,r.makeChild(d,l));p.instance!==a.instance[l]&&(a.instance[l]=p.instance),a.importErrors(p)}}}c&&u.call(this,e,t,n,r,l,a)}return a}},o.additionalProperties=function(e,t,n,r){if(this.types.object(e)){if(t.patternProperties)return null;var s=new i(e,t,n,r);for(var a in e)u.call(this,e,t,n,r,a,s);return s}},o.minProperties=function(e,t,n,r){if(this.types.object(e)){var s=new i(e,t,n,r);return Object.keys(e).length>=t.minProperties||s.addError({name:"minProperties",argument:t.minProperties,message:"does not meet minimum property length of "+t.minProperties}),s}},o.maxProperties=function(e,t,n,r){if(this.types.object(e)){var s=new i(e,t,n,r);return Object.keys(e).length<=t.maxProperties||s.addError({name:"maxProperties",argument:t.maxProperties,message:"does not meet maximum property length of "+t.maxProperties}),s}},o.items=function(e,t,n,r){var s=this;if(this.types.array(e)&&void 0!==t.items){var a=new i(e,t,n,r);return e.every((function(e,i){if(Array.isArray(t.items))var o=void 0===t.items[i]?t.additionalItems:t.items[i];else o=t.items;if(void 0===o)return!0;if(!1===o)return a.addError({name:"items",message:"additionalItems not permitted"}),!1;var l=s.validateSchema(e,o,n,r.makeChild(o,i));return l.instance!==a.instance[i]&&(a.instance[i]=l.instance),a.importErrors(l),!0})),a}},o.contains=function(e,t,n,s){var a=this;if(this.types.array(e)&&void 0!==t.contains){if(!r.isSchema(t.contains))throw new Error('Expected "contains" keyword to be a schema');var o=new i(e,t,n,s);return!1===e.some((function(e,r){return 0===a.validateSchema(e,t.contains,n,s.makeChild(t.contains,r)).errors.length}))&&o.addError({name:"contains",argument:t.contains,message:"must contain an item matching given schema"}),o}},o.minimum=function(e,t,n,r){if(this.types.number(e)){var s=new i(e,t,n,r);return t.exclusiveMinimum&&!0===t.exclusiveMinimum?e>t.minimum||s.addError({name:"minimum",argument:t.minimum,message:"must be greater than "+t.minimum}):e>=t.minimum||s.addError({name:"minimum",argument:t.minimum,message:"must be greater than or equal to "+t.minimum}),s}},o.maximum=function(e,t,n,r){if(this.types.number(e)){var s=new i(e,t,n,r);return t.exclusiveMaximum&&!0===t.exclusiveMaximum?et.exclusiveMinimum||s.addError({name:"exclusiveMinimum",argument:t.exclusiveMinimum,message:"must be strictly greater than "+t.exclusiveMinimum}),s}},o.exclusiveMaximum=function(e,t,n,r){if("boolean"!=typeof t.exclusiveMaximum&&this.types.number(e)){var s=new i(e,t,n,r);return e=t.minLength||s.addError({name:"minLength",argument:t.minLength,message:"does not meet minimum length of "+t.minLength}),s}},o.maxLength=function(e,t,n,r){if(this.types.string(e)){var s=new i(e,t,n,r),a=e.match(/[\uDC00-\uDFFF]/g);return e.length-(a?a.length:0)<=t.maxLength||s.addError({name:"maxLength",argument:t.maxLength,message:"does not meet maximum length of "+t.maxLength}),s}},o.minItems=function(e,t,n,r){if(this.types.array(e)){var s=new i(e,t,n,r);return e.length>=t.minItems||s.addError({name:"minItems",argument:t.minItems,message:"does not meet minimum length of "+t.minItems}),s}},o.maxItems=function(e,t,n,r){if(this.types.array(e)){var s=new i(e,t,n,r);return e.length<=t.maxItems||s.addError({name:"maxItems",argument:t.maxItems,message:"does not meet maximum length of "+t.maxItems}),s}},o.uniqueItems=function(e,t,n,r){if(!0===t.uniqueItems&&this.types.array(e)){var s=new i(e,t,n,r);return e.every(d)||s.addError({name:"uniqueItems",message:"contains duplicate item"}),s}},o.dependencies=function(e,t,n,r){if(this.types.object(e)){var s=new i(e,t,n,r);for(var a in t.dependencies)if(void 0!==e[a]){var o=t.dependencies[a],l=r.makeChild(o,a);if("string"==typeof o&&(o=[o]),Array.isArray(o))o.forEach((function(t){void 0===e[t]&&s.addError({name:"dependencies",argument:l.propertyPath,message:"property "+t+" not found, required by "+l.propertyPath})}));else{var c=this.validateSchema(e,o,n,l);s.instance!==c.instance&&(s.instance=c.instance),c&&c.errors.length&&(s.addError({name:"dependencies",argument:l.propertyPath,message:"does not meet dependency required by "+l.propertyPath}),s.importErrors(c))}}return s}},o.enum=function(e,t,n,a){if(void 0===e)return null;if(!Array.isArray(t.enum))throw new s("enum expects an array",t);var o=new i(e,t,n,a);return t.enum.some(r.deepCompareStrict.bind(null,e))||o.addError({name:"enum",argument:t.enum,message:"is not one of enum values: "+t.enum.map(String).join(",")}),o},o.const=function(e,t,n,s){if(void 0===e)return null;var a=new i(e,t,n,s);return r.deepCompareStrict(t.const,e)||a.addError({name:"const",argument:t.const,message:"does not exactly match expected constant: "+t.const}),a},o.not=o.disallow=function(e,t,n,r){var s=this;if(void 0===e)return null;var a=new i(e,t,n,r),o=t.not||t.disallow;return o?(Array.isArray(o)||(o=[o]),o.forEach((function(i){if(s.testType(e,t,n,r,i)){var o=i&&(i.$id||i.id)||i;a.addError({name:"not",argument:o,message:"is of prohibited type "+o})}})),a):null},e.exports=a},1020:(e,t,n)=>{"use strict";var r=n(8526),i=t.ValidationError=function(e,t,n,r,i,s){if(Array.isArray(r)?(this.path=r,this.property=r.reduce((function(e,t){return e+h(t)}),"instance")):void 0!==r&&(this.property=r),e&&(this.message=e),n){var a=n.$id||n.id;this.schema=a||n}void 0!==t&&(this.instance=t),this.name=i,this.argument=s,this.stack=this.toString()};i.prototype.toString=function(){return this.property+" "+this.message};var s=t.ValidatorResult=function(e,t,n,r){this.instance=e,this.schema=t,this.options=n,this.path=r.path,this.propertyPath=r.propertyPath,this.errors=[],this.throwError=n&&n.throwError,this.throwFirst=n&&n.throwFirst,this.throwAll=n&&n.throwAll,this.disableFormat=n&&!0===n.disableFormat};function a(e,t){return t+": "+e.toString()+"\n"}function o(e){Error.captureStackTrace&&Error.captureStackTrace(this,o),this.instance=e.instance,this.schema=e.schema,this.options=e.options,this.errors=e.errors}s.prototype.addError=function(e){var t;if("string"==typeof e)t=new i(e,this.instance,this.schema,this.path);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");t=new i(e.message,this.instance,this.schema,this.path,e.name,e.argument)}if(this.errors.push(t),this.throwFirst)throw new o(this);if(this.throwError)throw t;return t},s.prototype.importErrors=function(e){"string"==typeof e||e&&e.validatorType?this.addError(e):e&&e.errors&&(this.errors=this.errors.concat(e.errors))},s.prototype.toString=function(e){return this.errors.map(a).join("")},Object.defineProperty(s.prototype,"valid",{get:function(){return!this.errors.length}}),e.exports.ValidatorResultError=o,o.prototype=new Error,o.prototype.constructor=o,o.prototype.name="Validation Error";var l=t.SchemaError=function e(t,n){this.message=t,this.schema=n,Error.call(this,t),Error.captureStackTrace(this,e)};l.prototype=Object.create(Error.prototype,{constructor:{value:l,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var c=t.SchemaContext=function(e,t,n,r,i){this.schema=e,this.options=t,Array.isArray(n)?(this.path=n,this.propertyPath=n.reduce((function(e,t){return e+h(t)}),"instance")):this.propertyPath=n,this.base=r,this.schemas=i};c.prototype.resolve=function(e){return r.resolve(this.base,e)},c.prototype.makeChild=function(e,t){var n=void 0===t?this.path:this.path.concat([t]),i=e.$id||e.id,s=r.resolve(this.base,i||""),a=new c(e,this.options,n,s,Object.create(this.schemas));return i&&!a.schemas[s]&&(a.schemas[s]=e),a};var u=t.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"uri-template":/(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,"json-pointer":/^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,"relative-json-pointer":/^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"utc-millisec":function(e){return"string"==typeof e&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)},regex:function(e){var t=!0;try{new RegExp(e)}catch(e){t=!1}return t},style:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};u.regexp=u.regex,u.pattern=u.regex,u.ipv4=u["ip-address"],t.isFormat=function(e,t,n){if("string"==typeof e&&void 0!==u[t]){if(u[t]instanceof RegExp)return u[t].test(e);if("function"==typeof u[t])return u[t](e)}else if(n&&n.customFormats&&"function"==typeof n.customFormats[t])return n.customFormats[t](e);return!0};var h=t.makeSuffix=function(e){return(e=e.toString()).match(/[.\s\[\]]/)||e.match(/^[\d]/)?e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]":"."+e};function d(e,t,n,r){"object"==typeof n?t[r]=g(e[r],n):-1===e.indexOf(n)&&t.push(n)}function f(e,t,n){t[n]=e[n]}function p(e,t,n,r){"object"==typeof t[r]&&t[r]&&e[r]?n[r]=g(e[r],t[r]):n[r]=t[r]}function g(e,t){var n=Array.isArray(t),r=n&&[]||{};return n?(e=e||[],r=r.concat(e),t.forEach(d.bind(null,e,r))):(e&&"object"==typeof e&&Object.keys(e).forEach(f.bind(null,e,r)),Object.keys(t).forEach(p.bind(null,e,t,r))),r}function m(e){return"/"+encodeURIComponent(e).replace(/~/g,"%7E")}t.deepCompareStrict=function e(t,n){if(typeof t!=typeof n)return!1;if(Array.isArray(t))return!!Array.isArray(n)&&t.length===n.length&&t.every((function(r,i){return e(t[i],n[i])}));if("object"==typeof t){if(!t||!n)return t===n;var r=Object.keys(t),i=Object.keys(n);return r.length===i.length&&r.every((function(r){return e(t[r],n[r])}))}return t===n},e.exports.deepMerge=g,t.objectGetPath=function(e,t){for(var n,r=t.split("/").slice(1);"string"==typeof(n=r.shift());){var i=decodeURIComponent(n.replace(/~0/,"~").replace(/~1/g,"/"));if(!(i in e))return;e=e[i]}return e},t.encodePath=function(e){return e.map(m).join("")},t.getDecimalPlaces=function(e){var t=0;if(isNaN(e))return t;"number"!=typeof e&&(e=Number(e));var n=e.toString().split("e");if(2===n.length){if("-"!==n[1][0])return t;t=Number(n[1].slice(1))}var r=n[0].split(".");return 2===r.length&&(t+=r[1].length),t},t.isSchema=function(e){return"object"==typeof e&&e||"boolean"==typeof e}},4445:(e,t,n)=>{"use strict";n(6719);n(1020).ValidatorResult,n(1020).ValidatorResultError,n(1020).ValidationError,n(1020).SchemaError,n(3107),n(3107).R},3107:(e,t,n)=>{"use strict";var r=n(8526),i=n(1020);function s(e,t){this.id=e,this.ref=t}e.exports.R=function(e,t){function n(e,t){if(t&&"object"==typeof t)if(t.$ref){var s=r.resolve(e,t.$ref);c[s]=c[s]?c[s]+1:0}else{var u=t.$id||t.id,h=u?r.resolve(e,u):e;if(h){if(h.indexOf("#")<0&&(h+="#"),l[h]){if(!i.deepCompareStrict(l[h],t))throw new Error("Schema <"+h+"> already exists with different definition");return l[h]}l[h]=t,"#"==h[h.length-1]&&(l[h.substring(0,h.length-1)]=t)}a(h+"/items",Array.isArray(t.items)?t.items:[t.items]),a(h+"/extends",Array.isArray(t.extends)?t.extends:[t.extends]),n(h+"/additionalItems",t.additionalItems),o(h+"/properties",t.properties),n(h+"/additionalProperties",t.additionalProperties),o(h+"/definitions",t.definitions),o(h+"/patternProperties",t.patternProperties),o(h+"/dependencies",t.dependencies),a(h+"/disallow",t.disallow),a(h+"/allOf",t.allOf),a(h+"/anyOf",t.anyOf),a(h+"/oneOf",t.oneOf),n(h+"/not",t.not)}}function a(e,t){if(Array.isArray(t))for(var r=0;r{"use strict";var r=n(8526),i=n(9427),s=n(1020),a=n(3107).R,o=s.ValidatorResult,l=s.ValidatorResultError,c=s.SchemaError,u=s.SchemaContext,h=function e(){this.customFormats=Object.create(e.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(f),this.attributes=Object.create(i.validators)};function d(e){var t="string"==typeof e?e:e.$ref;return"string"==typeof t&&t}h.prototype.customFormats={},h.prototype.schemas=null,h.prototype.types=null,h.prototype.attributes=null,h.prototype.unresolvedRefs=null,h.prototype.addSchema=function(e,t){var n=this;if(!e)return null;var r=a(t||"/",e),i=t||e.$id||e.id;for(var s in r.id)this.schemas[s]=r.id[s];for(var s in r.ref)this.unresolvedRefs.push(s);return this.unresolvedRefs=this.unresolvedRefs.filter((function(e){return void 0===n.schemas[e]})),this.schemas[i]},h.prototype.addSubSchemaArray=function(e,t){if(Array.isArray(t))for(var n=0;n",e);var l=s.objectGetPath(n.schemas[o],a.substr(1));if(void 0===l)throw new c("no such schema "+a+" located in <"+o+">",e);return{subschema:l,switchSchema:t}},h.prototype.testType=function(e,t,n,r,i){if(void 0!==i){if(null===i)throw new c('Unexpected null in "type" keyword');if("function"==typeof this.types[i])return this.types[i].call(this,e);if(i&&"object"==typeof i){var s=this.validateSchema(e,i,n,r);return void 0===s||!(s&&s.errors.length)}return!0}};var f=h.prototype.types={};f.string=function(e){return"string"==typeof e},f.number=function(e){return"number"==typeof e&&isFinite(e)},f.integer=function(e){return"number"==typeof e&&e%1==0},f.boolean=function(e){return"boolean"==typeof e},f.array=function(e){return Array.isArray(e)},f.null=function(e){return null===e},f.date=function(e){return e instanceof Date},f.any=function(e){return!0},f.object=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof Date)},e.exports=h},201:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,s=r&&i&&"function"==typeof i.get?i.get:null,a=r&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=o&&l&&"function"==typeof l.get?l.get:null,u=o&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,S=String.prototype.toLowerCase,E=RegExp.prototype.test,x=Array.prototype.concat,k=Array.prototype.join,O=Array.prototype.slice,_=Math.floor,C="function"==typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,P="function"==typeof Symbol&&"object"==typeof Symbol.iterator,F="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,L=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||E.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-_(-e):_(e);if(r!==e){var i=String(r),s=b.call(t,i.length+1);return v.call(i,n,"$&_")+"."+v.call(v.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,n,"$&_")}var I=n(6553),j=I.custom,M=V(j)?j:null;function D(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function $(e){return v.call(String(e),/"/g,""")}function B(e){return!("[object Array]"!==q(e)||F&&"object"==typeof e&&F in e)}function U(e){return!("[object RegExp]"!==q(e)||F&&"object"==typeof e&&F in e)}function V(e){if(P)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,i,o){var l=r||{};if(z(l,"quoteStyle")&&"single"!==l.quoteStyle&&"double"!==l.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(z(l,"maxStringLength")&&("number"==typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!z(l,"customInspect")||l.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(z(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(z(l,"numericSeparator")&&"boolean"!=typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=l.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Z(t,l);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var E=String(t);return w?R(t,E):E}if("bigint"==typeof t){var _=String(t)+"n";return w?R(t,_):_}var T=void 0===l.depth?5:l.depth;if(void 0===i&&(i=0),i>=T&&T>0&&"object"==typeof t)return B(t)?"[Array]":"[Object]";var j,H=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=k.call(Array(e.indent+1)," ")}return{base:n,prev:k.call(Array(t+1),n)}}(l,i);if(void 0===o)o=[];else if(W(o,t)>=0)return"[Circular]";function X(t,n,r){if(n&&(o=O.call(o)).push(n),r){var s={depth:l.depth};return z(l,"quoteStyle")&&(s.quoteStyle=l.quoteStyle),e(t,s,i+1,o)}return e(t,l,i+1,o)}if("function"==typeof t&&!U(t)){var ee=function(e){if(e.name)return e.name;var t=y.call(m.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),te=Q(t,X);return"[Function"+(ee?": "+ee:" (anonymous)")+"]"+(te.length>0?" { "+k.call(te,", ")+" }":"")}if(V(t)){var ne=P?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):A.call(t);return"object"!=typeof t||P?ne:K(ne)}if((j=t)&&"object"==typeof j&&("undefined"!=typeof HTMLElement&&j instanceof HTMLElement||"string"==typeof j.nodeName&&"function"==typeof j.getAttribute)){for(var re="<"+S.call(String(t.nodeName)),ie=t.attributes||[],se=0;se"}if(B(t)){if(0===t.length)return"[]";var ae=Q(t,X);return H&&!function(e){for(var t=0;t=0)return!1;return!0}(ae)?"["+J(ae,H)+"]":"[ "+k.call(ae,", ")+" ]"}if(function(e){return!("[object Error]"!==q(e)||F&&"object"==typeof e&&F in e)}(t)){var oe=Q(t,X);return"cause"in Error.prototype||!("cause"in t)||N.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(x.call("[cause]: "+X(t.cause),oe),", ")+" }"}if("object"==typeof t&&g){if(M&&"function"==typeof t[M]&&I)return I(t,{depth:T-i});if("symbol"!==g&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!s||!e||"object"!=typeof e)return!1;try{s.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var le=[];return a&&a.call(t,(function(e,n){le.push(X(n,t,!0)+" => "+X(e,t))})),Y("Map",s.call(t),le,H)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{s.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ce=[];return u&&u.call(t,(function(e){ce.push(X(e,t))})),Y("Set",c.call(t),ce,H)}if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return G("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return G("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return G("WeakRef");if(function(e){return!("[object Number]"!==q(e)||F&&"object"==typeof e&&F in e)}(t))return K(X(Number(t)));if(function(e){if(!e||"object"!=typeof e||!C)return!1;try{return C.call(e),!0}catch(e){}return!1}(t))return K(X(C.call(t)));if(function(e){return!("[object Boolean]"!==q(e)||F&&"object"==typeof e&&F in e)}(t))return K(p.call(t));if(function(e){return!("[object String]"!==q(e)||F&&"object"==typeof e&&F in e)}(t))return K(X(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==q(e)||F&&"object"==typeof e&&F in e)}(t)&&!U(t)){var ue=Q(t,X),he=L?L(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",fe=!he&&F&&Object(t)===t&&F in t?b.call(q(t),8,-1):de?"Object":"",pe=(he||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||de?"["+k.call(x.call([],fe||[],de||[]),": ")+"] ":"");return 0===ue.length?pe+"{}":H?pe+"{"+J(ue,H)+"}":pe+"{ "+k.call(ue,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function z(e,t){return H.call(e,t)}function q(e){return g.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Z(b.call(e,0,t.maxStringLength),t)+r}return D(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,X),"single",t)}function X(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function K(e){return"Object("+e+")"}function G(e){return e+" { ? }"}function Y(e,t,n,r){return e+" ("+t+") {"+(r?J(n,r):k.call(n,", "))+"}"}function J(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+k.call(e,","+n)+"\n"+t.prev}function Q(e,t){var n=B(e),r=[];if(n){r.length=e.length;for(var i=0;i{"use strict";var r=n(3298),i=/[\/\?<>\\:\*\|"]/g,s=/[\x00-\x1f\x80-\x9f]/g,a=/^\.+$/,o=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,l=/[\. ]+$/;function c(e,t){if("string"!=typeof e)throw new Error("Input must be string");var n=e.replace(i,t).replace(s,t).replace(a,t).replace(o,t).replace(l,t);return r(n,255)}e.exports=function(e,t){var n=t&&t.replacement||"",r=c(e,n);return""===n?r:c(r,"")}},7319:(e,t,n)=>{"use strict";var r=n(4663),i=n(8531),s=n(3219)(),a=n(8337),o=r("%TypeError%"),l=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||l(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(s?i(e,"length",t,!0,!0):i(e,"length",t)),e}},8959:(e,t,n)=>{"use strict";var r=n(4663),i=n(8608),s=n(201),a=r("%TypeError%"),o=r("%WeakMap%",!0),l=r("%Map%",!0),c=i("WeakMap.prototype.get",!0),u=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),f=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),g=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+s(e))},get:function(r){if(o&&r&&("object"==typeof r||"function"==typeof r)){if(e)return c(e,r)}else if(l){if(t)return d(t,r)}else if(n)return function(e,t){var n=g(e,t);return n&&n.value}(n,r)},has:function(r){if(o&&r&&("object"==typeof r||"function"==typeof r)){if(e)return h(e,r)}else if(l){if(t)return p(t,r)}else if(n)return function(e,t){return!!g(e,t)}(n,r);return!1},set:function(r,i){o&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new o),u(e,r,i)):l?(t||(t=new l),f(t,r,i)):(n||(n={key:{},next:null}),function(e,t,n){var r=g(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,i))}};return r}},5326:e=>{const t=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e,i={}){if(i=Object.assign({},r,i),!e||"string"!=typeof e)return e;let s=e.trim();if(void 0!==i.skipLike&&i.skipLike.test(s))return e;if(i.hex&&t.test(s))return Number.parseInt(s,16);{const t=n.exec(s);if(t){const n=t[1],r=t[2];let o=(a=t[3])&&-1!==a.indexOf(".")?("."===(a=a.replace(/0+$/,""))?a="0":"."===a[0]?a="0"+a:"."===a[a.length-1]&&(a=a.substr(0,a.length-1)),a):a;const l=t[4]||t[6];if(!i.leadingZeros&&r.length>0&&n&&"."!==s[2])return e;if(!i.leadingZeros&&r.length>0&&!n&&"."!==s[1])return e;{const t=Number(s),a=""+t;return-1!==a.search(/[eE]/)||l?i.eNotation?t:e:-1!==s.indexOf(".")?"0"===a&&""===o||a===o||n&&a==="-"+o?t:e:r?o===a||n+o===a?t:e:s===a||s===n+a?t:e}}return e}var a}},3298:(e,t,n)=>{"use strict";var r=n(2815),i=n(2875);e.exports=r.bind(null,i)},2815:e=>{"use strict";function t(e){return e>=55296&&e<=56319}function n(e){return e>=56320&&e<=57343}e.exports=function(e,r,i){if("string"!=typeof r)throw new Error("Input must be string");for(var s,a,o=r.length,l=0,c=0;ci)return r.slice(0,c-a.length+1)}return r}},9177:function(e,t,n){var r;e=n.nmd(e),function(i){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof n.g&&n.g;s.global!==s&&s.window!==s&&s.self;var a,o=2147483647,l=36,c=26,u=38,h=700,d=/^xn--/,f=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=l-1,y=Math.floor,b=String.fromCharCode;function v(e){throw new RangeError(g[e])}function w(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function S(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+w((e=e.replace(p,".")).split("."),t).join(".")}function E(e){for(var t,n,r=[],i=0,s=e.length;i=55296&&t<=56319&&i65535&&(t+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+b(e)})).join("")}function k(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function O(e,t,n){var r=0;for(e=n?y(e/h):e>>1,e+=y(e/t);e>m*c>>1;r+=l)e=y(e/m);return y(r+(m+1)*e/(e+u))}function _(e){var t,n,r,i,s,a,u,h,d,f,p,g=[],m=e.length,b=0,w=128,S=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&v("not-basic"),g.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=m&&v("invalid-input"),((h=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:l)>=l||h>y((o-b)/a))&&v("overflow"),b+=h*a,!(h<(d=u<=S?1:u>=S+c?c:u-S));u+=l)a>y(o/(f=l-d))&&v("overflow"),a*=f;S=O(b-s,t=g.length+1,0==s),y(b/t)>o-w&&v("overflow"),w+=y(b/t),b%=t,g.splice(b++,0,w)}return x(g)}function C(e){var t,n,r,i,s,a,u,h,d,f,p,g,m,w,S,x=[];for(g=(e=E(e)).length,t=128,n=0,s=72,a=0;a=t&&py((o-n)/(m=r+1))&&v("overflow"),n+=(u-t)*m,t=u,a=0;ao&&v("overflow"),p==t){for(h=n,d=l;!(h<(f=d<=s?1:d>=s+c?c:d-s));d+=l)S=h-f,w=l-f,x.push(b(k(f+S%w,0))),h=y(S/w);x.push(b(k(h,0))),s=O(n,m,r==i),n=0,++r}++n,++t}return x.join("")}a={version:"1.4.1",ucs2:{decode:E,encode:x},decode:_,encode:C,toASCII:function(e){return S(e,(function(e){return f.test(e)?"xn--"+C(e):e}))},toUnicode:function(e){return S(e,(function(e){return d.test(e)?_(e.slice(4).toLowerCase()):e}))}},void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},7032:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}},3184:(e,t,n)=>{"use strict";var r=n(1645),i=n(5610),s=n(7032);e.exports={formats:s,parse:i,stringify:r}},5610:(e,t,n)=>{"use strict";var r=n(8206),i=Object.prototype.hasOwnProperty,s=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},o=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var s=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,o=n.depth>0&&/(\[[^[\]]*])/.exec(s),c=o?s.slice(0,o.index):s,u=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var h=0;n.depth>0&&null!==(o=a.exec(s))&&h=0;--s){var a,o=e[s];if("[]"===o&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&o!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,c={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,h=t.parameterLimit===1/0?void 0:t.parameterLimit,d=u.split(t.delimiter,h),f=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=s(m)?[m]:m),i.call(c,g)?c[g]=r.combine(c[g],m):c[g]=m}return c}(e,n):e,h=n.plainObjects?Object.create(null):{},d=Object.keys(u),f=0;f{"use strict";var r=n(8959),i=n(8206),s=n(7032),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,l(t)?t:[t])},h=Date.prototype.toISOString,d=s.default,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:d,formatter:s.formatters[d],indices:!1,serializeDate:function(e){return h.call(e)},skipNulls:!1,strictNullHandling:!1},p={},g=function e(t,n,s,a,o,c,h,d,g,m,y,b,v,w,S,E){for(var x,k=t,O=E,_=0,C=!1;void 0!==(O=O.get(p))&&!C;){var T=O.get(t);if(_+=1,void 0!==T){if(T===_)throw new RangeError("Cyclic object value");C=!0}void 0===O.get(p)&&(_=0)}if("function"==typeof d?k=d(n,k):k instanceof Date?k=y(k):"comma"===s&&l(k)&&(k=i.maybeMap(k,(function(e){return e instanceof Date?y(e):e}))),null===k){if(o)return h&&!w?h(n,f.encoder,S,"key",b):n;k=""}if("string"==typeof(x=k)||"number"==typeof x||"boolean"==typeof x||"symbol"==typeof x||"bigint"==typeof x||i.isBuffer(k))return h?[v(w?n:h(n,f.encoder,S,"key",b))+"="+v(h(k,f.encoder,S,"value",b))]:[v(n)+"="+v(String(k))];var A,P=[];if(void 0===k)return P;if("comma"===s&&l(k))w&&h&&(k=i.maybeMap(k,h)),A=[{value:k.length>0?k.join(",")||null:void 0}];else if(l(d))A=d;else{var F=Object.keys(k);A=g?F.sort(g):F}for(var N=a&&l(k)&&1===k.length?n+"[]":n,L=0;L0?S+w:""}},8206:(e,t,n)=>{"use strict";var r=n(7032),i=Object.prototype.hasOwnProperty,s=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(s(n)){for(var r=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||s===r.RFC1738&&(40===u||41===u)?l+=o.charAt(c):u<128?l+=a[u]:u<2048?l+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&o.charCodeAt(c)),l+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(s(e)){for(var n=[],r=0;r{"use strict";var r=n(9177);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,o=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),u=["%","/","?",";","#"].concat(c),h=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(3184);function b(e,t,n){if(e&&"object"==typeof e&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),a=-1!==i&&i127?N+="x":N+=F[L];if(!N.match(d)){var I=A.slice(0,_),j=A.slice(_+1),M=F.match(f);M&&(I.push(M[1]),j.unshift(M[2])),j.length&&(b="/"+j.join(".")+b),this.hostname=I.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=r.toASCII(this.hostname));var D=this.port?":"+this.port:"",$=this.hostname||"";this.host=$+D,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!p[S])for(_=0,P=c.length;_0)&&n.host.split("@"))&&(n.auth=T.shift(),n.hostname=T.shift(),n.host=n.hostname)),n.search=e.search,n.query=e.query,null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var k=E.slice(-1)[0],O=(n.host||e.host||E.length>1)&&("."===k||".."===k)||""===k,_=0,C=E.length;C>=0;C--)"."===(k=E[C])?E.splice(C,1):".."===k?(E.splice(C,1),_++):_&&(E.splice(C,1),_--);if(!w&&!S)for(;_--;_)E.unshift("..");!w||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),O&&"/"!==E.join("/").substr(-1)&&E.push("");var T,A=""===E[0]||E[0]&&"/"===E[0].charAt(0);return x&&(n.hostname=A?"":E.length?E.shift():"",n.host=n.hostname,(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.hostname=T.shift(),n.host=n.hostname)),(w=w||n.host&&E.length)&&!A&&E.unshift(""),E.length>0?n.pathname=E.join("/"):(n.pathname=null,n.path=null),null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){return"string"==typeof e&&(e=b(e)),e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i},2875:e=>{"use strict";function t(e){return e>=55296&&e<=56319}function n(e){return e>=56320&&e<=57343}e.exports=function(e){if("string"!=typeof e)throw new Error("Input must be string");for(var r=e.length,i=0,s=null,a=null,o=0;o=128&&s<=2047?i+=2:s>=2048&&s<=65535&&(i+=3),a=s;return i}},462:(e,t,n)=>{e.exports={WebVTT:n(5115).WebVTT,VTTCue:n(4747).VTTCue,VTTRegion:n(1271).VTTRegion}},5115:function(){!function(e){function t(e,t){return void 0===t&&(t=1),"rgba("+[parseInt(e.substring(0,2),16),parseInt(e.substring(2,4),16),parseInt(e.substring(4,6),16),t].join(",")+")"}var n=1;function r(e,r,s){switch(s){case"webvtt.font.color":case"webvtt.font.opacity":var a=Services.prefs.getCharPref("webvtt.font.color"),o=Services.prefs.getIntPref("webvtt.font.opacity")/100;i.fontSet=t(a,o);break;case"webvtt.font.scale":n=Services.prefs.getIntPref("webvtt.font.scale")/100;break;case"webvtt.bg.color":case"webvtt.bg.opacity":var l=Services.prefs.getCharPref("webvtt.bg.color"),c=Services.prefs.getIntPref("webvtt.bg.opacity")/100;i.backgroundSet=t(l,c);break;case"webvtt.edge.color":case"webvtt.edge.type":var u=Services.prefs.getIntPref("webvtt.edge.type"),h=Services.prefs.getCharPref("webvtt.edge.color");i.edgeSet=["","0px 0px ","4px 4px 4px ","-2px -2px ","2px 2px "][u]+t(h)}}if("undefined"!=typeof Services){var i={};["webvtt.font.color","webvtt.font.opacity","webvtt.font.scale","webvtt.bg.color","webvtt.bg.opacity","webvtt.edge.color","webvtt.edge.type"].forEach((function(e){r(0,0,e),Services.prefs.addObserver(e,r,!1)}))}var s=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function a(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function o(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function l(){this.values=s(null)}function c(e,t,n,r){var i=r?e.split(r):[e];for(var s in i)if("string"==typeof i[s]){var a=i[s].split(n);2===a.length&&t(a[0],a[1])}}function u(e,t,n){var r=e;function i(){var t=o(e);if(null===t)throw new a(a.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function s(){e=e.replace(/^\s+/,"")}if(s(),t.startTime=i(),s(),"--\x3e"!==e.substr(0,3))throw new a(a.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),s(),t.endTime=i(),s(),function(e,t){var r=new l;c(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var s=t.split(","),a=s[0];r.integer(e,a),r.percent(e,a)&&r.set("snapToLines",!1),r.alt(e,a,["auto"]),2===s.length&&r.alt("lineAlign",s[1],["start","middle","end"]);break;case"position":s=t.split(","),r.percent(e,s[0]),2===s.length&&r.alt("positionAlign",s[1],["start","middle","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","middle","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line","auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align","middle"),t.position=r.get("position","auto"),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}a.prototype=s(Error.prototype),a.prototype.constructor=a,a.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},l.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r=0&&t<=100)&&(this.set(e,t),!0)}};var h={"&":"&","<":"<",">":">","‎":"‎","‏":"‏"," ":" "},d={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},f={v:"title",lang:"lang"},p={rt:"ruby"};function g(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]+>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e){return h[e]}function i(e){for(;b=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(b[0],r);return e}function s(e,t){return!p[t.localName]||p[t.localName]===e.localName}function a(t,n){var r=d[t];if(!r)return null;var i=e.document.createElement(r);i.localName=r;var s=f[t];return s&&n&&(i[s]=n.trim()),i}for(var l,c=e.document.createElement("div"),u=c,g=[];null!==(l=n());)if("<"!==l[0])u.appendChild(e.document.createTextNode(i(l)));else{if("/"===l[1]){g.length&&g[g.length-1]===l.substr(2).replace(">","")&&(g.pop(),u=u.parentNode);continue}var m,y=o(l.substr(1,l.length-2));if(y){m=e.document.createProcessingInstruction("timestamp",y),u.appendChild(m);continue}var b=l.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!b)continue;if(!(m=a(b[1],b[3])))continue;if(!s(u,m))continue;b[2]&&(m.className=b[2].substr(1).replace("."," ")),g.push(b[1]),u.appendChild(m),u=m}return c}var m=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function y(e){for(var t=0;t=n[0]&&e<=n[1])return!0}return!1}function b(){}function v(e,t,n){var r="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent),s="rgba(255, 255, 255, 1)",a="rgba(0, 0, 0, 0.8)",o="";void 0!==i&&(s=i.fontSet,a=i.backgroundSet,o=i.edgeSet),r&&(s="rgb(255, 255, 255)",a="rgb(0, 0, 0)"),b.call(this),this.cue=t,this.cueDiv=g(e,t.text);var l={color:s,backgroundColor:a,textShadow:o,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};r||(l.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",l.unicodeBidi="plaintext"),this.applyStyles(l,this.cueDiv),this.div=e.document.createElement("div"),l={textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},r||(l.direction=function(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var s=n.match(/^.*(\n|\r)/);return s?(e.length=0,s[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var s=0;s=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;ih&&(u=u<0?-1:1,u*=Math.ceil(h/c)*c),a<0&&(u+=""===s.vertical?n.height:n.width,o=o.reverse()),i.move(d,u)}else{var f=i.lineHeight/n.height*100;switch(s.lineAlign){case"middle":a-=f/2;break;case"end":a-=f}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],i=new w(t)}var p=function(e,t){for(var i,s=new w(e),a=1,o=0;ol&&(i=new w(e),a=l),e=new w(s)}return i||s}(i,o);t.move(p.toCSSCompatValues(n))}function E(){}b.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},b.prototype.formatStyle=function(e,t){return 0===e?0:e+t},v.prototype=s(b.prototype),v.prototype.constructor=v,w.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},w.prototype.overlaps=function(e){return this.lefte.left&&this.tope.top},w.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},w.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},w.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},w.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},w.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},E.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},E.convertCueToDOMTree=function(e,t){return e&&t?g(e,t):null},E.processCues=function(e,t,r){if(!e||!t||!r)return null;for(;r.firstChild;)r.removeChild(r.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin="1.5%",r.appendChild(i),function(e){for(var t=0;t100)throw new Error("Position must be between 0 and 100.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",i({},l,{get:function(){return w},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",i({},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(a,"align",i({},l,{get:function(){return E},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");E=t,this.hasBeenReset=!0}})),a.displayState=void 0,o)return a}s.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.VTTCue=e.VTTCue||s}(this)},1271:function(e,t,n){var r;e.exports&&(this.VTTRegion=n(8591).VTTRegion),(r=this).VTTRegion.create=function(e){var t=new r.VTTRegion;for(var n in e)t.hasOwnProperty(n)&&(t[n]=e[n]);return t},r.VTTRegion.fromJSON=function(e){return this.create(JSON.parse(e))}},8591:function(){!function(e){var t={"":!0,up:!0};function n(e){return"number"==typeof e&&e>=0&&e<=100}e.VTTRegion=e.VTTRegion||function(){var e=100,r=3,i=0,s=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return r},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");r=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");s=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");l=n}}})}}(this)},6553:()=>{}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e;function t(t,n,r,s){let a=n;for(let o=n;o>=0&&(a=o,!i(t,a,n,r,s,e.backward));--o);let o=a;for(let a=n;a<=t.length-1&&(o=a,!i(t,o,n,r,s,e.forward));++a);return t.slice(a,o+1)}function r(t,n,r){if(r===e.forward){for(let e=0;e=n)return e}else for(let e=t.length-1;e>=0;--e)if(t[e].start<=n)return e}function i(t,n,r,i,s,a){let o;return o=a==e.forward?n+1=0?t[n-1]:null,Math.abs(r-n)>=i&&(null===o||Math.abs(o.start-t[r].start)>=s)}function s(e,t,n,r,i,s){const a=e[t];return Math.abs(s-t)<=n||Math.abs(a.start-i)<=r}function a(e){const t=e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));return t.startsWith("webkit-")||t.startsWith("moz-")||t.startsWith("ms-")||t.startsWith("o-")?`-${t}`:t}function o(e){const t=function({subtitleColor:e,subtitleSize:t,subtitleThickness:n,subtitleOutlineThickness:r,subtitleOutlineColor:i,subtitleShadowThickness:s,subtitleShadowColor:a,subtitleBackgroundOpacity:o,subtitleBackgroundColor:l,subtitleFontFamily:c,subtitleCustomStyles:u}){const h={color:e,fontSize:`${t}px`,fontWeight:String(n)};if(r>0){const e=r,t=i;h.WebkitTextStroke=`${t} ${e}px`}if(s>0&&(h.textShadow=`0 0 ${s}px ${a}, 0 0 ${s}px ${a}, 0 0 ${s}px ${a}, 0 0 ${s}px ${a}`),o>0){const e=o,t=l,{r:n,g:r,b:i}=(d=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t))?{r:parseInt(d[1],16),g:parseInt(d[2],16),b:parseInt(d[3],16)}:{r:255,g:255,b:255};h.backgroundColor=`rgba(${n}, ${r}, ${i}, ${e})`}var d;c&&c.length>0&&(h.fontFamily=c);for(const e of u){let t;t=e.key.startsWith("webkit")||e.key.startsWith("moz")||e.key.startsWith("ms")||/^o[A-Z].*/.test(e.key)?e.key.charAt(0).toUpperCase()+e.key.slice(1):e.key,h[t]=e.value}return h}(e),n=[];for(const[e,r]of Object.entries(t))n.push(`${a(e)}: ${r} !important`);return n.join(";")}function l(e,t){return 0===t?e:`${e} (${function(e,t=!1){const n=Math.floor(e/1e3);let r;r=t?Math.round(e/1e3%60*10)/10:n%60;const i=Math.floor(n/60)%60,s=Math.floor(n/3600);return s>0?s+"h"+String(i).padStart(2,"0")+"m"+String(r).padStart(2,"0")+"s":i+"m"+String(r).padStart(2,"0")+"s"}(t)})`}n(2565),function(e){e[e.forward=0]="forward",e[e.backward=1]="backward"}(e||(e={}));const c=async(e,t,n,r)=>new Promise(((i,s)=>{const a=new Image;a.onload=async()=>{const r=document.createElement("canvas"),o=window.devicePixelRatio,l=n.width*o,c=n.height*o;r.width=l,r.height=c;const u=r.getContext("2d");if(u.drawImage(a,n.left*o,n.top*o,l,c,0,0,l,c),e>0||t>0)try{await((e,t,n,r)=>new Promise(((i,s)=>{const a=n<=0?1:n/e.width,o=r<=0?1:r/e.height,l=Math.min(1,Math.min(a,o));if(l<1){const n=e.width*l,r=e.height*l;createImageBitmap(e,{resizeWidth:n,resizeHeight:r,resizeQuality:"high"}).then((s=>{e.width=n,e.height=r,t.drawImage(s,0,0),i(e)})).catch((e=>s(e)))}else i(e)})))(r,u,e,t),i(r.toDataURL("image/jpeg"))}catch(e){console.error("Failed to crop and resize image: "+e),s(e)}else i(r.toDataURL("image/jpeg"))},a.src=r}));var u,h,d;!function(e){e[e.none=0]="none",e[e.showAnkiDialog=1]="showAnkiDialog",e[e.updateLastCard=2]="updateLastCard"}(u||(u={})),function(e){e[e.atStart=1]="atStart",e[e.atEnd=2]="atEnd"}(h||(h={})),function(e){e[e.normal=1]="normal",e[e.condensed=2]="condensed",e[e.autoPause=3]="autoPause",e[e.fastForward=4]="fastForward"}(d||(d={}));class f{willStopShowing(e){e.end!==this.lastWillStopShowing?.end&&(this.onWillStopShowing?.(),this.lastWillStopShowing=e)}startedShowing(e){e.start!==this.lastStartedShowing?.start&&(this.onStartedShowing?.(),this.lastStartedShowing=e)}clear(){this.lastStartedShowing=void 0,this.lastWillStopShowing=void 0}}class p{constructor(){this._cachedContentElements={},this._empty=!0}get empty(){return this._empty}clear(){this.offscreenElement?.remove(),this.offscreenElement=void 0,this._cachedContentElements={},this._empty=!0}add(e,t){const n=document.createElement("div");n.innerHTML=`${t}\n`,this._cachedContentElements[e]=n,this._offscreenElement().appendChild(n),this._empty=!1}return(e){this._offscreenElement().appendChild(e)}get(e,t){let n=this._cachedContentElements[e];if(!n){if(void 0===t)throw new Error(`Cached html not found for key ${e}`);n=document.createElement("div"),n.innerHTML=t(),this._cachedContentElements[e]=n,this._offscreenElement().appendChild(n)}return n}_offscreenElement(){if(this.offscreenElement)return this.offscreenElement;const e=document.createElement("div");return e.className="asbplayer-offscreen",document.body.append(e),this.offscreenElement=e,e}}const g=Object.keys({ankiConnectUrl:!0,deck:!0,noteType:!0,sentenceField:!0,definitionField:!0,audioField:!0,imageField:!0,wordField:!0,sourceField:!0,urlField:!0,customAnkiFields:!0,tags:!0,preferMp3:!0,audioPaddingStart:!0,audioPaddingEnd:!0,maxImageWidth:!0,maxImageHeight:!0,surroundingSubtitlesCountRadius:!0,surroundingSubtitlesTimeRadius:!0});var m;!function(e){e.noSubtitleList="noSubtitleList",e.app="app"}(m||(m={}));const y=(navigator.userAgentData?.platform??navigator.platform)?.toUpperCase()?.indexOf("MAC")>-1,b={ankiConnectUrl:"http://127.0.0.1:8765",deck:"",noteType:"",sentenceField:"",definitionField:"",audioField:"",imageField:"",wordField:"",sourceField:"",urlField:"",subtitleSize:36,subtitleColor:"#ffffff",subtitleThickness:700,subtitleOutlineThickness:0,subtitleOutlineColor:"#000000",subtitleShadowThickness:2,subtitleShadowColor:"#000000",subtitleBackgroundColor:"#000000",subtitleBackgroundOpacity:.5,subtitleFontFamily:"",subtitlePreview:"アあ安Aa",subtitlePositionOffset:75,subtitleAlignment:"bottom",audioPaddingStart:0,audioPaddingEnd:500,maxImageWidth:0,maxImageHeight:0,surroundingSubtitlesCountRadius:2,surroundingSubtitlesTimeRadius:1e4,autoPausePreference:h.atEnd,fastForwardModePlaybackRate:2.7,keyBindSet:{togglePlay:{keys:"space"},toggleAutoPause:{keys:y?"⇧+P":"shift+P"},toggleCondensedPlayback:{keys:y?"⇧+O":"shift+O"},toggleFastForwardPlayback:{keys:y?"⇧+F":"shift+F"},toggleSubtitles:{keys:"down"},toggleVideoSubtitleTrack1:{keys:"1"},toggleVideoSubtitleTrack2:{keys:"2"},toggleVideoSubtitleTrack3:{keys:"3"},toggleAsbplayerSubtitleTrack1:{keys:"W+1"},toggleAsbplayerSubtitleTrack2:{keys:"W+2"},toggleAsbplayerSubtitleTrack3:{keys:"W+3"},seekBackward:{keys:"A"},seekForward:{keys:"D"},seekToPreviousSubtitle:{keys:"left"},seekToNextSubtitle:{keys:"right"},seekToBeginningOfCurrentSubtitle:{keys:"up"},adjustOffsetToPreviousSubtitle:{keys:y?"⇧+left":"ctrl+left"},adjustOffsetToNextSubtitle:{keys:y?"⇧+right":"ctrl+right"},decreaseOffset:{keys:y?"⇧+⌃+right":"ctrl+shift+right"},increaseOffset:{keys:y?"⇧+⌃+left":"ctrl+shift+left"},resetOffset:{keys:y?"⇧+⌃+down":"ctrl+shift+down"},copySubtitle:{keys:y?"⇧+⌃+Z":"ctrl+shift+Z"},ankiExport:{keys:y?"⇧+⌃+X":"ctrl+shift+X"},updateLastCard:{keys:y?"⇧+⌃+U":"ctrl+shift+U"},takeScreenshot:{keys:y?"⇧+⌃+V":"ctrl+shift+V"},decreasePlaybackRate:{keys:y?"⇧+⌃+[":"ctrl+shift+["},increasePlaybackRate:{keys:y?"⇧+⌃+]":"ctrl+shift+]"},toggleSidePanel:{keys:"`"}},preferMp3:!0,miningHistoryStorageLimit:25,preCacheSubtitleDom:!0,clickToMineDefaultAction:u.showAnkiDialog,themeType:"dark",copyToClipboardOnMine:!1,rememberSubtitleOffset:!0,lastSubtitleOffset:0,autoCopyCurrentSubtitle:!1,subtitleRegexFilter:"",subtitleRegexFilterTextReplacement:"",language:"en",customAnkiFields:{},tags:[],imageBasedSubtitleScaleFactor:1,subtitleCustomStyles:[],streamingAppUrl:"https://killergerbah.github.io/asbplayer",streamingDisplaySubtitles:!0,streamingRecordMedia:!0,streamingTakeScreenshot:!0,streamingCleanScreenshot:!0,streamingCropScreenshot:!0,streamingSubsDragAndDrop:!0,streamingAutoSync:!1,streamingLastLanguagesSynced:{},streamingCondensedPlaybackMinimumSkipIntervalMs:1e3,streamingScreenshotDelay:1e3,streamingSubtitleListPreference:m.noSubtitleList};Object.fromEntries(Object.entries(b).map((([e,t])=>{if("string"==typeof t)return[e,e=>e];if("boolean"==typeof t)return[e,e=>"true"===e];if("number"==typeof t)return[e,e=>Number(e)];if("keyBindSet"===e)return[e,e=>{const t=JSON.parse(e);for(const e of Object.keys(b.keyBindSet)){const n=e;void 0===t[n]&&(t[n]=b.keyBindSet[n])}return t}];if("object"==typeof t)return[e,e=>JSON.parse(e)];throw new Error("Could not determine deserializer for setting")})));class v{constructor(e){this._storage=e}async getAll(){return this.get(Object.keys(b))}async getSingle(e){return(await this.get([e]))[e]}async get(e){let t={};for(const n of e)t[n]=b[n];const n=await this._storage.get(t),r={};for(const e in t)r[e]=n[e]??b[e];return r}async set(e){await this._storage.set(e)}}n(4445);const w=["en","es","de","ja","pl","pt_BR","zh_CN"];function S(e){const t=e.toLowerCase().trim().split(/\s*;\s*/);return"banner"===t[0]?{name:t[0],delay:1*t[1]||0,leftToRight:1*t[2]||0,fadeAwayWidth:1*t[3]||0}:/^scroll\s/.test(t[0])?{name:t[0],y1:Math.min(1*t[1],1*t[2]),y2:Math.max(1*t[1],1*t[2]),delay:1*t[3]||0,fadeAwayHeight:1*t[4]||0}:null}function E(e){return e?e.toLowerCase().replace(/([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)/g," $1 ").replace(/([mnlbspc])/g," $1 ").trim().replace(/\s+/g," ").split(/\s(?=[mnlbspc])/).map((e=>e.split(" ").filter(((e,t)=>!(t&&Number.isNaN(1*e)))))):[]}const x=["b","i","u","s","fsp","k","K","kf","ko","kt","fe","q","p","pbo","a","an","fscx","fscy","fax","fay","frx","fry","frz","fr","be","blur","bord","xbord","ybord","shad","xshad","yshad"].map((e=>({name:e,regex:new RegExp(`^${e}-?\\d`)})));function k(e){const t={};for(let n=0;ne.replace(/,/g,"\n"))).split(/\s*,\s*/);if(!n[0])return t;t.t={t1:0,t2:0,accel:1,tags:n[n.length-1].replace(/\n/g,",").split("\\").slice(1).map(k)},2===n.length&&(t.t.accel=1*n[0]),3===n.length&&(t.t.t1=1*n[0],t.t.t2=1*n[1]),4===n.length&&(t.t.t1=1*n[0],t.t.t2=1*n[1],t.t.accel=1*n[2])}return t}function O(e){const t=[];let n=0,r="";for(let i=0;ivoid 0===t.p?e:!!t.p),!1);n.push({tags:r,text:i?"":t[e+1],drawing:i?E(t[e+1]):[]})}return{raw:e,combined:n.map((e=>e.text)).join(""),parsed:n}}function C(e){const t=e.split(":");return 3600*t[0]+60*t[1]+1*t[2]}function T(e,t){let n=e.split(",");if(n.length>t.length){const e=n.slice(t.length-1).join();n=n.slice(0,t.length-1),n.push(e)}const r={};for(let e=0;e({[e]:n[t]}))))}function N(e){const t={type:null,prev:null,next:null,points:[]};/[mnlbs]/.test(e[0])&&(t.type=e[0].toUpperCase().replace("N","L").replace("B","C"));for(let n=e.length-!(1&e.length),r=1;re+t.map((({x:e,y:t})=>`${e},${t}`)).join(","))).join("")}function I(e){const t=[];let n=0;for(;n({x:e,y:t}))))}e.splice(n,1)}}const r=[].concat(...t.map((({type:e,points:t,prev:n,next:r})=>"S"===e?function(e,t,n){const r=[],i=[0,2/3,1/3,0],s=[0,1/3,2/3,0],a=[0,1/6,2/3,1/6],o=(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3];let l=[e[e.length-1].x,e[0].x,e[1].x,e[2].x],c=[e[e.length-1].y,e[0].y,e[1].y,e[2].y];r.push({type:"M"===t?"M":"L",points:[{x:o(a,l),y:o(a,c)}]});for(let t=3;te))).forEach((({x:e,y:s})=>{t=Math.min(t,e),n=Math.min(n,s),r=Math.max(r,e),i=Math.max(i,s)})),{minX:t,minY:n,width:r-t,height:i-n}}(t))}const j=["fs","clip","c1","c2","c3","c4","a1","a2","a3","a4","alpha","fscx","fscy","fax","fay","frx","fry","frz","fr","be","blur","bord","xbord","ybord","shad","xshad","yshad"];function M(e,t,n={}){let r=e[t];if(void 0===r)return null;if("pos"===t||"org"===t)return 2===r.length?{[t]:{x:r[0],y:r[1]}}:null;if("move"===t){const[e,t,n,i,s=0,a=0]=r;return 4===r.length||6===r.length?{move:{x1:e,y1:t,x2:n,y2:i,t1:s,t2:a}}:null}if("fad"===t||"fade"===t){if(2===r.length){const[e,t]=r;return{fade:{type:"fad",t1:e,t2:t}}}if(7===r.length){const[e,t,n,i,s,a,o]=r;return{fade:{type:"fade",a1:e,a2:t,a3:n,t1:i,t2:s,t3:a,t4:o}}}return null}if("clip"===t){const{inverse:e,scale:t,drawing:n,dots:i}=r;if(n)return{clip:{inverse:e,scale:t,drawing:I(n),dots:i}};if(i){const[r,s,a,o]=i;return{clip:{inverse:e,scale:t,drawing:n,dots:{x1:r,y1:s,x2:a,y2:o}}}}return null}if(/^[xy]?(bord|shad)$/.test(t)&&(r=Math.max(r,0)),"bord"===t)return{xbord:r,ybord:r};if("shad"===t)return{xshad:r,yshad:r};if(/^c\d$/.test(t))return{[t]:r||n[t]};if("alpha"===t)return{a1:r,a2:r,a3:r,a4:r};if("fr"===t)return{frz:r};if("fs"===t)return{fs:/^\+|-/.test(r)?(1*r>-10?1+r/10:1)*n.fs:1*r};if("K"===t)return{kf:r};if("t"===t){const{t1:e,accel:t,tags:i}=r,s=r.t2||1e3*(n.end-n.start),a={};return i.forEach((e=>{const t=Object.keys(e)[0];~j.indexOf(t)&&("clip"!==t||e[t].dots)&&P(a,M(e,t,n))})),{t:{t1:e,t2:s,accel:t,tag:a}}}return{[t]:r}}const D=[null,1,2,3,null,7,8,9,null,4,5,6],$=["r","a","an","pos","org","move","fade","fad","clip"];function B({styles:e,style:t,parsed:n,start:r,end:i}){let s,a,o,l,c,u;const h=[];let d={style:t,fragments:[]},f={};for(let g=0;g=s.End)continue;e[s.Style]||(s.Style="Default");const a=e[s.Style].style,o=B({styles:e,style:s.Style,parsed:s.Text.parsed,start:s.Start,end:s.End}),l=o.alignment||a.Alignment;n=Math.min(n,s.Layer),r.push(P({layer:s.Layer,start:s.Start,end:s.End,style:s.Style,name:s.Name,margin:{left:s.MarginL||a.MarginL,right:s.MarginR||a.MarginR,vertical:s.MarginV||a.MarginV},effect:s.Effect},o,{alignment:l}))}for(let e=0;ee.start-t.start||e.end-t.end))}const V={Name:"Default",Fontname:"Arial",Fontsize:"20",PrimaryColour:"&H00FFFFFF&",SecondaryColour:"&H000000FF&",OutlineColour:"&H00000000&",BackColour:"&H00000000&",Bold:"0",Italic:"0",Underline:"0",StrikeOut:"0",ScaleX:"100",ScaleY:"100",Spacing:"0",Angle:"0",BorderStyle:"1",Outline:"2",Shadow:"2",Alignment:"2",MarginL:"10",MarginR:"10",MarginV:"10",Encoding:"1"};function H(e){if(/^(&|H|&H)[0-9a-f]{6,}/i.test(e)){const[,t,n]=e.match(/&?H?([0-9a-f]{2})?([0-9a-f]{6})/i);return[t||"00",n]}const t=parseInt(e,10);if(!Number.isNaN(t)){const e=-2147483648;if(tparseInt(e))),o=.001*r+a+60*s+3600*i;return Math.round(1e3*o)/1e3}secondsToTimestamp(e){const t=new Date(0,0,0,0,0,0,e),n=t.getHours(),r=t.getMinutes(),i=t.getSeconds(),s=Math.floor(e-(36e5*n+6e4*r+1e3*i));function a(e,t=2){return e.toString().padStart(t,"0")}return`${a(n)}:${a(r)}:${a(i)},${a(s,3)}`}correctFormat(e){const t=e.replace(".",","),[n,r]=t.split(","),i=this.fixedStrDigit(3,r),[s,a,o]=n.split(":");return`${this.fixedStrDigit(2,s,!1)}:${this.fixedStrDigit(2,a,!1)}:${this.fixedStrDigit(2,o,!1)},${i}`}fixedStrDigit(e,t,n=!0){return t.length===e?t:t.length>e?t.slice(0,e):n?t.padEnd(e,"0"):t.padStart(e,"0")}tryComma(e){const t=(e=e.replace(/\r/g,"")).split(/(\d+)\n(\d{1,2}:\d{2}:\d{2},\d{1,3}) --> (\d{1,2}:\d{2}:\d{2},\d{1,3})/g);return t.shift(),t}tryDot(e){const t=(e=e.replace(/\r/g,"")).split(/(\d+)\n(\d{1,2}:\d{2}:\d{2}\.\d{1,3}) --> (\d{1,2}:\d{2}:\d{2}\.\d{1,3})/g);return t.shift(),t}fromSrt(e){const t=e;let n=this.tryComma(t);0===n.length&&(n=this.tryDot(t));const r=[];for(let e=0;e]*)>","ig"),X=RegExp(/\\[nN]/,"ig"),K=document.createElement("div");class G{constructor({regexFilter:e,regexFilterTextReplacement:t,pgsWorkerFactory:n}){let r;try{r=""===e.trim()?void 0:new RegExp(e,"g")}catch(e){r=void 0}this._textFilter=void 0===r?void 0:{regex:r,replacement:t},this._pgsWorkerFactory=n}async subtitles(e,t){return(await Promise.all(e.map(((e,n)=>this._subtitles(e,!0===t?0:n))))).flatMap((e=>e)).filter((e=>void 0!==e.textImage||""!==e.text)).sort(((e,t)=>e.start-t.start))}async _subtitles(e,t){if(e.name.endsWith(".srt"))return new z({numericTimestamps:!0}).fromSrt(await e.text()).map((e=>({start:Math.floor(1e3*e.startTime),end:Math.floor(1e3*e.endTime),text:this._filterText(e.text).replace(Z,""),track:t})));if(e.name.endsWith(".vtt")||e.name.endsWith(".nfvtt"))return new Promise((async(n,r)=>{const i=e.name.endsWith(".nfvtt"),s=new q.WebVTT.Parser(window,q.WebVTT.StringDecoder()),a=[];s.oncue=e=>{if(e.text=this._filterText(e.text).replace(Z,""),i){const t=e.text.split("\n"),n=[];for(const e of t)n.push(this._fixRTL(e));e.text=n.join("\n")}a.push(e)},s.onflush=()=>n(a.map((e=>({start:Math.floor(1e3*e.startTime),end:Math.floor(1e3*e.endTime),text:e.text,track:t})))),s.parse(await e.text()),s.flush()}));if(e.name.endsWith(".ass"))return function(e,t={}){const n=function(e){const t={info:{},styles:{format:[],style:[]},events:{format:[],comment:[],dialogue:[]}},n=e.split(/\r?\n/);let r=0;for(let e=0;e{"Name"===e||"Fontname"===e||/Colour/.test(e)||(n[e]*=1)}));const[s,a]=H(n.PrimaryColour),[o,l]=H(n.SecondaryColour),[c,u]=H(n.OutlineColour),[h,d]=H(n.BackColour),f={fn:n.Fontname,fs:n.Fontsize,c1:a,a1:s,c2:l,a2:o,c3:u,a3:c,c4:d,a4:h,b:Math.abs(n.Bold),i:Math.abs(n.Italic),u:Math.abs(n.Underline),s:Math.abs(n.StrikeOut),fscx:n.ScaleX,fscy:n.ScaleY,fsp:n.Spacing,frz:n.Angle,xbord:n.Outline,ybord:n.Outline,xshad:n.Shadow,yshad:n.Shadow,fe:n.Encoding,q:/^[0-3]$/.test(e.WrapStyle)?1*e.WrapStyle:2};r[n.Name]={style:n,tag:f}}return r}({info:n.info,style:n.styles.style,defaultStyle:t.defaultStyle||{}});return{info:n.info,width:1*n.info.PlayResX||null,height:1*n.info.PlayResY||null,collisions:n.info.Collisions||"Normal",styles:r,dialogues:U({styles:r,dialogues:n.events.dialogue})}}(await e.text(),{}).dialogues.map((e=>({start:Math.round(1e3*e.start),end:Math.round(1e3*e.end),text:this._filterText(e.slices.flatMap((e=>e.fragments.map((e=>e.text)))).join("")).replace(X,"\n"),track:t})));if(e.name.endsWith(".ytxml")){const n=await e.text(),r=this._xmlParser().parse(n);if(0===Object.keys(r).length)return[];const i=r.transcript.text,s=[];for(let e=0,n=i.length;e{const s=await this._pgsWorkerFactory();s.onmessage=async e=>{switch(e.data.command){case"subtitle":const a={...e.data.subtitle,track:t},o=e.data.imageBlob;a.textImage.dataUrl=await this._blobToDataUrl(o),n.push(a);break;case"finished":s.terminate(),r(n);break;case"error":s.terminate(),i(e.data.error)}},s.onerror=e=>{const t=e?.error??new Error("PGS decoding failed: "+e?.message);i(t),s.terminate()};const a=document.createElement("canvas").transferControlToOffscreen(),o=await e.stream();s.postMessage({fileStream:o,canvas:a},[o,a])}))}_blobToDataUrl(e){return new Promise(((t,n)=>{var r=new FileReader;r.readAsDataURL(e),r.onloadend=()=>{t(r.result)}}))}_parseTtmlTimestamp(e){const t=e.split(":");return Math.floor(1e3*parseFloat(t[t.length-1]))+6e4*(t.length<2?0:Number(t[t.length-2]))+36e5*(t.length<3?0:Number(t[t.length-3]))}_xmlNodePath(e,t){if(0===t.length){const t=[];for(let n=0;n-1?(r=e.substring(0,t)+"‪"+e.substring(t+5)+"‬",this._fixRTL(r)):n>-1?(r=e.substring(0,n)+"‫"+e.substring(n+5)+"‬",this._fixRTL(r)):e}_decodeHTML(e){return K.innerHTML=e,K.textContent??K.innerText}_xmlParser(){return void 0===this.xmlParser&&(this.xmlParser=new W.XMLParser({ignoreAttributes:!1})),this.xmlParser}_filterText(e){return void 0===this._textFilter?e:e.replace(this._textFilter.regex,this._textFilter.replacement).trim()}subtitlesToSrt(e){const t=new z({numericTimestamps:!0}),n=e.map(((e,t)=>({id:String(t),startTime:e.start,endTime:e.end,text:e.text})));return t.toSrt(n)}async filesToSrt(e){return this.subtitlesToSrt(await this.subtitles(e))}}class Y{async get(e){return await chrome.storage.local.get(e)}async set(e){await chrome.storage.local.set(e)}}new v(new Y);const J=(new v(new Y),async e=>await ee(e)??await Q(e)??await Q("en")),Q=async e=>{for(const t of w)if(e===t)return{lang:e,strings:await(await fetch(chrome.runtime.getURL(`asbplayer-locales/${e}.json`))).json()}},ee=async e=>{const t=(e=>`locStrings-${e}`)(e),n=(await chrome.storage.local.get(t))[t];if(void 0!==n)return{lang:e,strings:n}};class te{constructor(e,t){this.frame=e,this.fetchOptions=t,this.bindPromise=void 0}async bind(){return this.bindPromise=this.bindPromise||this._bindClient(),this.bindPromise}updateState(e){if(!this.frameId)throw new Error("Attempted to update state when frame is not ready");this.frame.contentWindow?.postMessage({sender:"asbplayer-video",message:{command:"sendClientMessage",message:{command:"updateState",state:e},frameId:this.frameId}},"*")}sendMessage(e){if(!this.frameId)throw new Error("Attempted to send message when frame is not ready");this.frame.contentWindow?.postMessage({sender:"asbplayer-video",message:{command:"sendClientMessage",message:e,frameId:this.frameId}},"*")}onMessage(e){this.serverMessageListener=e}unbind(){this.windowMessageListener&&(window.removeEventListener("message",this.windowMessageListener),this.windowMessageListener=void 0),this.serverMessageListener=void 0}_bindClient(){return new Promise(((e,t)=>{let n=!1;this.windowMessageListener=t=>{if(t.source!==this.frame.contentWindow||"asbplayer-frame"!==t.data.sender)return;const r=t.data.message;switch(r.command){case"ready":this.frameId=t.data.message.frameId,n=!0,e();break;case"onServerMessage":"http-post"===r.message.command?this._resolveHttpPost(r.message):this.serverMessageListener&&this.serverMessageListener(r.message)}},setTimeout((()=>{n||(t(new Error("Timed out waiting for frame to be ready")),this.windowMessageListener&&(window.removeEventListener("message",this.windowMessageListener),this.windowMessageListener=void 0))}),1e4),window.addEventListener("message",this.windowMessageListener)}))}_resolveHttpPost(e){if(void 0===this.fetchOptions)return;if(void 0===this.fetchOptions.allowedFetchUrl||e.url!==this.fetchOptions.allowedFetchUrl)return;let t;const n={command:"http-post",url:e.url,body:e.body,messageId:e.messageId};t=void 0===this.fetchOptions.videoSrc?{sender:"asbplayer-video-tab",message:n}:{sender:"asbplayer-video",message:n,src:this.fetchOptions.videoSrc},chrome.runtime.sendMessage(t,(t=>{const n=t?{...t,messageId:e.messageId}:{error:chrome.runtime.lastError?.message,messageId:e.messageId};this.frame.contentWindow?.postMessage({sender:"asbplayer-video",message:{command:"sendClientMessage",message:n,frameId:this.frameId}},"*")}))}}class ne{constructor(e){this._language="en",this._dirty=!0,this._bound=!1,this._html=e}set fetchOptions(e){this._dirty=this._dirty||this._fetchOptions?.allowedFetchUrl!==e.allowedFetchUrl||this._fetchOptions?.videoSrc!==e.videoSrc,this._fetchOptions=e}set language(e){this._dirty=this._dirty||this._language!==e,this._language=e}get hidden(){return void 0===this._frame||this._frame.classList.contains("asbplayer-hide")}get bound(){return this._bound}async bind(){return await this._init()}async client(){return await this._init(),this._client}async _init(){if(!this._dirty)return!1;this._dirty=!1,this._bound=!0,this._client?.unbind(),this._frame?.remove(),this._frame=document.createElement("iframe"),this._frame.className="asbplayer-ui-frame",this._frame.style.colorScheme="normal",this._client=new te(this._frame,this._fetchOptions),document.body.appendChild(this._frame);const e=this._frame.contentDocument;return e.open(),e.write(await this._html(this._language)),e.close(),await this._client.bind(),!0}show(){this._frame?.classList.remove("asbplayer-hide")}hide(){this._frame?.classList.add("asbplayer-hide"),this._frame?.blur()}unbind(){this._dirty=!0,this._client?.unbind(),this._frame?.remove()}}class re{constructor(e){this._context=e,this._frame=new ne((async e=>`\n \n \n \n \n asbplayer - Request Active Tab Permission\n \n \n
\n